From a7745c4cc497bc9da79e2a5679bacf1d45fed7c2 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Mon, 5 Dec 2022 20:38:58 +0300 Subject: [PATCH] classref: Sync with current master branch (f87858a8f) --- classes/class_@gdscript.rst | 365 +- classes/class_@globalscope.rst | 7338 +++++++++---- classes/class_aabb.rst | 470 +- classes/class_acceptdialog.rst | 264 +- classes/class_aescontext.rst | 109 +- classes/class_animatablebody2d.rst | 34 +- classes/class_animatablebody3d.rst | 36 +- classes/class_animatedsprite2d.rst | 251 +- classes/class_animatedsprite3d.rst | 167 +- classes/class_animatedtexture.rst | 187 +- classes/class_animation.rst | 966 +- classes/class_animationlibrary.rst | 134 +- classes/class_animationnode.rst | 289 +- classes/class_animationnodeadd2.rst | 4 + classes/class_animationnodeadd3.rst | 4 + classes/class_animationnodeanimation.rst | 83 +- classes/class_animationnodeblend2.rst | 4 + classes/class_animationnodeblend3.rst | 4 + classes/class_animationnodeblendspace1d.rst | 201 +- classes/class_animationnodeblendspace2d.rst | 350 +- classes/class_animationnodeblendtree.rst | 189 +- classes/class_animationnodeoneshot.rst | 167 +- classes/class_animationnodeoutput.rst | 2 + classes/class_animationnodestatemachine.rst | 205 +- ...lass_animationnodestatemachineplayback.rst | 106 +- ...ss_animationnodestatemachinetransition.rst | 225 +- classes/class_animationnodesync.rst | 32 +- classes/class_animationnodetimescale.rst | 4 + classes/class_animationnodetimeseek.rst | 4 + classes/class_animationnodetransition.rst | 148 +- classes/class_animationplayer.rst | 657 +- classes/class_animationtree.rst | 333 +- classes/class_area2d.rst | 517 +- classes/class_area3d.rst | 664 +- classes/class_array.rst | 757 +- classes/class_arraymesh.rst | 291 +- classes/class_arrayoccluder3d.rst | 78 +- classes/class_aspectratiocontainer.rst | 177 +- classes/class_astar2d.rst | 263 +- classes/class_astar3d.rst | 263 +- classes/class_astargrid2d.rst | 368 +- classes/class_atlastexture.rst | 105 +- classes/class_audiobuslayout.rst | 2 + classes/class_audioeffect.rst | 25 +- classes/class_audioeffectamplify.rst | 36 +- classes/class_audioeffectbandlimitfilter.rst | 4 + classes/class_audioeffectbandpassfilter.rst | 4 + classes/class_audioeffectcapture.rst | 117 +- classes/class_audioeffectchorus.rst | 689 +- classes/class_audioeffectcompressor.rst | 162 +- classes/class_audioeffectdelay.rst | 288 +- classes/class_audioeffectdistortion.rst | 184 +- classes/class_audioeffecteq.rst | 45 +- classes/class_audioeffecteq10.rst | 4 + classes/class_audioeffecteq21.rst | 4 + classes/class_audioeffecteq6.rst | 4 + classes/class_audioeffectfilter.rst | 145 +- classes/class_audioeffecthighpassfilter.rst | 4 + classes/class_audioeffecthighshelffilter.rst | 4 + classes/class_audioeffectinstance.rst | 31 +- classes/class_audioeffectlimiter.rst | 99 +- classes/class_audioeffectlowpassfilter.rst | 4 + classes/class_audioeffectlowshelffilter.rst | 4 + classes/class_audioeffectnotchfilter.rst | 4 + classes/class_audioeffectpanner.rst | 36 +- classes/class_audioeffectphaser.rst | 120 +- classes/class_audioeffectpitchshift.rst | 144 +- classes/class_audioeffectrecord.rst | 77 +- classes/class_audioeffectreverb.rst | 183 +- classes/class_audioeffectspectrumanalyzer.rst | 144 +- ...ss_audioeffectspectrumanalyzerinstance.rst | 47 +- classes/class_audioeffectstereoenhance.rst | 78 +- classes/class_audiolistener2d.rst | 55 +- classes/class_audiolistener3d.rst | 53 +- classes/class_audioserver.rst | 560 +- classes/class_audiostream.rst | 105 +- classes/class_audiostreamgenerator.rst | 57 +- .../class_audiostreamgeneratorplayback.rst | 75 +- classes/class_audiostreammicrophone.rst | 6 +- classes/class_audiostreammp3.rst | 139 +- classes/class_audiostreamoggvorbis.rst | 135 +- classes/class_audiostreamplayback.rst | 95 +- .../class_audiostreamplaybackresampled.rst | 41 +- classes/class_audiostreamplayer.rst | 310 +- classes/class_audiostreamplayer2d.rst | 341 +- classes/class_audiostreamplayer3d.rst | 589 +- classes/class_audiostreamrandomizer.rst | 214 +- classes/class_audiostreamwav.rst | 259 +- classes/class_backbuffercopy.rst | 91 +- classes/class_basebutton.rst | 390 +- classes/class_basematerial3d.rst | 3590 ++++--- classes/class_basis.rst | 454 +- classes/class_bitmap.rst | 143 +- classes/class_bone2d.rst | 155 +- classes/class_boneattachment3d.rst | 156 +- classes/class_bonemap.rst | 97 +- classes/class_bool.rst | 108 +- classes/class_boxcontainer.rst | 141 +- classes/class_boxmesh.rst | 99 +- classes/class_boxoccluder3d.rst | 36 +- classes/class_boxshape3d.rst | 38 +- classes/class_button.rst | 526 +- classes/class_buttongroup.rst | 56 +- classes/class_callable.rst | 299 +- classes/class_callbacktweener.rst | 27 +- classes/class_camera2d.rst | 733 +- classes/class_camera3d.rst | 590 +- classes/class_cameraattributes.rst | 120 +- classes/class_cameraattributesphysical.rst | 204 +- classes/class_cameraattributespractical.rst | 202 +- classes/class_camerafeed.rst | 184 +- classes/class_cameraserver.rst | 127 +- classes/class_cameratexture.rst | 80 +- classes/class_canvasgroup.rst | 85 +- classes/class_canvasitem.rst | 1207 ++- classes/class_canvasitemmaterial.rst | 223 +- classes/class_canvaslayer.rst | 267 +- classes/class_canvasmodulate.rst | 36 +- classes/class_canvastexture.rst | 174 +- classes/class_capsulemesh.rst | 97 +- classes/class_capsuleshape2d.rst | 57 +- classes/class_capsuleshape3d.rst | 59 +- classes/class_centercontainer.rst | 38 +- classes/class_characterbody2d.rst | 577 +- classes/class_characterbody3d.rst | 577 +- classes/class_charfxtransform.rst | 263 +- classes/class_checkbox.rst | 352 +- classes/class_checkbutton.rst | 352 +- classes/class_circleshape2d.rst | 36 +- classes/class_classdb.rst | 243 +- classes/class_codeedit.rst | 1703 ++-- classes/class_codehighlighter.rst | 311 +- classes/class_collisionobject2d.rst | 505 +- classes/class_collisionobject3d.rst | 444 +- classes/class_collisionpolygon2d.rst | 150 +- classes/class_collisionpolygon3d.rst | 97 +- classes/class_collisionshape2d.rst | 120 +- classes/class_collisionshape3d.rst | 86 +- classes/class_color.rst | 2013 ++-- classes/class_colorpicker.rst | 646 +- classes/class_colorpickerbutton.rst | 329 +- classes/class_colorrect.rst | 36 +- classes/class_compressedcubemap.rst | 4 +- classes/class_compressedcubemaparray.rst | 4 +- classes/class_compressedtexture2d.rst | 63 +- classes/class_compressedtexture2darray.rst | 4 +- classes/class_compressedtexture3d.rst | 61 +- classes/class_compressedtexturelayered.rst | 55 +- classes/class_concavepolygonshape2d.rst | 42 +- classes/class_concavepolygonshape3d.rst | 75 +- classes/class_conetwistjoint3d.rst | 219 +- classes/class_configfile.rst | 197 +- classes/class_confirmationdialog.rst | 67 +- classes/class_container.rst | 102 +- classes/class_control.rst | 2483 +++-- classes/class_convexpolygonshape2d.rst | 59 +- classes/class_convexpolygonshape3d.rst | 42 +- classes/class_cpuparticles2d.rst | 1723 ++-- classes/class_cpuparticles3d.rst | 1897 ++-- classes/class_crypto.rst | 103 +- classes/class_cryptokey.rst | 63 +- classes/class_csgbox3d.rst | 55 +- classes/class_csgcombiner3d.rst | 4 + classes/class_csgcylinder3d.rst | 139 +- classes/class_csgmesh3d.rst | 53 +- classes/class_csgpolygon3d.rst | 419 +- classes/class_csgprimitive3d.rst | 36 +- classes/class_csgshape3d.rst | 269 +- classes/class_csgsphere3d.rst | 118 +- classes/class_csgtorus3d.rst | 139 +- classes/class_csharpscript.rst | 25 +- classes/class_cubemap.rst | 4 +- classes/class_cubemaparray.rst | 10 +- classes/class_curve.rst | 334 +- classes/class_curve2d.rst | 266 +- classes/class_curve3d.rst | 339 +- classes/class_curvetexture.rst | 104 +- classes/class_curvexyztexture.rst | 95 +- classes/class_cylindermesh.rst | 160 +- classes/class_cylindershape3d.rst | 59 +- classes/class_dampedspringjoint2d.rst | 97 +- classes/class_decal.rst | 417 +- classes/class_dictionary.rst | 397 +- classes/class_diraccess.rst | 360 +- classes/class_directionallight2d.rst | 66 +- classes/class_directionallight3d.rst | 274 +- classes/class_displayserver.rst | 2529 +++-- classes/class_dtlsserver.rst | 33 +- classes/class_editorcommandpalette.rst | 44 +- classes/class_editordebuggerplugin.rst | 65 +- classes/class_editordebuggersession.rst | 111 +- classes/class_editorexportplugin.rst | 237 +- classes/class_editorfeatureprofile.rst | 219 +- classes/class_editorfiledialog.rst | 378 +- classes/class_editorfilesystem.rst | 141 +- classes/class_editorfilesystemdirectory.rst | 153 +- ...itorfilesystemimportformatsupportquery.rst | 43 +- classes/class_editorimportplugin.rst | 139 +- classes/class_editorinspector.rst | 102 +- classes/class_editorinspectorplugin.rst | 109 +- classes/class_editorinterface.rst | 433 +- classes/class_editornode3dgizmo.rst | 253 +- classes/class_editornode3dgizmoplugin.rst | 239 +- classes/class_editorpaths.rst | 75 +- classes/class_editorplugin.rst | 949 +- classes/class_editorproperty.rst | 321 +- .../class_editorresourceconversionplugin.rst | 41 +- classes/class_editorresourcepicker.rst | 164 +- classes/class_editorresourcepreview.rst | 73 +- .../class_editorresourcepreviewgenerator.rst | 63 +- classes/class_editorsceneformatimporter.rst | 109 +- .../class_editorsceneformatimporterblend.rst | 2 + .../class_editorsceneformatimporterfbx.rst | 2 + classes/class_editorscenepostimport.rst | 35 +- classes/class_editorscenepostimportplugin.rst | 209 +- classes/class_editorscript.rst | 53 +- classes/class_editorscriptpicker.rst | 32 +- classes/class_editorselection.rst | 73 +- classes/class_editorsettings.rst | 2480 +++-- classes/class_editorspinslider.rst | 130 +- classes/class_editorsyntaxhighlighter.rst | 33 +- .../class_editortranslationparserplugin.rst | 37 +- classes/class_editorundoredomanager.rst | 169 +- classes/class_editorvcsinterface.rst | 423 +- classes/class_encodedobjectasid.rst | 36 +- classes/class_enetconnection.rst | 335 +- classes/class_enetmultiplayerpeer.rst | 102 +- classes/class_enetpacketpeer.rst | 449 +- classes/class_engine.rst | 392 +- classes/class_enginedebugger.rst | 125 +- classes/class_engineprofiler.rst | 43 +- classes/class_environment.rst | 2292 +++-- classes/class_expression.rst | 53 +- classes/class_fastnoiselite.rst | 740 +- classes/class_fileaccess.rst | 623 +- classes/class_filedialog.rst | 508 +- classes/class_filesystemdock.rst | 95 +- classes/class_float.rst | 562 +- classes/class_flowcontainer.rst | 149 +- classes/class_fogmaterial.rst | 137 +- classes/class_fogvolume.rst | 90 +- classes/class_font.rst | 357 +- classes/class_fontfile.rst | 1039 +- classes/class_fontvariation.rst | 263 +- classes/class_gdscript.rst | 35 +- classes/class_generic6dofjoint3d.rst | 2216 ++-- classes/class_geometry2d.rst | 373 +- classes/class_geometry3d.rst | 133 +- classes/class_geometryinstance3d.rst | 506 +- classes/class_gltfaccessor.rst | 305 +- classes/class_gltfanimation.rst | 32 +- classes/class_gltfbufferview.rst | 116 +- classes/class_gltfcamera.rst | 171 +- classes/class_gltfdocument.rst | 137 +- classes/class_gltfdocumentextension.rst | 175 +- classes/class_gltflight.rst | 192 +- classes/class_gltfmesh.rst | 72 +- classes/class_gltfnode.rst | 323 +- classes/class_gltfskeleton.rst | 134 +- classes/class_gltfskin.rst | 227 +- classes/class_gltfspecgloss.rst | 116 +- classes/class_gltfstate.rst | 616 +- classes/class_gltftexture.rst | 53 +- classes/class_gltftexturesampler.rst | 97 +- classes/class_godotsharp.rst | 23 +- classes/class_gpuparticles2d.rst | 608 +- classes/class_gpuparticles3d.rst | 766 +- classes/class_gpuparticlesattractor3d.rst | 99 +- classes/class_gpuparticlesattractorbox3d.rst | 34 +- .../class_gpuparticlesattractorsphere3d.rst | 36 +- ...ass_gpuparticlesattractorvectorfield3d.rst | 55 +- classes/class_gpuparticlescollision3d.rst | 34 +- classes/class_gpuparticlescollisionbox3d.rst | 34 +- ...ass_gpuparticlescollisionheightfield3d.rst | 199 +- classes/class_gpuparticlescollisionsdf3d.rst | 229 +- .../class_gpuparticlescollisionsphere3d.rst | 34 +- classes/class_gradient.rst | 213 +- classes/class_gradienttexture1d.rst | 78 +- classes/class_gradienttexture2d.rst | 241 +- classes/class_graphedit.rst | 904 +- classes/class_graphnode.rst | 874 +- classes/class_gridcontainer.rst | 73 +- classes/class_gridmap.rst | 556 +- classes/class_groovejoint2d.rst | 55 +- classes/class_hashingcontext.rst | 79 +- classes/class_hboxcontainer.rst | 29 +- classes/class_heightmapshape3d.rst | 80 +- classes/class_hflowcontainer.rst | 37 +- classes/class_hingejoint3d.rst | 402 +- classes/class_hmaccontext.rst | 43 +- classes/class_hscrollbar.rst | 123 +- classes/class_hseparator.rst | 35 +- classes/class_hslider.rst | 97 +- classes/class_hsplitcontainer.rst | 61 +- classes/class_httpclient.rst | 1075 +- classes/class_httprequest.rst | 409 +- classes/class_image.rst | 1306 ++- classes/class_imageformatloader.rst | 38 +- classes/class_imageformatloaderextension.rst | 53 +- classes/class_imagetexture.rst | 82 +- classes/class_imagetexture3d.rst | 37 +- classes/class_imagetexturelayered.rst | 35 +- classes/class_immediatemesh.rst | 113 +- classes/class_importermesh.rst | 272 +- classes/class_importermeshinstance3d.rst | 70 +- classes/class_input.rst | 722 +- classes/class_inputevent.rst | 157 +- classes/class_inputeventaction.rst | 78 +- classes/class_inputeventfromwindow.rst | 32 +- classes/class_inputeventgesture.rst | 32 +- classes/class_inputeventjoypadbutton.rst | 78 +- classes/class_inputeventjoypadmotion.rst | 59 +- classes/class_inputeventkey.rst | 159 +- classes/class_inputeventmagnifygesture.rst | 32 +- classes/class_inputeventmidi.rst | 183 +- classes/class_inputeventmouse.rst | 78 +- classes/class_inputeventmousebutton.rst | 99 +- classes/class_inputeventmousemotion.rst | 122 +- classes/class_inputeventpangesture.rst | 32 +- classes/class_inputeventscreendrag.rst | 99 +- classes/class_inputeventscreentouch.rst | 99 +- classes/class_inputeventshortcut.rst | 30 +- classes/class_inputeventwithmodifiers.rst | 141 +- classes/class_inputmap.rst | 155 +- classes/class_instanceplaceholder.rst | 49 +- classes/class_int.rst | 608 +- classes/class_intervaltweener.rst | 6 +- classes/class_ip.rst | 219 +- classes/class_itemlist.rst | 1030 +- classes/class_javaclasswrapper.rst | 21 +- classes/class_javascriptbridge.rst | 95 +- classes/class_javascriptobject.rst | 2 + classes/class_jnisingleton.rst | 4 + classes/class_joint2d.rst | 97 +- classes/class_joint3d.rst | 99 +- classes/class_json.rst | 97 +- classes/class_jsonrpc.rst | 139 +- classes/class_kinematiccollision2d.rst | 145 +- classes/class_kinematiccollision3d.rst | 155 +- classes/class_label.rst | 582 +- classes/class_label3d.rst | 742 +- classes/class_labelsettings.rst | 225 +- classes/class_light2d.rst | 437 +- classes/class_light3d.rst | 852 +- classes/class_lightmapgi.rst | 523 +- classes/class_lightmapgidata.rst | 113 +- classes/class_lightmapper.rst | 2 + classes/class_lightmapperrd.rst | 2 + classes/class_lightmapprobe.rst | 6 +- classes/class_lightoccluder2d.rst | 76 +- classes/class_line2d.rst | 453 +- classes/class_lineedit.rst | 1436 ++- classes/class_linkbutton.rst | 324 +- classes/class_mainloop.rst | 167 +- classes/class_margincontainer.rst | 75 +- classes/class_marker2d.rst | 34 +- classes/class_marker3d.rst | 34 +- classes/class_marshalls.rst | 73 +- classes/class_material.rst | 134 +- classes/class_menubar.rst | 467 +- classes/class_menubutton.rst | 333 +- classes/class_mesh.rst | 863 +- classes/class_meshdatatool.rst | 393 +- classes/class_meshinstance2d.rst | 86 +- classes/class_meshinstance3d.rst | 211 +- classes/class_meshlibrary.rst | 215 +- classes/class_meshtexture.rst | 76 +- classes/class_methodtweener.rst | 49 +- classes/class_missingnode.rst | 51 +- classes/class_missingresource.rst | 51 +- classes/class_mobilevrinterface.rst | 164 +- classes/class_moviewriter.rst | 89 +- classes/class_multimesh.rst | 333 +- classes/class_multimeshinstance2d.rst | 84 +- classes/class_multimeshinstance3d.rst | 38 +- classes/class_multiplayerapi.rst | 233 +- classes/class_multiplayerapiextension.rst | 103 +- classes/class_multiplayerpeer.rst | 309 +- classes/class_multiplayerpeerextension.rst | 213 +- classes/class_multiplayerspawner.rst | 144 +- classes/class_multiplayersynchronizer.rst | 227 +- classes/class_mutex.rst | 51 +- classes/class_nativeextension.rst | 107 +- classes/class_nativeextensionmanager.rst | 127 +- classes/class_navigationagent2d.rst | 425 +- classes/class_navigationagent3d.rst | 467 +- classes/class_navigationlink2d.rst | 191 +- classes/class_navigationlink3d.rst | 191 +- classes/class_navigationmesh.rst | 729 +- classes/class_navigationmeshgenerator.rst | 35 +- classes/class_navigationobstacle2d.rst | 98 +- classes/class_navigationobstacle3d.rst | 98 +- .../class_navigationpathqueryparameters2d.rst | 175 +- .../class_navigationpathqueryparameters3d.rst | 175 +- classes/class_navigationpathqueryresult2d.rst | 55 +- classes/class_navigationpathqueryresult3d.rst | 55 +- classes/class_navigationpolygon.rst | 165 +- classes/class_navigationregion2d.rst | 161 +- classes/class_navigationregion3d.rst | 187 +- classes/class_navigationserver2d.rst | 645 +- classes/class_navigationserver3d.rst | 721 +- classes/class_ninepatchrect.rst | 281 +- classes/class_node.rst | 1583 ++- classes/class_node2d.rst | 386 +- classes/class_node3d.rst | 780 +- classes/class_nodepath.rst | 207 +- classes/class_noise.rst | 83 +- classes/class_noisetexture2d.rst | 244 +- classes/class_object.rst | 1279 ++- classes/class_occluder3d.rst | 35 +- classes/class_occluderinstance3d.rst | 111 +- classes/class_occluderpolygon2d.rst | 112 +- classes/class_offlinemultiplayerpeer.rst | 31 + classes/class_oggpacketsequence.rst | 97 +- classes/class_omnilight3d.rst | 108 +- classes/class_openxraction.rst | 122 +- classes/class_openxractionmap.rst | 176 +- classes/class_openxractionset.rst | 117 +- classes/class_openxrhand.rst | 144 +- classes/class_openxrinteractionprofile.rst | 86 +- classes/class_openxrinterface.rst | 91 +- classes/class_openxripbinding.rst | 104 +- classes/class_optimizedtranslation.rst | 23 +- classes/class_optionbutton.rst | 677 +- classes/class_ormmaterial3d.rst | 4 + classes/class_os.rst | 990 +- classes/class_packedbytearray.rst | 709 +- classes/class_packedcolorarray.rst | 333 +- classes/class_packeddatacontainer.rst | 54 +- classes/class_packeddatacontainerref.rst | 21 +- classes/class_packedfloat32array.rst | 333 +- classes/class_packedfloat64array.rst | 333 +- classes/class_packedint32array.rst | 331 +- classes/class_packedint64array.rst | 331 +- classes/class_packedscene.rst | 124 +- classes/class_packedstringarray.rst | 335 +- classes/class_packedvector2array.rst | 347 +- classes/class_packedvector3array.rst | 345 +- classes/class_packetpeer.rst | 105 +- classes/class_packetpeerdtls.rst | 111 +- classes/class_packetpeerextension.rst | 51 +- classes/class_packetpeerstream.rst | 74 +- classes/class_packetpeerudp.rst | 149 +- classes/class_panel.rst | 27 +- classes/class_panelcontainer.rst | 38 +- classes/class_panoramaskymaterial.rst | 55 +- classes/class_parallaxbackground.rst | 143 +- classes/class_parallaxlayer.rst | 76 +- classes/class_particleprocessmaterial.rst | 2043 ++-- classes/class_path2d.rst | 32 +- classes/class_path3d.rst | 42 +- classes/class_pathfollow2d.rst | 181 +- classes/class_pathfollow3d.rst | 264 +- classes/class_pckpacker.rst | 47 +- classes/class_performance.rst | 329 +- classes/class_physicalbone2d.rst | 149 +- classes/class_physicalbone3d.rst | 506 +- classes/class_physicalskymaterial.rst | 258 +- classes/class_physicsbody2d.rst | 82 +- classes/class_physicsbody3d.rst | 228 +- classes/class_physicsdirectbodystate2d.rst | 490 +- ...lass_physicsdirectbodystate2dextension.rst | 431 +- classes/class_physicsdirectbodystate3d.rst | 532 +- ...lass_physicsdirectbodystate3dextension.rst | 461 +- classes/class_physicsdirectspacestate2d.rst | 75 +- ...ass_physicsdirectspacestate2dextension.rst | 71 +- classes/class_physicsdirectspacestate3d.rst | 75 +- ...ass_physicsdirectspacestate3dextension.rst | 81 +- classes/class_physicsmaterial.rst | 97 +- .../class_physicspointqueryparameters2d.rst | 141 +- .../class_physicspointqueryparameters3d.rst | 120 +- classes/class_physicsrayqueryparameters2d.rst | 185 +- classes/class_physicsrayqueryparameters3d.rst | 206 +- classes/class_physicsserver2d.rst | 1917 +++- classes/class_physicsserver2dextension.rst | 1371 ++- classes/class_physicsserver2dmanager.rst | 35 +- classes/class_physicsserver3d.rst | 2765 +++-- classes/class_physicsserver3dextension.rst | 1871 +++- classes/class_physicsserver3dmanager.rst | 35 +- ..._physicsserver3drenderingserverhandler.rst | 41 +- .../class_physicsshapequeryparameters2d.rst | 200 +- .../class_physicsshapequeryparameters3d.rst | 200 +- .../class_physicstestmotionparameters2d.rst | 162 +- .../class_physicstestmotionparameters3d.rst | 183 +- classes/class_physicstestmotionresult2d.rst | 143 +- classes/class_physicstestmotionresult3d.rst | 153 +- classes/class_pinjoint2d.rst | 34 +- classes/class_pinjoint3d.rst | 143 +- classes/class_placeholdercubemap.rst | 2 + classes/class_placeholdercubemaparray.rst | 2 + classes/class_placeholdermaterial.rst | 2 + classes/class_placeholdermesh.rst | 34 +- classes/class_placeholdertexture2d.rst | 38 +- classes/class_placeholdertexture2darray.rst | 2 + classes/class_placeholdertexture3d.rst | 34 +- classes/class_placeholdertexturelayered.rst | 55 +- classes/class_plane.rst | 388 +- classes/class_planemesh.rst | 158 +- classes/class_pointlight2d.rst | 109 +- classes/class_pointmesh.rst | 2 + classes/class_polygon2d.rst | 435 +- classes/class_polygonoccluder3d.rst | 36 +- classes/class_polygonpathfinder.rst | 91 +- classes/class_popup.rst | 45 +- classes/class_popupmenu.rst | 1171 ++- classes/class_popuppanel.rst | 27 +- classes/class_portablecompressedtexture2d.rst | 198 +- classes/class_primitivemesh.rst | 147 +- classes/class_prismmesh.rst | 118 +- classes/class_proceduralskymaterial.rst | 288 +- classes/class_progressbar.rst | 202 +- classes/class_projection.rst | 566 +- classes/class_projectsettings.rst | 7681 +++++++------- classes/class_propertytweener.rst | 83 +- classes/class_quadmesh.rst | 21 +- classes/class_quadoccluder3d.rst | 36 +- classes/class_quaternion.rst | 538 +- classes/class_randomnumbergenerator.rst | 130 +- classes/class_range.rst | 300 +- classes/class_raycast2d.rst | 313 +- classes/class_raycast3d.rst | 359 +- classes/class_rdattachmentformat.rst | 74 +- classes/class_rdframebufferpass.rst | 130 +- classes/class_rdpipelinecolorblendstate.rst | 95 +- ...ss_rdpipelinecolorblendstateattachment.rst | 263 +- classes/class_rdpipelinedepthstencilstate.rst | 452 +- classes/class_rdpipelinemultisamplestate.rst | 137 +- .../class_rdpipelinerasterizationstate.rst | 242 +- ...class_rdpipelinespecializationconstant.rst | 51 +- classes/class_rdsamplerstate.rst | 326 +- classes/class_rdshaderfile.rst | 73 +- classes/class_rdshadersource.rst | 168 +- classes/class_rdshaderspirv.rst | 272 +- classes/class_rdtextureformat.rst | 231 +- classes/class_rdtextureview.rst | 116 +- classes/class_rduniform.rst | 94 +- classes/class_rdvertexattribute.rst | 116 +- classes/class_rect2.rst | 382 +- classes/class_rect2i.rst | 334 +- classes/class_rectangleshape2d.rst | 38 +- classes/class_refcounted.rst | 59 +- classes/class_referencerect.rst | 84 +- classes/class_reflectionprobe.rst | 368 +- classes/class_regex.rst | 115 +- classes/class_regexmatch.rst | 118 +- classes/class_remotetransform2d.rst | 141 +- classes/class_remotetransform3d.rst | 141 +- classes/class_renderingdevice.rst | 5623 +++++++--- classes/class_renderingserver.rst | 9033 ++++++++++++----- classes/class_resource.rst | 175 +- classes/class_resourceformatloader.rst | 149 +- classes/class_resourceformatsaver.rst | 55 +- classes/class_resourceimporter.rst | 30 +- classes/class_resourceloader.rst | 215 +- classes/class_resourcepreloader.rst | 75 +- classes/class_resourcesaver.rst | 141 +- classes/class_resourceuid.rst | 105 +- classes/class_ribbontrailmesh.rst | 161 +- classes/class_richtexteffect.rst | 29 +- classes/class_richtextlabel.rst | 1816 ++-- classes/class_rid.rst | 171 +- classes/class_rigidbody2d.rst | 773 +- classes/class_rigidbody3d.rst | 753 +- classes/class_rootmotionview.rst | 122 +- classes/class_scenemultiplayer.rst | 230 +- classes/class_scenereplicationconfig.rst | 101 +- classes/class_scenestate.rst | 269 +- classes/class_scenetree.rst | 563 +- classes/class_scenetreetimer.rst | 42 +- classes/class_script.rst | 181 +- classes/class_scriptcreatedialog.rst | 54 +- classes/class_scripteditor.rst | 109 +- classes/class_scripteditorbase.rst | 91 +- classes/class_scriptextension.rst | 321 +- classes/class_scriptlanguageextension.rst | 861 +- classes/class_scrollbar.rst | 50 +- classes/class_scrollcontainer.rst | 277 +- classes/class_segmentshape2d.rst | 57 +- classes/class_semaphore.rst | 49 +- classes/class_separationrayshape2d.rst | 57 +- classes/class_separationrayshape3d.rst | 57 +- classes/class_separator.rst | 2 + classes/class_shader.rst | 143 +- classes/class_shaderinclude.rst | 32 +- classes/class_shadermaterial.rst | 65 +- classes/class_shape2d.rst | 107 +- classes/class_shape3d.rst | 80 +- classes/class_shapecast2d.rst | 397 +- classes/class_shapecast3d.rst | 432 +- classes/class_shortcut.rst | 75 +- classes/class_signal.rst | 237 +- classes/class_skeleton2d.rst | 105 +- classes/class_skeleton3d.rst | 641 +- classes/class_skeletonik3d.rst | 276 +- classes/class_skeletonmodification2d.rst | 158 +- classes/class_skeletonmodification2dccdik.rst | 227 +- .../class_skeletonmodification2dfabrik.rst | 146 +- .../class_skeletonmodification2djiggle.rst | 371 +- .../class_skeletonmodification2dlookat.rst | 187 +- ...ss_skeletonmodification2dphysicalbones.rst | 95 +- ...lass_skeletonmodification2dstackholder.rst | 33 +- .../class_skeletonmodification2dtwoboneik.rst | 188 +- classes/class_skeletonmodification3d.rst | 126 +- classes/class_skeletonmodification3dccdik.rst | 248 +- .../class_skeletonmodification3dfabrik.rst | 278 +- .../class_skeletonmodification3djiggle.rst | 391 +- .../class_skeletonmodification3dlookat.rst | 147 +- ...lass_skeletonmodification3dstackholder.rst | 33 +- .../class_skeletonmodification3dtwoboneik.rst | 305 +- classes/class_skeletonmodificationstack2d.rst | 177 +- classes/class_skeletonmodificationstack3d.rst | 177 +- classes/class_skeletonprofile.rst | 348 +- classes/class_skeletonprofilehumanoid.rst | 27 +- classes/class_skin.rst | 121 +- classes/class_skinreference.rst | 31 +- classes/class_sky.rst | 206 +- classes/class_slider.rst | 121 +- classes/class_sliderjoint3d.rst | 742 +- classes/class_softbody3d.rst | 397 +- classes/class_spheremesh.rst | 118 +- classes/class_sphereoccluder3d.rst | 36 +- classes/class_sphereshape3d.rst | 38 +- classes/class_spinbox.rst | 246 +- classes/class_splitcontainer.rst | 235 +- classes/class_spotlight3d.rst | 103 +- classes/class_springarm3d.rst | 146 +- classes/class_sprite2d.rst | 312 +- classes/class_sprite3d.rst | 176 +- classes/class_spritebase3d.rst | 500 +- classes/class_spriteframes.rst | 175 +- classes/class_standardmaterial3d.rst | 6 +- classes/class_staticbody2d.rst | 74 +- classes/class_staticbody3d.rst | 76 +- classes/class_streampeer.rst | 359 +- classes/class_streampeerbuffer.rst | 109 +- classes/class_streampeerextension.rst | 61 +- classes/class_streampeergzip.rst | 53 +- classes/class_streampeertcp.rst | 149 +- classes/class_streampeertls.rst | 165 +- classes/class_string.rst | 1242 ++- classes/class_stringname.rst | 199 +- classes/class_stylebox.rst | 262 +- classes/class_styleboxempty.rst | 2 + classes/class_styleboxflat.rst | 607 +- classes/class_styleboxline.rst | 122 +- classes/class_styleboxtexture.rst | 412 +- classes/class_subviewport.rst | 210 +- classes/class_subviewportcontainer.rst | 55 +- classes/class_surfacetool.rst | 457 +- classes/class_syntaxhighlighter.rst | 87 +- classes/class_systemfont.rst | 288 +- classes/class_tabbar.rst | 854 +- classes/class_tabcontainer.rst | 659 +- classes/class_tcpserver.rst | 73 +- classes/class_textedit.rst | 3010 ++++-- classes/class_textline.rst | 372 +- classes/class_textmesh.rst | 372 +- classes/class_textparagraph.rst | 575 +- classes/class_textserver.rst | 2993 ++++-- classes/class_textserverextension.rst | 1997 +++- classes/class_textservermanager.rst | 111 +- classes/class_texture.rst | 4 +- classes/class_texture2d.rst | 183 +- classes/class_texture2darray.rst | 2 + classes/class_texture3d.rst | 157 +- classes/class_texturebutton.rst | 293 +- classes/class_texturelayered.rst | 207 +- classes/class_textureprogressbar.rst | 486 +- classes/class_texturerect.rst | 200 +- classes/class_theme.rst | 783 +- classes/class_themedb.rst | 155 +- classes/class_thread.rst | 119 +- classes/class_tiledata.rst | 534 +- classes/class_tilemap.rst | 575 +- classes/class_tilemappattern.rst | 113 +- classes/class_tileset.rst | 1195 ++- classes/class_tilesetatlassource.rst | 397 +- .../class_tilesetscenescollectionsource.rst | 125 +- classes/class_tilesetsource.rst | 75 +- classes/class_time.rst | 421 +- classes/class_timer.rst | 211 +- classes/class_torusmesh.rst | 97 +- classes/class_touchscreenbutton.rst | 257 +- classes/class_transform2d.rst | 504 +- classes/class_transform3d.rst | 410 +- classes/class_translation.rst | 147 +- classes/class_translationserver.rst | 257 +- classes/class_tree.rst | 1330 ++- classes/class_treeitem.rst | 1064 +- classes/class_trianglemesh.rst | 2 + classes/class_tubetrailmesh.rst | 135 +- classes/class_tween.rst | 543 +- classes/class_tweener.rst | 16 +- classes/class_udpserver.rst | 115 +- classes/class_undoredo.rst | 275 +- classes/class_upnp.rst | 493 +- classes/class_upnpdevice.rst | 302 +- classes/class_variant.rst | 4 + classes/class_vboxcontainer.rst | 29 +- classes/class_vector2.rst | 896 +- classes/class_vector2i.rst | 536 +- classes/class_vector3.rst | 976 +- classes/class_vector3i.rst | 562 +- classes/class_vector4.rst | 722 +- classes/class_vector4i.rst | 532 +- classes/class_vehiclebody3d.rst | 82 +- classes/class_vehiclewheel3d.rst | 360 +- classes/class_vflowcontainer.rst | 37 +- classes/class_videostream.rst | 4 +- classes/class_videostreamplayer.rst | 288 +- classes/class_videostreamtheora.rst | 37 +- classes/class_viewport.rst | 1973 ++-- classes/class_viewporttexture.rst | 36 +- classes/class_visibleonscreenenabler2d.rst | 95 +- classes/class_visibleonscreenenabler3d.rst | 91 +- classes/class_visibleonscreennotifier2d.rst | 73 +- classes/class_visibleonscreennotifier3d.rst | 71 +- classes/class_visualinstance3d.rst | 131 +- classes/class_visualshader.rst | 473 +- classes/class_visualshadernode.rst | 213 +- classes/class_visualshadernodebillboard.rst | 111 +- .../class_visualshadernodebooleanconstant.rst | 34 +- ...class_visualshadernodebooleanparameter.rst | 55 +- classes/class_visualshadernodeclamp.rst | 100 +- .../class_visualshadernodecolorconstant.rst | 34 +- classes/class_visualshadernodecolorfunc.rst | 90 +- classes/class_visualshadernodecolorop.rst | 140 +- .../class_visualshadernodecolorparameter.rst | 55 +- classes/class_visualshadernodecomment.rst | 55 +- classes/class_visualshadernodecompare.rst | 266 +- classes/class_visualshadernodecubemap.rst | 152 +- ...class_visualshadernodecubemapparameter.rst | 2 + .../class_visualshadernodecurvetexture.rst | 32 +- .../class_visualshadernodecurvexyztexture.rst | 32 +- classes/class_visualshadernodecustom.rst | 165 +- .../class_visualshadernodederivativefunc.rst | 153 +- classes/class_visualshadernodedeterminant.rst | 2 + classes/class_visualshadernodedotproduct.rst | 2 + classes/class_visualshadernodeexpression.rst | 34 +- classes/class_visualshadernodefaceforward.rst | 2 + .../class_visualshadernodefloatconstant.rst | 34 +- classes/class_visualshadernodefloatfunc.rst | 370 +- classes/class_visualshadernodefloatop.rst | 150 +- .../class_visualshadernodefloatparameter.rst | 185 +- classes/class_visualshadernodefresnel.rst | 2 + ...class_visualshadernodeglobalexpression.rst | 2 + classes/class_visualshadernodegroupbase.rst | 223 +- classes/class_visualshadernodeif.rst | 2 + classes/class_visualshadernodeinput.rst | 67 +- classes/class_visualshadernodeintconstant.rst | 34 +- classes/class_visualshadernodeintfunc.rst | 90 +- classes/class_visualshadernodeintop.rst | 170 +- .../class_visualshadernodeintparameter.rst | 183 +- classes/class_visualshadernodeis.rst | 70 +- classes/class_visualshadernodemix.rst | 120 +- classes/class_visualshadernodemultiplyadd.rst | 90 +- .../class_visualshadernodeouterproduct.rst | 2 + classes/class_visualshadernodeoutput.rst | 2 + classes/class_visualshadernodeparameter.rst | 101 +- .../class_visualshadernodeparameterref.rst | 34 +- ...ss_visualshadernodeparticleaccelerator.rst | 78 +- .../class_visualshadernodeparticleemit.rst | 88 +- .../class_visualshadernodeparticleemitter.rst | 32 +- ...ss_visualshadernodeparticlemeshemitter.rst | 72 +- ...lshadernodeparticlemultiplybyaxisangle.rst | 32 +- ...ass_visualshadernodeparticlerandomness.rst | 78 +- .../class_visualshadernoderesizablebase.rst | 34 +- classes/class_visualshadernodesample3d.rst | 70 +- .../class_visualshadernodescreenuvtosdf.rst | 2 + classes/class_visualshadernodesdfraymarch.rst | 2 + .../class_visualshadernodesdftoscreenuv.rst | 2 + classes/class_visualshadernodesmoothstep.rst | 120 +- classes/class_visualshadernodestep.rst | 120 +- classes/class_visualshadernodeswitch.rst | 120 +- classes/class_visualshadernodetexture.rst | 192 +- .../class_visualshadernodetexture2darray.rst | 32 +- ...ass_visualshadernodetexture2dparameter.rst | 2 + classes/class_visualshadernodetexture3d.rst | 32 +- ...ass_visualshadernodetexture3dparameter.rst | 2 + ...class_visualshadernodetextureparameter.rst | 319 +- ...ualshadernodetextureparametertriplanar.rst | 2 + classes/class_visualshadernodetexturesdf.rst | 2 + ...class_visualshadernodetexturesdfnormal.rst | 2 + ...class_visualshadernodetransformcompose.rst | 2 + ...lass_visualshadernodetransformconstant.rst | 34 +- ...ass_visualshadernodetransformdecompose.rst | 2 + .../class_visualshadernodetransformfunc.rst | 70 +- classes/class_visualshadernodetransformop.rst | 140 +- ...ass_visualshadernodetransformparameter.rst | 55 +- ...class_visualshadernodetransformvecmult.rst | 90 +- classes/class_visualshadernodeuvfunc.rst | 68 +- classes/class_visualshadernodevarying.rst | 53 +- .../class_visualshadernodevec2constant.rst | 34 +- .../class_visualshadernodevec2parameter.rst | 55 +- .../class_visualshadernodevec3constant.rst | 34 +- .../class_visualshadernodevec3parameter.rst | 55 +- .../class_visualshadernodevec4constant.rst | 34 +- .../class_visualshadernodevec4parameter.rst | 55 +- classes/class_visualshadernodevectorbase.rst | 78 +- .../class_visualshadernodevectorcompose.rst | 2 + .../class_visualshadernodevectordecompose.rst | 2 + .../class_visualshadernodevectordistance.rst | 2 + classes/class_visualshadernodevectorfunc.rst | 380 +- classes/class_visualshadernodevectorlen.rst | 2 + classes/class_visualshadernodevectorop.rst | 170 +- .../class_visualshadernodevectorrefract.rst | 2 + classes/class_voxelgi.rst | 204 +- classes/class_voxelgidata.rst | 247 +- classes/class_vscrollbar.rst | 138 +- classes/class_vseparator.rst | 35 +- classes/class_vslider.rst | 112 +- classes/class_vsplitcontainer.rst | 61 +- classes/class_weakref.rst | 23 +- classes/class_webrtcdatachannel.rst | 231 +- classes/class_webrtcdatachannelextension.rst | 191 +- classes/class_webrtcmultiplayerpeer.rst | 93 +- classes/class_webrtcpeerconnection.rst | 317 +- .../class_webrtcpeerconnectionextension.rst | 121 +- classes/class_websocketmultiplayerpeer.rst | 200 +- classes/class_websocketpeer.rst | 357 +- classes/class_webxrinterface.rst | 381 +- classes/class_window.rst | 1548 ++- classes/class_workerthreadpool.rst | 81 +- classes/class_world2d.rst | 79 +- classes/class_world3d.rst | 136 +- classes/class_worldboundaryshape2d.rst | 59 +- classes/class_worldboundaryshape3d.rst | 40 +- classes/class_worldenvironment.rst | 61 +- classes/class_x509certificate.rst | 33 +- classes/class_xmlparser.rst | 259 +- classes/class_xranchor3d.rst | 35 +- classes/class_xrcamera3d.rst | 4 + classes/class_xrcontroller3d.rst | 83 +- classes/class_xrinterface.rst | 469 +- classes/class_xrinterfaceextension.rst | 369 +- classes/class_xrnode3d.rst | 106 +- classes/class_xrorigin3d.rst | 57 +- classes/class_xrpose.rst | 196 +- classes/class_xrpositionaltracker.rst | 267 +- classes/class_xrserver.rst | 340 +- classes/class_zippacker.rst | 99 +- classes/class_zipreader.rst | 55 +- classes/index.rst | 1 + 843 files changed, 158186 insertions(+), 80821 deletions(-) create mode 100644 classes/class_offlinemultiplayerpeer.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 85a5330a7..e7571c0eb 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -12,6 +12,8 @@ Built-in GDScript functions. +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,75 +21,110 @@ A list of GDScript-specific utility functions accessed in any script. For the list of the global functions and constants see :ref:`@GlobalScope`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GDScript exports <../tutorials/scripting/gdscript/gdscript_exports>` +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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:`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:`String` | :ref:`str` **(** ... **)** |vararg| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`type_exists` **(** :ref:`StringName` type **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`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:`String` | :ref:`str` **(** ... **)** |vararg| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`type_exists` **(** :ref:`StringName` type **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_@GDScript_constant_PI: +.. rst-class:: classref-constant + +**PI** = ``3.14159265358979`` + +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. + .. _class_@GDScript_constant_TAU: +.. rst-class:: classref-constant + +**TAU** = ``6.28318530717959`` + +The circle constant, the circumference of the unit circle in radians. This is equivalent to ``PI * 2``, or 360 degrees in rotations. + .. _class_@GDScript_constant_INF: -.. _class_@GDScript_constant_NAN: +.. rst-class:: classref-constant -- **PI** = **3.14159265358979** --- 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. +**INF** = ``inf`` -- **TAU** = **6.28318530717959** --- The circle constant, the circumference of the unit circle in radians. This is equivalent to ``PI * 2``, or 360 degrees in rotations. - -- **INF** = **inf** --- 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``). +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``). \ **Warning:** Numeric infinity is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer number by ``0`` will not result in :ref:`INF` and will result in a run-time error instead. -- **NAN** = **nan** --- "Not a Number", an invalid floating-point value. :ref:`NAN` has special properties, including that it is not equal to itself (``NAN == NAN`` returns ``false``). It is output by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``. +.. _class_@GDScript_constant_NAN: + +.. rst-class:: classref-constant + +**NAN** = ``nan`` + +"Not a Number", an invalid floating-point value. :ref:`NAN` has special properties, including that it is not equal to itself (``NAN == NAN`` returns ``false``). It is output by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``. \ **Warning:** "Not a Number" is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer ``0`` by ``0`` will not result in :ref:`NAN` and will result in a run-time error instead. +.. rst-class:: classref-section-separator + +---- + Annotations ----------- .. _class_@GDScript_annotation_@export: -- **@export** **(** **)** +.. rst-class:: classref-annotation + +**@export** **(** **)** 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. @@ -96,11 +133,15 @@ Mark the following property as exported (editable in the Inspector dock and save @export var int_number = 5 @export var float_number: float = 5 +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_annotation_@export_category: -- **@export_category** **(** :ref:`String` name **)** +.. rst-class:: classref-annotation + +**@export_category** **(** :ref:`String` name **)** Define a new category for the following exported properties. This helps to organize properties in the Inspector dock. @@ -114,11 +155,15 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_CATEGORY` and :ref:`@export_subgroup` instead. +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_annotation_@export_color_no_alpha: -- **@export_color_no_alpha** **(** **)** +.. rst-class:: classref-annotation + +**@export_color_no_alpha** **(** **)** Export a :ref:`Color` property without transparency (its alpha fixed as ``1.0``). @@ -128,11 +173,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_COLOR_NO_ALPHA` 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. @@ -142,11 +191,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_DIR` names, ... **)** |vararg| +.. rst-class:: classref-annotation + +**@export_enum** **(** :ref:`String` names, ... **)** |vararg| Export a :ref:`String` or integer property as an enumerated list of options. If the property is an integer field, then the index of the value is stored, in the same order the values are provided. You can add specific identifiers for allowed values using a colon. @@ -158,11 +211,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_ENUM` hints="", ... **)** |vararg| +.. rst-class:: classref-annotation + +**@export_exp_easing** **(** :ref:`String` hints="", ... **)** |vararg| 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. @@ -174,11 +231,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_EXP_EASING` filter="", ... **)** |vararg| +.. rst-class:: classref-annotation + +**@export_file** **(** :ref:`String` filter="", ... **)** |vararg| 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. @@ -191,11 +252,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_FILE` names, ... **)** |vararg| +.. rst-class:: classref-annotation + +**@export_flags** **(** :ref:`String` names, ... **)** |vararg| 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. @@ -205,11 +270,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_FLAGS`. @@ -219,11 +288,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_NAVIGATION`. @@ -233,11 +306,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_PHYSICS`. @@ -247,11 +324,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_RENDER`. @@ -261,11 +342,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_NAVIGATION`. @@ -275,11 +360,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_PHYSICS`. @@ -289,11 +378,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_RENDER` property as a 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. @@ -303,11 +396,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_DIR` filter="", ... **)** |vararg| +.. rst-class:: classref-annotation + +**@export_global_file** **(** :ref:`String` filter="", ... **)** |vararg| Export a :ref:`String` property as a 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. @@ -320,11 +417,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE` name, :ref:`String` prefix="" **)** +.. rst-class:: classref-annotation + +**@export_group** **(** :ref:`String` name, :ref:`String` prefix="" **)** 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. @@ -347,11 +448,15 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_GROUP` 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. @@ -361,11 +466,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_MULTILINE_TEXT` type="", ... **)** |vararg| +.. rst-class:: classref-annotation + +**@export_node_path** **(** :ref:`String` type="", ... **)** |vararg| Export a :ref:`NodePath` property with a filter for allowed node types. @@ -375,11 +484,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES` placeholder **)** +.. rst-class:: classref-annotation + +**@export_placeholder** **(** :ref:`String` placeholder **)** Export a :ref:`String` property with a placeholder text displayed in the editor widget when no value is present. @@ -389,11 +502,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_PLACEHOLDER_TEXT` min, :ref:`float` max, :ref:`float` step=1.0, :ref:`String` extra_hints="", ... **)** |vararg| +.. rst-class:: classref-annotation + +**@export_range** **(** :ref:`float` min, :ref:`float` max, :ref:`float` step=1.0, :ref:`String` extra_hints="", ... **)** |vararg| Export a numeric 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. @@ -416,11 +533,15 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_RANGE` name, :ref:`String` prefix="" **)** +.. rst-class:: classref-annotation + +**@export_subgroup** **(** :ref:`String` name, :ref:`String` prefix="" **)** 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`. @@ -438,13 +559,17 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` icon_path **)** +.. rst-class:: classref-annotation -Add a custom icon to the current script. After loading an icon at ``icon_path``, the icon is displayed in the Scene dock for every node that the script is attached to. For named classes, the icon is also displayed in various editor dialogs. +**@icon** **(** :ref:`String` icon_path **)** + +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. :: @@ -452,11 +577,15 @@ Add a custom icon to the current script. After loading an icon at ``icon_path``, \ **Note:** Only the script can have a custom icon. Inner classes are not supported. +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_annotation_@onready: -- **@onready** **(** **)** +.. rst-class:: classref-annotation + +**@onready** **(** **)** Mark the following property as assigned on :ref:`Node`'s ready state change. Values for these properties are not assigned immediately upon the node's creation, and instead are computed and stored right before :ref:`Node._ready`. @@ -464,11 +593,15 @@ Mark the following property as assigned on :ref:`Node`'s ready state @onready var character_name: Label = $Label +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_annotation_@rpc: -- **@rpc** **(** :ref:`String` mode="", :ref:`String` sync="", :ref:`String` transfer_mode="", :ref:`int` transfer_channel=0, ... **)** |vararg| +.. rst-class:: classref-annotation + +**@rpc** **(** :ref:`String` mode="", :ref:`String` sync="", :ref:`String` transfer_mode="", :ref:`int` transfer_channel=0, ... **)** |vararg| Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`. @@ -476,11 +609,15 @@ Mark the following method for remote procedure calls. See :doc:`High-level multi @rpc() +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_annotation_@tool: -- **@tool** **(** **)** +.. rst-class:: classref-annotation + +**@tool** **(** **)** 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>`. @@ -489,11 +626,15 @@ Mark the current script as a tool script, allowing it to be loaded and executed @tool extends Node +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_annotation_@warning_ignore: -- **@warning_ignore** **(** :ref:`String` warning, ... **)** |vararg| +.. rst-class:: classref-annotation + +**@warning_ignore** **(** :ref:`String` warning, ... **)** |vararg| Mark the following statement to ignore the specified ``warning``. See :doc:`GDScript warning system <../tutorials/scripting/gdscript/warning_system>`. @@ -505,12 +646,20 @@ Mark the following statement to ignore the specified ``warning``. See :doc:`GDSc @warning_ignore("unreachable_code") print("unreachable") +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_@GDScript_method_Color8: -- :ref:`Color` **Color8** **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8=255 **)** +.. rst-class:: classref-method + +:ref:`Color` **Color8** **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8=255 **)** 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. @@ -520,11 +669,15 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` var dark_blue = Color8(0, 0, 51) # Same as Color(0, 0, 0.2). var my_color = Color8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4). +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_assert: -- void **assert** **(** :ref:`bool` condition, :ref:`String` message="" **)** +.. rst-class:: classref-method + +void **assert** **(** :ref:`bool` condition, :ref:`String` message="" **)** 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. @@ -541,11 +694,15 @@ 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 +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_char: -- :ref:`String` **char** **(** :ref:`int` char **)** +.. rst-class:: classref-method + +:ref:`String` **char** **(** :ref:`int` char **)** Returns a single character (as a :ref:`String`) of the given Unicode code point (which is compatible with ASCII code). @@ -555,11 +712,15 @@ Returns a single character (as a :ref:`String`) of the given Unico a = char(65 + 32) # a is "a" a = char(8364) # a is "€" +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_convert: -- :ref:`Variant` **convert** **(** :ref:`Variant` what, :ref:`int` type **)** +.. rst-class:: classref-method + +:ref:`Variant` **convert** **(** :ref:`Variant` what, :ref:`int` type **)** Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :ref:`Variant.Type` values. @@ -572,19 +733,27 @@ Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :r print(b) # Prints [4, 2, 1] print(b is Array) # Prints false +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_dict_to_inst: -- :ref:`Object` **dict_to_inst** **(** :ref:`Dictionary` dictionary **)** +.. rst-class:: classref-method + +:ref:`Object` **dict_to_inst** **(** :ref:`Dictionary` dictionary **)** Converts a ``dictionary`` (created with :ref:`inst_to_dict`) back to an Object instance. Can be useful for deserializing. +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_get_stack: -- :ref:`Array` **get_stack** **(** **)** +.. rst-class:: classref-method + +:ref:`Array` **get_stack** **(** **)** Returns an array of dictionaries representing the current call stack. See also :ref:`print_stack`. @@ -609,11 +778,15 @@ Starting from ``_ready()``, ``bar()`` would print: \ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will return an empty array. +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_inst_to_dict: -- :ref:`Dictionary` **inst_to_dict** **(** :ref:`Object` instance **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **inst_to_dict** **(** :ref:`Object` instance **)** Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing. @@ -632,11 +805,15 @@ Prints out: [@subpath, @path, foo] [, res://test.gd, bar] +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_len: -- :ref:`int` **len** **(** :ref:`Variant` var **)** +.. rst-class:: classref-method + +:ref:`int` **len** **(** :ref:`Variant` var **)** 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. @@ -648,11 +825,15 @@ Returns the length of the given Variant ``var``. The length can be the character b = "Hello!" len(b) # Returns 6 +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_load: -- :ref:`Resource` **load** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Resource` **load** **(** :ref:`String` path **)** 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`. @@ -669,11 +850,15 @@ This function is a simplified version of :ref:`ResourceLoader.load`\ s at run-time, you may use :ref:`Image.load`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_preload: -- :ref:`Resource` **preload** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Resource` **preload** **(** :ref:`String` path **)** 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`. @@ -684,11 +869,15 @@ Returns a :ref:`Resource` from the filesystem located at ``path` # Create instance of a scene. var diamond = preload("res://diamond.tscn").instantiate() +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_print_debug: -- void **print_debug** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **print_debug** **(** ... **)** |vararg| Like :ref:`@GlobalScope.print`, but includes the current stack frame when running with the debugger turned on. @@ -701,11 +890,15 @@ The output in the console may look like the following: \ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will instead print the thread ID. +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_print_stack: -- void **print_stack** **(** **)** +.. rst-class:: classref-method + +void **print_stack** **(** **)** Prints a stack trace at the current code location. See also :ref:`get_stack`. @@ -719,11 +912,15 @@ The output in the console may look like the following: \ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will instead print the thread ID. +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_range: -- :ref:`Array` **range** **(** ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Array` **range** **(** ... **)** |vararg| Returns an array with the given range. :ref:`range` can be called in three ways: @@ -777,11 +974,15 @@ Output: 0.2 0.1 +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_str: -- :ref:`String` **str** **(** ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`String` **str** **(** ... **)** |vararg| Converts one or more arguments to a :ref:`String` in the best way possible. @@ -792,11 +993,15 @@ Converts one or more arguments to a :ref:`String` in the best way len(a) # Returns 3 len(b) # Returns 12 +.. rst-class:: classref-item-separator + ---- .. _class_@GDScript_method_type_exists: -- :ref:`bool` **type_exists** **(** :ref:`StringName` type **)** +.. rst-class:: classref-method + +:ref:`bool` **type_exists** **(** :ref:`StringName` type **)** 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`. diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 3bc97e6d3..a514d7cbf 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -12,6 +12,8 @@ Global scope constants and functions. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,2003 +23,3501 @@ Singletons are also documented here, since they can be accessed from anywhere. For the entries related to GDScript which can be accessed in any script see :ref:`@GDScript`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Random number generation <../tutorials/math/random_number_generation>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`AudioServer` | :ref:`AudioServer` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CameraServer` | :ref:`CameraServer` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`ClassDB` | :ref:`ClassDB` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`DisplayServer` | :ref:`DisplayServer` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Engine` | :ref:`Engine` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`EngineDebugger` | :ref:`EngineDebugger` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Geometry2D` | :ref:`Geometry2D` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Geometry3D` | :ref:`Geometry3D` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`GodotSharp` | :ref:`GodotSharp` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`IP` | :ref:`IP` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Input` | :ref:`Input` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`InputMap` | :ref:`InputMap` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`JavaClassWrapper` | :ref:`JavaClassWrapper` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`JavaScriptBridge` | :ref:`JavaScriptBridge` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Marshalls` | :ref:`Marshalls` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`NativeExtensionManager` | :ref:`NativeExtensionManager` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`NavigationMeshGenerator` | :ref:`NavigationMeshGenerator` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`NavigationServer2D` | :ref:`NavigationServer2D` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`NavigationServer3D` | :ref:`NavigationServer3D` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`OS` | :ref:`OS` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Performance` | :ref:`Performance` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`PhysicsServer2D` | :ref:`PhysicsServer2D` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`PhysicsServer2DManager` | :ref:`PhysicsServer2DManager` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`PhysicsServer3D` | :ref:`PhysicsServer3D` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`PhysicsServer3DManager` | :ref:`PhysicsServer3DManager` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`ProjectSettings` | :ref:`ProjectSettings` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`RenderingServer` | :ref:`RenderingServer` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`ResourceLoader` | :ref:`ResourceLoader` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`ResourceSaver` | :ref:`ResourceSaver` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`ResourceUID` | :ref:`ResourceUID` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`TextServerManager` | :ref:`TextServerManager` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`ThemeDB` | :ref:`ThemeDB` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Time` | :ref:`Time` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`TranslationServer` | :ref:`TranslationServer` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`WorkerThreadPool` | :ref:`WorkerThreadPool` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`XRServer` | :ref:`XRServer` | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`AudioServer` | :ref:`AudioServer` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CameraServer` | :ref:`CameraServer` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`ClassDB` | :ref:`ClassDB` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`DisplayServer` | :ref:`DisplayServer` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Engine` | :ref:`Engine` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`EngineDebugger` | :ref:`EngineDebugger` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Geometry2D` | :ref:`Geometry2D` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Geometry3D` | :ref:`Geometry3D` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`GodotSharp` | :ref:`GodotSharp` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`IP` | :ref:`IP` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Input` | :ref:`Input` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`InputMap` | :ref:`InputMap` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`JavaClassWrapper` | :ref:`JavaClassWrapper` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`JavaScriptBridge` | :ref:`JavaScriptBridge` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Marshalls` | :ref:`Marshalls` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`NativeExtensionManager` | :ref:`NativeExtensionManager` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`NavigationMeshGenerator` | :ref:`NavigationMeshGenerator` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`NavigationServer2D` | :ref:`NavigationServer2D` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`NavigationServer3D` | :ref:`NavigationServer3D` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`OS` | :ref:`OS` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Performance` | :ref:`Performance` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`PhysicsServer2D` | :ref:`PhysicsServer2D` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`PhysicsServer2DManager` | :ref:`PhysicsServer2DManager` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`PhysicsServer3D` | :ref:`PhysicsServer3D` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`PhysicsServer3DManager` | :ref:`PhysicsServer3DManager` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`ProjectSettings` | :ref:`ProjectSettings` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`RenderingServer` | :ref:`RenderingServer` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`ResourceLoader` | :ref:`ResourceLoader` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`ResourceSaver` | :ref:`ResourceSaver` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`ResourceUID` | :ref:`ResourceUID` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`TextServerManager` | :ref:`TextServerManager` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`ThemeDB` | :ref:`ThemeDB` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Time` | :ref:`Time` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`TranslationServer` | :ref:`TranslationServer` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`WorkerThreadPool` | :ref:`WorkerThreadPool` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`XRServer` | :ref:`XRServer` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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_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_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:`float` | :ref:`snapped` **(** :ref:`float` x, :ref:`float` 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 **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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_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 **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_@GlobalScope_Side: -.. _class_@GlobalScope_constant_SIDE_LEFT: - -.. _class_@GlobalScope_constant_SIDE_TOP: - -.. _class_@GlobalScope_constant_SIDE_RIGHT: - -.. _class_@GlobalScope_constant_SIDE_BOTTOM: +.. rst-class:: classref-enumeration enum **Side**: -- **SIDE_LEFT** = **0** --- Left side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. +.. _class_@GlobalScope_constant_SIDE_LEFT: -- **SIDE_TOP** = **1** --- Top side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. +.. rst-class:: classref-enumeration-constant -- **SIDE_RIGHT** = **2** --- Right side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. +:ref:`Side` **SIDE_LEFT** = ``0`` -- **SIDE_BOTTOM** = **3** --- Bottom side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. +Left side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. + +.. _class_@GlobalScope_constant_SIDE_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Side` **SIDE_TOP** = ``1`` + +Top side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. + +.. _class_@GlobalScope_constant_SIDE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Side` **SIDE_RIGHT** = ``2`` + +Right side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. + +.. _class_@GlobalScope_constant_SIDE_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Side` **SIDE_BOTTOM** = ``3`` + +Bottom side, usually used for :ref:`Control` or :ref:`StyleBox`-derived classes. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_Corner: -.. _class_@GlobalScope_constant_CORNER_TOP_LEFT: - -.. _class_@GlobalScope_constant_CORNER_TOP_RIGHT: - -.. _class_@GlobalScope_constant_CORNER_BOTTOM_RIGHT: - -.. _class_@GlobalScope_constant_CORNER_BOTTOM_LEFT: +.. rst-class:: classref-enumeration enum **Corner**: -- **CORNER_TOP_LEFT** = **0** --- Top-left corner. +.. _class_@GlobalScope_constant_CORNER_TOP_LEFT: -- **CORNER_TOP_RIGHT** = **1** --- Top-right corner. +.. rst-class:: classref-enumeration-constant -- **CORNER_BOTTOM_RIGHT** = **2** --- Bottom-right corner. +:ref:`Corner` **CORNER_TOP_LEFT** = ``0`` -- **CORNER_BOTTOM_LEFT** = **3** --- Bottom-left corner. +Top-left corner. + +.. _class_@GlobalScope_constant_CORNER_TOP_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Corner` **CORNER_TOP_RIGHT** = ``1`` + +Top-right corner. + +.. _class_@GlobalScope_constant_CORNER_BOTTOM_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Corner` **CORNER_BOTTOM_RIGHT** = ``2`` + +Bottom-right corner. + +.. _class_@GlobalScope_constant_CORNER_BOTTOM_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Corner` **CORNER_BOTTOM_LEFT** = ``3`` + +Bottom-left corner. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_Orientation: -.. _class_@GlobalScope_constant_VERTICAL: - -.. _class_@GlobalScope_constant_HORIZONTAL: +.. rst-class:: classref-enumeration enum **Orientation**: -- **VERTICAL** = **1** --- General vertical alignment, usually used for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. +.. _class_@GlobalScope_constant_VERTICAL: -- **HORIZONTAL** = **0** --- General horizontal alignment, usually used for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. +.. rst-class:: classref-enumeration-constant + +:ref:`Orientation` **VERTICAL** = ``1`` + +General vertical alignment, usually used for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. + +.. _class_@GlobalScope_constant_HORIZONTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Orientation` **HORIZONTAL** = ``0`` + +General horizontal alignment, usually used for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_ClockDirection: -.. _class_@GlobalScope_constant_CLOCKWISE: - -.. _class_@GlobalScope_constant_COUNTERCLOCKWISE: +.. rst-class:: classref-enumeration enum **ClockDirection**: -- **CLOCKWISE** = **0** --- Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). +.. _class_@GlobalScope_constant_CLOCKWISE: -- **COUNTERCLOCKWISE** = **1** --- Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). +.. rst-class:: classref-enumeration-constant + +:ref:`ClockDirection` **CLOCKWISE** = ``0`` + +Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). + +.. _class_@GlobalScope_constant_COUNTERCLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ClockDirection` **COUNTERCLOCKWISE** = ``1`` + +Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_HorizontalAlignment: -.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_LEFT: - -.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_CENTER: - -.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_RIGHT: - -.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_FILL: +.. rst-class:: classref-enumeration enum **HorizontalAlignment**: -- **HORIZONTAL_ALIGNMENT_LEFT** = **0** --- Horizontal left alignment, usually for text-derived classes. +.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_LEFT: -- **HORIZONTAL_ALIGNMENT_CENTER** = **1** --- Horizontal center alignment, usually for text-derived classes. +.. rst-class:: classref-enumeration-constant -- **HORIZONTAL_ALIGNMENT_RIGHT** = **2** --- Horizontal right alignment, usually for text-derived classes. +:ref:`HorizontalAlignment` **HORIZONTAL_ALIGNMENT_LEFT** = ``0`` -- **HORIZONTAL_ALIGNMENT_FILL** = **3** --- Expand row to fit width, usually for text-derived classes. +Horizontal left alignment, usually for text-derived classes. + +.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`HorizontalAlignment` **HORIZONTAL_ALIGNMENT_CENTER** = ``1`` + +Horizontal center alignment, usually for text-derived classes. + +.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`HorizontalAlignment` **HORIZONTAL_ALIGNMENT_RIGHT** = ``2`` + +Horizontal right alignment, usually for text-derived classes. + +.. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_FILL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HorizontalAlignment` **HORIZONTAL_ALIGNMENT_FILL** = ``3`` + +Expand row to fit width, usually for text-derived classes. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_VerticalAlignment: -.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_TOP: - -.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_CENTER: - -.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_BOTTOM: - -.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_FILL: +.. rst-class:: classref-enumeration enum **VerticalAlignment**: -- **VERTICAL_ALIGNMENT_TOP** = **0** --- Vertical top alignment, usually for text-derived classes. +.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_TOP: -- **VERTICAL_ALIGNMENT_CENTER** = **1** --- Vertical center alignment, usually for text-derived classes. +.. rst-class:: classref-enumeration-constant -- **VERTICAL_ALIGNMENT_BOTTOM** = **2** --- Vertical bottom alignment, usually for text-derived classes. +:ref:`VerticalAlignment` **VERTICAL_ALIGNMENT_TOP** = ``0`` -- **VERTICAL_ALIGNMENT_FILL** = **3** --- Expand rows to fit height, usually for text-derived classes. +Vertical top alignment, usually for text-derived classes. + +.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`VerticalAlignment` **VERTICAL_ALIGNMENT_CENTER** = ``1`` + +Vertical center alignment, usually for text-derived classes. + +.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`VerticalAlignment` **VERTICAL_ALIGNMENT_BOTTOM** = ``2`` + +Vertical bottom alignment, usually for text-derived classes. + +.. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_FILL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VerticalAlignment` **VERTICAL_ALIGNMENT_FILL** = ``3`` + +Expand rows to fit height, usually for text-derived classes. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_InlineAlignment: -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP_TO: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER_TO: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM_TO: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_TOP: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_CENTER: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BASELINE: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BOTTOM: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_IMAGE_MASK: - -.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TEXT_MASK: +.. rst-class:: classref-enumeration enum **InlineAlignment**: -- **INLINE_ALIGNMENT_TOP_TO** = **0** --- Aligns the top of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant. +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP_TO: -- **INLINE_ALIGNMENT_CENTER_TO** = **1** --- Aligns the center of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant. +.. rst-class:: classref-enumeration-constant -- **INLINE_ALIGNMENT_BOTTOM_TO** = **2** --- Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant. +:ref:`InlineAlignment` **INLINE_ALIGNMENT_TOP_TO** = ``0`` -- **INLINE_ALIGNMENT_TO_TOP** = **0** --- Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the top of the text. +Aligns the top of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant. -- **INLINE_ALIGNMENT_TO_CENTER** = **4** --- Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the center of the text. +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER_TO: -- **INLINE_ALIGNMENT_TO_BASELINE** = **8** --- Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the baseline of the text. +.. rst-class:: classref-enumeration-constant -- **INLINE_ALIGNMENT_TO_BOTTOM** = **12** --- Aligns inline object (e.g. image, table) to the bottom of the text. +:ref:`InlineAlignment` **INLINE_ALIGNMENT_CENTER_TO** = ``1`` -- **INLINE_ALIGNMENT_TOP** = **0** --- Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to ``INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP``. +Aligns the center of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant. -- **INLINE_ALIGNMENT_CENTER** = **5** --- Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to ``INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER``. +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM_TO: -- **INLINE_ALIGNMENT_BOTTOM** = **14** --- Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to ``INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM``. +.. rst-class:: classref-enumeration-constant -- **INLINE_ALIGNMENT_IMAGE_MASK** = **3** --- A bit mask for ``INLINE_ALIGNMENT_*_TO`` alignment constants. +:ref:`InlineAlignment` **INLINE_ALIGNMENT_BOTTOM_TO** = ``2`` -- **INLINE_ALIGNMENT_TEXT_MASK** = **12** --- A bit mask for ``INLINE_ALIGNMENT_TO_*`` alignment constants. +Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by ``INLINE_ALIGNMENT_TO_*`` constant. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_TO_TOP** = ``0`` + +Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the top of the text. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_TO_CENTER** = ``4`` + +Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the center of the text. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BASELINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_TO_BASELINE** = ``8`` + +Aligns the position of the inline object (e.g. image, table) specified by ``INLINE_ALIGNMENT_*_TO`` constant to the baseline of the text. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TO_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_TO_BOTTOM** = ``12`` + +Aligns inline object (e.g. image, table) to the bottom of the text. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_TOP** = ``0`` + +Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to ``INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP``. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_CENTER** = ``5`` + +Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to ``INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER``. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_BOTTOM** = ``14`` + +Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to ``INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM``. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_IMAGE_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_IMAGE_MASK** = ``3`` + +A bit mask for ``INLINE_ALIGNMENT_*_TO`` alignment constants. + +.. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TEXT_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`InlineAlignment` **INLINE_ALIGNMENT_TEXT_MASK** = ``12`` + +A bit mask for ``INLINE_ALIGNMENT_TO_*`` alignment constants. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_EulerOrder: -.. _class_@GlobalScope_constant_EULER_ORDER_XYZ: - -.. _class_@GlobalScope_constant_EULER_ORDER_XZY: - -.. _class_@GlobalScope_constant_EULER_ORDER_YXZ: - -.. _class_@GlobalScope_constant_EULER_ORDER_YZX: - -.. _class_@GlobalScope_constant_EULER_ORDER_ZXY: - -.. _class_@GlobalScope_constant_EULER_ORDER_ZYX: +.. rst-class:: classref-enumeration enum **EulerOrder**: -- **EULER_ORDER_XYZ** = **0** --- Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last. +.. _class_@GlobalScope_constant_EULER_ORDER_XYZ: -- **EULER_ORDER_XZY** = **1** --- Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last. +.. rst-class:: classref-enumeration-constant -- **EULER_ORDER_YXZ** = **2** --- Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last. +:ref:`EulerOrder` **EULER_ORDER_XYZ** = ``0`` -- **EULER_ORDER_YZX** = **3** --- Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last. +Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last. -- **EULER_ORDER_ZXY** = **4** --- Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last. +.. _class_@GlobalScope_constant_EULER_ORDER_XZY: -- **EULER_ORDER_ZYX** = **5** --- Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last. +.. rst-class:: classref-enumeration-constant + +:ref:`EulerOrder` **EULER_ORDER_XZY** = ``1`` + +Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last. + +.. _class_@GlobalScope_constant_EULER_ORDER_YXZ: + +.. rst-class:: classref-enumeration-constant + +:ref:`EulerOrder` **EULER_ORDER_YXZ** = ``2`` + +Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last. + +.. _class_@GlobalScope_constant_EULER_ORDER_YZX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EulerOrder` **EULER_ORDER_YZX** = ``3`` + +Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last. + +.. _class_@GlobalScope_constant_EULER_ORDER_ZXY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EulerOrder` **EULER_ORDER_ZXY** = ``4`` + +Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last. + +.. _class_@GlobalScope_constant_EULER_ORDER_ZYX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EulerOrder` **EULER_ORDER_ZYX** = ``5`` + +Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_Key: -.. _class_@GlobalScope_constant_KEY_NONE: - -.. _class_@GlobalScope_constant_KEY_SPECIAL: - -.. _class_@GlobalScope_constant_KEY_ESCAPE: - -.. _class_@GlobalScope_constant_KEY_TAB: - -.. _class_@GlobalScope_constant_KEY_BACKTAB: - -.. _class_@GlobalScope_constant_KEY_BACKSPACE: - -.. _class_@GlobalScope_constant_KEY_ENTER: - -.. _class_@GlobalScope_constant_KEY_KP_ENTER: - -.. _class_@GlobalScope_constant_KEY_INSERT: - -.. _class_@GlobalScope_constant_KEY_DELETE: - -.. _class_@GlobalScope_constant_KEY_PAUSE: - -.. _class_@GlobalScope_constant_KEY_PRINT: - -.. _class_@GlobalScope_constant_KEY_SYSREQ: - -.. _class_@GlobalScope_constant_KEY_CLEAR: - -.. _class_@GlobalScope_constant_KEY_HOME: - -.. _class_@GlobalScope_constant_KEY_END: - -.. _class_@GlobalScope_constant_KEY_LEFT: - -.. _class_@GlobalScope_constant_KEY_UP: - -.. _class_@GlobalScope_constant_KEY_RIGHT: - -.. _class_@GlobalScope_constant_KEY_DOWN: - -.. _class_@GlobalScope_constant_KEY_PAGEUP: - -.. _class_@GlobalScope_constant_KEY_PAGEDOWN: - -.. _class_@GlobalScope_constant_KEY_SHIFT: - -.. _class_@GlobalScope_constant_KEY_CTRL: - -.. _class_@GlobalScope_constant_KEY_META: - -.. _class_@GlobalScope_constant_KEY_ALT: - -.. _class_@GlobalScope_constant_KEY_CAPSLOCK: - -.. _class_@GlobalScope_constant_KEY_NUMLOCK: - -.. _class_@GlobalScope_constant_KEY_SCROLLLOCK: - -.. _class_@GlobalScope_constant_KEY_F1: - -.. _class_@GlobalScope_constant_KEY_F2: - -.. _class_@GlobalScope_constant_KEY_F3: - -.. _class_@GlobalScope_constant_KEY_F4: - -.. _class_@GlobalScope_constant_KEY_F5: - -.. _class_@GlobalScope_constant_KEY_F6: - -.. _class_@GlobalScope_constant_KEY_F7: - -.. _class_@GlobalScope_constant_KEY_F8: - -.. _class_@GlobalScope_constant_KEY_F9: - -.. _class_@GlobalScope_constant_KEY_F10: - -.. _class_@GlobalScope_constant_KEY_F11: - -.. _class_@GlobalScope_constant_KEY_F12: - -.. _class_@GlobalScope_constant_KEY_F13: - -.. _class_@GlobalScope_constant_KEY_F14: - -.. _class_@GlobalScope_constant_KEY_F15: - -.. _class_@GlobalScope_constant_KEY_F16: - -.. _class_@GlobalScope_constant_KEY_F17: - -.. _class_@GlobalScope_constant_KEY_F18: - -.. _class_@GlobalScope_constant_KEY_F19: - -.. _class_@GlobalScope_constant_KEY_F20: - -.. _class_@GlobalScope_constant_KEY_F21: - -.. _class_@GlobalScope_constant_KEY_F22: - -.. _class_@GlobalScope_constant_KEY_F23: - -.. _class_@GlobalScope_constant_KEY_F24: - -.. _class_@GlobalScope_constant_KEY_F25: - -.. _class_@GlobalScope_constant_KEY_F26: - -.. _class_@GlobalScope_constant_KEY_F27: - -.. _class_@GlobalScope_constant_KEY_F28: - -.. _class_@GlobalScope_constant_KEY_F29: - -.. _class_@GlobalScope_constant_KEY_F30: - -.. _class_@GlobalScope_constant_KEY_F31: - -.. _class_@GlobalScope_constant_KEY_F32: - -.. _class_@GlobalScope_constant_KEY_F33: - -.. _class_@GlobalScope_constant_KEY_F34: - -.. _class_@GlobalScope_constant_KEY_F35: - -.. _class_@GlobalScope_constant_KEY_KP_MULTIPLY: - -.. _class_@GlobalScope_constant_KEY_KP_DIVIDE: - -.. _class_@GlobalScope_constant_KEY_KP_SUBTRACT: - -.. _class_@GlobalScope_constant_KEY_KP_PERIOD: - -.. _class_@GlobalScope_constant_KEY_KP_ADD: - -.. _class_@GlobalScope_constant_KEY_KP_0: - -.. _class_@GlobalScope_constant_KEY_KP_1: - -.. _class_@GlobalScope_constant_KEY_KP_2: - -.. _class_@GlobalScope_constant_KEY_KP_3: - -.. _class_@GlobalScope_constant_KEY_KP_4: - -.. _class_@GlobalScope_constant_KEY_KP_5: - -.. _class_@GlobalScope_constant_KEY_KP_6: - -.. _class_@GlobalScope_constant_KEY_KP_7: - -.. _class_@GlobalScope_constant_KEY_KP_8: - -.. _class_@GlobalScope_constant_KEY_KP_9: - -.. _class_@GlobalScope_constant_KEY_SUPER_L: - -.. _class_@GlobalScope_constant_KEY_SUPER_R: - -.. _class_@GlobalScope_constant_KEY_MENU: - -.. _class_@GlobalScope_constant_KEY_HYPER_L: - -.. _class_@GlobalScope_constant_KEY_HYPER_R: - -.. _class_@GlobalScope_constant_KEY_HELP: - -.. _class_@GlobalScope_constant_KEY_DIRECTION_L: - -.. _class_@GlobalScope_constant_KEY_DIRECTION_R: - -.. _class_@GlobalScope_constant_KEY_BACK: - -.. _class_@GlobalScope_constant_KEY_FORWARD: - -.. _class_@GlobalScope_constant_KEY_STOP: - -.. _class_@GlobalScope_constant_KEY_REFRESH: - -.. _class_@GlobalScope_constant_KEY_VOLUMEDOWN: - -.. _class_@GlobalScope_constant_KEY_VOLUMEMUTE: - -.. _class_@GlobalScope_constant_KEY_VOLUMEUP: - -.. _class_@GlobalScope_constant_KEY_BASSBOOST: - -.. _class_@GlobalScope_constant_KEY_BASSUP: - -.. _class_@GlobalScope_constant_KEY_BASSDOWN: - -.. _class_@GlobalScope_constant_KEY_TREBLEUP: - -.. _class_@GlobalScope_constant_KEY_TREBLEDOWN: - -.. _class_@GlobalScope_constant_KEY_MEDIAPLAY: - -.. _class_@GlobalScope_constant_KEY_MEDIASTOP: - -.. _class_@GlobalScope_constant_KEY_MEDIAPREVIOUS: - -.. _class_@GlobalScope_constant_KEY_MEDIANEXT: - -.. _class_@GlobalScope_constant_KEY_MEDIARECORD: - -.. _class_@GlobalScope_constant_KEY_HOMEPAGE: - -.. _class_@GlobalScope_constant_KEY_FAVORITES: - -.. _class_@GlobalScope_constant_KEY_SEARCH: - -.. _class_@GlobalScope_constant_KEY_STANDBY: - -.. _class_@GlobalScope_constant_KEY_OPENURL: - -.. _class_@GlobalScope_constant_KEY_LAUNCHMAIL: - -.. _class_@GlobalScope_constant_KEY_LAUNCHMEDIA: - -.. _class_@GlobalScope_constant_KEY_LAUNCH0: - -.. _class_@GlobalScope_constant_KEY_LAUNCH1: - -.. _class_@GlobalScope_constant_KEY_LAUNCH2: - -.. _class_@GlobalScope_constant_KEY_LAUNCH3: - -.. _class_@GlobalScope_constant_KEY_LAUNCH4: - -.. _class_@GlobalScope_constant_KEY_LAUNCH5: - -.. _class_@GlobalScope_constant_KEY_LAUNCH6: - -.. _class_@GlobalScope_constant_KEY_LAUNCH7: - -.. _class_@GlobalScope_constant_KEY_LAUNCH8: - -.. _class_@GlobalScope_constant_KEY_LAUNCH9: - -.. _class_@GlobalScope_constant_KEY_LAUNCHA: - -.. _class_@GlobalScope_constant_KEY_LAUNCHB: - -.. _class_@GlobalScope_constant_KEY_LAUNCHC: - -.. _class_@GlobalScope_constant_KEY_LAUNCHD: - -.. _class_@GlobalScope_constant_KEY_LAUNCHE: - -.. _class_@GlobalScope_constant_KEY_LAUNCHF: - -.. _class_@GlobalScope_constant_KEY_UNKNOWN: - -.. _class_@GlobalScope_constant_KEY_SPACE: - -.. _class_@GlobalScope_constant_KEY_EXCLAM: - -.. _class_@GlobalScope_constant_KEY_QUOTEDBL: - -.. _class_@GlobalScope_constant_KEY_NUMBERSIGN: - -.. _class_@GlobalScope_constant_KEY_DOLLAR: - -.. _class_@GlobalScope_constant_KEY_PERCENT: - -.. _class_@GlobalScope_constant_KEY_AMPERSAND: - -.. _class_@GlobalScope_constant_KEY_APOSTROPHE: - -.. _class_@GlobalScope_constant_KEY_PARENLEFT: - -.. _class_@GlobalScope_constant_KEY_PARENRIGHT: - -.. _class_@GlobalScope_constant_KEY_ASTERISK: - -.. _class_@GlobalScope_constant_KEY_PLUS: - -.. _class_@GlobalScope_constant_KEY_COMMA: - -.. _class_@GlobalScope_constant_KEY_MINUS: - -.. _class_@GlobalScope_constant_KEY_PERIOD: - -.. _class_@GlobalScope_constant_KEY_SLASH: - -.. _class_@GlobalScope_constant_KEY_0: - -.. _class_@GlobalScope_constant_KEY_1: - -.. _class_@GlobalScope_constant_KEY_2: - -.. _class_@GlobalScope_constant_KEY_3: - -.. _class_@GlobalScope_constant_KEY_4: - -.. _class_@GlobalScope_constant_KEY_5: - -.. _class_@GlobalScope_constant_KEY_6: - -.. _class_@GlobalScope_constant_KEY_7: - -.. _class_@GlobalScope_constant_KEY_8: - -.. _class_@GlobalScope_constant_KEY_9: - -.. _class_@GlobalScope_constant_KEY_COLON: - -.. _class_@GlobalScope_constant_KEY_SEMICOLON: - -.. _class_@GlobalScope_constant_KEY_LESS: - -.. _class_@GlobalScope_constant_KEY_EQUAL: - -.. _class_@GlobalScope_constant_KEY_GREATER: - -.. _class_@GlobalScope_constant_KEY_QUESTION: - -.. _class_@GlobalScope_constant_KEY_AT: - -.. _class_@GlobalScope_constant_KEY_A: - -.. _class_@GlobalScope_constant_KEY_B: - -.. _class_@GlobalScope_constant_KEY_C: - -.. _class_@GlobalScope_constant_KEY_D: - -.. _class_@GlobalScope_constant_KEY_E: - -.. _class_@GlobalScope_constant_KEY_F: - -.. _class_@GlobalScope_constant_KEY_G: - -.. _class_@GlobalScope_constant_KEY_H: - -.. _class_@GlobalScope_constant_KEY_I: - -.. _class_@GlobalScope_constant_KEY_J: - -.. _class_@GlobalScope_constant_KEY_K: - -.. _class_@GlobalScope_constant_KEY_L: - -.. _class_@GlobalScope_constant_KEY_M: - -.. _class_@GlobalScope_constant_KEY_N: - -.. _class_@GlobalScope_constant_KEY_O: - -.. _class_@GlobalScope_constant_KEY_P: - -.. _class_@GlobalScope_constant_KEY_Q: - -.. _class_@GlobalScope_constant_KEY_R: - -.. _class_@GlobalScope_constant_KEY_S: - -.. _class_@GlobalScope_constant_KEY_T: - -.. _class_@GlobalScope_constant_KEY_U: - -.. _class_@GlobalScope_constant_KEY_V: - -.. _class_@GlobalScope_constant_KEY_W: - -.. _class_@GlobalScope_constant_KEY_X: - -.. _class_@GlobalScope_constant_KEY_Y: - -.. _class_@GlobalScope_constant_KEY_Z: - -.. _class_@GlobalScope_constant_KEY_BRACKETLEFT: - -.. _class_@GlobalScope_constant_KEY_BACKSLASH: - -.. _class_@GlobalScope_constant_KEY_BRACKETRIGHT: - -.. _class_@GlobalScope_constant_KEY_ASCIICIRCUM: - -.. _class_@GlobalScope_constant_KEY_UNDERSCORE: - -.. _class_@GlobalScope_constant_KEY_QUOTELEFT: - -.. _class_@GlobalScope_constant_KEY_BRACELEFT: - -.. _class_@GlobalScope_constant_KEY_BAR: - -.. _class_@GlobalScope_constant_KEY_BRACERIGHT: - -.. _class_@GlobalScope_constant_KEY_ASCIITILDE: - -.. _class_@GlobalScope_constant_KEY_NOBREAKSPACE: - -.. _class_@GlobalScope_constant_KEY_EXCLAMDOWN: - -.. _class_@GlobalScope_constant_KEY_CENT: - -.. _class_@GlobalScope_constant_KEY_STERLING: - -.. _class_@GlobalScope_constant_KEY_CURRENCY: - -.. _class_@GlobalScope_constant_KEY_YEN: - -.. _class_@GlobalScope_constant_KEY_BROKENBAR: - -.. _class_@GlobalScope_constant_KEY_SECTION: - -.. _class_@GlobalScope_constant_KEY_DIAERESIS: - -.. _class_@GlobalScope_constant_KEY_COPYRIGHT: - -.. _class_@GlobalScope_constant_KEY_ORDFEMININE: - -.. _class_@GlobalScope_constant_KEY_GUILLEMOTLEFT: - -.. _class_@GlobalScope_constant_KEY_NOTSIGN: - -.. _class_@GlobalScope_constant_KEY_HYPHEN: - -.. _class_@GlobalScope_constant_KEY_REGISTERED: - -.. _class_@GlobalScope_constant_KEY_MACRON: - -.. _class_@GlobalScope_constant_KEY_DEGREE: - -.. _class_@GlobalScope_constant_KEY_PLUSMINUS: - -.. _class_@GlobalScope_constant_KEY_TWOSUPERIOR: - -.. _class_@GlobalScope_constant_KEY_THREESUPERIOR: - -.. _class_@GlobalScope_constant_KEY_ACUTE: - -.. _class_@GlobalScope_constant_KEY_MU: - -.. _class_@GlobalScope_constant_KEY_PARAGRAPH: - -.. _class_@GlobalScope_constant_KEY_PERIODCENTERED: - -.. _class_@GlobalScope_constant_KEY_CEDILLA: - -.. _class_@GlobalScope_constant_KEY_ONESUPERIOR: - -.. _class_@GlobalScope_constant_KEY_MASCULINE: - -.. _class_@GlobalScope_constant_KEY_GUILLEMOTRIGHT: - -.. _class_@GlobalScope_constant_KEY_ONEQUARTER: - -.. _class_@GlobalScope_constant_KEY_ONEHALF: - -.. _class_@GlobalScope_constant_KEY_THREEQUARTERS: - -.. _class_@GlobalScope_constant_KEY_QUESTIONDOWN: - -.. _class_@GlobalScope_constant_KEY_AGRAVE: - -.. _class_@GlobalScope_constant_KEY_AACUTE: - -.. _class_@GlobalScope_constant_KEY_ACIRCUMFLEX: - -.. _class_@GlobalScope_constant_KEY_ATILDE: - -.. _class_@GlobalScope_constant_KEY_ADIAERESIS: - -.. _class_@GlobalScope_constant_KEY_ARING: - -.. _class_@GlobalScope_constant_KEY_AE: - -.. _class_@GlobalScope_constant_KEY_CCEDILLA: - -.. _class_@GlobalScope_constant_KEY_EGRAVE: - -.. _class_@GlobalScope_constant_KEY_EACUTE: - -.. _class_@GlobalScope_constant_KEY_ECIRCUMFLEX: - -.. _class_@GlobalScope_constant_KEY_EDIAERESIS: - -.. _class_@GlobalScope_constant_KEY_IGRAVE: - -.. _class_@GlobalScope_constant_KEY_IACUTE: - -.. _class_@GlobalScope_constant_KEY_ICIRCUMFLEX: - -.. _class_@GlobalScope_constant_KEY_IDIAERESIS: - -.. _class_@GlobalScope_constant_KEY_ETH: - -.. _class_@GlobalScope_constant_KEY_NTILDE: - -.. _class_@GlobalScope_constant_KEY_OGRAVE: - -.. _class_@GlobalScope_constant_KEY_OACUTE: - -.. _class_@GlobalScope_constant_KEY_OCIRCUMFLEX: - -.. _class_@GlobalScope_constant_KEY_OTILDE: - -.. _class_@GlobalScope_constant_KEY_ODIAERESIS: - -.. _class_@GlobalScope_constant_KEY_MULTIPLY: - -.. _class_@GlobalScope_constant_KEY_OOBLIQUE: - -.. _class_@GlobalScope_constant_KEY_UGRAVE: - -.. _class_@GlobalScope_constant_KEY_UACUTE: - -.. _class_@GlobalScope_constant_KEY_UCIRCUMFLEX: - -.. _class_@GlobalScope_constant_KEY_UDIAERESIS: - -.. _class_@GlobalScope_constant_KEY_YACUTE: - -.. _class_@GlobalScope_constant_KEY_THORN: - -.. _class_@GlobalScope_constant_KEY_SSHARP: - -.. _class_@GlobalScope_constant_KEY_DIVISION: - -.. _class_@GlobalScope_constant_KEY_YDIAERESIS: +.. rst-class:: classref-enumeration enum **Key**: -- **KEY_NONE** = **0** --- Enum value which doesn't correspond to any key. This is used to initialize :ref:`Key` properties with a generic state. +.. _class_@GlobalScope_constant_KEY_NONE: -- **KEY_SPECIAL** = **4194304** --- Keycodes with this bit applied are non-printable. +.. rst-class:: classref-enumeration-constant -- **KEY_ESCAPE** = **4194305** --- Escape key. +:ref:`Key` **KEY_NONE** = ``0`` -- **KEY_TAB** = **4194306** --- Tab key. +Enum value which doesn't correspond to any key. This is used to initialize :ref:`Key` properties with a generic state. -- **KEY_BACKTAB** = **4194307** --- Shift + Tab key. +.. _class_@GlobalScope_constant_KEY_SPECIAL: -- **KEY_BACKSPACE** = **4194308** --- Backspace key. +.. rst-class:: classref-enumeration-constant -- **KEY_ENTER** = **4194309** --- Return key (on the main keyboard). +:ref:`Key` **KEY_SPECIAL** = ``4194304`` -- **KEY_KP_ENTER** = **4194310** --- Enter key on the numeric keypad. +Keycodes with this bit applied are non-printable. -- **KEY_INSERT** = **4194311** --- Insert key. +.. _class_@GlobalScope_constant_KEY_ESCAPE: -- **KEY_DELETE** = **4194312** --- Delete key. +.. rst-class:: classref-enumeration-constant -- **KEY_PAUSE** = **4194313** --- Pause key. +:ref:`Key` **KEY_ESCAPE** = ``4194305`` -- **KEY_PRINT** = **4194314** --- Print Screen key. +Escape key. -- **KEY_SYSREQ** = **4194315** --- System Request key. +.. _class_@GlobalScope_constant_KEY_TAB: -- **KEY_CLEAR** = **4194316** --- Clear key. +.. rst-class:: classref-enumeration-constant -- **KEY_HOME** = **4194317** --- Home key. +:ref:`Key` **KEY_TAB** = ``4194306`` -- **KEY_END** = **4194318** --- End key. +Tab key. -- **KEY_LEFT** = **4194319** --- Left arrow key. +.. _class_@GlobalScope_constant_KEY_BACKTAB: -- **KEY_UP** = **4194320** --- Up arrow key. +.. rst-class:: classref-enumeration-constant -- **KEY_RIGHT** = **4194321** --- Right arrow key. +:ref:`Key` **KEY_BACKTAB** = ``4194307`` -- **KEY_DOWN** = **4194322** --- Down arrow key. +Shift + Tab key. -- **KEY_PAGEUP** = **4194323** --- Page Up key. +.. _class_@GlobalScope_constant_KEY_BACKSPACE: -- **KEY_PAGEDOWN** = **4194324** --- Page Down key. +.. rst-class:: classref-enumeration-constant -- **KEY_SHIFT** = **4194325** --- Shift key. +:ref:`Key` **KEY_BACKSPACE** = ``4194308`` -- **KEY_CTRL** = **4194326** --- Control key. +Backspace key. -- **KEY_META** = **4194327** --- Meta key. +.. _class_@GlobalScope_constant_KEY_ENTER: -- **KEY_ALT** = **4194328** --- Alt key. +.. rst-class:: classref-enumeration-constant -- **KEY_CAPSLOCK** = **4194329** --- Caps Lock key. +:ref:`Key` **KEY_ENTER** = ``4194309`` -- **KEY_NUMLOCK** = **4194330** --- Num Lock key. +Return key (on the main keyboard). -- **KEY_SCROLLLOCK** = **4194331** --- Scroll Lock key. +.. _class_@GlobalScope_constant_KEY_KP_ENTER: -- **KEY_F1** = **4194332** --- F1 key. +.. rst-class:: classref-enumeration-constant -- **KEY_F2** = **4194333** --- F2 key. +:ref:`Key` **KEY_KP_ENTER** = ``4194310`` -- **KEY_F3** = **4194334** --- F3 key. +Enter key on the numeric keypad. -- **KEY_F4** = **4194335** --- F4 key. +.. _class_@GlobalScope_constant_KEY_INSERT: -- **KEY_F5** = **4194336** --- F5 key. +.. rst-class:: classref-enumeration-constant -- **KEY_F6** = **4194337** --- F6 key. +:ref:`Key` **KEY_INSERT** = ``4194311`` -- **KEY_F7** = **4194338** --- F7 key. +Insert key. -- **KEY_F8** = **4194339** --- F8 key. +.. _class_@GlobalScope_constant_KEY_DELETE: -- **KEY_F9** = **4194340** --- F9 key. +.. rst-class:: classref-enumeration-constant -- **KEY_F10** = **4194341** --- F10 key. +:ref:`Key` **KEY_DELETE** = ``4194312`` -- **KEY_F11** = **4194342** --- F11 key. +Delete key. -- **KEY_F12** = **4194343** --- F12 key. +.. _class_@GlobalScope_constant_KEY_PAUSE: -- **KEY_F13** = **4194344** --- F13 key. +.. rst-class:: classref-enumeration-constant -- **KEY_F14** = **4194345** --- F14 key. +:ref:`Key` **KEY_PAUSE** = ``4194313`` -- **KEY_F15** = **4194346** --- F15 key. +Pause key. -- **KEY_F16** = **4194347** --- F16 key. +.. _class_@GlobalScope_constant_KEY_PRINT: -- **KEY_F17** = **4194348** --- F17 key. +.. rst-class:: classref-enumeration-constant -- **KEY_F18** = **4194349** --- F18 key. +:ref:`Key` **KEY_PRINT** = ``4194314`` -- **KEY_F19** = **4194350** --- F19 key. +Print Screen key. -- **KEY_F20** = **4194351** --- F20 key. +.. _class_@GlobalScope_constant_KEY_SYSREQ: -- **KEY_F21** = **4194352** --- F21 key. +.. rst-class:: classref-enumeration-constant -- **KEY_F22** = **4194353** --- F22 key. +:ref:`Key` **KEY_SYSREQ** = ``4194315`` -- **KEY_F23** = **4194354** --- F23 key. +System Request key. -- **KEY_F24** = **4194355** --- F24 key. +.. _class_@GlobalScope_constant_KEY_CLEAR: -- **KEY_F25** = **4194356** --- F25 key. Only supported on macOS and Linux due to a Windows limitation. +.. rst-class:: classref-enumeration-constant -- **KEY_F26** = **4194357** --- F26 key. Only supported on macOS and Linux due to a Windows limitation. +:ref:`Key` **KEY_CLEAR** = ``4194316`` -- **KEY_F27** = **4194358** --- F27 key. Only supported on macOS and Linux due to a Windows limitation. +Clear key. -- **KEY_F28** = **4194359** --- F28 key. Only supported on macOS and Linux due to a Windows limitation. +.. _class_@GlobalScope_constant_KEY_HOME: -- **KEY_F29** = **4194360** --- F29 key. Only supported on macOS and Linux due to a Windows limitation. +.. rst-class:: classref-enumeration-constant -- **KEY_F30** = **4194361** --- F30 key. Only supported on macOS and Linux due to a Windows limitation. +:ref:`Key` **KEY_HOME** = ``4194317`` -- **KEY_F31** = **4194362** --- F31 key. Only supported on macOS and Linux due to a Windows limitation. +Home key. -- **KEY_F32** = **4194363** --- F32 key. Only supported on macOS and Linux due to a Windows limitation. +.. _class_@GlobalScope_constant_KEY_END: -- **KEY_F33** = **4194364** --- F33 key. Only supported on macOS and Linux due to a Windows limitation. +.. rst-class:: classref-enumeration-constant -- **KEY_F34** = **4194365** --- F34 key. Only supported on macOS and Linux due to a Windows limitation. +:ref:`Key` **KEY_END** = ``4194318`` -- **KEY_F35** = **4194366** --- F35 key. Only supported on macOS and Linux due to a Windows limitation. +End key. -- **KEY_KP_MULTIPLY** = **4194433** --- Multiply (\*) key on the numeric keypad. +.. _class_@GlobalScope_constant_KEY_LEFT: -- **KEY_KP_DIVIDE** = **4194434** --- Divide (/) key on the numeric keypad. +.. rst-class:: classref-enumeration-constant -- **KEY_KP_SUBTRACT** = **4194435** --- Subtract (-) key on the numeric keypad. +:ref:`Key` **KEY_LEFT** = ``4194319`` -- **KEY_KP_PERIOD** = **4194436** --- Period (.) key on the numeric keypad. +Left arrow key. -- **KEY_KP_ADD** = **4194437** --- Add (+) key on the numeric keypad. +.. _class_@GlobalScope_constant_KEY_UP: -- **KEY_KP_0** = **4194438** --- Number 0 on the numeric keypad. +.. rst-class:: classref-enumeration-constant -- **KEY_KP_1** = **4194439** --- Number 1 on the numeric keypad. +:ref:`Key` **KEY_UP** = ``4194320`` -- **KEY_KP_2** = **4194440** --- Number 2 on the numeric keypad. +Up arrow key. -- **KEY_KP_3** = **4194441** --- Number 3 on the numeric keypad. +.. _class_@GlobalScope_constant_KEY_RIGHT: -- **KEY_KP_4** = **4194442** --- Number 4 on the numeric keypad. +.. rst-class:: classref-enumeration-constant -- **KEY_KP_5** = **4194443** --- Number 5 on the numeric keypad. +:ref:`Key` **KEY_RIGHT** = ``4194321`` -- **KEY_KP_6** = **4194444** --- Number 6 on the numeric keypad. +Right arrow key. -- **KEY_KP_7** = **4194445** --- Number 7 on the numeric keypad. +.. _class_@GlobalScope_constant_KEY_DOWN: -- **KEY_KP_8** = **4194446** --- Number 8 on the numeric keypad. +.. rst-class:: classref-enumeration-constant -- **KEY_KP_9** = **4194447** --- Number 9 on the numeric keypad. +:ref:`Key` **KEY_DOWN** = ``4194322`` -- **KEY_SUPER_L** = **4194368** --- Left Super key (Windows key). +Down arrow key. -- **KEY_SUPER_R** = **4194369** --- Right Super key (Windows key). +.. _class_@GlobalScope_constant_KEY_PAGEUP: -- **KEY_MENU** = **4194370** --- Context menu key. +.. rst-class:: classref-enumeration-constant -- **KEY_HYPER_L** = **4194371** --- Left Hyper key. +:ref:`Key` **KEY_PAGEUP** = ``4194323`` -- **KEY_HYPER_R** = **4194372** --- Right Hyper key. +Page Up key. -- **KEY_HELP** = **4194373** --- Help key. +.. _class_@GlobalScope_constant_KEY_PAGEDOWN: -- **KEY_DIRECTION_L** = **4194374** --- Left Direction key. +.. rst-class:: classref-enumeration-constant -- **KEY_DIRECTION_R** = **4194375** --- Right Direction key. +:ref:`Key` **KEY_PAGEDOWN** = ``4194324`` -- **KEY_BACK** = **4194376** --- Media back key. Not to be confused with the Back button on an Android device. +Page Down key. -- **KEY_FORWARD** = **4194377** --- Media forward key. +.. _class_@GlobalScope_constant_KEY_SHIFT: -- **KEY_STOP** = **4194378** --- Media stop key. +.. rst-class:: classref-enumeration-constant -- **KEY_REFRESH** = **4194379** --- Media refresh key. +:ref:`Key` **KEY_SHIFT** = ``4194325`` -- **KEY_VOLUMEDOWN** = **4194380** --- Volume down key. +Shift key. -- **KEY_VOLUMEMUTE** = **4194381** --- Mute volume key. +.. _class_@GlobalScope_constant_KEY_CTRL: -- **KEY_VOLUMEUP** = **4194382** --- Volume up key. +.. rst-class:: classref-enumeration-constant -- **KEY_BASSBOOST** = **4194383** --- Bass Boost key. +:ref:`Key` **KEY_CTRL** = ``4194326`` -- **KEY_BASSUP** = **4194384** --- Bass up key. +Control key. -- **KEY_BASSDOWN** = **4194385** --- Bass down key. +.. _class_@GlobalScope_constant_KEY_META: -- **KEY_TREBLEUP** = **4194386** --- Treble up key. +.. rst-class:: classref-enumeration-constant -- **KEY_TREBLEDOWN** = **4194387** --- Treble down key. +:ref:`Key` **KEY_META** = ``4194327`` -- **KEY_MEDIAPLAY** = **4194388** --- Media play key. +Meta key. -- **KEY_MEDIASTOP** = **4194389** --- Media stop key. +.. _class_@GlobalScope_constant_KEY_ALT: -- **KEY_MEDIAPREVIOUS** = **4194390** --- Previous song key. +.. rst-class:: classref-enumeration-constant -- **KEY_MEDIANEXT** = **4194391** --- Next song key. +:ref:`Key` **KEY_ALT** = ``4194328`` -- **KEY_MEDIARECORD** = **4194392** --- Media record key. +Alt key. -- **KEY_HOMEPAGE** = **4194393** --- Home page key. +.. _class_@GlobalScope_constant_KEY_CAPSLOCK: -- **KEY_FAVORITES** = **4194394** --- Favorites key. +.. rst-class:: classref-enumeration-constant -- **KEY_SEARCH** = **4194395** --- Search key. +:ref:`Key` **KEY_CAPSLOCK** = ``4194329`` -- **KEY_STANDBY** = **4194396** --- Standby key. +Caps Lock key. -- **KEY_OPENURL** = **4194397** --- Open URL / Launch Browser key. +.. _class_@GlobalScope_constant_KEY_NUMLOCK: -- **KEY_LAUNCHMAIL** = **4194398** --- Launch Mail key. +.. rst-class:: classref-enumeration-constant -- **KEY_LAUNCHMEDIA** = **4194399** --- Launch Media key. +:ref:`Key` **KEY_NUMLOCK** = ``4194330`` -- **KEY_LAUNCH0** = **4194400** --- Launch Shortcut 0 key. +Num Lock key. -- **KEY_LAUNCH1** = **4194401** --- Launch Shortcut 1 key. +.. _class_@GlobalScope_constant_KEY_SCROLLLOCK: -- **KEY_LAUNCH2** = **4194402** --- Launch Shortcut 2 key. +.. rst-class:: classref-enumeration-constant -- **KEY_LAUNCH3** = **4194403** --- Launch Shortcut 3 key. +:ref:`Key` **KEY_SCROLLLOCK** = ``4194331`` -- **KEY_LAUNCH4** = **4194404** --- Launch Shortcut 4 key. +Scroll Lock key. -- **KEY_LAUNCH5** = **4194405** --- Launch Shortcut 5 key. +.. _class_@GlobalScope_constant_KEY_F1: -- **KEY_LAUNCH6** = **4194406** --- Launch Shortcut 6 key. +.. rst-class:: classref-enumeration-constant -- **KEY_LAUNCH7** = **4194407** --- Launch Shortcut 7 key. +:ref:`Key` **KEY_F1** = ``4194332`` -- **KEY_LAUNCH8** = **4194408** --- Launch Shortcut 8 key. +F1 key. -- **KEY_LAUNCH9** = **4194409** --- Launch Shortcut 9 key. +.. _class_@GlobalScope_constant_KEY_F2: -- **KEY_LAUNCHA** = **4194410** --- Launch Shortcut A key. +.. rst-class:: classref-enumeration-constant -- **KEY_LAUNCHB** = **4194411** --- Launch Shortcut B key. +:ref:`Key` **KEY_F2** = ``4194333`` -- **KEY_LAUNCHC** = **4194412** --- Launch Shortcut C key. +F2 key. -- **KEY_LAUNCHD** = **4194413** --- Launch Shortcut D key. +.. _class_@GlobalScope_constant_KEY_F3: -- **KEY_LAUNCHE** = **4194414** --- Launch Shortcut E key. +.. rst-class:: classref-enumeration-constant -- **KEY_LAUNCHF** = **4194415** --- Launch Shortcut F key. +:ref:`Key` **KEY_F3** = ``4194334`` -- **KEY_UNKNOWN** = **16777215** --- Unknown key. +F3 key. -- **KEY_SPACE** = **32** --- Space key. +.. _class_@GlobalScope_constant_KEY_F4: -- **KEY_EXCLAM** = **33** --- ! key. +.. rst-class:: classref-enumeration-constant -- **KEY_QUOTEDBL** = **34** --- " key. +:ref:`Key` **KEY_F4** = ``4194335`` -- **KEY_NUMBERSIGN** = **35** --- # key. +F4 key. -- **KEY_DOLLAR** = **36** --- $ key. +.. _class_@GlobalScope_constant_KEY_F5: -- **KEY_PERCENT** = **37** --- % key. +.. rst-class:: classref-enumeration-constant -- **KEY_AMPERSAND** = **38** --- & key. +:ref:`Key` **KEY_F5** = ``4194336`` -- **KEY_APOSTROPHE** = **39** --- ' key. +F5 key. -- **KEY_PARENLEFT** = **40** --- ( key. +.. _class_@GlobalScope_constant_KEY_F6: -- **KEY_PARENRIGHT** = **41** --- ) key. +.. rst-class:: classref-enumeration-constant -- **KEY_ASTERISK** = **42** --- \* key. +:ref:`Key` **KEY_F6** = ``4194337`` -- **KEY_PLUS** = **43** --- + key. +F6 key. -- **KEY_COMMA** = **44** --- , key. +.. _class_@GlobalScope_constant_KEY_F7: -- **KEY_MINUS** = **45** --- - key. +.. rst-class:: classref-enumeration-constant -- **KEY_PERIOD** = **46** --- . key. +:ref:`Key` **KEY_F7** = ``4194338`` -- **KEY_SLASH** = **47** --- / key. +F7 key. -- **KEY_0** = **48** --- Number 0 key. +.. _class_@GlobalScope_constant_KEY_F8: -- **KEY_1** = **49** --- Number 1 key. +.. rst-class:: classref-enumeration-constant -- **KEY_2** = **50** --- Number 2 key. +:ref:`Key` **KEY_F8** = ``4194339`` -- **KEY_3** = **51** --- Number 3 key. +F8 key. -- **KEY_4** = **52** --- Number 4 key. +.. _class_@GlobalScope_constant_KEY_F9: -- **KEY_5** = **53** --- Number 5 key. +.. rst-class:: classref-enumeration-constant -- **KEY_6** = **54** --- Number 6 key. +:ref:`Key` **KEY_F9** = ``4194340`` -- **KEY_7** = **55** --- Number 7 key. +F9 key. -- **KEY_8** = **56** --- Number 8 key. +.. _class_@GlobalScope_constant_KEY_F10: -- **KEY_9** = **57** --- Number 9 key. +.. rst-class:: classref-enumeration-constant -- **KEY_COLON** = **58** --- : key. +:ref:`Key` **KEY_F10** = ``4194341`` -- **KEY_SEMICOLON** = **59** --- ; key. +F10 key. -- **KEY_LESS** = **60** --- < key. +.. _class_@GlobalScope_constant_KEY_F11: -- **KEY_EQUAL** = **61** --- = key. +.. rst-class:: classref-enumeration-constant -- **KEY_GREATER** = **62** --- > key. +:ref:`Key` **KEY_F11** = ``4194342`` -- **KEY_QUESTION** = **63** --- ? key. +F11 key. -- **KEY_AT** = **64** --- @ key. +.. _class_@GlobalScope_constant_KEY_F12: -- **KEY_A** = **65** --- A key. +.. rst-class:: classref-enumeration-constant -- **KEY_B** = **66** --- B key. +:ref:`Key` **KEY_F12** = ``4194343`` -- **KEY_C** = **67** --- C key. +F12 key. -- **KEY_D** = **68** --- D key. +.. _class_@GlobalScope_constant_KEY_F13: -- **KEY_E** = **69** --- E key. +.. rst-class:: classref-enumeration-constant -- **KEY_F** = **70** --- F key. +:ref:`Key` **KEY_F13** = ``4194344`` -- **KEY_G** = **71** --- G key. +F13 key. -- **KEY_H** = **72** --- H key. +.. _class_@GlobalScope_constant_KEY_F14: -- **KEY_I** = **73** --- I key. +.. rst-class:: classref-enumeration-constant -- **KEY_J** = **74** --- J key. +:ref:`Key` **KEY_F14** = ``4194345`` -- **KEY_K** = **75** --- K key. +F14 key. -- **KEY_L** = **76** --- L key. +.. _class_@GlobalScope_constant_KEY_F15: -- **KEY_M** = **77** --- M key. +.. rst-class:: classref-enumeration-constant -- **KEY_N** = **78** --- N key. +:ref:`Key` **KEY_F15** = ``4194346`` -- **KEY_O** = **79** --- O key. +F15 key. -- **KEY_P** = **80** --- P key. +.. _class_@GlobalScope_constant_KEY_F16: -- **KEY_Q** = **81** --- Q key. +.. rst-class:: classref-enumeration-constant -- **KEY_R** = **82** --- R key. +:ref:`Key` **KEY_F16** = ``4194347`` -- **KEY_S** = **83** --- S key. +F16 key. -- **KEY_T** = **84** --- T key. +.. _class_@GlobalScope_constant_KEY_F17: -- **KEY_U** = **85** --- U key. +.. rst-class:: classref-enumeration-constant -- **KEY_V** = **86** --- V key. +:ref:`Key` **KEY_F17** = ``4194348`` -- **KEY_W** = **87** --- W key. +F17 key. -- **KEY_X** = **88** --- X key. +.. _class_@GlobalScope_constant_KEY_F18: -- **KEY_Y** = **89** --- Y key. +.. rst-class:: classref-enumeration-constant -- **KEY_Z** = **90** --- Z key. +:ref:`Key` **KEY_F18** = ``4194349`` -- **KEY_BRACKETLEFT** = **91** --- [ key. +F18 key. -- **KEY_BACKSLASH** = **92** --- \\ key. +.. _class_@GlobalScope_constant_KEY_F19: -- **KEY_BRACKETRIGHT** = **93** --- ] key. +.. rst-class:: classref-enumeration-constant -- **KEY_ASCIICIRCUM** = **94** --- ^ key. +:ref:`Key` **KEY_F19** = ``4194350`` -- **KEY_UNDERSCORE** = **95** --- \_ key. +F19 key. -- **KEY_QUOTELEFT** = **96** --- ` key. +.. _class_@GlobalScope_constant_KEY_F20: -- **KEY_BRACELEFT** = **123** --- { key. +.. rst-class:: classref-enumeration-constant -- **KEY_BAR** = **124** --- | key. +:ref:`Key` **KEY_F20** = ``4194351`` -- **KEY_BRACERIGHT** = **125** --- } key. +F20 key. -- **KEY_ASCIITILDE** = **126** --- ~ key. +.. _class_@GlobalScope_constant_KEY_F21: -- **KEY_NOBREAKSPACE** = **160** --- Non-breakable space key. +.. rst-class:: classref-enumeration-constant -- **KEY_EXCLAMDOWN** = **161** --- ¡ key. +:ref:`Key` **KEY_F21** = ``4194352`` -- **KEY_CENT** = **162** --- ¢ key. +F21 key. -- **KEY_STERLING** = **163** --- £ key. +.. _class_@GlobalScope_constant_KEY_F22: -- **KEY_CURRENCY** = **164** --- ¤ key. +.. rst-class:: classref-enumeration-constant -- **KEY_YEN** = **165** --- ¥ key. +:ref:`Key` **KEY_F22** = ``4194353`` -- **KEY_BROKENBAR** = **166** --- ¦ key. +F22 key. -- **KEY_SECTION** = **167** --- § key. +.. _class_@GlobalScope_constant_KEY_F23: -- **KEY_DIAERESIS** = **168** --- ¨ key. +.. rst-class:: classref-enumeration-constant -- **KEY_COPYRIGHT** = **169** --- © key. +:ref:`Key` **KEY_F23** = ``4194354`` -- **KEY_ORDFEMININE** = **170** --- ª key. +F23 key. -- **KEY_GUILLEMOTLEFT** = **171** --- « key. +.. _class_@GlobalScope_constant_KEY_F24: -- **KEY_NOTSIGN** = **172** --- ¬ key. +.. rst-class:: classref-enumeration-constant -- **KEY_HYPHEN** = **173** --- Soft hyphen key. +:ref:`Key` **KEY_F24** = ``4194355`` -- **KEY_REGISTERED** = **174** --- ® key. +F24 key. -- **KEY_MACRON** = **175** --- ¯ key. +.. _class_@GlobalScope_constant_KEY_F25: -- **KEY_DEGREE** = **176** --- ° key. +.. rst-class:: classref-enumeration-constant -- **KEY_PLUSMINUS** = **177** --- ± key. +:ref:`Key` **KEY_F25** = ``4194356`` -- **KEY_TWOSUPERIOR** = **178** --- ² key. +F25 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_THREESUPERIOR** = **179** --- ³ key. +.. _class_@GlobalScope_constant_KEY_F26: -- **KEY_ACUTE** = **180** --- ´ key. +.. rst-class:: classref-enumeration-constant -- **KEY_MU** = **181** --- µ key. +:ref:`Key` **KEY_F26** = ``4194357`` -- **KEY_PARAGRAPH** = **182** --- ¶ key. +F26 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_PERIODCENTERED** = **183** --- · key. +.. _class_@GlobalScope_constant_KEY_F27: -- **KEY_CEDILLA** = **184** --- ¸ key. +.. rst-class:: classref-enumeration-constant -- **KEY_ONESUPERIOR** = **185** --- ¹ key. +:ref:`Key` **KEY_F27** = ``4194358`` -- **KEY_MASCULINE** = **186** --- º key. +F27 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_GUILLEMOTRIGHT** = **187** --- » key. +.. _class_@GlobalScope_constant_KEY_F28: -- **KEY_ONEQUARTER** = **188** --- ¼ key. +.. rst-class:: classref-enumeration-constant -- **KEY_ONEHALF** = **189** --- ½ key. +:ref:`Key` **KEY_F28** = ``4194359`` -- **KEY_THREEQUARTERS** = **190** --- ¾ key. +F28 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_QUESTIONDOWN** = **191** --- ¿ key. +.. _class_@GlobalScope_constant_KEY_F29: -- **KEY_AGRAVE** = **192** --- À key. +.. rst-class:: classref-enumeration-constant -- **KEY_AACUTE** = **193** --- Á key. +:ref:`Key` **KEY_F29** = ``4194360`` -- **KEY_ACIRCUMFLEX** = **194** --- Â key. +F29 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_ATILDE** = **195** --- Ã key. +.. _class_@GlobalScope_constant_KEY_F30: -- **KEY_ADIAERESIS** = **196** --- Ä key. +.. rst-class:: classref-enumeration-constant -- **KEY_ARING** = **197** --- Å key. +:ref:`Key` **KEY_F30** = ``4194361`` -- **KEY_AE** = **198** --- Æ key. +F30 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_CCEDILLA** = **199** --- Ç key. +.. _class_@GlobalScope_constant_KEY_F31: -- **KEY_EGRAVE** = **200** --- È key. +.. rst-class:: classref-enumeration-constant -- **KEY_EACUTE** = **201** --- É key. +:ref:`Key` **KEY_F31** = ``4194362`` -- **KEY_ECIRCUMFLEX** = **202** --- Ê key. +F31 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_EDIAERESIS** = **203** --- Ë key. +.. _class_@GlobalScope_constant_KEY_F32: -- **KEY_IGRAVE** = **204** --- Ì key. +.. rst-class:: classref-enumeration-constant -- **KEY_IACUTE** = **205** --- Í key. +:ref:`Key` **KEY_F32** = ``4194363`` -- **KEY_ICIRCUMFLEX** = **206** --- Î key. +F32 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_IDIAERESIS** = **207** --- Ï key. +.. _class_@GlobalScope_constant_KEY_F33: -- **KEY_ETH** = **208** --- Ð key. +.. rst-class:: classref-enumeration-constant -- **KEY_NTILDE** = **209** --- Ñ key. +:ref:`Key` **KEY_F33** = ``4194364`` -- **KEY_OGRAVE** = **210** --- Ò key. +F33 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_OACUTE** = **211** --- Ó key. +.. _class_@GlobalScope_constant_KEY_F34: -- **KEY_OCIRCUMFLEX** = **212** --- Ô key. +.. rst-class:: classref-enumeration-constant -- **KEY_OTILDE** = **213** --- Õ key. +:ref:`Key` **KEY_F34** = ``4194365`` -- **KEY_ODIAERESIS** = **214** --- Ö key. +F34 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_MULTIPLY** = **215** --- × key. +.. _class_@GlobalScope_constant_KEY_F35: -- **KEY_OOBLIQUE** = **216** --- Ø key. +.. rst-class:: classref-enumeration-constant -- **KEY_UGRAVE** = **217** --- Ù key. +:ref:`Key` **KEY_F35** = ``4194366`` -- **KEY_UACUTE** = **218** --- Ú key. +F35 key. Only supported on macOS and Linux due to a Windows limitation. -- **KEY_UCIRCUMFLEX** = **219** --- Û key. +.. _class_@GlobalScope_constant_KEY_KP_MULTIPLY: -- **KEY_UDIAERESIS** = **220** --- Ü key. +.. rst-class:: classref-enumeration-constant -- **KEY_YACUTE** = **221** --- Ý key. +:ref:`Key` **KEY_KP_MULTIPLY** = ``4194433`` -- **KEY_THORN** = **222** --- Þ key. +Multiply (\*) key on the numeric keypad. -- **KEY_SSHARP** = **223** --- ß key. +.. _class_@GlobalScope_constant_KEY_KP_DIVIDE: -- **KEY_DIVISION** = **247** --- ÷ key. +.. rst-class:: classref-enumeration-constant -- **KEY_YDIAERESIS** = **255** --- ÿ key. +:ref:`Key` **KEY_KP_DIVIDE** = ``4194434`` + +Divide (/) key on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_SUBTRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_SUBTRACT** = ``4194435`` + +Subtract (-) key on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_PERIOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_PERIOD** = ``4194436`` + +Period (.) key on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_ADD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_ADD** = ``4194437`` + +Add (+) key on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_0: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_0** = ``4194438`` + +Number 0 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_1: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_1** = ``4194439`` + +Number 1 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_2** = ``4194440`` + +Number 2 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_3: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_3** = ``4194441`` + +Number 3 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_4: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_4** = ``4194442`` + +Number 4 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_5: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_5** = ``4194443`` + +Number 5 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_6: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_6** = ``4194444`` + +Number 6 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_7: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_7** = ``4194445`` + +Number 7 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_8** = ``4194446`` + +Number 8 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_KP_9: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KP_9** = ``4194447`` + +Number 9 on the numeric keypad. + +.. _class_@GlobalScope_constant_KEY_SUPER_L: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SUPER_L** = ``4194368`` + +Left Super key (Windows key). + +.. _class_@GlobalScope_constant_KEY_SUPER_R: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SUPER_R** = ``4194369`` + +Right Super key (Windows key). + +.. _class_@GlobalScope_constant_KEY_MENU: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MENU** = ``4194370`` + +Context menu key. + +.. _class_@GlobalScope_constant_KEY_HYPER_L: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_HYPER_L** = ``4194371`` + +Left Hyper key. + +.. _class_@GlobalScope_constant_KEY_HYPER_R: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_HYPER_R** = ``4194372`` + +Right Hyper key. + +.. _class_@GlobalScope_constant_KEY_HELP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_HELP** = ``4194373`` + +Help key. + +.. _class_@GlobalScope_constant_KEY_DIRECTION_L: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_DIRECTION_L** = ``4194374`` + +Left Direction key. + +.. _class_@GlobalScope_constant_KEY_DIRECTION_R: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_DIRECTION_R** = ``4194375`` + +Right Direction key. + +.. _class_@GlobalScope_constant_KEY_BACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BACK** = ``4194376`` + +Media back key. Not to be confused with the Back button on an Android device. + +.. _class_@GlobalScope_constant_KEY_FORWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_FORWARD** = ``4194377`` + +Media forward key. + +.. _class_@GlobalScope_constant_KEY_STOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_STOP** = ``4194378`` + +Media stop key. + +.. _class_@GlobalScope_constant_KEY_REFRESH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_REFRESH** = ``4194379`` + +Media refresh key. + +.. _class_@GlobalScope_constant_KEY_VOLUMEDOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_VOLUMEDOWN** = ``4194380`` + +Volume down key. + +.. _class_@GlobalScope_constant_KEY_VOLUMEMUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_VOLUMEMUTE** = ``4194381`` + +Mute volume key. + +.. _class_@GlobalScope_constant_KEY_VOLUMEUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_VOLUMEUP** = ``4194382`` + +Volume up key. + +.. _class_@GlobalScope_constant_KEY_BASSBOOST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BASSBOOST** = ``4194383`` + +Bass Boost key. + +.. _class_@GlobalScope_constant_KEY_BASSUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BASSUP** = ``4194384`` + +Bass up key. + +.. _class_@GlobalScope_constant_KEY_BASSDOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BASSDOWN** = ``4194385`` + +Bass down key. + +.. _class_@GlobalScope_constant_KEY_TREBLEUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_TREBLEUP** = ``4194386`` + +Treble up key. + +.. _class_@GlobalScope_constant_KEY_TREBLEDOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_TREBLEDOWN** = ``4194387`` + +Treble down key. + +.. _class_@GlobalScope_constant_KEY_MEDIAPLAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MEDIAPLAY** = ``4194388`` + +Media play key. + +.. _class_@GlobalScope_constant_KEY_MEDIASTOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MEDIASTOP** = ``4194389`` + +Media stop key. + +.. _class_@GlobalScope_constant_KEY_MEDIAPREVIOUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MEDIAPREVIOUS** = ``4194390`` + +Previous song key. + +.. _class_@GlobalScope_constant_KEY_MEDIANEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MEDIANEXT** = ``4194391`` + +Next song key. + +.. _class_@GlobalScope_constant_KEY_MEDIARECORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MEDIARECORD** = ``4194392`` + +Media record key. + +.. _class_@GlobalScope_constant_KEY_HOMEPAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_HOMEPAGE** = ``4194393`` + +Home page key. + +.. _class_@GlobalScope_constant_KEY_FAVORITES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_FAVORITES** = ``4194394`` + +Favorites key. + +.. _class_@GlobalScope_constant_KEY_SEARCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SEARCH** = ``4194395`` + +Search key. + +.. _class_@GlobalScope_constant_KEY_STANDBY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_STANDBY** = ``4194396`` + +Standby key. + +.. _class_@GlobalScope_constant_KEY_OPENURL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_OPENURL** = ``4194397`` + +Open URL / Launch Browser key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHMAIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHMAIL** = ``4194398`` + +Launch Mail key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHMEDIA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHMEDIA** = ``4194399`` + +Launch Media key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH0: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH0** = ``4194400`` + +Launch Shortcut 0 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH1: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH1** = ``4194401`` + +Launch Shortcut 1 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH2** = ``4194402`` + +Launch Shortcut 2 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH3: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH3** = ``4194403`` + +Launch Shortcut 3 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH4: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH4** = ``4194404`` + +Launch Shortcut 4 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH5: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH5** = ``4194405`` + +Launch Shortcut 5 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH6: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH6** = ``4194406`` + +Launch Shortcut 6 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH7: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH7** = ``4194407`` + +Launch Shortcut 7 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH8** = ``4194408`` + +Launch Shortcut 8 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCH9: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCH9** = ``4194409`` + +Launch Shortcut 9 key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHA** = ``4194410`` + +Launch Shortcut A key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHB: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHB** = ``4194411`` + +Launch Shortcut B key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHC: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHC** = ``4194412`` + +Launch Shortcut C key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHD** = ``4194413`` + +Launch Shortcut D key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHE** = ``4194414`` + +Launch Shortcut E key. + +.. _class_@GlobalScope_constant_KEY_LAUNCHF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LAUNCHF** = ``4194415`` + +Launch Shortcut F key. + +.. _class_@GlobalScope_constant_KEY_UNKNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_UNKNOWN** = ``16777215`` + +Unknown key. + +.. _class_@GlobalScope_constant_KEY_SPACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SPACE** = ``32`` + +Space key. + +.. _class_@GlobalScope_constant_KEY_EXCLAM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_EXCLAM** = ``33`` + +! key. + +.. _class_@GlobalScope_constant_KEY_QUOTEDBL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_QUOTEDBL** = ``34`` + +" key. + +.. _class_@GlobalScope_constant_KEY_NUMBERSIGN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_NUMBERSIGN** = ``35`` + +# key. + +.. _class_@GlobalScope_constant_KEY_DOLLAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_DOLLAR** = ``36`` + +$ key. + +.. _class_@GlobalScope_constant_KEY_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PERCENT** = ``37`` + +% key. + +.. _class_@GlobalScope_constant_KEY_AMPERSAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_AMPERSAND** = ``38`` + +& key. + +.. _class_@GlobalScope_constant_KEY_APOSTROPHE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_APOSTROPHE** = ``39`` + +' key. + +.. _class_@GlobalScope_constant_KEY_PARENLEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PARENLEFT** = ``40`` + +( key. + +.. _class_@GlobalScope_constant_KEY_PARENRIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PARENRIGHT** = ``41`` + +) key. + +.. _class_@GlobalScope_constant_KEY_ASTERISK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ASTERISK** = ``42`` + +\* key. + +.. _class_@GlobalScope_constant_KEY_PLUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PLUS** = ``43`` + ++ key. + +.. _class_@GlobalScope_constant_KEY_COMMA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_COMMA** = ``44`` + +, key. + +.. _class_@GlobalScope_constant_KEY_MINUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MINUS** = ``45`` + +- key. + +.. _class_@GlobalScope_constant_KEY_PERIOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PERIOD** = ``46`` + +. key. + +.. _class_@GlobalScope_constant_KEY_SLASH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SLASH** = ``47`` + +/ key. + +.. _class_@GlobalScope_constant_KEY_0: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_0** = ``48`` + +Number 0 key. + +.. _class_@GlobalScope_constant_KEY_1: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_1** = ``49`` + +Number 1 key. + +.. _class_@GlobalScope_constant_KEY_2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_2** = ``50`` + +Number 2 key. + +.. _class_@GlobalScope_constant_KEY_3: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_3** = ``51`` + +Number 3 key. + +.. _class_@GlobalScope_constant_KEY_4: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_4** = ``52`` + +Number 4 key. + +.. _class_@GlobalScope_constant_KEY_5: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_5** = ``53`` + +Number 5 key. + +.. _class_@GlobalScope_constant_KEY_6: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_6** = ``54`` + +Number 6 key. + +.. _class_@GlobalScope_constant_KEY_7: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_7** = ``55`` + +Number 7 key. + +.. _class_@GlobalScope_constant_KEY_8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_8** = ``56`` + +Number 8 key. + +.. _class_@GlobalScope_constant_KEY_9: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_9** = ``57`` + +Number 9 key. + +.. _class_@GlobalScope_constant_KEY_COLON: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_COLON** = ``58`` + +: key. + +.. _class_@GlobalScope_constant_KEY_SEMICOLON: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SEMICOLON** = ``59`` + +; key. + +.. _class_@GlobalScope_constant_KEY_LESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_LESS** = ``60`` + +< key. + +.. _class_@GlobalScope_constant_KEY_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_EQUAL** = ``61`` + += key. + +.. _class_@GlobalScope_constant_KEY_GREATER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_GREATER** = ``62`` + +> key. + +.. _class_@GlobalScope_constant_KEY_QUESTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_QUESTION** = ``63`` + +? key. + +.. _class_@GlobalScope_constant_KEY_AT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_AT** = ``64`` + +@ key. + +.. _class_@GlobalScope_constant_KEY_A: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_A** = ``65`` + +A key. + +.. _class_@GlobalScope_constant_KEY_B: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_B** = ``66`` + +B key. + +.. _class_@GlobalScope_constant_KEY_C: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_C** = ``67`` + +C key. + +.. _class_@GlobalScope_constant_KEY_D: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_D** = ``68`` + +D key. + +.. _class_@GlobalScope_constant_KEY_E: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_E** = ``69`` + +E key. + +.. _class_@GlobalScope_constant_KEY_F: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_F** = ``70`` + +F key. + +.. _class_@GlobalScope_constant_KEY_G: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_G** = ``71`` + +G key. + +.. _class_@GlobalScope_constant_KEY_H: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_H** = ``72`` + +H key. + +.. _class_@GlobalScope_constant_KEY_I: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_I** = ``73`` + +I key. + +.. _class_@GlobalScope_constant_KEY_J: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_J** = ``74`` + +J key. + +.. _class_@GlobalScope_constant_KEY_K: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_K** = ``75`` + +K key. + +.. _class_@GlobalScope_constant_KEY_L: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_L** = ``76`` + +L key. + +.. _class_@GlobalScope_constant_KEY_M: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_M** = ``77`` + +M key. + +.. _class_@GlobalScope_constant_KEY_N: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_N** = ``78`` + +N key. + +.. _class_@GlobalScope_constant_KEY_O: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_O** = ``79`` + +O key. + +.. _class_@GlobalScope_constant_KEY_P: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_P** = ``80`` + +P key. + +.. _class_@GlobalScope_constant_KEY_Q: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_Q** = ``81`` + +Q key. + +.. _class_@GlobalScope_constant_KEY_R: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_R** = ``82`` + +R key. + +.. _class_@GlobalScope_constant_KEY_S: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_S** = ``83`` + +S key. + +.. _class_@GlobalScope_constant_KEY_T: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_T** = ``84`` + +T key. + +.. _class_@GlobalScope_constant_KEY_U: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_U** = ``85`` + +U key. + +.. _class_@GlobalScope_constant_KEY_V: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_V** = ``86`` + +V key. + +.. _class_@GlobalScope_constant_KEY_W: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_W** = ``87`` + +W key. + +.. _class_@GlobalScope_constant_KEY_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_X** = ``88`` + +X key. + +.. _class_@GlobalScope_constant_KEY_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_Y** = ``89`` + +Y key. + +.. _class_@GlobalScope_constant_KEY_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_Z** = ``90`` + +Z key. + +.. _class_@GlobalScope_constant_KEY_BRACKETLEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BRACKETLEFT** = ``91`` + +[ key. + +.. _class_@GlobalScope_constant_KEY_BACKSLASH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BACKSLASH** = ``92`` + +\\ key. + +.. _class_@GlobalScope_constant_KEY_BRACKETRIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BRACKETRIGHT** = ``93`` + +] key. + +.. _class_@GlobalScope_constant_KEY_ASCIICIRCUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ASCIICIRCUM** = ``94`` + +^ key. + +.. _class_@GlobalScope_constant_KEY_UNDERSCORE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_UNDERSCORE** = ``95`` + +\_ key. + +.. _class_@GlobalScope_constant_KEY_QUOTELEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_QUOTELEFT** = ``96`` + +` key. + +.. _class_@GlobalScope_constant_KEY_BRACELEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BRACELEFT** = ``123`` + +{ key. + +.. _class_@GlobalScope_constant_KEY_BAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BAR** = ``124`` + +| key. + +.. _class_@GlobalScope_constant_KEY_BRACERIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BRACERIGHT** = ``125`` + +} key. + +.. _class_@GlobalScope_constant_KEY_ASCIITILDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ASCIITILDE** = ``126`` + +~ key. + +.. _class_@GlobalScope_constant_KEY_NOBREAKSPACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_NOBREAKSPACE** = ``160`` + +Non-breakable space key. + +.. _class_@GlobalScope_constant_KEY_EXCLAMDOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_EXCLAMDOWN** = ``161`` + +¡ key. + +.. _class_@GlobalScope_constant_KEY_CENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_CENT** = ``162`` + +¢ key. + +.. _class_@GlobalScope_constant_KEY_STERLING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_STERLING** = ``163`` + +£ key. + +.. _class_@GlobalScope_constant_KEY_CURRENCY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_CURRENCY** = ``164`` + +¤ key. + +.. _class_@GlobalScope_constant_KEY_YEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_YEN** = ``165`` + +¥ key. + +.. _class_@GlobalScope_constant_KEY_BROKENBAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_BROKENBAR** = ``166`` + +¦ key. + +.. _class_@GlobalScope_constant_KEY_SECTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SECTION** = ``167`` + +§ key. + +.. _class_@GlobalScope_constant_KEY_DIAERESIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_DIAERESIS** = ``168`` + +¨ key. + +.. _class_@GlobalScope_constant_KEY_COPYRIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_COPYRIGHT** = ``169`` + +© key. + +.. _class_@GlobalScope_constant_KEY_ORDFEMININE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ORDFEMININE** = ``170`` + +ª key. + +.. _class_@GlobalScope_constant_KEY_GUILLEMOTLEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_GUILLEMOTLEFT** = ``171`` + +« key. + +.. _class_@GlobalScope_constant_KEY_NOTSIGN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_NOTSIGN** = ``172`` + +¬ key. + +.. _class_@GlobalScope_constant_KEY_HYPHEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_HYPHEN** = ``173`` + +Soft hyphen key. + +.. _class_@GlobalScope_constant_KEY_REGISTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_REGISTERED** = ``174`` + +® key. + +.. _class_@GlobalScope_constant_KEY_MACRON: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MACRON** = ``175`` + +¯ key. + +.. _class_@GlobalScope_constant_KEY_DEGREE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_DEGREE** = ``176`` + +° key. + +.. _class_@GlobalScope_constant_KEY_PLUSMINUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PLUSMINUS** = ``177`` + +± key. + +.. _class_@GlobalScope_constant_KEY_TWOSUPERIOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_TWOSUPERIOR** = ``178`` + +² key. + +.. _class_@GlobalScope_constant_KEY_THREESUPERIOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_THREESUPERIOR** = ``179`` + +³ key. + +.. _class_@GlobalScope_constant_KEY_ACUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ACUTE** = ``180`` + +´ key. + +.. _class_@GlobalScope_constant_KEY_MU: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MU** = ``181`` + +µ key. + +.. _class_@GlobalScope_constant_KEY_PARAGRAPH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PARAGRAPH** = ``182`` + +¶ key. + +.. _class_@GlobalScope_constant_KEY_PERIODCENTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_PERIODCENTERED** = ``183`` + +· key. + +.. _class_@GlobalScope_constant_KEY_CEDILLA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_CEDILLA** = ``184`` + +¸ key. + +.. _class_@GlobalScope_constant_KEY_ONESUPERIOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ONESUPERIOR** = ``185`` + +¹ key. + +.. _class_@GlobalScope_constant_KEY_MASCULINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MASCULINE** = ``186`` + +º key. + +.. _class_@GlobalScope_constant_KEY_GUILLEMOTRIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_GUILLEMOTRIGHT** = ``187`` + +» key. + +.. _class_@GlobalScope_constant_KEY_ONEQUARTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ONEQUARTER** = ``188`` + +¼ key. + +.. _class_@GlobalScope_constant_KEY_ONEHALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ONEHALF** = ``189`` + +½ key. + +.. _class_@GlobalScope_constant_KEY_THREEQUARTERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_THREEQUARTERS** = ``190`` + +¾ key. + +.. _class_@GlobalScope_constant_KEY_QUESTIONDOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_QUESTIONDOWN** = ``191`` + +¿ key. + +.. _class_@GlobalScope_constant_KEY_AGRAVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_AGRAVE** = ``192`` + +À key. + +.. _class_@GlobalScope_constant_KEY_AACUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_AACUTE** = ``193`` + +Á key. + +.. _class_@GlobalScope_constant_KEY_ACIRCUMFLEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ACIRCUMFLEX** = ``194`` + +Â key. + +.. _class_@GlobalScope_constant_KEY_ATILDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ATILDE** = ``195`` + +Ã key. + +.. _class_@GlobalScope_constant_KEY_ADIAERESIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ADIAERESIS** = ``196`` + +Ä key. + +.. _class_@GlobalScope_constant_KEY_ARING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ARING** = ``197`` + +Å key. + +.. _class_@GlobalScope_constant_KEY_AE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_AE** = ``198`` + +Æ key. + +.. _class_@GlobalScope_constant_KEY_CCEDILLA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_CCEDILLA** = ``199`` + +Ç key. + +.. _class_@GlobalScope_constant_KEY_EGRAVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_EGRAVE** = ``200`` + +È key. + +.. _class_@GlobalScope_constant_KEY_EACUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_EACUTE** = ``201`` + +É key. + +.. _class_@GlobalScope_constant_KEY_ECIRCUMFLEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ECIRCUMFLEX** = ``202`` + +Ê key. + +.. _class_@GlobalScope_constant_KEY_EDIAERESIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_EDIAERESIS** = ``203`` + +Ë key. + +.. _class_@GlobalScope_constant_KEY_IGRAVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_IGRAVE** = ``204`` + +Ì key. + +.. _class_@GlobalScope_constant_KEY_IACUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_IACUTE** = ``205`` + +Í key. + +.. _class_@GlobalScope_constant_KEY_ICIRCUMFLEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ICIRCUMFLEX** = ``206`` + +Î key. + +.. _class_@GlobalScope_constant_KEY_IDIAERESIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_IDIAERESIS** = ``207`` + +Ï key. + +.. _class_@GlobalScope_constant_KEY_ETH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ETH** = ``208`` + +Ð key. + +.. _class_@GlobalScope_constant_KEY_NTILDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_NTILDE** = ``209`` + +Ñ key. + +.. _class_@GlobalScope_constant_KEY_OGRAVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_OGRAVE** = ``210`` + +Ò key. + +.. _class_@GlobalScope_constant_KEY_OACUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_OACUTE** = ``211`` + +Ó key. + +.. _class_@GlobalScope_constant_KEY_OCIRCUMFLEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_OCIRCUMFLEX** = ``212`` + +Ô key. + +.. _class_@GlobalScope_constant_KEY_OTILDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_OTILDE** = ``213`` + +Õ key. + +.. _class_@GlobalScope_constant_KEY_ODIAERESIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_ODIAERESIS** = ``214`` + +Ö key. + +.. _class_@GlobalScope_constant_KEY_MULTIPLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_MULTIPLY** = ``215`` + +× key. + +.. _class_@GlobalScope_constant_KEY_OOBLIQUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_OOBLIQUE** = ``216`` + +Ø key. + +.. _class_@GlobalScope_constant_KEY_UGRAVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_UGRAVE** = ``217`` + +Ù key. + +.. _class_@GlobalScope_constant_KEY_UACUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_UACUTE** = ``218`` + +Ú key. + +.. _class_@GlobalScope_constant_KEY_UCIRCUMFLEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_UCIRCUMFLEX** = ``219`` + +Û key. + +.. _class_@GlobalScope_constant_KEY_UDIAERESIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_UDIAERESIS** = ``220`` + +Ü key. + +.. _class_@GlobalScope_constant_KEY_YACUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_YACUTE** = ``221`` + +Ý key. + +.. _class_@GlobalScope_constant_KEY_THORN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_THORN** = ``222`` + +Þ key. + +.. _class_@GlobalScope_constant_KEY_SSHARP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_SSHARP** = ``223`` + +ß key. + +.. _class_@GlobalScope_constant_KEY_DIVISION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_DIVISION** = ``247`` + +÷ key. + +.. _class_@GlobalScope_constant_KEY_YDIAERESIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_YDIAERESIS** = ``255`` + +ÿ key. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_KeyModifierMask: -.. _class_@GlobalScope_constant_KEY_CODE_MASK: - -.. _class_@GlobalScope_constant_KEY_MODIFIER_MASK: - -.. _class_@GlobalScope_constant_KEY_MASK_CMD_OR_CTRL: - -.. _class_@GlobalScope_constant_KEY_MASK_SHIFT: - -.. _class_@GlobalScope_constant_KEY_MASK_ALT: - -.. _class_@GlobalScope_constant_KEY_MASK_META: - -.. _class_@GlobalScope_constant_KEY_MASK_CTRL: - -.. _class_@GlobalScope_constant_KEY_MASK_KPAD: - -.. _class_@GlobalScope_constant_KEY_MASK_GROUP_SWITCH: +.. rst-class:: classref-enumeration enum **KeyModifierMask**: -- **KEY_CODE_MASK** = **8388607** --- Key Code mask. +.. _class_@GlobalScope_constant_KEY_CODE_MASK: -- **KEY_MODIFIER_MASK** = **532676608** --- Modifier key mask. +.. rst-class:: classref-enumeration-constant -- **KEY_MASK_CMD_OR_CTRL** = **16777216** --- Automatically remapped to :ref:`KEY_META` on macOS and :ref:`KEY_CTRL` on other platforms, this mask is never set in the actual events, and should be used for key mapping only. +:ref:`KeyModifierMask` **KEY_CODE_MASK** = ``8388607`` -- **KEY_MASK_SHIFT** = **33554432** --- Shift key mask. +Key Code mask. -- **KEY_MASK_ALT** = **67108864** --- Alt or Option (on macOS) key mask. +.. _class_@GlobalScope_constant_KEY_MODIFIER_MASK: -- **KEY_MASK_META** = **134217728** --- Command (on macOS) or Meta/Windows key mask. +.. rst-class:: classref-enumeration-constant -- **KEY_MASK_CTRL** = **268435456** --- Ctrl key mask. +:ref:`KeyModifierMask` **KEY_MODIFIER_MASK** = ``532676608`` -- **KEY_MASK_KPAD** = **536870912** --- Keypad key mask. +Modifier key mask. -- **KEY_MASK_GROUP_SWITCH** = **1073741824** --- Group Switch key mask. +.. _class_@GlobalScope_constant_KEY_MASK_CMD_OR_CTRL: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyModifierMask` **KEY_MASK_CMD_OR_CTRL** = ``16777216`` + +Automatically remapped to :ref:`KEY_META` on macOS and :ref:`KEY_CTRL` on other platforms, this mask is never set in the actual events, and should be used for key mapping only. + +.. _class_@GlobalScope_constant_KEY_MASK_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyModifierMask` **KEY_MASK_SHIFT** = ``33554432`` + +Shift key mask. + +.. _class_@GlobalScope_constant_KEY_MASK_ALT: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyModifierMask` **KEY_MASK_ALT** = ``67108864`` + +Alt or Option (on macOS) key mask. + +.. _class_@GlobalScope_constant_KEY_MASK_META: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyModifierMask` **KEY_MASK_META** = ``134217728`` + +Command (on macOS) or Meta/Windows key mask. + +.. _class_@GlobalScope_constant_KEY_MASK_CTRL: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyModifierMask` **KEY_MASK_CTRL** = ``268435456`` + +Ctrl key mask. + +.. _class_@GlobalScope_constant_KEY_MASK_KPAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyModifierMask` **KEY_MASK_KPAD** = ``536870912`` + +Keypad key mask. + +.. _class_@GlobalScope_constant_KEY_MASK_GROUP_SWITCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyModifierMask` **KEY_MASK_GROUP_SWITCH** = ``1073741824`` + +Group Switch key mask. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_MouseButton: -.. _class_@GlobalScope_constant_MOUSE_BUTTON_NONE: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_LEFT: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_MIDDLE: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_UP: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_DOWN: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_LEFT: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_RIGHT: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON1: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON2: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_LEFT: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_RIGHT: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MIDDLE: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_XBUTTON1: - -.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_XBUTTON2: +.. rst-class:: classref-enumeration enum **MouseButton**: -- **MOUSE_BUTTON_NONE** = **0** --- Enum value which doesn't correspond to any mouse button. This is used to initialize :ref:`MouseButton` properties with a generic state. +.. _class_@GlobalScope_constant_MOUSE_BUTTON_NONE: -- **MOUSE_BUTTON_LEFT** = **1** --- Primary mouse button, usually assigned to the left button. +.. rst-class:: classref-enumeration-constant -- **MOUSE_BUTTON_RIGHT** = **2** --- Secondary mouse button, usually assigned to the right button. +:ref:`MouseButton` **MOUSE_BUTTON_NONE** = ``0`` -- **MOUSE_BUTTON_MIDDLE** = **3** --- Middle mouse button. +Enum value which doesn't correspond to any mouse button. This is used to initialize :ref:`MouseButton` properties with a generic state. -- **MOUSE_BUTTON_WHEEL_UP** = **4** --- Mouse wheel up. +.. _class_@GlobalScope_constant_MOUSE_BUTTON_LEFT: -- **MOUSE_BUTTON_WHEEL_DOWN** = **5** --- Mouse wheel down. +.. rst-class:: classref-enumeration-constant -- **MOUSE_BUTTON_WHEEL_LEFT** = **6** --- Mouse wheel left button (only present on some mice). +:ref:`MouseButton` **MOUSE_BUTTON_LEFT** = ``1`` -- **MOUSE_BUTTON_WHEEL_RIGHT** = **7** --- Mouse wheel right button (only present on some mice). +Primary mouse button, usually assigned to the left button. -- **MOUSE_BUTTON_XBUTTON1** = **8** --- Extra mouse button 1. This is sometimes present, usually to the sides of the mouse. +.. _class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT: -- **MOUSE_BUTTON_XBUTTON2** = **9** --- Extra mouse button 2. This is sometimes present, usually to the sides of the mouse. +.. rst-class:: classref-enumeration-constant -- **MOUSE_BUTTON_MASK_LEFT** = **1** --- Primary mouse button mask, usually for the left button. +:ref:`MouseButton` **MOUSE_BUTTON_RIGHT** = ``2`` -- **MOUSE_BUTTON_MASK_RIGHT** = **2** --- Secondary mouse button mask, usually for the right button. +Secondary mouse button, usually assigned to the right button. -- **MOUSE_BUTTON_MASK_MIDDLE** = **4** --- Middle mouse button mask. +.. _class_@GlobalScope_constant_MOUSE_BUTTON_MIDDLE: -- **MOUSE_BUTTON_MASK_XBUTTON1** = **128** --- Extra mouse button 1 mask. +.. rst-class:: classref-enumeration-constant -- **MOUSE_BUTTON_MASK_XBUTTON2** = **256** --- Extra mouse button 2 mask. +:ref:`MouseButton` **MOUSE_BUTTON_MIDDLE** = ``3`` + +Middle mouse button. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_UP: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_WHEEL_UP** = ``4`` + +Mouse wheel up. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_WHEEL_DOWN** = ``5`` + +Mouse wheel down. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_WHEEL_LEFT** = ``6`` + +Mouse wheel left button (only present on some mice). + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_WHEEL_RIGHT** = ``7`` + +Mouse wheel right button (only present on some mice). + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON1: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_XBUTTON1** = ``8`` + +Extra mouse button 1. This is sometimes present, usually to the sides of the mouse. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_XBUTTON2: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_XBUTTON2** = ``9`` + +Extra mouse button 2. This is sometimes present, usually to the sides of the mouse. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_MASK_LEFT** = ``1`` + +Primary mouse button mask, usually for the left button. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_MASK_RIGHT** = ``2`` + +Secondary mouse button mask, usually for the right button. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_MIDDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_MASK_MIDDLE** = ``4`` + +Middle mouse button mask. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_XBUTTON1: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_MASK_XBUTTON1** = ``128`` + +Extra mouse button 1 mask. + +.. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_XBUTTON2: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseButton` **MOUSE_BUTTON_MASK_XBUTTON2** = ``256`` + +Extra mouse button 2 mask. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_JoyButton: -.. _class_@GlobalScope_constant_JOY_BUTTON_INVALID: - -.. _class_@GlobalScope_constant_JOY_BUTTON_A: - -.. _class_@GlobalScope_constant_JOY_BUTTON_B: - -.. _class_@GlobalScope_constant_JOY_BUTTON_X: - -.. _class_@GlobalScope_constant_JOY_BUTTON_Y: - -.. _class_@GlobalScope_constant_JOY_BUTTON_BACK: - -.. _class_@GlobalScope_constant_JOY_BUTTON_GUIDE: - -.. _class_@GlobalScope_constant_JOY_BUTTON_START: - -.. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_STICK: - -.. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_STICK: - -.. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_SHOULDER: - -.. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_SHOULDER: - -.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_UP: - -.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_DOWN: - -.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_LEFT: - -.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_RIGHT: - -.. _class_@GlobalScope_constant_JOY_BUTTON_MISC1: - -.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE1: - -.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE2: - -.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE3: - -.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE4: - -.. _class_@GlobalScope_constant_JOY_BUTTON_TOUCHPAD: - -.. _class_@GlobalScope_constant_JOY_BUTTON_SDL_MAX: - -.. _class_@GlobalScope_constant_JOY_BUTTON_MAX: +.. rst-class:: classref-enumeration enum **JoyButton**: -- **JOY_BUTTON_INVALID** = **-1** --- An invalid game controller button. +.. _class_@GlobalScope_constant_JOY_BUTTON_INVALID: -- **JOY_BUTTON_A** = **0** --- Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B. +.. rst-class:: classref-enumeration-constant -- **JOY_BUTTON_B** = **1** --- Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A. +:ref:`JoyButton` **JOY_BUTTON_INVALID** = ``-1`` -- **JOY_BUTTON_X** = **2** --- Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y. +An invalid game controller button. -- **JOY_BUTTON_Y** = **3** --- Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X. +.. _class_@GlobalScope_constant_JOY_BUTTON_A: -- **JOY_BUTTON_BACK** = **4** --- Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button. +.. rst-class:: classref-enumeration-constant -- **JOY_BUTTON_GUIDE** = **5** --- Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button. +:ref:`JoyButton` **JOY_BUTTON_A** = ``0`` -- **JOY_BUTTON_START** = **6** --- Game controller SDL start button. Corresponds to the Nintendo + button. +Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B. -- **JOY_BUTTON_LEFT_STICK** = **7** --- Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button. +.. _class_@GlobalScope_constant_JOY_BUTTON_B: -- **JOY_BUTTON_RIGHT_STICK** = **8** --- Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button. +.. rst-class:: classref-enumeration-constant -- **JOY_BUTTON_LEFT_SHOULDER** = **9** --- Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button. +:ref:`JoyButton` **JOY_BUTTON_B** = ``1`` -- **JOY_BUTTON_RIGHT_SHOULDER** = **10** --- Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button. +Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A. -- **JOY_BUTTON_DPAD_UP** = **11** --- Game controller D-pad up button. +.. _class_@GlobalScope_constant_JOY_BUTTON_X: -- **JOY_BUTTON_DPAD_DOWN** = **12** --- Game controller D-pad down button. +.. rst-class:: classref-enumeration-constant -- **JOY_BUTTON_DPAD_LEFT** = **13** --- Game controller D-pad left button. +:ref:`JoyButton` **JOY_BUTTON_X** = ``2`` -- **JOY_BUTTON_DPAD_RIGHT** = **14** --- Game controller D-pad right button. +Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y. -- **JOY_BUTTON_MISC1** = **15** --- Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button. +.. _class_@GlobalScope_constant_JOY_BUTTON_Y: -- **JOY_BUTTON_PADDLE1** = **16** --- Game controller SDL paddle 1 button. +.. rst-class:: classref-enumeration-constant -- **JOY_BUTTON_PADDLE2** = **17** --- Game controller SDL paddle 2 button. +:ref:`JoyButton` **JOY_BUTTON_Y** = ``3`` -- **JOY_BUTTON_PADDLE3** = **18** --- Game controller SDL paddle 3 button. +Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X. -- **JOY_BUTTON_PADDLE4** = **19** --- Game controller SDL paddle 4 button. +.. _class_@GlobalScope_constant_JOY_BUTTON_BACK: -- **JOY_BUTTON_TOUCHPAD** = **20** --- Game controller SDL touchpad button. +.. rst-class:: classref-enumeration-constant -- **JOY_BUTTON_SDL_MAX** = **21** --- The number of SDL game controller buttons. +:ref:`JoyButton` **JOY_BUTTON_BACK** = ``4`` -- **JOY_BUTTON_MAX** = **128** --- The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms: +Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button. - - **Android:** Up to 36 buttons. +.. _class_@GlobalScope_constant_JOY_BUTTON_GUIDE: - - **Linux:** Up to 80 buttons. +.. rst-class:: classref-enumeration-constant - - **Windows** and **macOS:** Up to 128 buttons. +:ref:`JoyButton` **JOY_BUTTON_GUIDE** = ``5`` + +Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_START** = ``6`` + +Game controller SDL start button. Corresponds to the Nintendo + button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_STICK: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_LEFT_STICK** = ``7`` + +Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_STICK: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_RIGHT_STICK** = ``8`` + +Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_SHOULDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_LEFT_SHOULDER** = ``9`` + +Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_RIGHT_SHOULDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_RIGHT_SHOULDER** = ``10`` + +Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_UP: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_DPAD_UP** = ``11`` + +Game controller D-pad up button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_DPAD_DOWN** = ``12`` + +Game controller D-pad down button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_DPAD_LEFT** = ``13`` + +Game controller D-pad left button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_DPAD_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_DPAD_RIGHT** = ``14`` + +Game controller D-pad right button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_MISC1: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_MISC1** = ``15`` + +Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE1: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_PADDLE1** = ``16`` + +Game controller SDL paddle 1 button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE2: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_PADDLE2** = ``17`` + +Game controller SDL paddle 2 button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE3: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_PADDLE3** = ``18`` + +Game controller SDL paddle 3 button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_PADDLE4: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_PADDLE4** = ``19`` + +Game controller SDL paddle 4 button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_TOUCHPAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_TOUCHPAD** = ``20`` + +Game controller SDL touchpad button. + +.. _class_@GlobalScope_constant_JOY_BUTTON_SDL_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_SDL_MAX** = ``21`` + +The number of SDL game controller buttons. + +.. _class_@GlobalScope_constant_JOY_BUTTON_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyButton` **JOY_BUTTON_MAX** = ``128`` + +The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms: + +- **Android:** Up to 36 buttons. + +- **Linux:** Up to 80 buttons. + +- **Windows** and **macOS:** Up to 128 buttons. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_JoyAxis: -.. _class_@GlobalScope_constant_JOY_AXIS_INVALID: - -.. _class_@GlobalScope_constant_JOY_AXIS_LEFT_X: - -.. _class_@GlobalScope_constant_JOY_AXIS_LEFT_Y: - -.. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_X: - -.. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_Y: - -.. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_LEFT: - -.. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_RIGHT: - -.. _class_@GlobalScope_constant_JOY_AXIS_SDL_MAX: - -.. _class_@GlobalScope_constant_JOY_AXIS_MAX: +.. rst-class:: classref-enumeration enum **JoyAxis**: -- **JOY_AXIS_INVALID** = **-1** --- An invalid game controller axis. +.. _class_@GlobalScope_constant_JOY_AXIS_INVALID: -- **JOY_AXIS_LEFT_X** = **0** --- Game controller left joystick x-axis. +.. rst-class:: classref-enumeration-constant -- **JOY_AXIS_LEFT_Y** = **1** --- Game controller left joystick y-axis. +:ref:`JoyAxis` **JOY_AXIS_INVALID** = ``-1`` -- **JOY_AXIS_RIGHT_X** = **2** --- Game controller right joystick x-axis. +An invalid game controller axis. -- **JOY_AXIS_RIGHT_Y** = **3** --- Game controller right joystick y-axis. +.. _class_@GlobalScope_constant_JOY_AXIS_LEFT_X: -- **JOY_AXIS_TRIGGER_LEFT** = **4** --- Game controller left trigger axis. +.. rst-class:: classref-enumeration-constant -- **JOY_AXIS_TRIGGER_RIGHT** = **5** --- Game controller right trigger axis. +:ref:`JoyAxis` **JOY_AXIS_LEFT_X** = ``0`` -- **JOY_AXIS_SDL_MAX** = **6** --- The number of SDL game controller axes. +Game controller left joystick x-axis. -- **JOY_AXIS_MAX** = **10** --- The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes. +.. _class_@GlobalScope_constant_JOY_AXIS_LEFT_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyAxis` **JOY_AXIS_LEFT_Y** = ``1`` + +Game controller left joystick y-axis. + +.. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyAxis` **JOY_AXIS_RIGHT_X** = ``2`` + +Game controller right joystick x-axis. + +.. _class_@GlobalScope_constant_JOY_AXIS_RIGHT_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyAxis` **JOY_AXIS_RIGHT_Y** = ``3`` + +Game controller right joystick y-axis. + +.. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyAxis` **JOY_AXIS_TRIGGER_LEFT** = ``4`` + +Game controller left trigger axis. + +.. _class_@GlobalScope_constant_JOY_AXIS_TRIGGER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyAxis` **JOY_AXIS_TRIGGER_RIGHT** = ``5`` + +Game controller right trigger axis. + +.. _class_@GlobalScope_constant_JOY_AXIS_SDL_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyAxis` **JOY_AXIS_SDL_MAX** = ``6`` + +The number of SDL game controller axes. + +.. _class_@GlobalScope_constant_JOY_AXIS_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`JoyAxis` **JOY_AXIS_MAX** = ``10`` + +The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_MIDIMessage: -.. _class_@GlobalScope_constant_MIDI_MESSAGE_NONE: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_PROGRAM_CHANGE: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_CHANNEL_PRESSURE: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_PITCH_BEND: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_EXCLUSIVE: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_POSITION_POINTER: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_SELECT: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_TUNE_REQUEST: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_START: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTINUE: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_STOP: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_ACTIVE_SENSING: - -.. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_RESET: +.. rst-class:: classref-enumeration enum **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. +.. _class_@GlobalScope_constant_MIDI_MESSAGE_NONE: -- **MIDI_MESSAGE_NOTE_OFF** = **8** --- MIDI note OFF message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +.. rst-class:: classref-enumeration-constant -- **MIDI_MESSAGE_NOTE_ON** = **9** --- MIDI note ON message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +:ref:`MIDIMessage` **MIDI_MESSAGE_NONE** = ``0`` -- **MIDI_MESSAGE_AFTERTOUCH** = **10** --- MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out". +Enum value which doesn't correspond to any MIDI message. This is used to initialize :ref:`MIDIMessage` properties with a generic state. -- **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. +.. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF: -- **MIDI_MESSAGE_PROGRAM_CHANGE** = **12** --- MIDI program change message. This message sent when the program patch number changes. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`MIDIMessage` **MIDI_MESSAGE_NOTE_OFF** = ``8`` -- **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 note OFF message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. -- **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. +.. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON: -- **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. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`MIDIMessage` **MIDI_MESSAGE_NOTE_ON** = ``9`` -- **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 note ON message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. -- **MIDI_MESSAGE_TUNE_REQUEST** = **246** --- MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators. +.. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH: -- **MIDI_MESSAGE_TIMING_CLOCK** = **248** --- MIDI timing clock message. Sent 24 times per quarter note when synchronization is required. +.. rst-class:: classref-enumeration-constant -- **MIDI_MESSAGE_START** = **250** --- MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks. +:ref:`MIDIMessage` **MIDI_MESSAGE_AFTERTOUCH** = ``10`` -- **MIDI_MESSAGE_CONTINUE** = **251** --- MIDI continue message. Continue at the point the sequence was stopped. +MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out". -- **MIDI_MESSAGE_STOP** = **252** --- MIDI stop message. Stop the current sequence. +.. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE: -- **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. +.. rst-class:: classref-enumeration-constant -- **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. +: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. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_PROGRAM_CHANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MIDIMessage` **MIDI_MESSAGE_PROGRAM_CHANGE** = ``12`` + +MIDI program change message. This message sent when the program patch number changes. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_CHANNEL_PRESSURE: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_PITCH_BEND: + +.. rst-class:: classref-enumeration-constant + +: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). + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_EXCLUSIVE: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_POSITION_POINTER: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_SELECT: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_TUNE_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`MIDIMessage` **MIDI_MESSAGE_TUNE_REQUEST** = ``246`` + +MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`MIDIMessage` **MIDI_MESSAGE_TIMING_CLOCK** = ``248`` + +MIDI timing clock message. Sent 24 times per quarter note when synchronization is required. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`MIDIMessage` **MIDI_MESSAGE_START** = ``250`` + +MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTINUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MIDIMessage` **MIDI_MESSAGE_CONTINUE** = ``251`` + +MIDI continue message. Continue at the point the sequence was stopped. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_STOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`MIDIMessage` **MIDI_MESSAGE_STOP** = ``252`` + +MIDI stop message. Stop the current sequence. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_ACTIVE_SENSING: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_RESET: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_Error: -.. _class_@GlobalScope_constant_OK: - -.. _class_@GlobalScope_constant_FAILED: - -.. _class_@GlobalScope_constant_ERR_UNAVAILABLE: - -.. _class_@GlobalScope_constant_ERR_UNCONFIGURED: - -.. _class_@GlobalScope_constant_ERR_UNAUTHORIZED: - -.. _class_@GlobalScope_constant_ERR_PARAMETER_RANGE_ERROR: - -.. _class_@GlobalScope_constant_ERR_OUT_OF_MEMORY: - -.. _class_@GlobalScope_constant_ERR_FILE_NOT_FOUND: - -.. _class_@GlobalScope_constant_ERR_FILE_BAD_DRIVE: - -.. _class_@GlobalScope_constant_ERR_FILE_BAD_PATH: - -.. _class_@GlobalScope_constant_ERR_FILE_NO_PERMISSION: - -.. _class_@GlobalScope_constant_ERR_FILE_ALREADY_IN_USE: - -.. _class_@GlobalScope_constant_ERR_FILE_CANT_OPEN: - -.. _class_@GlobalScope_constant_ERR_FILE_CANT_WRITE: - -.. _class_@GlobalScope_constant_ERR_FILE_CANT_READ: - -.. _class_@GlobalScope_constant_ERR_FILE_UNRECOGNIZED: - -.. _class_@GlobalScope_constant_ERR_FILE_CORRUPT: - -.. _class_@GlobalScope_constant_ERR_FILE_MISSING_DEPENDENCIES: - -.. _class_@GlobalScope_constant_ERR_FILE_EOF: - -.. _class_@GlobalScope_constant_ERR_CANT_OPEN: - -.. _class_@GlobalScope_constant_ERR_CANT_CREATE: - -.. _class_@GlobalScope_constant_ERR_QUERY_FAILED: - -.. _class_@GlobalScope_constant_ERR_ALREADY_IN_USE: - -.. _class_@GlobalScope_constant_ERR_LOCKED: - -.. _class_@GlobalScope_constant_ERR_TIMEOUT: - -.. _class_@GlobalScope_constant_ERR_CANT_CONNECT: - -.. _class_@GlobalScope_constant_ERR_CANT_RESOLVE: - -.. _class_@GlobalScope_constant_ERR_CONNECTION_ERROR: - -.. _class_@GlobalScope_constant_ERR_CANT_ACQUIRE_RESOURCE: - -.. _class_@GlobalScope_constant_ERR_CANT_FORK: - -.. _class_@GlobalScope_constant_ERR_INVALID_DATA: - -.. _class_@GlobalScope_constant_ERR_INVALID_PARAMETER: - -.. _class_@GlobalScope_constant_ERR_ALREADY_EXISTS: - -.. _class_@GlobalScope_constant_ERR_DOES_NOT_EXIST: - -.. _class_@GlobalScope_constant_ERR_DATABASE_CANT_READ: - -.. _class_@GlobalScope_constant_ERR_DATABASE_CANT_WRITE: - -.. _class_@GlobalScope_constant_ERR_COMPILATION_FAILED: - -.. _class_@GlobalScope_constant_ERR_METHOD_NOT_FOUND: - -.. _class_@GlobalScope_constant_ERR_LINK_FAILED: - -.. _class_@GlobalScope_constant_ERR_SCRIPT_FAILED: - -.. _class_@GlobalScope_constant_ERR_CYCLIC_LINK: - -.. _class_@GlobalScope_constant_ERR_INVALID_DECLARATION: - -.. _class_@GlobalScope_constant_ERR_DUPLICATE_SYMBOL: - -.. _class_@GlobalScope_constant_ERR_PARSE_ERROR: - -.. _class_@GlobalScope_constant_ERR_BUSY: - -.. _class_@GlobalScope_constant_ERR_SKIP: - -.. _class_@GlobalScope_constant_ERR_HELP: - -.. _class_@GlobalScope_constant_ERR_BUG: - -.. _class_@GlobalScope_constant_ERR_PRINTER_ON_FIRE: +.. rst-class:: classref-enumeration enum **Error**: -- **OK** = **0** --- Methods that return :ref:`Error` return :ref:`OK` when no error occurred. +.. _class_@GlobalScope_constant_OK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **OK** = ``0`` + +Methods that return :ref:`Error` return :ref:`OK` when no error occurred. Since :ref:`OK` has value 0, and all other error constants are positive integers, it can also be used in boolean checks. @@ -2035,257 +3535,601 @@ Since :ref:`OK` has value 0, and all other error \ **Note:** Many functions do not return an error code, but will print error messages to standard output. -- **FAILED** = **1** --- Generic error. +.. _class_@GlobalScope_constant_FAILED: -- **ERR_UNAVAILABLE** = **2** --- Unavailable error. +.. rst-class:: classref-enumeration-constant -- **ERR_UNCONFIGURED** = **3** --- Unconfigured error. +:ref:`Error` **FAILED** = ``1`` -- **ERR_UNAUTHORIZED** = **4** --- Unauthorized error. +Generic error. -- **ERR_PARAMETER_RANGE_ERROR** = **5** --- Parameter range error. +.. _class_@GlobalScope_constant_ERR_UNAVAILABLE: -- **ERR_OUT_OF_MEMORY** = **6** --- Out of memory (OOM) error. +.. rst-class:: classref-enumeration-constant -- **ERR_FILE_NOT_FOUND** = **7** --- File: Not found error. +:ref:`Error` **ERR_UNAVAILABLE** = ``2`` -- **ERR_FILE_BAD_DRIVE** = **8** --- File: Bad drive error. +Unavailable error. -- **ERR_FILE_BAD_PATH** = **9** --- File: Bad path error. +.. _class_@GlobalScope_constant_ERR_UNCONFIGURED: -- **ERR_FILE_NO_PERMISSION** = **10** --- File: No permission error. +.. rst-class:: classref-enumeration-constant -- **ERR_FILE_ALREADY_IN_USE** = **11** --- File: Already in use error. +:ref:`Error` **ERR_UNCONFIGURED** = ``3`` -- **ERR_FILE_CANT_OPEN** = **12** --- File: Can't open error. +Unconfigured error. -- **ERR_FILE_CANT_WRITE** = **13** --- File: Can't write error. +.. _class_@GlobalScope_constant_ERR_UNAUTHORIZED: -- **ERR_FILE_CANT_READ** = **14** --- File: Can't read error. +.. rst-class:: classref-enumeration-constant -- **ERR_FILE_UNRECOGNIZED** = **15** --- File: Unrecognized error. +:ref:`Error` **ERR_UNAUTHORIZED** = ``4`` -- **ERR_FILE_CORRUPT** = **16** --- File: Corrupt error. +Unauthorized error. -- **ERR_FILE_MISSING_DEPENDENCIES** = **17** --- File: Missing dependencies error. +.. _class_@GlobalScope_constant_ERR_PARAMETER_RANGE_ERROR: -- **ERR_FILE_EOF** = **18** --- File: End of file (EOF) error. +.. rst-class:: classref-enumeration-constant -- **ERR_CANT_OPEN** = **19** --- Can't open error. +:ref:`Error` **ERR_PARAMETER_RANGE_ERROR** = ``5`` -- **ERR_CANT_CREATE** = **20** --- Can't create error. +Parameter range error. -- **ERR_QUERY_FAILED** = **21** --- Query failed error. +.. _class_@GlobalScope_constant_ERR_OUT_OF_MEMORY: -- **ERR_ALREADY_IN_USE** = **22** --- Already in use error. +.. rst-class:: classref-enumeration-constant -- **ERR_LOCKED** = **23** --- Locked error. +:ref:`Error` **ERR_OUT_OF_MEMORY** = ``6`` -- **ERR_TIMEOUT** = **24** --- Timeout error. +Out of memory (OOM) error. -- **ERR_CANT_CONNECT** = **25** --- Can't connect error. +.. _class_@GlobalScope_constant_ERR_FILE_NOT_FOUND: -- **ERR_CANT_RESOLVE** = **26** --- Can't resolve error. +.. rst-class:: classref-enumeration-constant -- **ERR_CONNECTION_ERROR** = **27** --- Connection error. +:ref:`Error` **ERR_FILE_NOT_FOUND** = ``7`` -- **ERR_CANT_ACQUIRE_RESOURCE** = **28** --- Can't acquire resource error. +File: Not found error. -- **ERR_CANT_FORK** = **29** --- Can't fork process error. +.. _class_@GlobalScope_constant_ERR_FILE_BAD_DRIVE: -- **ERR_INVALID_DATA** = **30** --- Invalid data error. +.. rst-class:: classref-enumeration-constant -- **ERR_INVALID_PARAMETER** = **31** --- Invalid parameter error. +:ref:`Error` **ERR_FILE_BAD_DRIVE** = ``8`` -- **ERR_ALREADY_EXISTS** = **32** --- Already exists error. +File: Bad drive error. -- **ERR_DOES_NOT_EXIST** = **33** --- Does not exist error. +.. _class_@GlobalScope_constant_ERR_FILE_BAD_PATH: -- **ERR_DATABASE_CANT_READ** = **34** --- Database: Read error. +.. rst-class:: classref-enumeration-constant -- **ERR_DATABASE_CANT_WRITE** = **35** --- Database: Write error. +:ref:`Error` **ERR_FILE_BAD_PATH** = ``9`` -- **ERR_COMPILATION_FAILED** = **36** --- Compilation failed error. +File: Bad path error. -- **ERR_METHOD_NOT_FOUND** = **37** --- Method not found error. +.. _class_@GlobalScope_constant_ERR_FILE_NO_PERMISSION: -- **ERR_LINK_FAILED** = **38** --- Linking failed error. +.. rst-class:: classref-enumeration-constant -- **ERR_SCRIPT_FAILED** = **39** --- Script failed error. +:ref:`Error` **ERR_FILE_NO_PERMISSION** = ``10`` -- **ERR_CYCLIC_LINK** = **40** --- Cycling link (import cycle) error. +File: No permission error. -- **ERR_INVALID_DECLARATION** = **41** --- Invalid declaration error. +.. _class_@GlobalScope_constant_ERR_FILE_ALREADY_IN_USE: -- **ERR_DUPLICATE_SYMBOL** = **42** --- Duplicate symbol error. +.. rst-class:: classref-enumeration-constant -- **ERR_PARSE_ERROR** = **43** --- Parse error. +:ref:`Error` **ERR_FILE_ALREADY_IN_USE** = ``11`` -- **ERR_BUSY** = **44** --- Busy error. +File: Already in use error. -- **ERR_SKIP** = **45** --- Skip error. +.. _class_@GlobalScope_constant_ERR_FILE_CANT_OPEN: -- **ERR_HELP** = **46** --- Help error. Used internally when passing ``--version`` or ``--help`` as executable options. +.. rst-class:: classref-enumeration-constant -- **ERR_BUG** = **47** --- Bug error, caused by an implementation issue in the method. +:ref:`Error` **ERR_FILE_CANT_OPEN** = ``12`` + +File: Can't open error. + +.. _class_@GlobalScope_constant_ERR_FILE_CANT_WRITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_FILE_CANT_WRITE** = ``13`` + +File: Can't write error. + +.. _class_@GlobalScope_constant_ERR_FILE_CANT_READ: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_FILE_CANT_READ** = ``14`` + +File: Can't read error. + +.. _class_@GlobalScope_constant_ERR_FILE_UNRECOGNIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_FILE_UNRECOGNIZED** = ``15`` + +File: Unrecognized error. + +.. _class_@GlobalScope_constant_ERR_FILE_CORRUPT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_FILE_CORRUPT** = ``16`` + +File: Corrupt error. + +.. _class_@GlobalScope_constant_ERR_FILE_MISSING_DEPENDENCIES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_FILE_MISSING_DEPENDENCIES** = ``17`` + +File: Missing dependencies error. + +.. _class_@GlobalScope_constant_ERR_FILE_EOF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_FILE_EOF** = ``18`` + +File: End of file (EOF) error. + +.. _class_@GlobalScope_constant_ERR_CANT_OPEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CANT_OPEN** = ``19`` + +Can't open error. + +.. _class_@GlobalScope_constant_ERR_CANT_CREATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CANT_CREATE** = ``20`` + +Can't create error. + +.. _class_@GlobalScope_constant_ERR_QUERY_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_QUERY_FAILED** = ``21`` + +Query failed error. + +.. _class_@GlobalScope_constant_ERR_ALREADY_IN_USE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_ALREADY_IN_USE** = ``22`` + +Already in use error. + +.. _class_@GlobalScope_constant_ERR_LOCKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_LOCKED** = ``23`` + +Locked error. + +.. _class_@GlobalScope_constant_ERR_TIMEOUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_TIMEOUT** = ``24`` + +Timeout error. + +.. _class_@GlobalScope_constant_ERR_CANT_CONNECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CANT_CONNECT** = ``25`` + +Can't connect error. + +.. _class_@GlobalScope_constant_ERR_CANT_RESOLVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CANT_RESOLVE** = ``26`` + +Can't resolve error. + +.. _class_@GlobalScope_constant_ERR_CONNECTION_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CONNECTION_ERROR** = ``27`` + +Connection error. + +.. _class_@GlobalScope_constant_ERR_CANT_ACQUIRE_RESOURCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CANT_ACQUIRE_RESOURCE** = ``28`` + +Can't acquire resource error. + +.. _class_@GlobalScope_constant_ERR_CANT_FORK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CANT_FORK** = ``29`` + +Can't fork process error. + +.. _class_@GlobalScope_constant_ERR_INVALID_DATA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_INVALID_DATA** = ``30`` + +Invalid data error. + +.. _class_@GlobalScope_constant_ERR_INVALID_PARAMETER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_INVALID_PARAMETER** = ``31`` + +Invalid parameter error. + +.. _class_@GlobalScope_constant_ERR_ALREADY_EXISTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_ALREADY_EXISTS** = ``32`` + +Already exists error. + +.. _class_@GlobalScope_constant_ERR_DOES_NOT_EXIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_DOES_NOT_EXIST** = ``33`` + +Does not exist error. + +.. _class_@GlobalScope_constant_ERR_DATABASE_CANT_READ: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_DATABASE_CANT_READ** = ``34`` + +Database: Read error. + +.. _class_@GlobalScope_constant_ERR_DATABASE_CANT_WRITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_DATABASE_CANT_WRITE** = ``35`` + +Database: Write error. + +.. _class_@GlobalScope_constant_ERR_COMPILATION_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_COMPILATION_FAILED** = ``36`` + +Compilation failed error. + +.. _class_@GlobalScope_constant_ERR_METHOD_NOT_FOUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_METHOD_NOT_FOUND** = ``37`` + +Method not found error. + +.. _class_@GlobalScope_constant_ERR_LINK_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_LINK_FAILED** = ``38`` + +Linking failed error. + +.. _class_@GlobalScope_constant_ERR_SCRIPT_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_SCRIPT_FAILED** = ``39`` + +Script failed error. + +.. _class_@GlobalScope_constant_ERR_CYCLIC_LINK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_CYCLIC_LINK** = ``40`` + +Cycling link (import cycle) error. + +.. _class_@GlobalScope_constant_ERR_INVALID_DECLARATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_INVALID_DECLARATION** = ``41`` + +Invalid declaration error. + +.. _class_@GlobalScope_constant_ERR_DUPLICATE_SYMBOL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_DUPLICATE_SYMBOL** = ``42`` + +Duplicate symbol error. + +.. _class_@GlobalScope_constant_ERR_PARSE_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_PARSE_ERROR** = ``43`` + +Parse error. + +.. _class_@GlobalScope_constant_ERR_BUSY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_BUSY** = ``44`` + +Busy error. + +.. _class_@GlobalScope_constant_ERR_SKIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_SKIP** = ``45`` + +Skip error. + +.. _class_@GlobalScope_constant_ERR_HELP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_HELP** = ``46`` + +Help error. Used internally when passing ``--version`` or ``--help`` as executable options. + +.. _class_@GlobalScope_constant_ERR_BUG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_BUG** = ``47`` + +Bug error, caused by an implementation issue in the method. \ **Note:** If a built-in method returns this code, please open an issue on `the GitHub Issue Tracker `__. -- **ERR_PRINTER_ON_FIRE** = **48** --- Printer on fire error (This is an easter egg, no built-in methods return this error code). +.. _class_@GlobalScope_constant_ERR_PRINTER_ON_FIRE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Error` **ERR_PRINTER_ON_FIRE** = ``48`` + +Printer on fire error (This is an easter egg, no built-in methods return this error code). + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_PropertyHint: -.. _class_@GlobalScope_constant_PROPERTY_HINT_NONE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_RANGE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM_SUGGESTION: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_EXP_EASING: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LINK: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_FLAGS: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_RENDER: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_PHYSICS: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_NAVIGATION: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_RENDER: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_PHYSICS: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_NAVIGATION: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_FILE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_DIR: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_FILE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_DIR: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_RESOURCE_TYPE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_MULTILINE_TEXT: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_EXPRESSION: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_PLACEHOLDER_TEXT: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_COLOR_NO_ALPHA: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_ID: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_VARIANT_TYPE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_BASE_TYPE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_INSTANCE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_SCRIPT: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_BASE_TYPE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_INSTANCE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_SCRIPT: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_TOO_BIG: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_SAVE_FILE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_SAVE_FILE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_OBJECTID: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_POINTER: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_ARRAY_TYPE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALIZABLE_STRING: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_TYPE: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_PASSWORD: - -.. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: +.. rst-class:: classref-enumeration enum **PropertyHint**: -- **PROPERTY_HINT_NONE** = **0** --- The property has no hint for the editor. +.. _class_@GlobalScope_constant_PROPERTY_HINT_NONE: -- **PROPERTY_HINT_RANGE** = **1** --- Hints that an :ref:`int` or :ref:`float` property should be within a range specified via the hint string ``"min,max"`` or ``"min,max,step"``. The hint string can optionally include ``"or_greater"`` and/or ``"or_less"`` to allow manual input going respectively above the max or below the min values. +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_NONE** = ``0`` + +The property has no hint for the editor. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_RANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_RANGE** = ``1`` + +Hints that an :ref:`int` or :ref:`float` property should be within a range specified via the hint string ``"min,max"`` or ``"min,max,step"``. The hint string can optionally include ``"or_greater"`` and/or ``"or_less"`` to allow manual input going respectively above the max or below the min values. \ **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. -- **PROPERTY_HINT_ENUM** = **2** --- Hints that an :ref:`int`, :ref:`float`, or :ref:`String` property is an enumerated value to pick in a list specified via a hint string. +.. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_ENUM** = ``2`` + +Hints that an :ref:`int`, :ref:`float`, or :ref:`String` property is an enumerated value to pick in a list specified via a hint string. The hint string is a comma separated list of names such as ``"Hello,Something,Else"``. Whitespaces are **not** removed from either end of a name. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"Zero,One,Three:3,Four,Six:6"``. -- **PROPERTY_HINT_ENUM_SUGGESTION** = **3** --- Hints that a :ref:`String` property can be an enumerated value to pick in a list specified via a hint string such as ``"Hello,Something,Else"``. +.. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM_SUGGESTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_ENUM_SUGGESTION** = ``3`` + +Hints that a :ref:`String` property can be an enumerated value to pick in a list specified via a hint string such as ``"Hello,Something,Else"``. Unlike :ref:`PROPERTY_HINT_ENUM`, a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values. -- **PROPERTY_HINT_EXP_EASING** = **4** --- Hints that a :ref:`float` property should be edited via an exponential easing function. The hint string can include ``"attenuation"`` to flip the curve horizontally and/or ``"positive_only"`` to exclude in/out easing and limit values to be greater than or equal to zero. +.. _class_@GlobalScope_constant_PROPERTY_HINT_EXP_EASING: -- **PROPERTY_HINT_LINK** = **5** --- Hints that a vector property should allow its components to be linked. For example, this allows :ref:`Vector2.x` and :ref:`Vector2.y` to be edited together. +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_FLAGS** = **6** --- Hints that an :ref:`int` property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like ``"Bit0,Bit1,Bit2,,Bit4"``. +:ref:`PropertyHint` **PROPERTY_HINT_EXP_EASING** = ``4`` -- **PROPERTY_HINT_LAYERS_2D_RENDER** = **7** --- Hints that an :ref:`int` property is a bitmask using the optionally named 2D render layers. +Hints that a :ref:`float` property should be edited via an exponential easing function. The hint string can include ``"attenuation"`` to flip the curve horizontally and/or ``"positive_only"`` to exclude in/out easing and limit values to be greater than or equal to zero. -- **PROPERTY_HINT_LAYERS_2D_PHYSICS** = **8** --- Hints that an :ref:`int` property is a bitmask using the optionally named 2D physics layers. +.. _class_@GlobalScope_constant_PROPERTY_HINT_LINK: -- **PROPERTY_HINT_LAYERS_2D_NAVIGATION** = **9** --- Hints that an :ref:`int` property is a bitmask using the optionally named 2D navigation layers. +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_LAYERS_3D_RENDER** = **10** --- Hints that an :ref:`int` property is a bitmask using the optionally named 3D render layers. +:ref:`PropertyHint` **PROPERTY_HINT_LINK** = ``5`` -- **PROPERTY_HINT_LAYERS_3D_PHYSICS** = **11** --- Hints that an :ref:`int` property is a bitmask using the optionally named 3D physics layers. +Hints that a vector property should allow its components to be linked. For example, this allows :ref:`Vector2.x` and :ref:`Vector2.y` to be edited together. -- **PROPERTY_HINT_LAYERS_3D_NAVIGATION** = **12** --- Hints that an :ref:`int` property is a bitmask using the optionally named 3D navigation layers. +.. _class_@GlobalScope_constant_PROPERTY_HINT_FLAGS: -- **PROPERTY_HINT_FILE** = **13** --- Hints that a :ref:`String` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_DIR** = **14** --- Hints that a :ref:`String` property is a path to a directory. Editing it will show a file dialog for picking the path. +:ref:`PropertyHint` **PROPERTY_HINT_FLAGS** = ``6`` -- **PROPERTY_HINT_GLOBAL_FILE** = **15** --- Hints that a :ref:`String` property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like ``"*.png,*.jpg"``. +Hints that an :ref:`int` property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like ``"Bit0,Bit1,Bit2,,Bit4"``. -- **PROPERTY_HINT_GLOBAL_DIR** = **16** --- Hints that a :ref:`String` property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path. +.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_RENDER: -- **PROPERTY_HINT_RESOURCE_TYPE** = **17** --- Hints that a property is an instance of a :ref:`Resource`-derived type, optionally specified via the hint string (e.g. ``"Texture2D"``). Editing it will show a popup menu of valid resource types to instantiate. +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_MULTILINE_TEXT** = **18** --- Hints that a :ref:`String` property is text with line breaks. Editing it will show a text input field where line breaks can be typed. +:ref:`PropertyHint` **PROPERTY_HINT_LAYERS_2D_RENDER** = ``7`` -- **PROPERTY_HINT_EXPRESSION** = **19** --- Hints that a :ref:`String` property is an :ref:`Expression`. +Hints that an :ref:`int` property is a bitmask using the optionally named 2D render layers. -- **PROPERTY_HINT_PLACEHOLDER_TEXT** = **20** --- Hints that a :ref:`String` property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use. +.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_PHYSICS: -- **PROPERTY_HINT_COLOR_NO_ALPHA** = **21** --- Hints that a :ref:`Color` property should be edited without affecting its transparency (:ref:`Color.a` is not editable). +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_OBJECT_ID** = **22** +:ref:`PropertyHint` **PROPERTY_HINT_LAYERS_2D_PHYSICS** = ``8`` -- **PROPERTY_HINT_TYPE_STRING** = **23** --- Hint that a property represents a particular type. If a property is :ref:`TYPE_STRING`, allows to set a type from the create dialog. If you need to create an :ref:`Array` to contain elements of a specific type, the ``hint_string`` must encode nested types using ``":"`` and ``"/"`` for specifying :ref:`Resource` types. For instance: +Hints that an :ref:`int` property is a bitmask using the optionally named 2D physics layers. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_2D_NAVIGATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_LAYERS_2D_NAVIGATION** = ``9`` + +Hints that an :ref:`int` property is a bitmask using the optionally named 2D navigation layers. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_RENDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_LAYERS_3D_RENDER** = ``10`` + +Hints that an :ref:`int` property is a bitmask using the optionally named 3D render layers. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_LAYERS_3D_PHYSICS** = ``11`` + +Hints that an :ref:`int` property is a bitmask using the optionally named 3D physics layers. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_LAYERS_3D_NAVIGATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_LAYERS_3D_NAVIGATION** = ``12`` + +Hints that an :ref:`int` property is a bitmask using the optionally named 3D navigation layers. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_FILE** = ``13`` + +Hints that a :ref:`String` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_DIR: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_DIR** = ``14`` + +Hints that a :ref:`String` property is a path to a directory. Editing it will show a file dialog for picking the path. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_GLOBAL_FILE** = ``15`` + +Hints that a :ref:`String` property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like ``"*.png,*.jpg"``. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_DIR: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_GLOBAL_DIR** = ``16`` + +Hints that a :ref:`String` property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_RESOURCE_TYPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_RESOURCE_TYPE** = ``17`` + +Hints that a property is an instance of a :ref:`Resource`-derived type, optionally specified via the hint string (e.g. ``"Texture2D"``). Editing it will show a popup menu of valid resource types to instantiate. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_MULTILINE_TEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_MULTILINE_TEXT** = ``18`` + +Hints that a :ref:`String` property is text with line breaks. Editing it will show a text input field where line breaks can be typed. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_EXPRESSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_EXPRESSION** = ``19`` + +Hints that a :ref:`String` property is an :ref:`Expression`. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_PLACEHOLDER_TEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_PLACEHOLDER_TEXT** = ``20`` + +Hints that a :ref:`String` property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_COLOR_NO_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_COLOR_NO_ALPHA** = ``21`` + +Hints that a :ref:`Color` property should be edited without affecting its transparency (:ref:`Color.a` is not editable). + +.. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_OBJECT_ID** = ``22`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_TYPE_STRING** = ``23`` + +Hint that a property represents a particular type. If a property is :ref:`TYPE_STRING`, allows to set a type from the create dialog. If you need to create an :ref:`Array` to contain elements of a specific type, the ``hint_string`` must encode nested types using ``":"`` and ``"/"`` for specifying :ref:`Resource` types. For instance: :: @@ -2296,799 +4140,1519 @@ Unlike :ref:`PROPERTY_HINT_ENUM` \ **Note:** The final colon is required for properly detecting built-in types. -- **PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE** = **24** +.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE: -- **PROPERTY_HINT_METHOD_OF_VARIANT_TYPE** = **25** +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_METHOD_OF_BASE_TYPE** = **26** +:ref:`PropertyHint` **PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE** = ``24`` -- **PROPERTY_HINT_METHOD_OF_INSTANCE** = **27** -- **PROPERTY_HINT_METHOD_OF_SCRIPT** = **28** -- **PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE** = **29** +.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_VARIANT_TYPE: -- **PROPERTY_HINT_PROPERTY_OF_BASE_TYPE** = **30** +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_PROPERTY_OF_INSTANCE** = **31** +:ref:`PropertyHint` **PROPERTY_HINT_METHOD_OF_VARIANT_TYPE** = ``25`` -- **PROPERTY_HINT_PROPERTY_OF_SCRIPT** = **32** -- **PROPERTY_HINT_OBJECT_TOO_BIG** = **33** -- **PROPERTY_HINT_NODE_PATH_VALID_TYPES** = **34** +.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_BASE_TYPE: -- **PROPERTY_HINT_SAVE_FILE** = **35** +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_GLOBAL_SAVE_FILE** = **36** +:ref:`PropertyHint` **PROPERTY_HINT_METHOD_OF_BASE_TYPE** = ``26`` -- **PROPERTY_HINT_INT_IS_OBJECTID** = **37** -- **PROPERTY_HINT_INT_IS_POINTER** = **38** -- **PROPERTY_HINT_ARRAY_TYPE** = **39** +.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_INSTANCE: -- **PROPERTY_HINT_LOCALE_ID** = **40** --- Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country. +.. rst-class:: classref-enumeration-constant -- **PROPERTY_HINT_LOCALIZABLE_STRING** = **41** --- Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings. +:ref:`PropertyHint` **PROPERTY_HINT_METHOD_OF_INSTANCE** = ``27`` -- **PROPERTY_HINT_NODE_TYPE** = **42** -- **PROPERTY_HINT_HIDE_QUATERNION_EDIT** = **43** --- Hints that a quaternion property should disable the temporary euler editor. -- **PROPERTY_HINT_PASSWORD** = **44** --- Hints that a string property is a password, and every character is replaced with the secret character. +.. _class_@GlobalScope_constant_PROPERTY_HINT_METHOD_OF_SCRIPT: -- **PROPERTY_HINT_MAX** = **45** +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_METHOD_OF_SCRIPT** = ``28`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE** = ``29`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_BASE_TYPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_PROPERTY_OF_BASE_TYPE** = ``30`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_INSTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_PROPERTY_OF_INSTANCE** = ``31`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_PROPERTY_OF_SCRIPT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_PROPERTY_OF_SCRIPT** = ``32`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_TOO_BIG: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_OBJECT_TOO_BIG** = ``33`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_NODE_PATH_VALID_TYPES** = ``34`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_SAVE_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_SAVE_FILE** = ``35`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_SAVE_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_GLOBAL_SAVE_FILE** = ``36`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_OBJECTID: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_INT_IS_OBJECTID** = ``37`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_POINTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_INT_IS_POINTER** = ``38`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_ARRAY_TYPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_ARRAY_TYPE** = ``39`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_LOCALE_ID** = ``40`` + +Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALIZABLE_STRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_LOCALIZABLE_STRING** = ``41`` + +Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_TYPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_NODE_TYPE** = ``42`` + + + +.. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_HIDE_QUATERNION_EDIT** = ``43`` + +Hints that a quaternion property should disable the temporary euler editor. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_PASSWORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_PASSWORD** = ``44`` + +Hints that a string property is a password, and every character is replaced with the secret character. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``45`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_PropertyUsageFlags: -.. _class_@GlobalScope_constant_PROPERTY_USAGE_NONE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKABLE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKED: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_INTERNATIONALIZED: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_GROUP: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_CATEGORY: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_SUBGROUP: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_BITFIELD: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_INSTANCE_STATE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_RESTART_IF_CHANGED: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_VARIABLE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_ANIMATE_AS_TRIGGER: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_ENUM: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_INTERNAL: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_HIGH_END_GFX: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_KEYING_INCREMENTS: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFERRED_SET_RESOURCE: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_BASIC_SETTING: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_READ_ONLY: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_ARRAY: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFAULT: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFAULT_INTL: - -.. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_EDITOR: +.. rst-class:: classref-enumeration enum **PropertyUsageFlags**: -- **PROPERTY_USAGE_NONE** = **0** --- The property is not stored, and does not display in the editor. This is the default for non-exported properties. +.. _class_@GlobalScope_constant_PROPERTY_USAGE_NONE: -- **PROPERTY_USAGE_STORAGE** = **2** --- The property is serialized and saved in the scene file (default). +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_EDITOR** = **4** --- The property is shown in the :ref:`EditorInspector` (default). +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_NONE** = ``0`` -- **PROPERTY_USAGE_CHECKABLE** = **8** --- The property can be checked in the :ref:`EditorInspector`. +The property is not stored, and does not display in the editor. This is the default for non-exported properties. -- **PROPERTY_USAGE_CHECKED** = **16** --- The property is checked in the :ref:`EditorInspector`. +.. _class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE: -- **PROPERTY_USAGE_INTERNATIONALIZED** = **32** --- The property is a translatable string. +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_GROUP** = **64** --- Used to group properties together in the editor. See :ref:`EditorInspector`. +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_STORAGE** = ``2`` -- **PROPERTY_USAGE_CATEGORY** = **128** --- Used to categorize properties together in the editor. +The property is serialized and saved in the scene file (default). -- **PROPERTY_USAGE_SUBGROUP** = **256** --- Used to group properties together in the editor in a subgroup (under a group). See :ref:`EditorInspector`. +.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR: -- **PROPERTY_USAGE_CLASS_IS_BITFIELD** = **512** +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_NO_INSTANCE_STATE** = **1024** --- The property does not save its state in :ref:`PackedScene`. +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR** = ``4`` -- **PROPERTY_USAGE_RESTART_IF_CHANGED** = **2048** --- Editing the property prompts the user for restarting the editor. +The property is shown in the :ref:`EditorInspector` (default). -- **PROPERTY_USAGE_SCRIPT_VARIABLE** = **4096** --- The property is a script variable which should be serialized and saved in the scene file. +.. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKABLE: -- **PROPERTY_USAGE_STORE_IF_NULL** = **8192** +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_ANIMATE_AS_TRIGGER** = **16384** +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_CHECKABLE** = ``8`` -- **PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED** = **32768** +The property can be checked in the :ref:`EditorInspector`. -- **PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE** = **65536** +.. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKED: -- **PROPERTY_USAGE_CLASS_IS_ENUM** = **131072** +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_NIL_IS_VARIANT** = **262144** +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_CHECKED** = ``16`` -- **PROPERTY_USAGE_INTERNAL** = **524288** +The property is checked in the :ref:`EditorInspector`. -- **PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE** = **1048576** --- If the property is a :ref:`Resource`, a new copy of it is always created when calling :ref:`Node.duplicate` or :ref:`Resource.duplicate`. +.. _class_@GlobalScope_constant_PROPERTY_USAGE_INTERNATIONALIZED: -- **PROPERTY_USAGE_HIGH_END_GFX** = **2097152** --- The property is only shown in the editor if modern renderers are supported (GLES3 is excluded). +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT** = **4194304** +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_INTERNATIONALIZED** = ``32`` -- **PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT** = **8388608** +The property is a translatable string. -- **PROPERTY_USAGE_KEYING_INCREMENTS** = **16777216** +.. _class_@GlobalScope_constant_PROPERTY_USAGE_GROUP: -- **PROPERTY_USAGE_DEFERRED_SET_RESOURCE** = **33554432** +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT** = **67108864** +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_GROUP** = ``64`` -- **PROPERTY_USAGE_EDITOR_BASIC_SETTING** = **134217728** +Used to group properties together in the editor. See :ref:`EditorInspector`. -- **PROPERTY_USAGE_READ_ONLY** = **268435456** --- The property is read-only in the :ref:`EditorInspector`. +.. _class_@GlobalScope_constant_PROPERTY_USAGE_CATEGORY: -- **PROPERTY_USAGE_ARRAY** = **536870912** --- The property is an array. +.. rst-class:: classref-enumeration-constant -- **PROPERTY_USAGE_DEFAULT** = **6** --- Default usage (storage, editor and network). +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_CATEGORY** = ``128`` -- **PROPERTY_USAGE_DEFAULT_INTL** = **38** --- Default usage for translatable strings (storage, editor, network and internationalized). +Used to categorize properties together in the editor. -- **PROPERTY_USAGE_NO_EDITOR** = **2** --- Default usage but without showing the property in the editor (storage, network). +.. _class_@GlobalScope_constant_PROPERTY_USAGE_SUBGROUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_SUBGROUP** = ``256`` + +Used to group properties together in the editor in a subgroup (under a group). See :ref:`EditorInspector`. + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_BITFIELD: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_BITFIELD** = ``512`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_INSTANCE_STATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_NO_INSTANCE_STATE** = ``1024`` + +The property does not save its state in :ref:`PackedScene`. + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_RESTART_IF_CHANGED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_RESTART_IF_CHANGED** = ``2048`` + +Editing the property prompts the user for restarting the editor. + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_VARIABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_SCRIPT_VARIABLE** = ``4096`` + +The property is a script variable which should be serialized and saved in the scene file. + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_STORE_IF_NULL** = ``8192`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED** = ``16384`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE** = ``32768`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_ENUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_NIL_IS_VARIANT** = ``131072`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_INTERNAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_INTERNAL** = ``262144`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE** = ``524288`` + +If the property is a :ref:`Resource`, a new copy of it is always created when calling :ref:`Node.duplicate` or :ref:`Resource.duplicate`. + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_HIGH_END_GFX: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_HIGH_END_GFX** = ``1048576`` + +The property is only shown in the editor if modern renderers are supported (GLES3 is excluded). + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT** = ``2097152`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT** = ``4194304`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_KEYING_INCREMENTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_KEYING_INCREMENTS** = ``8388608`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFERRED_SET_RESOURCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_DEFERRED_SET_RESOURCE** = ``16777216`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT** = ``33554432`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_BASIC_SETTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR_BASIC_SETTING** = ``67108864`` + + + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_READ_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_READ_ONLY** = ``134217728`` + +The property is read-only in the :ref:`EditorInspector`. + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_ARRAY** = ``268435456`` + +The property is an array. + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFAULT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_DEFAULT** = ``6`` + +Default usage (storage, editor and network). + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFAULT_INTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_DEFAULT_INTL** = ``38`` + +Default usage for translatable strings (storage, editor, network and internationalized). + +.. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyUsageFlags` **PROPERTY_USAGE_NO_EDITOR** = ``2`` + +Default usage but without showing the property in the editor (storage, network). + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_MethodFlags: -.. _class_@GlobalScope_constant_METHOD_FLAG_NORMAL: - -.. _class_@GlobalScope_constant_METHOD_FLAG_EDITOR: - -.. _class_@GlobalScope_constant_METHOD_FLAG_CONST: - -.. _class_@GlobalScope_constant_METHOD_FLAG_VIRTUAL: - -.. _class_@GlobalScope_constant_METHOD_FLAG_VARARG: - -.. _class_@GlobalScope_constant_METHOD_FLAG_STATIC: - -.. _class_@GlobalScope_constant_METHOD_FLAG_OBJECT_CORE: - -.. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: +.. rst-class:: classref-enumeration enum **MethodFlags**: -- **METHOD_FLAG_NORMAL** = **1** --- Flag for a normal method. +.. _class_@GlobalScope_constant_METHOD_FLAG_NORMAL: -- **METHOD_FLAG_EDITOR** = **2** --- Flag for an editor method. +.. rst-class:: classref-enumeration-constant -- **METHOD_FLAG_CONST** = **4** --- Flag for a constant method. +:ref:`MethodFlags` **METHOD_FLAG_NORMAL** = ``1`` -- **METHOD_FLAG_VIRTUAL** = **8** --- Flag for a virtual method. +Flag for a normal method. -- **METHOD_FLAG_VARARG** = **16** --- Flag for a method with a variable number of arguments. +.. _class_@GlobalScope_constant_METHOD_FLAG_EDITOR: -- **METHOD_FLAG_STATIC** = **32** --- Flag for a static method. +.. rst-class:: classref-enumeration-constant -- **METHOD_FLAG_OBJECT_CORE** = **64** --- Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification`) to the JSON API. +:ref:`MethodFlags` **METHOD_FLAG_EDITOR** = ``2`` -- **METHOD_FLAGS_DEFAULT** = **1** --- Default method flags (normal). +Flag for an editor method. + +.. _class_@GlobalScope_constant_METHOD_FLAG_CONST: + +.. rst-class:: classref-enumeration-constant + +:ref:`MethodFlags` **METHOD_FLAG_CONST** = ``4`` + +Flag for a constant method. + +.. _class_@GlobalScope_constant_METHOD_FLAG_VIRTUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`MethodFlags` **METHOD_FLAG_VIRTUAL** = ``8`` + +Flag for a virtual method. + +.. _class_@GlobalScope_constant_METHOD_FLAG_VARARG: + +.. rst-class:: classref-enumeration-constant + +:ref:`MethodFlags` **METHOD_FLAG_VARARG** = ``16`` + +Flag for a method with a variable number of arguments. + +.. _class_@GlobalScope_constant_METHOD_FLAG_STATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`MethodFlags` **METHOD_FLAG_STATIC** = ``32`` + +Flag for a static method. + +.. _class_@GlobalScope_constant_METHOD_FLAG_OBJECT_CORE: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: + +.. rst-class:: classref-enumeration-constant + +:ref:`MethodFlags` **METHOD_FLAGS_DEFAULT** = ``1`` + +Default method flags (normal). + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_Variant.Type: -.. _class_@GlobalScope_constant_TYPE_NIL: - -.. _class_@GlobalScope_constant_TYPE_BOOL: - -.. _class_@GlobalScope_constant_TYPE_INT: - -.. _class_@GlobalScope_constant_TYPE_FLOAT: - -.. _class_@GlobalScope_constant_TYPE_STRING: - -.. _class_@GlobalScope_constant_TYPE_VECTOR2: - -.. _class_@GlobalScope_constant_TYPE_VECTOR2I: - -.. _class_@GlobalScope_constant_TYPE_RECT2: - -.. _class_@GlobalScope_constant_TYPE_RECT2I: - -.. _class_@GlobalScope_constant_TYPE_VECTOR3: - -.. _class_@GlobalScope_constant_TYPE_VECTOR3I: - -.. _class_@GlobalScope_constant_TYPE_TRANSFORM2D: - -.. _class_@GlobalScope_constant_TYPE_VECTOR4: - -.. _class_@GlobalScope_constant_TYPE_VECTOR4I: - -.. _class_@GlobalScope_constant_TYPE_PLANE: - -.. _class_@GlobalScope_constant_TYPE_QUATERNION: - -.. _class_@GlobalScope_constant_TYPE_AABB: - -.. _class_@GlobalScope_constant_TYPE_BASIS: - -.. _class_@GlobalScope_constant_TYPE_TRANSFORM3D: - -.. _class_@GlobalScope_constant_TYPE_PROJECTION: - -.. _class_@GlobalScope_constant_TYPE_COLOR: - -.. _class_@GlobalScope_constant_TYPE_STRING_NAME: - -.. _class_@GlobalScope_constant_TYPE_NODE_PATH: - -.. _class_@GlobalScope_constant_TYPE_RID: - -.. _class_@GlobalScope_constant_TYPE_OBJECT: - -.. _class_@GlobalScope_constant_TYPE_CALLABLE: - -.. _class_@GlobalScope_constant_TYPE_SIGNAL: - -.. _class_@GlobalScope_constant_TYPE_DICTIONARY: - -.. _class_@GlobalScope_constant_TYPE_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_BYTE_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_INT32_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_INT64_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT32_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT64_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_STRING_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR2_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR3_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_PACKED_COLOR_ARRAY: - -.. _class_@GlobalScope_constant_TYPE_MAX: +.. rst-class:: classref-enumeration enum **Variant.Type**: -- **TYPE_NIL** = **0** --- Variable is ``null``. +.. _class_@GlobalScope_constant_TYPE_NIL: -- **TYPE_BOOL** = **1** --- Variable is of type :ref:`bool`. +.. rst-class:: classref-enumeration-constant -- **TYPE_INT** = **2** --- Variable is of type :ref:`int`. +:ref:`Variant.Type` **TYPE_NIL** = ``0`` -- **TYPE_FLOAT** = **3** --- Variable is of type :ref:`float`. +Variable is ``null``. -- **TYPE_STRING** = **4** --- Variable is of type :ref:`String`. +.. _class_@GlobalScope_constant_TYPE_BOOL: -- **TYPE_VECTOR2** = **5** --- Variable is of type :ref:`Vector2`. +.. rst-class:: classref-enumeration-constant -- **TYPE_VECTOR2I** = **6** --- Variable is of type :ref:`Vector2i`. +:ref:`Variant.Type` **TYPE_BOOL** = ``1`` -- **TYPE_RECT2** = **7** --- Variable is of type :ref:`Rect2`. +Variable is of type :ref:`bool`. -- **TYPE_RECT2I** = **8** --- Variable is of type :ref:`Rect2i`. +.. _class_@GlobalScope_constant_TYPE_INT: -- **TYPE_VECTOR3** = **9** --- Variable is of type :ref:`Vector3`. +.. rst-class:: classref-enumeration-constant -- **TYPE_VECTOR3I** = **10** --- Variable is of type :ref:`Vector3i`. +:ref:`Variant.Type` **TYPE_INT** = ``2`` -- **TYPE_TRANSFORM2D** = **11** --- Variable is of type :ref:`Transform2D`. +Variable is of type :ref:`int`. -- **TYPE_VECTOR4** = **12** --- Variable is of type :ref:`Vector4`. +.. _class_@GlobalScope_constant_TYPE_FLOAT: -- **TYPE_VECTOR4I** = **13** --- Variable is of type :ref:`Vector4i`. +.. rst-class:: classref-enumeration-constant -- **TYPE_PLANE** = **14** --- Variable is of type :ref:`Plane`. +:ref:`Variant.Type` **TYPE_FLOAT** = ``3`` -- **TYPE_QUATERNION** = **15** --- Variable is of type :ref:`Quaternion`. +Variable is of type :ref:`float`. -- **TYPE_AABB** = **16** --- Variable is of type :ref:`AABB`. +.. _class_@GlobalScope_constant_TYPE_STRING: -- **TYPE_BASIS** = **17** --- Variable is of type :ref:`Basis`. +.. rst-class:: classref-enumeration-constant -- **TYPE_TRANSFORM3D** = **18** --- Variable is of type :ref:`Transform3D`. +:ref:`Variant.Type` **TYPE_STRING** = ``4`` -- **TYPE_PROJECTION** = **19** --- Variable is of type :ref:`Projection`. +Variable is of type :ref:`String`. -- **TYPE_COLOR** = **20** --- Variable is of type :ref:`Color`. +.. _class_@GlobalScope_constant_TYPE_VECTOR2: -- **TYPE_STRING_NAME** = **21** --- Variable is of type :ref:`StringName`. +.. rst-class:: classref-enumeration-constant -- **TYPE_NODE_PATH** = **22** --- Variable is of type :ref:`NodePath`. +:ref:`Variant.Type` **TYPE_VECTOR2** = ``5`` -- **TYPE_RID** = **23** --- Variable is of type :ref:`RID`. +Variable is of type :ref:`Vector2`. -- **TYPE_OBJECT** = **24** --- Variable is of type :ref:`Object`. +.. _class_@GlobalScope_constant_TYPE_VECTOR2I: -- **TYPE_CALLABLE** = **25** --- Variable is of type :ref:`Callable`. +.. rst-class:: classref-enumeration-constant -- **TYPE_SIGNAL** = **26** --- Variable is of type :ref:`Signal`. +:ref:`Variant.Type` **TYPE_VECTOR2I** = ``6`` -- **TYPE_DICTIONARY** = **27** --- Variable is of type :ref:`Dictionary`. +Variable is of type :ref:`Vector2i`. -- **TYPE_ARRAY** = **28** --- Variable is of type :ref:`Array`. +.. _class_@GlobalScope_constant_TYPE_RECT2: -- **TYPE_PACKED_BYTE_ARRAY** = **29** --- Variable is of type :ref:`PackedByteArray`. +.. rst-class:: classref-enumeration-constant -- **TYPE_PACKED_INT32_ARRAY** = **30** --- Variable is of type :ref:`PackedInt32Array`. +:ref:`Variant.Type` **TYPE_RECT2** = ``7`` -- **TYPE_PACKED_INT64_ARRAY** = **31** --- Variable is of type :ref:`PackedInt64Array`. +Variable is of type :ref:`Rect2`. -- **TYPE_PACKED_FLOAT32_ARRAY** = **32** --- Variable is of type :ref:`PackedFloat32Array`. +.. _class_@GlobalScope_constant_TYPE_RECT2I: -- **TYPE_PACKED_FLOAT64_ARRAY** = **33** --- Variable is of type :ref:`PackedFloat64Array`. +.. rst-class:: classref-enumeration-constant -- **TYPE_PACKED_STRING_ARRAY** = **34** --- Variable is of type :ref:`PackedStringArray`. +:ref:`Variant.Type` **TYPE_RECT2I** = ``8`` -- **TYPE_PACKED_VECTOR2_ARRAY** = **35** --- Variable is of type :ref:`PackedVector2Array`. +Variable is of type :ref:`Rect2i`. -- **TYPE_PACKED_VECTOR3_ARRAY** = **36** --- Variable is of type :ref:`PackedVector3Array`. +.. _class_@GlobalScope_constant_TYPE_VECTOR3: -- **TYPE_PACKED_COLOR_ARRAY** = **37** --- Variable is of type :ref:`PackedColorArray`. +.. rst-class:: classref-enumeration-constant -- **TYPE_MAX** = **38** --- Represents the size of the :ref:`Variant.Type` enum. +:ref:`Variant.Type` **TYPE_VECTOR3** = ``9`` + +Variable is of type :ref:`Vector3`. + +.. _class_@GlobalScope_constant_TYPE_VECTOR3I: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_VECTOR3I** = ``10`` + +Variable is of type :ref:`Vector3i`. + +.. _class_@GlobalScope_constant_TYPE_TRANSFORM2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_TRANSFORM2D** = ``11`` + +Variable is of type :ref:`Transform2D`. + +.. _class_@GlobalScope_constant_TYPE_VECTOR4: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_VECTOR4** = ``12`` + +Variable is of type :ref:`Vector4`. + +.. _class_@GlobalScope_constant_TYPE_VECTOR4I: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_VECTOR4I** = ``13`` + +Variable is of type :ref:`Vector4i`. + +.. _class_@GlobalScope_constant_TYPE_PLANE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PLANE** = ``14`` + +Variable is of type :ref:`Plane`. + +.. _class_@GlobalScope_constant_TYPE_QUATERNION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_QUATERNION** = ``15`` + +Variable is of type :ref:`Quaternion`. + +.. _class_@GlobalScope_constant_TYPE_AABB: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_AABB** = ``16`` + +Variable is of type :ref:`AABB`. + +.. _class_@GlobalScope_constant_TYPE_BASIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_BASIS** = ``17`` + +Variable is of type :ref:`Basis`. + +.. _class_@GlobalScope_constant_TYPE_TRANSFORM3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_TRANSFORM3D** = ``18`` + +Variable is of type :ref:`Transform3D`. + +.. _class_@GlobalScope_constant_TYPE_PROJECTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PROJECTION** = ``19`` + +Variable is of type :ref:`Projection`. + +.. _class_@GlobalScope_constant_TYPE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_COLOR** = ``20`` + +Variable is of type :ref:`Color`. + +.. _class_@GlobalScope_constant_TYPE_STRING_NAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_STRING_NAME** = ``21`` + +Variable is of type :ref:`StringName`. + +.. _class_@GlobalScope_constant_TYPE_NODE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_NODE_PATH** = ``22`` + +Variable is of type :ref:`NodePath`. + +.. _class_@GlobalScope_constant_TYPE_RID: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_RID** = ``23`` + +Variable is of type :ref:`RID`. + +.. _class_@GlobalScope_constant_TYPE_OBJECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_OBJECT** = ``24`` + +Variable is of type :ref:`Object`. + +.. _class_@GlobalScope_constant_TYPE_CALLABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_CALLABLE** = ``25`` + +Variable is of type :ref:`Callable`. + +.. _class_@GlobalScope_constant_TYPE_SIGNAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_SIGNAL** = ``26`` + +Variable is of type :ref:`Signal`. + +.. _class_@GlobalScope_constant_TYPE_DICTIONARY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_DICTIONARY** = ``27`` + +Variable is of type :ref:`Dictionary`. + +.. _class_@GlobalScope_constant_TYPE_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_ARRAY** = ``28`` + +Variable is of type :ref:`Array`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_BYTE_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_BYTE_ARRAY** = ``29`` + +Variable is of type :ref:`PackedByteArray`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_INT32_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_INT32_ARRAY** = ``30`` + +Variable is of type :ref:`PackedInt32Array`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_INT64_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_INT64_ARRAY** = ``31`` + +Variable is of type :ref:`PackedInt64Array`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT32_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_FLOAT32_ARRAY** = ``32`` + +Variable is of type :ref:`PackedFloat32Array`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_FLOAT64_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_FLOAT64_ARRAY** = ``33`` + +Variable is of type :ref:`PackedFloat64Array`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_STRING_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_STRING_ARRAY** = ``34`` + +Variable is of type :ref:`PackedStringArray`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR2_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_VECTOR2_ARRAY** = ``35`` + +Variable is of type :ref:`PackedVector2Array`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR3_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_VECTOR3_ARRAY** = ``36`` + +Variable is of type :ref:`PackedVector3Array`. + +.. _class_@GlobalScope_constant_TYPE_PACKED_COLOR_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_COLOR_ARRAY** = ``37`` + +Variable is of type :ref:`PackedColorArray`. + +.. _class_@GlobalScope_constant_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_MAX** = ``38`` + +Represents the size of the :ref:`Variant.Type` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_@GlobalScope_Variant.Operator: -.. _class_@GlobalScope_constant_OP_EQUAL: - -.. _class_@GlobalScope_constant_OP_NOT_EQUAL: - -.. _class_@GlobalScope_constant_OP_LESS: - -.. _class_@GlobalScope_constant_OP_LESS_EQUAL: - -.. _class_@GlobalScope_constant_OP_GREATER: - -.. _class_@GlobalScope_constant_OP_GREATER_EQUAL: - -.. _class_@GlobalScope_constant_OP_ADD: - -.. _class_@GlobalScope_constant_OP_SUBTRACT: - -.. _class_@GlobalScope_constant_OP_MULTIPLY: - -.. _class_@GlobalScope_constant_OP_DIVIDE: - -.. _class_@GlobalScope_constant_OP_NEGATE: - -.. _class_@GlobalScope_constant_OP_POSITIVE: - -.. _class_@GlobalScope_constant_OP_MODULE: - -.. _class_@GlobalScope_constant_OP_POWER: - -.. _class_@GlobalScope_constant_OP_SHIFT_LEFT: - -.. _class_@GlobalScope_constant_OP_SHIFT_RIGHT: - -.. _class_@GlobalScope_constant_OP_BIT_AND: - -.. _class_@GlobalScope_constant_OP_BIT_OR: - -.. _class_@GlobalScope_constant_OP_BIT_XOR: - -.. _class_@GlobalScope_constant_OP_BIT_NEGATE: - -.. _class_@GlobalScope_constant_OP_AND: - -.. _class_@GlobalScope_constant_OP_OR: - -.. _class_@GlobalScope_constant_OP_XOR: - -.. _class_@GlobalScope_constant_OP_NOT: - -.. _class_@GlobalScope_constant_OP_IN: - -.. _class_@GlobalScope_constant_OP_MAX: +.. rst-class:: classref-enumeration enum **Variant.Operator**: -- **OP_EQUAL** = **0** --- Equality operator (``==``). +.. _class_@GlobalScope_constant_OP_EQUAL: -- **OP_NOT_EQUAL** = **1** --- Inequality operator (``!=``). +.. rst-class:: classref-enumeration-constant -- **OP_LESS** = **2** --- Less than operator (``<``). +:ref:`Variant.Operator` **OP_EQUAL** = ``0`` -- **OP_LESS_EQUAL** = **3** --- Less than or equal operator (``<=``). +Equality operator (``==``). -- **OP_GREATER** = **4** --- Greater than operator (``>``). +.. _class_@GlobalScope_constant_OP_NOT_EQUAL: -- **OP_GREATER_EQUAL** = **5** --- Greater than or equal operator (``>=``). +.. rst-class:: classref-enumeration-constant -- **OP_ADD** = **6** --- Addition operator (``+``). +:ref:`Variant.Operator` **OP_NOT_EQUAL** = ``1`` -- **OP_SUBTRACT** = **7** --- Subtraction operator (``-``). +Inequality operator (``!=``). -- **OP_MULTIPLY** = **8** --- Multiplication operator (``*``). +.. _class_@GlobalScope_constant_OP_LESS: -- **OP_DIVIDE** = **9** --- Division operator (``/``). +.. rst-class:: classref-enumeration-constant -- **OP_NEGATE** = **10** --- Unary negation operator (``-``). +:ref:`Variant.Operator` **OP_LESS** = ``2`` -- **OP_POSITIVE** = **11** --- Unary plus operator (``+``). +Less than operator (``<``). -- **OP_MODULE** = **12** --- Remainder/modulo operator (``%``). +.. _class_@GlobalScope_constant_OP_LESS_EQUAL: -- **OP_POWER** = **13** --- Power operator (``**``). +.. rst-class:: classref-enumeration-constant -- **OP_SHIFT_LEFT** = **14** --- Left shift operator (``<<``). +:ref:`Variant.Operator` **OP_LESS_EQUAL** = ``3`` -- **OP_SHIFT_RIGHT** = **15** --- Right shift operator (``>>``). +Less than or equal operator (``<=``). -- **OP_BIT_AND** = **16** --- Bitwise AND operator (``&``). +.. _class_@GlobalScope_constant_OP_GREATER: -- **OP_BIT_OR** = **17** --- Bitwise OR operator (``|``). +.. rst-class:: classref-enumeration-constant -- **OP_BIT_XOR** = **18** --- Bitwise XOR operator (``^``). +:ref:`Variant.Operator` **OP_GREATER** = ``4`` -- **OP_BIT_NEGATE** = **19** --- Bitwise NOT operator (``~``). +Greater than operator (``>``). -- **OP_AND** = **20** --- Logical AND operator (``and`` or ``&&``). +.. _class_@GlobalScope_constant_OP_GREATER_EQUAL: -- **OP_OR** = **21** --- Logical OR operator (``or`` or ``||``). +.. rst-class:: classref-enumeration-constant -- **OP_XOR** = **22** --- Logical XOR operator (not implemented in GDScript). +:ref:`Variant.Operator` **OP_GREATER_EQUAL** = ``5`` -- **OP_NOT** = **23** --- Logical NOT operator (``not`` or ``!``). +Greater than or equal operator (``>=``). -- **OP_IN** = **24** --- Logical IN operator (``in``). +.. _class_@GlobalScope_constant_OP_ADD: -- **OP_MAX** = **25** --- Represents the size of the :ref:`Variant.Operator` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_ADD** = ``6`` + +Addition operator (``+``). + +.. _class_@GlobalScope_constant_OP_SUBTRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_SUBTRACT** = ``7`` + +Subtraction operator (``-``). + +.. _class_@GlobalScope_constant_OP_MULTIPLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_MULTIPLY** = ``8`` + +Multiplication operator (``*``). + +.. _class_@GlobalScope_constant_OP_DIVIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_DIVIDE** = ``9`` + +Division operator (``/``). + +.. _class_@GlobalScope_constant_OP_NEGATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_NEGATE** = ``10`` + +Unary negation operator (``-``). + +.. _class_@GlobalScope_constant_OP_POSITIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_POSITIVE** = ``11`` + +Unary plus operator (``+``). + +.. _class_@GlobalScope_constant_OP_MODULE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_MODULE** = ``12`` + +Remainder/modulo operator (``%``). + +.. _class_@GlobalScope_constant_OP_POWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_POWER** = ``13`` + +Power operator (``**``). + +.. _class_@GlobalScope_constant_OP_SHIFT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_SHIFT_LEFT** = ``14`` + +Left shift operator (``<<``). + +.. _class_@GlobalScope_constant_OP_SHIFT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_SHIFT_RIGHT** = ``15`` + +Right shift operator (``>>``). + +.. _class_@GlobalScope_constant_OP_BIT_AND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_BIT_AND** = ``16`` + +Bitwise AND operator (``&``). + +.. _class_@GlobalScope_constant_OP_BIT_OR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_BIT_OR** = ``17`` + +Bitwise OR operator (``|``). + +.. _class_@GlobalScope_constant_OP_BIT_XOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_BIT_XOR** = ``18`` + +Bitwise XOR operator (``^``). + +.. _class_@GlobalScope_constant_OP_BIT_NEGATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_BIT_NEGATE** = ``19`` + +Bitwise NOT operator (``~``). + +.. _class_@GlobalScope_constant_OP_AND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_AND** = ``20`` + +Logical AND operator (``and`` or ``&&``). + +.. _class_@GlobalScope_constant_OP_OR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_OR** = ``21`` + +Logical OR operator (``or`` or ``||``). + +.. _class_@GlobalScope_constant_OP_XOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_XOR** = ``22`` + +Logical XOR operator (not implemented in GDScript). + +.. _class_@GlobalScope_constant_OP_NOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_NOT** = ``23`` + +Logical NOT operator (``not`` or ``!``). + +.. _class_@GlobalScope_constant_OP_IN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_IN** = ``24`` + +Logical IN operator (``in``). + +.. _class_@GlobalScope_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Operator` **OP_MAX** = ``25`` + +Represents the size of the :ref:`Variant.Operator` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_@GlobalScope_property_AudioServer: -- :ref:`AudioServer` **AudioServer** +.. rst-class:: classref-property + +:ref:`AudioServer` **AudioServer** The :ref:`AudioServer` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_CameraServer: -- :ref:`CameraServer` **CameraServer** +.. rst-class:: classref-property + +:ref:`CameraServer` **CameraServer** The :ref:`CameraServer` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_ClassDB: -- :ref:`ClassDB` **ClassDB** +.. rst-class:: classref-property + +:ref:`ClassDB` **ClassDB** The :ref:`ClassDB` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_DisplayServer: -- :ref:`DisplayServer` **DisplayServer** +.. rst-class:: classref-property + +:ref:`DisplayServer` **DisplayServer** The :ref:`DisplayServer` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_Engine: -- :ref:`Engine` **Engine** +.. rst-class:: classref-property + +:ref:`Engine` **Engine** The :ref:`Engine` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_EngineDebugger: -- :ref:`EngineDebugger` **EngineDebugger** +.. rst-class:: classref-property + +:ref:`EngineDebugger` **EngineDebugger** The :ref:`EngineDebugger` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_Geometry2D: -- :ref:`Geometry2D` **Geometry2D** +.. rst-class:: classref-property + +:ref:`Geometry2D` **Geometry2D** The :ref:`Geometry2D` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_Geometry3D: -- :ref:`Geometry3D` **Geometry3D** +.. rst-class:: classref-property + +:ref:`Geometry3D` **Geometry3D** The :ref:`Geometry3D` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_GodotSharp: -- :ref:`GodotSharp` **GodotSharp** +.. rst-class:: classref-property + +:ref:`GodotSharp` **GodotSharp** The :ref:`GodotSharp` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_IP: -- :ref:`IP` **IP** +.. rst-class:: classref-property + +:ref:`IP` **IP** The :ref:`IP` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_Input: -- :ref:`Input` **Input** +.. rst-class:: classref-property + +:ref:`Input` **Input** The :ref:`Input` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_InputMap: -- :ref:`InputMap` **InputMap** +.. rst-class:: classref-property + +:ref:`InputMap` **InputMap** The :ref:`InputMap` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_JavaClassWrapper: -- :ref:`JavaClassWrapper` **JavaClassWrapper** +.. rst-class:: classref-property + +:ref:`JavaClassWrapper` **JavaClassWrapper** The :ref:`JavaClassWrapper` singleton. \ **Note:** Only implemented on Android. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_JavaScriptBridge: -- :ref:`JavaScriptBridge` **JavaScriptBridge** +.. rst-class:: classref-property + +:ref:`JavaScriptBridge` **JavaScriptBridge** The :ref:`JavaScriptBridge` singleton. \ **Note:** Only implemented on the Web platform. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_Marshalls: -- :ref:`Marshalls` **Marshalls** +.. rst-class:: classref-property + +:ref:`Marshalls` **Marshalls** The :ref:`Marshalls` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_NativeExtensionManager: -- :ref:`NativeExtensionManager` **NativeExtensionManager** +.. rst-class:: classref-property + +:ref:`NativeExtensionManager` **NativeExtensionManager** The :ref:`NativeExtensionManager` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_NavigationMeshGenerator: -- :ref:`NavigationMeshGenerator` **NavigationMeshGenerator** +.. rst-class:: classref-property + +:ref:`NavigationMeshGenerator` **NavigationMeshGenerator** The :ref:`NavigationMeshGenerator` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_NavigationServer2D: -- :ref:`NavigationServer2D` **NavigationServer2D** +.. rst-class:: classref-property + +:ref:`NavigationServer2D` **NavigationServer2D** The :ref:`NavigationServer2D` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_NavigationServer3D: -- :ref:`NavigationServer3D` **NavigationServer3D** +.. rst-class:: classref-property + +:ref:`NavigationServer3D` **NavigationServer3D** The :ref:`NavigationServer2D` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_OS: -- :ref:`OS` **OS** +.. rst-class:: classref-property + +:ref:`OS` **OS** The :ref:`OS` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_Performance: -- :ref:`Performance` **Performance** +.. rst-class:: classref-property + +:ref:`Performance` **Performance** The :ref:`Performance` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_PhysicsServer2D: -- :ref:`PhysicsServer2D` **PhysicsServer2D** +.. rst-class:: classref-property + +:ref:`PhysicsServer2D` **PhysicsServer2D** The :ref:`PhysicsServer2D` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_PhysicsServer2DManager: -- :ref:`PhysicsServer2DManager` **PhysicsServer2DManager** +.. rst-class:: classref-property + +:ref:`PhysicsServer2DManager` **PhysicsServer2DManager** The :ref:`PhysicsServer2DManager` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_PhysicsServer3D: -- :ref:`PhysicsServer3D` **PhysicsServer3D** +.. rst-class:: classref-property + +:ref:`PhysicsServer3D` **PhysicsServer3D** The :ref:`PhysicsServer3D` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_PhysicsServer3DManager: -- :ref:`PhysicsServer3DManager` **PhysicsServer3DManager** +.. rst-class:: classref-property + +:ref:`PhysicsServer3DManager` **PhysicsServer3DManager** The :ref:`PhysicsServer3DManager` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_ProjectSettings: -- :ref:`ProjectSettings` **ProjectSettings** +.. rst-class:: classref-property + +:ref:`ProjectSettings` **ProjectSettings** The :ref:`ProjectSettings` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_RenderingServer: -- :ref:`RenderingServer` **RenderingServer** +.. rst-class:: classref-property + +:ref:`RenderingServer` **RenderingServer** The :ref:`RenderingServer` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_ResourceLoader: -- :ref:`ResourceLoader` **ResourceLoader** +.. rst-class:: classref-property + +:ref:`ResourceLoader` **ResourceLoader** The :ref:`ResourceLoader` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_ResourceSaver: -- :ref:`ResourceSaver` **ResourceSaver** +.. rst-class:: classref-property + +:ref:`ResourceSaver` **ResourceSaver** The :ref:`ResourceSaver` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_ResourceUID: -- :ref:`ResourceUID` **ResourceUID** +.. rst-class:: classref-property + +:ref:`ResourceUID` **ResourceUID** The :ref:`ResourceUID` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_TextServerManager: -- :ref:`TextServerManager` **TextServerManager** +.. rst-class:: classref-property + +:ref:`TextServerManager` **TextServerManager** The :ref:`TextServerManager` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_ThemeDB: -- :ref:`ThemeDB` **ThemeDB** +.. rst-class:: classref-property + +:ref:`ThemeDB` **ThemeDB** The :ref:`ThemeDB` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_Time: -- :ref:`Time` **Time** +.. rst-class:: classref-property + +:ref:`Time` **Time** The :ref:`Time` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_TranslationServer: -- :ref:`TranslationServer` **TranslationServer** +.. rst-class:: classref-property + +:ref:`TranslationServer` **TranslationServer** The :ref:`TranslationServer` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_WorkerThreadPool: -- :ref:`WorkerThreadPool` **WorkerThreadPool** +.. rst-class:: classref-property + +:ref:`WorkerThreadPool` **WorkerThreadPool** The :ref:`WorkerThreadPool` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_property_XRServer: -- :ref:`XRServer` **XRServer** +.. rst-class:: classref-property + +:ref:`XRServer` **XRServer** The :ref:`XRServer` singleton. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_@GlobalScope_method_abs: -- :ref:`Variant` **abs** **(** :ref:`Variant` x **)** +.. rst-class:: classref-method -Returns the absolute value of a :ref:`Variant` parameter ``x`` (i.e. non-negative value). Variant types :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3` and :ref:`Vector3i` are supported. +:ref:`Variant` **abs** **(** :ref:`Variant` x **)** + +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`. :: @@ -3110,11 +5674,17 @@ Returns the absolute value of a :ref:`Variant` parameter ``x`` (i var f = abs(Vector3i(-7, -8, -9)) # f is (7, 8, 9) +\ **Note:** For better type safety, use :ref:`absf`, :ref:`absi`, :ref:`Vector2.abs`, :ref:`Vector2i.abs`, :ref:`Vector3.abs`, :ref:`Vector3i.abs`, :ref:`Vector4.abs`, or :ref:`Vector4i.abs`. + +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_absf: -- :ref:`float` **absf** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **absf** **(** :ref:`float` x **)** Returns the absolute value of float parameter ``x`` (i.e. positive value). @@ -3123,11 +5693,15 @@ Returns the absolute value of float parameter ``x`` (i.e. positive value). # a is 1.2 var a = absf(-1.2) +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_absi: -- :ref:`int` **absi** **(** :ref:`int` x **)** +.. rst-class:: classref-method + +:ref:`int` **absi** **(** :ref:`int` x **)** Returns the absolute value of int parameter ``x`` (i.e. positive value). @@ -3136,11 +5710,15 @@ Returns the absolute value of int parameter ``x`` (i.e. positive value). # a is 1 var a = absi(-1) +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_acos: -- :ref:`float` **acos** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **acos** **(** :ref:`float` x **)** Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` must be between ``-1.0`` and ``1.0`` (inclusive), otherwise, :ref:`acos` will return :ref:`@GDScript.NAN`. @@ -3149,11 +5727,15 @@ Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x`` # c is 0.523599 or 30 degrees if converted with rad_to_deg(c) var c = acos(0.866025) +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_asin: -- :ref:`float` **asin** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **asin** **(** :ref:`float` x **)** Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` must be between ``-1.0`` and ``1.0`` (inclusive), otherwise, :ref:`asin` will return :ref:`@GDScript.NAN`. @@ -3162,11 +5744,15 @@ Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. `` # s is 0.523599 or 30 degrees if converted with rad_to_deg(s) var s = asin(0.5) +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_atan: -- :ref:`float` **atan** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **atan** **(** :ref:`float` x **)** Returns the arc tangent of ``x`` in radians. Use it to get the angle from an angle's tangent in trigonometry. @@ -3178,11 +5764,15 @@ The method cannot know in which quadrant the angle should fall. See :ref:`atan2< If ``x`` is between ``-PI / 2`` and ``PI / 2`` (inclusive), ``atan(tan(x))`` is equal to ``x``. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_atan2: -- :ref:`float` **atan2** **(** :ref:`float` y, :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **atan2** **(** :ref:`float` y, :ref:`float` x **)** 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. @@ -3192,39 +5782,67 @@ Important note: The Y coordinate comes first, by convention. var a = atan2(0, -1) # a is 3.141593 +.. 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 **)** + +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. + +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_bezier_interpolate: -- :ref:`float` **bezier_interpolate** **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** +.. rst-class:: classref-method -Returns the point at the given ``t`` on a one-dimensional `Bezier curve `__ defined by the given ``control_1``, ``control_2``, and ``end`` points. +:ref:`float` **bezier_interpolate** **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_@GlobalScope_method_bytes_to_var: -- :ref:`Variant` **bytes_to_var** **(** :ref:`PackedByteArray` bytes **)** +.. rst-class:: classref-method + +:ref:`Variant` **bytes_to_var** **(** :ref:`PackedByteArray` bytes **)** Decodes a byte array back to a :ref:`Variant` value, without decoding objects. \ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_bytes_to_var_with_objects: -- :ref:`Variant` **bytes_to_var_with_objects** **(** :ref:`PackedByteArray` bytes **)** +.. rst-class:: classref-method + +:ref:`Variant` **bytes_to_var_with_objects** **(** :ref:`PackedByteArray` bytes **)** Decodes a byte array back to a :ref:`Variant` value. Decoding objects is allowed. \ **Warning:** Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_ceil: -- :ref:`Variant` **ceil** **(** :ref:`Variant` x **)** +.. rst-class:: classref-method + +:ref:`Variant` **ceil** **(** :ref:`Variant` x **)** 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`. @@ -3235,35 +5853,47 @@ Rounds ``x`` upward (towards positive infinity), returning the smallest whole nu See also :ref:`floor`, :ref:`round`, and :ref:`snapped`. -\ **Note:** For better type safety, see :ref:`ceilf`, :ref:`ceili`, :ref:`Vector2.ceil`, :ref:`Vector3.ceil` and :ref:`Vector4.ceil`. +\ **Note:** For better type safety, use :ref:`ceilf`, :ref:`ceili`, :ref:`Vector2.ceil`, :ref:`Vector3.ceil`, or :ref:`Vector4.ceil`. + +.. rst-class:: classref-item-separator ---- .. _class_@GlobalScope_method_ceilf: -- :ref:`float` **ceilf** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **ceilf** **(** :ref:`float` x **)** Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. A type-safe version of :ref:`ceil`, returning a :ref:`float`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_ceili: -- :ref:`int` **ceili** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`int` **ceili** **(** :ref:`float` x **)** Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. A type-safe version of :ref:`ceil`, returning an :ref:`int`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_clamp: -- :ref:`Variant` **clamp** **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** +.. rst-class:: classref-method -Clamps the ``value``, returning a :ref:`Variant` not less than ``min`` and not more than ``max``. Variant types :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3` and :ref:`Vector3i` are supported. +:ref:`Variant` **clamp** **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** + +Clamps the ``value``, returning a :ref:`Variant` not less than ``min`` and not more than ``max``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: @@ -3285,11 +5915,17 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` 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`, or :ref:`Vector4i.clamp`. + +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_clampf: -- :ref:`float` **clampf** **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** +.. rst-class:: classref-method + +:ref:`float` **clampf** **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** Clamps the ``value``, returning a :ref:`float` not less than ``min`` and not more than ``max``. @@ -3301,11 +5937,15 @@ Clamps the ``value``, returning a :ref:`float` not less than ``min` speed = -10.0 var b = clampf(speed, -1.0, 1.0) # b is -1.0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_clampi: -- :ref:`int` **clampi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** +.. rst-class:: classref-method + +:ref:`int` **clampi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** Clamps the ``value``, returning an :ref:`int` not less than ``min`` and not more than ``max``. @@ -3317,11 +5957,15 @@ Clamps the ``value``, returning an :ref:`int` not less than ``min`` a speed = -10 var b = clampi(speed, -1, 1) # b is -1 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_cos: -- :ref:`float` **cos** **(** :ref:`float` angle_rad **)** +.. rst-class:: classref-method + +:ref:`float` **cos** **(** :ref:`float` angle_rad **)** Returns the cosine of angle ``angle_rad`` in radians. @@ -3331,11 +5975,15 @@ Returns the cosine of angle ``angle_rad`` in radians. cos(PI) # Returns -1.0 cos(deg_to_rad(90)) # Returns 0.0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_cosh: -- :ref:`float` **cosh** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **cosh** **(** :ref:`float` x **)** Returns the hyperbolic cosine of ``x`` in radians. @@ -3343,55 +5991,79 @@ Returns the hyperbolic cosine of ``x`` in radians. print(cosh(1)) # Prints 1.543081 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_cubic_interpolate: -- :ref:`float` **cubic_interpolate** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** +.. rst-class:: classref-method + +:ref:`float` **cubic_interpolate** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_cubic_interpolate_angle: -- :ref:`float` **cubic_interpolate_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** +.. rst-class:: classref-method + +:ref:`float` **cubic_interpolate_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_cubic_interpolate_angle_in_time: -- :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 **)** +.. 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 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_cubic_interpolate_in_time: -- :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 **)** +.. 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 **)** Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values. It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_db_to_linear: -- :ref:`float` **db_to_linear** **(** :ref:`float` db **)** +.. rst-class:: classref-method + +:ref:`float` **db_to_linear** **(** :ref:`float` db **)** Converts from decibels to linear energy (audio). +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_deg_to_rad: -- :ref:`float` **deg_to_rad** **(** :ref:`float` deg **)** +.. rst-class:: classref-method + +:ref:`float` **deg_to_rad** **(** :ref:`float` deg **)** Converts an angle expressed in degrees to radians. @@ -3399,11 +6071,15 @@ Converts an angle expressed in degrees to radians. var r = deg_to_rad(180) # r is 3.141593 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_ease: -- :ref:`float` **ease** **(** :ref:`float` x, :ref:`float` curve **)** +.. rst-class:: classref-method + +:ref:`float` **ease** **(** :ref:`float` x, :ref:`float` curve **)** 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: @@ -3421,11 +6097,15 @@ Returns an "eased" value of ``x`` based on an easing function defined with ``cur See also :ref:`smoothstep`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_error_string: -- :ref:`String` **error_string** **(** :ref:`int` error **)** +.. rst-class:: classref-method + +:ref:`String` **error_string** **(** :ref:`int` error **)** Returns a human-readable name for the given :ref:`Error` code. @@ -3436,11 +6116,15 @@ Returns a human-readable name for the given :ref:`Error print(error_string(ERR_BUSY)) # Prints Busy print(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_exp: -- :ref:`float` **exp** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **exp** **(** :ref:`float` x **)** The natural exponential function. It raises the mathematical constant **e** to the power of ``x`` and returns it. @@ -3452,11 +6136,15 @@ For exponents to other bases use the method :ref:`pow` **floor** **(** :ref:`Variant` x **)** +.. rst-class:: classref-method + +:ref:`Variant` **floor** **(** :ref:`Variant` x **)** 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`. @@ -3467,23 +6155,31 @@ Rounds ``x`` downward (towards negative infinity), returning the largest whole n See also :ref:`ceil`, :ref:`round`, and :ref:`snapped`. -\ **Note:** For better type safety, see :ref:`floorf`, :ref:`floori`, :ref:`Vector2.floor`, :ref:`Vector3.floor` and :ref:`Vector4.floor`. +\ **Note:** For better type safety, use :ref:`floorf`, :ref:`floori`, :ref:`Vector2.floor`, :ref:`Vector3.floor`, or :ref:`Vector4.floor`. + +.. rst-class:: classref-item-separator ---- .. _class_@GlobalScope_method_floorf: -- :ref:`float` **floorf** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **floorf** **(** :ref:`float` x **)** Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. A type-safe version of :ref:`floor`, returning a :ref:`float`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_floori: -- :ref:`int` **floori** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`int` **floori** **(** :ref:`float` x **)** Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. @@ -3491,11 +6187,15 @@ A type-safe version of :ref:`floor`, returning \ **Note:** This function is *not* the same as ``int(x)``, which rounds towards 0. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_fmod: -- :ref:`float` **fmod** **(** :ref:`float` x, :ref:`float` y **)** +.. rst-class:: classref-method + +:ref:`float` **fmod** **(** :ref:`float` x, :ref:`float` y **)** Returns the floating-point remainder of ``x`` divided by ``y``, keeping the sign of ``x``. @@ -3505,11 +6205,15 @@ Returns the floating-point remainder of ``x`` divided by ``y``, keeping the sign For the integer remainder operation, use the ``%`` operator. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_fposmod: -- :ref:`float` **fposmod** **(** :ref:`float` x, :ref:`float` y **)** +.. rst-class:: classref-method + +:ref:`float` **fposmod** **(** :ref:`float` x, :ref:`float` y **)** Returns the floating-point modulus of ``x`` divided by ``y``, wrapping equally in positive and negative. @@ -3533,11 +6237,15 @@ Produces: 1.0 1.0 | 1.0 1.5 0.0 | 0.0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_hash: -- :ref:`int` **hash** **(** :ref:`Variant` variable **)** +.. rst-class:: classref-method + +:ref:`int` **hash** **(** :ref:`Variant` variable **)** Returns the integer hash of the passed ``variable``. @@ -3545,11 +6253,15 @@ Returns the integer hash of the passed ``variable``. print(hash("a")) # Prints 177670 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_instance_from_id: -- :ref:`Object` **instance_from_id** **(** :ref:`int` instance_id **)** +.. rst-class:: classref-method + +:ref:`Object` **instance_from_id** **(** :ref:`int` instance_id **)** Returns the :ref:`Object` that corresponds to ``instance_id``. All Objects have a unique instance ID. See also :ref:`Object.get_instance_id`. @@ -3561,11 +6273,15 @@ Returns the :ref:`Object` that corresponds to ``instance_id``. All var inst = instance_from_id(id) print(inst.foo) # Prints bar +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_inverse_lerp: -- :ref:`float` **inverse_lerp** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** +.. rst-class:: classref-method + +:ref:`float` **inverse_lerp** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** 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. @@ -3581,11 +6297,15 @@ Returns an interpolation or extrapolation factor considering the range specified See also :ref:`lerp`, which performs the reverse of this operation, and :ref:`remap` to map a continuous series of values to another. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`float` a, :ref:`float` b **)** +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`float` a, :ref:`float` b **)** Returns ``true`` if ``a`` and ``b`` are approximately equal to each other. @@ -3593,65 +6313,93 @@ Here, "approximately equal" means that ``a`` and ``b`` are within a small intern Infinity values of the same sign are considered equal. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_is_finite: -- :ref:`bool` **is_finite** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** :ref:`float` x **)** Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN`, positive infinity, or negative infinity. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_is_inf: -- :ref:`bool` **is_inf** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`bool` **is_inf** **(** :ref:`float` x **)** Returns ``true`` if ``x`` is either positive infinity or negative infinity. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_is_instance_id_valid: -- :ref:`bool` **is_instance_id_valid** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +:ref:`bool` **is_instance_id_valid** **(** :ref:`int` id **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_is_instance_valid: -- :ref:`bool` **is_instance_valid** **(** :ref:`Variant` instance **)** +.. rst-class:: classref-method + +:ref:`bool` **is_instance_valid** **(** :ref:`Variant` instance **)** Returns ``true`` if ``instance`` is a valid Object (e.g. has not been deleted from memory). +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_is_nan: -- :ref:`bool` **is_nan** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`bool` **is_nan** **(** :ref:`float` x **)** Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_is_zero_approx: -- :ref:`bool` **is_zero_approx** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`bool` **is_zero_approx** **(** :ref:`float` x **)** Returns ``true`` if ``x`` is zero or almost zero. This function is faster than using :ref:`is_equal_approx` with one value as zero. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_lerp: -- :ref:`Variant` **lerp** **(** :ref:`Variant` from, :ref:`Variant` to, :ref:`Variant` weight **)** +.. rst-class:: classref-method + +:ref:`Variant` **lerp** **(** :ref:`Variant` from, :ref:`Variant` to, :ref:`Variant` weight **)** 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. -Both ``from`` and ``to`` must be the same type. Supported types: :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Color`, :ref:`Quaternion`, :ref:`Basis`. +Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Color`, :ref:`Quaternion`, :ref:`Basis`. :: @@ -3661,11 +6409,15 @@ See also :ref:`inverse_lerp` which perfo \ **Note:** For better type safety, use :ref:`lerpf`, :ref:`Vector2.lerp`, :ref:`Vector3.lerp`, :ref:`Vector4.lerp`, :ref:`Color.lerp`, :ref:`Quaternion.slerp` or :ref:`Basis.slerp`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_lerp_angle: -- :ref:`float` **lerp_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** +.. rst-class:: classref-method + +:ref:`float` **lerp_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** Linearly interpolates between two angles (in radians) by a ``weight`` value between 0.0 and 1.0. @@ -3683,11 +6435,15 @@ Similar to :ref:`lerp`, but interpolates correct \ **Note:** This function lerps through the shortest path between ``from`` and ``to``. However, when these two angles are approximately ``PI + k * TAU`` apart for any integer ``k``, it's not obvious which way they lerp due to floating-point precision errors. For example, ``lerp_angle(0, PI, weight)`` lerps counter-clockwise, while ``lerp_angle(0, PI + 5 * TAU, weight)`` lerps clockwise. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_lerpf: -- :ref:`float` **lerpf** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** +.. rst-class:: classref-method + +:ref:`float` **lerpf** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** 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. @@ -3697,11 +6453,15 @@ Linearly interpolates between two values by the factor defined in ``weight``. To See also :ref:`inverse_lerp` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_linear_to_db: -- :ref:`float` **linear_to_db** **(** :ref:`float` lin **)** +.. rst-class:: classref-method + +:ref:`float` **linear_to_db** **(** :ref:`float` lin **)** Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). @@ -3714,11 +6474,15 @@ Converts from linear energy to decibels (audio). This can be used to implement v # Change the bus name if you'd like to change the volume of a specific bus only. AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value)) +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_log: -- :ref:`float` **log** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **log** **(** :ref:`float` x **)** Returns the natural logarithm of ``x``. This is the amount of time needed to reach a certain level of continuous growth. @@ -3730,11 +6494,15 @@ Returns the natural logarithm of ``x``. This is the amount of time needed to rea \ **Note:** The logarithm of ``0`` returns ``-inf``, while negative values return ``-nan``. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_max: -- :ref:`Variant` **max** **(** ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Variant` **max** **(** ... **)** |vararg| Returns the maximum of the given values. This function can take any number of arguments. @@ -3742,11 +6510,15 @@ Returns the maximum of the given values. This function can take any number of ar max(1, 7, 3, -6, 5) # Returns 7 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_maxf: -- :ref:`float` **maxf** **(** :ref:`float` a, :ref:`float` b **)** +.. rst-class:: classref-method + +:ref:`float` **maxf** **(** :ref:`float` a, :ref:`float` b **)** Returns the maximum of two :ref:`float` values. @@ -3755,11 +6527,15 @@ Returns the maximum of two :ref:`float` values. maxf(3.6, 24) # Returns 24.0 maxf(-3.99, -4) # Returns -3.99 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_maxi: -- :ref:`int` **maxi** **(** :ref:`int` a, :ref:`int` b **)** +.. rst-class:: classref-method + +:ref:`int` **maxi** **(** :ref:`int` a, :ref:`int` b **)** Returns the maximum of two :ref:`int` values. @@ -3768,11 +6544,15 @@ Returns the maximum of two :ref:`int` values. maxi(1, 2) # Returns 2 maxi(-3, -4) # Returns -3 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_min: -- :ref:`Variant` **min** **(** ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Variant` **min** **(** ... **)** |vararg| Returns the minimum of the given values. This function can take any number of arguments. @@ -3780,11 +6560,15 @@ Returns the minimum of the given values. This function can take any number of ar min(1, 7, 3, -6, 5) # Returns -6 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_minf: -- :ref:`float` **minf** **(** :ref:`float` a, :ref:`float` b **)** +.. rst-class:: classref-method + +:ref:`float` **minf** **(** :ref:`float` a, :ref:`float` b **)** Returns the minimum of two :ref:`float` values. @@ -3793,11 +6577,15 @@ Returns the minimum of two :ref:`float` values. minf(3.6, 24) # Returns 3.6 minf(-3.99, -4) # Returns -4.0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_mini: -- :ref:`int` **mini** **(** :ref:`int` a, :ref:`int` b **)** +.. rst-class:: classref-method + +:ref:`int` **mini** **(** :ref:`int` a, :ref:`int` b **)** Returns the minimum of two :ref:`int` values. @@ -3806,11 +6594,15 @@ Returns the minimum of two :ref:`int` values. mini(1, 2) # Returns 1 mini(-3, -4) # Returns -4 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_move_toward: -- :ref:`float` **move_toward** **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** +.. rst-class:: classref-method + +:ref:`float` **move_toward** **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** Moves ``from`` toward ``to`` by the ``delta`` value. @@ -3822,11 +6614,15 @@ Use a negative ``delta`` value to move away. move_toward(10, 5, 4) # Returns 6 move_toward(10, 5, -1.5) # Returns 11.5 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_nearest_po2: -- :ref:`int` **nearest_po2** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`int` **nearest_po2** **(** :ref:`int` value **)** Returns the nearest equal or larger power of 2 for the integer ``value``. @@ -3843,11 +6639,15 @@ In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such th \ **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). +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_pingpong: -- :ref:`float` **pingpong** **(** :ref:`float` value, :ref:`float` length **)** +.. rst-class:: classref-method + +:ref:`float` **pingpong** **(** :ref:`float` value, :ref:`float` length **)** 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. @@ -3864,11 +6664,15 @@ Wraps ``value`` between ``0`` and the ``length``. If the limit is reached, the n pingpong(5.0, 3.0) # Returns 1.0 pingpong(6.0, 3.0) # Returns 0.0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_posmod: -- :ref:`int` **posmod** **(** :ref:`int` x, :ref:`int` y **)** +.. rst-class:: classref-method + +:ref:`int` **posmod** **(** :ref:`int` x, :ref:`int` y **)** Returns the integer modulus of ``x`` divided by ``y`` that wraps equally in positive and negative. @@ -3891,11 +6695,15 @@ Produces: 2 2 | 2 3 0 | 0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_pow: -- :ref:`float` **pow** **(** :ref:`float` base, :ref:`float` exp **)** +.. rst-class:: classref-method + +:ref:`float` **pow** **(** :ref:`float` base, :ref:`float` exp **)** Returns the result of ``base`` raised to the power of ``exp``. @@ -3905,11 +6713,15 @@ In GDScript, this is the equivalent of the ``**`` operator. pow(2, 5) # Returns 32 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_print: -- void **print** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **print** **(** ... **)** |vararg| Converts one or more arguments of any type to string in the best way possible and prints them to the console. @@ -3920,11 +6732,15 @@ Converts one or more arguments of any type to string in the best way possible an \ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_print_rich: -- void **print_rich** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **print_rich** **(** ... **)** |vararg| Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as ``red``, *not* hexadecimal color codes. Unsupported tags will be left as-is in standard output. @@ -3936,19 +6752,27 @@ When printing to standard output, the supported subset of BBCode is converted to \ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_print_verbose: -- void **print_verbose** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **print_verbose** **(** ... **)** |vararg| 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. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_printerr: -- void **printerr** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **printerr** **(** ... **)** |vararg| Prints one or more arguments to strings in the best way possible to standard error line. @@ -3956,28 +6780,34 @@ Prints one or more arguments to strings in the best way possible to standard err printerr("prints to stderr") +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_printraw: -- void **printraw** **(** ... **)** |vararg| +.. rst-class:: classref-method -Prints one or more arguments to strings in the best way possible to console. Unlike :ref:`print`, no newline is automatically added at the end. +void **printraw** **(** ... **)** |vararg| + +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. :: printraw("A") printraw("B") printraw("C") - # Prints ABC + # Prints ABC to terminal -\ **Note:** Due to limitations with Godot's built-in console, this only prints to the terminal. If you need to print in the editor, use another method, such as :ref:`print`. +.. rst-class:: classref-item-separator ---- .. _class_@GlobalScope_method_prints: -- void **prints** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **prints** **(** ... **)** |vararg| Prints one or more arguments to the console with a space between each argument. @@ -3985,11 +6815,15 @@ Prints one or more arguments to the console with a space between each argument. prints("A", "B", "C") # Prints A B C +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_printt: -- void **printt** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **printt** **(** ... **)** |vararg| Prints one or more arguments to the console with a tab between each argument. @@ -3997,11 +6831,15 @@ Prints one or more arguments to the console with a tab between each argument. printt("A", "B", "C") # Prints A B C +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_push_error: -- void **push_error** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **push_error** **(** ... **)** |vararg| Pushes an error message to Godot's built-in debugger and to the OS terminal. @@ -4011,11 +6849,15 @@ Pushes an error message to Godot's built-in debugger and to the OS terminal. \ **Note:** This function does not pause project execution. To print an error message and pause project execution in debug builds, use ``assert(false, "test error")`` instead. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_push_warning: -- void **push_warning** **(** ... **)** |vararg| +.. rst-class:: classref-method + +void **push_warning** **(** ... **)** |vararg| Pushes a warning message to Godot's built-in debugger and to the OS terminal. @@ -4023,11 +6865,15 @@ Pushes a warning message to Godot's built-in debugger and to the OS terminal. push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_rad_to_deg: -- :ref:`float` **rad_to_deg** **(** :ref:`float` rad **)** +.. rst-class:: classref-method + +:ref:`float` **rad_to_deg** **(** :ref:`float` rad **)** Converts an angle expressed in radians to degrees. @@ -4037,11 +6883,15 @@ Converts an angle expressed in radians to degrees. rad_to_deg(PI) # Returns 180 rad_to_deg(PI * 2) # Returns 360 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_rand_from_seed: -- :ref:`PackedInt64Array` **rand_from_seed** **(** :ref:`int` seed **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **rand_from_seed** **(** :ref:`int` seed **)** 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. @@ -4054,11 +6904,15 @@ Given a ``seed``, returns a :ref:`PackedInt64Array` of s print(a[0]) # Prints 2879024997 print(a[1]) # Prints 4 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_randf: -- :ref:`float` **randf** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **randf** **(** **)** Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive). @@ -4066,11 +6920,15 @@ Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive). randf() # Returns e.g. 0.375671 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_randf_range: -- :ref:`float` **randf_range** **(** :ref:`float` from, :ref:`float` to **)** +.. rst-class:: classref-method + +:ref:`float` **randf_range** **(** :ref:`float` from, :ref:`float` to **)** Returns a random floating point value between ``from`` and ``to`` (inclusive). @@ -4079,19 +6937,27 @@ Returns a random floating point value between ``from`` and ``to`` (inclusive). randf_range(0, 20.5) # Returns e.g. 7.45315 randf_range(-10, 10) # Returns e.g. -3.844535 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_randfn: -- :ref:`float` **randfn** **(** :ref:`float` mean, :ref:`float` deviation **)** +.. rst-class:: classref-method + +:ref:`float` **randfn** **(** :ref:`float` mean, :ref:`float` deviation **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_randi: -- :ref:`int` **randi** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **randi** **(** **)** 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). @@ -4102,11 +6968,15 @@ Returns a random unsigned 32-bit integer. Use remainder to obtain a random value randi() % 100 # Returns random integer between 0 and 99 randi() % 100 + 1 # Returns random integer between 1 and 100 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_randi_range: -- :ref:`int` **randi_range** **(** :ref:`int` from, :ref:`int` to **)** +.. rst-class:: classref-method + +:ref:`int` **randi_range** **(** :ref:`int` from, :ref:`int` to **)** Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). If ``to`` is lesser than ``from``, they are swapped. @@ -4115,21 +6985,29 @@ Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). randi_range(0, 1) # Returns either 0 or 1 randi_range(-10, 1000) # Returns random integer between -10 and 1000 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_randomize: -- void **randomize** **(** **)** +.. rst-class:: classref-method + +void **randomize** **(** **)** Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time. \ **Note:** This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use :ref:`seed` to initialize the random number generator. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_remap: -- :ref:`float` **remap** **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** +.. rst-class:: classref-method + +:ref:`float` **remap** **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** 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. @@ -4139,27 +7017,39 @@ 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. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_rid_allocate_id: -- :ref:`int` **rid_allocate_id** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **rid_allocate_id** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_rid_from_int64: -- :ref:`RID` **rid_from_int64** **(** :ref:`int` base **)** +.. rst-class:: classref-method + +:ref:`RID` **rid_from_int64** **(** :ref:`int` base **)** Creates a RID from a ``base``. This is used mainly from native extensions to build servers. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_round: -- :ref:`Variant` **round** **(** :ref:`Variant` x **)** +.. rst-class:: classref-method + +:ref:`Variant` **round** **(** :ref:`Variant` x **)** 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`. @@ -4171,33 +7061,45 @@ Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0 See also :ref:`floor`, :ref:`ceil`, and :ref:`snapped`. -\ **Note:** For better type safety, use :ref:`roundf`, :ref:`roundi`, :ref:`Vector2.round`, :ref:`Vector3.round` or :ref:`Vector4.round`, instead. +\ **Note:** For better type safety, use :ref:`roundf`, :ref:`roundi`, :ref:`Vector2.round`, :ref:`Vector3.round`, or :ref:`Vector4.round`. + +.. rst-class:: classref-item-separator ---- .. _class_@GlobalScope_method_roundf: -- :ref:`float` **roundf** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **roundf** **(** :ref:`float` x **)** Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. A type-safe version of :ref:`round`, returning a :ref:`float`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_roundi: -- :ref:`int` **roundi** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`int` **roundi** **(** :ref:`float` x **)** Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. A type-safe version of :ref:`round`, returning an :ref:`int`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_seed: -- void **seed** **(** :ref:`int` base **)** +.. rst-class:: classref-method + +void **seed** **(** :ref:`int` base **)** Sets the seed for the random number generator to ``base``. Setting the seed manually can ensure consistent, repeatable results for most random functions. @@ -4210,13 +7112,17 @@ Sets the seed for the random number generator to ``base``. Setting the seed manu var b = randf() + randi() # a and b are now identical +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_sign: -- :ref:`Variant` **sign** **(** :ref:`Variant` x **)** +.. rst-class:: classref-method -Returns the sign of ``x`` as same type of :ref:`Variant` as ``x`` with each component being -1, 0 and 1 for each negative, zero and positive values respectively. Variant types :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3` and :ref:`Vector3i` are supported. +:ref:`Variant` **sign** **(** :ref:`Variant` x **)** + +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`. :: @@ -4224,15 +7130,21 @@ Returns the sign of ``x`` as same type of :ref:`Variant` as ``x`` sign(0.0) # Returns 0 sign(6.0) # Returns 1 - sign(Vector3(-6.0, 0.0, 6.0) # Returns (-1, 0, 1) + sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1) + +\ **Note:** For better type safety, use :ref:`signf`, :ref:`signi`, :ref:`Vector2.sign`, :ref:`Vector2i.sign`, :ref:`Vector3.sign`, :ref:`Vector3i.sign`, :ref:`Vector4.sign`, or :ref:`Vector4i.sign`. + +.. rst-class:: classref-item-separator ---- .. _class_@GlobalScope_method_signf: -- :ref:`float` **signf** **(** :ref:`float` x **)** +.. rst-class:: classref-method -Returns the sign of ``x`` as a :ref:`float`: -1.0 or 1.0. Returns 0.0 if ``x`` is 0.0. +:ref:`float` **signf** **(** :ref:`float` x **)** + +Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` if if ``x`` is zero. :: @@ -4240,13 +7152,17 @@ Returns the sign of ``x`` as a :ref:`float`: -1.0 or 1.0. Returns 0 sign(0.0) # Returns 0.0 sign(6.5) # Returns 1.0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_signi: -- :ref:`int` **signi** **(** :ref:`int` x **)** +.. rst-class:: classref-method -Returns the sign of ``x`` as an :ref:`int`: -1 or 1. Returns 0 if ``x`` is 0. +:ref:`int` **signi** **(** :ref:`int` x **)** + +Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if ``x`` is zero. :: @@ -4254,11 +7170,15 @@ Returns the sign of ``x`` as an :ref:`int`: -1 or 1. Returns 0 if ``x sign(0) # Returns 0 sign(6) # Returns 1 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_sin: -- :ref:`float` **sin** **(** :ref:`float` angle_rad **)** +.. rst-class:: classref-method + +:ref:`float` **sin** **(** :ref:`float` angle_rad **)** Returns the sine of angle ``angle_rad`` in radians. @@ -4267,11 +7187,15 @@ Returns the sine of angle ``angle_rad`` in radians. sin(0.523599) # Returns 0.5 sin(deg_to_rad(90)) # Returns 1.0 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_sinh: -- :ref:`float` **sinh** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **sinh** **(** :ref:`float` x **)** Returns the hyperbolic sine of ``x``. @@ -4280,11 +7204,15 @@ Returns the hyperbolic sine of ``x``. var a = log(2.0) # Returns 0.693147 sinh(a) # Returns 0.75 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_smoothstep: -- :ref:`float` **smoothstep** **(** :ref:`float` from, :ref:`float` to, :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **smoothstep** **(** :ref:`float` from, :ref:`float` to, :ref:`float` x **)** 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``. @@ -4303,26 +7231,78 @@ Compared to :ref:`ease` with a curve value of `` \ `Comparison between smoothstep() and ease(x, -1.6521) return values `__ +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_snapped: -- :ref:`float` **snapped** **(** :ref:`float` x, :ref:`float` step **)** +.. rst-class:: classref-method -Snaps the float value ``x`` to a given ``step``. This can also be used to round a floating point number to an arbitrary number of decimals. +:ref:`Variant` **snapped** **(** :ref:`Variant` x, :ref:`Variant` step **)** + +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`. :: - snapped(100, 32) # Returns 96 - snapped(3.14159, 0.01) # Returns 3.14 + snapped(100, 32) # Returns 96 + snapped(3.14159, 0.01) # Returns 3.14 + + snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72) See also :ref:`ceil`, :ref:`floor`, and :ref:`round`. +\ **Note:** For better type safety, use :ref:`snappedf`, :ref:`snappedi`, :ref:`Vector2.snapped`, :ref:`Vector2i.snapped`, :ref:`Vector3.snapped`, :ref:`Vector3i.snapped`, :ref:`Vector4.snapped`, or :ref:`Vector4i.snapped`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_snappedf: + +.. rst-class:: classref-method + +:ref:`float` **snappedf** **(** :ref:`float` x, :ref:`float` step **)** + +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`. + +:: + + snapped(32.0, 2.5) # Returns 32.5 + snapped(3.14159, 0.01) # Returns 3.14 + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_snappedi: + +.. rst-class:: classref-method + +:ref:`int` **snappedi** **(** :ref:`float` x, :ref:`int` step **)** + +Returns the multiple of ``step`` that is the closest to ``x``. + +A type-safe version of :ref:`snapped`, returning an :ref:`int`. + +:: + + snapped(53, 16) # Returns 48 + snapped(4096, 100) # Returns 4100 + +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_sqrt: -- :ref:`float` **sqrt** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **sqrt** **(** :ref:`float` x **)** Returns the square root of ``x``, where ``x`` is a non-negative number. @@ -4334,11 +7314,15 @@ Returns the square root of ``x``, where ``x`` is a non-negative number. \ **Note:** Negative values of ``x`` return NaN ("Not a Number"). in C#, if you need negative inputs, use ``System.Numerics.Complex``. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_step_decimals: -- :ref:`int` **step_decimals** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`int` **step_decimals** **(** :ref:`float` x **)** 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. @@ -4348,19 +7332,27 @@ Returns the position of the first non-zero digit, after the decimal point. Note n = step_decimals(1.0005) # n is 4 n = step_decimals(0.000000005) # n is 9 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_str: -- :ref:`String` **str** **(** ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`String` **str** **(** ... **)** |vararg| Converts one or more arguments of any :ref:`Variant` type to :ref:`String` in the best way possible. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_str_to_var: -- :ref:`Variant` **str_to_var** **(** :ref:`String` string **)** +.. rst-class:: classref-method + +:ref:`Variant` **str_to_var** **(** :ref:`String` string **)** Converts a formatted ``string`` that was returned by :ref:`var_to_str` to the original :ref:`Variant`. @@ -4370,11 +7362,15 @@ Converts a formatted ``string`` that was returned by :ref:`var_to_str` **tan** **(** :ref:`float` angle_rad **)** +.. rst-class:: classref-method + +:ref:`float` **tan** **(** :ref:`float` angle_rad **)** Returns the tangent of angle ``angle_rad`` in radians. @@ -4382,11 +7378,15 @@ Returns the tangent of angle ``angle_rad`` in radians. tan(deg_to_rad(45)) # Returns 1 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_tanh: -- :ref:`float` **tanh** **(** :ref:`float` x **)** +.. rst-class:: classref-method + +:ref:`float` **tanh** **(** :ref:`float` x **)** Returns the hyperbolic tangent of ``x``. @@ -4395,11 +7395,15 @@ Returns the hyperbolic tangent of ``x``. var a = log(2.0) # Returns 0.693147 tanh(a) # Returns 0.6 +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_typeof: -- :ref:`int` **typeof** **(** :ref:`Variant` variable **)** +.. rst-class:: classref-method + +:ref:`int` **typeof** **(** :ref:`Variant` variable **)** Returns the internal type of the given ``variable``, using the :ref:`Variant.Type` values. @@ -4413,29 +7417,41 @@ Returns the internal type of the given ``variable``, using the :ref:`Variant.Typ else: print("Unexpected result") +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_var_to_bytes: -- :ref:`PackedByteArray` **var_to_bytes** **(** :ref:`Variant` variable **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **var_to_bytes** **(** :ref:`Variant` variable **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_var_to_bytes_with_objects: -- :ref:`PackedByteArray` **var_to_bytes_with_objects** **(** :ref:`Variant` variable **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **var_to_bytes_with_objects** **(** :ref:`Variant` variable **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_var_to_str: -- :ref:`String` **var_to_str** **(** :ref:`Variant` variable **)** +.. rst-class:: classref-method + +:ref:`String` **var_to_str** **(** :ref:`Variant` variable **)** Converts a :ref:`Variant` ``variable`` to a formatted :ref:`String` that can then be parsed using :ref:`str_to_var`. @@ -4453,21 +7469,29 @@ Prints: "b": 2 } +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_weakref: -- :ref:`Variant` **weakref** **(** :ref:`Variant` obj **)** +.. rst-class:: classref-method + +:ref:`Variant` **weakref** **(** :ref:`Variant` obj **)** Returns a weak reference to an object, or ``null`` if ``obj`` is invalid. 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. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_wrap: -- :ref:`Variant` **wrap** **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** +.. rst-class:: classref-method + +:ref:`Variant` **wrap** **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** Wraps the :ref:`Variant` ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. @@ -4484,11 +7508,15 @@ Variant types :ref:`int` and :ref:`float` are supported. var a = wrap(10.5, 5, 10) # a is 5.5 (float) +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_wrapf: -- :ref:`float` **wrapf** **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** +.. rst-class:: classref-method + +:ref:`float` **wrapf** **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. @@ -4511,11 +7539,15 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating \ ``wrapf`` is more flexible than using the :ref:`fposmod` approach by giving the user control over the minimum value. +.. rst-class:: classref-item-separator + ---- .. _class_@GlobalScope_method_wrapi: -- :ref:`int` **wrapi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** +.. rst-class:: classref-method + +:ref:`int` **wrapi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index c2d8feb6d..7a51d7da8 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -12,16 +12,20 @@ AABB Axis-Aligned Bounding Box. +.. rst-class:: classref-introduction-group + Description ----------- -``AABB`` consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +**AABB** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. -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`. 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:** Unlike :ref:`Rect2`, ``AABB`` does not have a variant that uses integer coordinates. +\ **Note:** Unlike :ref:`Rect2`, **AABB** does not have a variant that uses integer coordinates. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -32,178 +36,234 @@ Tutorials - :doc:`Advanced vector math <../tutorials/math/vectors_advanced>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-----------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`end` | ``Vector3(0, 0, 0)`` | -+-------------------------------+-----------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | -+-------------------------------+-----------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`size` | ``Vector3(0, 0, 0)`` | -+-------------------------------+-----------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`end` | ``Vector3(0, 0, 0)`` | + +-------------------------------+-----------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | + +-------------------------------+-----------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`size` | ``Vector3(0, 0, 0)`` | + +-------------------------------+-----------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`AABB` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`AABB` **(** :ref:`AABB` from **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`AABB` **(** :ref:`Vector3` position, :ref:`Vector3` size **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`AABB` **(** **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`AABB` **(** :ref:`AABB` from **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`AABB` **(** :ref:`Vector3` position, :ref:`Vector3` size **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+---------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`AABB` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`AABB` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`AABB` right **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`AABB` right **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AABB_property_end: -- :ref:`Vector3` **end** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ +:ref:`Vector3` **end** = ``Vector3(0, 0, 0)`` Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +.. rst-class:: classref-item-separator + ---- .. _class_AABB_property_position: -- :ref:`Vector3` **position** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ +:ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` Beginning corner. Typically has values lower than :ref:`end`. +.. rst-class:: classref-item-separator + ---- .. _class_AABB_property_size: -- :ref:`Vector3` **size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ +:ref:`Vector3` **size** = ``Vector3(0, 0, 0)`` Size from :ref:`position` to :ref:`end`. Typically, all components are positive. If the size is negative, you can use :ref:`abs` to fix it. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_AABB_constructor_AABB: -- :ref:`AABB` **AABB** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``AABB`` with default (zero) values of :ref:`position` and :ref:`size`. +:ref:`AABB` **AABB** **(** **)** + +Constructs a default-initialized **AABB** with default (zero) values of :ref:`position` and :ref:`size`. + +.. rst-class:: classref-item-separator ---- -- :ref:`AABB` **AABB** **(** :ref:`AABB` from **)** +.. rst-class:: classref-constructor -Constructs an ``AABB`` as a copy of the given ``AABB``. +:ref:`AABB` **AABB** **(** :ref:`AABB` from **)** + +Constructs an **AABB** as a copy of the given **AABB**. + +.. rst-class:: classref-item-separator ---- -- :ref:`AABB` **AABB** **(** :ref:`Vector3` position, :ref:`Vector3` size **)** +.. rst-class:: classref-constructor -Constructs an ``AABB`` from a position and size. +:ref:`AABB` **AABB** **(** :ref:`Vector3` position, :ref:`Vector3` size **)** + +Constructs an **AABB** from a position and size. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AABB_method_abs: -- :ref:`AABB` **abs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **abs** **(** **)** |const| Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive. +.. rst-class:: classref-item-separator + ---- .. _class_AABB_method_encloses: -- :ref:`bool` **encloses** **(** :ref:`AABB` with **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``AABB`` completely encloses another one. +:ref:`bool` **encloses** **(** :ref:`AABB` with **)** |const| + +Returns ``true`` if this **AABB** completely encloses another one. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_expand: -- :ref:`AABB` **expand** **(** :ref:`Vector3` to_point **)** |const| +.. rst-class:: classref-method -Returns a copy of this ``AABB`` expanded to include a given point. +:ref:`AABB` **expand** **(** :ref:`Vector3` to_point **)** |const| + +Returns a copy of this **AABB** expanded to include a given point. \ **Example:**\ @@ -226,208 +286,312 @@ Returns a copy of this ``AABB`` expanded to include a given point. +.. rst-class:: classref-item-separator + ---- .. _class_AABB_method_get_center: -- :ref:`Vector3` **get_center** **(** **)** |const| +.. rst-class:: classref-method -Returns the center of the ``AABB``, which is equal to :ref:`position` + (:ref:`size` / 2). +:ref:`Vector3` **get_center** **(** **)** |const| + +Returns the center of the **AABB**, which is equal to :ref:`position` + (:ref:`size` / 2). + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_endpoint: -- :ref:`Vector3` **get_endpoint** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method -Gets the position of the 8 endpoints of the ``AABB`` in space. +:ref:`Vector3` **get_endpoint** **(** :ref:`int` idx **)** |const| + +Gets the position of the 8 endpoints of the **AABB** in space. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_longest_axis: -- :ref:`Vector3` **get_longest_axis** **(** **)** |const| +.. rst-class:: classref-method -Returns the normalized longest axis of the ``AABB``. +:ref:`Vector3` **get_longest_axis** **(** **)** |const| + +Returns the normalized longest axis of the **AABB**. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_longest_axis_index: -- :ref:`int` **get_longest_axis_index** **(** **)** |const| +.. rst-class:: classref-method -Returns the index of the longest axis of the ``AABB`` (according to :ref:`Vector3`'s ``AXIS_*`` constants). +:ref:`int` **get_longest_axis_index** **(** **)** |const| + +Returns the index of the longest axis of the **AABB** (according to :ref:`Vector3`'s ``AXIS_*`` constants). + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_longest_axis_size: -- :ref:`float` **get_longest_axis_size** **(** **)** |const| +.. rst-class:: classref-method -Returns the scalar length of the longest axis of the ``AABB``. +:ref:`float` **get_longest_axis_size** **(** **)** |const| + +Returns the scalar length of the longest axis of the **AABB**. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_shortest_axis: -- :ref:`Vector3` **get_shortest_axis** **(** **)** |const| +.. rst-class:: classref-method -Returns the normalized shortest axis of the ``AABB``. +:ref:`Vector3` **get_shortest_axis** **(** **)** |const| + +Returns the normalized shortest axis of the **AABB**. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_shortest_axis_index: -- :ref:`int` **get_shortest_axis_index** **(** **)** |const| +.. rst-class:: classref-method -Returns the index of the shortest axis of the ``AABB`` (according to :ref:`Vector3`::AXIS\* enum). +:ref:`int` **get_shortest_axis_index** **(** **)** |const| + +Returns the index of the shortest axis of the **AABB** (according to :ref:`Vector3`::AXIS\* enum). + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_shortest_axis_size: -- :ref:`float` **get_shortest_axis_size** **(** **)** |const| +.. rst-class:: classref-method -Returns the scalar length of the shortest axis of the ``AABB``. +:ref:`float` **get_shortest_axis_size** **(** **)** |const| + +Returns the scalar length of the shortest axis of the **AABB**. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_get_support: -- :ref:`Vector3` **get_support** **(** :ref:`Vector3` dir **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_support** **(** :ref:`Vector3` dir **)** |const| Returns the support point in a given direction. This is useful for collision detection algorithms. +.. rst-class:: classref-item-separator + ---- .. _class_AABB_method_get_volume: -- :ref:`float` **get_volume** **(** **)** |const| +.. rst-class:: classref-method -Returns the volume of the ``AABB``. +:ref:`float` **get_volume** **(** **)** |const| + +Returns the volume of the **AABB**. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_grow: -- :ref:`AABB` **grow** **(** :ref:`float` by **)** |const| +.. rst-class:: classref-method -Returns a copy of the ``AABB`` grown a given number of units towards all the sides. +:ref:`AABB` **grow** **(** :ref:`float` by **)** |const| + +Returns a copy of the **AABB** grown a given number of units towards all the sides. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_has_point: -- :ref:`bool` **has_point** **(** :ref:`Vector3` point **)** |const| +.. rst-class:: classref-method -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. +:ref:`bool` **has_point** **(** :ref:`Vector3` point **)** |const| -\ **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. +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. + +\ **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. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_has_surface: -- :ref:`bool` **has_surface** **(** **)** |const| +.. rst-class:: classref-method -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). +:ref:`bool` **has_surface** **(** **)** |const| + +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). + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_has_volume: -- :ref:`bool` **has_volume** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``AABB`` has a volume, and ``false`` if the ``AABB`` is flat, empty, or has a negative :ref:`size`. +:ref:`bool` **has_volume** **(** **)** |const| + +Returns ``true`` if the **AABB** has a volume, and ``false`` if the **AABB** is flat, empty, or has a negative :ref:`size`. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_intersection: -- :ref:`AABB` **intersection** **(** :ref:`AABB` with **)** |const| +.. rst-class:: classref-method -Returns the intersection between two ``AABB``. An empty AABB (size ``(0, 0, 0)``) is returned on failure. +:ref:`AABB` **intersection** **(** :ref:`AABB` with **)** |const| + +Returns the intersection between two **AABB**. An empty AABB (size ``(0, 0, 0)``) is returned on failure. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_intersects: -- :ref:`bool` **intersects** **(** :ref:`AABB` with **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``AABB`` overlaps with another. +:ref:`bool` **intersects** **(** :ref:`AABB` with **)** |const| + +Returns ``true`` if the **AABB** overlaps with another. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_intersects_plane: -- :ref:`bool` **intersects_plane** **(** :ref:`Plane` plane **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``AABB`` is on both sides of a plane. +:ref:`bool` **intersects_plane** **(** :ref:`Plane` plane **)** |const| + +Returns ``true`` if the **AABB** is on both sides of a plane. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_intersects_ray: -- :ref:`Variant` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the given ray intersects with this ``AABB``. Ray length is infinite. +:ref:`Variant` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| + +Returns ``true`` if the given ray intersects with this **AABB**. Ray length is infinite. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_intersects_segment: -- :ref:`Variant` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``AABB`` intersects the line segment between ``from`` and ``to``. +:ref:`Variant` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| + +Returns ``true`` if the **AABB** intersects the line segment between ``from`` and ``to``. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`AABB` aabb **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``AABB`` and ``aabb`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on each component. +:ref:`bool` **is_equal_approx** **(** :ref:`AABB` aabb **)** |const| + +Returns ``true`` if this **AABB** and ``aabb`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on each component. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``AABB`` is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +:ref:`bool` **is_finite** **(** **)** |const| + +Returns ``true`` if this **AABB** is finite, by calling :ref:`@GlobalScope.is_finite` on each component. + +.. rst-class:: classref-item-separator ---- .. _class_AABB_method_merge: -- :ref:`AABB` **merge** **(** :ref:`AABB` with **)** |const| +.. rst-class:: classref-method -Returns a larger ``AABB`` that contains both this ``AABB`` and ``with``. +:ref:`AABB` **merge** **(** :ref:`AABB` with **)** |const| + +Returns a larger **AABB** that contains both this **AABB** and ``with``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_AABB_operator_neq_bool: +.. _class_AABB_operator_neq_AABB: -- :ref:`bool` **operator !=** **(** :ref:`AABB` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`AABB` right **)** Returns ``true`` if the vectors are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. ----- - -.. _class_AABB_operator_mul_AABB: - -- :ref:`AABB` **operator *** **(** :ref:`Transform3D` right **)** - -Inversely transforms (multiplies) the ``AABB`` by the given :ref:`Transform3D` transformation matrix. +.. rst-class:: classref-item-separator ---- -.. _class_AABB_operator_eq_bool: +.. _class_AABB_operator_mul_Transform3D: -- :ref:`bool` **operator ==** **(** :ref:`AABB` right **)** +.. rst-class:: classref-operator + +:ref:`AABB` **operator *** **(** :ref:`Transform3D` right **)** + +Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` transformation matrix. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AABB_operator_eq_AABB: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`AABB` right **)** Returns ``true`` if the AABBs are exactly equal. diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index e734c1bc4..29c3f6b23 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -16,176 +16,226 @@ AcceptDialog Base dialog for user notification. +.. rst-class:: classref-introduction-group + Description ----------- This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :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`) | -+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +.. 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`) | + +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+---------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`buttons_separation` | ``10`` | -+---------------------------------+---------------------------------------------------------------------------------+--------+ -| :ref:`StyleBox` | :ref:`panel` | | -+---------------------------------+---------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`buttons_separation` | ``10`` | + +---------------------------------+---------------------------------------------------------------------------------+--------+ + | :ref:`StyleBox` | :ref:`panel` | | + +---------------------------------+---------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AcceptDialog_signal_cancelled: -- **cancelled** **(** **)** +.. rst-class:: classref-signal + +**cancelled** **(** **)** Emitted when the dialog is closed or the button created with :ref:`add_cancel_button` is pressed. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_signal_confirmed: -- **confirmed** **(** **)** +.. rst-class:: classref-signal + +**confirmed** **(** **)** Emitted when the dialog is accepted, i.e. the OK button is pressed. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_signal_custom_action: -- **custom_action** **(** :ref:`StringName` action **)** +.. rst-class:: classref-signal + +**custom_action** **(** :ref:`StringName` action **)** Emitted when a custom button is pressed. See :ref:`add_button`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_AcceptDialog_property_dialog_autowrap: -- :ref:`bool` **dialog_autowrap** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_autowrap(value) | -+-----------+---------------------+ -| *Getter* | has_autowrap() | -+-----------+---------------------+ +:ref:`bool` **dialog_autowrap** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_autowrap** **(** :ref:`bool` value **)** +- :ref:`bool` **has_autowrap** **(** **)** Sets autowrapping for the text in the dialog. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_property_dialog_close_on_escape: -- :ref:`bool` **dialog_close_on_escape** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_close_on_escape(value) | -+-----------+----------------------------+ -| *Getter* | get_close_on_escape() | -+-----------+----------------------------+ +:ref:`bool` **dialog_close_on_escape** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_close_on_escape** **(** :ref:`bool` value **)** +- :ref:`bool` **get_close_on_escape** **(** **)** If ``true``, the dialog will be hidden when the escape key (:ref:`@GlobalScope.KEY_ESCAPE`) is pressed. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_property_dialog_hide_on_ok: -- :ref:`bool` **dialog_hide_on_ok** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_hide_on_ok(value) | -+-----------+-----------------------+ -| *Getter* | get_hide_on_ok() | -+-----------+-----------------------+ +:ref:`bool` **dialog_hide_on_ok** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_hide_on_ok** **(** :ref:`bool` value **)** +- :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. \ **Note:** Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example :ref:`FileDialog` defaults to ``false``, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in :ref:`FileDialog` to disable hiding the dialog when pressing OK. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_property_dialog_text: -- :ref:`String` **dialog_text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **dialog_text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** The text displayed by the dialog. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_property_ok_button_text: -- :ref:`String` **ok_button_text** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``"OK"`` | -+-----------+---------------------------+ -| *Setter* | set_ok_button_text(value) | -+-----------+---------------------------+ -| *Getter* | get_ok_button_text() | -+-----------+---------------------------+ +:ref:`String` **ok_button_text** = ``"OK"`` + +.. rst-class:: classref-property-setget + +- void **set_ok_button_text** **(** :ref:`String` value **)** +- :ref:`String` **get_ok_button_text** **(** **)** The text displayed by the OK button (see :ref:`get_ok_button`). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AcceptDialog_method_add_button: -- :ref:`Button` **add_button** **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** +.. rst-class:: classref-method + +:ref:`Button` **add_button** **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** 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. @@ -193,70 +243,98 @@ If ``true``, ``right`` will place the button to the right of any sibling buttons You can use :ref:`remove_button` method to remove a button created with this method from the dialog. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_method_add_cancel_button: -- :ref:`Button` **add_cancel_button** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +:ref:`Button` **add_cancel_button** **(** :ref:`String` name **)** Adds a button with label ``name`` and a cancel action to the dialog and returns the created button. You can use :ref:`remove_button` method to remove a button created with this method from the dialog. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_method_get_label: -- :ref:`Label` **get_label** **(** **)** +.. rst-class:: classref-method + +:ref:`Label` **get_label** **(** **)** Returns the label used for built-in text. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_method_get_ok_button: -- :ref:`Button` **get_ok_button** **(** **)** +.. rst-class:: classref-method + +:ref:`Button` **get_ok_button** **(** **)** Returns the OK :ref:`Button` instance. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_method_register_text_enter: -- void **register_text_enter** **(** :ref:`Control` line_edit **)** +.. rst-class:: classref-method + +void **register_text_enter** **(** :ref:`Control` line_edit **)** Registers a :ref:`LineEdit` in the dialog. When the enter key is pressed, the dialog will be accepted. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_method_remove_button: -- void **remove_button** **(** :ref:`Control` button **)** +.. rst-class:: classref-method + +void **remove_button** **(** :ref:`Control` button **)** 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:`cancelled` signals. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_AcceptDialog_theme_constant_buttons_separation: -- :ref:`int` **buttons_separation** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``10`` | -+-----------+--------+ +:ref:`int` **buttons_separation** = ``10`` The size of the vertical space between the dialog's content and the button row. +.. rst-class:: classref-item-separator + ---- .. _class_AcceptDialog_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **panel** The panel that fills the background of the window. diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index 5e1e19348..ca2c1a42c 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -14,6 +14,8 @@ AESContext Interface to low level AES encryption features. +.. rst-class:: classref-introduction-group + Description ----------- @@ -95,78 +97,131 @@ This class provides access to AES encryption/decryption of raw data. Both AES-EC +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AESContext_Mode: -.. _class_AESContext_constant_MODE_ECB_ENCRYPT: - -.. _class_AESContext_constant_MODE_ECB_DECRYPT: - -.. _class_AESContext_constant_MODE_CBC_ENCRYPT: - -.. _class_AESContext_constant_MODE_CBC_DECRYPT: - -.. _class_AESContext_constant_MODE_MAX: +.. rst-class:: classref-enumeration enum **Mode**: -- **MODE_ECB_ENCRYPT** = **0** --- AES electronic codebook encryption mode. +.. _class_AESContext_constant_MODE_ECB_ENCRYPT: -- **MODE_ECB_DECRYPT** = **1** --- AES electronic codebook decryption mode. +.. rst-class:: classref-enumeration-constant -- **MODE_CBC_ENCRYPT** = **2** --- AES cipher blocker chaining encryption mode. +:ref:`Mode` **MODE_ECB_ENCRYPT** = ``0`` -- **MODE_CBC_DECRYPT** = **3** --- AES cipher blocker chaining decryption mode. +AES electronic codebook encryption mode. -- **MODE_MAX** = **4** --- Maximum value for the mode enum. +.. _class_AESContext_constant_MODE_ECB_DECRYPT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_ECB_DECRYPT** = ``1`` + +AES electronic codebook decryption mode. + +.. _class_AESContext_constant_MODE_CBC_ENCRYPT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_CBC_ENCRYPT** = ``2`` + +AES cipher blocker chaining encryption mode. + +.. _class_AESContext_constant_MODE_CBC_DECRYPT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_CBC_DECRYPT** = ``3`` + +AES cipher blocker chaining decryption mode. + +.. _class_AESContext_constant_MODE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_MAX** = ``4`` + +Maximum value for the mode enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AESContext_method_finish: -- void **finish** **(** **)** +.. rst-class:: classref-method + +void **finish** **(** **)** Close this AES context so it can be started again. See :ref:`start`. +.. rst-class:: classref-item-separator + ---- .. _class_AESContext_method_get_iv_state: -- :ref:`PackedByteArray` **get_iv_state** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_iv_state** **(** **)** Get the current IV state for this context (IV gets updated when calling :ref:`update`). You normally don't need this function. \ **Note:** This function only makes sense when the context is started with :ref:`MODE_CBC_ENCRYPT` or :ref:`MODE_CBC_DECRYPT`. +.. rst-class:: classref-item-separator + ---- .. _class_AESContext_method_start: -- :ref:`Error` **start** **(** :ref:`Mode` mode, :ref:`PackedByteArray` key, :ref:`PackedByteArray` iv=PackedByteArray() **)** +.. rst-class:: classref-method + +:ref:`Error` **start** **(** :ref:`Mode` mode, :ref:`PackedByteArray` key, :ref:`PackedByteArray` iv=PackedByteArray() **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_AESContext_method_update: -- :ref:`PackedByteArray` **update** **(** :ref:`PackedByteArray` src **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **update** **(** :ref:`PackedByteArray` src **)** 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. diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index 1f5a94872..11264de80 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -14,6 +14,8 @@ AnimatableBody2D Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,27 +25,37 @@ An animatable body can't be moved by external forces or contacts, but can be mov When the body is moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to ``physics``), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`sync_to_physics` | ``true`` | -+-------------------------+-------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`sync_to_physics` | ``true`` | + +-------------------------+-------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimatableBody2D_property_sync_to_physics: -- :ref:`bool` **sync_to_physics** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_sync_to_physics(value) | -+-----------+------------------------------+ -| *Getter* | is_sync_to_physics_enabled() | -+-----------+------------------------------+ +:ref:`bool` **sync_to_physics** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_sync_to_physics** **(** :ref:`bool` value **)** +- :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`. diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index 7d678ca27..19706da44 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -14,6 +14,8 @@ AnimatableBody3D Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ An animatable body can't be moved by external forces or contacts, but can be mov When the body is moved manually, either from code or from an :ref:`AnimationPlayer` (with :ref:`AnimationPlayer.playback_process_mode` set to ``physics``), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,27 +36,37 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`sync_to_physics` | ``true`` | -+-------------------------+-------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`sync_to_physics` | ``true`` | + +-------------------------+-------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimatableBody3D_property_sync_to_physics: -- :ref:`bool` **sync_to_physics** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_sync_to_physics(value) | -+-----------+------------------------------+ -| *Getter* | is_sync_to_physics_enabled() | -+-----------+------------------------------+ +:ref:`bool` **sync_to_physics** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_sync_to_physics** **(** :ref:`bool` value **)** +- :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`. diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index 78170382a..d08d0b03c 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -14,10 +14,12 @@ AnimatedSprite2D Sprite node that contains multiple textures as frames to play for animation. +.. rst-class:: classref-introduction-group + Description ----------- -``AnimatedSprite2D`` is similar to the :ref:`Sprite2D` node, except it carries multiple textures as animation frames. Animations are created using a :ref:`SpriteFrames` resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The :ref:`SpriteFrames` resource can be configured in the editor via the SpriteFrames bottom panel. +**AnimatedSprite2D** is similar to the :ref:`Sprite2D` node, except it carries multiple textures as animation frames. Animations are created using a :ref:`SpriteFrames` resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The :ref:`SpriteFrames` resource can be configured in the editor via the SpriteFrames bottom panel. After setting up :ref:`frames`, :ref:`play` may be called. It's also possible to select an :ref:`animation` and toggle :ref:`playing`, even within the editor. @@ -25,6 +27,8 @@ To pause the current animation, call :ref:`stop` resources with a ``_normal`` or ``_specular`` suffix. For example, having 3 :ref:`SpriteFrames` resources ``run``, ``run_normal``, and ``run_specular`` will make it so the ``run`` animation uses normal and specular maps. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,212 +36,261 @@ Tutorials - `2D Dodge The Creeps Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`StringName` | :ref:`animation` | ``&"default"`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`centered` | ``true`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`flip_h` | ``false`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`flip_v` | ``false`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`frame` | ``0`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`SpriteFrames` | :ref:`frames` | | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`playing` | ``false`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`speed_scale` | ``1.0`` | -+-----------------------------------------+-----------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`StringName` | :ref:`animation` | ``&"default"`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`centered` | ``true`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`flip_h` | ``false`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`flip_v` | ``false`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`frame` | ``0`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`SpriteFrames` | :ref:`frames` | | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`playing` | ``false`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +-----------------------------------------+-----------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimatedSprite2D_signal_animation_finished: -- **animation_finished** **(** **)** +.. rst-class:: classref-signal + +**animation_finished** **(** **)** Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_signal_frame_changed: -- **frame_changed** **(** **)** +.. rst-class:: classref-signal + +**frame_changed** **(** **)** Emitted when :ref:`frame` changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_AnimatedSprite2D_property_animation: -- :ref:`StringName` **animation** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``&"default"`` | -+-----------+----------------------+ -| *Setter* | set_animation(value) | -+-----------+----------------------+ -| *Getter* | get_animation() | -+-----------+----------------------+ +:ref:`StringName` **animation** = ``&"default"`` + +.. rst-class:: classref-property-setget + +- void **set_animation** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_animation** **(** **)** The current animation from the :ref:`frames` resource. If this value changes, the ``frame`` counter is reset. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_centered: -- :ref:`bool` **centered** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_centered(value) | -+-----------+---------------------+ -| *Getter* | is_centered() | -+-----------+---------------------+ +:ref:`bool` **centered** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_centered** **(** :ref:`bool` value **)** +- :ref:`bool` **is_centered** **(** **)** If ``true``, texture will be centered. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_flip_h: -- :ref:`bool` **flip_h** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_h(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_h() | -+-----------+-------------------+ +:ref:`bool` **flip_h** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_h** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_h** **(** **)** If ``true``, texture is flipped horizontally. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_flip_v: -- :ref:`bool` **flip_v** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_v(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_v() | -+-----------+-------------------+ +:ref:`bool` **flip_v** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_v** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_v** **(** **)** If ``true``, texture is flipped vertically. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_frame: -- :ref:`int` **frame** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_frame(value) | -+-----------+------------------+ -| *Getter* | get_frame() | -+-----------+------------------+ +:ref:`int` **frame** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_frame** **(** :ref:`int` value **)** +- :ref:`int` **get_frame** **(** **)** The displayed animation frame's index. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_frames: -- :ref:`SpriteFrames` **frames** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_sprite_frames(value) | -+----------+--------------------------+ -| *Getter* | get_sprite_frames() | -+----------+--------------------------+ +:ref:`SpriteFrames` **frames** + +.. rst-class:: classref-property-setget + +- void **set_sprite_frames** **(** :ref:`SpriteFrames` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The texture's drawing offset. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_playing: -- :ref:`bool` **playing** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_playing(value) | -+-----------+--------------------+ -| *Getter* | is_playing() | -+-----------+--------------------+ +:ref:`bool` **playing** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_playing** **(** :ref:`bool` value **)** +- :ref:`bool` **is_playing** **(** **)** If ``true``, the :ref:`animation` is currently playing. Setting this property to ``false`` is the equivalent of calling :ref:`stop`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_property_speed_scale: -- :ref:`float` **speed_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :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. If set to ``0``, the animation is paused, preserving the current frame's elapsed time. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimatedSprite2D_method_play: -- void **play** **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** +.. rst-class:: classref-method + +void **play** **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** Plays the animation named ``anim``. If no ``anim`` is provided, the current animation is played. If ``backwards`` is ``true``, the animation is played in reverse. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite2D_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the current :ref:`animation` at the current :ref:`frame`. diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index e3535addc..daeb5ee1c 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -14,154 +14,203 @@ AnimatedSprite3D 2D sprite node in 3D world, that can use multiple 2D textures for animation. +.. rst-class:: classref-introduction-group + Description ----------- -``AnimatedSprite3D`` is similar to the :ref:`Sprite3D` node, except it carries multiple textures as animation :ref:`frames`. Animations are created using a :ref:`SpriteFrames` resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The :ref:`SpriteFrames` resource can be configured in the editor via the SpriteFrames bottom panel. +**AnimatedSprite3D** is similar to the :ref:`Sprite3D` node, except it carries multiple textures as animation :ref:`frames`. Animations are created using a :ref:`SpriteFrames` resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The :ref:`SpriteFrames` resource can be configured in the editor via the SpriteFrames bottom panel. After setting up :ref:`frames`, :ref:`play` may be called. It's also possible to select an :ref:`animation` and toggle :ref:`playing`, even within the editor. To pause the current animation, call :ref:`stop` or set :ref:`playing` to ``false``. Alternatively, setting :ref:`speed_scale` to ``0`` also preserves the current frame's elapsed time. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`2D Sprite animation (also applies to 3D) <../tutorials/2d/2d_sprite_animation>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------+-----------------------------------------------------------------+----------------+ -| :ref:`StringName` | :ref:`animation` | ``&"default"`` | -+-----------------------------------------+-----------------------------------------------------------------+----------------+ -| :ref:`int` | :ref:`frame` | ``0`` | -+-----------------------------------------+-----------------------------------------------------------------+----------------+ -| :ref:`SpriteFrames` | :ref:`frames` | | -+-----------------------------------------+-----------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`playing` | ``false`` | -+-----------------------------------------+-----------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`speed_scale` | ``1.0`` | -+-----------------------------------------+-----------------------------------------------------------------+----------------+ +.. table:: + :widths: auto + + +-----------------------------------------+-----------------------------------------------------------------+----------------+ + | :ref:`StringName` | :ref:`animation` | ``&"default"`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`frame` | ``0`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------+ + | :ref:`SpriteFrames` | :ref:`frames` | | + +-----------------------------------------+-----------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`playing` | ``false`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +-----------------------------------------+-----------------------------------------------------------------+----------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimatedSprite3D_signal_animation_finished: -- **animation_finished** **(** **)** +.. rst-class:: classref-signal + +**animation_finished** **(** **)** Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite3D_signal_frame_changed: -- **frame_changed** **(** **)** +.. rst-class:: classref-signal + +**frame_changed** **(** **)** Emitted when :ref:`frame` changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_AnimatedSprite3D_property_animation: -- :ref:`StringName` **animation** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``&"default"`` | -+-----------+----------------------+ -| *Setter* | set_animation(value) | -+-----------+----------------------+ -| *Getter* | get_animation() | -+-----------+----------------------+ +:ref:`StringName` **animation** = ``&"default"`` + +.. rst-class:: classref-property-setget + +- void **set_animation** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_animation** **(** **)** The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite3D_property_frame: -- :ref:`int` **frame** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_frame(value) | -+-----------+------------------+ -| *Getter* | get_frame() | -+-----------+------------------+ +:ref:`int` **frame** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_frame** **(** :ref:`int` value **)** +- :ref:`int` **get_frame** **(** **)** The displayed animation frame's index. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite3D_property_frames: -- :ref:`SpriteFrames` **frames** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_sprite_frames(value) | -+----------+--------------------------+ -| *Getter* | get_sprite_frames() | -+----------+--------------------------+ +:ref:`SpriteFrames` **frames** + +.. rst-class:: classref-property-setget + +- void **set_sprite_frames** **(** :ref:`SpriteFrames` value **)** +- :ref:`SpriteFrames` **get_sprite_frames** **(** **)** The :ref:`SpriteFrames` resource containing the animation(s). +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite3D_property_playing: -- :ref:`bool` **playing** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_playing(value) | -+-----------+--------------------+ -| *Getter* | is_playing() | -+-----------+--------------------+ +:ref:`bool` **playing** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_playing** **(** :ref:`bool` value **)** +- :ref:`bool` **is_playing** **(** **)** If ``true``, the :ref:`animation` is currently playing. Setting this property to ``false`` is the equivalent of calling :ref:`stop`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite3D_property_speed_scale: -- :ref:`float` **speed_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :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. If set to ``0``, the animation is paused, preserving the current frame's elapsed time. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimatedSprite3D_method_play: -- void **play** **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** +.. rst-class:: classref-method + +void **play** **(** :ref:`StringName` anim=&"", :ref:`bool` backwards=false **)** Plays the animation named ``anim``. If no ``anim`` is provided, the current animation is played. If ``backwards`` is ``true``, the animation is played in reverse. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedSprite3D_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the current :ref:`animation` at the current :ref:`frame`. diff --git a/classes/class_animatedtexture.rst b/classes/class_animatedtexture.rst index 546ef8efc..72a60c1b1 100644 --- a/classes/class_animatedtexture.rst +++ b/classes/class_animatedtexture.rst @@ -14,163 +14,216 @@ AnimatedTexture Proxy texture for simple frame-based animations. +.. rst-class:: classref-introduction-group + Description ----------- -``AnimatedTexture`` is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike :ref:`AnimationPlayer` or :ref:`AnimatedSprite2D`, it isn't a :ref:`Node`, but has the advantage of being usable anywhere a :ref:`Texture2D` resource can be used, e.g. in a :ref:`TileSet`. +**AnimatedTexture** is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike :ref:`AnimationPlayer` or :ref:`AnimatedSprite2D`, it isn't a :ref:`Node`, but has the advantage of being usable anywhere a :ref:`Texture2D` resource can be used, e.g. in a :ref:`TileSet`. The playback of the animation is controlled by the :ref:`speed_scale` property, as well as each frame's duration (see :ref:`set_frame_duration`). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. -\ ``AnimatedTexture`` currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. +\ **AnimatedTexture** currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. \ **Note:** AnimatedTexture doesn't support using :ref:`AtlasTexture`\ s. Each frame needs to be a separate :ref:`Texture2D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`current_frame` | | -+---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`frames` | ``1`` | -+---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`one_shot` | ``false`` | -+---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`pause` | ``false`` | -+---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`speed_scale` | ``1.0`` | -+---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`current_frame` | | + +---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`frames` | ``1`` | + +---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`one_shot` | ``false`` | + +---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`pause` | ``false`` | + +---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +---------------------------+--------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :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 **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :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 **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_AnimatedTexture_constant_MAX_FRAMES: -- **MAX_FRAMES** = **256** --- The maximum number of frames supported by ``AnimatedTexture``. If you need more frames in your animation, use :ref:`AnimationPlayer` or :ref:`AnimatedSprite2D`. +.. rst-class:: classref-constant + +**MAX_FRAMES** = ``256`` + +The maximum number of frames supported by **AnimatedTexture**. If you need more frames in your animation, use :ref:`AnimationPlayer` or :ref:`AnimatedSprite2D`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimatedTexture_property_current_frame: -- :ref:`int` **current_frame** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_current_frame(value) | -+----------+--------------------------+ -| *Getter* | get_current_frame() | -+----------+--------------------------+ +:ref:`int` **current_frame** + +.. rst-class:: classref-property-setget + +- void **set_current_frame** **(** :ref:`int` value **)** +- :ref:`int` **get_current_frame** **(** **)** Sets the currently visible frame of the texture. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedTexture_property_frames: -- :ref:`int` **frames** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1`` | -+-----------+-------------------+ -| *Setter* | set_frames(value) | -+-----------+-------------------+ -| *Getter* | get_frames() | -+-----------+-------------------+ +:ref:`int` **frames** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_frames** **(** :ref:`int` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedTexture_property_one_shot: -- :ref:`bool` **one_shot** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_one_shot(value) | -+-----------+---------------------+ -| *Getter* | get_one_shot() | -+-----------+---------------------+ +:ref:`bool` **one_shot** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_one_shot** **(** :ref:`bool` value **)** +- :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``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedTexture_property_pause: -- :ref:`bool` **pause** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``false`` | -+-----------+------------------+ -| *Setter* | set_pause(value) | -+-----------+------------------+ -| *Getter* | get_pause() | -+-----------+------------------+ +:ref:`bool` **pause** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pause** **(** :ref:`bool` value **)** +- :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``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedTexture_property_speed_scale: -- :ref:`float` **speed_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimatedTexture_method_get_frame_duration: -- :ref:`float` **get_frame_duration** **(** :ref:`int` frame **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_frame_duration** **(** :ref:`int` frame **)** |const| Returns the given ``frame``'s duration, in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedTexture_method_get_frame_texture: -- :ref:`Texture2D` **get_frame_texture** **(** :ref:`int` frame **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_frame_texture** **(** :ref:`int` frame **)** |const| Returns the given frame's :ref:`Texture2D`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedTexture_method_set_frame_duration: -- void **set_frame_duration** **(** :ref:`int` frame, :ref:`float` duration **)** +.. rst-class:: classref-method + +void **set_frame_duration** **(** :ref:`int` frame, :ref:`float` duration **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimatedTexture_method_set_frame_texture: -- void **set_frame_texture** **(** :ref:`int` frame, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_frame_texture** **(** :ref:`int` frame, :ref:`Texture2D` texture **)** 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. diff --git a/classes/class_animation.rst b/classes/class_animation.rst index face0ae5b..1f699f5a2 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -14,6 +14,8 @@ Animation Contains data used to animate everything in the engine. +.. rst-class:: classref-introduction-group + Description ----------- @@ -48,840 +50,1208 @@ Animations are just data containers, and must be added to nodes such as an :ref: \ **Note:** For 3D position/rotation/scale, using the dedicated :ref:`TYPE_POSITION_3D`, :ref:`TYPE_ROTATION_3D` and :ref:`TYPE_SCALE_3D` track types instead of :ref:`TYPE_VALUE` is recommended for performance reasons. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Animation documentation index <../tutorials/animation/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------+------------------------------------------------------+---------+ -| :ref:`float` | :ref:`length` | ``1.0`` | -+------------------------------------------+------------------------------------------------------+---------+ -| :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | -+------------------------------------------+------------------------------------------------------+---------+ -| :ref:`float` | :ref:`step` | ``0.1`` | -+------------------------------------------+------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +------------------------------------------+------------------------------------------------------+---------+ + | :ref:`float` | :ref:`length` | ``1.0`` | + +------------------------------------------+------------------------------------------------------+---------+ + | :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | + +------------------------------------------+------------------------------------------------------+---------+ + | :ref:`float` | :ref:`step` | ``0.1`` | + +------------------------------------------+------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`PackedInt32Array` | :ref:`method_track_get_key_indices` **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |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 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`int` | :ref:`scale_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |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:`PackedInt32Array` | :ref:`value_track_get_key_indices` **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |const| | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto -Signals -------- + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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 **)** | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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 **)** | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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:`int` | :ref:`scale_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |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 **)** | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -.. _class_Animation_signal_tracks_changed: +.. rst-class:: classref-section-separator -- **tracks_changed** **(** **)** +---- -Emitted when there's a change in the list of tracks, e.g. tracks are added, moved or have changed paths. +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Animation_TrackType: -.. _class_Animation_constant_TYPE_VALUE: - -.. _class_Animation_constant_TYPE_POSITION_3D: - -.. _class_Animation_constant_TYPE_ROTATION_3D: - -.. _class_Animation_constant_TYPE_SCALE_3D: - -.. _class_Animation_constant_TYPE_BLEND_SHAPE: - -.. _class_Animation_constant_TYPE_METHOD: - -.. _class_Animation_constant_TYPE_BEZIER: - -.. _class_Animation_constant_TYPE_AUDIO: - -.. _class_Animation_constant_TYPE_ANIMATION: +.. rst-class:: classref-enumeration enum **TrackType**: -- **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated :ref:`TYPE_POSITION_3D`, :ref:`TYPE_ROTATION_3D` and :ref:`TYPE_SCALE_3D` track types instead of :ref:`TYPE_VALUE` is recommended for performance reasons. +.. _class_Animation_constant_TYPE_VALUE: -- **TYPE_POSITION_3D** = **1** --- 3D position track (values are stored in :ref:`Vector3`\ s). +.. rst-class:: classref-enumeration-constant -- **TYPE_ROTATION_3D** = **2** --- 3D rotation track (values are stored in :ref:`Quaternion`\ s). +:ref:`TrackType` **TYPE_VALUE** = ``0`` -- **TYPE_SCALE_3D** = **3** --- 3D scale track (values are stored in :ref:`Vector3`\ s). +Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated :ref:`TYPE_POSITION_3D`, :ref:`TYPE_ROTATION_3D` and :ref:`TYPE_SCALE_3D` track types instead of :ref:`TYPE_VALUE` is recommended for performance reasons. -- **TYPE_BLEND_SHAPE** = **4** --- Blend shape track. +.. _class_Animation_constant_TYPE_POSITION_3D: -- **TYPE_METHOD** = **5** --- Method tracks call functions with given arguments per key. +.. rst-class:: classref-enumeration-constant -- **TYPE_BEZIER** = **6** --- Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a :ref:`Color`). +:ref:`TrackType` **TYPE_POSITION_3D** = ``1`` -- **TYPE_AUDIO** = **7** --- Audio tracks are used to play an audio stream with either type of :ref:`AudioStreamPlayer`. The stream can be trimmed and previewed in the animation. +3D position track (values are stored in :ref:`Vector3`\ s). -- **TYPE_ANIMATION** = **8** --- Animation tracks play animations in other :ref:`AnimationPlayer` nodes. +.. _class_Animation_constant_TYPE_ROTATION_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackType` **TYPE_ROTATION_3D** = ``2`` + +3D rotation track (values are stored in :ref:`Quaternion`\ s). + +.. _class_Animation_constant_TYPE_SCALE_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackType` **TYPE_SCALE_3D** = ``3`` + +3D scale track (values are stored in :ref:`Vector3`\ s). + +.. _class_Animation_constant_TYPE_BLEND_SHAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackType` **TYPE_BLEND_SHAPE** = ``4`` + +Blend shape track. + +.. _class_Animation_constant_TYPE_METHOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackType` **TYPE_METHOD** = ``5`` + +Method tracks call functions with given arguments per key. + +.. _class_Animation_constant_TYPE_BEZIER: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackType` **TYPE_BEZIER** = ``6`` + +Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a :ref:`Color`). + +.. _class_Animation_constant_TYPE_AUDIO: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackType` **TYPE_AUDIO** = ``7`` + +Audio tracks are used to play an audio stream with either type of :ref:`AudioStreamPlayer`. The stream can be trimmed and previewed in the animation. + +.. _class_Animation_constant_TYPE_ANIMATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackType` **TYPE_ANIMATION** = ``8`` + +Animation tracks play animations in other :ref:`AnimationPlayer` nodes. + +.. rst-class:: classref-item-separator ---- .. _enum_Animation_InterpolationType: -.. _class_Animation_constant_INTERPOLATION_NEAREST: - -.. _class_Animation_constant_INTERPOLATION_LINEAR: - -.. _class_Animation_constant_INTERPOLATION_CUBIC: - -.. _class_Animation_constant_INTERPOLATION_LINEAR_ANGLE: - -.. _class_Animation_constant_INTERPOLATION_CUBIC_ANGLE: +.. rst-class:: classref-enumeration enum **InterpolationType**: -- **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value). +.. _class_Animation_constant_INTERPOLATION_NEAREST: -- **INTERPOLATION_LINEAR** = **1** --- Linear interpolation. +.. rst-class:: classref-enumeration-constant -- **INTERPOLATION_CUBIC** = **2** --- Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to :ref:`INTERPOLATION_LINEAR` for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return. +:ref:`InterpolationType` **INTERPOLATION_NEAREST** = ``0`` -- **INTERPOLATION_LINEAR_ANGLE** = **3** --- Linear interpolation with shortest path rotation. +No interpolation (nearest value). + +.. _class_Animation_constant_INTERPOLATION_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationType` **INTERPOLATION_LINEAR** = ``1`` + +Linear interpolation. + +.. _class_Animation_constant_INTERPOLATION_CUBIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationType` **INTERPOLATION_CUBIC** = ``2`` + +Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to :ref:`INTERPOLATION_LINEAR` for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return. + +.. _class_Animation_constant_INTERPOLATION_LINEAR_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationType` **INTERPOLATION_LINEAR_ANGLE** = ``3`` + +Linear interpolation with shortest path rotation. \ **Note:** The result value is always normalized and may not match the key value. -- **INTERPOLATION_CUBIC_ANGLE** = **4** --- Cubic interpolation with shortest path rotation. +.. _class_Animation_constant_INTERPOLATION_CUBIC_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationType` **INTERPOLATION_CUBIC_ANGLE** = ``4`` + +Cubic interpolation with shortest path rotation. \ **Note:** The result value is always normalized and may not match the key value. +.. rst-class:: classref-item-separator + ---- .. _enum_Animation_UpdateMode: -.. _class_Animation_constant_UPDATE_CONTINUOUS: - -.. _class_Animation_constant_UPDATE_DISCRETE: - -.. _class_Animation_constant_UPDATE_TRIGGER: - -.. _class_Animation_constant_UPDATE_CAPTURE: +.. rst-class:: classref-enumeration enum **UpdateMode**: -- **UPDATE_CONTINUOUS** = **0** --- Update between keyframes. +.. _class_Animation_constant_UPDATE_CONTINUOUS: -- **UPDATE_DISCRETE** = **1** --- Update at the keyframes and hold the value. +.. rst-class:: classref-enumeration-constant -- **UPDATE_TRIGGER** = **2** --- Update at the keyframes. +:ref:`UpdateMode` **UPDATE_CONTINUOUS** = ``0`` -- **UPDATE_CAPTURE** = **3** --- 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. +Update between keyframes and hold the value. + +.. _class_Animation_constant_UPDATE_DISCRETE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_DISCRETE** = ``1`` + +Update at the keyframes. + +.. _class_Animation_constant_UPDATE_CAPTURE: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. rst-class:: classref-item-separator ---- .. _enum_Animation_LoopMode: -.. _class_Animation_constant_LOOP_NONE: - -.. _class_Animation_constant_LOOP_LINEAR: - -.. _class_Animation_constant_LOOP_PINGPONG: +.. rst-class:: classref-enumeration enum **LoopMode**: -- **LOOP_NONE** = **0** --- At both ends of the animation, the animation will stop playing. +.. _class_Animation_constant_LOOP_NONE: -- **LOOP_LINEAR** = **1** --- At both ends of the animation, the animation will be repeated without changing the playback direction. +.. rst-class:: classref-enumeration-constant -- **LOOP_PINGPONG** = **2** --- Repeats playback and reverse playback at both ends of the animation. +:ref:`LoopMode` **LOOP_NONE** = ``0`` + +At both ends of the animation, the animation will stop playing. + +.. _class_Animation_constant_LOOP_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopMode` **LOOP_LINEAR** = ``1`` + +At both ends of the animation, the animation will be repeated without changing the playback direction. + +.. _class_Animation_constant_LOOP_PINGPONG: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopMode` **LOOP_PINGPONG** = ``2`` + +Repeats playback and reverse playback at both ends of the animation. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_Animation_LoopedFlag: + +.. rst-class:: classref-enumeration + +enum **LoopedFlag**: + +.. _class_Animation_constant_LOOPED_FLAG_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopedFlag` **LOOPED_FLAG_NONE** = ``0`` + +This flag indicates that the animation proceeds without any looping. + +.. _class_Animation_constant_LOOPED_FLAG_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopedFlag` **LOOPED_FLAG_END** = ``1`` + +This flag indicates that the animation has reached the end of the animation and just after loop processed. + +.. _class_Animation_constant_LOOPED_FLAG_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopedFlag` **LOOPED_FLAG_START** = ``2`` + +This flag indicates that the animation has reached the start of the animation and just after loop processed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Animation_property_length: -- :ref:`float` **length** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_length(value) | -+-----------+-------------------+ -| *Getter* | get_length() | -+-----------+-------------------+ +:ref:`float` **length** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_length** **(** :ref:`float` value **)** +- :ref:`float` **get_length** **(** **)** The total length of the animation (in seconds). \ **Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_property_loop_mode: -- :ref:`LoopMode` **loop_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_loop_mode(value) | -+-----------+----------------------+ -| *Getter* | get_loop_mode() | -+-----------+----------------------+ +:ref:`LoopMode` **loop_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_loop_mode** **(** :ref:`LoopMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_property_step: -- :ref:`float` **step** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.1`` | -+-----------+-----------------+ -| *Setter* | set_step(value) | -+-----------+-----------------+ -| *Getter* | get_step() | -+-----------+-----------------+ +:ref:`float` **step** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_step** **(** :ref:`float` value **)** +- :ref:`float` **get_step** **(** **)** The animation step value. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Animation_method_add_track: -- :ref:`int` **add_track** **(** :ref:`TrackType` type, :ref:`int` at_position=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **add_track** **(** :ref:`TrackType` type, :ref:`int` at_position=-1 **)** Adds a track to the Animation. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_animation_track_get_key_animation: -- :ref:`StringName` **animation_track_get_key_animation** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **animation_track_get_key_animation** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the animation name at the key identified by ``key_idx``. The ``track_idx`` must be the index of an Animation Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_animation_track_insert_key: -- :ref:`int` **animation_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`StringName` animation **)** +.. rst-class:: classref-method + +:ref:`int` **animation_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`StringName` animation **)** Inserts a key with value ``animation`` at the given ``time`` (in seconds). The ``track_idx`` must be the index of an Animation Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_animation_track_set_key_animation: -- void **animation_track_set_key_animation** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`StringName` animation **)** +.. rst-class:: classref-method + +void **animation_track_set_key_animation** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`StringName` animation **)** Sets the key identified by ``key_idx`` to value ``animation``. The ``track_idx`` must be the index of an Animation Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_audio_track_get_key_end_offset: -- :ref:`float` **audio_track_get_key_end_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **audio_track_get_key_end_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the end offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track. End offset is the number of seconds cut off at the ending of the audio stream. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_audio_track_get_key_start_offset: -- :ref:`float` **audio_track_get_key_start_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **audio_track_get_key_start_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the start offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track. Start offset is the number of seconds cut off at the beginning of the audio stream. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_audio_track_get_key_stream: -- :ref:`Resource` **audio_track_get_key_stream** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Resource` **audio_track_get_key_stream** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the audio stream of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_audio_track_insert_key: -- :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 **)** +.. 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 **)** Inserts an Audio Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of an Audio Track. \ ``stream`` is the :ref:`AudioStream` resource to play. ``start_offset`` is the number of seconds cut off at the beginning of the audio stream, while ``end_offset`` is at the ending. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_audio_track_set_key_end_offset: -- void **audio_track_set_key_end_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** +.. rst-class:: classref-method + +void **audio_track_set_key_end_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_audio_track_set_key_start_offset: -- void **audio_track_set_key_start_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** +.. rst-class:: classref-method + +void **audio_track_set_key_start_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_audio_track_set_key_stream: -- void **audio_track_set_key_stream** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Resource` stream **)** +.. rst-class:: classref-method + +void **audio_track_set_key_stream** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Resource` stream **)** Sets the stream of the key identified by ``key_idx`` to value ``stream``. The ``track_idx`` must be the index of an Audio Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_get_key_in_handle: -- :ref:`Vector2` **bezier_track_get_key_in_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **bezier_track_get_key_in_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the in handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_get_key_out_handle: -- :ref:`Vector2` **bezier_track_get_key_out_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **bezier_track_get_key_out_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the out handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_get_key_value: -- :ref:`float` **bezier_track_get_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **bezier_track_get_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the value of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_insert_key: -- :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) **)** +.. 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) **)** Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of a Bezier Track. \ ``in_handle`` is the left-side weight of the added Bezier curve point, ``out_handle`` is the right-side one, while ``value`` is the actual value at this point. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_interpolate: -- :ref:`float` **bezier_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time **)** |const| +.. rst-class:: classref-method + +:ref:`float` **bezier_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time **)** |const| Returns the interpolated value at the given ``time`` (in seconds). The ``track_idx`` must be the index of a Bezier Track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_set_key_in_handle: -- 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 **)** +.. 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 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_set_key_out_handle: -- 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 **)** +.. 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 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_bezier_track_set_key_value: -- void **bezier_track_set_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` value **)** +.. rst-class:: classref-method + +void **bezier_track_set_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_blend_shape_track_insert_key: -- :ref:`int` **blend_shape_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` amount **)** +.. rst-class:: classref-method + +:ref:`int` **blend_shape_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` amount **)** Inserts a key in a given blend shape track. Returns the key index. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clear the animation (clear all tracks and reset all). +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_compress: -- void **compress** **(** :ref:`int` page_size=8192, :ref:`int` fps=120, :ref:`float` split_tolerance=4.0 **)** +.. rst-class:: classref-method -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. +void **compress** **(** :ref:`int` page_size=8192, :ref:`int` fps=120, :ref:`float` split_tolerance=4.0 **)** + +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. \ **Note:** Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_copy_track: -- void **copy_track** **(** :ref:`int` track_idx, :ref:`Animation` to_animation **)** +.. rst-class:: classref-method + +void **copy_track** **(** :ref:`int` track_idx, :ref:`Animation` to_animation **)** Adds a new track that is a copy of the given track from ``to_animation``. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_find_track: -- :ref:`int` **find_track** **(** :ref:`NodePath` path, :ref:`TrackType` type **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find_track** **(** :ref:`NodePath` path, :ref:`TrackType` type **)** |const| Returns the index of the specified track. If the track is not found, return -1. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_get_track_count: -- :ref:`int` **get_track_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_track_count** **(** **)** |const| Returns the amount of tracks in the animation. ----- - -.. _class_Animation_method_method_track_get_key_indices: - -- :ref:`PackedInt32Array` **method_track_get_key_indices** **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |const| - -Returns all the key indices of a method track, given a position and delta time. +.. rst-class:: classref-item-separator ---- .. _class_Animation_method_method_track_get_name: -- :ref:`StringName` **method_track_get_name** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **method_track_get_name** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the method name of a method track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_method_track_get_params: -- :ref:`Array` **method_track_get_params** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **method_track_get_params** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the arguments values to be called on a method track for a given key in a given track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_position_track_insert_key: -- :ref:`int` **position_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` position **)** +.. rst-class:: classref-method + +:ref:`int` **position_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` position **)** Inserts a key in a given 3D position track. Returns the key index. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_remove_track: -- void **remove_track** **(** :ref:`int` track_idx **)** +.. rst-class:: classref-method + +void **remove_track** **(** :ref:`int` track_idx **)** Removes a track by specifying the track index. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_rotation_track_insert_key: -- :ref:`int` **rotation_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Quaternion` rotation **)** +.. rst-class:: classref-method + +:ref:`int` **rotation_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Quaternion` rotation **)** Inserts a key in a given 3D rotation track. Returns the key index. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_scale_track_insert_key: -- :ref:`int` **scale_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** +.. rst-class:: classref-method + +:ref:`int` **scale_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** Inserts a key in a given 3D scale track. Returns the key index. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_find_key: -- :ref:`int` **track_find_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **track_find_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |const| Finds the key index by time in a given track. Optionally, only find it if the exact time is given. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_interpolation_loop_wrap: -- :ref:`bool` **track_get_interpolation_loop_wrap** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **track_get_interpolation_loop_wrap** **(** :ref:`int` track_idx **)** |const| Returns ``true`` if the track at ``track_idx`` wraps the interpolation loop. New tracks wrap the interpolation loop by default. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_interpolation_type: -- :ref:`InterpolationType` **track_get_interpolation_type** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`InterpolationType` **track_get_interpolation_type** **(** :ref:`int` track_idx **)** |const| Returns the interpolation type of a given track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_key_count: -- :ref:`int` **track_get_key_count** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **track_get_key_count** **(** :ref:`int` track_idx **)** |const| Returns the number of keys in a given track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_key_time: -- :ref:`float` **track_get_key_time** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **track_get_key_time** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the time at which the key is located. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_key_transition: -- :ref:`float` **track_get_key_transition** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **track_get_key_transition** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_key_value: -- :ref:`Variant` **track_get_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **track_get_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| Returns the value of a given key in a given track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_path: -- :ref:`NodePath` **track_get_path** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **track_get_path** **(** :ref:`int` track_idx **)** |const| Gets the path of a track. For more information on the path format, see :ref:`track_set_path`. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_get_type: -- :ref:`TrackType` **track_get_type** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`TrackType` **track_get_type** **(** :ref:`int` track_idx **)** |const| Gets the type of a track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_insert_key: -- :ref:`int` **track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** +.. rst-class:: classref-method + +:ref:`int` **track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** Inserts a generic key in a given track. Returns the key index. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_is_compressed: -- :ref:`bool` **track_is_compressed** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **track_is_compressed** **(** :ref:`int` track_idx **)** |const| Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress`. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_is_enabled: -- :ref:`bool` **track_is_enabled** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **track_is_enabled** **(** :ref:`int` track_idx **)** |const| Returns ``true`` if the track at index ``track_idx`` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_is_imported: -- :ref:`bool` **track_is_imported** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **track_is_imported** **(** :ref:`int` track_idx **)** |const| Returns ``true`` if the given track is imported. Else, return ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_move_down: -- void **track_move_down** **(** :ref:`int` track_idx **)** +.. rst-class:: classref-method + +void **track_move_down** **(** :ref:`int` track_idx **)** Moves a track down. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_move_to: -- void **track_move_to** **(** :ref:`int` track_idx, :ref:`int` to_idx **)** +.. rst-class:: classref-method + +void **track_move_to** **(** :ref:`int` track_idx, :ref:`int` to_idx **)** Changes the index position of track ``track_idx`` to the one defined in ``to_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_move_up: -- void **track_move_up** **(** :ref:`int` track_idx **)** +.. rst-class:: classref-method + +void **track_move_up** **(** :ref:`int` track_idx **)** Moves a track up. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_remove_key: -- void **track_remove_key** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** +.. rst-class:: classref-method + +void **track_remove_key** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** Removes a key by index in a given track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_remove_key_at_time: -- void **track_remove_key_at_time** **(** :ref:`int` track_idx, :ref:`float` time **)** +.. rst-class:: classref-method + +void **track_remove_key_at_time** **(** :ref:`int` track_idx, :ref:`float` time **)** Removes a key at ``time`` in a given track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_enabled: -- void **track_set_enabled** **(** :ref:`int` track_idx, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **track_set_enabled** **(** :ref:`int` track_idx, :ref:`bool` enabled **)** Enables/disables the given track. Tracks are enabled by default. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_imported: -- void **track_set_imported** **(** :ref:`int` track_idx, :ref:`bool` imported **)** +.. rst-class:: classref-method + +void **track_set_imported** **(** :ref:`int` track_idx, :ref:`bool` imported **)** Sets the given track as imported or not. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_interpolation_loop_wrap: -- void **track_set_interpolation_loop_wrap** **(** :ref:`int` track_idx, :ref:`bool` interpolation **)** +.. rst-class:: classref-method + +void **track_set_interpolation_loop_wrap** **(** :ref:`int` track_idx, :ref:`bool` interpolation **)** If ``true``, the track at ``track_idx`` wraps the interpolation loop. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_interpolation_type: -- void **track_set_interpolation_type** **(** :ref:`int` track_idx, :ref:`InterpolationType` interpolation **)** +.. rst-class:: classref-method + +void **track_set_interpolation_type** **(** :ref:`int` track_idx, :ref:`InterpolationType` interpolation **)** Sets the interpolation type of a given track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_key_time: -- void **track_set_key_time** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` time **)** +.. rst-class:: classref-method + +void **track_set_key_time** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` time **)** Sets the time of an existing key. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_key_transition: -- void **track_set_key_transition** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` transition **)** +.. rst-class:: classref-method + +void **track_set_key_transition** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` transition **)** Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_key_value: -- void **track_set_key_value** **(** :ref:`int` track_idx, :ref:`int` key, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **track_set_key_value** **(** :ref:`int` track_idx, :ref:`int` key, :ref:`Variant` value **)** Sets the value of an existing key. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_set_path: -- void **track_set_path** **(** :ref:`int` track_idx, :ref:`NodePath` path **)** +.. rst-class:: classref-method + +void **track_set_path** **(** :ref:`int` track_idx, :ref:`NodePath` path **)** 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 ``":"``. For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_track_swap: -- void **track_swap** **(** :ref:`int` track_idx, :ref:`int` with_idx **)** +.. rst-class:: classref-method + +void **track_swap** **(** :ref:`int` track_idx, :ref:`int` with_idx **)** Swaps the track ``track_idx``'s index position with the track ``with_idx``. ----- - -.. _class_Animation_method_value_track_get_key_indices: - -- :ref:`PackedInt32Array` **value_track_get_key_indices** **(** :ref:`int` track_idx, :ref:`float` time_sec, :ref:`float` delta **)** |const| - -Returns all the key indices of a value track, given a position and delta time. +.. rst-class:: classref-item-separator ---- .. _class_Animation_method_value_track_get_update_mode: -- :ref:`UpdateMode` **value_track_get_update_mode** **(** :ref:`int` track_idx **)** |const| +.. rst-class:: classref-method + +:ref:`UpdateMode` **value_track_get_update_mode** **(** :ref:`int` track_idx **)** |const| Returns the update mode of a value track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_value_track_interpolate: -- :ref:`Variant` **value_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **value_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| Returns the interpolated value at the given time (in seconds). The ``track_idx`` must be the index of a value track. +.. rst-class:: classref-item-separator + ---- .. _class_Animation_method_value_track_set_update_mode: -- void **value_track_set_update_mode** **(** :ref:`int` track_idx, :ref:`UpdateMode` mode **)** +.. rst-class:: classref-method + +void **value_track_set_update_mode** **(** :ref:`int` track_idx, :ref:`UpdateMode` mode **)** Sets the update mode (see :ref:`UpdateMode`) of a value track. diff --git a/classes/class_animationlibrary.rst b/classes/class_animationlibrary.rst index be3663b25..33c9e9c67 100644 --- a/classes/class_animationlibrary.rst +++ b/classes/class_animationlibrary.rst @@ -14,126 +14,202 @@ AnimationLibrary Container for :ref:`Animation` resources. +.. rst-class:: classref-introduction-group + Description ----------- An animation library stores a set of animations accessible through :ref:`StringName` keys, for use with :ref:`AnimationPlayer` nodes. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Animation tutorial index <../tutorials/animation/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+-----------------------------------------------------+--------+ -| :ref:`Dictionary` | :ref:`_data` | ``{}`` | -+-------------------------------------+-----------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-------------------------------------+-----------------------------------------------------+--------+ + | :ref:`Dictionary` | :ref:`_data` | ``{}`` | + +-------------------------------------+-----------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationLibrary_signal_animation_added: -- **animation_added** **(** :ref:`StringName` name **)** +.. rst-class:: classref-signal + +**animation_added** **(** :ref:`StringName` name **)** Emitted when an :ref:`Animation` is added, under the key ``name``. +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationLibrary_signal_animation_changed: + +.. rst-class:: classref-signal + +**animation_changed** **(** :ref:`StringName` name **)** + +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. + +See also :ref:`Resource.changed`, which this acts as a relay for. + +.. rst-class:: classref-item-separator + ---- .. _class_AnimationLibrary_signal_animation_removed: -- **animation_removed** **(** :ref:`StringName` name **)** +.. rst-class:: classref-signal + +**animation_removed** **(** :ref:`StringName` name **)** Emitted when an :ref:`Animation` stored with the key ``name`` is removed. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationLibrary_signal_animation_renamed: -- **animation_renamed** **(** :ref:`StringName` name, :ref:`StringName` to_name **)** +.. rst-class:: classref-signal + +**animation_renamed** **(** :ref:`StringName` name, :ref:`StringName` to_name **)** Emitted when the key for an :ref:`Animation` is changed, from ``name`` to ``to_name``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_AnimationLibrary_property__data: -- :ref:`Dictionary` **_data** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``{}`` | -+-----------+--------+ +: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 ------------------- .. _class_AnimationLibrary_method_add_animation: -- :ref:`Error` **add_animation** **(** :ref:`StringName` name, :ref:`Animation` animation **)** +.. rst-class:: classref-method + +:ref:`Error` **add_animation** **(** :ref:`StringName` name, :ref:`Animation` animation **)** Adds the ``animation`` to the library, accessible by the key ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationLibrary_method_get_animation: -- :ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| 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_AnimationLibrary_method_get_animation_list: -- :ref:`StringName[]` **get_animation_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName[]` **get_animation_list** **(** **)** |const| Returns the keys for the :ref:`Animation`\ s stored in the library. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationLibrary_method_has_animation: -- :ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the library stores an :ref:`Animation` with ``name`` as the key. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationLibrary_method_remove_animation: -- void **remove_animation** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_animation** **(** :ref:`StringName` name **)** Removes the :ref:`Animation` with the key ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationLibrary_method_rename_animation: -- void **rename_animation** **(** :ref:`StringName` name, :ref:`StringName` newname **)** +.. rst-class:: classref-method + +void **rename_animation** **(** :ref:`StringName` name, :ref:`StringName` newname **)** Changes the key of the :ref:`Animation` associated with the key ``name`` to ``newname``. diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 30014dc94..49edf9ffc 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -16,6 +16,8 @@ AnimationNode Base resource for :ref:`AnimationTree` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,168 +25,255 @@ Base resource for :ref:`AnimationTree` nodes. In general, i Inherit this when creating nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+--------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filter_enabled` | -+-------------------------+--------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+--------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filter_enabled` | + +-------------------------+--------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root **)** |virtual| |const| | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_input` **(** :ref:`String` name **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`blend_animation` **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` seek_root, :ref:`float` blend, :ref:`int` pingponged=0 **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`blend_input` **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`blend_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_input_count` **(** **)** |const| | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_input_name` **(** :ref:`int` input **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking **)** |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :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:`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:`int` | :ref:`get_input_count` **(** **)** |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_input_name` **(** :ref:`int` input **)** | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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 **)** | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationNode_signal_removed_from_graph: -- **removed_from_graph** **(** **)** +.. rst-class:: classref-signal + +**removed_from_graph** **(** **)** Emitted when the node was removed from the graph. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_signal_tree_changed: -- **tree_changed** **(** **)** +.. rst-class:: classref-signal + +**tree_changed** **(** **)** Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AnimationNode_FilterAction: -.. _class_AnimationNode_constant_FILTER_IGNORE: - -.. _class_AnimationNode_constant_FILTER_PASS: - -.. _class_AnimationNode_constant_FILTER_STOP: - -.. _class_AnimationNode_constant_FILTER_BLEND: +.. rst-class:: classref-enumeration enum **FilterAction**: -- **FILTER_IGNORE** = **0** --- Do not use filtering. +.. _class_AnimationNode_constant_FILTER_IGNORE: -- **FILTER_PASS** = **1** --- Paths matching the filter will be allowed to pass. +.. rst-class:: classref-enumeration-constant -- **FILTER_STOP** = **2** --- Paths matching the filter will be discarded. +:ref:`FilterAction` **FILTER_IGNORE** = ``0`` -- **FILTER_BLEND** = **3** --- Paths matching the filter will be blended (by the blend value). +Do not use filtering. + +.. _class_AnimationNode_constant_FILTER_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`FilterAction` **FILTER_PASS** = ``1`` + +Paths matching the filter will be allowed to pass. + +.. _class_AnimationNode_constant_FILTER_STOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`FilterAction` **FILTER_STOP** = ``2`` + +Paths matching the filter will be discarded. + +.. _class_AnimationNode_constant_FILTER_BLEND: + +.. rst-class:: classref-enumeration-constant + +:ref:`FilterAction` **FILTER_BLEND** = ``3`` + +Paths matching the filter will be blended (by the blend value). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNode_property_filter_enabled: -- :ref:`bool` **filter_enabled** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_filter_enabled(value) | -+----------+---------------------------+ -| *Getter* | is_filter_enabled() | -+----------+---------------------------+ +:ref:`bool` **filter_enabled** + +.. rst-class:: classref-property-setget + +- void **set_filter_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_filter_enabled** **(** **)** If ``true``, filtering is enabled. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimationNode_method__get_caption: -- :ref:`String` **_get_caption** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_caption** **(** **)** |virtual| |const| When inheriting from :ref:`AnimationRootNode`, implement this virtual method to override the text caption for this node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method__get_child_by_name: -- :ref:`AnimationNode` **_get_child_by_name** **(** :ref:`StringName` name **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`AnimationNode` **_get_child_by_name** **(** :ref:`StringName` name **)** |virtual| |const| When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a child node by its ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method__get_child_nodes: -- :ref:`Dictionary` **_get_child_nodes** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_child_nodes** **(** **)** |virtual| |const| When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return all children nodes in order as a ``name: node`` dictionary. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method__get_parameter_default_value: -- :ref:`Variant` **_get_parameter_default_value** **(** :ref:`StringName` parameter **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_parameter_default_value** **(** :ref:`StringName` parameter **)** |virtual| |const| 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 nodes, given a resource can be reused in multiple trees. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method__get_parameter_list: -- :ref:`Array` **_get_parameter_list** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Array` **_get_parameter_list** **(** **)** |virtual| |const| When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this node. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method__has_filter: -- :ref:`bool` **_has_filter** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_filter** **(** **)** |virtual| |const| When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the blend tree editor should display filter editing on this node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method__process: -- :ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking **)** |virtual| |const| When inheriting from :ref:`AnimationRootNode`, implement this virtual method to run some code when this node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. @@ -192,91 +281,137 @@ Here, call the :ref:`blend_input`, :ref: This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called). +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_add_input: -- void **add_input** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **add_input** **(** :ref:`String` name **)** Adds an input to the node. This is only useful for nodes created for use in an :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_blend_animation: -- void **blend_animation** **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` seek_root, :ref:`float` blend, :ref:`int` pingponged=0 **)** +.. 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 **)** 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. +A ``looped_flag`` is used by internal processing immediately after the loop. See also :ref:`LoopedFlag`. + +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_blend_input: -- :ref:`float` **blend_input** **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** +.. 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 **)** Blend an input. This is only useful for 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). +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_blend_node: -- :ref:`float` **blend_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true **)** +.. 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 **)** Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from :ref:`AnimationRootNode` instead, else editors will not display your node for addition. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_get_input_count: -- :ref:`int` **get_input_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_input_count** **(** **)** |const| Amount of inputs in this node, only useful for nodes that go into :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_get_input_name: -- :ref:`String` **get_input_name** **(** :ref:`int` input **)** +.. rst-class:: classref-method + +:ref:`String` **get_input_name** **(** :ref:`int` input **)** Gets the name of an input by index. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_get_parameter: -- :ref:`Variant` **get_parameter** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_parameter** **(** :ref:`StringName` name **)** |const| Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_is_path_filtered: -- :ref:`bool` **is_path_filtered** **(** :ref:`NodePath` path **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_path_filtered** **(** :ref:`NodePath` path **)** |const| Returns whether the given path is filtered. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_remove_input: -- void **remove_input** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_input** **(** :ref:`int` index **)** Removes an input, call this only when inactive. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_set_filter_path: -- void **set_filter_path** **(** :ref:`NodePath` path, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_filter_path** **(** :ref:`NodePath` path, :ref:`bool` enable **)** Adds or removes a path for the filter. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNode_method_set_parameter: -- void **set_parameter** **(** :ref:`StringName` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_parameter** **(** :ref:`StringName` name, :ref:`Variant` value **)** Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes. diff --git a/classes/class_animationnodeadd2.rst b/classes/class_animationnodeadd2.rst index 715a877c1..76fef4516 100644 --- a/classes/class_animationnodeadd2.rst +++ b/classes/class_animationnodeadd2.rst @@ -14,11 +14,15 @@ AnimationNodeAdd2 Blends two animations additively inside of an :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-introduction-group + Description ----------- A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations additively based on an amount value in the ``[0.0, 1.0]`` range. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index fb979ca44..e8ddb4ff8 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -14,6 +14,8 @@ AnimationNodeAdd3 Blends two of three animations additively inside of an :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,6 +29,8 @@ This node has three inputs: - A +add animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index 499d04373..e167ced9d 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -14,11 +14,15 @@ AnimationNodeAnimation Input animation to use in an :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-introduction-group + Description ----------- A resource to add to an :ref:`AnimationNodeBlendTree`. Only features one output set using the :ref:`animation` property. Use it as an input for :ref:`AnimationNode` that blend animations together. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,60 +32,87 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+-------------------------------------------------------------------+---------+ -| :ref:`StringName` | :ref:`animation` | ``&""`` | -+-------------------------------------------------------+-------------------------------------------------------------------+---------+ -| :ref:`PlayMode` | :ref:`play_mode` | ``0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-------------------------------------------------------------------+---------+ + | :ref:`StringName` | :ref:`animation` | ``&""`` | + +-------------------------------------------------------+-------------------------------------------------------------------+---------+ + | :ref:`PlayMode` | :ref:`play_mode` | ``0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AnimationNodeAnimation_PlayMode: -.. _class_AnimationNodeAnimation_constant_PLAY_MODE_FORWARD: - -.. _class_AnimationNodeAnimation_constant_PLAY_MODE_BACKWARD: +.. rst-class:: classref-enumeration enum **PlayMode**: -- **PLAY_MODE_FORWARD** = **0** +.. _class_AnimationNodeAnimation_constant_PLAY_MODE_FORWARD: -- **PLAY_MODE_BACKWARD** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`PlayMode` **PLAY_MODE_FORWARD** = ``0`` + + + +.. _class_AnimationNodeAnimation_constant_PLAY_MODE_BACKWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlayMode` **PLAY_MODE_BACKWARD** = ``1`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeAnimation_property_animation: -- :ref:`StringName` **animation** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``&""`` | -+-----------+----------------------+ -| *Setter* | set_animation(value) | -+-----------+----------------------+ -| *Getter* | get_animation() | -+-----------+----------------------+ +:ref:`StringName` **animation** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_animation** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_animation** **(** **)** Animation to use as an output. It is one of the animations provided by :ref:`AnimationTree.anim_player`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeAnimation_property_play_mode: -- :ref:`PlayMode` **play_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_play_mode(value) | -+-----------+----------------------+ -| *Getter* | get_play_mode() | -+-----------+----------------------+ +:ref:`PlayMode` **play_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_play_mode** **(** :ref:`PlayMode` value **)** +- :ref:`PlayMode` **get_play_mode** **(** **)** Determines the playback direction of the animation. diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index 20f68294d..b68126473 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -14,11 +14,15 @@ AnimationNodeBlend2 Blends two animations linearly inside of an :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-introduction-group + Description ----------- A resource to add to an :ref:`AnimationNodeBlendTree`. Blends two animations linearly based on an amount value in the ``[0.0, 1.0]`` range. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_animationnodeblend3.rst b/classes/class_animationnodeblend3.rst index bb6eb6d22..a6b35dee9 100644 --- a/classes/class_animationnodeblend3.rst +++ b/classes/class_animationnodeblend3.rst @@ -14,6 +14,8 @@ AnimationNodeBlend3 Blends two of three animations linearly inside of an :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,6 +29,8 @@ This node has three inputs: - A +blend animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index ed011d08c..272a6f38d 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -14,6 +14,8 @@ AnimationNodeBlendSpace1D Blends linearly between two of any number of :ref:`AnimationNode` of any type placed on a virtual axis. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,182 +27,235 @@ Outputs the linear blend of the two :ref:`AnimationNode`\ s You can set the extents of the axis using the :ref:`min_space` and :ref:`max_space`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+--------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`max_space` | ``1.0`` | -+-----------------------------+--------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`min_space` | ``-1.0`` | -+-----------------------------+--------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`snap` | ``0.1`` | -+-----------------------------+--------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`sync` | ``false`` | -+-----------------------------+--------------------------------------------------------------------------+-------------+ -| :ref:`String` | :ref:`value_label` | ``"value"`` | -+-----------------------------+--------------------------------------------------------------------------+-------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`max_space` | ``1.0`` | + +-----------------------------+--------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`min_space` | ``-1.0`` | + +-----------------------------+--------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`snap` | ``0.1`` | + +-----------------------------+--------------------------------------------------------------------------+-------------+ + | :ref:`bool` | :ref:`sync` | ``false`` | + +-----------------------------+--------------------------------------------------------------------------+-------------+ + | :ref:`String` | :ref:`value_label` | ``"value"`` | + +-----------------------------+--------------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeBlendSpace1D_property_max_space: -- :ref:`float` **max_space** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_max_space(value) | -+-----------+----------------------+ -| *Getter* | get_max_space() | -+-----------+----------------------+ +:ref:`float` **max_space** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_space** **(** :ref:`float` value **)** +- :ref:`float` **get_max_space** **(** **)** The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_property_min_space: -- :ref:`float` **min_space** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``-1.0`` | -+-----------+----------------------+ -| *Setter* | set_min_space(value) | -+-----------+----------------------+ -| *Getter* | get_min_space() | -+-----------+----------------------+ +:ref:`float` **min_space** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_min_space** **(** :ref:`float` value **)** +- :ref:`float` **get_min_space** **(** **)** The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_property_snap: -- :ref:`float` **snap** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.1`` | -+-----------+-----------------+ -| *Setter* | set_snap(value) | -+-----------+-----------------+ -| *Getter* | get_snap() | -+-----------+-----------------+ +:ref:`float` **snap** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_snap** **(** :ref:`float` value **)** +- :ref:`float` **get_snap** **(** **)** Position increment to snap to when moving a point on the axis. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_property_sync: -- :ref:`bool` **sync** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_use_sync(value) | -+-----------+---------------------+ -| *Getter* | is_using_sync() | -+-----------+---------------------+ +:ref:`bool` **sync** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_sync** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_sync** **(** **)** If ``false``, the blended animations' frame are stopped when the blend value is ``0``. If ``true``, forcing the blended animations to advance frame. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_property_value_label: -- :ref:`String` **value_label** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``"value"`` | -+-----------+------------------------+ -| *Setter* | set_value_label(value) | -+-----------+------------------------+ -| *Getter* | get_value_label() | -+-----------+------------------------+ +:ref:`String` **value_label** = ``"value"`` + +.. rst-class:: classref-property-setget + +- void **set_value_label** **(** :ref:`String` value **)** +- :ref:`String` **get_value_label** **(** **)** Label of the virtual axis of the blend space. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimationNodeBlendSpace1D_method_add_blend_point: -- void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`int` at_index=-1 **)** +.. rst-class:: classref-method + +void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`int` at_index=-1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count: -- :ref:`int` **get_blend_point_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_blend_point_count** **(** **)** |const| Returns the number of points on the blend axis. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node: -- :ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** |const| +.. rst-class:: classref-method + +:ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** |const| Returns the :ref:`AnimationNode` referenced by the point at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position: -- :ref:`float` **get_blend_point_position** **(** :ref:`int` point **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_blend_point_position** **(** :ref:`int` point **)** |const| Returns the position of the point at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point: -- void **remove_blend_point** **(** :ref:`int` point **)** +.. rst-class:: classref-method + +void **remove_blend_point** **(** :ref:`int` point **)** Removes the point at index ``point`` from the blend axis. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node: -- void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** +.. rst-class:: classref-method + +void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** Changes the :ref:`AnimationNode` referenced by the point at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position: -- void **set_blend_point_position** **(** :ref:`int` point, :ref:`float` pos **)** +.. rst-class:: classref-method + +void **set_blend_point_position** **(** :ref:`int` point, :ref:`float` pos **)** Updates the position of the point at index ``point`` on the blend axis. diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index 882f8011f..622791deb 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -14,6 +14,8 @@ AnimationNodeBlendSpace2D Blends linearly between three :ref:`AnimationNode` of any type placed in a 2D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ This node allows you to blend linearly between three animations using a :ref:`Ve You can add vertices to the blend space with :ref:`add_blend_point` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle` and :ref:`remove_triangle` to create up the blend space by hand. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,299 +34,397 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`auto_triangles` | ``true`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`max_space` | ``Vector2(1, 1)`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`min_space` | ``Vector2(-1, -1)`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`snap` | ``Vector2(0.1, 0.1)`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`sync` | ``false`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`x_label` | ``"x"`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`y_label` | ``"y"`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`auto_triangles` | ``true`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`max_space` | ``Vector2(1, 1)`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`min_space` | ``Vector2(-1, -1)`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`snap` | ``Vector2(0.1, 0.1)`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`sync` | ``false`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`x_label` | ``"x"`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`y_label` | ``"y"`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationNodeBlendSpace2D_signal_triangles_updated: -- **triangles_updated** **(** **)** +.. rst-class:: classref-signal + +**triangles_updated** **(** **)** Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AnimationNodeBlendSpace2D_BlendMode: -.. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_INTERPOLATED: - -.. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_DISCRETE: - -.. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_DISCRETE_CARRY: +.. rst-class:: classref-enumeration enum **BlendMode**: -- **BLEND_MODE_INTERPOLATED** = **0** --- The interpolation between animations is linear. +.. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_INTERPOLATED: -- **BLEND_MODE_DISCRETE** = **1** --- The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations. +.. rst-class:: classref-enumeration-constant -- **BLEND_MODE_DISCRETE_CARRY** = **2** --- Similar to :ref:`BLEND_MODE_DISCRETE`, but starts the new animation at the last animation's playback position. +:ref:`BlendMode` **BLEND_MODE_INTERPOLATED** = ``0`` + +The interpolation between animations is linear. + +.. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_DISCRETE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_DISCRETE** = ``1`` + +The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations. + +.. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_DISCRETE_CARRY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_DISCRETE_CARRY** = ``2`` + +Similar to :ref:`BLEND_MODE_DISCRETE`, but starts the new animation at the last animation's playback position. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeBlendSpace2D_property_auto_triangles: -- :ref:`bool` **auto_triangles** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------+ -| *Setter* | set_auto_triangles(value) | -+-----------+---------------------------+ -| *Getter* | get_auto_triangles() | -+-----------+---------------------------+ +:ref:`bool` **auto_triangles** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_auto_triangles** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_property_blend_mode: -- :ref:`BlendMode` **blend_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_blend_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_blend_mode() | -+-----------+-----------------------+ +:ref:`BlendMode` **blend_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_blend_mode** **(** :ref:`BlendMode` value **)** +- :ref:`BlendMode` **get_blend_mode** **(** **)** Controls the interpolation between animations. See :ref:`BlendMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_property_max_space: -- :ref:`Vector2` **max_space** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_max_space(value) | -+-----------+----------------------+ -| *Getter* | get_max_space() | -+-----------+----------------------+ +:ref:`Vector2` **max_space** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_max_space** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_max_space** **(** **)** The blend space's X and Y axes' upper limit for the points' position. See :ref:`add_blend_point`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_property_min_space: -- :ref:`Vector2` **min_space** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2(-1, -1)`` | -+-----------+----------------------+ -| *Setter* | set_min_space(value) | -+-----------+----------------------+ -| *Getter* | get_min_space() | -+-----------+----------------------+ +:ref:`Vector2` **min_space** = ``Vector2(-1, -1)`` + +.. rst-class:: classref-property-setget + +- void **set_min_space** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_min_space** **(** **)** The blend space's X and Y axes' lower limit for the points' position. See :ref:`add_blend_point`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_property_snap: -- :ref:`Vector2` **snap** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector2(0.1, 0.1)`` | -+-----------+-----------------------+ -| *Setter* | set_snap(value) | -+-----------+-----------------------+ -| *Getter* | get_snap() | -+-----------+-----------------------+ +:ref:`Vector2` **snap** = ``Vector2(0.1, 0.1)`` + +.. rst-class:: classref-property-setget + +- void **set_snap** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_snap** **(** **)** Position increment to snap to when moving a point. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_property_sync: -- :ref:`bool` **sync** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_use_sync(value) | -+-----------+---------------------+ -| *Getter* | is_using_sync() | -+-----------+---------------------+ +:ref:`bool` **sync** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_sync** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_sync** **(** **)** If ``false``, the blended animations' frame are stopped when the blend value is ``0``. If ``true``, forcing the blended animations to advance frame. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_property_x_label: -- :ref:`String` **x_label** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``"x"`` | -+-----------+--------------------+ -| *Setter* | set_x_label(value) | -+-----------+--------------------+ -| *Getter* | get_x_label() | -+-----------+--------------------+ +:ref:`String` **x_label** = ``"x"`` + +.. rst-class:: classref-property-setget + +- void **set_x_label** **(** :ref:`String` value **)** +- :ref:`String` **get_x_label** **(** **)** Name of the blend space's X axis. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_property_y_label: -- :ref:`String` **y_label** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``"y"`` | -+-----------+--------------------+ -| *Setter* | set_y_label(value) | -+-----------+--------------------+ -| *Getter* | get_y_label() | -+-----------+--------------------+ +:ref:`String` **y_label** = ``"y"`` + +.. rst-class:: classref-property-setget + +- void **set_y_label** **(** :ref:`String` value **)** +- :ref:`String` **get_y_label** **(** **)** Name of the blend space's Y axis. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimationNodeBlendSpace2D_method_add_blend_point: -- void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`Vector2` pos, :ref:`int` at_index=-1 **)** +.. rst-class:: classref-method + +void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`Vector2` pos, :ref:`int` at_index=-1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_add_triangle: -- void **add_triangle** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` at_index=-1 **)** +.. rst-class:: classref-method + +void **add_triangle** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` at_index=-1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_get_blend_point_count: -- :ref:`int` **get_blend_point_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_blend_point_count** **(** **)** |const| Returns the number of points in the blend space. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_get_blend_point_node: -- :ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** |const| +.. rst-class:: classref-method + +:ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** |const| Returns the :ref:`AnimationRootNode` referenced by the point at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_get_blend_point_position: -- :ref:`Vector2` **get_blend_point_position** **(** :ref:`int` point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_blend_point_position** **(** :ref:`int` point **)** |const| Returns the position of the point at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_get_triangle_count: -- :ref:`int` **get_triangle_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_triangle_count** **(** **)** |const| Returns the number of triangles in the blend space. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_get_triangle_point: -- :ref:`int` **get_triangle_point** **(** :ref:`int` triangle, :ref:`int` point **)** +.. rst-class:: classref-method + +:ref:`int` **get_triangle_point** **(** :ref:`int` triangle, :ref:`int` point **)** Returns the position of the point at index ``point`` in the triangle of index ``triangle``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_remove_blend_point: -- void **remove_blend_point** **(** :ref:`int` point **)** +.. rst-class:: classref-method + +void **remove_blend_point** **(** :ref:`int` point **)** Removes the point at index ``point`` from the blend space. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_remove_triangle: -- void **remove_triangle** **(** :ref:`int` triangle **)** +.. rst-class:: classref-method + +void **remove_triangle** **(** :ref:`int` triangle **)** Removes the triangle at index ``triangle`` from the blend space. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_set_blend_point_node: -- void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** +.. rst-class:: classref-method + +void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** Changes the :ref:`AnimationNode` referenced by the point at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendSpace2D_method_set_blend_point_position: -- void **set_blend_point_position** **(** :ref:`int` point, :ref:`Vector2` pos **)** +.. rst-class:: classref-method + +void **set_blend_point_position** **(** :ref:`int` point, :ref:`Vector2` pos **)** Updates the position of the point at index ``point`` on the blend axis. diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index 4b14067a5..cb4c43c9d 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -14,6 +14,8 @@ AnimationNodeBlendTree :ref:`AnimationTree` node resource that contains many blend type nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,164 +23,259 @@ This node may contain a sub-tree of any other blend type nodes, such as :ref:`An An :ref:`AnimationNodeOutput` node named ``output`` is created by default. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`graph_offset` | ``Vector2(0, 0)`` | -+-------------------------------+-------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`graph_offset` | ``Vector2(0, 0)`` | + +-------------------------------+-------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationNodeBlendTree_signal_node_changed: -- **node_changed** **(** :ref:`StringName` node_name **)** +.. rst-class:: classref-signal + +**node_changed** **(** :ref:`StringName` node_name **)** Emitted when the input port information is changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constants --------- .. _class_AnimationNodeBlendTree_constant_CONNECTION_OK: +.. rst-class:: classref-constant + +**CONNECTION_OK** = ``0`` + +The connection was successful. + .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT: +.. rst-class:: classref-constant + +**CONNECTION_ERROR_NO_INPUT** = ``1`` + +The input node is ``null``. + .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT_INDEX: +.. rst-class:: classref-constant + +**CONNECTION_ERROR_NO_INPUT_INDEX** = ``2`` + +The specified input port is out of range. + .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_OUTPUT: +.. rst-class:: classref-constant + +**CONNECTION_ERROR_NO_OUTPUT** = ``3`` + +The output node is ``null``. + .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_SAME_NODE: +.. rst-class:: classref-constant + +**CONNECTION_ERROR_SAME_NODE** = ``4`` + +Input and output nodes are the same. + .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_CONNECTION_EXISTS: -- **CONNECTION_OK** = **0** --- The connection was successful. +.. rst-class:: classref-constant -- **CONNECTION_ERROR_NO_INPUT** = **1** --- The input node is ``null``. +**CONNECTION_ERROR_CONNECTION_EXISTS** = ``5`` -- **CONNECTION_ERROR_NO_INPUT_INDEX** = **2** --- The specified input port is out of range. +The specified connection already exists. -- **CONNECTION_ERROR_NO_OUTPUT** = **3** --- The output node is ``null``. +.. rst-class:: classref-section-separator -- **CONNECTION_ERROR_SAME_NODE** = **4** --- Input and output nodes are the same. +---- -- **CONNECTION_ERROR_CONNECTION_EXISTS** = **5** --- The specified connection already exists. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeBlendTree_property_graph_offset: -- :ref:`Vector2` **graph_offset** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_graph_offset(value) | -+-----------+-------------------------+ -| *Getter* | get_graph_offset() | -+-----------+-------------------------+ +:ref:`Vector2` **graph_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_graph_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_graph_offset** **(** **)** The global offset of all sub-nodes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimationNodeBlendTree_method_add_node: -- void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** Adds an :ref:`AnimationNode` at the given ``position``. The ``name`` is used to identify the created sub-node later. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_connect_node: -- void **connect_node** **(** :ref:`StringName` input_node, :ref:`int` input_index, :ref:`StringName` output_node **)** +.. rst-class:: classref-method + +void **connect_node** **(** :ref:`StringName` input_node, :ref:`int` input_index, :ref:`StringName` output_node **)** Connects the output of an :ref:`AnimationNode` as input for another :ref:`AnimationNode`, at the input port specified by ``input_index``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_disconnect_node: -- void **disconnect_node** **(** :ref:`StringName` input_node, :ref:`int` input_index **)** +.. rst-class:: classref-method + +void **disconnect_node** **(** :ref:`StringName` input_node, :ref:`int` input_index **)** Disconnects the node connected to the specified input. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_get_node: -- :ref:`AnimationNode` **get_node** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`AnimationNode` **get_node** **(** :ref:`StringName` name **)** |const| Returns the sub-node with the specified ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_get_node_position: -- :ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| Returns the position of the sub-node with the specified ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_has_node: -- :ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| Returns ``true`` if a sub-node with specified ``name`` exists. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_remove_node: -- void **remove_node** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_node** **(** :ref:`StringName` name **)** Removes a sub-node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_rename_node: -- void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** +.. rst-class:: classref-method + +void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** Changes the name of a sub-node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeBlendTree_method_set_node_position: -- void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** Modifies the position of a sub-node. diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 015ec8227..e2dac05c5 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -14,11 +14,15 @@ AnimationNodeOneShot Plays an animation once in :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-introduction-group + Description ----------- A resource to add to an :ref:`AnimationNodeBlendTree`. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,136 +30,167 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`autorestart` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`autorestart_delay` | ``1.0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fadein_time` | ``0.0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fadeout_time` | ``0.0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`MixMode` | :ref:`mix_mode` | ``0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`autorestart` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`autorestart_delay` | ``1.0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`fadein_time` | ``0.0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`fadeout_time` | ``0.0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`MixMode` | :ref:`mix_mode` | ``0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AnimationNodeOneShot_MixMode: -.. _class_AnimationNodeOneShot_constant_MIX_MODE_BLEND: - -.. _class_AnimationNodeOneShot_constant_MIX_MODE_ADD: +.. rst-class:: classref-enumeration enum **MixMode**: -- **MIX_MODE_BLEND** = **0** +.. _class_AnimationNodeOneShot_constant_MIX_MODE_BLEND: -- **MIX_MODE_ADD** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`MixMode` **MIX_MODE_BLEND** = ``0`` + + + +.. _class_AnimationNodeOneShot_constant_MIX_MODE_ADD: + +.. rst-class:: classref-enumeration-constant + +:ref:`MixMode` **MIX_MODE_ADD** = ``1`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeOneShot_property_autorestart: -- :ref:`bool` **autorestart** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_autorestart(value) | -+-----------+------------------------+ -| *Getter* | has_autorestart() | -+-----------+------------------------+ +:ref:`bool` **autorestart** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_autorestart** **(** :ref:`bool` value **)** +- :ref:`bool` **has_autorestart** **(** **)** If ``true``, the sub-animation will restart automatically after finishing. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeOneShot_property_autorestart_delay: -- :ref:`float` **autorestart_delay** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------+ -| *Setter* | set_autorestart_delay(value) | -+-----------+------------------------------+ -| *Getter* | get_autorestart_delay() | -+-----------+------------------------------+ +:ref:`float` **autorestart_delay** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_autorestart_delay** **(** :ref:`float` value **)** +- :ref:`float` **get_autorestart_delay** **(** **)** The delay after which the automatic restart is triggered, in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeOneShot_property_autorestart_random_delay: -- :ref:`float` **autorestart_random_delay** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_autorestart_random_delay(value) | -+-----------+-------------------------------------+ -| *Getter* | get_autorestart_random_delay() | -+-----------+-------------------------------------+ +:ref:`float` **autorestart_random_delay** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_autorestart_random_delay** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeOneShot_property_fadein_time: -- :ref:`float` **fadein_time** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_fadein_time(value) | -+-----------+------------------------+ -| *Getter* | get_fadein_time() | -+-----------+------------------------+ +:ref:`float` **fadein_time** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_fadein_time** **(** :ref:`float` value **)** +- :ref:`float` **get_fadein_time** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeOneShot_property_fadeout_time: -- :ref:`float` **fadeout_time** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_fadeout_time(value) | -+-----------+-------------------------+ -| *Getter* | get_fadeout_time() | -+-----------+-------------------------+ +:ref:`float` **fadeout_time** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_fadeout_time** **(** :ref:`float` value **)** +- :ref:`float` **get_fadeout_time** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeOneShot_property_mix_mode: -- :ref:`MixMode` **mix_mode** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_mix_mode(value) | -+-----------+---------------------+ -| *Getter* | get_mix_mode() | -+-----------+---------------------+ +:ref:`MixMode` **mix_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mix_mode** **(** :ref:`MixMode` value **)** +- :ref:`MixMode` **get_mix_mode** **(** **)** .. container:: contribute diff --git a/classes/class_animationnodeoutput.rst b/classes/class_animationnodeoutput.rst index bf1a7a87b..add79da80 100644 --- a/classes/class_animationnodeoutput.rst +++ b/classes/class_animationnodeoutput.rst @@ -14,6 +14,8 @@ AnimationNodeOutput Generic output node to be added to :ref:`AnimationNodeBlendTree`. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index a89d9ad70..f7d7afb4e 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -14,6 +14,8 @@ AnimationNodeStateMachine State machine for control of animations. +.. rst-class:: classref-introduction-group + Description ----------- @@ -36,206 +38,293 @@ Contains multiple nodes representing animation states, connected in a graph. Nod +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AnimationNodeStateMachine_method_add_node: -- void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** Adds a new node to the graph. The ``position`` is used for display in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_add_transition: -- void **add_transition** **(** :ref:`StringName` from, :ref:`StringName` to, :ref:`AnimationNodeStateMachineTransition` transition **)** +.. rst-class:: classref-method + +void **add_transition** **(** :ref:`StringName` from, :ref:`StringName` to, :ref:`AnimationNodeStateMachineTransition` transition **)** Adds a transition between the given nodes. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_graph_offset: -- :ref:`Vector2` **get_graph_offset** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_graph_offset** **(** **)** |const| Returns the draw offset of the graph. Used for display in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_node: -- :ref:`AnimationNode` **get_node** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`AnimationNode` **get_node** **(** :ref:`StringName` name **)** |const| Returns the animation node with the given name. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_node_name: -- :ref:`StringName` **get_node_name** **(** :ref:`AnimationNode` node **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_node_name** **(** :ref:`AnimationNode` node **)** |const| Returns the given animation node's name. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_node_position: -- :ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| Returns the given node's coordinates. Used for display in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_transition: -- :ref:`AnimationNodeStateMachineTransition` **get_transition** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`AnimationNodeStateMachineTransition` **get_transition** **(** :ref:`int` idx **)** |const| Returns the given transition. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_transition_count: -- :ref:`int` **get_transition_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_transition_count** **(** **)** |const| Returns the number of connections in the graph. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_transition_from: -- :ref:`StringName` **get_transition_from** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_transition_from** **(** :ref:`int` idx **)** |const| Returns the given transition's start node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_get_transition_to: -- :ref:`StringName` **get_transition_to** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_transition_to** **(** :ref:`int` idx **)** |const| Returns the given transition's end node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_has_node: -- :ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the graph contains the given node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_has_transition: -- :ref:`bool` **has_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** |const| Returns ``true`` if there is a transition between the given nodes. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_remove_node: -- void **remove_node** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_node** **(** :ref:`StringName` name **)** Deletes the given node from the graph. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_remove_transition: -- void **remove_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** +.. rst-class:: classref-method + +void **remove_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** Deletes the transition between the two specified nodes. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_remove_transition_by_index: -- void **remove_transition_by_index** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **remove_transition_by_index** **(** :ref:`int` idx **)** Deletes the given transition by index. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_rename_node: -- void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** +.. rst-class:: classref-method + +void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** Renames the given node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_replace_node: -- void **replace_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node **)** +.. rst-class:: classref-method + +void **replace_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_set_graph_offset: -- void **set_graph_offset** **(** :ref:`Vector2` offset **)** +.. rst-class:: classref-method + +void **set_graph_offset** **(** :ref:`Vector2` offset **)** Sets the draw offset of the graph. Used for display in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachine_method_set_node_position: -- void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** Sets the node's coordinates. Used for display in the editor. diff --git a/classes/class_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index 8e89135a0..d8d8ed461 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -14,6 +14,8 @@ AnimationNodeStateMachinePlayback Playback control for :ref:`AnimationNodeStateMachine`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -36,103 +38,151 @@ Allows control of :ref:`AnimationTree` state machines creat +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-------------------------+---------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | -+-------------------------+-------------------------+---------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | + +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_current_length` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_current_node` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_current_play_position` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_travel_path` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_playing` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`start` **(** :ref:`StringName` node **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`travel` **(** :ref:`StringName` to_node **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`PackedStringArray` | :ref:`get_travel_path` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`start` **(** :ref:`StringName` node **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`travel` **(** :ref:`StringName` to_node **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AnimationNodeStateMachinePlayback_method_get_current_length: -- :ref:`float` **get_current_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_current_length** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachinePlayback_method_get_current_node: -- :ref:`StringName` **get_current_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_current_node** **(** **)** |const| Returns the currently playing animation state. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachinePlayback_method_get_current_play_position: -- :ref:`float` **get_current_play_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_current_play_position** **(** **)** |const| Returns the playback position within the current animation state. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachinePlayback_method_get_travel_path: -- :ref:`PackedStringArray` **get_travel_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_travel_path** **(** **)** |const| Returns the current travel path as computed internally by the A\* algorithm. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachinePlayback_method_is_playing: -- :ref:`bool` **is_playing** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_playing** **(** **)** |const| Returns ``true`` if an animation is playing. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachinePlayback_method_start: -- void **start** **(** :ref:`StringName` node **)** +.. rst-class:: classref-method + +void **start** **(** :ref:`StringName` node **)** Starts playing the given animation. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachinePlayback_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the currently playing animation. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachinePlayback_method_travel: -- void **travel** **(** :ref:`StringName` to_node **)** +.. rst-class:: classref-method + +void **travel** **(** :ref:`StringName` to_node **)** Transitions from the current state to another one, following the shortest path. diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 160bede54..a600a4433 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -16,74 +16,114 @@ AnimationNodeStateMachineTransition There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StringName` | :ref:`advance_condition` | ``&""`` | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`advance_expression` | ``""`` | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`auto_advance` | ``false`` | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`disabled` | ``false`` | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`priority` | ``1`` | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Curve` | :ref:`xfade_curve` | | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`xfade_time` | ``0.0`` | -+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`advance_expression` | ``""`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`auto_advance` | ``false`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`priority` | ``1`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Curve` | :ref:`xfade_curve` | | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`xfade_time` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed: -- **advance_condition_changed** **(** **)** +.. rst-class:: classref-signal + +**advance_condition_changed** **(** **)** Emitted when :ref:`advance_condition` is changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AnimationNodeStateMachineTransition_SwitchMode: -.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_IMMEDIATE: - -.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_SYNC: - -.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_AT_END: +.. rst-class:: classref-enumeration enum **SwitchMode**: -- **SWITCH_MODE_IMMEDIATE** = **0** --- Switch to the next state immediately. The current state will end and blend into the beginning of the new one. +.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_IMMEDIATE: -- **SWITCH_MODE_SYNC** = **1** --- Switch to the next state immediately, but will seek the new state to the playback position of the old state. +.. rst-class:: classref-enumeration-constant -- **SWITCH_MODE_AT_END** = **2** --- Wait for the current state playback to end, then switch to the beginning of the next state animation. +:ref:`SwitchMode` **SWITCH_MODE_IMMEDIATE** = ``0`` + +Switch to the next state immediately. The current state will end and blend into the beginning of the new one. + +.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_SYNC: + +.. rst-class:: classref-enumeration-constant + +:ref:`SwitchMode` **SWITCH_MODE_SYNC** = ``1`` + +Switch to the next state immediately, but will seek the new state to the playback position of the old state. + +.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_AT_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`SwitchMode` **SWITCH_MODE_AT_END** = ``2`` + +Wait for the current state playback to end, then switch to the beginning of the next state animation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeStateMachineTransition_property_advance_condition: -- :ref:`StringName` **advance_condition** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``&""`` | -+-----------+------------------------------+ -| *Setter* | set_advance_condition(value) | -+-----------+------------------------------+ -| *Getter* | get_advance_condition() | -+-----------+------------------------------+ +:ref:`StringName` **advance_condition** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_advance_condition** **(** :ref:`StringName` value **)** +- :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"``: @@ -100,113 +140,122 @@ Turn on auto advance when this condition is set. The provided name will become a +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachineTransition_property_advance_expression: -- :ref:`String` **advance_expression** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------------+ -| *Setter* | set_advance_expression(value) | -+-----------+-------------------------------+ -| *Getter* | get_advance_expression() | -+-----------+-------------------------------+ +:ref:`String` **advance_expression** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_advance_expression** **(** :ref:`String` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachineTransition_property_auto_advance: -- :ref:`bool` **auto_advance** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_auto_advance(value) | -+-----------+-------------------------+ -| *Getter* | has_auto_advance() | -+-----------+-------------------------+ +:ref:`bool` **auto_advance** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_auto_advance** **(** :ref:`bool` value **)** +- :ref:`bool` **has_auto_advance** **(** **)** Turn on the transition automatically when this state is reached. This works best with :ref:`SWITCH_MODE_AT_END`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachineTransition_property_disabled: -- :ref:`bool` **disabled** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_disabled(value) | -+-----------+---------------------+ -| *Getter* | is_disabled() | -+-----------+---------------------+ +:ref:`bool` **disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_disabled** **(** **)** Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachineTransition_property_priority: -- :ref:`int` **priority** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1`` | -+-----------+---------------------+ -| *Setter* | set_priority(value) | -+-----------+---------------------+ -| *Getter* | get_priority() | -+-----------+---------------------+ +:ref:`int` **priority** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_priority** **(** **)** Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachineTransition_property_switch_mode: -- :ref:`SwitchMode` **switch_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_switch_mode(value) | -+-----------+------------------------+ -| *Getter* | get_switch_mode() | -+-----------+------------------------+ +:ref:`SwitchMode` **switch_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_switch_mode** **(** :ref:`SwitchMode` value **)** +- :ref:`SwitchMode` **get_switch_mode** **(** **)** The transition type. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachineTransition_property_xfade_curve: -- :ref:`Curve` **xfade_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_xfade_curve(value) | -+----------+------------------------+ -| *Getter* | get_xfade_curve() | -+----------+------------------------+ +:ref:`Curve` **xfade_curve** + +.. rst-class:: classref-property-setget + +- void **set_xfade_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_xfade_curve** **(** **)** Ease curve for better control over cross-fade between this state and the next. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeStateMachineTransition_property_xfade_time: -- :ref:`float` **xfade_time** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_xfade_time(value) | -+-----------+-----------------------+ -| *Getter* | get_xfade_time() | -+-----------+-----------------------+ +:ref:`float` **xfade_time** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_xfade_time** **(** :ref:`float` value **)** +- :ref:`float` **get_xfade_time** **(** **)** The time to cross-fade between this state and the next. diff --git a/classes/class_animationnodesync.rst b/classes/class_animationnodesync.rst index 7e22fbbb2..c7234cdc1 100644 --- a/classes/class_animationnodesync.rst +++ b/classes/class_animationnodesync.rst @@ -18,27 +18,37 @@ AnimationNodeSync There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+----------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`sync` | ``false`` | -+-------------------------+----------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`sync` | ``false`` | + +-------------------------+----------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeSync_property_sync: -- :ref:`bool` **sync** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_use_sync(value) | -+-----------+---------------------+ -| *Getter* | is_using_sync() | -+-----------+---------------------+ +:ref:`bool` **sync** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_sync** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_sync** **(** **)** If ``false``, the blended animations' frame are stopped when the blend value is ``0``. diff --git a/classes/class_animationnodetimescale.rst b/classes/class_animationnodetimescale.rst index 776224b3a..89fc37aee 100644 --- a/classes/class_animationnodetimescale.rst +++ b/classes/class_animationnodetimescale.rst @@ -14,11 +14,15 @@ AnimationNodeTimeScale A time-scaling animation node to be used with :ref:`AnimationTree`. +.. rst-class:: classref-introduction-group + Description ----------- Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_animationnodetimeseek.rst b/classes/class_animationnodetimeseek.rst index a33dbb497..6395035e2 100644 --- a/classes/class_animationnodetimeseek.rst +++ b/classes/class_animationnodetimeseek.rst @@ -14,6 +14,8 @@ AnimationNodeTimeSeek A time-seeking animation node to be used with :ref:`AnimationTree`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -44,6 +46,8 @@ This node can be used to cause a seek command to happen to any sub-children of t +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index a94eac241..5aee0b55b 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -14,11 +14,15 @@ AnimationNodeTransition A generic animation transition node for :ref:`AnimationTree`. +.. rst-class:: classref-introduction-group + Description ----------- Simple state machine for cases which don't require a more advanced :ref:`AnimationNodeStateMachine`. Animations can be connected to the inputs and transition times can be specified. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,133 +32,173 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`enabled_inputs` | ``0`` | -+---------------------------+------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`from_start` | ``true`` | -+---------------------------+------------------------------------------------------------------------------+----------+ -| :ref:`Curve` | :ref:`xfade_curve` | | -+---------------------------+------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`xfade_time` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`enabled_inputs` | ``0`` | + +---------------------------+------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`from_start` | ``true`` | + +---------------------------+------------------------------------------------------------------------------+----------+ + | :ref:`Curve` | :ref:`xfade_curve` | | + +---------------------------+------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`xfade_time` | ``0.0`` | + +---------------------------+------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_input_caption` **(** :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_caption` **(** :ref:`int` input, :ref:`String` caption **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_input_caption` **(** :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_caption` **(** :ref:`int` input, :ref:`String` caption **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeTransition_property_enabled_inputs: -- :ref:`int` **enabled_inputs** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_enabled_inputs(value) | -+-----------+---------------------------+ -| *Getter* | get_enabled_inputs() | -+-----------+---------------------------+ +:ref:`int` **enabled_inputs** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_enabled_inputs** **(** :ref:`int` value **)** +- :ref:`int` **get_enabled_inputs** **(** **)** The number of enabled input ports for this node. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeTransition_property_from_start: -- :ref:`bool` **from_start** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_from_start(value) | -+-----------+-----------------------+ -| *Getter* | is_from_start() | -+-----------+-----------------------+ +:ref:`bool` **from_start** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_from_start** **(** :ref:`bool` value **)** +- :ref:`bool` **is_from_start** **(** **)** If ``true``, the destination animation is played back from the beginning when switched. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeTransition_property_xfade_curve: -- :ref:`Curve` **xfade_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_xfade_curve(value) | -+----------+------------------------+ -| *Getter* | get_xfade_curve() | -+----------+------------------------+ +:ref:`Curve` **xfade_curve** + +.. rst-class:: classref-property-setget + +- void **set_xfade_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_xfade_curve** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeTransition_property_xfade_time: -- :ref:`float` **xfade_time** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_xfade_time(value) | -+-----------+-----------------------+ -| *Getter* | get_xfade_time() | -+-----------+-----------------------+ +:ref:`float` **xfade_time** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_xfade_time** **(** :ref:`float` value **)** +- :ref:`float` **get_xfade_time** **(** **)** Cross-fading time (in seconds) between each animation connected to the inputs. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimationNodeTransition_method_get_input_caption: -- :ref:`String` **get_input_caption** **(** :ref:`int` input **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_input_caption** **(** :ref:`int` input **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeTransition_method_is_input_set_as_auto_advance: -- :ref:`bool` **is_input_set_as_auto_advance** **(** :ref:`int` input **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_input_set_as_auto_advance** **(** :ref:`int` input **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeTransition_method_set_input_as_auto_advance: -- void **set_input_as_auto_advance** **(** :ref:`int` input, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_input_as_auto_advance** **(** :ref:`int` input, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AnimationNodeTransition_method_set_input_caption: -- void **set_input_caption** **(** :ref:`int` input, :ref:`String` caption **)** +.. rst-class:: classref-method + +void **set_input_caption** **(** :ref:`int` input, :ref:`String` caption **)** .. container:: contribute diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index df0f12175..38c24e32a 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -14,6 +14,8 @@ AnimationPlayer Player of :ref:`Animation` resources. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,10 +23,12 @@ An animation player is used for general-purpose playback of :ref:`Animation` for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an ``AnimationPlayer`` node thanks to the animation tools provided by the editor. That particular example can also be implemented with a :ref:`Tween`, but it requires doing everything by code. +\ **AnimationPlayer** is more suited than :ref:`Tween` for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an **AnimationPlayer** node thanks to the animation tools provided by the editor. That particular example can also be implemented with a :ref:`Tween`, but it requires doing everything by code. Updating the target properties of animations occurs at process time. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,599 +38,804 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ -| :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:`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:`float` | :ref:`playback_speed` | ``1.0`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`reset_on_save` | ``true`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ -| :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | -+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :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:`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:`float` | :ref:`playback_speed` | ``1.0`` | + +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`reset_on_save` | ``true`` | + +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | + +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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:`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` reset=true **)** | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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:`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` reset=true **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationPlayer_signal_animation_changed: -- **animation_changed** **(** :ref:`StringName` old_name, :ref:`StringName` new_name **)** +.. rst-class:: classref-signal + +**animation_changed** **(** :ref:`StringName` old_name, :ref:`StringName` new_name **)** Emitted when a queued animation plays after the previous animation finished. See :ref:`queue`. \ **Note:** The signal is not emitted when the animation is changed via :ref:`play` or by an :ref:`AnimationTree`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_signal_animation_finished: -- **animation_finished** **(** :ref:`StringName` anim_name **)** +.. 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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_signal_animation_libraries_updated: -- **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: -- **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: -- **animation_started** **(** :ref:`StringName` anim_name **)** +.. 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: -- **caches_cleared** **(** **)** +.. rst-class:: classref-signal + +**caches_cleared** **(** **)** Notifies when the caches have been cleared, either automatically, or manually via :ref:`clear_caches`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AnimationPlayer_AnimationProcessCallback: -.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_PHYSICS: - -.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_IDLE: - -.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_MANUAL: +.. rst-class:: classref-enumeration enum **AnimationProcessCallback**: -- **ANIMATION_PROCESS_PHYSICS** = **0** --- Process animation during the physics process. This is especially useful when animating physics bodies. +.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_PHYSICS: -- **ANIMATION_PROCESS_IDLE** = **1** --- Process animation during the idle process. +.. rst-class:: classref-enumeration-constant -- **ANIMATION_PROCESS_MANUAL** = **2** --- Do not process animation. Use :ref:`advance` to process the animation manually. +:ref:`AnimationProcessCallback` **ANIMATION_PROCESS_PHYSICS** = ``0`` + +Process animation during the physics process. This is especially useful when animating physics bodies. + +.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationProcessCallback` **ANIMATION_PROCESS_IDLE** = ``1`` + +Process animation during the idle process. + +.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_MANUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationProcessCallback` **ANIMATION_PROCESS_MANUAL** = ``2`` + +Do not process animation. Use :ref:`advance` to process the animation manually. + +.. rst-class:: classref-item-separator ---- .. _enum_AnimationPlayer_AnimationMethodCallMode: -.. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_DEFERRED: - -.. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_IMMEDIATE: +.. rst-class:: classref-enumeration enum **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. +.. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_DEFERRED: -- **ANIMATION_METHOD_CALL_IMMEDIATE** = **1** --- Make method calls immediately when reached in the animation. +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_IMMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationMethodCallMode` **ANIMATION_METHOD_CALL_IMMEDIATE** = ``1`` + +Make method calls immediately when reached in the animation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationPlayer_property_assigned_animation: -- :ref:`String` **assigned_animation** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_assigned_animation(value) | -+----------+-------------------------------+ -| *Getter* | get_assigned_animation() | -+----------+-------------------------------+ +:ref:`String` **assigned_animation** + +.. rst-class:: classref-property-setget + +- void **set_assigned_animation** **(** :ref:`String` value **)** +- :ref:`String` **get_assigned_animation** **(** **)** If playing, the 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`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_autoplay: -- :ref:`String` **autoplay** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_autoplay(value) | -+-----------+---------------------+ -| *Getter* | get_autoplay() | -+-----------+---------------------+ +:ref:`String` **autoplay** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_autoplay** **(** :ref:`String` value **)** +- :ref:`String` **get_autoplay** **(** **)** The key of the animation to play when the scene loads. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_current_animation: -- :ref:`String` **current_animation** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``""`` | -+-----------+------------------------------+ -| *Setter* | set_current_animation(value) | -+-----------+------------------------------+ -| *Getter* | get_current_animation() | -+-----------+------------------------------+ +:ref:`String` **current_animation** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_current_animation** **(** :ref:`String` value **)** +- :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. \ **Note:** While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see :ref:`Animation`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_current_animation_length: -- :ref:`float` **current_animation_length** +.. rst-class:: classref-property -+----------+--------------------------------+ -| *Getter* | get_current_animation_length() | -+----------+--------------------------------+ +:ref:`float` **current_animation_length** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_current_animation_length** **(** **)** The length (in seconds) of the currently playing animation. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_current_animation_position: -- :ref:`float` **current_animation_position** +.. rst-class:: classref-property -+----------+----------------------------------+ -| *Getter* | get_current_animation_position() | -+----------+----------------------------------+ +:ref:`float` **current_animation_position** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_current_animation_position** **(** **)** The position (in seconds) of the currently playing animation. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_method_call_mode: -- :ref:`AnimationMethodCallMode` **method_call_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_method_call_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_method_call_mode() | -+-----------+-----------------------------+ +: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: -- :ref:`bool` **movie_quit_on_finish** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------+ -| *Setter* | set_movie_quit_on_finish_enabled(value) | -+-----------+-----------------------------------------+ -| *Getter* | is_movie_quit_on_finish_enabled() | -+-----------+-----------------------------------------+ +:ref:`bool` **movie_quit_on_finish** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_movie_quit_on_finish_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_playback_active: -- :ref:`bool` **playback_active** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_active(value) | -+----------+-------------------+ -| *Getter* | is_active() | -+----------+-------------------+ +:ref:`bool` **playback_active** + +.. rst-class:: classref-property-setget + +- void **set_active** **(** :ref:`bool` value **)** +- :ref:`bool` **is_active** **(** **)** If ``true``, updates animations in response to process-related notifications. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_playback_default_blend_time: -- :ref:`float` **playback_default_blend_time** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_default_blend_time(value) | -+-----------+-------------------------------+ -| *Getter* | get_default_blend_time() | -+-----------+-------------------------------+ +:ref:`float` **playback_default_blend_time** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_default_blend_time** **(** :ref:`float` value **)** +- :ref:`float` **get_default_blend_time** **(** **)** The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_playback_process_mode: -- :ref:`AnimationProcessCallback` **playback_process_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_process_callback(value) | -+-----------+-----------------------------+ -| *Getter* | get_process_callback() | -+-----------+-----------------------------+ +:ref:`AnimationProcessCallback` **playback_process_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_process_callback** **(** :ref:`AnimationProcessCallback` value **)** +- :ref:`AnimationProcessCallback` **get_process_callback** **(** **)** The process notification in which to update animations. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_playback_speed: -- :ref:`float` **playback_speed** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **playback_speed** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_property_reset_on_save: -- :ref:`bool` **reset_on_save** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_reset_on_save_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_reset_on_save_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **reset_on_save** = ``true`` + +.. 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. 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_AnimationPlayer_property_root_node: -- :ref:`NodePath` **root_node** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``NodePath("..")`` | -+-----------+--------------------+ -| *Setter* | set_root(value) | -+-----------+--------------------+ -| *Getter* | get_root() | -+-----------+--------------------+ +:ref:`NodePath` **root_node** = ``NodePath("..")`` + +.. rst-class:: classref-property-setget + +- void **set_root** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_root** **(** **)** The node from which node path references will travel. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AnimationPlayer_method_add_animation_library: -- :ref:`Error` **add_animation_library** **(** :ref:`StringName` name, :ref:`AnimationLibrary` 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: -- void **advance** **(** :ref:`float` delta **)** +.. 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: -- :ref:`StringName` **animation_get_next** **(** :ref:`StringName` anim_from **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **animation_get_next** **(** :ref:`StringName` anim_from **)** |const| Returns the key of the animation which is queued to play after the ``anim_from`` animation. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_animation_set_next: -- void **animation_set_next** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** +.. rst-class:: classref-method + +void **animation_set_next** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** Triggers the ``anim_to`` animation when the ``anim_from`` animation completes. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_clear_caches: -- void **clear_caches** **(** **)** +.. rst-class:: classref-method -``AnimationPlayer`` caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches` forces it to update the cache again. +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. + +.. rst-class:: classref-item-separator ---- .. _class_AnimationPlayer_method_clear_queue: -- void **clear_queue** **(** **)** +.. rst-class:: classref-method + +void **clear_queue** **(** **)** Clears all queued, unplayed animations. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_find_animation: -- :ref:`StringName` **find_animation** **(** :ref:`Animation` animation **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **find_animation** **(** :ref:`Animation` animation **)** |const| Returns the key of ``animation`` or an empty :ref:`StringName` if not found. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_find_animation_library: -- :ref:`StringName` **find_animation_library** **(** :ref:`Animation` animation **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **find_animation_library** **(** :ref:`Animation` animation **)** |const| Returns the key for the :ref:`AnimationLibrary` that contains ``animation`` or an empty :ref:`StringName` if not found. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_get_animation: -- :ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| 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_AnimationPlayer_method_get_animation_library: -- :ref:`AnimationLibrary` **get_animation_library** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`AnimationLibrary` **get_animation_library** **(** :ref:`StringName` name **)** |const| Returns the first :ref:`AnimationLibrary` with key ``name`` or ``null`` if not found. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_get_animation_library_list: -- :ref:`StringName[]` **get_animation_library_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName[]` **get_animation_library_list** **(** **)** |const| Returns the list of stored library keys. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_get_animation_list: -- :ref:`PackedStringArray` **get_animation_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_animation_list** **(** **)** |const| Returns the list of stored animation keys. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_get_blend_time: -- :ref:`float` **get_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| Gets the blend time (in seconds) between two animations, referenced by their keys. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_get_playing_speed: -- :ref:`float` **get_playing_speed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_playing_speed** **(** **)** |const| Gets the actual playing speed of current animation or 0 if not playing. This speed is the :ref:`playback_speed` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_get_queue: -- :ref:`PackedStringArray` **get_queue** **(** **)** +.. 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 + ---- .. _class_AnimationPlayer_method_has_animation: -- :ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``AnimationPlayer`` stores an :ref:`Animation` with key ``name``. +:ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| + +Returns ``true`` if the **AnimationPlayer** stores an :ref:`Animation` with key ``name``. + +.. rst-class:: classref-item-separator ---- .. _class_AnimationPlayer_method_has_animation_library: -- :ref:`bool` **has_animation_library** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``AnimationPlayer`` stores an :ref:`AnimationLibrary` with key ``name``. +: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 ---- .. _class_AnimationPlayer_method_is_playing: -- :ref:`bool` **is_playing** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_playing** **(** **)** |const| Returns ``true`` if playing an animation. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_play: -- void **play** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** +.. rst-class:: classref-method + +void **play** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** Plays the animation with key ``name``. Custom blend times and speed can be set. 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, or restart if it was stopped (see :ref:`stop` for both pause and stop). If the animation was already playing, it will keep playing. +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, or restart if it was stopped (see :ref:`stop` for both pause and stop). If the animation was already playing, it will keep playing. -\ **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 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_play_backwards: -- void **play_backwards** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1 **)** +.. rst-class:: classref-method + +void **play_backwards** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1 **)** Plays the animation with key ``name`` in reverse. 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_queue: -- void **queue** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **queue** **(** :ref:`StringName` name **)** Queues an animation for playback once the current one is done. \ **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_remove_animation_library: -- void **remove_animation_library** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_animation_library** **(** :ref:`StringName` name **)** Removes the :ref:`AnimationLibrary` associated with the key ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_rename_animation_library: -- void **rename_animation_library** **(** :ref:`StringName` name, :ref:`StringName` newname **)** +.. rst-class:: classref-method + +void **rename_animation_library** **(** :ref:`StringName` name, :ref:`StringName` newname **)** Moves the :ref:`AnimationLibrary` associated with the key ``name`` to the key ``newname``. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_seek: -- void **seek** **(** :ref:`float` seconds, :ref:`bool` update=false **)** +.. rst-class:: classref-method + +void **seek** **(** :ref:`float` seconds, :ref:`bool` update=false **)** 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:** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_set_blend_time: -- void **set_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to, :ref:`float` sec **)** +.. rst-class:: classref-method + +void **set_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to, :ref:`float` sec **)** Specifies a blend time (in seconds) between two animations, referenced by their keys. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationPlayer_method_stop: -- void **stop** **(** :ref:`bool` reset=true **)** +.. rst-class:: classref-method + +void **stop** **(** :ref:`bool` reset=true **)** Stops or pauses the currently playing animation. If ``reset`` is ``true``, the animation position is reset to ``0`` and the playback speed is reset to ``1.0``. diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index 21574c469..5efb4af44 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -14,12 +14,16 @@ AnimationTree A node to be used for advanced animation transitions in an :ref:`AnimationPlayer`. +.. rst-class:: classref-introduction-group + Description ----------- A node to be used for advanced animation transitions in an :ref:`AnimationPlayer`. -\ **Note:** When linked with an :ref:`AnimationPlayer`, several properties and methods of the corresponding :ref:`AnimationPlayer` will not function as expected. Playback and transitions should be handled using only the ``AnimationTree`` and its constituent :ref:`AnimationNode`\ (s). The :ref:`AnimationPlayer` node should be used solely for adding, deleting, and editing animations. +\ **Note:** When linked with an :ref:`AnimationPlayer`, several properties and methods of the corresponding :ref:`AnimationPlayer` will not function as expected. Playback and transitions should be handled using only the **AnimationTree** and its constituent :ref:`AnimationNode`\ (s). The :ref:`AnimationPlayer` node should be used solely for adding, deleting, and editing animations. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -28,181 +32,340 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`active` | ``false`` | -+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | -+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | -+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`AnimationProcessCallback` | :ref:`process_callback` | ``1`` | -+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | -+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`AnimationNode` | :ref:`tree_root` | | -+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`active` | ``false`` | + +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | + +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | + +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`AnimationProcessCallback` | :ref:`process_callback` | ``1`` | + +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | + +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`AnimationNode` | :ref:`tree_root` | | + +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`advance` **(** :ref:`float` delta **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_root_motion_transform` **(** **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_parameter` **(** :ref:`String` old_name, :ref:`String` new_name **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`advance` **(** :ref:`float` delta **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_position` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_root_motion_rotation` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_scale` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_parameter` **(** :ref:`String` old_name, :ref:`String` new_name **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationTree_signal_animation_player_changed: -- **animation_player_changed** **(** **)** +.. rst-class:: classref-signal + +**animation_player_changed** **(** **)** Emitted when the :ref:`anim_player` is changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AnimationTree_AnimationProcessCallback: -.. _class_AnimationTree_constant_ANIMATION_PROCESS_PHYSICS: - -.. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE: - -.. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL: +.. rst-class:: classref-enumeration enum **AnimationProcessCallback**: -- **ANIMATION_PROCESS_PHYSICS** = **0** --- The animations will progress during the physics frame (i.e. :ref:`Node._physics_process`). +.. _class_AnimationTree_constant_ANIMATION_PROCESS_PHYSICS: -- **ANIMATION_PROCESS_IDLE** = **1** --- The animations will progress during the idle frame (i.e. :ref:`Node._process`). +.. rst-class:: classref-enumeration-constant -- **ANIMATION_PROCESS_MANUAL** = **2** --- The animations will only progress manually (see :ref:`advance`). +:ref:`AnimationProcessCallback` **ANIMATION_PROCESS_PHYSICS** = ``0`` + +The animations will progress during the physics frame (i.e. :ref:`Node._physics_process`). + +.. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationProcessCallback` **ANIMATION_PROCESS_IDLE** = ``1`` + +The animations will progress during the idle frame (i.e. :ref:`Node._process`). + +.. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationProcessCallback` **ANIMATION_PROCESS_MANUAL** = ``2`` + +The animations will only progress manually (see :ref:`advance`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationTree_property_active: -- :ref:`bool` **active** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_active(value) | -+-----------+-------------------+ -| *Getter* | is_active() | -+-----------+-------------------+ +:ref:`bool` **active** = ``false`` -If ``true``, the ``AnimationTree`` will be processing. +.. 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: -- :ref:`NodePath` **advance_expression_base_node** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``NodePath(".")`` | -+-----------+-----------------------------------------+ -| *Setter* | set_advance_expression_base_node(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_advance_expression_base_node() | -+-----------+-----------------------------------------+ +:ref:`NodePath` **advance_expression_base_node** = ``NodePath(".")`` + +.. rst-class:: classref-property-setget + +- void **set_advance_expression_base_node** **(** :ref:`NodePath` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationTree_property_anim_player: -- :ref:`NodePath` **anim_player** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-----------------------------+ -| *Setter* | set_animation_player(value) | -+-----------+-----------------------------+ -| *Getter* | get_animation_player() | -+-----------+-----------------------------+ +:ref:`NodePath` **anim_player** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_animation_player** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_animation_player** **(** **)** The path to the :ref:`AnimationPlayer` used for animating. +.. rst-class:: classref-item-separator + ---- .. _class_AnimationTree_property_process_callback: -- :ref:`AnimationProcessCallback` **process_callback** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_process_callback(value) | -+-----------+-----------------------------+ -| *Getter* | get_process_callback() | -+-----------+-----------------------------+ +:ref:`AnimationProcessCallback` **process_callback** = ``1`` -The process mode of this ``AnimationTree``. See :ref:`AnimationProcessCallback` for available modes. +.. 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: -- :ref:`NodePath` **root_motion_track** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------------+ -| *Setter* | set_root_motion_track(value) | -+-----------+------------------------------+ -| *Getter* | get_root_motion_track() | -+-----------+------------------------------+ +: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 cancelled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_transform` and :ref:`RootMotionView`. +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 cancelled 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: -- :ref:`AnimationNode` **tree_root** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_tree_root(value) | -+----------+----------------------+ -| *Getter* | get_tree_root() | -+----------+----------------------+ +:ref:`AnimationNode` **tree_root** -The root animation node of this ``AnimationTree``. See :ref:`AnimationNode`. +.. rst-class:: classref-property-setget + +- void **set_tree_root** **(** :ref:`AnimationNode` value **)** +- :ref:`AnimationNode` **get_tree_root** **(** **)** + +The root animation node of this **AnimationTree**. See :ref:`AnimationNode`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AnimationTree_method_advance: -- void **advance** **(** :ref:`float` delta **)** +.. rst-class:: classref-method + +void **advance** **(** :ref:`float` delta **)** Manually advance the animations by the specified time (in seconds). +.. rst-class:: classref-item-separator + ---- -.. _class_AnimationTree_method_get_root_motion_transform: +.. _class_AnimationTree_method_get_root_motion_position: -- :ref:`Transform3D` **get_root_motion_transform** **(** **)** |const| +.. rst-class:: classref-method -Retrieve the motion of the :ref:`root_motion_track` as a :ref:`Transform3D` that can be used elsewhere. If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_SCALE_3D` or :ref:`Animation.TYPE_ROTATION_3D`, returns an identity transformation. See also :ref:`root_motion_track` and :ref:`RootMotionView`. +:ref:`Vector3` **get_root_motion_position** **(** **)** |const| + +Retrieve the motion 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() + + + +.. 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 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_scale: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_scale** **(** **)** |const| + +Retrieve the motion 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_rename_parameter: -- void **rename_parameter** **(** :ref:`String` old_name, :ref:`String` new_name **)** +.. rst-class:: classref-method + +void **rename_parameter** **(** :ref:`String` old_name, :ref:`String` new_name **)** .. container:: contribute diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 63210b914..875a7b8fd 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -14,6 +14,8 @@ Area2D 2D area for detection and physics and audio influence. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ To give the area its shape, add a :ref:`CollisionShape2D \ **Warning:** See :ref:`ConcavePolygonShape2D` for a warning about possibly unexpected behavior when using that shape for an area. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,84 +38,110 @@ Tutorials - `2D Platformer Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`angular_damp` | ``1.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`SpaceOverride` | :ref:`angular_damp_space_override` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`StringName` | :ref:`audio_bus_name` | ``&"Master"`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`audio_bus_override` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`gravity` | ``980.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`gravity_direction` | ``Vector2(0, 1)`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`gravity_point` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`gravity_point_center` | ``Vector2(0, 1)`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`gravity_point_distance_scale` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`SpaceOverride` | :ref:`gravity_space_override` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`linear_damp` | ``0.1`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`SpaceOverride` | :ref:`linear_damp_space_override` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`monitorable` | ``true`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`monitoring` | ``true`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`priority` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`angular_damp` | ``1.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`SpaceOverride` | :ref:`angular_damp_space_override` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`StringName` | :ref:`audio_bus_name` | ``&"Master"`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`audio_bus_override` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`gravity` | ``980.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`gravity_direction` | ``Vector2(0, 1)`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`gravity_point` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`gravity_point_center` | ``Vector2(0, 1)`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`gravity_point_distance_scale` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`SpaceOverride` | :ref:`gravity_space_override` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`linear_damp` | ``0.1`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`SpaceOverride` | :ref:`linear_damp_space_override` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`monitorable` | ``true`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`monitoring` | ``true`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`priority` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------+ -| :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| | -+-------------------------------+----------------------------------------------------------------------------------------------------------+ +.. 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| | + +-------------------------------+----------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Area2D_signal_area_entered: -- **area_entered** **(** :ref:`Area2D` area **)** +.. rst-class:: classref-signal + +**area_entered** **(** :ref:`Area2D` area **)** Emitted when another Area2D enters this Area2D. Requires :ref:`monitoring` to be set to ``true``. \ ``area`` the other Area2D. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_signal_area_exited: -- **area_exited** **(** :ref:`Area2D` area **)** +.. rst-class:: classref-signal + +**area_exited** **(** :ref:`Area2D` area **)** Emitted when another Area2D exits this Area2D. Requires :ref:`monitoring` to be set to ``true``. \ ``area`` the other Area2D. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_signal_area_shape_entered: -- **area_shape_entered** **(** :ref:`RID` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**area_shape_entered** **(** :ref:`RID` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** Emitted when one of another Area2D's :ref:`Shape2D`\ s enters one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. @@ -123,11 +153,15 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s enters one \ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_signal_area_shape_exited: -- **area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** Emitted when one of another Area2D's :ref:`Shape2D`\ s exits one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. @@ -139,31 +173,43 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s exits one \ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_signal_body_entered: -- **body_entered** **(** :ref:`Node2D` body **)** +.. rst-class:: classref-signal + +**body_entered** **(** :ref:`Node2D` body **)** Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` enters this Area2D. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_signal_body_exited: -- **body_exited** **(** :ref:`Node2D` body **)** +.. rst-class:: classref-signal + +**body_exited** **(** :ref:`Node2D` body **)** Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` exits this Area2D. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_signal_body_shape_entered: -- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s enters one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. @@ -175,11 +221,15 @@ Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap \ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_signal_body_shape_exited: -- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s exits one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. @@ -191,336 +241,411 @@ Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap \ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Area2D_SpaceOverride: -.. _class_Area2D_constant_SPACE_OVERRIDE_DISABLED: - -.. _class_Area2D_constant_SPACE_OVERRIDE_COMBINE: - -.. _class_Area2D_constant_SPACE_OVERRIDE_COMBINE_REPLACE: - -.. _class_Area2D_constant_SPACE_OVERRIDE_REPLACE: - -.. _class_Area2D_constant_SPACE_OVERRIDE_REPLACE_COMBINE: +.. rst-class:: classref-enumeration enum **SpaceOverride**: -- **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping. +.. _class_Area2D_constant_SPACE_OVERRIDE_DISABLED: -- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order). +.. rst-class:: classref-enumeration-constant -- **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order), ignoring any lower priority areas. +:ref:`SpaceOverride` **SPACE_OVERRIDE_DISABLED** = ``0`` -- **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. +This area does not affect gravity/damping. -- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. +.. _class_Area2D_constant_SPACE_OVERRIDE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_COMBINE** = ``1`` + +This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order). + +.. _class_Area2D_constant_SPACE_OVERRIDE_COMBINE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_COMBINE_REPLACE** = ``2`` + +This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order), ignoring any lower priority areas. + +.. _class_Area2D_constant_SPACE_OVERRIDE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_REPLACE** = ``3`` + +This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. + +.. _class_Area2D_constant_SPACE_OVERRIDE_REPLACE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_REPLACE_COMBINE** = ``4`` + +This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Area2D_property_angular_damp: -- :ref:`float` **angular_damp** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_angular_damp(value) | -+-----------+-------------------------+ -| *Getter* | get_angular_damp() | -+-----------+-------------------------+ +:ref:`float` **angular_damp** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp** **(** :ref:`float` value **)** +- :ref:`float` **get_angular_damp** **(** **)** The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. See :ref:`ProjectSettings.physics/2d/default_angular_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_angular_damp_space_override: -- :ref:`SpaceOverride` **angular_damp_space_override** +.. rst-class:: classref-property -+-----------+---------------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------------+ -| *Setter* | set_angular_damp_space_override_mode(value) | -+-----------+---------------------------------------------+ -| *Getter* | get_angular_damp_space_override_mode() | -+-----------+---------------------------------------------+ +:ref:`SpaceOverride` **angular_damp_space_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** +- :ref:`SpaceOverride` **get_angular_damp_space_override_mode** **(** **)** Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_audio_bus_name: -- :ref:`StringName` **audio_bus_name** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``&"Master"`` | -+-----------+---------------------------+ -| *Setter* | set_audio_bus_name(value) | -+-----------+---------------------------+ -| *Getter* | get_audio_bus_name() | -+-----------+---------------------------+ +:ref:`StringName` **audio_bus_name** = ``&"Master"`` + +.. rst-class:: classref-property-setget + +- void **set_audio_bus_name** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_audio_bus_name** **(** **)** The name of the area's audio bus. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_audio_bus_override: -- :ref:`bool` **audio_bus_override** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_audio_bus_override(value) | -+-----------+-------------------------------+ -| *Getter* | is_overriding_audio_bus() | -+-----------+-------------------------------+ +:ref:`bool` **audio_bus_override** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_audio_bus_override** **(** :ref:`bool` value **)** +- :ref:`bool` **is_overriding_audio_bus** **(** **)** If ``true``, the area's audio bus overrides the default audio bus. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_gravity: -- :ref:`float` **gravity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``980.0`` | -+-----------+--------------------+ -| *Setter* | set_gravity(value) | -+-----------+--------------------+ -| *Getter* | get_gravity() | -+-----------+--------------------+ +:ref:`float` **gravity** = ``980.0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_gravity_direction: -- :ref:`Vector2` **gravity_direction** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``Vector2(0, 1)`` | -+-----------+------------------------------+ -| *Setter* | set_gravity_direction(value) | -+-----------+------------------------------+ -| *Getter* | get_gravity_direction() | -+-----------+------------------------------+ +:ref:`Vector2` **gravity_direction** = ``Vector2(0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_direction** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_gravity_direction** **(** **)** The area's gravity vector (not normalized). +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_gravity_point: -- :ref:`bool` **gravity_point** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_gravity_is_point(value) | -+-----------+-----------------------------+ -| *Getter* | is_gravity_a_point() | -+-----------+-----------------------------+ +:ref:`bool` **gravity_point** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_is_point** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_gravity_point_center: -- :ref:`Vector2` **gravity_point_center** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``Vector2(0, 1)`` | -+-----------+---------------------------------+ -| *Setter* | set_gravity_point_center(value) | -+-----------+---------------------------------+ -| *Getter* | get_gravity_point_center() | -+-----------+---------------------------------+ +:ref:`Vector2` **gravity_point_center** = ``Vector2(0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_point_center** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_gravity_point_center** **(** **)** If gravity is a point (see :ref:`gravity_point`), this will be the point of attraction. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_gravity_point_distance_scale: -- :ref:`float` **gravity_point_distance_scale** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------------------+ -| *Setter* | set_gravity_point_distance_scale(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_gravity_point_distance_scale() | -+-----------+-----------------------------------------+ +:ref:`float` **gravity_point_distance_scale** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_point_distance_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_gravity_point_distance_scale** **(** **)** The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_gravity_space_override: -- :ref:`SpaceOverride` **gravity_space_override** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------+ -| *Setter* | set_gravity_space_override_mode(value) | -+-----------+----------------------------------------+ -| *Getter* | get_gravity_space_override_mode() | -+-----------+----------------------------------------+ +:ref:`SpaceOverride` **gravity_space_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_space_override_mode** **(** :ref:`SpaceOverride` value **)** +- :ref:`SpaceOverride` **get_gravity_space_override_mode** **(** **)** Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_linear_damp: -- :ref:`float` **linear_damp** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.1`` | -+-----------+------------------------+ -| *Setter* | set_linear_damp(value) | -+-----------+------------------------+ -| *Getter* | get_linear_damp() | -+-----------+------------------------+ +:ref:`float` **linear_damp** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp** **(** :ref:`float` value **)** +- :ref:`float` **get_linear_damp** **(** **)** The rate at which objects stop moving in this area. Represents the linear velocity lost per second. See :ref:`ProjectSettings.physics/2d/default_linear_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_linear_damp_space_override: -- :ref:`SpaceOverride` **linear_damp_space_override** +.. rst-class:: classref-property -+-----------+--------------------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------------------+ -| *Setter* | set_linear_damp_space_override_mode(value) | -+-----------+--------------------------------------------+ -| *Getter* | get_linear_damp_space_override_mode() | -+-----------+--------------------------------------------+ +:ref:`SpaceOverride` **linear_damp_space_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** +- :ref:`SpaceOverride` **get_linear_damp_space_override_mode** **(** **)** Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_monitorable: -- :ref:`bool` **monitorable** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_monitorable(value) | -+-----------+------------------------+ -| *Getter* | is_monitorable() | -+-----------+------------------------+ +:ref:`bool` **monitorable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_monitorable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_monitorable** **(** **)** If ``true``, other monitoring areas can detect this area. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_monitoring: -- :ref:`bool` **monitoring** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_monitoring(value) | -+-----------+-----------------------+ -| *Getter* | is_monitoring() | -+-----------+-----------------------+ +:ref:`bool` **monitoring** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_monitoring** **(** :ref:`bool` value **)** +- :ref:`bool` **is_monitoring** **(** **)** If ``true``, the area detects bodies or areas entering and exiting it. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_property_priority: -- :ref:`float` **priority** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_priority(value) | -+-----------+---------------------+ -| *Getter* | get_priority() | -+-----------+---------------------+ +:ref:`float` **priority** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_priority** **(** :ref:`float` value **)** +- :ref:`float` **get_priority** **(** **)** The area's priority. Higher priority areas are processed first. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Area2D_method_get_overlapping_areas: -- :ref:`Area2D[]` **get_overlapping_areas** **(** **)** |const| +.. rst-class:: classref-method -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. +:ref:`Area2D[]` **get_overlapping_areas** **(** **)** |const| + +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. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_method_get_overlapping_bodies: -- :ref:`Node2D[]` **get_overlapping_bodies** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node2D[]` **get_overlapping_bodies** **(** **)** |const| 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. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_method_has_overlapping_areas: -- :ref:`bool` **has_overlapping_areas** **(** **)** |const| +.. rst-class:: classref-method -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. +:ref:`bool` **has_overlapping_areas** **(** **)** |const| + +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. For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_method_has_overlapping_bodies: -- :ref:`bool` **has_overlapping_bodies** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_overlapping_bodies** **(** **)** |const| 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. For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_method_overlaps_area: -- :ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the given ``Area2D`` intersects or overlaps this ``Area2D``, ``false`` otherwise. +:ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** |const| + +Returns ``true`` if the given **Area2D** intersects or overlaps this **Area2D**, ``false`` otherwise. \ **Note:** The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area2D_method_overlaps_body: -- :ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the given physics body intersects or overlaps this ``Area2D``, ``false`` otherwise. +:ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** |const| + +Returns ``true`` if the given physics body intersects or overlaps this **Area2D**, ``false`` otherwise. \ **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index a68b560db..f8b2d51cc 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -14,6 +14,8 @@ Area3D 3D area for detection and physics and audio influence. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ To give the area its shape, add a :ref:`CollisionShape3D \ **Warning:** See :ref:`ConcavePolygonShape3D` (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,98 +34,124 @@ Tutorials - `GUI in 3D Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`angular_damp` | ``0.1`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`SpaceOverride` | :ref:`angular_damp_space_override` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`StringName` | :ref:`audio_bus_name` | ``&"Master"`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`audio_bus_override` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`gravity` | ``9.8`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`gravity_direction` | ``Vector3(0, -1, 0)`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`gravity_point` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`gravity_point_center` | ``Vector3(0, -1, 0)`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`gravity_point_distance_scale` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`SpaceOverride` | :ref:`gravity_space_override` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`linear_damp` | ``0.1`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`SpaceOverride` | :ref:`linear_damp_space_override` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`monitorable` | ``true`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`monitoring` | ``true`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`priority` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`reverb_bus_amount` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`reverb_bus_enabled` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`StringName` | :ref:`reverb_bus_name` | ``&"Master"`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`reverb_bus_uniformity` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`wind_attenuation_factor` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`wind_force_magnitude` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`NodePath` | :ref:`wind_source_path` | ``NodePath("")`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`angular_damp` | ``0.1`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`SpaceOverride` | :ref:`angular_damp_space_override` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`StringName` | :ref:`audio_bus_name` | ``&"Master"`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`audio_bus_override` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`gravity` | ``9.8`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`gravity_direction` | ``Vector3(0, -1, 0)`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`gravity_point` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`gravity_point_center` | ``Vector3(0, -1, 0)`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`gravity_point_distance_scale` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`SpaceOverride` | :ref:`gravity_space_override` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`linear_damp` | ``0.1`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`SpaceOverride` | :ref:`linear_damp_space_override` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`monitorable` | ``true`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`monitoring` | ``true`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`priority` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`reverb_bus_amount` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`reverb_bus_enabled` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`StringName` | :ref:`reverb_bus_name` | ``&"Master"`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`reverb_bus_uniformity` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`wind_attenuation_factor` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`wind_force_magnitude` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`NodePath` | :ref:`wind_source_path` | ``NodePath("")`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------+ -| :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| | -+-------------------------------+----------------------------------------------------------------------------------------------------------+ +.. 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| | + +-------------------------------+----------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Area3D_signal_area_entered: -- **area_entered** **(** :ref:`Area3D` area **)** +.. rst-class:: classref-signal + +**area_entered** **(** :ref:`Area3D` area **)** Emitted when another Area3D enters this Area3D. Requires :ref:`monitoring` to be set to ``true``. \ ``area`` the other Area3D. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_signal_area_exited: -- **area_exited** **(** :ref:`Area3D` area **)** +.. rst-class:: classref-signal + +**area_exited** **(** :ref:`Area3D` area **)** Emitted when another Area3D exits this Area3D. Requires :ref:`monitoring` to be set to ``true``. \ ``area`` the other Area3D. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_signal_area_shape_entered: -- **area_shape_entered** **(** :ref:`RID` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**area_shape_entered** **(** :ref:`RID` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** Emitted when one of another Area3D's :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. @@ -133,11 +163,15 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s enters one \ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_signal_area_shape_exited: -- **area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** Emitted when one of another Area3D's :ref:`Shape3D`\ s exits one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. @@ -149,31 +183,43 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s exits one \ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_signal_body_entered: -- **body_entered** **(** :ref:`Node3D` body **)** +.. rst-class:: classref-signal + +**body_entered** **(** :ref:`Node3D` body **)** Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` enters this Area3D. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_signal_body_exited: -- **body_exited** **(** :ref:`Node3D` body **)** +.. rst-class:: classref-signal + +**body_exited** **(** :ref:`Node3D` body **)** Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` exits this Area3D. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_signal_body_shape_entered: -- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. @@ -185,11 +231,15 @@ Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap \ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_signal_body_shape_exited: -- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. @@ -201,448 +251,530 @@ Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap \ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Area3D_SpaceOverride: -.. _class_Area3D_constant_SPACE_OVERRIDE_DISABLED: - -.. _class_Area3D_constant_SPACE_OVERRIDE_COMBINE: - -.. _class_Area3D_constant_SPACE_OVERRIDE_COMBINE_REPLACE: - -.. _class_Area3D_constant_SPACE_OVERRIDE_REPLACE: - -.. _class_Area3D_constant_SPACE_OVERRIDE_REPLACE_COMBINE: +.. rst-class:: classref-enumeration enum **SpaceOverride**: -- **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping. +.. _class_Area3D_constant_SPACE_OVERRIDE_DISABLED: -- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order). +.. rst-class:: classref-enumeration-constant -- **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order), ignoring any lower priority areas. +:ref:`SpaceOverride` **SPACE_OVERRIDE_DISABLED** = ``0`` -- **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. +This area does not affect gravity/damping. -- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. +.. _class_Area3D_constant_SPACE_OVERRIDE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_COMBINE** = ``1`` + +This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order). + +.. _class_Area3D_constant_SPACE_OVERRIDE_COMBINE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_COMBINE_REPLACE** = ``2`` + +This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order), ignoring any lower priority areas. + +.. _class_Area3D_constant_SPACE_OVERRIDE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_REPLACE** = ``3`` + +This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. + +.. _class_Area3D_constant_SPACE_OVERRIDE_REPLACE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceOverride` **SPACE_OVERRIDE_REPLACE_COMBINE** = ``4`` + +This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Area3D_property_angular_damp: -- :ref:`float` **angular_damp** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.1`` | -+-----------+-------------------------+ -| *Setter* | set_angular_damp(value) | -+-----------+-------------------------+ -| *Getter* | get_angular_damp() | -+-----------+-------------------------+ +:ref:`float` **angular_damp** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp** **(** :ref:`float` value **)** +- :ref:`float` **get_angular_damp** **(** **)** The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. See :ref:`ProjectSettings.physics/3d/default_angular_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_angular_damp_space_override: -- :ref:`SpaceOverride` **angular_damp_space_override** +.. rst-class:: classref-property -+-----------+---------------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------------+ -| *Setter* | set_angular_damp_space_override_mode(value) | -+-----------+---------------------------------------------+ -| *Getter* | get_angular_damp_space_override_mode() | -+-----------+---------------------------------------------+ +:ref:`SpaceOverride` **angular_damp_space_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** +- :ref:`SpaceOverride` **get_angular_damp_space_override_mode** **(** **)** Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_audio_bus_name: -- :ref:`StringName` **audio_bus_name** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``&"Master"`` | -+-----------+---------------------------+ -| *Setter* | set_audio_bus_name(value) | -+-----------+---------------------------+ -| *Getter* | get_audio_bus_name() | -+-----------+---------------------------+ +:ref:`StringName` **audio_bus_name** = ``&"Master"`` + +.. rst-class:: classref-property-setget + +- void **set_audio_bus_name** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_audio_bus_name** **(** **)** The name of the area's audio bus. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_audio_bus_override: -- :ref:`bool` **audio_bus_override** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_audio_bus_override(value) | -+-----------+-------------------------------+ -| *Getter* | is_overriding_audio_bus() | -+-----------+-------------------------------+ +:ref:`bool` **audio_bus_override** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_audio_bus_override** **(** :ref:`bool` value **)** +- :ref:`bool` **is_overriding_audio_bus** **(** **)** If ``true``, the area's audio bus overrides the default audio bus. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_gravity: -- :ref:`float` **gravity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``9.8`` | -+-----------+--------------------+ -| *Setter* | set_gravity(value) | -+-----------+--------------------+ -| *Getter* | get_gravity() | -+-----------+--------------------+ +:ref:`float` **gravity** = ``9.8`` + +.. rst-class:: classref-property-setget + +- void **set_gravity** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_gravity_direction: -- :ref:`Vector3` **gravity_direction** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``Vector3(0, -1, 0)`` | -+-----------+------------------------------+ -| *Setter* | set_gravity_direction(value) | -+-----------+------------------------------+ -| *Getter* | get_gravity_direction() | -+-----------+------------------------------+ +:ref:`Vector3` **gravity_direction** = ``Vector3(0, -1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_direction** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_gravity_direction** **(** **)** The area's gravity vector (not normalized). +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_gravity_point: -- :ref:`bool` **gravity_point** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_gravity_is_point(value) | -+-----------+-----------------------------+ -| *Getter* | is_gravity_a_point() | -+-----------+-----------------------------+ +:ref:`bool` **gravity_point** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_is_point** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_gravity_point_center: -- :ref:`Vector3` **gravity_point_center** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``Vector3(0, -1, 0)`` | -+-----------+---------------------------------+ -| *Setter* | set_gravity_point_center(value) | -+-----------+---------------------------------+ -| *Getter* | get_gravity_point_center() | -+-----------+---------------------------------+ +:ref:`Vector3` **gravity_point_center** = ``Vector3(0, -1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_point_center** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_gravity_point_center** **(** **)** If gravity is a point (see :ref:`gravity_point`), this will be the point of attraction. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_gravity_point_distance_scale: -- :ref:`float` **gravity_point_distance_scale** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------------------+ -| *Setter* | set_gravity_point_distance_scale(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_gravity_point_distance_scale() | -+-----------+-----------------------------------------+ +:ref:`float` **gravity_point_distance_scale** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_point_distance_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_gravity_point_distance_scale** **(** **)** The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_gravity_space_override: -- :ref:`SpaceOverride` **gravity_space_override** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------+ -| *Setter* | set_gravity_space_override_mode(value) | -+-----------+----------------------------------------+ -| *Getter* | get_gravity_space_override_mode() | -+-----------+----------------------------------------+ +:ref:`SpaceOverride` **gravity_space_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_space_override_mode** **(** :ref:`SpaceOverride` value **)** +- :ref:`SpaceOverride` **get_gravity_space_override_mode** **(** **)** Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_linear_damp: -- :ref:`float` **linear_damp** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.1`` | -+-----------+------------------------+ -| *Setter* | set_linear_damp(value) | -+-----------+------------------------+ -| *Getter* | get_linear_damp() | -+-----------+------------------------+ +:ref:`float` **linear_damp** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp** **(** :ref:`float` value **)** +- :ref:`float` **get_linear_damp** **(** **)** The rate at which objects stop moving in this area. Represents the linear velocity lost per second. See :ref:`ProjectSettings.physics/3d/default_linear_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_linear_damp_space_override: -- :ref:`SpaceOverride` **linear_damp_space_override** +.. rst-class:: classref-property -+-----------+--------------------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------------------+ -| *Setter* | set_linear_damp_space_override_mode(value) | -+-----------+--------------------------------------------+ -| *Getter* | get_linear_damp_space_override_mode() | -+-----------+--------------------------------------------+ +:ref:`SpaceOverride` **linear_damp_space_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** +- :ref:`SpaceOverride` **get_linear_damp_space_override_mode** **(** **)** Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_monitorable: -- :ref:`bool` **monitorable** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_monitorable(value) | -+-----------+------------------------+ -| *Getter* | is_monitorable() | -+-----------+------------------------+ +:ref:`bool` **monitorable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_monitorable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_monitorable** **(** **)** If ``true``, other monitoring areas can detect this area. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_monitoring: -- :ref:`bool` **monitoring** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_monitoring(value) | -+-----------+-----------------------+ -| *Getter* | is_monitoring() | -+-----------+-----------------------+ +:ref:`bool` **monitoring** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_monitoring** **(** :ref:`bool` value **)** +- :ref:`bool` **is_monitoring** **(** **)** If ``true``, the area detects bodies or areas entering and exiting it. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_priority: -- :ref:`float` **priority** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_priority(value) | -+-----------+---------------------+ -| *Getter* | get_priority() | -+-----------+---------------------+ +:ref:`float` **priority** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_priority** **(** :ref:`float` value **)** +- :ref:`float` **get_priority** **(** **)** The area's priority. Higher priority areas are processed first. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_reverb_bus_amount: -- :ref:`float` **reverb_bus_amount** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_reverb_amount(value) | -+-----------+--------------------------+ -| *Getter* | get_reverb_amount() | -+-----------+--------------------------+ +:ref:`float` **reverb_bus_amount** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_reverb_amount** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_reverb_bus_enabled: -- :ref:`bool` **reverb_bus_enabled** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_use_reverb_bus(value) | -+-----------+---------------------------+ -| *Getter* | is_using_reverb_bus() | -+-----------+---------------------------+ +:ref:`bool` **reverb_bus_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_reverb_bus** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_reverb_bus** **(** **)** If ``true``, the area applies reverb to its associated audio. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_reverb_bus_name: -- :ref:`StringName` **reverb_bus_name** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``&"Master"`` | -+-----------+----------------------------+ -| *Setter* | set_reverb_bus_name(value) | -+-----------+----------------------------+ -| *Getter* | get_reverb_bus_name() | -+-----------+----------------------------+ +:ref:`StringName` **reverb_bus_name** = ``&"Master"`` + +.. rst-class:: classref-property-setget + +- void **set_reverb_bus_name** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_reverb_bus_name** **(** **)** The name of the reverb bus to use for this area's associated audio. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_reverb_bus_uniformity: -- :ref:`float` **reverb_bus_uniformity** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------+ -| *Setter* | set_reverb_uniformity(value) | -+-----------+------------------------------+ -| *Getter* | get_reverb_uniformity() | -+-----------+------------------------------+ +:ref:`float` **reverb_bus_uniformity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_reverb_uniformity** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_wind_attenuation_factor: -- :ref:`float` **wind_attenuation_factor** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------+ -| *Setter* | set_wind_attenuation_factor(value) | -+-----------+------------------------------------+ -| *Getter* | get_wind_attenuation_factor() | -+-----------+------------------------------------+ +:ref:`float` **wind_attenuation_factor** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_wind_attenuation_factor** **(** :ref:`float` value **)** +- :ref:`float` **get_wind_attenuation_factor** **(** **)** The exponential rate at which wind force decreases with distance from its origin. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_wind_force_magnitude: -- :ref:`float` **wind_force_magnitude** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_wind_force_magnitude(value) | -+-----------+---------------------------------+ -| *Getter* | get_wind_force_magnitude() | -+-----------+---------------------------------+ +:ref:`float` **wind_force_magnitude** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_wind_force_magnitude** **(** :ref:`float` value **)** +- :ref:`float` **get_wind_force_magnitude** **(** **)** The magnitude of area-specific wind force. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_property_wind_source_path: -- :ref:`NodePath` **wind_source_path** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-----------------------------+ -| *Setter* | set_wind_source_path(value) | -+-----------+-----------------------------+ -| *Getter* | get_wind_source_path() | -+-----------+-----------------------------+ +:ref:`NodePath` **wind_source_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_wind_source_path** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_wind_source_path** **(** **)** The :ref:`Node3D` which is used to specify the 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Area3D_method_get_overlapping_areas: -- :ref:`Area3D[]` **get_overlapping_areas** **(** **)** |const| +.. rst-class:: classref-method -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. +:ref:`Area3D[]` **get_overlapping_areas** **(** **)** |const| + +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. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_method_get_overlapping_bodies: -- :ref:`Node3D[]` **get_overlapping_bodies** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node3D[]` **get_overlapping_bodies** **(** **)** |const| 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. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_method_has_overlapping_areas: -- :ref:`bool` **has_overlapping_areas** **(** **)** |const| +.. rst-class:: classref-method -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. +:ref:`bool` **has_overlapping_areas** **(** **)** |const| + +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. For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_method_has_overlapping_bodies: -- :ref:`bool` **has_overlapping_bodies** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_overlapping_bodies** **(** **)** |const| 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. For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_method_overlaps_area: -- :ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the given ``Area3D`` intersects or overlaps this ``Area3D``, ``false`` otherwise. +:ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** |const| + +Returns ``true`` if the given **Area3D** intersects or overlaps this **Area3D**, ``false`` otherwise. \ **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_Area3D_method_overlaps_body: -- :ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the given physics body intersects or overlaps this ``Area3D``, ``false`` otherwise. +:ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** |const| + +Returns ``true`` if the given physics body intersects or overlaps this **Area3D**, ``false`` otherwise. \ **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. diff --git a/classes/class_array.rst b/classes/class_array.rst index 7a82faed2..d484c65b0 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -12,6 +12,8 @@ Array A generic array datatype. +.. rst-class:: classref-introduction-group + Description ----------- @@ -68,236 +70,309 @@ Arrays can be concatenated using the ``+`` operator: \ **Note:** When declaring an array with ``const``, the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using ``const`` will only prevent assigning the constant with another value after it was initialized. +.. rst-class:: classref-reftable-group + Constructors ------------ -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`back` **(** **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`Variant` value, :ref:`bool` before=true **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch_custom` **(** :ref:`Variant` value, :ref:`Callable` func, :ref:`bool` before=true **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`int` | :ref:`find_last` **(** :ref:`Variant` value **)** |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_typed` **(** **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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:`set_read_only` **(** :ref:`bool` enable **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_typed` **(** :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`typed_assign` **(** :ref:`Array` array **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`back` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`Variant` value, :ref:`bool` before=true **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch_custom` **(** :ref:`Variant` value, :ref:`Callable` func, :ref:`bool` before=true **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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_typed` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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:`set_read_only` **(** :ref:`bool` enable **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_typed` **(** :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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:`typed_assign` **(** :ref:`Array` array **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------+------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------+------------------------------------------------------------------------------------------------+ -| void | :ref:`operator []` **(** :ref:`int` index **)** | -+---------------------------+------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+-------------------------------------------------------------------------------------------------+ + | void | :ref:`operator []` **(** :ref:`int` index **)** | + +---------------------------+-------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_Array_constructor_Array: -- :ref:`Array` **Array** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``Array``. +:ref:`Array` **Array** **(** **)** + +Constructs an empty **Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Array` **Array** **(** :ref:`Array` base, :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`Array` base, :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** Creates a typed array from the ``base`` array. The base array can't be already typed. See :ref:`set_typed` for more details. ----- - -- :ref:`Array` **Array** **(** :ref:`Array` from **)** - -Constructs an ``Array`` as a copy of the given ``Array``. +.. rst-class:: classref-item-separator ---- -- :ref:`Array` **Array** **(** :ref:`PackedByteArray` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`Array` from **)** + +Constructs an **Array** as a copy of the given **Array**. + +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedByteArray` from **)** Constructs an array from a :ref:`PackedByteArray`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedColorArray` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedColorArray` from **)** Constructs an array from a :ref:`PackedColorArray`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedFloat32Array` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedFloat32Array` from **)** Constructs an array from a :ref:`PackedFloat32Array`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedFloat64Array` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedFloat64Array` from **)** Constructs an array from a :ref:`PackedFloat64Array`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedInt32Array` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedInt32Array` from **)** Constructs an array from a :ref:`PackedInt32Array`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedInt64Array` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedInt64Array` from **)** Constructs an array from a :ref:`PackedInt64Array`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedStringArray` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedStringArray` from **)** Constructs an array from a :ref:`PackedStringArray`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedVector2Array` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedVector2Array` from **)** Constructs an array from a :ref:`PackedVector2Array`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Array` **Array** **(** :ref:`PackedVector3Array` from **)** +.. rst-class:: classref-constructor + +:ref:`Array` **Array** **(** :ref:`PackedVector3Array` from **)** Constructs an array from a :ref:`PackedVector3Array`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Array_method_all: -- :ref:`bool` **all** **(** :ref:`Callable` method **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **all** **(** :ref:`Callable` method **)** |const| 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``. @@ -322,11 +397,15 @@ See also :ref:`any`, :ref:`filter`__ returns ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_any: -- :ref:`bool` **any** **(** :ref:`Callable` method **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **any** **(** :ref:`Callable` method **)** |const| 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``. @@ -351,19 +430,27 @@ See also :ref:`all`, :ref:`filter` value **)** +.. rst-class:: classref-method + +void **append** **(** :ref:`Variant` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_append_array: -- void **append_array** **(** :ref:`Array` array **)** +.. rst-class:: classref-method + +void **append_array** **(** :ref:`Array` array **)** Appends another array at the end of this array. @@ -374,67 +461,95 @@ Appends another array at the end of this array. array1.append_array(array2) print(array1) # Prints [1, 2, 3, 4, 5, 6]. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_back: -- :ref:`Variant` **back** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **back** **(** **)** |const| Returns the last element of the array. Prints an error and returns ``null`` if the array is empty. \ **Note:** Calling this function is not the same as writing ``array[-1]``. If the array is empty, accessing by index will pause project execution when running from the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`Variant` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`Variant` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_bsearch_custom: -- :ref:`int` **bsearch_custom** **(** :ref:`Variant` value, :ref:`Callable` func, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch_custom** **(** :ref:`Variant` value, :ref:`Callable` func, :ref:`bool` before=true **)** 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:** Calling :ref:`bsearch_custom` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_count: -- :ref:`int` **count** **(** :ref:`Variant` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`Variant` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_duplicate: -- :ref:`Array` **duplicate** **(** :ref:`bool` deep=false **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **duplicate** **(** :ref:`bool` deep=false **)** |const| Returns a copy of the array. If ``deep`` is ``true``, a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If ``false``, a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_erase: -- void **erase** **(** :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **erase** **(** :ref:`Variant` value **)** 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. @@ -442,11 +557,15 @@ Removes the first occurrence of a value from the array. If the value does not ex \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_fill: -- void **fill** **(** :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`Variant` value **)** 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: @@ -467,13 +586,17 @@ Assigns the given value to all elements in the array. This can typically be used -\ **Note:** If ``value`` is of a reference type (:ref:`Object`-derived, ``Array``, :ref:`Dictionary`, etc.) then the array is filled with the references to the same object, i.e. no duplicates are created. +\ **Note:** If ``value`` is of a reference type (:ref:`Object`-derived, **Array**, :ref:`Dictionary`, etc.) then the array is filled with the references to the same object, i.e. no duplicates are created. + +.. rst-class:: classref-item-separator ---- .. _class_Array_method_filter: -- :ref:`Array` **filter** **(** :ref:`Callable` method **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **filter** **(** :ref:`Callable` method **)** |const| 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``. @@ -490,61 +613,77 @@ The callable's method should take one :ref:`Variant` parameter (t See also :ref:`any`, :ref:`all`, :ref:`map` and :ref:`reduce`. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_find: -- :ref:`int` **find** **(** :ref:`Variant` what, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`Variant` what, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. ----- - -.. _class_Array_method_find_last: - -- :ref:`int` **find_last** **(** :ref:`Variant` value **)** |const| - -Searches the array in reverse order for a value and returns its index or ``-1`` if not found. +.. rst-class:: classref-item-separator ---- .. _class_Array_method_front: -- :ref:`Variant` **front** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **front** **(** **)** |const| Returns the first element of the array. Prints an error and returns ``null`` if the array is empty. \ **Note:** Calling this function is not the same as writing ``array[0]``. If the array is empty, accessing by index will pause project execution when running from the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_get_typed_builtin: -- :ref:`int` **get_typed_builtin** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`Variant.Type` constant for a typed array. If the ``Array`` is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. +:ref:`int` **get_typed_builtin** **(** **)** |const| + +Returns the :ref:`Variant.Type` constant for a typed array. If the **Array** is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. + +.. rst-class:: classref-item-separator ---- .. _class_Array_method_get_typed_class_name: -- :ref:`StringName` **get_typed_class_name** **(** **)** |const| +.. rst-class:: classref-method -Returns a class name of a typed ``Array`` of type :ref:`@GlobalScope.TYPE_OBJECT`. +:ref:`StringName` **get_typed_class_name** **(** **)** |const| + +Returns a class name of a typed **Array** of type :ref:`@GlobalScope.TYPE_OBJECT`. + +.. rst-class:: classref-item-separator ---- .. _class_Array_method_get_typed_script: -- :ref:`Variant` **get_typed_script** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_typed_script** **(** **)** |const| Returns the script associated with a typed array tied to a class name. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_has: -- :ref:`bool` **has** **(** :ref:`Variant` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`Variant` value **)** |const| Returns ``true`` if the array contains the given value. @@ -591,21 +730,29 @@ Returns ``true`` if the array contains the given value. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_hash: -- :ref:`int` **hash** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **hash** **(** **)** |const| Returns a hashed 32-bit integer value representing the array and its contents. -\ **Note:** ``Array``\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the arrays are equal, because different arrays can have identical hash values due to hash collisions. +\ **Note:** **Array**\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the arrays are equal, because different arrays can have identical hash values due to hash collisions. + +.. rst-class:: classref-item-separator ---- .. _class_Array_method_insert: -- :ref:`int` **insert** **(** :ref:`int` position, :ref:`Variant` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` position, :ref:`Variant` value **)** 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()``). @@ -613,35 +760,51 @@ Inserts a new element at a given position in the array. The position must be val \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_is_read_only: -- :ref:`bool` **is_read_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_read_only** **(** **)** |const| Returns ``true`` if the array is read-only. See :ref:`set_read_only`. Arrays are automatically read-only if declared with ``const`` keyword. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_is_typed: -- :ref:`bool` **is_typed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_typed** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_map: -- :ref:`Array` **map** **(** :ref:`Callable` method **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **map** **(** :ref:`Callable` method **)** |const| Calls the provided :ref:`Callable` for each element in the array and returns a new array filled with values returned by the method. @@ -658,27 +821,39 @@ The callable's method should take one :ref:`Variant` parameter (t See also :ref:`filter`, :ref:`reduce`, :ref:`any` and :ref:`all`. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_max: -- :ref:`Variant` **max** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **max** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_min: -- :ref:`Variant` **min** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **min** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_pick_random: -- :ref:`Variant` **pick_random** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **pick_random** **(** **)** |const| Returns a random value from the target array. @@ -687,57 +862,81 @@ Returns a random value from the target array. var array: Array\ :ref:`int` = [1, 2, 3, 4] print(array.pick_random()) # Prints either of the four numbers. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_pop_at: -- :ref:`Variant` **pop_at** **(** :ref:`int` position **)** +.. rst-class:: classref-method + +:ref:`Variant` **pop_at** **(** :ref:`int` position **)** 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. \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_pop_back: -- :ref:`Variant` **pop_back** **(** **)** +.. rst-class:: classref-method + +:ref:`Variant` **pop_back** **(** **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_pop_front: -- :ref:`Variant` **pop_front** **(** **)** +.. rst-class:: classref-method + +:ref:`Variant` **pop_front** **(** **)** 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`. \ **Note:** On large arrays, this method is much slower than :ref:`pop_back` as it will reindex all the array's elements every time it's called. The larger the array, the slower :ref:`pop_front` will be. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_push_back: -- void **push_back** **(** :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **push_back** **(** :ref:`Variant` value **)** Appends an element at the end of the array. See also :ref:`push_front`. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_push_front: -- void **push_front** **(** :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **push_front** **(** :ref:`Variant` value **)** Adds an element at the beginning of the array. See also :ref:`push_back`. \ **Note:** On large arrays, this method is much slower than :ref:`push_back` as it will reindex all the array's elements every time it's called. The larger the array, the slower :ref:`push_front` will be. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_reduce: -- :ref:`Variant` **reduce** **(** :ref:`Callable` method, :ref:`Variant` accum=null **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **reduce** **(** :ref:`Callable` method, :ref:`Variant` accum=null **)** |const| Calls the provided :ref:`Callable` for each element in array and accumulates the result in ``accum``. @@ -754,11 +953,15 @@ The callable's method takes two arguments: the current value of ``accum`` and th See also :ref:`map`, :ref:`filter`, :ref:`any` and :ref:`all`. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_remove_at: -- void **remove_at** **(** :ref:`int` position **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` position **)** 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. @@ -766,71 +969,103 @@ Removes an element from the array by index. If the index does not exist in the a \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_resize: -- :ref:`int` **resize** **(** :ref:`int` size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` size **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_rfind: -- :ref:`int` **rfind** **(** :ref:`Variant` what, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`Variant` what, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_set_read_only: -- void **set_read_only** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method -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. +void **set_read_only** **(** :ref:`bool` enable **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Array_method_set_typed: -- void **set_typed** **(** :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** +.. rst-class:: classref-method -Makes the ``Array`` typed. The ``type`` should be one of the :ref:`Variant.Type` constants. ``class_name`` is optional and can only be provided for :ref:`@GlobalScope.TYPE_OBJECT`. ``script`` can only be provided if ``class_name`` is not empty. +void **set_typed** **(** :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** + +Makes the **Array** typed. The ``type`` should be one of the :ref:`Variant.Type` constants. ``class_name`` is optional and can only be provided for :ref:`@GlobalScope.TYPE_OBJECT`. ``script`` can only be provided if ``class_name`` is not empty. The method fails if an array is already typed. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_shuffle: -- void **shuffle** **(** **)** +.. rst-class:: classref-method + +void **shuffle** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_slice: -- :ref:`Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647, :ref:`int` step=1, :ref:`bool` deep=false **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``Array``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``Array``. +:ref:`Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647, :ref:`int` step=1, :ref:`bool` deep=false **)** |const| + +Returns the slice of the **Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **Array**. 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())``). @@ -840,11 +1075,15 @@ 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. +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the array. @@ -875,11 +1114,15 @@ To perform natural order sorting, you can use :ref:`sort_custom` func **)** +.. rst-class:: classref-method + +void **sort_custom** **(** :ref:`Callable` func **)** 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. @@ -912,76 +1155,116 @@ Sorts the array using a custom method. The custom method receives two arguments +.. rst-class:: classref-item-separator + ---- .. _class_Array_method_typed_assign: -- :ref:`bool` **typed_assign** **(** :ref:`Array` array **)** +.. rst-class:: classref-method -Assigns a different ``Array`` to this array reference. It the array is typed, the new array's type must be compatible and its elements will be automatically converted. +:ref:`bool` **typed_assign** **(** :ref:`Array` array **)** + +Assigns a different **Array** to this array reference. It the array is typed, the new array's type must be compatible and its elements will be automatically converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Array_operator_neq_bool: +.. _class_Array_operator_neq_Array: -- :ref:`bool` **operator !=** **(** :ref:`Array` right **)** +.. rst-class:: classref-operator -Compares the left operand ``Array`` against the ``right`` ``Array``. Returns ``true`` if the sizes or contents of the arrays are *not* equal, ``false`` otherwise. +:ref:`bool` **operator !=** **(** :ref:`Array` right **)** + +Compares the left operand **Array** against the ``right`` **Array**. Returns ``true`` if the sizes or contents of the arrays are *not* equal, ``false`` otherwise. + +.. rst-class:: classref-item-separator ---- .. _class_Array_operator_sum_Array: -- :ref:`Array` **operator +** **(** :ref:`Array` right **)** +.. rst-class:: classref-operator -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]``. +:ref:`Array` **operator +** **(** :ref:`Array` right **)** + +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]``. + +.. rst-class:: classref-item-separator ---- -.. _class_Array_operator_lt_bool: +.. _class_Array_operator_lt_Array: -- :ref:`bool` **operator <** **(** :ref:`Array` right **)** +.. rst-class:: classref-operator -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``. +:ref:`bool` **operator <** **(** :ref:`Array` right **)** + +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``. + +.. rst-class:: classref-item-separator ---- -.. _class_Array_operator_lte_bool: +.. _class_Array_operator_lte_Array: -- :ref:`bool` **operator <=** **(** :ref:`Array` right **)** +.. rst-class:: classref-operator -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``. +:ref:`bool` **operator <=** **(** :ref:`Array` right **)** + +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``. + +.. rst-class:: classref-item-separator ---- -.. _class_Array_operator_eq_bool: +.. _class_Array_operator_eq_Array: -- :ref:`bool` **operator ==** **(** :ref:`Array` right **)** +.. rst-class:: classref-operator -Compares the left operand ``Array`` against the ``right`` ``Array``. Returns ``true`` if the sizes and contents of the arrays are equal, ``false`` otherwise. +:ref:`bool` **operator ==** **(** :ref:`Array` right **)** + +Compares the left operand **Array** against the ``right`` **Array**. Returns ``true`` if the sizes and contents of the arrays are equal, ``false`` otherwise. + +.. rst-class:: classref-item-separator ---- -.. _class_Array_operator_gt_bool: +.. _class_Array_operator_gt_Array: -- :ref:`bool` **operator >** **(** :ref:`Array` right **)** +.. rst-class:: classref-operator -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``. +:ref:`bool` **operator >** **(** :ref:`Array` right **)** + +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``. + +.. rst-class:: classref-item-separator ---- -.. _class_Array_operator_gte_bool: +.. _class_Array_operator_gte_Array: -- :ref:`bool` **operator >=** **(** :ref:`Array` right **)** +.. rst-class:: classref-operator -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``. +:ref:`bool` **operator >=** **(** :ref:`Array` right **)** + +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``. + +.. rst-class:: classref-item-separator ---- -.. _class_Array_operator_idx_void: +.. _class_Array_operator_idx_int: -- void **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +void **operator []** **(** :ref:`int` index **)** 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. diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 0d21539c8..da2973220 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -14,10 +14,12 @@ ArrayMesh :ref:`Mesh` type that provides utility for constructing a surface from arrays. +.. rst-class:: classref-introduction-group + Description ----------- -The ``ArrayMesh`` is used to construct a :ref:`Mesh` by specifying the attributes as arrays. +The **ArrayMesh** is used to construct a :ref:`Mesh` by specifying the attributes as arrays. The most basic example is the creation of a single triangle: @@ -70,128 +72,161 @@ See also :ref:`ImmediateMesh`, :ref:`MeshDataTool`__ for front faces of triangle primitive modes. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Procedural geometry using the ArrayMesh <../tutorials/3d/procedural_geometry/arraymesh>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ -| :ref:`BlendShapeMode` | :ref:`blend_shape_mode` | ``1`` | -+-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ -| :ref:`AABB` | :ref:`custom_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | -+-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ -| :ref:`ArrayMesh` | :ref:`shadow_mesh` | | -+-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ + | :ref:`BlendShapeMode` | :ref:`blend_shape_mode` | ``1`` | + +-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ + | :ref:`AABB` | :ref:`custom_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | + +-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ + | :ref:`ArrayMesh` | :ref:`shadow_mesh` | | + +-------------------------------------------------+--------------------------------------------------------------------+----------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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={}, :ref:`int` compress_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| | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :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 **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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={}, :ref:`int` compress_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| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :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 **)** | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ArrayMesh_property_blend_shape_mode: -- :ref:`BlendShapeMode` **blend_shape_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_blend_shape_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_blend_shape_mode() | -+-----------+-----------------------------+ +:ref:`BlendShapeMode` **blend_shape_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_blend_shape_mode** **(** :ref:`BlendShapeMode` value **)** +- :ref:`BlendShapeMode` **get_blend_shape_mode** **(** **)** Sets the blend shape mode to one of :ref:`BlendShapeMode`. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_property_custom_aabb: -- :ref:`AABB` **custom_aabb** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``AABB(0, 0, 0, 0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_custom_aabb(value) | -+-----------+----------------------------+ -| *Getter* | get_custom_aabb() | -+-----------+----------------------------+ +:ref:`AABB` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_custom_aabb** **(** :ref:`AABB` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_property_shadow_mesh: -- :ref:`ArrayMesh` **shadow_mesh** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_shadow_mesh(value) | -+----------+------------------------+ -| *Getter* | get_shadow_mesh() | -+----------+------------------------+ +:ref:`ArrayMesh` **shadow_mesh** + +.. rst-class:: classref-property-setget + +- void **set_shadow_mesh** **(** :ref:`ArrayMesh` value **)** +- :ref:`ArrayMesh` **get_shadow_mesh** **(** **)** .. 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 ------------------- .. _class_ArrayMesh_method_add_blend_shape: -- void **add_blend_shape** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **add_blend_shape** **(** :ref:`StringName` name **)** Adds name for a blend shape that will be added with :ref:`add_surface_from_arrays`. Must be called before surface is added. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_add_surface_from_arrays: -- void **add_surface_from_arrays** **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_flags=0 **)** +.. rst-class:: classref-method + +void **add_surface_from_arrays** **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_flags=0 **)** Creates a new surface. @@ -199,143 +234,211 @@ Surfaces are created to be rendered using a ``primitive``, which may be any of t The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for :ref:`Mesh.ARRAY_INDEX` if it is used. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_clear_blend_shapes: -- void **clear_blend_shapes** **(** **)** +.. rst-class:: classref-method -Removes all blend shapes from this ``ArrayMesh``. +void **clear_blend_shapes** **(** **)** + +Removes all blend shapes from this **ArrayMesh**. + +.. rst-class:: classref-item-separator ---- .. _class_ArrayMesh_method_clear_surfaces: -- void **clear_surfaces** **(** **)** +.. rst-class:: classref-method -Removes all surfaces from this ``ArrayMesh``. +void **clear_surfaces** **(** **)** + +Removes all surfaces from this **ArrayMesh**. + +.. rst-class:: classref-item-separator ---- .. _class_ArrayMesh_method_get_blend_shape_count: -- :ref:`int` **get_blend_shape_count** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of blend shapes that the ``ArrayMesh`` holds. +:ref:`int` **get_blend_shape_count** **(** **)** |const| + +Returns the number of blend shapes that the **ArrayMesh** holds. + +.. rst-class:: classref-item-separator ---- .. _class_ArrayMesh_method_get_blend_shape_name: -- :ref:`StringName` **get_blend_shape_name** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_blend_shape_name** **(** :ref:`int` index **)** |const| Returns the name of the blend shape at this index. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_lightmap_unwrap: -- :ref:`Error` **lightmap_unwrap** **(** :ref:`Transform3D` transform, :ref:`float` texel_size **)** +.. rst-class:: classref-method -Will perform a UV unwrap on the ``ArrayMesh`` to prepare the mesh for lightmapping. +:ref:`Error` **lightmap_unwrap** **(** :ref:`Transform3D` transform, :ref:`float` texel_size **)** + +Will perform a UV unwrap on the **ArrayMesh** to prepare the mesh for lightmapping. + +.. rst-class:: classref-item-separator ---- .. _class_ArrayMesh_method_regen_normal_maps: -- void **regen_normal_maps** **(** **)** +.. rst-class:: classref-method -Will regenerate normal maps for the ``ArrayMesh``. +void **regen_normal_maps** **(** **)** + +Will regenerate normal maps for the **ArrayMesh**. + +.. rst-class:: classref-item-separator ---- .. _class_ArrayMesh_method_set_blend_shape_name: -- void **set_blend_shape_name** **(** :ref:`int` index, :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **set_blend_shape_name** **(** :ref:`int` index, :ref:`StringName` name **)** Sets the name of the blend shape at this index. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_find_by_name: -- :ref:`int` **surface_find_by_name** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method -Returns the index of the first surface with this name held within this ``ArrayMesh``. If none are found, -1 is returned. +:ref:`int` **surface_find_by_name** **(** :ref:`String` name **)** |const| + +Returns the index of the first surface with this name held within this **ArrayMesh**. If none are found, -1 is returned. + +.. rst-class:: classref-item-separator ---- .. _class_ArrayMesh_method_surface_get_array_index_len: -- :ref:`int` **surface_get_array_index_len** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **surface_get_array_index_len** **(** :ref:`int` surf_idx **)** |const| Returns the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays`). +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_get_array_len: -- :ref:`int` **surface_get_array_len** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **surface_get_array_len** **(** :ref:`int` surf_idx **)** |const| Returns the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays`). +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_get_format: -- :ref:`int` **surface_get_format** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **surface_get_format** **(** :ref:`int` surf_idx **)** |const| Returns the format mask of the requested surface (see :ref:`add_surface_from_arrays`). +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_get_name: -- :ref:`String` **surface_get_name** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **surface_get_name** **(** :ref:`int` surf_idx **)** |const| Gets the name assigned to this surface. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_get_primitive_type: -- :ref:`PrimitiveType` **surface_get_primitive_type** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`PrimitiveType` **surface_get_primitive_type** **(** :ref:`int` surf_idx **)** |const| Returns the primitive type of the requested surface (see :ref:`add_surface_from_arrays`). +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_set_name: -- void **surface_set_name** **(** :ref:`int` surf_idx, :ref:`String` name **)** +.. rst-class:: classref-method + +void **surface_set_name** **(** :ref:`int` surf_idx, :ref:`String` name **)** Sets a name for a given surface. +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_update_attribute_region: -- void **surface_update_attribute_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +void **surface_update_attribute_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_update_skin_region: -- void **surface_update_skin_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +void **surface_update_skin_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ArrayMesh_method_surface_update_vertex_region: -- void **surface_update_vertex_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +void **surface_update_vertex_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** .. container:: contribute diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index 4f1e3df26..1d8f63c1a 100644 --- a/classes/class_arrayoccluder3d.rst +++ b/classes/class_arrayoccluder3d.rst @@ -14,72 +14,98 @@ ArrayOccluder3D 3D polygon shape for use with occlusion culling in :ref:`OccluderInstance3D`. +.. rst-class:: classref-introduction-group + Description ----------- -``ArrayOccluder3D`` stores an arbitrary 3D polygon shape that can be used by the engine's occlusion culling system. This is analogous to :ref:`ArrayMesh`, but for occluders. +**ArrayOccluder3D** stores an arbitrary 3D polygon shape that can be used by the engine's occlusion culling system. This is analogous to :ref:`ArrayMesh`, but for occluders. See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+----------------------------------------------------------+--------------------------+ -| :ref:`PackedInt32Array` | :ref:`indices` | ``PackedInt32Array()`` | -+-----------------------------------------------------+----------------------------------------------------------+--------------------------+ -| :ref:`PackedVector3Array` | :ref:`vertices` | ``PackedVector3Array()`` | -+-----------------------------------------------------+----------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------+--------------------------+ + | :ref:`PackedInt32Array` | :ref:`indices` | ``PackedInt32Array()`` | + +-----------------------------------------------------+----------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array` | :ref:`vertices` | ``PackedVector3Array()`` | + +-----------------------------------------------------+----------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_arrays` **(** :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_arrays` **(** :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ArrayOccluder3D_property_indices: -- :ref:`PackedInt32Array` **indices** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_indices(value) | -+-----------+------------------------+ -| *Getter* | get_indices() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **indices** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_indices** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_indices** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ArrayOccluder3D_property_vertices: -- :ref:`PackedVector3Array` **vertices** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector3Array()`` | -+-----------+--------------------------+ -| *Setter* | set_vertices(value) | -+-----------+--------------------------+ -| *Getter* | get_vertices() | -+-----------+--------------------------+ +:ref:`PackedVector3Array` **vertices** = ``PackedVector3Array()`` + +.. rst-class:: classref-property-setget + +- void **set_vertices** **(** :ref:`PackedVector3Array` value **)** +- :ref:`PackedVector3Array` **get_vertices** **(** **)** .. 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 ------------------- .. _class_ArrayOccluder3D_method_set_arrays: -- void **set_arrays** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** +.. rst-class:: classref-method + +void **set_arrays** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** .. container:: contribute diff --git a/classes/class_aspectratiocontainer.rst b/classes/class_aspectratiocontainer.rst index f8b1dd01b..ea65e31d2 100644 --- a/classes/class_aspectratiocontainer.rst +++ b/classes/class_aspectratiocontainer.rst @@ -14,134 +14,191 @@ AspectRatioContainer Container that preserves its child controls' aspect ratio. +.. rst-class:: classref-introduction-group + Description ----------- Arranges child controls in a way to preserve their aspect ratio automatically whenever the container is resized. Solves the problem where the container size is dynamic and the contents' size needs to adjust accordingly without losing proportions. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ -| :ref:`AlignmentMode` | :ref:`alignment_horizontal` | ``1`` | -+---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ -| :ref:`AlignmentMode` | :ref:`alignment_vertical` | ``1`` | -+---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`ratio` | ``1.0`` | -+---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ -| :ref:`StretchMode` | :ref:`stretch_mode` | ``2`` | -+---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ + | :ref:`AlignmentMode` | :ref:`alignment_horizontal` | ``1`` | + +---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ + | :ref:`AlignmentMode` | :ref:`alignment_vertical` | ``1`` | + +---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`ratio` | ``1.0`` | + +---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ + | :ref:`StretchMode` | :ref:`stretch_mode` | ``2`` | + +---------------------------------------------------------------+---------------------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AspectRatioContainer_StretchMode: -.. _class_AspectRatioContainer_constant_STRETCH_WIDTH_CONTROLS_HEIGHT: - -.. _class_AspectRatioContainer_constant_STRETCH_HEIGHT_CONTROLS_WIDTH: - -.. _class_AspectRatioContainer_constant_STRETCH_FIT: - -.. _class_AspectRatioContainer_constant_STRETCH_COVER: +.. rst-class:: classref-enumeration enum **StretchMode**: -- **STRETCH_WIDTH_CONTROLS_HEIGHT** = **0** --- The height of child controls is automatically adjusted based on the width of the container. +.. _class_AspectRatioContainer_constant_STRETCH_WIDTH_CONTROLS_HEIGHT: -- **STRETCH_HEIGHT_CONTROLS_WIDTH** = **1** --- The width of child controls is automatically adjusted based on the height of the container. +.. rst-class:: classref-enumeration-constant -- **STRETCH_FIT** = **2** --- The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio. +:ref:`StretchMode` **STRETCH_WIDTH_CONTROLS_HEIGHT** = ``0`` -- **STRETCH_COVER** = **3** --- The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio. +The height of child controls is automatically adjusted based on the width of the container. + +.. _class_AspectRatioContainer_constant_STRETCH_HEIGHT_CONTROLS_WIDTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_HEIGHT_CONTROLS_WIDTH** = ``1`` + +The width of child controls is automatically adjusted based on the height of the container. + +.. _class_AspectRatioContainer_constant_STRETCH_FIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_FIT** = ``2`` + +The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio. + +.. _class_AspectRatioContainer_constant_STRETCH_COVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_COVER** = ``3`` + +The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio. When the bounding rectangle of child controls exceed the container's size and :ref:`Control.clip_contents` is enabled, this allows to show only the container's area restricted by its own bounding rectangle. +.. rst-class:: classref-item-separator + ---- .. _enum_AspectRatioContainer_AlignmentMode: -.. _class_AspectRatioContainer_constant_ALIGNMENT_BEGIN: - -.. _class_AspectRatioContainer_constant_ALIGNMENT_CENTER: - -.. _class_AspectRatioContainer_constant_ALIGNMENT_END: +.. rst-class:: classref-enumeration enum **AlignmentMode**: -- **ALIGNMENT_BEGIN** = **0** --- Aligns child controls with the beginning (left or top) of the container. +.. _class_AspectRatioContainer_constant_ALIGNMENT_BEGIN: -- **ALIGNMENT_CENTER** = **1** --- Aligns child controls with the center of the container. +.. rst-class:: classref-enumeration-constant -- **ALIGNMENT_END** = **2** --- Aligns child controls with the end (right or bottom) of the container. +:ref:`AlignmentMode` **ALIGNMENT_BEGIN** = ``0`` + +Aligns child controls with the beginning (left or top) of the container. + +.. _class_AspectRatioContainer_constant_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_CENTER** = ``1`` + +Aligns child controls with the center of the container. + +.. _class_AspectRatioContainer_constant_ALIGNMENT_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_END** = ``2`` + +Aligns child controls with the end (right or bottom) of the container. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AspectRatioContainer_property_alignment_horizontal: -- :ref:`AlignmentMode` **alignment_horizontal** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_alignment_horizontal(value) | -+-----------+---------------------------------+ -| *Getter* | get_alignment_horizontal() | -+-----------+---------------------------------+ +:ref:`AlignmentMode` **alignment_horizontal** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_alignment_horizontal** **(** :ref:`AlignmentMode` value **)** +- :ref:`AlignmentMode` **get_alignment_horizontal** **(** **)** Specifies the horizontal relative position of child controls. +.. rst-class:: classref-item-separator + ---- .. _class_AspectRatioContainer_property_alignment_vertical: -- :ref:`AlignmentMode` **alignment_vertical** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------------+ -| *Setter* | set_alignment_vertical(value) | -+-----------+-------------------------------+ -| *Getter* | get_alignment_vertical() | -+-----------+-------------------------------+ +:ref:`AlignmentMode` **alignment_vertical** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_alignment_vertical** **(** :ref:`AlignmentMode` value **)** +- :ref:`AlignmentMode` **get_alignment_vertical** **(** **)** Specifies the vertical relative position of child controls. +.. rst-class:: classref-item-separator + ---- .. _class_AspectRatioContainer_property_ratio: -- :ref:`float` **ratio** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_ratio(value) | -+-----------+------------------+ -| *Getter* | get_ratio() | -+-----------+------------------+ +:ref:`float` **ratio** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_ratio** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_AspectRatioContainer_property_stretch_mode: -- :ref:`StretchMode` **stretch_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``2`` | -+-----------+-------------------------+ -| *Setter* | set_stretch_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_stretch_mode() | -+-----------+-------------------------+ +:ref:`StretchMode` **stretch_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_mode** **(** :ref:`StretchMode` value **)** +- :ref:`StretchMode` **get_stretch_mode** **(** **)** The stretch mode used to align child controls. diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 5cb6e6d60..b41e84893 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -14,92 +14,115 @@ AStar2D AStar class representation that uses 2D vectors as edges. +.. rst-class:: classref-introduction-group + Description ----------- This is a wrapper for the :ref:`AStar3D` class which uses 2D vectors instead of 3D vectors. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AStar2D_method__compute_cost: -- :ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| Called when computing the cost between two connected points. Note that this function is hidden in the default ``AStar2D`` class. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method__estimate_cost: -- :ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| Called when estimating the cost between a point and the path's ending point. Note that this function is hidden in the default ``AStar2D`` class. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_add_point: -- void **add_point** **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** +.. rst-class:: classref-method + +void **add_point** **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** 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. @@ -122,27 +145,39 @@ The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears all the points and segments. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_connect_points: -- void **connect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +.. rst-class:: classref-method + +void **connect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** Creates a segment between the given points. If ``bidirectional`` is ``false``, only movement from ``id`` to ``to_id`` is allowed, not the reverse direction. @@ -165,37 +200,53 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_disconnect_points: -- void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +.. rst-class:: classref-method + +void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_available_point_id: -- :ref:`int` **get_available_point_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_available_point_id** **(** **)** |const| Returns the next available point ID with no point associated to it. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_closest_point: -- :ref:`int` **get_closest_point** **(** :ref:`Vector2` to_position, :ref:`bool` include_disabled=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_closest_point** **(** :ref:`Vector2` to_position, :ref:`bool` include_disabled=false **)** |const| 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. \ **Note:** If several points are the closest to ``to_position``, the one with the smallest ID will be returned, ensuring a deterministic result. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_closest_position_in_segment: -- :ref:`Vector2` **get_closest_position_in_segment** **(** :ref:`Vector2` to_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_closest_position_in_segment** **(** :ref:`Vector2` to_position **)** |const| Returns the closest position to ``to_position`` that resides inside a segment between two connected points. @@ -222,11 +273,15 @@ Returns the closest position to ``to_position`` that resides inside a segment be The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the closest position in the segment to the given point. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_id_path: -- :ref:`PackedInt64Array` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** 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. @@ -266,19 +321,27 @@ Returns an array with the IDs of the points that form the path found by AStar2D If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_point_capacity: -- :ref:`int` **get_point_capacity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_point_capacity** **(** **)** |const| Returns the capacity of the structure backing the points, useful in conjunction with ``reserve_space``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_point_connections: -- :ref:`PackedInt64Array` **get_point_connections** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **get_point_connections** **(** :ref:`int` id **)** Returns an array with the IDs of the points that form the connection with the given point. @@ -313,101 +376,149 @@ Returns an array with the IDs of the points that form the connection with the gi +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_point_count: -- :ref:`int` **get_point_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_point_count** **(** **)** |const| Returns the number of points currently in the points pool. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_point_ids: -- :ref:`PackedInt64Array` **get_point_ids** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **get_point_ids** **(** **)** Returns an array of all point IDs. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_point_path: -- :ref:`PackedVector2Array` **get_point_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_point_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_point_position: -- :ref:`Vector2` **get_point_position** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_point_position** **(** :ref:`int` id **)** |const| Returns the position of the point associated with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_get_point_weight_scale: -- :ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** |const| Returns the weight scale of the point associated with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_has_point: -- :ref:`bool` **has_point** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_point** **(** :ref:`int` id **)** |const| Returns whether a point associated with the given ``id`` exists. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_is_point_disabled: -- :ref:`bool` **is_point_disabled** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_point_disabled** **(** :ref:`int` id **)** |const| Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_remove_point: -- void **remove_point** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_point** **(** :ref:`int` id **)** Removes the point associated with the given ``id`` from the points pool. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_reserve_space: -- void **reserve_space** **(** :ref:`int` num_nodes **)** +.. rst-class:: classref-method + +void **reserve_space** **(** :ref:`int` num_nodes **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_set_point_disabled: -- void **set_point_disabled** **(** :ref:`int` id, :ref:`bool` disabled=true **)** +.. rst-class:: classref-method + +void **set_point_disabled** **(** :ref:`int` id, :ref:`bool` disabled=true **)** Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_set_point_position: -- void **set_point_position** **(** :ref:`int` id, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_point_position** **(** :ref:`int` id, :ref:`Vector2` position **)** Sets the ``position`` for the point with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar2D_method_set_point_weight_scale: -- void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** +.. rst-class:: classref-method + +void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** 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. diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index 778a29435..aafcecf13 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -14,6 +14,8 @@ AStar3D An implementation of A\* to find the shortest paths among connected points in space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -57,87 +59,108 @@ It is also possible to use non-Euclidean distances. To do so, create a class tha 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 + Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AStar3D_method__compute_cost: -- :ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| Called when computing the cost between two connected points. Note that this function is hidden in the default ``AStar3D`` class. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method__estimate_cost: -- :ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_add_point: -- void **add_point** **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** +.. rst-class:: classref-method + +void **add_point** **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** 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. @@ -160,27 +183,39 @@ The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears all the points and segments. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_connect_points: -- void **connect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +.. rst-class:: classref-method + +void **connect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** Creates a segment between the given points. If ``bidirectional`` is ``false``, only movement from ``id`` to ``to_id`` is allowed, not the reverse direction. @@ -203,37 +238,53 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_disconnect_points: -- void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +.. rst-class:: classref-method + +void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_available_point_id: -- :ref:`int` **get_available_point_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_available_point_id** **(** **)** |const| Returns the next available point ID with no point associated to it. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_closest_point: -- :ref:`int` **get_closest_point** **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_closest_point** **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** |const| 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. \ **Note:** If several points are the closest to ``to_position``, the one with the smallest ID will be returned, ensuring a deterministic result. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_closest_position_in_segment: -- :ref:`Vector3` **get_closest_position_in_segment** **(** :ref:`Vector3` to_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_closest_position_in_segment** **(** :ref:`Vector3` to_position **)** |const| Returns the closest position to ``to_position`` that resides inside a segment between two connected points. @@ -260,11 +311,15 @@ Returns the closest position to ``to_position`` that resides inside a segment be The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the closest position in the segment to the given point. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_id_path: -- :ref:`PackedInt64Array` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** 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. @@ -303,19 +358,27 @@ Returns an array with the IDs of the points that form the path found by AStar3D If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_point_capacity: -- :ref:`int` **get_point_capacity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_point_capacity** **(** **)** |const| Returns the capacity of the structure backing the points, useful in conjunction with ``reserve_space``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_point_connections: -- :ref:`PackedInt64Array` **get_point_connections** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **get_point_connections** **(** :ref:`int` id **)** Returns an array with the IDs of the points that form the connection with the given point. @@ -349,101 +412,149 @@ Returns an array with the IDs of the points that form the connection with the gi +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_point_count: -- :ref:`int` **get_point_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_point_count** **(** **)** |const| Returns the number of points currently in the points pool. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_point_ids: -- :ref:`PackedInt64Array` **get_point_ids** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **get_point_ids** **(** **)** Returns an array of all point IDs. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_point_path: -- :ref:`PackedVector3Array` **get_point_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_point_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_point_position: -- :ref:`Vector3` **get_point_position** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_point_position** **(** :ref:`int` id **)** |const| Returns the position of the point associated with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_get_point_weight_scale: -- :ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** |const| Returns the weight scale of the point associated with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_has_point: -- :ref:`bool` **has_point** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_point** **(** :ref:`int` id **)** |const| Returns whether a point associated with the given ``id`` exists. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_is_point_disabled: -- :ref:`bool` **is_point_disabled** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_point_disabled** **(** :ref:`int` id **)** |const| Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_remove_point: -- void **remove_point** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_point** **(** :ref:`int` id **)** Removes the point associated with the given ``id`` from the points pool. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_reserve_space: -- void **reserve_space** **(** :ref:`int` num_nodes **)** +.. rst-class:: classref-method + +void **reserve_space** **(** :ref:`int` num_nodes **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_set_point_disabled: -- void **set_point_disabled** **(** :ref:`int` id, :ref:`bool` disabled=true **)** +.. rst-class:: classref-method + +void **set_point_disabled** **(** :ref:`int` id, :ref:`bool` disabled=true **)** Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_set_point_position: -- void **set_point_position** **(** :ref:`int` id, :ref:`Vector3` position **)** +.. rst-class:: classref-method + +void **set_point_position** **(** :ref:`int` id, :ref:`Vector3` position **)** Sets the ``position`` for the point with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_AStar3D_method_set_point_weight_scale: -- void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** +.. rst-class:: classref-method + +void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** 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. diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index d20fa27d8..49b1a5539 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -14,6 +14,8 @@ AStarGrid2D A\* (or "A-Star") pathfinding tailored to find the shortest paths on 2D grids. +.. rst-class:: classref-introduction-group + Description ----------- @@ -44,68 +46,82 @@ In contrast to :ref:`AStar2D`, you only need set the :ref:`size` | :ref:`cell_size` | ``Vector2(1, 1)`` | -+----------------------------------------------------+------------------------------------------------------------------------+--------------------+ -| :ref:`Heuristic` | :ref:`default_heuristic` | ``0`` | -+----------------------------------------------------+------------------------------------------------------------------------+--------------------+ -| :ref:`DiagonalMode` | :ref:`diagonal_mode` | ``0`` | -+----------------------------------------------------+------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`jumping_enabled` | ``false`` | -+----------------------------------------------------+------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+----------------------------------------------------+------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2i` | :ref:`size` | ``Vector2i(0, 0)`` | -+----------------------------------------------------+------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`cell_size` | ``Vector2(1, 1)`` | + +----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + | :ref:`Heuristic` | :ref:`default_heuristic` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + | :ref:`DiagonalMode` | :ref:`diagonal_mode` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`jumping_enabled` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`size` | ``Vector2i(0, 0)`` | + +----------------------------------------------------+------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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:`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:`update` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`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:`update` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AStarGrid2D_Heuristic: -.. _class_AStarGrid2D_constant_HEURISTIC_EUCLIDEAN: - -.. _class_AStarGrid2D_constant_HEURISTIC_MANHATTAN: - -.. _class_AStarGrid2D_constant_HEURISTIC_OCTILE: - -.. _class_AStarGrid2D_constant_HEURISTIC_CHEBYSHEV: - -.. _class_AStarGrid2D_constant_HEURISTIC_MAX: +.. rst-class:: classref-enumeration enum **Heuristic**: -- **HEURISTIC_EUCLIDEAN** = **0** --- The Euclidean heuristic to be used for the pathfinding using the following formula: +.. _class_AStarGrid2D_constant_HEURISTIC_EUCLIDEAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Heuristic` **HEURISTIC_EUCLIDEAN** = ``0`` + +The Euclidean heuristic to be used for the pathfinding using the following formula: :: @@ -113,7 +129,13 @@ enum **Heuristic**: dy = abs(to_id.y - from_id.y) result = sqrt(dx * dx + dy * dy) -- **HEURISTIC_MANHATTAN** = **1** --- The Manhattan heuristic to be used for the pathfinding using the following formula: +.. _class_AStarGrid2D_constant_HEURISTIC_MANHATTAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Heuristic` **HEURISTIC_MANHATTAN** = ``1`` + +The Manhattan heuristic to be used for the pathfinding using the following formula: :: @@ -121,7 +143,13 @@ enum **Heuristic**: dy = abs(to_id.y - from_id.y) result = dx + dy -- **HEURISTIC_OCTILE** = **2** --- The Octile heuristic to be used for the pathfinding using the following formula: +.. _class_AStarGrid2D_constant_HEURISTIC_OCTILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Heuristic` **HEURISTIC_OCTILE** = ``2`` + +The Octile heuristic to be used for the pathfinding using the following formula: :: @@ -130,7 +158,13 @@ enum **Heuristic**: f = sqrt(2) - 1 result = (dx < dy) ? f * dx + dy : f * dy + dx; -- **HEURISTIC_CHEBYSHEV** = **3** --- The Chebyshev heuristic to be used for the pathfinding using the following formula: +.. _class_AStarGrid2D_constant_HEURISTIC_CHEBYSHEV: + +.. rst-class:: classref-enumeration-constant + +:ref:`Heuristic` **HEURISTIC_CHEBYSHEV** = ``3`` + +The Chebyshev heuristic to be used for the pathfinding using the following formula: :: @@ -138,223 +172,311 @@ enum **Heuristic**: dy = abs(to_id.y - from_id.y) result = max(dx, dy) -- **HEURISTIC_MAX** = **4** --- Represents the size of the :ref:`Heuristic` enum. +.. _class_AStarGrid2D_constant_HEURISTIC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Heuristic` **HEURISTIC_MAX** = ``4`` + +Represents the size of the :ref:`Heuristic` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_AStarGrid2D_DiagonalMode: -.. _class_AStarGrid2D_constant_DIAGONAL_MODE_ALWAYS: - -.. _class_AStarGrid2D_constant_DIAGONAL_MODE_NEVER: - -.. _class_AStarGrid2D_constant_DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE: - -.. _class_AStarGrid2D_constant_DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES: - -.. _class_AStarGrid2D_constant_DIAGONAL_MODE_MAX: +.. rst-class:: classref-enumeration enum **DiagonalMode**: -- **DIAGONAL_MODE_ALWAYS** = **0** --- The pathfinding algorithm will ignore solid neighbors around the target cell and allow passing using diagonals. +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_ALWAYS: -- **DIAGONAL_MODE_NEVER** = **1** --- The pathfinding algorithm will ignore all diagonals and the way will be always orthogonal. +.. rst-class:: classref-enumeration-constant -- **DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE** = **2** --- The pathfinding algorithm will avoid using diagonals if at least two obstacles have been placed around the neighboring cells of the specific path segment. +:ref:`DiagonalMode` **DIAGONAL_MODE_ALWAYS** = ``0`` -- **DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES** = **3** --- The pathfinding algorithm will avoid using diagonals if any obstacle has been placed around the neighboring cells of the specific path segment. +The pathfinding algorithm will ignore solid neighbors around the target cell and allow passing using diagonals. -- **DIAGONAL_MODE_MAX** = **4** --- Represents the size of the :ref:`DiagonalMode` enum. +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_NEVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DiagonalMode` **DIAGONAL_MODE_NEVER** = ``1`` + +The pathfinding algorithm will ignore all diagonals and the way will be always orthogonal. + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DiagonalMode` **DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE** = ``2`` + +The pathfinding algorithm will avoid using diagonals if at least two obstacles have been placed around the neighboring cells of the specific path segment. + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`DiagonalMode` **DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES** = ``3`` + +The pathfinding algorithm will avoid using diagonals if any obstacle has been placed around the neighboring cells of the specific path segment. + +.. _class_AStarGrid2D_constant_DIAGONAL_MODE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DiagonalMode` **DIAGONAL_MODE_MAX** = ``4`` + +Represents the size of the :ref:`DiagonalMode` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AStarGrid2D_property_cell_size: -- :ref:`Vector2` **cell_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_cell_size(value) | -+-----------+----------------------+ -| *Getter* | get_cell_size() | -+-----------+----------------------+ +:ref:`Vector2` **cell_size** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_cell_size** **(** :ref:`Vector2` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_property_default_heuristic: -- :ref:`Heuristic` **default_heuristic** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_default_heuristic(value) | -+-----------+------------------------------+ -| *Getter* | get_default_heuristic() | -+-----------+------------------------------+ +:ref:`Heuristic` **default_heuristic** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_default_heuristic** **(** :ref:`Heuristic` value **)** +- :ref:`Heuristic` **get_default_heuristic** **(** **)** The default :ref:`Heuristic` which will be used to calculate the path if :ref:`_compute_cost` and/or :ref:`_estimate_cost` were not overridden. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_property_diagonal_mode: -- :ref:`DiagonalMode` **diagonal_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_diagonal_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_diagonal_mode() | -+-----------+--------------------------+ +:ref:`DiagonalMode` **diagonal_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_diagonal_mode** **(** :ref:`DiagonalMode` value **)** +- :ref:`DiagonalMode` **get_diagonal_mode** **(** **)** A specific :ref:`DiagonalMode` mode which will force the path to avoid or accept the specified diagonals. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_property_jumping_enabled: -- :ref:`bool` **jumping_enabled** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_jumping_enabled(value) | -+-----------+----------------------------+ -| *Getter* | is_jumping_enabled() | -+-----------+----------------------------+ +:ref:`bool` **jumping_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_jumping_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_jumping_enabled** **(** **)** Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_property_size: -- :ref:`Vector2i` **size** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+--------------------+ -| *Setter* | set_size(value) | -+-----------+--------------------+ -| *Getter* | get_size() | -+-----------+--------------------+ +:ref:`Vector2i` **size** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2i` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AStarGrid2D_method__compute_cost: -- :ref:`float` **_compute_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_compute_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| Called when computing the cost between two connected points. Note that this function is hidden in the default ``AStarGrid2D`` class. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method__estimate_cost: -- :ref:`float` **_estimate_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_estimate_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the grid and sets the :ref:`size` to :ref:`Vector2i.ZERO`. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_get_id_path: -- :ref:`Vector2i[]` **get_id_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** +.. rst-class:: classref-method + +:ref:`Vector2i[]` **get_id_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_get_point_path: -- :ref:`PackedVector2Array` **get_point_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_point_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** 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. \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_is_dirty: -- :ref:`bool` **is_dirty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_dirty** **(** **)** |const| Indicates that the grid parameters were changed and :ref:`update` needs to be called. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_is_in_bounds: -- :ref:`bool` **is_in_bounds** **(** :ref:`int` x, :ref:`int` y **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_in_bounds** **(** :ref:`int` x, :ref:`int` y **)** |const| Returns ``true`` if the ``x`` and ``y`` is a valid grid coordinate (id). +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_is_in_boundsv: -- :ref:`bool` **is_in_boundsv** **(** :ref:`Vector2i` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_in_boundsv** **(** :ref:`Vector2i` id **)** |const| Returns ``true`` if the ``id`` vector is a valid grid coordinate. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_is_point_solid: -- :ref:`bool` **is_point_solid** **(** :ref:`Vector2i` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_point_solid** **(** :ref:`Vector2i` id **)** |const| Returns ``true`` if a point is disabled for pathfinding. By default, all points are enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_set_point_solid: -- void **set_point_solid** **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** +.. rst-class:: classref-method + +void **set_point_solid** **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AStarGrid2D_method_update: -- void **update** **(** **)** +.. rst-class:: classref-method + +void **update** **(** **)** 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:`size`, :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. diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index e13362d23..3628735a1 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -14,90 +14,107 @@ AtlasTexture A texture that crops out part of another Texture2D. +.. rst-class:: classref-introduction-group + Description ----------- :ref:`Texture2D` resource that draws only part of its :ref:`atlas` texture, as defined by the :ref:`region`. An additional :ref:`margin` can also be set, which is useful for small adjustments. -Multiple ``AtlasTexture`` resources can be cropped from the same :ref:`atlas`. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls. +Multiple **AtlasTexture** resources can be cropped from the same :ref:`atlas`. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls. -\ **Note:** ``AtlasTexture`` cannot be used in an :ref:`AnimatedTexture`, and may not tile properly in nodes such as :ref:`TextureRect`, when inside other ``AtlasTexture`` resources. +\ **Note:** **AtlasTexture** cannot be used in an :ref:`AnimatedTexture`, and may not tile properly in nodes such as :ref:`TextureRect`, when inside other **AtlasTexture** resources. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`atlas` | | -+-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filter_clip` | ``false`` | -+-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`margin` | ``Rect2(0, 0, 0, 0)`` | -+-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`region` | ``Rect2(0, 0, 0, 0)`` | -+-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`atlas` | | + +-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filter_clip` | ``false`` | + +-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`margin` | ``Rect2(0, 0, 0, 0)`` | + +-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`region` | ``Rect2(0, 0, 0, 0)`` | + +-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-----------------------------------+-------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AtlasTexture_property_atlas: -- :ref:`Texture2D` **atlas** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_atlas(value) | -+----------+------------------+ -| *Getter* | get_atlas() | -+----------+------------------+ +:ref:`Texture2D` **atlas** -The texture that contains the atlas. Can be any type inheriting from :ref:`Texture2D`, including another ``AtlasTexture``. +.. rst-class:: classref-property-setget + +- void **set_atlas** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_atlas** **(** **)** + +The texture that contains the atlas. Can be any type inheriting from :ref:`Texture2D`, including another **AtlasTexture**. + +.. rst-class:: classref-item-separator ---- .. _class_AtlasTexture_property_filter_clip: -- :ref:`bool` **filter_clip** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_filter_clip(value) | -+-----------+------------------------+ -| *Getter* | has_filter_clip() | -+-----------+------------------------+ +:ref:`bool` **filter_clip** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_filter_clip** **(** :ref:`bool` value **)** +- :ref:`bool` **has_filter_clip** **(** **)** If ``true``, the area outside of the :ref:`region` is clipped to avoid bleeding of the surrounding texture pixels. +.. rst-class:: classref-item-separator + ---- .. _class_AtlasTexture_property_margin: -- :ref:`Rect2` **margin** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Rect2(0, 0, 0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_margin(value) | -+-----------+-----------------------+ -| *Getter* | get_margin() | -+-----------+-----------------------+ +:ref:`Rect2` **margin** = ``Rect2(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`Rect2` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AtlasTexture_property_region: -- :ref:`Rect2` **region** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Rect2(0, 0, 0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_region(value) | -+-----------+-----------------------+ -| *Getter* | get_region() | -+-----------+-----------------------+ +:ref:`Rect2` **region** = ``Rect2(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_region** **(** :ref:`Rect2` value **)** +- :ref:`Rect2` **get_region** **(** **)** The region used to draw the :ref:`atlas`. diff --git a/classes/class_audiobuslayout.rst b/classes/class_audiobuslayout.rst index 3f324d509..368a676f6 100644 --- a/classes/class_audiobuslayout.rst +++ b/classes/class_audiobuslayout.rst @@ -14,6 +14,8 @@ AudioBusLayout Stores information about the audio buses. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index b184d5b48..d97e8bb6c 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -16,29 +16,46 @@ AudioEffect Audio effect for audio. +.. rst-class:: classref-introduction-group + Description ----------- Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on. +.. rst-class:: classref-introduction-group + Tutorials --------- - `Audio Mic Record Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------+----------------------------------------------------------------------------------+ -| :ref:`AudioEffectInstance` | :ref:`_instantiate` **(** **)** |virtual| | -+-------------------------------------------------------+----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+----------------------------------------------------------------------------------+ + | :ref:`AudioEffectInstance` | :ref:`_instantiate` **(** **)** |virtual| | + +-------------------------------------------------------+----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioEffect_method__instantiate: -- :ref:`AudioEffectInstance` **_instantiate** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`AudioEffectInstance` **_instantiate** **(** **)** |virtual| .. container:: contribute diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index bf6a70362..9c5d0d6ab 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -14,37 +14,51 @@ AudioEffectAmplify Adds an amplifying audio effect to an audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Increases or decreases the volume being routed through the audio bus. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`volume_db` | ``0.0`` | -+---------------------------+---------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`volume_db` | ``0.0`` | + +---------------------------+---------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectAmplify_property_volume_db: -- :ref:`float` **volume_db** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_volume_db(value) | -+-----------+----------------------+ -| *Getter* | get_volume_db() | -+-----------+----------------------+ +:ref:`float` **volume_db** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_volume_db** **(** :ref:`float` value **)** +- :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. diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index 90a71786f..f8e289933 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -14,11 +14,15 @@ AudioEffectBandLimitFilter Adds a band limit filter to the audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Limits the frequencies in a range around the :ref:`AudioEffectFilter.cutoff_hz` and allows frequencies outside of this range to pass. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index 5ef217385..662d4b86d 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -14,11 +14,15 @@ AudioEffectBandPassFilter Adds a band pass filter to the audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Attenuates the frequencies inside of a range around the :ref:`AudioEffectFilter.cutoff_hz` and cuts frequencies outside of this band. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffectcapture.rst b/classes/class_audioeffectcapture.rst index 255f491bc..1c1acbcbb 100644 --- a/classes/class_audioeffectcapture.rst +++ b/classes/class_audioeffectcapture.rst @@ -14,6 +14,8 @@ AudioEffectCapture Captures audio from an audio bus in real-time. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ Application code should consume these audio frames from this ring buffer using : \ **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 + Tutorials --------- @@ -30,105 +34,152 @@ Tutorials - `Audio Mic Record Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`buffer_length` | ``0.1`` | -+---------------------------+-----------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`buffer_length` | ``0.1`` | + +---------------------------+-----------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ -| :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| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectCapture_property_buffer_length: -- :ref:`float` **buffer_length** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.1`` | -+-----------+--------------------------+ -| *Setter* | set_buffer_length(value) | -+-----------+--------------------------+ -| *Getter* | get_buffer_length() | -+-----------+--------------------------+ +:ref:`float` **buffer_length** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_buffer_length** **(** :ref:`float` value **)** +- :ref:`float` **get_buffer_length** **(** **)** Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioEffectCapture_method_can_get_buffer: -- :ref:`bool` **can_get_buffer** **(** :ref:`int` frames **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_get_buffer** **(** :ref:`int` frames **)** |const| Returns ``true`` if at least ``frames`` audio frames are available to read in the internal ring buffer. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCapture_method_clear_buffer: -- void **clear_buffer** **(** **)** +.. rst-class:: classref-method + +void **clear_buffer** **(** **)** Clears the internal ring buffer. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCapture_method_get_buffer: -- :ref:`PackedVector2Array` **get_buffer** **(** :ref:`int` frames **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_buffer** **(** :ref:`int` frames **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCapture_method_get_buffer_length_frames: -- :ref:`int` **get_buffer_length_frames** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_buffer_length_frames** **(** **)** |const| Returns the total size of the internal ring buffer in frames. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCapture_method_get_discarded_frames: -- :ref:`int` **get_discarded_frames** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_discarded_frames** **(** **)** |const| Returns the number of audio frames discarded from the audio bus due to full buffer. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCapture_method_get_frames_available: -- :ref:`int` **get_frames_available** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_frames_available** **(** **)** |const| Returns the number of frames available to read using :ref:`get_buffer`. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCapture_method_get_pushed_frames: -- :ref:`int` **get_pushed_frames** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_pushed_frames** **(** **)** |const| Returns the number of audio frames inserted from the audio bus. diff --git a/classes/class_audioeffectchorus.rst b/classes/class_audioeffectchorus.rst index 49f1b6b5c..bfeeb14fb 100644 --- a/classes/class_audioeffectchorus.rst +++ b/classes/class_audioeffectchorus.rst @@ -14,629 +14,750 @@ AudioEffectChorus Adds a chorus audio effect. +.. rst-class:: classref-introduction-group + Description ----------- Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`dry` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/1/cutoff_hz` | ``8000.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/1/delay_ms` | ``15.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/1/depth_ms` | ``2.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/1/level_db` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/1/pan` | ``-0.5`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/1/rate_hz` | ``0.8`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/2/cutoff_hz` | ``8000.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/2/delay_ms` | ``20.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/2/depth_ms` | ``3.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/2/level_db` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/2/pan` | ``0.5`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/2/rate_hz` | ``1.2`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/3/cutoff_hz` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/3/delay_ms` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/3/depth_ms` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/3/level_db` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/3/pan` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/3/rate_hz` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/4/cutoff_hz` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/4/delay_ms` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/4/depth_ms` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/4/level_db` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/4/pan` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`voice/4/rate_hz` | | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`int` | :ref:`voice_count` | ``2`` | -+---------------------------+------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`wet` | ``0.5`` | -+---------------------------+------------------------------------------------------------------------------+------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`dry` | ``1.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/1/cutoff_hz` | ``8000.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/1/delay_ms` | ``15.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/1/depth_ms` | ``2.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/1/level_db` | ``0.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/1/pan` | ``-0.5`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/1/rate_hz` | ``0.8`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/2/cutoff_hz` | ``8000.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/2/delay_ms` | ``20.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/2/depth_ms` | ``3.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/2/level_db` | ``0.0`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/2/pan` | ``0.5`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/2/rate_hz` | ``1.2`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/3/cutoff_hz` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/3/delay_ms` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/3/depth_ms` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/3/level_db` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/3/pan` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/3/rate_hz` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/4/cutoff_hz` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/4/delay_ms` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/4/depth_ms` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/4/level_db` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/4/pan` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`voice/4/rate_hz` | | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`voice_count` | ``2`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`wet` | ``0.5`` | + +---------------------------+------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectChorus_property_dry: -- :ref:`float` **dry** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``1.0`` | -+-----------+----------------+ -| *Setter* | set_dry(value) | -+-----------+----------------+ -| *Getter* | get_dry() | -+-----------+----------------+ +:ref:`float` **dry** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_dry** **(** :ref:`float` value **)** +- :ref:`float` **get_dry** **(** **)** The effect's raw signal. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/1/cutoff_hz: -- :ref:`float` **voice/1/cutoff_hz** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``8000.0`` | -+-----------+----------------------------+ -| *Setter* | set_voice_cutoff_hz(value) | -+-----------+----------------------------+ -| *Getter* | get_voice_cutoff_hz() | -+-----------+----------------------------+ +:ref:`float` **voice/1/cutoff_hz** = ``8000.0`` + +.. 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| The voice's cutoff frequency. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/1/delay_ms: -- :ref:`float` **voice/1/delay_ms** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``15.0`` | -+-----------+---------------------------+ -| *Setter* | set_voice_delay_ms(value) | -+-----------+---------------------------+ -| *Getter* | get_voice_delay_ms() | -+-----------+---------------------------+ +:ref:`float` **voice/1/delay_ms** = ``15.0`` + +.. 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| The voice's signal delay. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/1/depth_ms: -- :ref:`float` **voice/1/depth_ms** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``2.0`` | -+-----------+---------------------------+ -| *Setter* | set_voice_depth_ms(value) | -+-----------+---------------------------+ -| *Getter* | get_voice_depth_ms() | -+-----------+---------------------------+ +:ref:`float` **voice/1/depth_ms** = ``2.0`` + +.. 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| The voice filter's depth. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/1/level_db: -- :ref:`float` **voice/1/level_db** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------+ -| *Setter* | set_voice_level_db(value) | -+-----------+---------------------------+ -| *Getter* | get_voice_level_db() | -+-----------+---------------------------+ +:ref:`float` **voice/1/level_db** = ``0.0`` + +.. 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| The voice's volume. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/1/pan: -- :ref:`float` **voice/1/pan** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``-0.5`` | -+-----------+----------------------+ -| *Setter* | set_voice_pan(value) | -+-----------+----------------------+ -| *Getter* | get_voice_pan() | -+-----------+----------------------+ +:ref:`float` **voice/1/pan** = ``-0.5`` + +.. 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| The voice's pan level. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/1/rate_hz: -- :ref:`float` **voice/1/rate_hz** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.8`` | -+-----------+--------------------------+ -| *Setter* | set_voice_rate_hz(value) | -+-----------+--------------------------+ -| *Getter* | get_voice_rate_hz() | -+-----------+--------------------------+ +:ref:`float` **voice/1/rate_hz** = ``0.8`` + +.. 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| The voice's filter rate. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/2/cutoff_hz: -- :ref:`float` **voice/2/cutoff_hz** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``8000.0`` | -+-----------+----------------------------+ -| *Setter* | set_voice_cutoff_hz(value) | -+-----------+----------------------------+ -| *Getter* | get_voice_cutoff_hz() | -+-----------+----------------------------+ +:ref:`float` **voice/2/cutoff_hz** = ``8000.0`` + +.. 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| The voice's cutoff frequency. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/2/delay_ms: -- :ref:`float` **voice/2/delay_ms** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``20.0`` | -+-----------+---------------------------+ -| *Setter* | set_voice_delay_ms(value) | -+-----------+---------------------------+ -| *Getter* | get_voice_delay_ms() | -+-----------+---------------------------+ +:ref:`float` **voice/2/delay_ms** = ``20.0`` + +.. 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| The voice's signal delay. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/2/depth_ms: -- :ref:`float` **voice/2/depth_ms** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``3.0`` | -+-----------+---------------------------+ -| *Setter* | set_voice_depth_ms(value) | -+-----------+---------------------------+ -| *Getter* | get_voice_depth_ms() | -+-----------+---------------------------+ +:ref:`float` **voice/2/depth_ms** = ``3.0`` + +.. 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| The voice filter's depth. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/2/level_db: -- :ref:`float` **voice/2/level_db** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------+ -| *Setter* | set_voice_level_db(value) | -+-----------+---------------------------+ -| *Getter* | get_voice_level_db() | -+-----------+---------------------------+ +:ref:`float` **voice/2/level_db** = ``0.0`` + +.. 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| The voice's volume. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/2/pan: -- :ref:`float` **voice/2/pan** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.5`` | -+-----------+----------------------+ -| *Setter* | set_voice_pan(value) | -+-----------+----------------------+ -| *Getter* | get_voice_pan() | -+-----------+----------------------+ +:ref:`float` **voice/2/pan** = ``0.5`` + +.. 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| The voice's pan level. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/2/rate_hz: -- :ref:`float` **voice/2/rate_hz** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.2`` | -+-----------+--------------------------+ -| *Setter* | set_voice_rate_hz(value) | -+-----------+--------------------------+ -| *Getter* | get_voice_rate_hz() | -+-----------+--------------------------+ +:ref:`float` **voice/2/rate_hz** = ``1.2`` + +.. 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| The voice's filter rate. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/3/cutoff_hz: -- :ref:`float` **voice/3/cutoff_hz** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_voice_cutoff_hz(value) | -+----------+----------------------------+ -| *Getter* | get_voice_cutoff_hz() | -+----------+----------------------------+ +:ref:`float` **voice/3/cutoff_hz** + +.. 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| The voice's cutoff frequency. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/3/delay_ms: -- :ref:`float` **voice/3/delay_ms** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_voice_delay_ms(value) | -+----------+---------------------------+ -| *Getter* | get_voice_delay_ms() | -+----------+---------------------------+ +:ref:`float` **voice/3/delay_ms** + +.. 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| The voice's signal delay. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/3/depth_ms: -- :ref:`float` **voice/3/depth_ms** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_voice_depth_ms(value) | -+----------+---------------------------+ -| *Getter* | get_voice_depth_ms() | -+----------+---------------------------+ +:ref:`float` **voice/3/depth_ms** + +.. 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| The voice filter's depth. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/3/level_db: -- :ref:`float` **voice/3/level_db** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_voice_level_db(value) | -+----------+---------------------------+ -| *Getter* | get_voice_level_db() | -+----------+---------------------------+ +:ref:`float` **voice/3/level_db** + +.. 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| The voice's volume. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/3/pan: -- :ref:`float` **voice/3/pan** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_voice_pan(value) | -+----------+----------------------+ -| *Getter* | get_voice_pan() | -+----------+----------------------+ +:ref:`float` **voice/3/pan** + +.. 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| The voice's pan level. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/3/rate_hz: -- :ref:`float` **voice/3/rate_hz** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_voice_rate_hz(value) | -+----------+--------------------------+ -| *Getter* | get_voice_rate_hz() | -+----------+--------------------------+ +:ref:`float` **voice/3/rate_hz** + +.. 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| The voice's filter rate. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/4/cutoff_hz: -- :ref:`float` **voice/4/cutoff_hz** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_voice_cutoff_hz(value) | -+----------+----------------------------+ -| *Getter* | get_voice_cutoff_hz() | -+----------+----------------------------+ +:ref:`float` **voice/4/cutoff_hz** + +.. 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| The voice's cutoff frequency. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/4/delay_ms: -- :ref:`float` **voice/4/delay_ms** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_voice_delay_ms(value) | -+----------+---------------------------+ -| *Getter* | get_voice_delay_ms() | -+----------+---------------------------+ +:ref:`float` **voice/4/delay_ms** + +.. 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| The voice's signal delay. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/4/depth_ms: -- :ref:`float` **voice/4/depth_ms** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_voice_depth_ms(value) | -+----------+---------------------------+ -| *Getter* | get_voice_depth_ms() | -+----------+---------------------------+ +:ref:`float` **voice/4/depth_ms** + +.. 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| The voice filter's depth. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/4/level_db: -- :ref:`float` **voice/4/level_db** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_voice_level_db(value) | -+----------+---------------------------+ -| *Getter* | get_voice_level_db() | -+----------+---------------------------+ +:ref:`float` **voice/4/level_db** + +.. 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| The voice's volume. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/4/pan: -- :ref:`float` **voice/4/pan** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_voice_pan(value) | -+----------+----------------------+ -| *Getter* | get_voice_pan() | -+----------+----------------------+ +:ref:`float` **voice/4/pan** + +.. 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| The voice's pan level. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice/4/rate_hz: -- :ref:`float` **voice/4/rate_hz** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_voice_rate_hz(value) | -+----------+--------------------------+ -| *Getter* | get_voice_rate_hz() | -+----------+--------------------------+ +:ref:`float` **voice/4/rate_hz** + +.. 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| The voice's filter rate. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_voice_count: -- :ref:`int` **voice_count** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``2`` | -+-----------+------------------------+ -| *Setter* | set_voice_count(value) | -+-----------+------------------------+ -| *Getter* | get_voice_count() | -+-----------+------------------------+ +:ref:`int` **voice_count** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_voice_count** **(** :ref:`int` value **)** +- :ref:`int` **get_voice_count** **(** **)** The number of voices in the effect. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_property_wet: -- :ref:`float` **wet** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.5`` | -+-----------+----------------+ -| *Setter* | set_wet(value) | -+-----------+----------------+ -| *Getter* | get_wet() | -+-----------+----------------+ +:ref:`float` **wet** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_wet** **(** :ref:`float` value **)** +- :ref:`float` **get_wet** **(** **)** The effect's processed signal. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioEffectChorus_method_get_voice_cutoff_hz: -- :ref:`float` **get_voice_cutoff_hz** **(** :ref:`int` voice_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_voice_cutoff_hz** **(** :ref:`int` voice_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_get_voice_delay_ms: -- :ref:`float` **get_voice_delay_ms** **(** :ref:`int` voice_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_voice_delay_ms** **(** :ref:`int` voice_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_get_voice_depth_ms: -- :ref:`float` **get_voice_depth_ms** **(** :ref:`int` voice_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_voice_depth_ms** **(** :ref:`int` voice_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_get_voice_level_db: -- :ref:`float` **get_voice_level_db** **(** :ref:`int` voice_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_voice_level_db** **(** :ref:`int` voice_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_get_voice_pan: -- :ref:`float` **get_voice_pan** **(** :ref:`int` voice_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_voice_pan** **(** :ref:`int` voice_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_get_voice_rate_hz: -- :ref:`float` **get_voice_rate_hz** **(** :ref:`int` voice_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_voice_rate_hz** **(** :ref:`int` voice_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_set_voice_cutoff_hz: -- void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** +.. rst-class:: classref-method + +void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_set_voice_delay_ms: -- void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** +.. rst-class:: classref-method + +void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_set_voice_depth_ms: -- void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float` depth_ms **)** +.. rst-class:: classref-method + +void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float` depth_ms **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_set_voice_level_db: -- void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float` level_db **)** +.. rst-class:: classref-method + +void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float` level_db **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_set_voice_pan: -- void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float` pan **)** +.. rst-class:: classref-method + +void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float` pan **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectChorus_method_set_voice_rate_hz: -- void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** +.. rst-class:: classref-method + +void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** .. container:: contribute diff --git a/classes/class_audioeffectcompressor.rst b/classes/class_audioeffectcompressor.rst index ffc73e4f2..4ef6c43a3 100644 --- a/classes/class_audioeffectcompressor.rst +++ b/classes/class_audioeffectcompressor.rst @@ -16,6 +16,8 @@ Adds a compressor audio effect to an audio bus. Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. +.. rst-class:: classref-introduction-group + Description ----------- @@ -31,140 +33,158 @@ Compressor has many uses in the mix: - Accentuates transients by using a wider attack, making effects sound more punchy. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`attack_us` | ``20.0`` | -+-------------------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`gain` | ``0.0`` | -+-------------------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`mix` | ``1.0`` | -+-------------------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`ratio` | ``4.0`` | -+-------------------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`release_ms` | ``250.0`` | -+-------------------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`StringName` | :ref:`sidechain` | ``&""`` | -+-------------------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`threshold` | ``0.0`` | -+-------------------------------------+--------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`attack_us` | ``20.0`` | + +-------------------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`gain` | ``0.0`` | + +-------------------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`mix` | ``1.0`` | + +-------------------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`ratio` | ``4.0`` | + +-------------------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`release_ms` | ``250.0`` | + +-------------------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`sidechain` | ``&""`` | + +-------------------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`threshold` | ``0.0`` | + +-------------------------------------+--------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectCompressor_property_attack_us: -- :ref:`float` **attack_us** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``20.0`` | -+-----------+----------------------+ -| *Setter* | set_attack_us(value) | -+-----------+----------------------+ -| *Getter* | get_attack_us() | -+-----------+----------------------+ +:ref:`float` **attack_us** = ``20.0`` + +.. rst-class:: classref-property-setget + +- void **set_attack_us** **(** :ref:`float` value **)** +- :ref:`float` **get_attack_us** **(** **)** Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCompressor_property_gain: -- :ref:`float` **gain** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.0`` | -+-----------+-----------------+ -| *Setter* | set_gain(value) | -+-----------+-----------------+ -| *Getter* | get_gain() | -+-----------+-----------------+ +:ref:`float` **gain** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_gain** **(** :ref:`float` value **)** +- :ref:`float` **get_gain** **(** **)** Gain applied to the output signal. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCompressor_property_mix: -- :ref:`float` **mix** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``1.0`` | -+-----------+----------------+ -| *Setter* | set_mix(value) | -+-----------+----------------+ -| *Getter* | get_mix() | -+-----------+----------------+ +:ref:`float` **mix** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_mix** **(** :ref:`float` value **)** +- :ref:`float` **get_mix** **(** **)** Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCompressor_property_ratio: -- :ref:`float` **ratio** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``4.0`` | -+-----------+------------------+ -| *Setter* | set_ratio(value) | -+-----------+------------------+ -| *Getter* | get_ratio() | -+-----------+------------------+ +:ref:`float` **ratio** = ``4.0`` + +.. rst-class:: classref-property-setget + +- void **set_ratio** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCompressor_property_release_ms: -- :ref:`float` **release_ms** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``250.0`` | -+-----------+-----------------------+ -| *Setter* | set_release_ms(value) | -+-----------+-----------------------+ -| *Getter* | get_release_ms() | -+-----------+-----------------------+ +:ref:`float` **release_ms** = ``250.0`` + +.. rst-class:: classref-property-setget + +- void **set_release_ms** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCompressor_property_sidechain: -- :ref:`StringName` **sidechain** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``&""`` | -+-----------+----------------------+ -| *Setter* | set_sidechain(value) | -+-----------+----------------------+ -| *Getter* | get_sidechain() | -+-----------+----------------------+ +:ref:`StringName` **sidechain** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_sidechain** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_sidechain** **(** **)** Reduce the sound level using another audio bus for threshold detection. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectCompressor_property_threshold: -- :ref:`float` **threshold** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_threshold(value) | -+-----------+----------------------+ -| *Getter* | get_threshold() | -+-----------+----------------------+ +:ref:`float` **threshold** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_threshold** **(** :ref:`float` value **)** +- :ref:`float` **get_threshold** **(** **)** The level above which compression is applied to the audio. Value can range from -60 to 0. diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index da2b4c4ea..1e6d95593 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -16,253 +16,279 @@ Adds a delay audio effect to an audio bus. Plays input signal back after a perio Two tap delay and feedback options. +.. rst-class:: classref-introduction-group + Description ----------- Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`dry` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`feedback_active` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`feedback_delay_ms` | ``340.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`feedback_level_db` | ``-6.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`feedback_lowpass` | ``16000.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`tap1_active` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap1_delay_ms` | ``250.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap1_level_db` | ``-6.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap1_pan` | ``0.2`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`tap2_active` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap2_delay_ms` | ``500.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap2_level_db` | ``-12.0`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`tap2_pan` | ``-0.4`` | -+---------------------------+-----------------------------------------------------------------------------+-------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`dry` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`bool` | :ref:`feedback_active` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`feedback_delay_ms` | ``340.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`feedback_level_db` | ``-6.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`feedback_lowpass` | ``16000.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`bool` | :ref:`tap1_active` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`tap1_delay_ms` | ``250.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`tap1_level_db` | ``-6.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`tap1_pan` | ``0.2`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`bool` | :ref:`tap2_active` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`tap2_delay_ms` | ``500.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`tap2_level_db` | ``-12.0`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`tap2_pan` | ``-0.4`` | + +---------------------------+-----------------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectDelay_property_dry: -- :ref:`float` **dry** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``1.0`` | -+-----------+----------------+ -| *Setter* | set_dry(value) | -+-----------+----------------+ -| *Getter* | get_dry() | -+-----------+----------------+ +:ref:`float` **dry** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_dry** **(** :ref:`float` value **)** +- :ref:`float` **get_dry** **(** **)** Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_feedback_active: -- :ref:`bool` **feedback_active** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_feedback_active(value) | -+-----------+----------------------------+ -| *Getter* | is_feedback_active() | -+-----------+----------------------------+ +:ref:`bool` **feedback_active** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feedback_active** **(** :ref:`bool` value **)** +- :ref:`bool` **is_feedback_active** **(** **)** If ``true``, feedback is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_feedback_delay_ms: -- :ref:`float` **feedback_delay_ms** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``340.0`` | -+-----------+------------------------------+ -| *Setter* | set_feedback_delay_ms(value) | -+-----------+------------------------------+ -| *Getter* | get_feedback_delay_ms() | -+-----------+------------------------------+ +:ref:`float` **feedback_delay_ms** = ``340.0`` + +.. rst-class:: classref-property-setget + +- void **set_feedback_delay_ms** **(** :ref:`float` value **)** +- :ref:`float` **get_feedback_delay_ms** **(** **)** Feedback delay time in milliseconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_feedback_level_db: -- :ref:`float` **feedback_level_db** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``-6.0`` | -+-----------+------------------------------+ -| *Setter* | set_feedback_level_db(value) | -+-----------+------------------------------+ -| *Getter* | get_feedback_level_db() | -+-----------+------------------------------+ +:ref:`float` **feedback_level_db** = ``-6.0`` + +.. rst-class:: classref-property-setget + +- void **set_feedback_level_db** **(** :ref:`float` value **)** +- :ref:`float` **get_feedback_level_db** **(** **)** Sound level for ``tap1``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_feedback_lowpass: -- :ref:`float` **feedback_lowpass** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``16000.0`` | -+-----------+-----------------------------+ -| *Setter* | set_feedback_lowpass(value) | -+-----------+-----------------------------+ -| *Getter* | get_feedback_lowpass() | -+-----------+-----------------------------+ +:ref:`float` **feedback_lowpass** = ``16000.0`` + +.. rst-class:: classref-property-setget + +- void **set_feedback_lowpass** **(** :ref:`float` value **)** +- :ref:`float` **get_feedback_lowpass** **(** **)** Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap1_active: -- :ref:`bool` **tap1_active** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_tap1_active(value) | -+-----------+------------------------+ -| *Getter* | is_tap1_active() | -+-----------+------------------------+ +:ref:`bool` **tap1_active** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_tap1_active** **(** :ref:`bool` value **)** +- :ref:`bool` **is_tap1_active** **(** **)** If ``true``, ``tap1`` will be enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap1_delay_ms: -- :ref:`float` **tap1_delay_ms** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``250.0`` | -+-----------+--------------------------+ -| *Setter* | set_tap1_delay_ms(value) | -+-----------+--------------------------+ -| *Getter* | get_tap1_delay_ms() | -+-----------+--------------------------+ +:ref:`float` **tap1_delay_ms** = ``250.0`` + +.. rst-class:: classref-property-setget + +- void **set_tap1_delay_ms** **(** :ref:`float` value **)** +- :ref:`float` **get_tap1_delay_ms** **(** **)** ``tap1`` delay time in milliseconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap1_level_db: -- :ref:`float` **tap1_level_db** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``-6.0`` | -+-----------+--------------------------+ -| *Setter* | set_tap1_level_db(value) | -+-----------+--------------------------+ -| *Getter* | get_tap1_level_db() | -+-----------+--------------------------+ +:ref:`float` **tap1_level_db** = ``-6.0`` + +.. rst-class:: classref-property-setget + +- void **set_tap1_level_db** **(** :ref:`float` value **)** +- :ref:`float` **get_tap1_level_db** **(** **)** Sound level for ``tap1``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap1_pan: -- :ref:`float` **tap1_pan** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.2`` | -+-----------+---------------------+ -| *Setter* | set_tap1_pan(value) | -+-----------+---------------------+ -| *Getter* | get_tap1_pan() | -+-----------+---------------------+ +:ref:`float` **tap1_pan** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_tap1_pan** **(** :ref:`float` value **)** +- :ref:`float` **get_tap1_pan** **(** **)** Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully right). +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap2_active: -- :ref:`bool` **tap2_active** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_tap2_active(value) | -+-----------+------------------------+ -| *Getter* | is_tap2_active() | -+-----------+------------------------+ +:ref:`bool` **tap2_active** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_tap2_active** **(** :ref:`bool` value **)** +- :ref:`bool` **is_tap2_active** **(** **)** If ``true``, ``tap2`` will be enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap2_delay_ms: -- :ref:`float` **tap2_delay_ms** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``500.0`` | -+-----------+--------------------------+ -| *Setter* | set_tap2_delay_ms(value) | -+-----------+--------------------------+ -| *Getter* | get_tap2_delay_ms() | -+-----------+--------------------------+ +:ref:`float` **tap2_delay_ms** = ``500.0`` + +.. rst-class:: classref-property-setget + +- void **set_tap2_delay_ms** **(** :ref:`float` value **)** +- :ref:`float` **get_tap2_delay_ms** **(** **)** **Tap2** delay time in milliseconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap2_level_db: -- :ref:`float` **tap2_level_db** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``-12.0`` | -+-----------+--------------------------+ -| *Setter* | set_tap2_level_db(value) | -+-----------+--------------------------+ -| *Getter* | get_tap2_level_db() | -+-----------+--------------------------+ +:ref:`float` **tap2_level_db** = ``-12.0`` + +.. rst-class:: classref-property-setget + +- void **set_tap2_level_db** **(** :ref:`float` value **)** +- :ref:`float` **get_tap2_level_db** **(** **)** Sound level for ``tap2``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDelay_property_tap2_pan: -- :ref:`float` **tap2_pan** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``-0.4`` | -+-----------+---------------------+ -| *Setter* | set_tap2_pan(value) | -+-----------+---------------------+ -| *Getter* | get_tap2_pan() | -+-----------+---------------------+ +:ref:`float` **tap2_pan** = ``-0.4`` + +.. rst-class:: classref-property-setget + +- void **set_tap2_pan** **(** :ref:`float` value **)** +- :ref:`float` **get_tap2_pan** **(** **)** Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully right). diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index cdf3264ce..69e69f594 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -14,142 +14,188 @@ AudioEffectDistortion Adds a distortion audio effect to an Audio bus. -Modify the sound to make it distorted. +Modifies the sound to make it distorted. + +.. rst-class:: classref-introduction-group Description ----------- Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape. -By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. +By distorting the waveform the frequency content changes, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------+--------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`drive` | ``0.0`` | -+----------------------------------------------+--------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`keep_hf_hz` | ``16000.0`` | -+----------------------------------------------+--------------------------------------------------------------------+-------------+ -| :ref:`Mode` | :ref:`mode` | ``0`` | -+----------------------------------------------+--------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`post_gain` | ``0.0`` | -+----------------------------------------------+--------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`pre_gain` | ``0.0`` | -+----------------------------------------------+--------------------------------------------------------------------+-------------+ +.. table:: + :widths: auto + + +----------------------------------------------+--------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`drive` | ``0.0`` | + +----------------------------------------------+--------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`keep_hf_hz` | ``16000.0`` | + +----------------------------------------------+--------------------------------------------------------------------+-------------+ + | :ref:`Mode` | :ref:`mode` | ``0`` | + +----------------------------------------------+--------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`post_gain` | ``0.0`` | + +----------------------------------------------+--------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`pre_gain` | ``0.0`` | + +----------------------------------------------+--------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioEffectDistortion_Mode: -.. _class_AudioEffectDistortion_constant_MODE_CLIP: - -.. _class_AudioEffectDistortion_constant_MODE_ATAN: - -.. _class_AudioEffectDistortion_constant_MODE_LOFI: - -.. _class_AudioEffectDistortion_constant_MODE_OVERDRIVE: - -.. _class_AudioEffectDistortion_constant_MODE_WAVESHAPE: +.. rst-class:: classref-enumeration enum **Mode**: -- **MODE_CLIP** = **0** --- Digital distortion effect which cuts off peaks at the top and bottom of the waveform. +.. _class_AudioEffectDistortion_constant_MODE_CLIP: -- **MODE_ATAN** = **1** +.. rst-class:: classref-enumeration-constant -- **MODE_LOFI** = **2** --- Low-resolution digital distortion effect. You can use it to emulate the sound of early digital audio devices. +:ref:`Mode` **MODE_CLIP** = ``0`` -- **MODE_OVERDRIVE** = **3** --- Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. +Digital distortion effect which cuts off peaks at the top and bottom of the waveform. -- **MODE_WAVESHAPE** = **4** --- Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound. +.. _class_AudioEffectDistortion_constant_MODE_ATAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_ATAN** = ``1`` + + + +.. _class_AudioEffectDistortion_constant_MODE_LOFI: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_LOFI** = ``2`` + +Low-resolution digital distortion effect (bit depth reduction). You can use it to emulate the sound of early digital audio devices. + +.. _class_AudioEffectDistortion_constant_MODE_OVERDRIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_OVERDRIVE** = ``3`` + +Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. The :ref:`drive` property has no effect in this mode. + +.. _class_AudioEffectDistortion_constant_MODE_WAVESHAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_WAVESHAPE** = ``4`` + +Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectDistortion_property_drive: -- :ref:`float` **drive** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_drive(value) | -+-----------+------------------+ -| *Getter* | get_drive() | -+-----------+------------------+ +:ref:`float` **drive** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_drive** **(** :ref:`float` value **)** +- :ref:`float` **get_drive** **(** **)** Distortion power. Value can range from 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDistortion_property_keep_hf_hz: -- :ref:`float` **keep_hf_hz** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``16000.0`` | -+-----------+-----------------------+ -| *Setter* | set_keep_hf_hz(value) | -+-----------+-----------------------+ -| *Getter* | get_keep_hf_hz() | -+-----------+-----------------------+ +:ref:`float` **keep_hf_hz** = ``16000.0`` + +.. rst-class:: classref-property-setget + +- void **set_keep_hf_hz** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDistortion_property_mode: -- :ref:`Mode` **mode** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_mode(value) | -+-----------+-----------------+ -| *Getter* | get_mode() | -+-----------+-----------------+ +:ref:`Mode` **mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mode** **(** :ref:`Mode` value **)** +- :ref:`Mode` **get_mode** **(** **)** Distortion type. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectDistortion_property_post_gain: -- :ref:`float` **post_gain** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_post_gain(value) | -+-----------+----------------------+ -| *Getter* | get_post_gain() | -+-----------+----------------------+ +:ref:`float` **post_gain** = ``0.0`` -Increases or decreases the volume after the effect. Value can range from -80 to 24. +.. rst-class:: classref-property-setget + +- void **set_post_gain** **(** :ref:`float` value **)** +- :ref:`float` **get_post_gain** **(** **)** + +Increases or decreases the volume after the effect, in decibels. Value can range from -80 to 24. + +.. rst-class:: classref-item-separator ---- .. _class_AudioEffectDistortion_property_pre_gain: -- :ref:`float` **pre_gain** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_pre_gain(value) | -+-----------+---------------------+ -| *Getter* | get_pre_gain() | -+-----------+---------------------+ +:ref:`float` **pre_gain** = ``0.0`` -Increases or decreases the volume before the effect. Value can range from -60 to 60. +.. rst-class:: classref-property-setget + +- void **set_pre_gain** **(** :ref:`float` value **)** +- :ref:`float` **get_pre_gain** **(** **)** + +Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60. .. |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.)` diff --git a/classes/class_audioeffecteq.rst b/classes/class_audioeffecteq.rst index 131857cc3..a3e719e15 100644 --- a/classes/class_audioeffecteq.rst +++ b/classes/class_audioeffecteq.rst @@ -18,49 +18,74 @@ Base class for audio equalizers. Gives you control over frequencies. Use it to create a custom equalizer if :ref:`AudioEffectEQ6`, :ref:`AudioEffectEQ10` or :ref:`AudioEffectEQ21` don't fit your needs. +.. rst-class:: classref-introduction-group + Description ----------- AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioEffectEQ_method_get_band_count: -- :ref:`int` **get_band_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_band_count** **(** **)** |const| Returns the number of bands of the equalizer. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectEQ_method_get_band_gain_db: -- :ref:`float` **get_band_gain_db** **(** :ref:`int` band_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_band_gain_db** **(** :ref:`int` band_idx **)** |const| Returns the band's gain at the specified index, in dB. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectEQ_method_set_band_gain_db: -- void **set_band_gain_db** **(** :ref:`int` band_idx, :ref:`float` volume_db **)** +.. rst-class:: classref-method + +void **set_band_gain_db** **(** :ref:`int` band_idx, :ref:`float` volume_db **)** Sets band's gain at the specified index, in dB. diff --git a/classes/class_audioeffecteq10.rst b/classes/class_audioeffecteq10.rst index bbfc0c611..54a6a2884 100644 --- a/classes/class_audioeffecteq10.rst +++ b/classes/class_audioeffecteq10.rst @@ -16,6 +16,8 @@ Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over fr Each frequency can be modulated between -60/+24 dB. +.. rst-class:: classref-introduction-group + Description ----------- @@ -43,6 +45,8 @@ Band 10: 16000 Hz See also :ref:`AudioEffectEQ`, :ref:`AudioEffectEQ6`, :ref:`AudioEffectEQ21`. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffecteq21.rst b/classes/class_audioeffecteq21.rst index 6fce030e4..120929b2f 100644 --- a/classes/class_audioeffecteq21.rst +++ b/classes/class_audioeffecteq21.rst @@ -16,6 +16,8 @@ Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over fr Each frequency can be modulated between -60/+24 dB. +.. rst-class:: classref-introduction-group + Description ----------- @@ -65,6 +67,8 @@ Band 21: 22000 Hz See also :ref:`AudioEffectEQ`, :ref:`AudioEffectEQ6`, :ref:`AudioEffectEQ10`. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffecteq6.rst b/classes/class_audioeffecteq6.rst index 14e947198..90b49d319 100644 --- a/classes/class_audioeffecteq6.rst +++ b/classes/class_audioeffecteq6.rst @@ -16,6 +16,8 @@ Adds a 6-band equalizer audio effect to an audio bus. Gives you control over fre Each frequency can be modulated between -60/+24 dB. +.. rst-class:: classref-introduction-group + Description ----------- @@ -35,6 +37,8 @@ Band 6: 10000 Hz See also :ref:`AudioEffectEQ`, :ref:`AudioEffectEQ10`, :ref:`AudioEffectEQ21`. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index 96bb0d925..721a454d7 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -16,116 +16,157 @@ AudioEffectFilter Adds a filter to the audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Allows frequencies other than the :ref:`cutoff_hz` to pass. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------+--------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`cutoff_hz` | ``2000.0`` | -+--------------------------------------------------+--------------------------------------------------------------+------------+ -| :ref:`FilterDB` | :ref:`db` | ``0`` | -+--------------------------------------------------+--------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`gain` | ``1.0`` | -+--------------------------------------------------+--------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`resonance` | ``0.5`` | -+--------------------------------------------------+--------------------------------------------------------------+------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+--------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`cutoff_hz` | ``2000.0`` | + +--------------------------------------------------+--------------------------------------------------------------+------------+ + | :ref:`FilterDB` | :ref:`db` | ``0`` | + +--------------------------------------------------+--------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`gain` | ``1.0`` | + +--------------------------------------------------+--------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`resonance` | ``0.5`` | + +--------------------------------------------------+--------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioEffectFilter_FilterDB: -.. _class_AudioEffectFilter_constant_FILTER_6DB: - -.. _class_AudioEffectFilter_constant_FILTER_12DB: - -.. _class_AudioEffectFilter_constant_FILTER_18DB: - -.. _class_AudioEffectFilter_constant_FILTER_24DB: +.. rst-class:: classref-enumeration enum **FilterDB**: -- **FILTER_6DB** = **0** +.. _class_AudioEffectFilter_constant_FILTER_6DB: -- **FILTER_12DB** = **1** +.. rst-class:: classref-enumeration-constant -- **FILTER_18DB** = **2** +:ref:`FilterDB` **FILTER_6DB** = ``0`` -- **FILTER_24DB** = **3** + + +.. _class_AudioEffectFilter_constant_FILTER_12DB: + +.. rst-class:: classref-enumeration-constant + +:ref:`FilterDB` **FILTER_12DB** = ``1`` + + + +.. _class_AudioEffectFilter_constant_FILTER_18DB: + +.. rst-class:: classref-enumeration-constant + +:ref:`FilterDB` **FILTER_18DB** = ``2`` + + + +.. _class_AudioEffectFilter_constant_FILTER_24DB: + +.. rst-class:: classref-enumeration-constant + +:ref:`FilterDB` **FILTER_24DB** = ``3`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectFilter_property_cutoff_hz: -- :ref:`float` **cutoff_hz** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``2000.0`` | -+-----------+-------------------+ -| *Setter* | set_cutoff(value) | -+-----------+-------------------+ -| *Getter* | get_cutoff() | -+-----------+-------------------+ +:ref:`float` **cutoff_hz** = ``2000.0`` + +.. rst-class:: classref-property-setget + +- void **set_cutoff** **(** :ref:`float` value **)** +- :ref:`float` **get_cutoff** **(** **)** Threshold frequency for the filter, in Hz. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectFilter_property_db: -- :ref:`FilterDB` **db** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``0`` | -+-----------+---------------+ -| *Setter* | set_db(value) | -+-----------+---------------+ -| *Getter* | get_db() | -+-----------+---------------+ +:ref:`FilterDB` **db** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_db** **(** :ref:`FilterDB` value **)** +- :ref:`FilterDB` **get_db** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectFilter_property_gain: -- :ref:`float` **gain** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_gain(value) | -+-----------+-----------------+ -| *Getter* | get_gain() | -+-----------+-----------------+ +:ref:`float` **gain** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_gain** **(** :ref:`float` value **)** +- :ref:`float` **get_gain** **(** **)** Gain amount of the frequencies after the filter. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectFilter_property_resonance: -- :ref:`float` **resonance** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.5`` | -+-----------+----------------------+ -| *Setter* | set_resonance(value) | -+-----------+----------------------+ -| *Getter* | get_resonance() | -+-----------+----------------------+ +:ref:`float` **resonance** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_resonance** **(** :ref:`float` value **)** +- :ref:`float` **get_resonance** **(** **)** Amount of boost in the frequency range near the cutoff frequency. diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index f91691f20..0591ebd9d 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -14,11 +14,15 @@ AudioEffectHighPassFilter Adds a high-pass filter to the audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Cuts frequencies lower than the :ref:`AudioEffectFilter.cutoff_hz` and allows higher frequencies to pass. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffecthighshelffilter.rst b/classes/class_audioeffecthighshelffilter.rst index 61039da6c..c5d885108 100644 --- a/classes/class_audioeffecthighshelffilter.rst +++ b/classes/class_audioeffecthighshelffilter.rst @@ -14,11 +14,15 @@ AudioEffectHighShelfFilter Adds a high-shelf filter to the audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Reduces all frequencies above the :ref:`AudioEffectFilter.cutoff_hz`. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index 1039ab004..72594ccc3 100644 --- a/classes/class_audioeffectinstance.rst +++ b/classes/class_audioeffectinstance.rst @@ -18,31 +18,48 @@ AudioEffectInstance There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_process` **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_process_silence` **(** **)** |virtual| |const| | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioEffectInstance_method__process: -- void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| +.. rst-class:: classref-method + +void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectInstance_method__process_silence: -- :ref:`bool` **_process_silence** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_process_silence** **(** **)** |virtual| |const| .. container:: contribute diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index fb7234177..7cc212fd7 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -14,6 +14,8 @@ AudioEffectLimiter Adds a soft-clip limiter audio effect to an Audio bus. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,88 +23,103 @@ A limiter is similar to a compressor, but it's less flexible and designed to dis Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`ceiling_db` | ``-0.1`` | -+---------------------------+---------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`soft_clip_db` | ``2.0`` | -+---------------------------+---------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`soft_clip_ratio` | ``10.0`` | -+---------------------------+---------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`threshold_db` | ``0.0`` | -+---------------------------+---------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`ceiling_db` | ``-0.1`` | + +---------------------------+---------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`soft_clip_db` | ``2.0`` | + +---------------------------+---------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`soft_clip_ratio` | ``10.0`` | + +---------------------------+---------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`threshold_db` | ``0.0`` | + +---------------------------+---------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectLimiter_property_ceiling_db: -- :ref:`float` **ceiling_db** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``-0.1`` | -+-----------+-----------------------+ -| *Setter* | set_ceiling_db(value) | -+-----------+-----------------------+ -| *Getter* | get_ceiling_db() | -+-----------+-----------------------+ +:ref:`float` **ceiling_db** = ``-0.1`` + +.. rst-class:: classref-property-setget + +- void **set_ceiling_db** **(** :ref:`float` value **)** +- :ref:`float` **get_ceiling_db** **(** **)** The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectLimiter_property_soft_clip_db: -- :ref:`float` **soft_clip_db** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------------+ -| *Setter* | set_soft_clip_db(value) | -+-----------+-------------------------+ -| *Getter* | get_soft_clip_db() | -+-----------+-------------------------+ +:ref:`float` **soft_clip_db** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_soft_clip_db** **(** :ref:`float` value **)** +- :ref:`float` **get_soft_clip_db** **(** **)** Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectLimiter_property_soft_clip_ratio: -- :ref:`float` **soft_clip_ratio** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``10.0`` | -+-----------+----------------------------+ -| *Setter* | set_soft_clip_ratio(value) | -+-----------+----------------------------+ -| *Getter* | get_soft_clip_ratio() | -+-----------+----------------------------+ +:ref:`float` **soft_clip_ratio** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_soft_clip_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_soft_clip_ratio** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectLimiter_property_threshold_db: -- :ref:`float` **threshold_db** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_threshold_db(value) | -+-----------+-------------------------+ -| *Getter* | get_threshold_db() | -+-----------+-------------------------+ +:ref:`float` **threshold_db** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_threshold_db** **(** :ref:`float` value **)** +- :ref:`float` **get_threshold_db** **(** **)** Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index 7fc3f3d43..35aa23beb 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -14,11 +14,15 @@ AudioEffectLowPassFilter Adds a low-pass filter to the audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Cuts frequencies higher than the :ref:`AudioEffectFilter.cutoff_hz` and allows lower frequencies to pass. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffectlowshelffilter.rst b/classes/class_audioeffectlowshelffilter.rst index c617194e1..01aa9eb95 100644 --- a/classes/class_audioeffectlowshelffilter.rst +++ b/classes/class_audioeffectlowshelffilter.rst @@ -14,11 +14,15 @@ AudioEffectLowShelfFilter Adds a low-shelf filter to the audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Reduces all frequencies below the :ref:`AudioEffectFilter.cutoff_hz`. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index 68504eb2e..9c9d89a55 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -14,11 +14,15 @@ AudioEffectNotchFilter Adds a notch filter to the Audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Attenuates frequencies in a narrow band around the :ref:`AudioEffectFilter.cutoff_hz` and cuts frequencies outside of this range. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_audioeffectpanner.rst b/classes/class_audioeffectpanner.rst index 7179b6838..46e0a9bf7 100644 --- a/classes/class_audioeffectpanner.rst +++ b/classes/class_audioeffectpanner.rst @@ -14,37 +14,51 @@ AudioEffectPanner Adds a panner audio effect to an audio bus. Pans sound left or right. +.. rst-class:: classref-introduction-group + Description ----------- Determines how much of an audio signal is sent to the left and right buses. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------+---------+ -| :ref:`float` | :ref:`pan` | ``0.0`` | -+---------------------------+--------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------+---------+ + | :ref:`float` | :ref:`pan` | ``0.0`` | + +---------------------------+--------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectPanner_property_pan: -- :ref:`float` **pan** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.0`` | -+-----------+----------------+ -| *Setter* | set_pan(value) | -+-----------+----------------+ -| *Getter* | get_pan() | -+-----------+----------------+ +:ref:`float` **pan** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pan** **(** :ref:`float` value **)** +- :ref:`float` **get_pan** **(** **)** Pan position. Value can range from -1 (fully left) to 1 (fully right). diff --git a/classes/class_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index 7277facde..d9a68ab5b 100644 --- a/classes/class_audioeffectphaser.rst +++ b/classes/class_audioeffectphaser.rst @@ -16,109 +16,127 @@ Adds a phaser audio effect to an audio bus. Combines the original signal with a copy that is slightly out of phase with the original. +.. rst-class:: classref-introduction-group + Description ----------- Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`depth` | ``1.0`` | -+---------------------------+--------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`feedback` | ``0.7`` | -+---------------------------+--------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`range_max_hz` | ``1600.0`` | -+---------------------------+--------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`range_min_hz` | ``440.0`` | -+---------------------------+--------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`rate_hz` | ``0.5`` | -+---------------------------+--------------------------------------------------------------------+------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`depth` | ``1.0`` | + +---------------------------+--------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`feedback` | ``0.7`` | + +---------------------------+--------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`range_max_hz` | ``1600.0`` | + +---------------------------+--------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`range_min_hz` | ``440.0`` | + +---------------------------+--------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`rate_hz` | ``0.5`` | + +---------------------------+--------------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectPhaser_property_depth: -- :ref:`float` **depth** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_depth(value) | -+-----------+------------------+ -| *Getter* | get_depth() | -+-----------+------------------+ +:ref:`float` **depth** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectPhaser_property_feedback: -- :ref:`float` **feedback** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.7`` | -+-----------+---------------------+ -| *Setter* | set_feedback(value) | -+-----------+---------------------+ -| *Getter* | get_feedback() | -+-----------+---------------------+ +:ref:`float` **feedback** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_feedback** **(** :ref:`float` value **)** +- :ref:`float` **get_feedback** **(** **)** Output percent of modified sound. Value can range from 0.1 to 0.9. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectPhaser_property_range_max_hz: -- :ref:`float` **range_max_hz** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1600.0`` | -+-----------+-------------------------+ -| *Setter* | set_range_max_hz(value) | -+-----------+-------------------------+ -| *Getter* | get_range_max_hz() | -+-----------+-------------------------+ +:ref:`float` **range_max_hz** = ``1600.0`` + +.. rst-class:: classref-property-setget + +- void **set_range_max_hz** **(** :ref:`float` value **)** +- :ref:`float` **get_range_max_hz** **(** **)** Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectPhaser_property_range_min_hz: -- :ref:`float` **range_min_hz** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``440.0`` | -+-----------+-------------------------+ -| *Setter* | set_range_min_hz(value) | -+-----------+-------------------------+ -| *Getter* | get_range_min_hz() | -+-----------+-------------------------+ +:ref:`float` **range_min_hz** = ``440.0`` + +.. rst-class:: classref-property-setget + +- void **set_range_min_hz** **(** :ref:`float` value **)** +- :ref:`float` **get_range_min_hz** **(** **)** Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectPhaser_property_rate_hz: -- :ref:`float` **rate_hz** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_rate_hz(value) | -+-----------+--------------------+ -| *Getter* | get_rate_hz() | -+-----------+--------------------+ +:ref:`float` **rate_hz** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_rate_hz** **(** :ref:`float` value **)** +- :ref:`float` **get_rate_hz** **(** **)** Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. diff --git a/classes/class_audioeffectpitchshift.rst b/classes/class_audioeffectpitchshift.rst index d359cd865..1b884bad1 100644 --- a/classes/class_audioeffectpitchshift.rst +++ b/classes/class_audioeffectpitchshift.rst @@ -16,104 +16,152 @@ Adds a pitch-shifting audio effect to an audio bus. Raises or lowers the pitch of original sound. +.. rst-class:: classref-introduction-group + Description ----------- Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`FFTSize` | :ref:`fft_size` | ``3`` | -+----------------------------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`oversampling` | ``4`` | -+----------------------------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`pitch_scale` | ``1.0`` | -+----------------------------------------------------+------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +----------------------------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`FFTSize` | :ref:`fft_size` | ``3`` | + +----------------------------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`oversampling` | ``4`` | + +----------------------------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`pitch_scale` | ``1.0`` | + +----------------------------------------------------+------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioEffectPitchShift_FFTSize: -.. _class_AudioEffectPitchShift_constant_FFT_SIZE_256: - -.. _class_AudioEffectPitchShift_constant_FFT_SIZE_512: - -.. _class_AudioEffectPitchShift_constant_FFT_SIZE_1024: - -.. _class_AudioEffectPitchShift_constant_FFT_SIZE_2048: - -.. _class_AudioEffectPitchShift_constant_FFT_SIZE_4096: - -.. _class_AudioEffectPitchShift_constant_FFT_SIZE_MAX: +.. rst-class:: classref-enumeration enum **FFTSize**: -- **FFT_SIZE_256** = **0** --- Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. +.. _class_AudioEffectPitchShift_constant_FFT_SIZE_256: -- **FFT_SIZE_512** = **1** --- Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. +.. rst-class:: classref-enumeration-constant -- **FFT_SIZE_1024** = **2** --- Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. +:ref:`FFTSize` **FFT_SIZE_256** = ``0`` -- **FFT_SIZE_2048** = **3** --- Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. +Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. -- **FFT_SIZE_4096** = **4** --- Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. +.. _class_AudioEffectPitchShift_constant_FFT_SIZE_512: -- **FFT_SIZE_MAX** = **5** --- Represents the size of the :ref:`FFTSize` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_512** = ``1`` + +Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. + +.. _class_AudioEffectPitchShift_constant_FFT_SIZE_1024: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_1024** = ``2`` + +Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. + +.. _class_AudioEffectPitchShift_constant_FFT_SIZE_2048: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_2048** = ``3`` + +Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. + +.. _class_AudioEffectPitchShift_constant_FFT_SIZE_4096: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_4096** = ``4`` + +Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. + +.. _class_AudioEffectPitchShift_constant_FFT_SIZE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_MAX** = ``5`` + +Represents the size of the :ref:`FFTSize` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectPitchShift_property_fft_size: -- :ref:`FFTSize` **fft_size** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``3`` | -+-----------+---------------------+ -| *Setter* | set_fft_size(value) | -+-----------+---------------------+ -| *Getter* | get_fft_size() | -+-----------+---------------------+ +:ref:`FFTSize` **fft_size** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_fft_size** **(** :ref:`FFTSize` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectPitchShift_property_oversampling: -- :ref:`int` **oversampling** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``4`` | -+-----------+-------------------------+ -| *Setter* | set_oversampling(value) | -+-----------+-------------------------+ -| *Getter* | get_oversampling() | -+-----------+-------------------------+ +:ref:`int` **oversampling** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_oversampling** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectPitchShift_property_pitch_scale: -- :ref:`float` **pitch_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_pitch_scale(value) | -+-----------+------------------------+ -| *Getter* | get_pitch_scale() | -+-----------+------------------------+ +:ref:`float` **pitch_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_pitch_scale** **(** :ref:`float` value **)** +- :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). diff --git a/classes/class_audioeffectrecord.rst b/classes/class_audioeffectrecord.rst index 7708a1cf5..e2dcb4106 100644 --- a/classes/class_audioeffectrecord.rst +++ b/classes/class_audioeffectrecord.rst @@ -14,6 +14,8 @@ AudioEffectRecord Audio effect used for recording the sound from an audio bus. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ Can be used (with an :ref:`AudioStreamMicrophone`) 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. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,63 +34,94 @@ Tutorials - `Audio Mic Record Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------+--------------------------------------------------------+-------+ -| :ref:`Format` | :ref:`format` | ``1`` | -+-------------------------------------------+--------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-------------------------------------------+--------------------------------------------------------+-------+ + | :ref:`Format` | :ref:`format` | ``1`` | + +-------------------------------------------+--------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AudioStreamWAV` | :ref:`get_recording` **(** **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_recording_active` **(** **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_recording_active` **(** :ref:`bool` record **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamWAV` | :ref:`get_recording` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_recording_active` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_recording_active` **(** :ref:`bool` record **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectRecord_property_format: -- :ref:`Format` **format** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1`` | -+-----------+-------------------+ -| *Setter* | set_format(value) | -+-----------+-------------------+ -| *Getter* | get_format() | -+-----------+-------------------+ +:ref:`Format` **format** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_format** **(** :ref:`Format` value **)** +- :ref:`Format` **get_format** **(** **)** Specifies the format in which the sample will be recorded. See :ref:`Format` for available formats. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioEffectRecord_method_get_recording: -- :ref:`AudioStreamWAV` **get_recording** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AudioStreamWAV` **get_recording** **(** **)** |const| Returns the recorded sample. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectRecord_method_is_recording_active: -- :ref:`bool` **is_recording_active** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_recording_active** **(** **)** |const| Returns whether the recording is active or not. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectRecord_method_set_recording_active: -- void **set_recording_active** **(** :ref:`bool` record **)** +.. rst-class:: classref-method + +void **set_recording_active** **(** :ref:`bool` record **)** If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index 45cab3b14..0551da771 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -14,11 +14,15 @@ AudioEffectReverb Adds a reverberation audio effect to an Audio bus. +.. rst-class:: classref-introduction-group + Description ----------- Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,153 +30,170 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`damping` | ``0.5`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`dry` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`hipass` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`predelay_feedback` | ``0.4`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`predelay_msec` | ``150.0`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`room_size` | ``0.8`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`spread` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`wet` | ``0.5`` | -+---------------------------+------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`damping` | ``0.5`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`dry` | ``1.0`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`hipass` | ``0.0`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`predelay_feedback` | ``0.4`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`predelay_msec` | ``150.0`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`room_size` | ``0.8`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`spread` | ``1.0`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`wet` | ``0.5`` | + +---------------------------+------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectReverb_property_damping: -- :ref:`float` **damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_damping(value) | -+-----------+--------------------+ -| *Getter* | get_damping() | -+-----------+--------------------+ +:ref:`float` **damping** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_damping** **(** :ref:`float` value **)** +- :ref:`float` **get_damping** **(** **)** Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectReverb_property_dry: -- :ref:`float` **dry** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``1.0`` | -+-----------+----------------+ -| *Setter* | set_dry(value) | -+-----------+----------------+ -| *Getter* | get_dry() | -+-----------+----------------+ +:ref:`float` **dry** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_dry** **(** :ref:`float` value **)** +- :ref:`float` **get_dry** **(** **)** Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectReverb_property_hipass: -- :ref:`float` **hipass** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.0`` | -+-----------+----------------+ -| *Setter* | set_hpf(value) | -+-----------+----------------+ -| *Getter* | get_hpf() | -+-----------+----------------+ +:ref:`float` **hipass** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_hpf** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectReverb_property_predelay_feedback: -- :ref:`float` **predelay_feedback** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0.4`` | -+-----------+------------------------------+ -| *Setter* | set_predelay_feedback(value) | -+-----------+------------------------------+ -| *Getter* | get_predelay_feedback() | -+-----------+------------------------------+ +:ref:`float` **predelay_feedback** = ``0.4`` + +.. rst-class:: classref-property-setget + +- void **set_predelay_feedback** **(** :ref:`float` value **)** +- :ref:`float` **get_predelay_feedback** **(** **)** Output percent of predelay. Value can range from 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectReverb_property_predelay_msec: -- :ref:`float` **predelay_msec** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``150.0`` | -+-----------+--------------------------+ -| *Setter* | set_predelay_msec(value) | -+-----------+--------------------------+ -| *Getter* | get_predelay_msec() | -+-----------+--------------------------+ +:ref:`float` **predelay_msec** = ``150.0`` + +.. rst-class:: classref-property-setget + +- void **set_predelay_msec** **(** :ref:`float` value **)** +- :ref:`float` **get_predelay_msec** **(** **)** Time between the original signal and the early reflections of the reverb signal, in milliseconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectReverb_property_room_size: -- :ref:`float` **room_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.8`` | -+-----------+----------------------+ -| *Setter* | set_room_size(value) | -+-----------+----------------------+ -| *Getter* | get_room_size() | -+-----------+----------------------+ +:ref:`float` **room_size** = ``0.8`` + +.. rst-class:: classref-property-setget + +- void **set_room_size** **(** :ref:`float` value **)** +- :ref:`float` **get_room_size** **(** **)** Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectReverb_property_spread: -- :ref:`float` **spread** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_spread(value) | -+-----------+-------------------+ -| *Getter* | get_spread() | -+-----------+-------------------+ +:ref:`float` **spread** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_spread** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectReverb_property_wet: -- :ref:`float` **wet** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.5`` | -+-----------+----------------+ -| *Setter* | set_wet(value) | -+-----------+----------------+ -| *Getter* | get_wet() | -+-----------+----------------+ +:ref:`float` **wet** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_wet** **(** :ref:`float` value **)** +- :ref:`float` **get_wet** **(** **)** Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 7ee49c95d..fc9fbe51b 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -14,6 +14,8 @@ AudioEffectSpectrumAnalyzer Audio effect that can be used for real-time audio visualizations. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ This audio effect does not affect sound output, but can be used for real-time au See also :ref:`AudioStreamGenerator` for procedurally generating sounds. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,94 +32,138 @@ Tutorials - `Godot 3.2 will get new audio features `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`buffer_length` | ``2.0`` | -+----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`FFTSize` | :ref:`fft_size` | ``2`` | -+----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`tap_back_pos` | ``0.01`` | -+----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`buffer_length` | ``2.0`` | + +----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`FFTSize` | :ref:`fft_size` | ``2`` | + +----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`tap_back_pos` | ``0.01`` | + +----------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioEffectSpectrumAnalyzer_FFTSize: -.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_256: - -.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_512: - -.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_1024: - -.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_2048: - -.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_4096: - -.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_MAX: +.. rst-class:: classref-enumeration enum **FFTSize**: -- **FFT_SIZE_256** = **0** --- Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. +.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_256: -- **FFT_SIZE_512** = **1** --- Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. +.. rst-class:: classref-enumeration-constant -- **FFT_SIZE_1024** = **2** --- Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. +:ref:`FFTSize` **FFT_SIZE_256** = ``0`` -- **FFT_SIZE_2048** = **3** --- Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. +Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. -- **FFT_SIZE_4096** = **4** --- Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. +.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_512: -- **FFT_SIZE_MAX** = **5** --- Represents the size of the :ref:`FFTSize` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_512** = ``1`` + +Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. + +.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_1024: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_1024** = ``2`` + +Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. + +.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_2048: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_2048** = ``3`` + +Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. + +.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_4096: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_4096** = ``4`` + +Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. + +.. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`FFTSize` **FFT_SIZE_MAX** = ``5`` + +Represents the size of the :ref:`FFTSize` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectSpectrumAnalyzer_property_buffer_length: -- :ref:`float` **buffer_length** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``2.0`` | -+-----------+--------------------------+ -| *Setter* | set_buffer_length(value) | -+-----------+--------------------------+ -| *Getter* | get_buffer_length() | -+-----------+--------------------------+ +:ref:`float` **buffer_length** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_buffer_length** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectSpectrumAnalyzer_property_fft_size: -- :ref:`FFTSize` **fft_size** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``2`` | -+-----------+---------------------+ -| *Setter* | set_fft_size(value) | -+-----------+---------------------+ -| *Getter* | get_fft_size() | -+-----------+---------------------+ +:ref:`FFTSize` **fft_size** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_fft_size** **(** :ref:`FFTSize` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectSpectrumAnalyzer_property_tap_back_pos: -- :ref:`float` **tap_back_pos** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.01`` | -+-----------+-------------------------+ -| *Setter* | set_tap_back_pos(value) | -+-----------+-------------------------+ -| *Getter* | get_tap_back_pos() | -+-----------+-------------------------+ +:ref:`float` **tap_back_pos** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_tap_back_pos** **(** :ref:`float` value **)** +- :ref:`float` **get_tap_back_pos** **(** **)** .. container:: contribute diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index 9d7edeb30..efb5bd730 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -16,34 +16,63 @@ AudioEffectSpectrumAnalyzerInstance There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_magnitude_for_frequency_range` **(** :ref:`float` from_hz, :ref:`float` to_hz, :ref:`MagnitudeMode` mode=1 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_magnitude_for_frequency_range` **(** :ref:`float` from_hz, :ref:`float` to_hz, :ref:`MagnitudeMode` mode=1 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioEffectSpectrumAnalyzerInstance_MagnitudeMode: -.. _class_AudioEffectSpectrumAnalyzerInstance_constant_MAGNITUDE_AVERAGE: - -.. _class_AudioEffectSpectrumAnalyzerInstance_constant_MAGNITUDE_MAX: +.. rst-class:: classref-enumeration enum **MagnitudeMode**: -- **MAGNITUDE_AVERAGE** = **0** --- Use the average value as magnitude. +.. _class_AudioEffectSpectrumAnalyzerInstance_constant_MAGNITUDE_AVERAGE: -- **MAGNITUDE_MAX** = **1** --- Use the maximum value as magnitude. +.. rst-class:: classref-enumeration-constant + +:ref:`MagnitudeMode` **MAGNITUDE_AVERAGE** = ``0`` + +Use the average value as magnitude. + +.. _class_AudioEffectSpectrumAnalyzerInstance_constant_MAGNITUDE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`MagnitudeMode` **MAGNITUDE_MAX** = ``1`` + +Use the maximum value as magnitude. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioEffectSpectrumAnalyzerInstance_method_get_magnitude_for_frequency_range: -- :ref:`Vector2` **get_magnitude_for_frequency_range** **(** :ref:`float` from_hz, :ref:`float` to_hz, :ref:`MagnitudeMode` mode=1 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_magnitude_for_frequency_range** **(** :ref:`float` from_hz, :ref:`float` to_hz, :ref:`MagnitudeMode` mode=1 **)** |const| .. container:: contribute diff --git a/classes/class_audioeffectstereoenhance.rst b/classes/class_audioeffectstereoenhance.rst index 3fec073af..a9db4c47a 100644 --- a/classes/class_audioeffectstereoenhance.rst +++ b/classes/class_audioeffectstereoenhance.rst @@ -14,75 +14,91 @@ AudioEffectStereoEnhance An audio effect that can be used to adjust the intensity of stereo panning. +.. rst-class:: classref-introduction-group + Description ----------- An audio effect that can be used to adjust the intensity of stereo panning. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Audio buses <../tutorials/audio/audio_buses>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`pan_pullout` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`surround` | ``0.0`` | -+---------------------------+---------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`time_pullout_ms` | ``0.0`` | -+---------------------------+---------------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`pan_pullout` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`surround` | ``0.0`` | + +---------------------------+---------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`time_pullout_ms` | ``0.0`` | + +---------------------------+---------------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioEffectStereoEnhance_property_pan_pullout: -- :ref:`float` **pan_pullout** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_pan_pullout(value) | -+-----------+------------------------+ -| *Getter* | get_pan_pullout() | -+-----------+------------------------+ +:ref:`float` **pan_pullout** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_pan_pullout** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectStereoEnhance_property_surround: -- :ref:`float` **surround** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_surround(value) | -+-----------+---------------------+ -| *Getter* | get_surround() | -+-----------+---------------------+ +:ref:`float` **surround** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_surround** **(** :ref:`float` value **)** +- :ref:`float` **get_surround** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioEffectStereoEnhance_property_time_pullout_ms: -- :ref:`float` **time_pullout_ms** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_time_pullout(value) | -+-----------+-------------------------+ -| *Getter* | get_time_pullout() | -+-----------+-------------------------+ +:ref:`float` **time_pullout_ms** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_time_pullout** **(** :ref:`float` value **)** +- :ref:`float` **get_time_pullout** **(** **)** .. container:: contribute diff --git a/classes/class_audiolistener2d.rst b/classes/class_audiolistener2d.rst index d7aa6b38c..d2147c65f 100644 --- a/classes/class_audiolistener2d.rst +++ b/classes/class_audiolistener2d.rst @@ -14,50 +14,73 @@ AudioListener2D Overrides the location sounds are heard from. +.. rst-class:: classref-introduction-group + Description ----------- -Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. Only one ``AudioListener2D`` can be current. Using :ref:`make_current` will disable the previous ``AudioListener2D``. +Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. Only one **AudioListener2D** can be current. Using :ref:`make_current` will disable the previous **AudioListener2D**. -If there is no active ``AudioListener2D`` in the current :ref:`Viewport`, center of the screen will be used as a hearing point for the audio. ``AudioListener2D`` needs to be inside :ref:`SceneTree` to function. +If there is no active **AudioListener2D** in the current :ref:`Viewport`, center of the screen will be used as a hearing point for the audio. **AudioListener2D** needs to be inside :ref:`SceneTree` to function. + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+--------------------------------------------------------------------------------+ -| void | :ref:`clear_current` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_current` **(** **)** |const| | -+-------------------------+--------------------------------------------------------------------------------+ -| void | :ref:`make_current` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+--------------------------------------------------------------------------------+ + | void | :ref:`clear_current` **(** **)** | + +-------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_current` **(** **)** |const| | + +-------------------------+--------------------------------------------------------------------------------+ + | void | :ref:`make_current` **(** **)** | + +-------------------------+--------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioListener2D_method_clear_current: -- void **clear_current** **(** **)** +.. rst-class:: classref-method -Disables the ``AudioListener2D``. If it's not set as current, this method will have no effect. +void **clear_current** **(** **)** + +Disables the **AudioListener2D**. If it's not set as current, this method will have no effect. + +.. rst-class:: classref-item-separator ---- .. _class_AudioListener2D_method_is_current: -- :ref:`bool` **is_current** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``AudioListener2D`` is currently active. +:ref:`bool` **is_current** **(** **)** |const| + +Returns ``true`` if this **AudioListener2D** is currently active. + +.. rst-class:: classref-item-separator ---- .. _class_AudioListener2D_method_make_current: -- void **make_current** **(** **)** +.. rst-class:: classref-method -Makes the ``AudioListener2D`` active, setting it as the hearing point for the sounds. If there is already another active ``AudioListener2D``, it will be disabled. +void **make_current** **(** **)** -This method will have no effect if the ``AudioListener2D`` is not added to :ref:`SceneTree`. +Makes the **AudioListener2D** active, setting it as the hearing point for the sounds. If there is already another active **AudioListener2D**, it will be disabled. + +This method will have no effect if the **AudioListener2D** is not added to :ref:`SceneTree`. .. |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.)` diff --git a/classes/class_audiolistener3d.rst b/classes/class_audiolistener3d.rst index 8b331a333..ff767e6e5 100644 --- a/classes/class_audiolistener3d.rst +++ b/classes/class_audiolistener3d.rst @@ -14,56 +14,83 @@ AudioListener3D Overrides the location sounds are heard from. +.. rst-class:: classref-introduction-group + Description ----------- Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera3D`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_current` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_listener_transform` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_current` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_current` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------+ + | 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 + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioListener3D_method_clear_current: -- void **clear_current** **(** **)** +.. rst-class:: classref-method + +void **clear_current** **(** **)** Disables the listener to use the current camera's listener instead. +.. rst-class:: classref-item-separator + ---- .. _class_AudioListener3D_method_get_listener_transform: -- :ref:`Transform3D` **get_listener_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_listener_transform** **(** **)** |const| Returns the listener's global orthonormalized :ref:`Transform3D`. +.. rst-class:: classref-item-separator + ---- .. _class_AudioListener3D_method_is_current: -- :ref:`bool` **is_current** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_current** **(** **)** |const| Returns ``true`` if the listener was made current using :ref:`make_current`, ``false`` otherwise. \ **Note:** There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used. +.. rst-class:: classref-item-separator + ---- .. _class_AudioListener3D_method_make_current: -- void **make_current** **(** **)** +.. rst-class:: classref-method + +void **make_current** **(** **)** Enables the listener. This will override the current camera's listener. diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 34f5e47b7..05f55848a 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -14,10 +14,14 @@ AudioServer Server interface for low-level audio access. +.. rst-class:: classref-introduction-group + Description ----------- -``AudioServer`` is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. +**AudioServer** is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -30,517 +34,727 @@ Tutorials - `Audio Spectrum Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+------------------------------------------------------------------------------+---------------+ -| :ref:`int` | :ref:`bus_count` | ``1`` | -+-----------------------------+------------------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`capture_device` | ``"Default"`` | -+-----------------------------+------------------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`device` | ``"Default"`` | -+-----------------------------+------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`playback_speed_scale` | ``1.0`` | -+-----------------------------+------------------------------------------------------------------------------+---------------+ +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`bus_count` | ``1`` | + +-----------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`String` | :ref:`capture_device` | ``"Default"`` | + +-----------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`String` | :ref:`device` | ``"Default"`` | + +-----------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`playback_speed_scale` | ``1.0`` | + +-----------------------------+------------------------------------------------------------------------------+---------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`PackedStringArray` | :ref:`capture_get_device_list` **(** **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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_device_list` **(** **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_mix_rate` **(** **)** |const| | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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` **(** **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`PackedStringArray` | :ref:`capture_get_device_list` **(** **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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_device_list` **(** **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_mix_rate` **(** **)** |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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` **(** **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AudioServer_signal_bus_layout_changed: -- **bus_layout_changed** **(** **)** +.. rst-class:: classref-signal + +**bus_layout_changed** **(** **)** Emitted when the :ref:`AudioBusLayout` changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AudioServer_SpeakerMode: -.. _class_AudioServer_constant_SPEAKER_MODE_STEREO: - -.. _class_AudioServer_constant_SPEAKER_SURROUND_31: - -.. _class_AudioServer_constant_SPEAKER_SURROUND_51: - -.. _class_AudioServer_constant_SPEAKER_SURROUND_71: +.. rst-class:: classref-enumeration enum **SpeakerMode**: -- **SPEAKER_MODE_STEREO** = **0** --- Two or fewer speakers were detected. +.. _class_AudioServer_constant_SPEAKER_MODE_STEREO: -- **SPEAKER_SURROUND_31** = **1** --- A 3.1 channel surround setup was detected. +.. rst-class:: classref-enumeration-constant -- **SPEAKER_SURROUND_51** = **2** --- A 5.1 channel surround setup was detected. +:ref:`SpeakerMode` **SPEAKER_MODE_STEREO** = ``0`` -- **SPEAKER_SURROUND_71** = **3** --- A 7.1 channel surround setup was detected. +Two or fewer speakers were detected. + +.. _class_AudioServer_constant_SPEAKER_SURROUND_31: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpeakerMode` **SPEAKER_SURROUND_31** = ``1`` + +A 3.1 channel surround setup was detected. + +.. _class_AudioServer_constant_SPEAKER_SURROUND_51: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpeakerMode` **SPEAKER_SURROUND_51** = ``2`` + +A 5.1 channel surround setup was detected. + +.. _class_AudioServer_constant_SPEAKER_SURROUND_71: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpeakerMode` **SPEAKER_SURROUND_71** = ``3`` + +A 7.1 channel surround setup was detected. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioServer_property_bus_count: -- :ref:`int` **bus_count** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1`` | -+-----------+----------------------+ -| *Setter* | set_bus_count(value) | -+-----------+----------------------+ -| *Getter* | get_bus_count() | -+-----------+----------------------+ +:ref:`int` **bus_count** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_bus_count** **(** :ref:`int` value **)** +- :ref:`int` **get_bus_count** **(** **)** Number of available audio buses. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_property_capture_device: -- :ref:`String` **capture_device** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``"Default"`` | -+-----------+---------------------------+ -| *Setter* | capture_set_device(value) | -+-----------+---------------------------+ -| *Getter* | capture_get_device() | -+-----------+---------------------------+ +:ref:`String` **capture_device** = ``"Default"`` + +.. rst-class:: classref-property-setget + +- void **capture_set_device** **(** :ref:`String` value **)** +- :ref:`String` **capture_get_device** **(** **)** Name of the current device for audio input (see :ref:`capture_get_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"``. \ **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-item-separator + ---- .. _class_AudioServer_property_device: -- :ref:`String` **device** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``"Default"`` | -+-----------+-------------------+ -| *Setter* | set_device(value) | -+-----------+-------------------+ -| *Getter* | get_device() | -+-----------+-------------------+ +:ref:`String` **device** = ``"Default"`` + +.. rst-class:: classref-property-setget + +- void **set_device** **(** :ref:`String` value **)** +- :ref:`String` **get_device** **(** **)** Name of the current device for audio output (see :ref:`get_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"``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_property_playback_speed_scale: -- :ref:`float` **playback_speed_scale** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------------+ -| *Setter* | set_playback_speed_scale(value) | -+-----------+---------------------------------+ -| *Getter* | get_playback_speed_scale() | -+-----------+---------------------------------+ +:ref:`float` **playback_speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_playback_speed_scale** **(** :ref:`float` value **)** +- :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). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioServer_method_add_bus: -- void **add_bus** **(** :ref:`int` at_position=-1 **)** +.. rst-class:: classref-method + +void **add_bus** **(** :ref:`int` at_position=-1 **)** Adds a bus at ``at_position``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_add_bus_effect: -- void **add_bus_effect** **(** :ref:`int` bus_idx, :ref:`AudioEffect` effect, :ref:`int` at_position=-1 **)** +.. rst-class:: classref-method + +void **add_bus_effect** **(** :ref:`int` bus_idx, :ref:`AudioEffect` effect, :ref:`int` at_position=-1 **)** Adds an :ref:`AudioEffect` effect to the bus ``bus_idx`` at ``at_position``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_capture_get_device_list: -- :ref:`PackedStringArray` **capture_get_device_list** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **capture_get_device_list** **(** **)** Returns the names of all audio input devices detected on the system. \ **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-item-separator + ---- .. _class_AudioServer_method_generate_bus_layout: -- :ref:`AudioBusLayout` **generate_bus_layout** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AudioBusLayout` **generate_bus_layout** **(** **)** |const| Generates an :ref:`AudioBusLayout` using the available buses and effects. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_channels: -- :ref:`int` **get_bus_channels** **(** :ref:`int` bus_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bus_channels** **(** :ref:`int` bus_idx **)** |const| Returns the number of channels of the bus at index ``bus_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_effect: -- :ref:`AudioEffect` **get_bus_effect** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** +.. rst-class:: classref-method + +:ref:`AudioEffect` **get_bus_effect** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** Returns the :ref:`AudioEffect` at position ``effect_idx`` in bus ``bus_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_effect_count: -- :ref:`int` **get_bus_effect_count** **(** :ref:`int` bus_idx **)** +.. rst-class:: classref-method + +:ref:`int` **get_bus_effect_count** **(** :ref:`int` bus_idx **)** Returns the number of effects on the bus at ``bus_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_effect_instance: -- :ref:`AudioEffectInstance` **get_bus_effect_instance** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` channel=0 **)** +.. rst-class:: classref-method + +:ref:`AudioEffectInstance` **get_bus_effect_instance** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` channel=0 **)** Returns the :ref:`AudioEffectInstance` assigned to the given bus and effect indices (and optionally channel). +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_index: -- :ref:`int` **get_bus_index** **(** :ref:`StringName` bus_name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bus_index** **(** :ref:`StringName` bus_name **)** |const| Returns the index of the bus with the name ``bus_name``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_name: -- :ref:`String` **get_bus_name** **(** :ref:`int` bus_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_bus_name** **(** :ref:`int` bus_idx **)** |const| Returns the name of the bus with the index ``bus_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_peak_volume_left_db: -- :ref:`float` **get_bus_peak_volume_left_db** **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_bus_peak_volume_left_db** **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| Returns the peak volume of the left speaker at bus index ``bus_idx`` and channel index ``channel``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_peak_volume_right_db: -- :ref:`float` **get_bus_peak_volume_right_db** **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_bus_peak_volume_right_db** **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| Returns the peak volume of the right speaker at bus index ``bus_idx`` and channel index ``channel``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_send: -- :ref:`StringName` **get_bus_send** **(** :ref:`int` bus_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_bus_send** **(** :ref:`int` bus_idx **)** |const| Returns the name of the bus that the bus at index ``bus_idx`` sends to. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_bus_volume_db: -- :ref:`float` **get_bus_volume_db** **(** :ref:`int` bus_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_bus_volume_db** **(** :ref:`int` bus_idx **)** |const| Returns the volume of the bus at index ``bus_idx`` in dB. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_device_list: -- :ref:`PackedStringArray` **get_device_list** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_device_list** **(** **)** Returns the names of all audio devices detected on the system. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_mix_rate: -- :ref:`float` **get_mix_rate** **(** **)** |const| +.. rst-class:: classref-method -Returns the sample rate at the output of the ``AudioServer``. +:ref:`float` **get_mix_rate** **(** **)** |const| + +Returns the sample rate at the output of the **AudioServer**. + +.. rst-class:: classref-item-separator ---- .. _class_AudioServer_method_get_output_latency: -- :ref:`float` **get_output_latency** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_output_latency** **(** **)** |const| Returns the audio driver's output latency. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_speaker_mode: -- :ref:`SpeakerMode` **get_speaker_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SpeakerMode` **get_speaker_mode** **(** **)** |const| Returns the speaker configuration. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_time_since_last_mix: -- :ref:`float` **get_time_since_last_mix** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_time_since_last_mix** **(** **)** |const| Returns the relative time since the last mix occurred. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_get_time_to_next_mix: -- :ref:`float` **get_time_to_next_mix** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_time_to_next_mix** **(** **)** |const| Returns the relative time until the next mix occurs. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_is_bus_bypassing_effects: -- :ref:`bool` **is_bus_bypassing_effects** **(** :ref:`int` bus_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_bus_bypassing_effects** **(** :ref:`int` bus_idx **)** |const| If ``true``, the bus at index ``bus_idx`` is bypassing effects. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_is_bus_effect_enabled: -- :ref:`bool` **is_bus_effect_enabled** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_bus_effect_enabled** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** |const| If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_is_bus_mute: -- :ref:`bool` **is_bus_mute** **(** :ref:`int` bus_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_bus_mute** **(** :ref:`int` bus_idx **)** |const| If ``true``, the bus at index ``bus_idx`` is muted. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_is_bus_solo: -- :ref:`bool` **is_bus_solo** **(** :ref:`int` bus_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_bus_solo** **(** :ref:`int` bus_idx **)** |const| If ``true``, the bus at index ``bus_idx`` is in solo mode. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_lock: -- void **lock** **(** **)** +.. rst-class:: classref-method + +void **lock** **(** **)** Locks the audio driver's main loop. \ **Note:** Remember to unlock it afterwards. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_move_bus: -- void **move_bus** **(** :ref:`int` index, :ref:`int` to_index **)** +.. rst-class:: classref-method + +void **move_bus** **(** :ref:`int` index, :ref:`int` to_index **)** Moves the bus from index ``index`` to index ``to_index``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_remove_bus: -- void **remove_bus** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_bus** **(** :ref:`int` index **)** Removes the bus at index ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_remove_bus_effect: -- void **remove_bus_effect** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** +.. rst-class:: classref-method + +void **remove_bus_effect** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** Removes the effect at index ``effect_idx`` from the bus at index ``bus_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_bypass_effects: -- void **set_bus_bypass_effects** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_bus_bypass_effects** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** If ``true``, the bus at index ``bus_idx`` is bypassing effects. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_effect_enabled: -- void **set_bus_effect_enabled** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_bus_effect_enabled** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`bool` enabled **)** If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_layout: -- void **set_bus_layout** **(** :ref:`AudioBusLayout` bus_layout **)** +.. rst-class:: classref-method + +void **set_bus_layout** **(** :ref:`AudioBusLayout` bus_layout **)** Overwrites the currently used :ref:`AudioBusLayout`. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_mute: -- void **set_bus_mute** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_bus_mute** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** If ``true``, the bus at index ``bus_idx`` is muted. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_name: -- void **set_bus_name** **(** :ref:`int` bus_idx, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_bus_name** **(** :ref:`int` bus_idx, :ref:`String` name **)** Sets the name of the bus at index ``bus_idx`` to ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_send: -- void **set_bus_send** **(** :ref:`int` bus_idx, :ref:`StringName` send **)** +.. rst-class:: classref-method + +void **set_bus_send** **(** :ref:`int` bus_idx, :ref:`StringName` send **)** Connects the output of the bus at ``bus_idx`` to the bus named ``send``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_solo: -- void **set_bus_solo** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_bus_solo** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** If ``true``, the bus at index ``bus_idx`` is in solo mode. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_bus_volume_db: -- void **set_bus_volume_db** **(** :ref:`int` bus_idx, :ref:`float` volume_db **)** +.. rst-class:: classref-method + +void **set_bus_volume_db** **(** :ref:`int` bus_idx, :ref:`float` volume_db **)** Sets the volume of the bus at index ``bus_idx`` to ``volume_db``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_set_enable_tagging_used_audio_streams: -- void **set_enable_tagging_used_audio_streams** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_enable_tagging_used_audio_streams** **(** :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_swap_bus_effects: -- void **swap_bus_effects** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` by_effect_idx **)** +.. rst-class:: classref-method + +void **swap_bus_effects** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` by_effect_idx **)** Swaps the position of two effects in bus ``bus_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioServer_method_unlock: -- void **unlock** **(** **)** +.. rst-class:: classref-method + +void **unlock** **(** **)** Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 230087da2..b6624b27a 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -16,11 +16,15 @@ AudioStream Base class for audio streams. +.. rst-class:: classref-introduction-group + Description ----------- Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via :ref:`AudioStreamWAV`) and Ogg (via :ref:`AudioStreamOggVorbis`) file formats. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,111 +36,156 @@ Tutorials - `Audio Spectrum Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :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| | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioStream_method__get_beat_count: -- :ref:`int` **_get_beat_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_beat_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method__get_bpm: -- :ref:`float` **_get_bpm** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_bpm** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method__get_length: -- :ref:`float` **_get_length** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_length** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method__get_stream_name: -- :ref:`String` **_get_stream_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_stream_name** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method__instantiate_playback: -- :ref:`AudioStreamPlayback` **_instantiate_playback** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`AudioStreamPlayback` **_instantiate_playback** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method__is_monophonic: -- :ref:`bool` **_is_monophonic** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_monophonic** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method_get_length: -- :ref:`float` **get_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_length** **(** **)** |const| Returns the length of the audio stream in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method_instantiate_playback: -- :ref:`AudioStreamPlayback` **instantiate_playback** **(** **)** +.. rst-class:: classref-method + +:ref:`AudioStreamPlayback` **instantiate_playback** **(** **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStream_method_is_monophonic: -- :ref:`bool` **is_monophonic** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_monophonic** **(** **)** |const| Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony. diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index 03d70796d..cfd9a9949 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -14,6 +14,8 @@ AudioStreamGenerator Audio stream that generates sounds procedurally. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ See also :ref:`AudioEffectSpectrumAnalyzer` f \ **Note:** Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower :ref:`mix_rate` such as 11,025 Hz or 22,050 Hz. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,45 +34,56 @@ Tutorials - `Godot 3.2 will get new audio features `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`buffer_length` | ``0.5`` | -+---------------------------+-------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`mix_rate` | ``44100.0`` | -+---------------------------+-------------------------------------------------------------------------+-------------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`buffer_length` | ``0.5`` | + +---------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`mix_rate` | ``44100.0`` | + +---------------------------+-------------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioStreamGenerator_property_buffer_length: -- :ref:`float` **buffer_length** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------------+ -| *Setter* | set_buffer_length(value) | -+-----------+--------------------------+ -| *Getter* | get_buffer_length() | -+-----------+--------------------------+ +:ref:`float` **buffer_length** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_buffer_length** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamGenerator_property_mix_rate: -- :ref:`float` **mix_rate** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``44100.0`` | -+-----------+---------------------+ -| *Setter* | set_mix_rate(value) | -+-----------+---------------------+ -| *Getter* | get_mix_rate() | -+-----------+---------------------+ +:ref:`float` **mix_rate** = ``44100.0`` + +.. rst-class:: classref-property-setget + +- void **set_mix_rate** **(** :ref:`float` value **)** +- :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. diff --git a/classes/class_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index 0e4e2f835..aacbe8b8f 100644 --- a/classes/class_audiostreamgeneratorplayback.rst +++ b/classes/class_audiostreamgeneratorplayback.rst @@ -14,11 +14,15 @@ AudioStreamGeneratorPlayback Plays back audio generated using :ref:`AudioStreamGenerator`. +.. rst-class:: classref-introduction-group + Description ----------- This class is meant to be used with :ref:`AudioStreamGenerator` to play back the generated audio in real-time. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,71 +30,104 @@ Tutorials - `Godot 3.2 will get new audio features `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioStreamGeneratorPlayback_method_can_push_buffer: -- :ref:`bool` **can_push_buffer** **(** :ref:`int` amount **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_push_buffer** **(** :ref:`int` amount **)** |const| Returns ``true`` if a buffer of the size ``amount`` can be pushed to the audio sample data buffer without overflowing it, ``false`` otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamGeneratorPlayback_method_clear_buffer: -- void **clear_buffer** **(** **)** +.. rst-class:: classref-method + +void **clear_buffer** **(** **)** Clears the audio sample data buffer. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamGeneratorPlayback_method_get_frames_available: -- :ref:`int` **get_frames_available** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_frames_available** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamGeneratorPlayback_method_get_skips: -- :ref:`int` **get_skips** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_skips** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamGeneratorPlayback_method_push_buffer: -- :ref:`bool` **push_buffer** **(** :ref:`PackedVector2Array` frames **)** +.. rst-class:: classref-method + +:ref:`bool` **push_buffer** **(** :ref:`PackedVector2Array` frames **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamGeneratorPlayback_method_push_frame: -- :ref:`bool` **push_frame** **(** :ref:`Vector2` frame **)** +.. rst-class:: classref-method + +:ref:`bool` **push_frame** **(** :ref:`Vector2` frame **)** 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. diff --git a/classes/class_audiostreammicrophone.rst b/classes/class_audiostreammicrophone.rst index 2ee57ff30..f452c96ca 100644 --- a/classes/class_audiostreammicrophone.rst +++ b/classes/class_audiostreammicrophone.rst @@ -14,13 +14,17 @@ AudioStreamMicrophone Plays real-time audio input data. +.. rst-class:: classref-introduction-group + Description ----------- -When used directly in an :ref:`AudioStreamPlayer` node, ``AudioStreamMicrophone`` plays back microphone input in real-time. This can be used in conjunction with :ref:`AudioEffectCapture` to process the data or save it. +When used directly in an :ref:`AudioStreamPlayer` node, **AudioStreamMicrophone** plays back microphone input in real-time. This can be used in conjunction with :ref:`AudioEffectCapture` to process the data or save it. \ **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 + Tutorials --------- diff --git a/classes/class_audiostreammp3.rst b/classes/class_audiostreammp3.rst index 24684ca83..977a6b56f 100644 --- a/classes/class_audiostreammp3.rst +++ b/classes/class_audiostreammp3.rst @@ -14,96 +14,111 @@ AudioStreamMP3 MP3 audio stream driver. +.. rst-class:: classref-introduction-group + Description ----------- MP3 audio stream driver. See :ref:`data` if you want to load an MP3 file at run-time. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`bar_beats` | ``4`` | -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`beat_count` | ``0`` | -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`bpm` | ``0.0`` | -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`loop` | ``false`` | -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`loop_offset` | ``0.0`` | -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`bar_beats` | ``4`` | + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`beat_count` | ``0`` | + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`bpm` | ``0.0`` | + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`loop` | ``false`` | + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`loop_offset` | ``0.0`` | + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioStreamMP3_property_bar_beats: -- :ref:`int` **bar_beats** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4`` | -+-----------+----------------------+ -| *Setter* | set_bar_beats(value) | -+-----------+----------------------+ -| *Getter* | get_bar_beats() | -+-----------+----------------------+ +:ref:`int` **bar_beats** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_bar_beats** **(** :ref:`int` value **)** +- :ref:`int` **get_bar_beats** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamMP3_property_beat_count: -- :ref:`int` **beat_count** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_beat_count(value) | -+-----------+-----------------------+ -| *Getter* | get_beat_count() | -+-----------+-----------------------+ +:ref:`int` **beat_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_beat_count** **(** :ref:`int` value **)** +- :ref:`int` **get_beat_count** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamMP3_property_bpm: -- :ref:`float` **bpm** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.0`` | -+-----------+----------------+ -| *Setter* | set_bpm(value) | -+-----------+----------------+ -| *Getter* | get_bpm() | -+-----------+----------------+ +:ref:`float` **bpm** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_bpm** **(** :ref:`float` value **)** +- :ref:`float` **get_bpm** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamMP3_property_data: -- :ref:`PackedByteArray` **data** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+-----------------------+ -| *Setter* | set_data(value) | -+-----------+-----------------------+ -| *Getter* | get_data() | -+-----------+-----------------------+ +:ref:`PackedByteArray` **data** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_data** **(** :ref:`PackedByteArray` value **)** +- :ref:`PackedByteArray` **get_data** **(** **)** Contains the audio data in bytes. @@ -136,35 +151,37 @@ You can load a file without having to import it beforehand using the code snippe +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamMP3_property_loop: -- :ref:`bool` **loop** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_loop(value) | -+-----------+-----------------+ -| *Getter* | has_loop() | -+-----------+-----------------+ +:ref:`bool` **loop** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_loop** **(** :ref:`bool` value **)** +- :ref:`bool` **has_loop** **(** **)** If ``true``, the stream will automatically loop when it reaches the end. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamMP3_property_loop_offset: -- :ref:`float` **loop_offset** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_loop_offset(value) | -+-----------+------------------------+ -| *Getter* | get_loop_offset() | -+-----------+------------------------+ +:ref:`float` **loop_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_loop_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_loop_offset** **(** **)** Time in seconds at which the stream starts after being looped. diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index 5ff1e2109..3801cdb17 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -16,121 +16,138 @@ AudioStreamOggVorbis There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`bar_beats` | ``4`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`beat_count` | ``0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`bpm` | ``0.0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`loop` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`loop_offset` | ``0.0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`OggPacketSequence` | :ref:`packet_sequence` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`bar_beats` | ``4`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`beat_count` | ``0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`bpm` | ``0.0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`loop` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`loop_offset` | ``0.0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`OggPacketSequence` | :ref:`packet_sequence` | | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioStreamOggVorbis_property_bar_beats: -- :ref:`int` **bar_beats** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4`` | -+-----------+----------------------+ -| *Setter* | set_bar_beats(value) | -+-----------+----------------------+ -| *Getter* | get_bar_beats() | -+-----------+----------------------+ +:ref:`int` **bar_beats** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_bar_beats** **(** :ref:`int` value **)** +- :ref:`int` **get_bar_beats** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamOggVorbis_property_beat_count: -- :ref:`int` **beat_count** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_beat_count(value) | -+-----------+-----------------------+ -| *Getter* | get_beat_count() | -+-----------+-----------------------+ +:ref:`int` **beat_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_beat_count** **(** :ref:`int` value **)** +- :ref:`int` **get_beat_count** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamOggVorbis_property_bpm: -- :ref:`float` **bpm** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.0`` | -+-----------+----------------+ -| *Setter* | set_bpm(value) | -+-----------+----------------+ -| *Getter* | get_bpm() | -+-----------+----------------+ +:ref:`float` **bpm** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_bpm** **(** :ref:`float` value **)** +- :ref:`float` **get_bpm** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamOggVorbis_property_loop: -- :ref:`bool` **loop** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_loop(value) | -+-----------+-----------------+ -| *Getter* | has_loop() | -+-----------+-----------------+ +:ref:`bool` **loop** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_loop** **(** :ref:`bool` value **)** +- :ref:`bool` **has_loop** **(** **)** If ``true``, the stream will automatically loop when it reaches the end. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamOggVorbis_property_loop_offset: -- :ref:`float` **loop_offset** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_loop_offset(value) | -+-----------+------------------------+ -| *Getter* | get_loop_offset() | -+-----------+------------------------+ +:ref:`float` **loop_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_loop_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_loop_offset** **(** **)** Time in seconds at which the stream starts after being looped. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamOggVorbis_property_packet_sequence: -- :ref:`OggPacketSequence` **packet_sequence** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_packet_sequence(value) | -+----------+----------------------------+ -| *Getter* | get_packet_sequence() | -+----------+----------------------------+ +:ref:`OggPacketSequence` **packet_sequence** + +.. rst-class:: classref-property-setget + +- void **set_packet_sequence** **(** :ref:`OggPacketSequence` value **)** +- :ref:`OggPacketSequence` **get_packet_sequence** **(** **)** Contains the raw Ogg data for this stream. diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index a795f0bff..be3803a72 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -16,113 +16,158 @@ AudioStreamPlayback Meta class for playing back audio. +.. rst-class:: classref-introduction-group + Description ----------- Can play, loop, pause a scroll through audio. See :ref:`AudioStream` and :ref:`AudioStreamOggVorbis` for usage. +.. rst-class:: classref-introduction-group + Tutorials --------- - `Audio Generator Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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| | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioStreamPlayback_method__get_loop_count: -- :ref:`int` **_get_loop_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_loop_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayback_method__get_playback_position: -- :ref:`float` **_get_playback_position** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_playback_position** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayback_method__is_playing: -- :ref:`bool` **_is_playing** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_playing** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayback_method__mix: -- :ref:`int` **_mix** **(** AudioFrame* buffer, :ref:`float` rate_scale, :ref:`int` frames **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_mix** **(** AudioFrame* buffer, :ref:`float` rate_scale, :ref:`int` frames **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayback_method__seek: -- void **_seek** **(** :ref:`float` position **)** |virtual| +.. rst-class:: classref-method + +void **_seek** **(** :ref:`float` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayback_method__start: -- void **_start** **(** :ref:`float` from_pos **)** |virtual| +.. rst-class:: classref-method + +void **_start** **(** :ref:`float` from_pos **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayback_method__stop: -- void **_stop** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_stop** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayback_method__tag_used_streams: -- void **_tag_used_streams** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_tag_used_streams** **(** **)** |virtual| .. container:: contribute diff --git a/classes/class_audiostreamplaybackresampled.rst b/classes/class_audiostreamplaybackresampled.rst index 4e13d5201..692782516 100644 --- a/classes/class_audiostreamplaybackresampled.rst +++ b/classes/class_audiostreamplaybackresampled.rst @@ -18,43 +18,64 @@ AudioStreamPlaybackResampled There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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` **(** **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AudioStreamPlaybackResampled_method__get_stream_sampling_rate: -- :ref:`float` **_get_stream_sampling_rate** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_stream_sampling_rate** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlaybackResampled_method__mix_resampled: -- :ref:`int` **_mix_resampled** **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_mix_resampled** **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlaybackResampled_method_begin_resample: -- void **begin_resample** **(** **)** +.. rst-class:: classref-method + +void **begin_resample** **(** **)** .. container:: contribute diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index e6257eeb1..be0027639 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -14,12 +14,16 @@ AudioStreamPlayer Plays back audio non-positionally. +.. rst-class:: classref-introduction-group + Description ----------- Plays an audio stream non-positionally. -To play audio positionally, use :ref:`AudioStreamPlayer2D` or :ref:`AudioStreamPlayer3D` instead of ``AudioStreamPlayer``. +To play audio positionally, use :ref:`AudioStreamPlayer2D` or :ref:`AudioStreamPlayer3D` instead of **AudioStreamPlayer**. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -36,253 +40,331 @@ Tutorials - `Audio Spectrum Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+----------------------------------------------------------------------+---------------+ -| :ref:`bool` | :ref:`autoplay` | ``false`` | -+----------------------------------------------------+----------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`bus` | ``&"Master"`` | -+----------------------------------------------------+----------------------------------------------------------------------+---------------+ -| :ref:`int` | :ref:`max_polyphony` | ``1`` | -+----------------------------------------------------+----------------------------------------------------------------------+---------------+ -| :ref:`MixTarget` | :ref:`mix_target` | ``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`` | -+----------------------------------------------------+----------------------------------------------------------------------+---------------+ +.. table:: + :widths: auto + + +----------------------------------------------------+----------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`autoplay` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------+---------------+ + | :ref:`StringName` | :ref:`bus` | ``&"Master"`` | + +----------------------------------------------------+----------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`max_polyphony` | ``1`` | + +----------------------------------------------------+----------------------------------------------------------------------+---------------+ + | :ref:`MixTarget` | :ref:`mix_target` | ``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`` | + +----------------------------------------------------+----------------------------------------------------------------------+---------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_playback_position` **(** **)** | -+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | -+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | -+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`seek` **(** :ref:`float` to_position **)** | -+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position` **(** **)** | + +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | + +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | + +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek` **(** :ref:`float` to_position **)** | + +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AudioStreamPlayer_signal_finished: -- **finished** **(** **)** +.. rst-class:: classref-signal + +**finished** **(** **)** Emitted when the audio stops playing. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AudioStreamPlayer_MixTarget: -.. _class_AudioStreamPlayer_constant_MIX_TARGET_STEREO: - -.. _class_AudioStreamPlayer_constant_MIX_TARGET_SURROUND: - -.. _class_AudioStreamPlayer_constant_MIX_TARGET_CENTER: +.. rst-class:: classref-enumeration enum **MixTarget**: -- **MIX_TARGET_STEREO** = **0** --- The audio will be played only on the first channel. +.. _class_AudioStreamPlayer_constant_MIX_TARGET_STEREO: -- **MIX_TARGET_SURROUND** = **1** --- The audio will be played on all surround channels. +.. rst-class:: classref-enumeration-constant -- **MIX_TARGET_CENTER** = **2** --- The audio will be played on the second channel, which is usually the center. +:ref:`MixTarget` **MIX_TARGET_STEREO** = ``0`` + +The audio will be played only on the first channel. + +.. _class_AudioStreamPlayer_constant_MIX_TARGET_SURROUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`MixTarget` **MIX_TARGET_SURROUND** = ``1`` + +The audio will be played on all surround channels. + +.. _class_AudioStreamPlayer_constant_MIX_TARGET_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`MixTarget` **MIX_TARGET_CENTER** = ``2`` + +The audio will be played on the second channel, which is usually the center. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioStreamPlayer_property_autoplay: -- :ref:`bool` **autoplay** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_autoplay(value) | -+-----------+-----------------------+ -| *Getter* | is_autoplay_enabled() | -+-----------+-----------------------+ +:ref:`bool` **autoplay** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_autoplay** **(** :ref:`bool` value **)** +- :ref:`bool` **is_autoplay_enabled** **(** **)** If ``true``, audio plays when added to scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_bus: -- :ref:`StringName` **bus** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``&"Master"`` | -+-----------+----------------+ -| *Setter* | set_bus(value) | -+-----------+----------------+ -| *Getter* | get_bus() | -+-----------+----------------+ +:ref:`StringName` **bus** = ``&"Master"`` + +.. rst-class:: classref-property-setget + +- void **set_bus** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_bus** **(** **)** Bus on which this audio is playing. \ **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"``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_max_polyphony: -- :ref:`int` **max_polyphony** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------+ -| *Setter* | set_max_polyphony(value) | -+-----------+--------------------------+ -| *Getter* | get_max_polyphony() | -+-----------+--------------------------+ +:ref:`int` **max_polyphony** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_polyphony** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_mix_target: -- :ref:`MixTarget` **mix_target** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_mix_target(value) | -+-----------+-----------------------+ -| *Getter* | get_mix_target() | -+-----------+-----------------------+ +:ref:`MixTarget` **mix_target** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mix_target** **(** :ref:`MixTarget` value **)** +- :ref:`MixTarget` **get_mix_target** **(** **)** If the audio configuration has more than two speakers, this sets the target channels. See :ref:`MixTarget` constants. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_pitch_scale: -- :ref:`float` **pitch_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_pitch_scale(value) | -+-----------+------------------------+ -| *Getter* | get_pitch_scale() | -+-----------+------------------------+ +:ref:`float` **pitch_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_pitch_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_pitch_scale** **(** **)** The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_playing: -- :ref:`bool` **playing** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``false`` | -+-----------+--------------+ -| *Getter* | is_playing() | -+-----------+--------------+ +:ref:`bool` **playing** = ``false`` + +.. rst-class:: classref-property-setget + +- :ref:`bool` **is_playing** **(** **)** If ``true``, audio is playing. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_stream: -- :ref:`AudioStream` **stream** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_stream(value) | -+----------+-------------------+ -| *Getter* | get_stream() | -+----------+-------------------+ +:ref:`AudioStream` **stream** + +.. rst-class:: classref-property-setget + +- void **set_stream** **(** :ref:`AudioStream` value **)** +- :ref:`AudioStream` **get_stream** **(** **)** The :ref:`AudioStream` object to be played. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_stream_paused: -- :ref:`bool` **stream_paused** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_stream_paused(value) | -+-----------+--------------------------+ -| *Getter* | get_stream_paused() | -+-----------+--------------------------+ +:ref:`bool` **stream_paused** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_stream_paused** **(** :ref:`bool` value **)** +- :ref:`bool` **get_stream_paused** **(** **)** If ``true``, the playback is paused. You can resume it by setting ``stream_paused`` to ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_property_volume_db: -- :ref:`float` **volume_db** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_volume_db(value) | -+-----------+----------------------+ -| *Getter* | get_volume_db() | -+-----------+----------------------+ +:ref:`float` **volume_db** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_volume_db** **(** :ref:`float` value **)** +- :ref:`float` **get_volume_db** **(** **)** Volume of sound, in dB. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioStreamPlayer_method_get_playback_position: -- :ref:`float` **get_playback_position** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **get_playback_position** **(** **)** Returns the position in the :ref:`AudioStream` in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_method_get_stream_playback: -- :ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +.. rst-class:: classref-method -Returns the :ref:`AudioStreamPlayback` object associated with this ``AudioStreamPlayer``. +:ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** + +Returns the :ref:`AudioStreamPlayback` object associated with this **AudioStreamPlayer**. + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer_method_play: -- void **play** **(** :ref:`float` from_position=0.0 **)** +.. rst-class:: classref-method + +void **play** **(** :ref:`float` from_position=0.0 **)** Plays the audio from the given ``from_position``, in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_method_seek: -- void **seek** **(** :ref:`float` to_position **)** +.. rst-class:: classref-method + +void **seek** **(** :ref:`float` to_position **)** Sets the position from which audio will be played, in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the audio. diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 1c05727c7..2be6788e6 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -14,6 +14,8 @@ AudioStreamPlayer2D Plays positional sound in 2D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,295 +25,358 @@ By default, audio is heard from the screen center. This can be changed by adding See also :ref:`AudioStreamPlayer` to play a sound non-positionally. -\ **Note:** Hiding an ``AudioStreamPlayer2D`` node does not disable its audio output. To temporarily disable an ``AudioStreamPlayer2D``'s audio output, set :ref:`volume_db` to a very low value like ``-100`` (which isn't audible to human hearing). +\ **Note:** Hiding an **AudioStreamPlayer2D** node does not disable its audio output. To temporarily disable an **AudioStreamPlayer2D**'s audio output, set :ref:`volume_db` to a very low value like ``-100`` (which isn't audible to human hearing). + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Audio streams <../tutorials/audio/audio_streams>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+------------------------------------------------------------------------------+---------------+ -| :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`` | -+---------------------------------------+------------------------------------------------------------------------------+---------------+ +.. 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`` | + +---------------------------------------+------------------------------------------------------------------------------+---------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_playback_position` **(** **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`seek` **(** :ref:`float` to_position **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position` **(** **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek` **(** :ref:`float` to_position **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AudioStreamPlayer2D_signal_finished: -- **finished** **(** **)** +.. rst-class:: classref-signal + +**finished** **(** **)** Emitted when the audio stops playing. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_AudioStreamPlayer2D_property_area_mask: -- :ref:`int` **area_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1`` | -+-----------+----------------------+ -| *Setter* | set_area_mask(value) | -+-----------+----------------------+ -| *Getter* | get_area_mask() | -+-----------+----------------------+ +:ref:`int` **area_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_area_mask** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_attenuation: -- :ref:`float` **attenuation** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_attenuation(value) | -+-----------+------------------------+ -| *Getter* | get_attenuation() | -+-----------+------------------------+ +:ref:`float` **attenuation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_attenuation** **(** :ref:`float` value **)** +- :ref:`float` **get_attenuation** **(** **)** Dampens audio over distance with this as an exponent. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_autoplay: -- :ref:`bool` **autoplay** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_autoplay(value) | -+-----------+-----------------------+ -| *Getter* | is_autoplay_enabled() | -+-----------+-----------------------+ +:ref:`bool` **autoplay** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_autoplay** **(** :ref:`bool` value **)** +- :ref:`bool` **is_autoplay_enabled** **(** **)** If ``true``, audio plays when added to scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_bus: -- :ref:`StringName` **bus** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``&"Master"`` | -+-----------+----------------+ -| *Setter* | set_bus(value) | -+-----------+----------------+ -| *Getter* | get_bus() | -+-----------+----------------+ +:ref:`StringName` **bus** = ``&"Master"`` + +.. rst-class:: classref-property-setget + +- void **set_bus** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_bus** **(** **)** Bus on which this audio is playing. \ **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"``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_max_distance: -- :ref:`float` **max_distance** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``2000.0`` | -+-----------+-------------------------+ -| *Setter* | set_max_distance(value) | -+-----------+-------------------------+ -| *Getter* | get_max_distance() | -+-----------+-------------------------+ +:ref:`float` **max_distance** = ``2000.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_max_distance** **(** **)** Maximum distance from which audio is still hearable. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_max_polyphony: -- :ref:`int` **max_polyphony** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------+ -| *Setter* | set_max_polyphony(value) | -+-----------+--------------------------+ -| *Getter* | get_max_polyphony() | -+-----------+--------------------------+ +:ref:`int` **max_polyphony** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_polyphony** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_panning_strength: -- :ref:`float` **panning_strength** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------------+ -| *Setter* | set_panning_strength(value) | -+-----------+-----------------------------+ -| *Getter* | get_panning_strength() | -+-----------+-----------------------------+ +:ref:`float` **panning_strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_panning_strength** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_pitch_scale: -- :ref:`float` **pitch_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_pitch_scale(value) | -+-----------+------------------------+ -| *Getter* | get_pitch_scale() | -+-----------+------------------------+ +:ref:`float` **pitch_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_pitch_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_pitch_scale** **(** **)** The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_playing: -- :ref:`bool` **playing** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``false`` | -+-----------+--------------+ -| *Getter* | is_playing() | -+-----------+--------------+ +:ref:`bool` **playing** = ``false`` -If ``true``, audio is playing. +.. rst-class:: classref-property-setget + +- :ref:`bool` **is_playing** **(** **)** + +If ``true``, audio is playing or is queued to be played (see :ref:`play`). + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer2D_property_stream: -- :ref:`AudioStream` **stream** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_stream(value) | -+----------+-------------------+ -| *Getter* | get_stream() | -+----------+-------------------+ +:ref:`AudioStream` **stream** + +.. rst-class:: classref-property-setget + +- void **set_stream** **(** :ref:`AudioStream` value **)** +- :ref:`AudioStream` **get_stream** **(** **)** The :ref:`AudioStream` object to be played. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_stream_paused: -- :ref:`bool` **stream_paused** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_stream_paused(value) | -+-----------+--------------------------+ -| *Getter* | get_stream_paused() | -+-----------+--------------------------+ +:ref:`bool` **stream_paused** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_stream_paused** **(** :ref:`bool` value **)** +- :ref:`bool` **get_stream_paused** **(** **)** If ``true``, the playback is paused. You can resume it by setting ``stream_paused`` to ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_property_volume_db: -- :ref:`float` **volume_db** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_volume_db(value) | -+-----------+----------------------+ -| *Getter* | get_volume_db() | -+-----------+----------------------+ +:ref:`float` **volume_db** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_volume_db** **(** :ref:`float` value **)** +- :ref:`float` **get_volume_db** **(** **)** Base volume without dampening. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioStreamPlayer2D_method_get_playback_position: -- :ref:`float` **get_playback_position** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **get_playback_position** **(** **)** Returns the position in the :ref:`AudioStream`. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_method_get_stream_playback: -- :ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +.. rst-class:: classref-method -Returns the :ref:`AudioStreamPlayback` object associated with this ``AudioStreamPlayer2D``. +:ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** + +Returns the :ref:`AudioStreamPlayback` object associated with this **AudioStreamPlayer2D**. + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer2D_method_play: -- void **play** **(** :ref:`float` from_position=0.0 **)** +.. rst-class:: classref-method -Plays the audio from the given position ``from_position``, in seconds. +void **play** **(** :ref:`float` from_position=0.0 **)** + +Queues the audio to play on the next physics frame, from the given position ``from_position``, in seconds. + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer2D_method_seek: -- void **seek** **(** :ref:`float` to_position **)** +.. rst-class:: classref-method + +void **seek** **(** :ref:`float` to_position **)** Sets the position from which audio will be played, in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer2D_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the audio. diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 61e44eadb..23c90a362 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -14,6 +14,8 @@ AudioStreamPlayer3D Plays positional sound in 3D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,480 +25,591 @@ By default, audio is heard from the camera position. This can be changed by addi See also :ref:`AudioStreamPlayer` to play a sound non-positionally. -\ **Note:** Hiding an ``AudioStreamPlayer3D`` node does not disable its audio output. To temporarily disable an ``AudioStreamPlayer3D``'s audio output, set :ref:`volume_db` to a very low value like ``-100`` (which isn't audible to human hearing). +\ **Note:** Hiding an **AudioStreamPlayer3D** node does not disable its audio output. To temporarily disable an **AudioStreamPlayer3D**'s audio output, set :ref:`volume_db` to a very low value like ``-100`` (which isn't audible to human hearing). + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Audio streams <../tutorials/audio/audio_streams>` +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`int` | :ref:`area_mask` | ``1`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`attenuation_filter_cutoff_hz` | ``5000.0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`attenuation_filter_db` | ``-24.0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`AttenuationModel` | :ref:`attenuation_model` | ``0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`bool` | :ref:`autoplay` | ``false`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`bus` | ``&"Master"`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`DopplerTracking` | :ref:`doppler_tracking` | ``0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`emission_angle_degrees` | ``45.0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`bool` | :ref:`emission_angle_enabled` | ``false`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`emission_angle_filter_attenuation_db` | ``-12.0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`max_db` | ``3.0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`max_distance` | ``0.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:`unit_size` | ``10.0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`volume_db` | ``0.0`` | -+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`area_mask` | ``1`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`attenuation_filter_cutoff_hz` | ``5000.0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`attenuation_filter_db` | ``-24.0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`AttenuationModel` | :ref:`attenuation_model` | ``0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`autoplay` | ``false`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`StringName` | :ref:`bus` | ``&"Master"`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`DopplerTracking` | :ref:`doppler_tracking` | ``0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`emission_angle_degrees` | ``45.0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`emission_angle_enabled` | ``false`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`emission_angle_filter_attenuation_db` | ``-12.0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`max_db` | ``3.0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`max_distance` | ``0.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:`unit_size` | ``10.0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`volume_db` | ``0.0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_playback_position` **(** **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`seek` **(** :ref:`float` to_position **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position` **(** **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek` **(** :ref:`float` to_position **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_AudioStreamPlayer3D_signal_finished: -- **finished** **(** **)** +.. rst-class:: classref-signal + +**finished** **(** **)** Emitted when the audio stops playing. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_AudioStreamPlayer3D_AttenuationModel: -.. _class_AudioStreamPlayer3D_constant_ATTENUATION_INVERSE_DISTANCE: - -.. _class_AudioStreamPlayer3D_constant_ATTENUATION_INVERSE_SQUARE_DISTANCE: - -.. _class_AudioStreamPlayer3D_constant_ATTENUATION_LOGARITHMIC: - -.. _class_AudioStreamPlayer3D_constant_ATTENUATION_DISABLED: +.. rst-class:: classref-enumeration enum **AttenuationModel**: -- **ATTENUATION_INVERSE_DISTANCE** = **0** --- Linear dampening of loudness according to distance. +.. _class_AudioStreamPlayer3D_constant_ATTENUATION_INVERSE_DISTANCE: -- **ATTENUATION_INVERSE_SQUARE_DISTANCE** = **1** --- Squared dampening of loudness according to distance. +.. rst-class:: classref-enumeration-constant -- **ATTENUATION_LOGARITHMIC** = **2** --- Logarithmic dampening of loudness according to distance. +:ref:`AttenuationModel` **ATTENUATION_INVERSE_DISTANCE** = ``0`` -- **ATTENUATION_DISABLED** = **3** --- No dampening of loudness according to distance. The sound will still be heard positionally, unlike an :ref:`AudioStreamPlayer`. :ref:`ATTENUATION_DISABLED` can be combined with a :ref:`max_distance` value greater than ``0.0`` to achieve linear attenuation clamped to a sphere of a defined size. +Linear dampening of loudness according to distance. + +.. _class_AudioStreamPlayer3D_constant_ATTENUATION_INVERSE_SQUARE_DISTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AttenuationModel` **ATTENUATION_INVERSE_SQUARE_DISTANCE** = ``1`` + +Squared dampening of loudness according to distance. + +.. _class_AudioStreamPlayer3D_constant_ATTENUATION_LOGARITHMIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`AttenuationModel` **ATTENUATION_LOGARITHMIC** = ``2`` + +Logarithmic dampening of loudness according to distance. + +.. _class_AudioStreamPlayer3D_constant_ATTENUATION_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AttenuationModel` **ATTENUATION_DISABLED** = ``3`` + +No dampening of loudness according to distance. The sound will still be heard positionally, unlike an :ref:`AudioStreamPlayer`. :ref:`ATTENUATION_DISABLED` can be combined with a :ref:`max_distance` value greater than ``0.0`` to achieve linear attenuation clamped to a sphere of a defined size. + +.. rst-class:: classref-item-separator ---- .. _enum_AudioStreamPlayer3D_DopplerTracking: -.. _class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_DISABLED: - -.. _class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_IDLE_STEP: - -.. _class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_PHYSICS_STEP: +.. rst-class:: classref-enumeration enum **DopplerTracking**: -- **DOPPLER_TRACKING_DISABLED** = **0** --- Disables doppler tracking. +.. _class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_DISABLED: -- **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Executes doppler tracking in idle step. +.. rst-class:: classref-enumeration-constant -- **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Executes doppler tracking in physics step. +:ref:`DopplerTracking` **DOPPLER_TRACKING_DISABLED** = ``0`` + +Disables doppler tracking. + +.. _class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_IDLE_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`DopplerTracking` **DOPPLER_TRACKING_IDLE_STEP** = ``1`` + +Executes doppler tracking in idle step. + +.. _class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_PHYSICS_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`DopplerTracking` **DOPPLER_TRACKING_PHYSICS_STEP** = ``2`` + +Executes doppler tracking in physics step. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioStreamPlayer3D_property_area_mask: -- :ref:`int` **area_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1`` | -+-----------+----------------------+ -| *Setter* | set_area_mask(value) | -+-----------+----------------------+ -| *Getter* | get_area_mask() | -+-----------+----------------------+ +:ref:`int` **area_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_area_mask** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_attenuation_filter_cutoff_hz: -- :ref:`float` **attenuation_filter_cutoff_hz** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``5000.0`` | -+-----------+-----------------------------------------+ -| *Setter* | set_attenuation_filter_cutoff_hz(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_attenuation_filter_cutoff_hz() | -+-----------+-----------------------------------------+ +:ref:`float` **attenuation_filter_cutoff_hz** = ``5000.0`` + +.. rst-class:: classref-property-setget + +- void **set_attenuation_filter_cutoff_hz** **(** :ref:`float` value **)** +- :ref:`float` **get_attenuation_filter_cutoff_hz** **(** **)** Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to ``20500`` as this frequency is above the human hearing limit. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_attenuation_filter_db: -- :ref:`float` **attenuation_filter_db** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``-24.0`` | -+-----------+----------------------------------+ -| *Setter* | set_attenuation_filter_db(value) | -+-----------+----------------------------------+ -| *Getter* | get_attenuation_filter_db() | -+-----------+----------------------------------+ +:ref:`float` **attenuation_filter_db** = ``-24.0`` + +.. rst-class:: classref-property-setget + +- void **set_attenuation_filter_db** **(** :ref:`float` value **)** +- :ref:`float` **get_attenuation_filter_db** **(** **)** Amount how much the filter affects the loudness, in decibels. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_attenuation_model: -- :ref:`AttenuationModel` **attenuation_model** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_attenuation_model(value) | -+-----------+------------------------------+ -| *Getter* | get_attenuation_model() | -+-----------+------------------------------+ +:ref:`AttenuationModel` **attenuation_model** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_attenuation_model** **(** :ref:`AttenuationModel` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_autoplay: -- :ref:`bool` **autoplay** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_autoplay(value) | -+-----------+-----------------------+ -| *Getter* | is_autoplay_enabled() | -+-----------+-----------------------+ +:ref:`bool` **autoplay** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_autoplay** **(** :ref:`bool` value **)** +- :ref:`bool` **is_autoplay_enabled** **(** **)** If ``true``, audio plays when the AudioStreamPlayer3D node is added to scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_bus: -- :ref:`StringName` **bus** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``&"Master"`` | -+-----------+----------------+ -| *Setter* | set_bus(value) | -+-----------+----------------+ -| *Getter* | get_bus() | -+-----------+----------------+ +:ref:`StringName` **bus** = ``&"Master"`` + +.. rst-class:: classref-property-setget + +- void **set_bus** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_bus** **(** **)** The bus on which this audio is playing. \ **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"``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_doppler_tracking: -- :ref:`DopplerTracking` **doppler_tracking** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_doppler_tracking(value) | -+-----------+-----------------------------+ -| *Getter* | get_doppler_tracking() | -+-----------+-----------------------------+ +:ref:`DopplerTracking` **doppler_tracking** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_doppler_tracking** **(** :ref:`DopplerTracking` value **)** +- :ref:`DopplerTracking` **get_doppler_tracking** **(** **)** Decides in which step the Doppler effect should be calculated. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_emission_angle_degrees: -- :ref:`float` **emission_angle_degrees** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``45.0`` | -+-----------+---------------------------+ -| *Setter* | set_emission_angle(value) | -+-----------+---------------------------+ -| *Getter* | get_emission_angle() | -+-----------+---------------------------+ +:ref:`float` **emission_angle_degrees** = ``45.0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_angle** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_angle** **(** **)** The angle in which the audio reaches cameras undampened. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_emission_angle_enabled: -- :ref:`bool` **emission_angle_enabled** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_emission_angle_enabled(value) | -+-----------+-----------------------------------+ -| *Getter* | is_emission_angle_enabled() | -+-----------+-----------------------------------+ +:ref:`bool` **emission_angle_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_emission_angle_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emission_angle_enabled** **(** **)** If ``true``, the audio should be dampened according to the direction of the sound. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_emission_angle_filter_attenuation_db: -- :ref:`float` **emission_angle_filter_attenuation_db** +.. rst-class:: classref-property -+-----------+-------------------------------------------------+ -| *Default* | ``-12.0`` | -+-----------+-------------------------------------------------+ -| *Setter* | set_emission_angle_filter_attenuation_db(value) | -+-----------+-------------------------------------------------+ -| *Getter* | get_emission_angle_filter_attenuation_db() | -+-----------+-------------------------------------------------+ +:ref:`float` **emission_angle_filter_attenuation_db** = ``-12.0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_angle_filter_attenuation_db** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_angle_filter_attenuation_db** **(** **)** Dampens audio if camera is outside of :ref:`emission_angle_degrees` and :ref:`emission_angle_enabled` is set by this factor, in decibels. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_max_db: -- :ref:`float` **max_db** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``3.0`` | -+-----------+-------------------+ -| *Setter* | set_max_db(value) | -+-----------+-------------------+ -| *Getter* | get_max_db() | -+-----------+-------------------+ +:ref:`float` **max_db** = ``3.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_db** **(** :ref:`float` value **)** +- :ref:`float` **get_max_db** **(** **)** Sets the absolute maximum of the soundlevel, in decibels. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_max_distance: -- :ref:`float` **max_distance** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_max_distance(value) | -+-----------+-------------------------+ -| *Getter* | get_max_distance() | -+-----------+-------------------------+ +:ref:`float` **max_distance** = ``0.0`` -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. +.. rst-class:: classref-property-setget + +- void **set_max_distance** **(** :ref:`float` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer3D_property_max_polyphony: -- :ref:`int` **max_polyphony** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------+ -| *Setter* | set_max_polyphony(value) | -+-----------+--------------------------+ -| *Getter* | get_max_polyphony() | -+-----------+--------------------------+ +:ref:`int` **max_polyphony** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_polyphony** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_panning_strength: -- :ref:`float` **panning_strength** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------------+ -| *Setter* | set_panning_strength(value) | -+-----------+-----------------------------+ -| *Getter* | get_panning_strength() | -+-----------+-----------------------------+ +:ref:`float` **panning_strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_panning_strength** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_pitch_scale: -- :ref:`float` **pitch_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_pitch_scale(value) | -+-----------+------------------------+ -| *Getter* | get_pitch_scale() | -+-----------+------------------------+ +:ref:`float` **pitch_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_pitch_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_pitch_scale** **(** **)** The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_playing: -- :ref:`bool` **playing** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``false`` | -+-----------+--------------+ -| *Getter* | is_playing() | -+-----------+--------------+ +:ref:`bool` **playing** = ``false`` -If ``true``, audio is playing. +.. rst-class:: classref-property-setget + +- :ref:`bool` **is_playing** **(** **)** + +If ``true``, audio is playing or is queued to be played (see :ref:`play`). + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer3D_property_stream: -- :ref:`AudioStream` **stream** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_stream(value) | -+----------+-------------------+ -| *Getter* | get_stream() | -+----------+-------------------+ +:ref:`AudioStream` **stream** + +.. rst-class:: classref-property-setget + +- void **set_stream** **(** :ref:`AudioStream` value **)** +- :ref:`AudioStream` **get_stream** **(** **)** The :ref:`AudioStream` resource to be played. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_stream_paused: -- :ref:`bool` **stream_paused** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_stream_paused(value) | -+-----------+--------------------------+ -| *Getter* | get_stream_paused() | -+-----------+--------------------------+ +:ref:`bool` **stream_paused** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_stream_paused** **(** :ref:`bool` value **)** +- :ref:`bool` **get_stream_paused** **(** **)** If ``true``, the playback is paused. You can resume it by setting :ref:`stream_paused` to ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_unit_size: -- :ref:`float` **unit_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``10.0`` | -+-----------+----------------------+ -| *Setter* | set_unit_size(value) | -+-----------+----------------------+ -| *Getter* | get_unit_size() | -+-----------+----------------------+ +:ref:`float` **unit_size** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_unit_size** **(** :ref:`float` value **)** +- :ref:`float` **get_unit_size** **(** **)** The factor for the attenuation effect. Higher values make the sound audible over a larger distance. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_property_volume_db: -- :ref:`float` **volume_db** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_volume_db(value) | -+-----------+----------------------+ -| *Getter* | get_volume_db() | -+-----------+----------------------+ +:ref:`float` **volume_db** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_volume_db** **(** :ref:`float` value **)** +- :ref:`float` **get_volume_db** **(** **)** The base sound level unaffected by dampening, in decibels. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioStreamPlayer3D_method_get_playback_position: -- :ref:`float` **get_playback_position** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **get_playback_position** **(** **)** Returns the position in the :ref:`AudioStream`. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_method_get_stream_playback: -- :ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +.. rst-class:: classref-method -Returns the :ref:`AudioStreamPlayback` object associated with this ``AudioStreamPlayer3D``. +:ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** + +Returns the :ref:`AudioStreamPlayback` object associated with this **AudioStreamPlayer3D**. + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer3D_method_play: -- void **play** **(** :ref:`float` from_position=0.0 **)** +.. rst-class:: classref-method -Plays the audio from the given position ``from_position``, in seconds. +void **play** **(** :ref:`float` from_position=0.0 **)** + +Queues the audio to play on the next physics frame, from the given position ``from_position``, in seconds. + +.. rst-class:: classref-item-separator ---- .. _class_AudioStreamPlayer3D_method_seek: -- void **seek** **(** :ref:`float` to_position **)** +.. rst-class:: classref-method + +void **seek** **(** :ref:`float` to_position **)** Sets the position from which audio will be played, in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamPlayer3D_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the audio. diff --git a/classes/class_audiostreamrandomizer.rst b/classes/class_audiostreamrandomizer.rst index 9a02a3765..b70c2a1f1 100644 --- a/classes/class_audiostreamrandomizer.rst +++ b/classes/class_audiostreamrandomizer.rst @@ -14,181 +14,253 @@ AudioStreamRandomizer Wraps a pool of audio streams with pitch and volume shifting. +.. rst-class:: classref-introduction-group + Description ----------- Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ -| :ref:`PlaybackMode` | :ref:`playback_mode` | ``0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`random_pitch` | ``1.1`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`random_volume_offset_db` | ``5.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`streams_count` | ``0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ + | :ref:`PlaybackMode` | :ref:`playback_mode` | ``0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`random_pitch` | ``1.1`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`random_volume_offset_db` | ``5.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`streams_count` | ``0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_stream` **(** :ref:`int` index **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_stream` **(** :ref:`int` index **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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 **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioStreamRandomizer_PlaybackMode: -.. _class_AudioStreamRandomizer_constant_PLAYBACK_RANDOM_NO_REPEATS: - -.. _class_AudioStreamRandomizer_constant_PLAYBACK_RANDOM: - -.. _class_AudioStreamRandomizer_constant_PLAYBACK_SEQUENTIAL: +.. rst-class:: classref-enumeration enum **PlaybackMode**: -- **PLAYBACK_RANDOM_NO_REPEATS** = **0** --- Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. +.. _class_AudioStreamRandomizer_constant_PLAYBACK_RANDOM_NO_REPEATS: -- **PLAYBACK_RANDOM** = **1** --- Pick a stream at random according to the probability weights chosen for each stream. +.. rst-class:: classref-enumeration-constant -- **PLAYBACK_SEQUENTIAL** = **2** --- Play streams in the order they appear in the stream pool. +:ref:`PlaybackMode` **PLAYBACK_RANDOM_NO_REPEATS** = ``0`` + +Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. + +.. _class_AudioStreamRandomizer_constant_PLAYBACK_RANDOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlaybackMode` **PLAYBACK_RANDOM** = ``1`` + +Pick a stream at random according to the probability weights chosen for each stream. + +.. _class_AudioStreamRandomizer_constant_PLAYBACK_SEQUENTIAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlaybackMode` **PLAYBACK_SEQUENTIAL** = ``2`` + +Play streams in the order they appear in the stream pool. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioStreamRandomizer_property_playback_mode: -- :ref:`PlaybackMode` **playback_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_playback_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_playback_mode() | -+-----------+--------------------------+ +:ref:`PlaybackMode` **playback_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_playback_mode** **(** :ref:`PlaybackMode` value **)** +- :ref:`PlaybackMode` **get_playback_mode** **(** **)** Controls how this AudioStreamRandomizer picks which AudioStream to play next. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_property_random_pitch: -- :ref:`float` **random_pitch** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.1`` | -+-----------+-------------------------+ -| *Setter* | set_random_pitch(value) | -+-----------+-------------------------+ -| *Getter* | get_random_pitch() | -+-----------+-------------------------+ +:ref:`float` **random_pitch** = ``1.1`` + +.. rst-class:: classref-property-setget + +- void **set_random_pitch** **(** :ref:`float` value **)** +- :ref:`float` **get_random_pitch** **(** **)** The intensity of random pitch variation. A value of 1 means no variation. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_property_random_volume_offset_db: -- :ref:`float` **random_volume_offset_db** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``5.0`` | -+-----------+------------------------------------+ -| *Setter* | set_random_volume_offset_db(value) | -+-----------+------------------------------------+ -| *Getter* | get_random_volume_offset_db() | -+-----------+------------------------------------+ +:ref:`float` **random_volume_offset_db** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_random_volume_offset_db** **(** :ref:`float` value **)** +- :ref:`float` **get_random_volume_offset_db** **(** **)** The intensity of random volume variation. A value of 0 means no variation. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_property_streams_count: -- :ref:`int` **streams_count** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_streams_count(value) | -+-----------+--------------------------+ -| *Getter* | get_streams_count() | -+-----------+--------------------------+ +:ref:`int` **streams_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_streams_count** **(** :ref:`int` value **)** +- :ref:`int` **get_streams_count** **(** **)** The number of streams in the stream pool. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioStreamRandomizer_method_add_stream: -- void **add_stream** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **add_stream** **(** :ref:`int` index **)** Insert a stream at the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_method_get_stream: -- :ref:`AudioStream` **get_stream** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`AudioStream` **get_stream** **(** :ref:`int` index **)** |const| Returns the stream at the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_method_get_stream_probability_weight: -- :ref:`float` **get_stream_probability_weight** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_stream_probability_weight** **(** :ref:`int` index **)** |const| Returns the probability weight associated with the stream at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_method_move_stream: -- void **move_stream** **(** :ref:`int` index_from, :ref:`int` index_to **)** +.. rst-class:: classref-method + +void **move_stream** **(** :ref:`int` index_from, :ref:`int` index_to **)** Move a stream from one index to another. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_method_remove_stream: -- void **remove_stream** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_stream** **(** :ref:`int` index **)** Remove the stream at the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_method_set_stream: -- void **set_stream** **(** :ref:`int` index, :ref:`AudioStream` stream **)** +.. rst-class:: classref-method + +void **set_stream** **(** :ref:`int` index, :ref:`AudioStream` stream **)** Set the AudioStream at the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamRandomizer_method_set_stream_probability_weight: -- void **set_stream_probability_weight** **(** :ref:`int` index, :ref:`float` weight **)** +.. rst-class:: classref-method + +void **set_stream_probability_weight** **(** :ref:`int` index, :ref:`float` weight **)** 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. diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index 1d58a7cc5..b53002aac 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -14,6 +14,8 @@ AudioStreamWAV Stores audio data loaded from WAV files. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,169 +23,229 @@ 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-reftable-group + Properties ---------- -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ -| :ref:`Format` | :ref:`format` | ``0`` | -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`loop_begin` | ``0`` | -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`loop_end` | ``0`` | -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ -| :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`mix_rate` | ``44100`` | -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`stereo` | ``false`` | -+-----------------------------------------------+-------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`Format` | :ref:`format` | ``0`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`loop_begin` | ``0`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`loop_end` | ``0`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`mix_rate` | ``44100`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`stereo` | ``false`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_to_wav` **(** :ref:`String` path **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_to_wav` **(** :ref:`String` path **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AudioStreamWAV_Format: -.. _class_AudioStreamWAV_constant_FORMAT_8_BITS: - -.. _class_AudioStreamWAV_constant_FORMAT_16_BITS: - -.. _class_AudioStreamWAV_constant_FORMAT_IMA_ADPCM: +.. rst-class:: classref-enumeration enum **Format**: -- **FORMAT_8_BITS** = **0** --- 8-bit audio codec. +.. _class_AudioStreamWAV_constant_FORMAT_8_BITS: -- **FORMAT_16_BITS** = **1** --- 16-bit audio codec. +.. rst-class:: classref-enumeration-constant -- **FORMAT_IMA_ADPCM** = **2** --- Audio is compressed using IMA ADPCM. +:ref:`Format` **FORMAT_8_BITS** = ``0`` + +8-bit audio codec. + +.. _class_AudioStreamWAV_constant_FORMAT_16_BITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_16_BITS** = ``1`` + +16-bit audio codec. + +.. _class_AudioStreamWAV_constant_FORMAT_IMA_ADPCM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_IMA_ADPCM** = ``2`` + +Audio is compressed using IMA ADPCM. + +.. rst-class:: classref-item-separator ---- .. _enum_AudioStreamWAV_LoopMode: -.. _class_AudioStreamWAV_constant_LOOP_DISABLED: - -.. _class_AudioStreamWAV_constant_LOOP_FORWARD: - -.. _class_AudioStreamWAV_constant_LOOP_PINGPONG: - -.. _class_AudioStreamWAV_constant_LOOP_BACKWARD: +.. rst-class:: classref-enumeration enum **LoopMode**: -- **LOOP_DISABLED** = **0** --- Audio does not loop. +.. _class_AudioStreamWAV_constant_LOOP_DISABLED: -- **LOOP_FORWARD** = **1** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing forward only. +.. rst-class:: classref-enumeration-constant -- **LOOP_PINGPONG** = **2** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing back and forth. +:ref:`LoopMode` **LOOP_DISABLED** = ``0`` -- **LOOP_BACKWARD** = **3** --- Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing backward only. +Audio does not loop. + +.. _class_AudioStreamWAV_constant_LOOP_FORWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopMode` **LOOP_FORWARD** = ``1`` + +Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing forward only. + +.. _class_AudioStreamWAV_constant_LOOP_PINGPONG: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopMode` **LOOP_PINGPONG** = ``2`` + +Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing back and forth. + +.. _class_AudioStreamWAV_constant_LOOP_BACKWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoopMode` **LOOP_BACKWARD** = ``3`` + +Audio loops the data between :ref:`loop_begin` and :ref:`loop_end`, playing backward only. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AudioStreamWAV_property_data: -- :ref:`PackedByteArray` **data** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+-----------------------+ -| *Setter* | set_data(value) | -+-----------+-----------------------+ -| *Getter* | get_data() | -+-----------+-----------------------+ +:ref:`PackedByteArray` **data** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_data** **(** :ref:`PackedByteArray` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamWAV_property_format: -- :ref:`Format` **format** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_format(value) | -+-----------+-------------------+ -| *Getter* | get_format() | -+-----------+-------------------+ +:ref:`Format` **format** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_format** **(** :ref:`Format` value **)** +- :ref:`Format` **get_format** **(** **)** Audio format. See :ref:`Format` constants for values. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamWAV_property_loop_begin: -- :ref:`int` **loop_begin** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_loop_begin(value) | -+-----------+-----------------------+ -| *Getter* | get_loop_begin() | -+-----------+-----------------------+ +:ref:`int` **loop_begin** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_loop_begin** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamWAV_property_loop_end: -- :ref:`int` **loop_end** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_loop_end(value) | -+-----------+---------------------+ -| *Getter* | get_loop_end() | -+-----------+---------------------+ +:ref:`int` **loop_end** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_loop_end** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamWAV_property_loop_mode: -- :ref:`LoopMode` **loop_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_loop_mode(value) | -+-----------+----------------------+ -| *Getter* | get_loop_mode() | -+-----------+----------------------+ +:ref:`LoopMode` **loop_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_loop_mode** **(** :ref:`LoopMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamWAV_property_mix_rate: -- :ref:`int` **mix_rate** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``44100`` | -+-----------+---------------------+ -| *Setter* | set_mix_rate(value) | -+-----------+---------------------+ -| *Getter* | get_mix_rate() | -+-----------+---------------------+ +:ref:`int` **mix_rate** = ``44100`` + +.. rst-class:: classref-property-setget + +- void **set_mix_rate** **(** :ref:`int` value **)** +- :ref:`int` **get_mix_rate** **(** **)** The sample rate for mixing this audio. Higher values require more storage space, but result in better quality. @@ -191,28 +253,37 @@ In games, common sample rates in use are ``11025``, ``16000``, ``22050``, ``3200 According to the `Nyquist-Shannon sampling theorem `__, there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as ``32000`` or ``22050`` may be usable with no loss in quality. +.. rst-class:: classref-item-separator + ---- .. _class_AudioStreamWAV_property_stereo: -- :ref:`bool` **stereo** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_stereo(value) | -+-----------+-------------------+ -| *Getter* | is_stereo() | -+-----------+-------------------+ +:ref:`bool` **stereo** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_stereo** **(** :ref:`bool` value **)** +- :ref:`bool` **is_stereo** **(** **)** If ``true``, audio is stereo. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_AudioStreamWAV_method_save_to_wav: -- :ref:`Error` **save_to_wav** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **save_to_wav** **(** :ref:`String` path **)** Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM format can't be saved. diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index ad07a105f..2c5741ea4 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -14,6 +14,8 @@ BackBufferCopy Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the ``texture(SCREEN_TEXTURE, ...)`` function. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,64 +23,95 @@ Node for back-buffering the currently-displayed screen. The region defined in th \ **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. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+-----------------------------------------------------------+---------------------------------+ -| :ref:`CopyMode` | :ref:`copy_mode` | ``1`` | -+-----------------------------------------------+-----------------------------------------------------------+---------------------------------+ -| :ref:`Rect2` | :ref:`rect` | ``Rect2(-100, -100, 200, 200)`` | -+-----------------------------------------------+-----------------------------------------------------------+---------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------------+---------------------------------+ + | :ref:`CopyMode` | :ref:`copy_mode` | ``1`` | + +-----------------------------------------------+-----------------------------------------------------------+---------------------------------+ + | :ref:`Rect2` | :ref:`rect` | ``Rect2(-100, -100, 200, 200)`` | + +-----------------------------------------------+-----------------------------------------------------------+---------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_BackBufferCopy_CopyMode: -.. _class_BackBufferCopy_constant_COPY_MODE_DISABLED: - -.. _class_BackBufferCopy_constant_COPY_MODE_RECT: - -.. _class_BackBufferCopy_constant_COPY_MODE_VIEWPORT: +.. rst-class:: classref-enumeration enum **CopyMode**: -- **COPY_MODE_DISABLED** = **0** --- Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers. +.. _class_BackBufferCopy_constant_COPY_MODE_DISABLED: -- **COPY_MODE_RECT** = **1** --- BackBufferCopy buffers a rectangular region. +.. rst-class:: classref-enumeration-constant -- **COPY_MODE_VIEWPORT** = **2** --- BackBufferCopy buffers the entire screen. +:ref:`CopyMode` **COPY_MODE_DISABLED** = ``0`` + +Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers. + +.. _class_BackBufferCopy_constant_COPY_MODE_RECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CopyMode` **COPY_MODE_RECT** = ``1`` + +BackBufferCopy buffers a rectangular region. + +.. _class_BackBufferCopy_constant_COPY_MODE_VIEWPORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CopyMode` **COPY_MODE_VIEWPORT** = ``2`` + +BackBufferCopy buffers the entire screen. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BackBufferCopy_property_copy_mode: -- :ref:`CopyMode` **copy_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1`` | -+-----------+----------------------+ -| *Setter* | set_copy_mode(value) | -+-----------+----------------------+ -| *Getter* | get_copy_mode() | -+-----------+----------------------+ +:ref:`CopyMode` **copy_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_copy_mode** **(** :ref:`CopyMode` value **)** +- :ref:`CopyMode` **get_copy_mode** **(** **)** Buffer mode. See :ref:`CopyMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_BackBufferCopy_property_rect: -- :ref:`Rect2` **rect** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``Rect2(-100, -100, 200, 200)`` | -+-----------+---------------------------------+ -| *Setter* | set_rect(value) | -+-----------+---------------------------------+ -| *Getter* | get_rect() | -+-----------+---------------------------------+ +:ref:`Rect2` **rect** = ``Rect2(-100, -100, 200, 200)`` + +.. rst-class:: classref-property-setget + +- void **set_rect** **(** :ref:`Rect2` value **)** +- :ref:`Rect2` **get_rect** **(** **)** The area covered by the BackBufferCopy. Only used if :ref:`copy_mode` is :ref:`COPY_MODE_RECT`. diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index 1fb8a1216..4efaaece2 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -16,330 +16,444 @@ BaseButton Base class for different kinds of buttons. +.. rst-class:: classref-introduction-group + Description ----------- BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`ActionMode` | :ref:`action_mode` | ``1`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`ButtonGroup` | :ref:`button_group` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`MouseButton` | :ref:`button_mask` | ``1`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`button_pressed` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`disabled` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`keep_pressed_outside` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`Shortcut` | :ref:`shortcut` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shortcut_feedback` | ``true`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shortcut_in_tooltip` | ``true`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`toggle_mode` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`ActionMode` | :ref:`action_mode` | ``1`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`ButtonGroup` | :ref:`button_group` | | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`MouseButton` | :ref:`button_mask` | ``1`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`button_pressed` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`keep_pressed_outside` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`Shortcut` | :ref:`shortcut` | | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shortcut_feedback` | ``true`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shortcut_in_tooltip` | ``true`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`toggle_mode` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_BaseButton_signal_button_down: -- **button_down** **(** **)** +.. rst-class:: classref-signal + +**button_down** **(** **)** Emitted when the button starts being held down. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_signal_button_up: -- **button_up** **(** **)** +.. rst-class:: classref-signal + +**button_up** **(** **)** Emitted when the button stops being held down. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_signal_pressed: -- **pressed** **(** **)** +.. rst-class:: classref-signal + +**pressed** **(** **)** 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. 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_signal_toggled: -- **toggled** **(** :ref:`bool` button_pressed **)** +.. rst-class:: classref-signal + +**toggled** **(** :ref:`bool` button_pressed **)** 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_BaseButton_DrawMode: -.. _class_BaseButton_constant_DRAW_NORMAL: - -.. _class_BaseButton_constant_DRAW_PRESSED: - -.. _class_BaseButton_constant_DRAW_HOVER: - -.. _class_BaseButton_constant_DRAW_DISABLED: - -.. _class_BaseButton_constant_DRAW_HOVER_PRESSED: +.. rst-class:: classref-enumeration enum **DrawMode**: -- **DRAW_NORMAL** = **0** --- The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. +.. _class_BaseButton_constant_DRAW_NORMAL: -- **DRAW_PRESSED** = **1** --- The state of buttons are pressed. +.. rst-class:: classref-enumeration-constant -- **DRAW_HOVER** = **2** --- The state of buttons are hovered. +:ref:`DrawMode` **DRAW_NORMAL** = ``0`` -- **DRAW_DISABLED** = **3** --- The state of buttons are disabled. +The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. -- **DRAW_HOVER_PRESSED** = **4** --- The state of buttons are both hovered and pressed. +.. _class_BaseButton_constant_DRAW_PRESSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawMode` **DRAW_PRESSED** = ``1`` + +The state of buttons are pressed. + +.. _class_BaseButton_constant_DRAW_HOVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawMode` **DRAW_HOVER** = ``2`` + +The state of buttons are hovered. + +.. _class_BaseButton_constant_DRAW_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawMode` **DRAW_DISABLED** = ``3`` + +The state of buttons are disabled. + +.. _class_BaseButton_constant_DRAW_HOVER_PRESSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawMode` **DRAW_HOVER_PRESSED** = ``4`` + +The state of buttons are both hovered and pressed. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseButton_ActionMode: -.. _class_BaseButton_constant_ACTION_MODE_BUTTON_PRESS: - -.. _class_BaseButton_constant_ACTION_MODE_BUTTON_RELEASE: +.. rst-class:: classref-enumeration enum **ActionMode**: -- **ACTION_MODE_BUTTON_PRESS** = **0** --- Require just a press to consider the button clicked. +.. _class_BaseButton_constant_ACTION_MODE_BUTTON_PRESS: -- **ACTION_MODE_BUTTON_RELEASE** = **1** --- Require a press and a subsequent release before considering the button clicked. +.. rst-class:: classref-enumeration-constant + +:ref:`ActionMode` **ACTION_MODE_BUTTON_PRESS** = ``0`` + +Require just a press to consider the button clicked. + +.. _class_BaseButton_constant_ACTION_MODE_BUTTON_RELEASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ActionMode` **ACTION_MODE_BUTTON_RELEASE** = ``1`` + +Require a press and a subsequent release before considering the button clicked. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BaseButton_property_action_mode: -- :ref:`ActionMode` **action_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_action_mode(value) | -+-----------+------------------------+ -| *Getter* | get_action_mode() | -+-----------+------------------------+ +:ref:`ActionMode` **action_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_action_mode** **(** :ref:`ActionMode` value **)** +- :ref:`ActionMode` **get_action_mode** **(** **)** Determines when the button is considered clicked, one of the :ref:`ActionMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_button_group: -- :ref:`ButtonGroup` **button_group** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_button_group(value) | -+----------+-------------------------+ -| *Getter* | get_button_group() | -+----------+-------------------------+ +:ref:`ButtonGroup` **button_group** + +.. rst-class:: classref-property-setget + +- void **set_button_group** **(** :ref:`ButtonGroup` value **)** +- :ref:`ButtonGroup` **get_button_group** **(** **)** The :ref:`ButtonGroup` associated with the button. Not to be confused with node groups. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_button_mask: -- :ref:`MouseButton` **button_mask** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_button_mask(value) | -+-----------+------------------------+ -| *Getter* | get_button_mask() | -+-----------+------------------------+ +:ref:`MouseButton` **button_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_button_mask** **(** :ref:`MouseButton` value **)** +- :ref:`MouseButton` **get_button_mask** **(** **)** Binary mask to choose which mouse buttons this button will respond to. To allow both left-click and right-click, use ``MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_button_pressed: -- :ref:`bool` **button_pressed** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_pressed(value) | -+-----------+--------------------+ -| *Getter* | is_pressed() | -+-----------+--------------------+ +:ref:`bool` **button_pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pressed** **(** :ref:`bool` value **)** +- :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``. \ **Note:** Setting :ref:`button_pressed` will result in :ref:`toggled` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_disabled: -- :ref:`bool` **disabled** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_disabled(value) | -+-----------+---------------------+ -| *Getter* | is_disabled() | -+-----------+---------------------+ +:ref:`bool` **disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_disabled** **(** **)** If ``true``, the button is in disabled state and can't be clicked or toggled. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_keep_pressed_outside: -- :ref:`bool` **keep_pressed_outside** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_keep_pressed_outside(value) | -+-----------+---------------------------------+ -| *Getter* | is_keep_pressed_outside() | -+-----------+---------------------------------+ +:ref:`bool` **keep_pressed_outside** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_keep_pressed_outside** **(** :ref:`bool` value **)** +- :ref:`bool` **is_keep_pressed_outside** **(** **)** If ``true``, the button stays pressed when moving the cursor outside the button while pressing it. \ **Note:** This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_shortcut: -- :ref:`Shortcut` **shortcut** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_shortcut(value) | -+----------+---------------------+ -| *Getter* | get_shortcut() | -+----------+---------------------+ +:ref:`Shortcut` **shortcut** + +.. rst-class:: classref-property-setget + +- void **set_shortcut** **(** :ref:`Shortcut` value **)** +- :ref:`Shortcut` **get_shortcut** **(** **)** :ref:`Shortcut` associated to the button. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_shortcut_feedback: -- :ref:`bool` **shortcut_feedback** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_shortcut_feedback(value) | -+-----------+------------------------------+ -| *Getter* | is_shortcut_feedback() | -+-----------+------------------------------+ +:ref:`bool` **shortcut_feedback** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_shortcut_feedback** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shortcut_feedback** **(** **)** If ``true``, the button will appear pressed when its shortcut is activated. If ``false`` and :ref:`toggle_mode` is ``false``, the shortcut will activate the button without appearing to press the button. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_shortcut_in_tooltip: -- :ref:`bool` **shortcut_in_tooltip** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_shortcut_in_tooltip(value) | -+-----------+----------------------------------+ -| *Getter* | is_shortcut_in_tooltip_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **shortcut_in_tooltip** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_shortcut_in_tooltip** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shortcut_in_tooltip_enabled** **(** **)** If ``true``, the button will add information about its shortcut in the tooltip. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_property_toggle_mode: -- :ref:`bool` **toggle_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_toggle_mode(value) | -+-----------+------------------------+ -| *Getter* | is_toggle_mode() | -+-----------+------------------------+ +:ref:`bool` **toggle_mode** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_toggle_mode** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_BaseButton_method__pressed: -- void **_pressed** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_pressed** **(** **)** |virtual| 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: -- void **_toggled** **(** :ref:`bool` button_pressed **)** |virtual| +.. rst-class:: classref-method + +void **_toggled** **(** :ref:`bool` button_pressed **)** |virtual| Called when the button is toggled (only if :ref:`toggle_mode` is active). +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_method_get_draw_mode: -- :ref:`DrawMode` **get_draw_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`DrawMode` **get_draw_mode** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_method_is_hovered: -- :ref:`bool` **is_hovered** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_hovered** **(** **)** |const| Returns ``true`` if the mouse has entered the button and has not left it yet. +.. rst-class:: classref-item-separator + ---- .. _class_BaseButton_method_set_pressed_no_signal: -- void **set_pressed_no_signal** **(** :ref:`bool` pressed **)** +.. rst-class:: classref-method + +void **set_pressed_no_signal** **(** :ref:`bool` pressed **)** 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``. diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 21d8581a3..4b500cc85 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -16,965 +16,1507 @@ BaseMaterial3D Default 3D rendering material. +.. 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. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Standard Material 3D <../tutorials/3d/standard_material_3d>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`albedo_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`albedo_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`albedo_texture_force_srgb` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`albedo_texture_msdf` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`alpha_antialiasing_edge` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`AlphaAntiAliasing` | :ref:`alpha_antialiasing_mode` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`alpha_hash_scale` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`alpha_scissor_threshold` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`anisotropy` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`anisotropy_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`anisotropy_flowmap` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`ao_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`ao_light_affect` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`ao_on_uv2` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`ao_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`TextureChannel` | :ref:`ao_texture_channel` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`backlight` | ``Color(0, 0, 0, 1)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`backlight_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`backlight_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`billboard_keep_scale` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`BillboardMode` | :ref:`billboard_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`clearcoat` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`clearcoat_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`clearcoat_roughness` | ``0.5`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`clearcoat_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`CullMode` | :ref:`cull_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`DepthDrawMode` | :ref:`depth_draw_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`detail_albedo` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`BlendMode` | :ref:`detail_blend_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`detail_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`detail_mask` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`detail_normal` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`DetailUV` | :ref:`detail_uv_layer` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`DiffuseMode` | :ref:`diffuse_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`disable_ambient_light` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`disable_receive_shadows` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_max_distance` | ``10.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_min_distance` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`DistanceFadeMode` | :ref:`distance_fade_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`emission` | ``Color(0, 0, 0, 1)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`emission_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`emission_energy_multiplier` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`emission_intensity` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`emission_on_uv2` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`EmissionOperator` | :ref:`emission_operator` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`emission_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`fixed_size` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`grow` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`grow_amount` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`heightmap_deep_parallax` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`heightmap_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`heightmap_flip_binormal` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`heightmap_flip_tangent` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`heightmap_flip_texture` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`heightmap_max_layers` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`heightmap_min_layers` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`heightmap_scale` | ``5.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`heightmap_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`metallic` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`metallic_specular` | ``0.5`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`metallic_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`TextureChannel` | :ref:`metallic_texture_channel` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`msdf_outline_size` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`msdf_pixel_range` | ``4.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`no_depth_test` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`normal_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`normal_scale` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`normal_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`orm_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`particles_anim_h_frames` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`particles_anim_loop` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`particles_anim_v_frames` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`point_size` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`proximity_fade_distance` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`proximity_fade_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`refraction_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`refraction_scale` | ``0.05`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`refraction_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`TextureChannel` | :ref:`refraction_texture_channel` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`rim` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`rim_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`rim_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`rim_tint` | ``0.5`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`roughness` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`roughness_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`TextureChannel` | :ref:`roughness_texture_channel` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`ShadingMode` | :ref:`shading_mode` | ``1`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shadow_to_opacity` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`SpecularMode` | :ref:`specular_mode` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`subsurf_scatter_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`subsurf_scatter_skin_mode` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`subsurf_scatter_strength` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`subsurf_scatter_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`subsurf_scatter_transmittance_boost` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`subsurf_scatter_transmittance_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`subsurf_scatter_transmittance_depth` | ``0.1`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`subsurf_scatter_transmittance_enabled` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`subsurf_scatter_transmittance_texture` | | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`texture_repeat` | ``true`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Transparency` | :ref:`transparency` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`use_particle_trails` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`use_point_size` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`uv1_offset` | ``Vector3(0, 0, 0)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`uv1_scale` | ``Vector3(1, 1, 1)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`uv1_triplanar` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`uv1_triplanar_sharpness` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`uv1_world_triplanar` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`uv2_offset` | ``Vector3(0, 0, 0)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`uv2_scale` | ``Vector3(1, 1, 1)`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`uv2_triplanar` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`uv2_triplanar_sharpness` | ``1.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`uv2_world_triplanar` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`vertex_color_is_srgb` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`vertex_color_use_as_albedo` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`albedo_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`albedo_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`albedo_texture_force_srgb` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`albedo_texture_msdf` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`alpha_antialiasing_edge` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`AlphaAntiAliasing` | :ref:`alpha_antialiasing_mode` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`alpha_hash_scale` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`alpha_scissor_threshold` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`anisotropy` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`anisotropy_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`anisotropy_flowmap` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`ao_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`ao_light_affect` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`ao_on_uv2` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`ao_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`TextureChannel` | :ref:`ao_texture_channel` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`backlight` | ``Color(0, 0, 0, 1)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`backlight_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`backlight_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`billboard_keep_scale` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`BillboardMode` | :ref:`billboard_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`clearcoat` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`clearcoat_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`clearcoat_roughness` | ``0.5`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`clearcoat_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`CullMode` | :ref:`cull_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DepthDrawMode` | :ref:`depth_draw_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`detail_albedo` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`BlendMode` | :ref:`detail_blend_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`detail_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`detail_mask` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`detail_normal` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DetailUV` | :ref:`detail_uv_layer` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DiffuseMode` | :ref:`diffuse_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disable_ambient_light` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disable_receive_shadows` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`distance_fade_max_distance` | ``10.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`distance_fade_min_distance` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DistanceFadeMode` | :ref:`distance_fade_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`emission` | ``Color(0, 0, 0, 1)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`emission_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`emission_energy_multiplier` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`emission_intensity` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`emission_on_uv2` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`EmissionOperator` | :ref:`emission_operator` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`emission_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`fixed_size` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`grow` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`grow_amount` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`heightmap_deep_parallax` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`heightmap_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`heightmap_flip_binormal` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`heightmap_flip_tangent` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`heightmap_flip_texture` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`heightmap_max_layers` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`heightmap_min_layers` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`heightmap_scale` | ``5.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`heightmap_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`metallic` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`metallic_specular` | ``0.5`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`metallic_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`TextureChannel` | :ref:`metallic_texture_channel` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`msdf_outline_size` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`msdf_pixel_range` | ``4.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`no_depth_test` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`normal_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`normal_scale` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`normal_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`orm_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`particles_anim_h_frames` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`particles_anim_loop` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`particles_anim_v_frames` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`point_size` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`proximity_fade_distance` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`proximity_fade_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`refraction_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`refraction_scale` | ``0.05`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`refraction_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`TextureChannel` | :ref:`refraction_texture_channel` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`rim` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`rim_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`rim_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`rim_tint` | ``0.5`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`roughness` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`roughness_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`TextureChannel` | :ref:`roughness_texture_channel` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`ShadingMode` | :ref:`shading_mode` | ``1`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`shadow_to_opacity` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`SpecularMode` | :ref:`specular_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`subsurf_scatter_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`subsurf_scatter_skin_mode` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`subsurf_scatter_strength` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`subsurf_scatter_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`subsurf_scatter_transmittance_boost` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`subsurf_scatter_transmittance_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`subsurf_scatter_transmittance_depth` | ``0.1`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`subsurf_scatter_transmittance_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`subsurf_scatter_transmittance_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`texture_repeat` | ``true`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Transparency` | :ref:`transparency` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`use_particle_trails` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`use_point_size` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`uv1_offset` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`uv1_scale` | ``Vector3(1, 1, 1)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`uv1_triplanar` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`uv1_triplanar_sharpness` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`uv1_world_triplanar` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`uv2_offset` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`uv2_scale` | ``Vector3(1, 1, 1)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`uv2_triplanar` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`uv2_triplanar_sharpness` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`uv2_world_triplanar` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`vertex_color_is_srgb` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`vertex_color_use_as_albedo` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_BaseMaterial3D_TextureParam: -.. _class_BaseMaterial3D_constant_TEXTURE_ALBEDO: - -.. _class_BaseMaterial3D_constant_TEXTURE_METALLIC: - -.. _class_BaseMaterial3D_constant_TEXTURE_ROUGHNESS: - -.. _class_BaseMaterial3D_constant_TEXTURE_EMISSION: - -.. _class_BaseMaterial3D_constant_TEXTURE_NORMAL: - -.. _class_BaseMaterial3D_constant_TEXTURE_RIM: - -.. _class_BaseMaterial3D_constant_TEXTURE_CLEARCOAT: - -.. _class_BaseMaterial3D_constant_TEXTURE_FLOWMAP: - -.. _class_BaseMaterial3D_constant_TEXTURE_AMBIENT_OCCLUSION: - -.. _class_BaseMaterial3D_constant_TEXTURE_HEIGHTMAP: - -.. _class_BaseMaterial3D_constant_TEXTURE_SUBSURFACE_SCATTERING: - -.. _class_BaseMaterial3D_constant_TEXTURE_SUBSURFACE_TRANSMITTANCE: - -.. _class_BaseMaterial3D_constant_TEXTURE_BACKLIGHT: - -.. _class_BaseMaterial3D_constant_TEXTURE_REFRACTION: - -.. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_MASK: - -.. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_ALBEDO: - -.. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_NORMAL: - -.. _class_BaseMaterial3D_constant_TEXTURE_ORM: - -.. _class_BaseMaterial3D_constant_TEXTURE_MAX: +.. rst-class:: classref-enumeration enum **TextureParam**: -- **TEXTURE_ALBEDO** = **0** --- Texture specifying per-pixel color. +.. _class_BaseMaterial3D_constant_TEXTURE_ALBEDO: -- **TEXTURE_METALLIC** = **1** --- Texture specifying per-pixel metallic value. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_ROUGHNESS** = **2** --- Texture specifying per-pixel roughness value. +:ref:`TextureParam` **TEXTURE_ALBEDO** = ``0`` -- **TEXTURE_EMISSION** = **3** --- Texture specifying per-pixel emission color. +Texture specifying per-pixel color. -- **TEXTURE_NORMAL** = **4** --- Texture specifying per-pixel normal vector. +.. _class_BaseMaterial3D_constant_TEXTURE_METALLIC: -- **TEXTURE_RIM** = **5** --- Texture specifying per-pixel rim value. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_CLEARCOAT** = **6** --- Texture specifying per-pixel clearcoat value. +:ref:`TextureParam` **TEXTURE_METALLIC** = ``1`` -- **TEXTURE_FLOWMAP** = **7** --- Texture specifying per-pixel flowmap direction for use with :ref:`anisotropy`. +Texture specifying per-pixel metallic value. -- **TEXTURE_AMBIENT_OCCLUSION** = **8** --- Texture specifying per-pixel ambient occlusion value. +.. _class_BaseMaterial3D_constant_TEXTURE_ROUGHNESS: -- **TEXTURE_HEIGHTMAP** = **9** --- Texture specifying per-pixel height. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_SUBSURFACE_SCATTERING** = **10** --- Texture specifying per-pixel subsurface scattering. +:ref:`TextureParam` **TEXTURE_ROUGHNESS** = ``2`` -- **TEXTURE_SUBSURFACE_TRANSMITTANCE** = **11** --- Texture specifying per-pixel transmittance for subsurface scattering. +Texture specifying per-pixel roughness value. -- **TEXTURE_BACKLIGHT** = **12** --- Texture specifying per-pixel backlight color. +.. _class_BaseMaterial3D_constant_TEXTURE_EMISSION: -- **TEXTURE_REFRACTION** = **13** --- Texture specifying per-pixel refraction strength. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_DETAIL_MASK** = **14** --- Texture specifying per-pixel detail mask blending value. +:ref:`TextureParam` **TEXTURE_EMISSION** = ``3`` -- **TEXTURE_DETAIL_ALBEDO** = **15** --- Texture specifying per-pixel detail color. +Texture specifying per-pixel emission color. -- **TEXTURE_DETAIL_NORMAL** = **16** --- Texture specifying per-pixel detail normal. +.. _class_BaseMaterial3D_constant_TEXTURE_NORMAL: -- **TEXTURE_ORM** = **17** --- Texture holding ambient occlusion, roughness, and metallic. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_MAX** = **18** --- Represents the size of the :ref:`TextureParam` enum. +:ref:`TextureParam` **TEXTURE_NORMAL** = ``4`` + +Texture specifying per-pixel normal vector. + +.. _class_BaseMaterial3D_constant_TEXTURE_RIM: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_RIM** = ``5`` + +Texture specifying per-pixel rim value. + +.. _class_BaseMaterial3D_constant_TEXTURE_CLEARCOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_CLEARCOAT** = ``6`` + +Texture specifying per-pixel clearcoat value. + +.. _class_BaseMaterial3D_constant_TEXTURE_FLOWMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_FLOWMAP** = ``7`` + +Texture specifying per-pixel flowmap direction for use with :ref:`anisotropy`. + +.. _class_BaseMaterial3D_constant_TEXTURE_AMBIENT_OCCLUSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_AMBIENT_OCCLUSION** = ``8`` + +Texture specifying per-pixel ambient occlusion value. + +.. _class_BaseMaterial3D_constant_TEXTURE_HEIGHTMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_HEIGHTMAP** = ``9`` + +Texture specifying per-pixel height. + +.. _class_BaseMaterial3D_constant_TEXTURE_SUBSURFACE_SCATTERING: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_SUBSURFACE_SCATTERING** = ``10`` + +Texture specifying per-pixel subsurface scattering. + +.. _class_BaseMaterial3D_constant_TEXTURE_SUBSURFACE_TRANSMITTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_SUBSURFACE_TRANSMITTANCE** = ``11`` + +Texture specifying per-pixel transmittance for subsurface scattering. + +.. _class_BaseMaterial3D_constant_TEXTURE_BACKLIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_BACKLIGHT** = ``12`` + +Texture specifying per-pixel backlight color. + +.. _class_BaseMaterial3D_constant_TEXTURE_REFRACTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_REFRACTION** = ``13`` + +Texture specifying per-pixel refraction strength. + +.. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_DETAIL_MASK** = ``14`` + +Texture specifying per-pixel detail mask blending value. + +.. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_ALBEDO: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_DETAIL_ALBEDO** = ``15`` + +Texture specifying per-pixel detail color. + +.. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_DETAIL_NORMAL** = ``16`` + +Texture specifying per-pixel detail normal. + +.. _class_BaseMaterial3D_constant_TEXTURE_ORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_ORM** = ``17`` + +Texture holding ambient occlusion, roughness, and metallic. + +.. _class_BaseMaterial3D_constant_TEXTURE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_MAX** = ``18`` + +Represents the size of the :ref:`TextureParam` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_TextureFilter: -.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST: - -.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR: - -.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: - -.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: - -.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: - -.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: - -.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_MAX: +.. rst-class:: classref-enumeration enum **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. +.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST: -- **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. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`TextureFilter` **TEXTURE_FILTER_NEAREST** = ``0`` -- **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 reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. -- **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`. +.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR: -- **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`. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_FILTER_MAX** = **6** --- Represents the size of the :ref:`TextureFilter` enum. +: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. + +.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +: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`. + +.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +: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`. + +.. _class_BaseMaterial3D_constant_TEXTURE_FILTER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **TEXTURE_FILTER_MAX** = ``6`` + +Represents the size of the :ref:`TextureFilter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_DetailUV: -.. _class_BaseMaterial3D_constant_DETAIL_UV_1: - -.. _class_BaseMaterial3D_constant_DETAIL_UV_2: +.. rst-class:: classref-enumeration enum **DetailUV**: -- **DETAIL_UV_1** = **0** --- Use ``UV`` with the detail texture. +.. _class_BaseMaterial3D_constant_DETAIL_UV_1: -- **DETAIL_UV_2** = **1** --- Use ``UV2`` with the detail texture. +.. rst-class:: classref-enumeration-constant + +:ref:`DetailUV` **DETAIL_UV_1** = ``0`` + +Use ``UV`` with the detail texture. + +.. _class_BaseMaterial3D_constant_DETAIL_UV_2: + +.. rst-class:: classref-enumeration-constant + +:ref:`DetailUV` **DETAIL_UV_2** = ``1`` + +Use ``UV2`` with the detail texture. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_Transparency: -.. _class_BaseMaterial3D_constant_TRANSPARENCY_DISABLED: - -.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA: - -.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_SCISSOR: - -.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_HASH: - -.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_DEPTH_PRE_PASS: - -.. _class_BaseMaterial3D_constant_TRANSPARENCY_MAX: +.. rst-class:: classref-enumeration enum **Transparency**: -- **TRANSPARENCY_DISABLED** = **0** --- The material will not use transparency. +.. _class_BaseMaterial3D_constant_TRANSPARENCY_DISABLED: -- **TRANSPARENCY_ALPHA** = **1** --- The material will use the texture's alpha values for transparency. +.. rst-class:: classref-enumeration-constant -- **TRANSPARENCY_ALPHA_SCISSOR** = **2** --- The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendering in the depth prepass. +:ref:`Transparency` **TRANSPARENCY_DISABLED** = ``0`` -- **TRANSPARENCY_ALPHA_HASH** = **3** --- The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. +The material will not use transparency. -- **TRANSPARENCY_ALPHA_DEPTH_PRE_PASS** = **4** --- The material will use the texture's alpha value for transparency, but will still be rendered in the depth prepass. +.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA: -- **TRANSPARENCY_MAX** = **5** --- Represents the size of the :ref:`Transparency` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`Transparency` **TRANSPARENCY_ALPHA** = ``1`` + +The material will use the texture's alpha values for transparency. + +.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_SCISSOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Transparency` **TRANSPARENCY_ALPHA_SCISSOR** = ``2`` + +The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendering in the depth prepass. + +.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_HASH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Transparency` **TRANSPARENCY_ALPHA_HASH** = ``3`` + +The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. + +.. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_DEPTH_PRE_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Transparency` **TRANSPARENCY_ALPHA_DEPTH_PRE_PASS** = ``4`` + +The material will use the texture's alpha value for transparency, but will still be rendered in the depth prepass. + +.. _class_BaseMaterial3D_constant_TRANSPARENCY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Transparency` **TRANSPARENCY_MAX** = ``5`` + +Represents the size of the :ref:`Transparency` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_ShadingMode: -.. _class_BaseMaterial3D_constant_SHADING_MODE_UNSHADED: - -.. _class_BaseMaterial3D_constant_SHADING_MODE_PER_PIXEL: - -.. _class_BaseMaterial3D_constant_SHADING_MODE_PER_VERTEX: - -.. _class_BaseMaterial3D_constant_SHADING_MODE_MAX: +.. rst-class:: classref-enumeration enum **ShadingMode**: -- **SHADING_MODE_UNSHADED** = **0** --- The object will not receive shadows. +.. _class_BaseMaterial3D_constant_SHADING_MODE_UNSHADED: -- **SHADING_MODE_PER_PIXEL** = **1** --- The object will be shaded per pixel. Useful for realistic shading effect. +.. rst-class:: classref-enumeration-constant -- **SHADING_MODE_PER_VERTEX** = **2** --- The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. +:ref:`ShadingMode` **SHADING_MODE_UNSHADED** = ``0`` -- **SHADING_MODE_MAX** = **3** --- Represents the size of the :ref:`ShadingMode` enum. +The object will not receive shadows. + +.. _class_BaseMaterial3D_constant_SHADING_MODE_PER_PIXEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadingMode` **SHADING_MODE_PER_PIXEL** = ``1`` + +The object will be shaded per pixel. Useful for realistic shading effect. + +.. _class_BaseMaterial3D_constant_SHADING_MODE_PER_VERTEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadingMode` **SHADING_MODE_PER_VERTEX** = ``2`` + +The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. + +.. _class_BaseMaterial3D_constant_SHADING_MODE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadingMode` **SHADING_MODE_MAX** = ``3`` + +Represents the size of the :ref:`ShadingMode` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_Feature: -.. _class_BaseMaterial3D_constant_FEATURE_EMISSION: - -.. _class_BaseMaterial3D_constant_FEATURE_NORMAL_MAPPING: - -.. _class_BaseMaterial3D_constant_FEATURE_RIM: - -.. _class_BaseMaterial3D_constant_FEATURE_CLEARCOAT: - -.. _class_BaseMaterial3D_constant_FEATURE_ANISOTROPY: - -.. _class_BaseMaterial3D_constant_FEATURE_AMBIENT_OCCLUSION: - -.. _class_BaseMaterial3D_constant_FEATURE_HEIGHT_MAPPING: - -.. _class_BaseMaterial3D_constant_FEATURE_SUBSURFACE_SCATTERING: - -.. _class_BaseMaterial3D_constant_FEATURE_SUBSURFACE_TRANSMITTANCE: - -.. _class_BaseMaterial3D_constant_FEATURE_BACKLIGHT: - -.. _class_BaseMaterial3D_constant_FEATURE_REFRACTION: - -.. _class_BaseMaterial3D_constant_FEATURE_DETAIL: - -.. _class_BaseMaterial3D_constant_FEATURE_MAX: +.. rst-class:: classref-enumeration enum **Feature**: -- **FEATURE_EMISSION** = **0** --- Constant for setting :ref:`emission_enabled`. +.. _class_BaseMaterial3D_constant_FEATURE_EMISSION: -- **FEATURE_NORMAL_MAPPING** = **1** --- Constant for setting :ref:`normal_enabled`. +.. rst-class:: classref-enumeration-constant -- **FEATURE_RIM** = **2** --- Constant for setting :ref:`rim_enabled`. +:ref:`Feature` **FEATURE_EMISSION** = ``0`` -- **FEATURE_CLEARCOAT** = **3** --- Constant for setting :ref:`clearcoat_enabled`. +Constant for setting :ref:`emission_enabled`. -- **FEATURE_ANISOTROPY** = **4** --- Constant for setting :ref:`anisotropy_enabled`. +.. _class_BaseMaterial3D_constant_FEATURE_NORMAL_MAPPING: -- **FEATURE_AMBIENT_OCCLUSION** = **5** --- Constant for setting :ref:`ao_enabled`. +.. rst-class:: classref-enumeration-constant -- **FEATURE_HEIGHT_MAPPING** = **6** --- Constant for setting :ref:`heightmap_enabled`. +:ref:`Feature` **FEATURE_NORMAL_MAPPING** = ``1`` -- **FEATURE_SUBSURFACE_SCATTERING** = **7** --- Constant for setting :ref:`subsurf_scatter_enabled`. +Constant for setting :ref:`normal_enabled`. -- **FEATURE_SUBSURFACE_TRANSMITTANCE** = **8** --- Constant for setting :ref:`subsurf_scatter_transmittance_enabled`. +.. _class_BaseMaterial3D_constant_FEATURE_RIM: -- **FEATURE_BACKLIGHT** = **9** --- Constant for setting :ref:`backlight_enabled`. +.. rst-class:: classref-enumeration-constant -- **FEATURE_REFRACTION** = **10** --- Constant for setting :ref:`refraction_enabled`. +:ref:`Feature` **FEATURE_RIM** = ``2`` -- **FEATURE_DETAIL** = **11** --- Constant for setting :ref:`detail_enabled`. +Constant for setting :ref:`rim_enabled`. -- **FEATURE_MAX** = **12** --- Represents the size of the :ref:`Feature` enum. +.. _class_BaseMaterial3D_constant_FEATURE_CLEARCOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_CLEARCOAT** = ``3`` + +Constant for setting :ref:`clearcoat_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_ANISOTROPY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_ANISOTROPY** = ``4`` + +Constant for setting :ref:`anisotropy_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_AMBIENT_OCCLUSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_AMBIENT_OCCLUSION** = ``5`` + +Constant for setting :ref:`ao_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_HEIGHT_MAPPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_HEIGHT_MAPPING** = ``6`` + +Constant for setting :ref:`heightmap_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_SUBSURFACE_SCATTERING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_SUBSURFACE_SCATTERING** = ``7`` + +Constant for setting :ref:`subsurf_scatter_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_SUBSURFACE_TRANSMITTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_SUBSURFACE_TRANSMITTANCE** = ``8`` + +Constant for setting :ref:`subsurf_scatter_transmittance_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_BACKLIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_BACKLIGHT** = ``9`` + +Constant for setting :ref:`backlight_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_REFRACTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_REFRACTION** = ``10`` + +Constant for setting :ref:`refraction_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_DETAIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_DETAIL** = ``11`` + +Constant for setting :ref:`detail_enabled`. + +.. _class_BaseMaterial3D_constant_FEATURE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_MAX** = ``12`` + +Represents the size of the :ref:`Feature` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_BlendMode: -.. _class_BaseMaterial3D_constant_BLEND_MODE_MIX: - -.. _class_BaseMaterial3D_constant_BLEND_MODE_ADD: - -.. _class_BaseMaterial3D_constant_BLEND_MODE_SUB: - -.. _class_BaseMaterial3D_constant_BLEND_MODE_MUL: +.. rst-class:: classref-enumeration enum **BlendMode**: -- **BLEND_MODE_MIX** = **0** --- Default blend mode. The color of the object is blended over the background based on the object's alpha value. +.. _class_BaseMaterial3D_constant_BLEND_MODE_MIX: -- **BLEND_MODE_ADD** = **1** --- The color of the object is added to the background. +.. rst-class:: classref-enumeration-constant -- **BLEND_MODE_SUB** = **2** --- The color of the object is subtracted from the background. +:ref:`BlendMode` **BLEND_MODE_MIX** = ``0`` -- **BLEND_MODE_MUL** = **3** --- The color of the object is multiplied by the background. +Default blend mode. The color of the object is blended over the background based on the object's alpha value. + +.. _class_BaseMaterial3D_constant_BLEND_MODE_ADD: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_ADD** = ``1`` + +The color of the object is added to the background. + +.. _class_BaseMaterial3D_constant_BLEND_MODE_SUB: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_SUB** = ``2`` + +The color of the object is subtracted from the background. + +.. _class_BaseMaterial3D_constant_BLEND_MODE_MUL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_MUL** = ``3`` + +The color of the object is multiplied by the background. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_AlphaAntiAliasing: -.. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_OFF: - -.. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE: - -.. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE: +.. rst-class:: classref-enumeration enum **AlphaAntiAliasing**: -- **ALPHA_ANTIALIASING_OFF** = **0** --- Disables Alpha AntiAliasing for the material. +.. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_OFF: -- **ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE** = **1** --- Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask. +.. rst-class:: classref-enumeration-constant -- **ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE** = **2** --- Enables AlphaToCoverage and forces all non-zero alpha values to ``1``. Alpha values in the material are passed to the AntiAliasing sample mask. +:ref:`AlphaAntiAliasing` **ALPHA_ANTIALIASING_OFF** = ``0`` + +Disables Alpha AntiAliasing for the material. + +.. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaAntiAliasing` **ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE** = ``1`` + +Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask. + +.. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaAntiAliasing` **ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE** = ``2`` + +Enables AlphaToCoverage and forces all non-zero alpha values to ``1``. Alpha values in the material are passed to the AntiAliasing sample mask. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_DepthDrawMode: -.. _class_BaseMaterial3D_constant_DEPTH_DRAW_OPAQUE_ONLY: - -.. _class_BaseMaterial3D_constant_DEPTH_DRAW_ALWAYS: - -.. _class_BaseMaterial3D_constant_DEPTH_DRAW_DISABLED: +.. rst-class:: classref-enumeration enum **DepthDrawMode**: -- **DEPTH_DRAW_OPAQUE_ONLY** = **0** --- Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass. +.. _class_BaseMaterial3D_constant_DEPTH_DRAW_OPAQUE_ONLY: -- **DEPTH_DRAW_ALWAYS** = **1** --- Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them. +.. rst-class:: classref-enumeration-constant + +:ref:`DepthDrawMode` **DEPTH_DRAW_OPAQUE_ONLY** = ``0`` + +Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass. + +.. _class_BaseMaterial3D_constant_DEPTH_DRAW_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DepthDrawMode` **DEPTH_DRAW_ALWAYS** = ``1`` + +Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them. \ **Note:** This does not influence whether transparent objects are included in the depth prepass or not. For that, see :ref:`Transparency`. -- **DEPTH_DRAW_DISABLED** = **2** --- Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled). +.. _class_BaseMaterial3D_constant_DEPTH_DRAW_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DepthDrawMode` **DEPTH_DRAW_DISABLED** = ``2`` + +Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled). + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_CullMode: -.. _class_BaseMaterial3D_constant_CULL_BACK: - -.. _class_BaseMaterial3D_constant_CULL_FRONT: - -.. _class_BaseMaterial3D_constant_CULL_DISABLED: +.. rst-class:: classref-enumeration enum **CullMode**: -- **CULL_BACK** = **0** --- Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes this means that only the exterior of the mesh will be visible. +.. _class_BaseMaterial3D_constant_CULL_BACK: -- **CULL_FRONT** = **1** --- Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes this means that the interior of the mesh will be drawn instead of the exterior. +.. rst-class:: classref-enumeration-constant -- **CULL_DISABLED** = **2** --- No culling is performed. +:ref:`CullMode` **CULL_BACK** = ``0`` + +Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes this means that only the exterior of the mesh will be visible. + +.. _class_BaseMaterial3D_constant_CULL_FRONT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CullMode` **CULL_FRONT** = ``1`` + +Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes this means that the interior of the mesh will be drawn instead of the exterior. + +.. _class_BaseMaterial3D_constant_CULL_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`CullMode` **CULL_DISABLED** = ``2`` + +No culling is performed. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_Flags: -.. _class_BaseMaterial3D_constant_FLAG_DISABLE_DEPTH_TEST: - -.. _class_BaseMaterial3D_constant_FLAG_ALBEDO_FROM_VERTEX_COLOR: - -.. _class_BaseMaterial3D_constant_FLAG_SRGB_VERTEX_COLOR: - -.. _class_BaseMaterial3D_constant_FLAG_USE_POINT_SIZE: - -.. _class_BaseMaterial3D_constant_FLAG_FIXED_SIZE: - -.. _class_BaseMaterial3D_constant_FLAG_BILLBOARD_KEEP_SCALE: - -.. _class_BaseMaterial3D_constant_FLAG_UV1_USE_TRIPLANAR: - -.. _class_BaseMaterial3D_constant_FLAG_UV2_USE_TRIPLANAR: - -.. _class_BaseMaterial3D_constant_FLAG_UV1_USE_WORLD_TRIPLANAR: - -.. _class_BaseMaterial3D_constant_FLAG_UV2_USE_WORLD_TRIPLANAR: - -.. _class_BaseMaterial3D_constant_FLAG_AO_ON_UV2: - -.. _class_BaseMaterial3D_constant_FLAG_EMISSION_ON_UV2: - -.. _class_BaseMaterial3D_constant_FLAG_ALBEDO_TEXTURE_FORCE_SRGB: - -.. _class_BaseMaterial3D_constant_FLAG_DONT_RECEIVE_SHADOWS: - -.. _class_BaseMaterial3D_constant_FLAG_DISABLE_AMBIENT_LIGHT: - -.. _class_BaseMaterial3D_constant_FLAG_USE_SHADOW_TO_OPACITY: - -.. _class_BaseMaterial3D_constant_FLAG_USE_TEXTURE_REPEAT: - -.. _class_BaseMaterial3D_constant_FLAG_INVERT_HEIGHTMAP: - -.. _class_BaseMaterial3D_constant_FLAG_SUBSURFACE_MODE_SKIN: - -.. _class_BaseMaterial3D_constant_FLAG_PARTICLE_TRAILS_MODE: - -.. _class_BaseMaterial3D_constant_FLAG_ALBEDO_TEXTURE_MSDF: - -.. _class_BaseMaterial3D_constant_FLAG_MAX: +.. rst-class:: classref-enumeration enum **Flags**: -- **FLAG_DISABLE_DEPTH_TEST** = **0** --- Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth. +.. _class_BaseMaterial3D_constant_FLAG_DISABLE_DEPTH_TEST: -- **FLAG_ALBEDO_FROM_VERTEX_COLOR** = **1** --- Set ``ALBEDO`` to the per-vertex color specified in the mesh. +.. rst-class:: classref-enumeration-constant -- **FLAG_SRGB_VERTEX_COLOR** = **2** --- Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also :ref:`vertex_color_is_srgb`. +:ref:`Flags` **FLAG_DISABLE_DEPTH_TEST** = ``0`` + +Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth. + +.. _class_BaseMaterial3D_constant_FLAG_ALBEDO_FROM_VERTEX_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_ALBEDO_FROM_VERTEX_COLOR** = ``1`` + +Set ``ALBEDO`` to the per-vertex color specified in the mesh. + +.. _class_BaseMaterial3D_constant_FLAG_SRGB_VERTEX_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_SRGB_VERTEX_COLOR** = ``2`` + +Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also :ref:`vertex_color_is_srgb`. \ **Note:** Only effective when using the Vulkan Clustered or Vulkan Mobile backends. -- **FLAG_USE_POINT_SIZE** = **3** --- Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use ``POINT_COORD`` instead of ``UV``. +.. _class_BaseMaterial3D_constant_FLAG_USE_POINT_SIZE: -- **FLAG_FIXED_SIZE** = **4** --- Object is scaled by depth so that it always appears the same size on screen. +.. rst-class:: classref-enumeration-constant -- **FLAG_BILLBOARD_KEEP_SCALE** = **5** --- Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when :ref:`billboard_mode` is :ref:`BILLBOARD_ENABLED`. +:ref:`Flags` **FLAG_USE_POINT_SIZE** = ``3`` -- **FLAG_UV1_USE_TRIPLANAR** = **6** --- Use triplanar texture lookup for all texture lookups that would normally use ``UV``. +Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use ``POINT_COORD`` instead of ``UV``. -- **FLAG_UV2_USE_TRIPLANAR** = **7** --- Use triplanar texture lookup for all texture lookups that would normally use ``UV2``. +.. _class_BaseMaterial3D_constant_FLAG_FIXED_SIZE: -- **FLAG_UV1_USE_WORLD_TRIPLANAR** = **8** --- Use triplanar texture lookup for all texture lookups that would normally use ``UV``. +.. rst-class:: classref-enumeration-constant -- **FLAG_UV2_USE_WORLD_TRIPLANAR** = **9** --- Use triplanar texture lookup for all texture lookups that would normally use ``UV2``. +:ref:`Flags` **FLAG_FIXED_SIZE** = ``4`` -- **FLAG_AO_ON_UV2** = **10** --- Use ``UV2`` coordinates to look up from the :ref:`ao_texture`. +Object is scaled by depth so that it always appears the same size on screen. -- **FLAG_EMISSION_ON_UV2** = **11** --- Use ``UV2`` coordinates to look up from the :ref:`emission_texture`. +.. _class_BaseMaterial3D_constant_FLAG_BILLBOARD_KEEP_SCALE: -- **FLAG_ALBEDO_TEXTURE_FORCE_SRGB** = **12** --- Forces the shader to convert albedo from sRGB space to linear space. See also :ref:`albedo_texture_force_srgb`. +.. rst-class:: classref-enumeration-constant -- **FLAG_DONT_RECEIVE_SHADOWS** = **13** --- Disables receiving shadows from other objects. +:ref:`Flags` **FLAG_BILLBOARD_KEEP_SCALE** = ``5`` -- **FLAG_DISABLE_AMBIENT_LIGHT** = **14** --- Disables receiving ambient light. +Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when :ref:`billboard_mode` is :ref:`BILLBOARD_ENABLED`. -- **FLAG_USE_SHADOW_TO_OPACITY** = **15** --- Enables the shadow to opacity feature. +.. _class_BaseMaterial3D_constant_FLAG_UV1_USE_TRIPLANAR: -- **FLAG_USE_TEXTURE_REPEAT** = **16** --- Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. +.. rst-class:: classref-enumeration-constant -- **FLAG_INVERT_HEIGHTMAP** = **17** --- Invert values read from a depth texture to convert them to height values (heightmap). +:ref:`Flags` **FLAG_UV1_USE_TRIPLANAR** = ``6`` -- **FLAG_SUBSURFACE_MODE_SKIN** = **18** --- Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin. +Use triplanar texture lookup for all texture lookups that would normally use ``UV``. -- **FLAG_PARTICLE_TRAILS_MODE** = **19** --- 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. +.. _class_BaseMaterial3D_constant_FLAG_UV2_USE_TRIPLANAR: -- **FLAG_ALBEDO_TEXTURE_MSDF** = **20** --- Enables multichannel signed distance field rendering shader. +.. rst-class:: classref-enumeration-constant -- **FLAG_MAX** = **21** --- Represents the size of the :ref:`Flags` enum. +:ref:`Flags` **FLAG_UV2_USE_TRIPLANAR** = ``7`` + +Use triplanar texture lookup for all texture lookups that would normally use ``UV2``. + +.. _class_BaseMaterial3D_constant_FLAG_UV1_USE_WORLD_TRIPLANAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_UV1_USE_WORLD_TRIPLANAR** = ``8`` + +Use triplanar texture lookup for all texture lookups that would normally use ``UV``. + +.. _class_BaseMaterial3D_constant_FLAG_UV2_USE_WORLD_TRIPLANAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_UV2_USE_WORLD_TRIPLANAR** = ``9`` + +Use triplanar texture lookup for all texture lookups that would normally use ``UV2``. + +.. _class_BaseMaterial3D_constant_FLAG_AO_ON_UV2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_AO_ON_UV2** = ``10`` + +Use ``UV2`` coordinates to look up from the :ref:`ao_texture`. + +.. _class_BaseMaterial3D_constant_FLAG_EMISSION_ON_UV2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_EMISSION_ON_UV2** = ``11`` + +Use ``UV2`` coordinates to look up from the :ref:`emission_texture`. + +.. _class_BaseMaterial3D_constant_FLAG_ALBEDO_TEXTURE_FORCE_SRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_ALBEDO_TEXTURE_FORCE_SRGB** = ``12`` + +Forces the shader to convert albedo from sRGB space to linear space. See also :ref:`albedo_texture_force_srgb`. + +.. _class_BaseMaterial3D_constant_FLAG_DONT_RECEIVE_SHADOWS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_DONT_RECEIVE_SHADOWS** = ``13`` + +Disables receiving shadows from other objects. + +.. _class_BaseMaterial3D_constant_FLAG_DISABLE_AMBIENT_LIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_DISABLE_AMBIENT_LIGHT** = ``14`` + +Disables receiving ambient light. + +.. _class_BaseMaterial3D_constant_FLAG_USE_SHADOW_TO_OPACITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_USE_SHADOW_TO_OPACITY** = ``15`` + +Enables the shadow to opacity feature. + +.. _class_BaseMaterial3D_constant_FLAG_USE_TEXTURE_REPEAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_USE_TEXTURE_REPEAT** = ``16`` + +Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. + +.. _class_BaseMaterial3D_constant_FLAG_INVERT_HEIGHTMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_INVERT_HEIGHTMAP** = ``17`` + +Invert values read from a depth texture to convert them to height values (heightmap). + +.. _class_BaseMaterial3D_constant_FLAG_SUBSURFACE_MODE_SKIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_SUBSURFACE_MODE_SKIN** = ``18`` + +Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin. + +.. _class_BaseMaterial3D_constant_FLAG_PARTICLE_TRAILS_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_PARTICLE_TRAILS_MODE** = ``19`` + +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. + +.. _class_BaseMaterial3D_constant_FLAG_ALBEDO_TEXTURE_MSDF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_ALBEDO_TEXTURE_MSDF** = ``20`` + +Enables multichannel signed distance field rendering shader. + +.. _class_BaseMaterial3D_constant_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_MAX** = ``21`` + +Represents the size of the :ref:`Flags` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_DiffuseMode: -.. _class_BaseMaterial3D_constant_DIFFUSE_BURLEY: - -.. _class_BaseMaterial3D_constant_DIFFUSE_LAMBERT: - -.. _class_BaseMaterial3D_constant_DIFFUSE_LAMBERT_WRAP: - -.. _class_BaseMaterial3D_constant_DIFFUSE_TOON: +.. rst-class:: classref-enumeration enum **DiffuseMode**: -- **DIFFUSE_BURLEY** = **0** --- Default diffuse scattering algorithm. +.. _class_BaseMaterial3D_constant_DIFFUSE_BURLEY: -- **DIFFUSE_LAMBERT** = **1** --- Diffuse scattering ignores roughness. +.. rst-class:: classref-enumeration-constant -- **DIFFUSE_LAMBERT_WRAP** = **2** --- Extends Lambert to cover more than 90 degrees when roughness increases. +:ref:`DiffuseMode` **DIFFUSE_BURLEY** = ``0`` -- **DIFFUSE_TOON** = **3** --- Uses a hard cut for lighting, with smoothing affected by roughness. +Default diffuse scattering algorithm. + +.. _class_BaseMaterial3D_constant_DIFFUSE_LAMBERT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DiffuseMode` **DIFFUSE_LAMBERT** = ``1`` + +Diffuse scattering ignores roughness. + +.. _class_BaseMaterial3D_constant_DIFFUSE_LAMBERT_WRAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`DiffuseMode` **DIFFUSE_LAMBERT_WRAP** = ``2`` + +Extends Lambert to cover more than 90 degrees when roughness increases. + +.. _class_BaseMaterial3D_constant_DIFFUSE_TOON: + +.. rst-class:: classref-enumeration-constant + +:ref:`DiffuseMode` **DIFFUSE_TOON** = ``3`` + +Uses a hard cut for lighting, with smoothing affected by roughness. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_SpecularMode: -.. _class_BaseMaterial3D_constant_SPECULAR_SCHLICK_GGX: - -.. _class_BaseMaterial3D_constant_SPECULAR_TOON: - -.. _class_BaseMaterial3D_constant_SPECULAR_DISABLED: +.. rst-class:: classref-enumeration enum **SpecularMode**: -- **SPECULAR_SCHLICK_GGX** = **0** --- Default specular blob. +.. _class_BaseMaterial3D_constant_SPECULAR_SCHLICK_GGX: -- **SPECULAR_TOON** = **1** --- Toon blob which changes size based on roughness. +.. rst-class:: classref-enumeration-constant -- **SPECULAR_DISABLED** = **2** --- No specular blob. +:ref:`SpecularMode` **SPECULAR_SCHLICK_GGX** = ``0`` + +Default specular blob. + +.. _class_BaseMaterial3D_constant_SPECULAR_TOON: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpecularMode` **SPECULAR_TOON** = ``1`` + +Toon blob which changes size based on roughness. + +.. _class_BaseMaterial3D_constant_SPECULAR_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpecularMode` **SPECULAR_DISABLED** = ``2`` + +No specular blob. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_BillboardMode: -.. _class_BaseMaterial3D_constant_BILLBOARD_DISABLED: - -.. _class_BaseMaterial3D_constant_BILLBOARD_ENABLED: - -.. _class_BaseMaterial3D_constant_BILLBOARD_FIXED_Y: - -.. _class_BaseMaterial3D_constant_BILLBOARD_PARTICLES: +.. rst-class:: classref-enumeration enum **BillboardMode**: -- **BILLBOARD_DISABLED** = **0** --- Billboard mode is disabled. +.. _class_BaseMaterial3D_constant_BILLBOARD_DISABLED: -- **BILLBOARD_ENABLED** = **1** --- The object's Z axis will always face the camera. +.. rst-class:: classref-enumeration-constant -- **BILLBOARD_FIXED_Y** = **2** --- The object's X axis will always face the camera. +:ref:`BillboardMode` **BILLBOARD_DISABLED** = ``0`` -- **BILLBOARD_PARTICLES** = **3** --- Used for particle systems when assigned to :ref:`GPUParticles3D` and :ref:`CPUParticles3D` nodes. Enables ``particles_anim_*`` properties. +Billboard mode is disabled. + +.. _class_BaseMaterial3D_constant_BILLBOARD_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BillboardMode` **BILLBOARD_ENABLED** = ``1`` + +The object's Z axis will always face the camera. + +.. _class_BaseMaterial3D_constant_BILLBOARD_FIXED_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`BillboardMode` **BILLBOARD_FIXED_Y** = ``2`` + +The object's X axis will always face the camera. + +.. _class_BaseMaterial3D_constant_BILLBOARD_PARTICLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`BillboardMode` **BILLBOARD_PARTICLES** = ``3`` + +Used for particle systems when assigned to :ref:`GPUParticles3D` and :ref:`CPUParticles3D` nodes. 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. +.. rst-class:: classref-item-separator + ---- .. _enum_BaseMaterial3D_TextureChannel: -.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_RED: - -.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_GREEN: - -.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_BLUE: - -.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_ALPHA: - -.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_GRAYSCALE: +.. rst-class:: classref-enumeration enum **TextureChannel**: -- **TEXTURE_CHANNEL_RED** = **0** --- Used to read from the red channel of a texture. +.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_RED: -- **TEXTURE_CHANNEL_GREEN** = **1** --- Used to read from the green channel of a texture. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_CHANNEL_BLUE** = **2** --- Used to read from the blue channel of a texture. +:ref:`TextureChannel` **TEXTURE_CHANNEL_RED** = ``0`` -- **TEXTURE_CHANNEL_ALPHA** = **3** --- Used to read from the alpha channel of a texture. +Used to read from the red channel of a texture. -- **TEXTURE_CHANNEL_GRAYSCALE** = **4** --- Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. +.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_GREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureChannel` **TEXTURE_CHANNEL_GREEN** = ``1`` + +Used to read from the green channel of a texture. + +.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_BLUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureChannel` **TEXTURE_CHANNEL_BLUE** = ``2`` + +Used to read from the blue channel of a texture. + +.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureChannel` **TEXTURE_CHANNEL_ALPHA** = ``3`` + +Used to read from the alpha channel of a texture. + +.. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_GRAYSCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureChannel` **TEXTURE_CHANNEL_GRAYSCALE** = ``4`` + +Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_EmissionOperator: -.. _class_BaseMaterial3D_constant_EMISSION_OP_ADD: - -.. _class_BaseMaterial3D_constant_EMISSION_OP_MULTIPLY: +.. rst-class:: classref-enumeration enum **EmissionOperator**: -- **EMISSION_OP_ADD** = **0** --- Adds the emission color to the color from the emission texture. +.. _class_BaseMaterial3D_constant_EMISSION_OP_ADD: -- **EMISSION_OP_MULTIPLY** = **1** --- Multiplies the emission color by the color from the emission texture. +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionOperator` **EMISSION_OP_ADD** = ``0`` + +Adds the emission color to the color from the emission texture. + +.. _class_BaseMaterial3D_constant_EMISSION_OP_MULTIPLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionOperator` **EMISSION_OP_MULTIPLY** = ``1`` + +Multiplies the emission color by the color from the emission texture. + +.. rst-class:: classref-item-separator ---- .. _enum_BaseMaterial3D_DistanceFadeMode: -.. _class_BaseMaterial3D_constant_DISTANCE_FADE_DISABLED: - -.. _class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_ALPHA: - -.. _class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_DITHER: - -.. _class_BaseMaterial3D_constant_DISTANCE_FADE_OBJECT_DITHER: +.. rst-class:: classref-enumeration enum **DistanceFadeMode**: -- **DISTANCE_FADE_DISABLED** = **0** --- Do not use distance fade. +.. _class_BaseMaterial3D_constant_DISTANCE_FADE_DISABLED: -- **DISTANCE_FADE_PIXEL_ALPHA** = **1** --- Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel. +.. rst-class:: classref-enumeration-constant -- **DISTANCE_FADE_PIXEL_DITHER** = **2** --- Smoothly fades the object out based on each pixel's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA`. +:ref:`DistanceFadeMode` **DISTANCE_FADE_DISABLED** = ``0`` -- **DISTANCE_FADE_OBJECT_DITHER** = **3** --- Smoothly fades the object out based on the object's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA`. +Do not use distance fade. + +.. _class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`DistanceFadeMode` **DISTANCE_FADE_PIXEL_ALPHA** = ``1`` + +Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel. + +.. _class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_DITHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DistanceFadeMode` **DISTANCE_FADE_PIXEL_DITHER** = ``2`` + +Smoothly fades the object out based on each pixel's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA`. + +.. _class_BaseMaterial3D_constant_DISTANCE_FADE_OBJECT_DITHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DistanceFadeMode` **DISTANCE_FADE_OBJECT_DITHER** = ``3`` + +Smoothly fades the object out based on the object's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BaseMaterial3D_property_albedo_color: -- :ref:`Color` **albedo_color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_albedo(value) | -+-----------+-----------------------+ -| *Getter* | get_albedo() | -+-----------+-----------------------+ +:ref:`Color` **albedo_color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_albedo** **(** :ref:`Color` value **)** +- :ref:`Color` **get_albedo** **(** **)** The material's base color. \ **Note:** If :ref:`detail_enabled` is ``true`` and a :ref:`detail_albedo` texture is specified, :ref:`albedo_color` will *not* modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent :ref:`detail_albedo` texture instead. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_albedo_texture: -- :ref:`Texture2D` **albedo_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **albedo_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture to multiply by :ref:`albedo_color`. Used for basic texturing of objects. If the texture appears unexpectedly too dark or too bright, check :ref:`albedo_texture_force_srgb`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_albedo_texture_force_srgb: -- :ref:`bool` **albedo_texture_force_srgb** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **albedo_texture_force_srgb** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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`. This should only be enabled when needed (typically when using a :ref:`ViewportTexture` as :ref:`albedo_texture`). If :ref:`albedo_texture_force_srgb` is ``true`` when it shouldn't be, the texture will appear to be too dark. If :ref:`albedo_texture_force_srgb` is ``false`` when it shouldn't be, the texture will appear to be too bright. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_albedo_texture_msdf: -- :ref:`bool` **albedo_texture_msdf** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **albedo_texture_msdf** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| Enables multichannel signed distance field rendering shader. Use :ref:`msdf_pixel_range` and :ref:`msdf_outline_size` to configure MSDF parameters. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_alpha_antialiasing_edge: -- :ref:`float` **alpha_antialiasing_edge** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_alpha_antialiasing_edge(value) | -+----------+------------------------------------+ -| *Getter* | get_alpha_antialiasing_edge() | -+----------+------------------------------------+ +:ref:`float` **alpha_antialiasing_edge** + +.. rst-class:: classref-property-setget + +- void **set_alpha_antialiasing_edge** **(** :ref:`float` value **)** +- :ref:`float` **get_alpha_antialiasing_edge** **(** **)** Threshold at which antialiasing will be applied on the alpha channel. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_alpha_antialiasing_mode: -- :ref:`AlphaAntiAliasing` **alpha_antialiasing_mode** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_alpha_antialiasing(value) | -+----------+-------------------------------+ -| *Getter* | get_alpha_antialiasing() | -+----------+-------------------------------+ +:ref:`AlphaAntiAliasing` **alpha_antialiasing_mode** + +.. rst-class:: classref-property-setget + +- void **set_alpha_antialiasing** **(** :ref:`AlphaAntiAliasing` value **)** +- :ref:`AlphaAntiAliasing` **get_alpha_antialiasing** **(** **)** The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_alpha_hash_scale: -- :ref:`float` **alpha_hash_scale** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_alpha_hash_scale(value) | -+----------+-----------------------------+ -| *Getter* | get_alpha_hash_scale() | -+----------+-----------------------------+ +:ref:`float` **alpha_hash_scale** + +.. rst-class:: classref-property-setget + +- void **set_alpha_hash_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_alpha_hash_scale** **(** **)** The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_alpha_scissor_threshold: -- :ref:`float` **alpha_scissor_threshold** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_alpha_scissor_threshold(value) | -+----------+------------------------------------+ -| *Getter* | get_alpha_scissor_threshold() | -+----------+------------------------------------+ +:ref:`float` **alpha_scissor_threshold** + +.. rst-class:: classref-property-setget + +- void **set_alpha_scissor_threshold** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_anisotropy: -- :ref:`float` **anisotropy** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_anisotropy(value) | -+-----------+-----------------------+ -| *Getter* | get_anisotropy() | -+-----------+-----------------------+ +:ref:`float` **anisotropy** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_anisotropy** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_anisotropy_enabled: -- :ref:`bool` **anisotropy_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **anisotropy_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` 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. @@ -982,789 +1524,862 @@ If ``true``, anisotropy is enabled. Anisotropy changes the shape of the specular \ **Note:** Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting :ref:`texture_filter` to :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_anisotropy_flowmap: -- :ref:`Texture2D` **anisotropy_flowmap** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **anisotropy_flowmap** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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. If present, the texture's alpha channel will be used to multiply the strength of the :ref:`anisotropy` effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_ao_enabled: -- :ref:`bool` **ao_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **ao_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| If ``true``, ambient occlusion is enabled. Ambient occlusion darkens areas based on the :ref:`ao_texture`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_ao_light_affect: -- :ref:`float` **ao_light_affect** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_ao_light_affect(value) | -+-----------+----------------------------+ -| *Getter* | get_ao_light_affect() | -+-----------+----------------------------+ +:ref:`float` **ao_light_affect** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_ao_light_affect** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_ao_on_uv2: -- :ref:`bool` **ao_on_uv2** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **ao_on_uv2** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, use ``UV2`` coordinates to look up from the :ref:`ao_texture`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_ao_texture: -- :ref:`Texture2D` **ao_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **ao_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture that defines the amount of ambient occlusion for a given point on the object. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_ao_texture_channel: -- :ref:`TextureChannel` **ao_texture_channel** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_ao_texture_channel(value) | -+-----------+-------------------------------+ -| *Getter* | get_ao_texture_channel() | -+-----------+-------------------------------+ +:ref:`TextureChannel` **ao_texture_channel** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_ao_texture_channel** **(** :ref:`TextureChannel` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_backlight: -- :ref:`Color` **backlight** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_backlight(value) | -+-----------+-----------------------+ -| *Getter* | get_backlight() | -+-----------+-----------------------+ +:ref:`Color` **backlight** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_backlight** **(** :ref:`Color` value **)** +- :ref:`Color` **get_backlight** **(** **)** The color used by the backlight effect. Represents the light passing through an object. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_backlight_enabled: -- :ref:`bool` **backlight_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **backlight_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| If ``true``, the backlight effect is enabled. See also :ref:`subsurf_scatter_transmittance_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_backlight_texture: -- :ref:`Texture2D` **backlight_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **backlight_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture used to control the backlight effect per-pixel. Added to :ref:`backlight`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_billboard_keep_scale: -- :ref:`bool` **billboard_keep_scale** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **billboard_keep_scale** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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 :ref:`BILLBOARD_ENABLED`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_billboard_mode: -- :ref:`BillboardMode` **billboard_mode** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_billboard_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_billboard_mode() | -+-----------+---------------------------+ +:ref:`BillboardMode` **billboard_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_billboard_mode** **(** :ref:`BillboardMode` value **)** +- :ref:`BillboardMode` **get_billboard_mode** **(** **)** Controls how the object faces the camera. See :ref:`BillboardMode`. \ **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 + ---- .. _class_BaseMaterial3D_property_blend_mode: -- :ref:`BlendMode` **blend_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_blend_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_blend_mode() | -+-----------+-----------------------+ +:ref:`BlendMode` **blend_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_blend_mode** **(** :ref:`BlendMode` value **)** +- :ref:`BlendMode` **get_blend_mode** **(** **)** The material's blend mode. \ **Note:** Values other than ``Mix`` force the object into the transparent pipeline. See :ref:`BlendMode`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_clearcoat: -- :ref:`float` **clearcoat** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_clearcoat(value) | -+-----------+----------------------+ -| *Getter* | get_clearcoat() | -+-----------+----------------------+ +:ref:`float` **clearcoat** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_clearcoat** **(** :ref:`float` value **)** +- :ref:`float` **get_clearcoat** **(** **)** Sets the strength of the clearcoat effect. Setting to ``0`` looks the same as disabling the clearcoat effect. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_clearcoat_enabled: -- :ref:`bool` **clearcoat_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **clearcoat_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` 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. \ **Note:** Clearcoat rendering is not visible if the material's :ref:`shading_mode` is :ref:`SHADING_MODE_UNSHADED`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_clearcoat_roughness: -- :ref:`float` **clearcoat_roughness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------------------+ -| *Setter* | set_clearcoat_roughness(value) | -+-----------+--------------------------------+ -| *Getter* | get_clearcoat_roughness() | -+-----------+--------------------------------+ +:ref:`float` **clearcoat_roughness** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_clearcoat_roughness** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_clearcoat_texture: -- :ref:`Texture2D` **clearcoat_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **clearcoat_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_cull_mode: -- :ref:`CullMode` **cull_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_cull_mode(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mode() | -+-----------+----------------------+ +:ref:`CullMode` **cull_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mode** **(** :ref:`CullMode` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_depth_draw_mode: -- :ref:`DepthDrawMode` **depth_draw_mode** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_depth_draw_mode(value) | -+-----------+----------------------------+ -| *Getter* | get_depth_draw_mode() | -+-----------+----------------------------+ +:ref:`DepthDrawMode` **depth_draw_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_depth_draw_mode** **(** :ref:`DepthDrawMode` value **)** +- :ref:`DepthDrawMode` **get_depth_draw_mode** **(** **)** Determines when depth rendering takes place. See :ref:`DepthDrawMode`. See also :ref:`transparency`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_detail_albedo: -- :ref:`Texture2D` **detail_albedo** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **detail_albedo** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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`. \ **Note:** :ref:`detail_albedo` is *not* modulated by :ref:`albedo_color`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_detail_blend_mode: -- :ref:`BlendMode` **detail_blend_mode** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_detail_blend_mode(value) | -+-----------+------------------------------+ -| *Getter* | get_detail_blend_mode() | -+-----------+------------------------------+ +:ref:`BlendMode` **detail_blend_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_detail_blend_mode** **(** :ref:`BlendMode` value **)** +- :ref:`BlendMode` **get_detail_blend_mode** **(** **)** Specifies how the :ref:`detail_albedo` should blend with the current ``ALBEDO``. See :ref:`BlendMode` for options. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_detail_enabled: -- :ref:`bool` **detail_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **detail_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` 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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_detail_mask: -- :ref:`Texture2D` **detail_mask** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **detail_mask** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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). +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_detail_normal: -- :ref:`Texture2D` **detail_normal** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **detail_normal** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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`. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_detail_uv_layer: -- :ref:`DetailUV` **detail_uv_layer** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_detail_uv(value) | -+-----------+----------------------+ -| *Getter* | get_detail_uv() | -+-----------+----------------------+ +:ref:`DetailUV` **detail_uv_layer** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_detail_uv** **(** :ref:`DetailUV` value **)** +- :ref:`DetailUV` **get_detail_uv** **(** **)** Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`DetailUV` for options. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_diffuse_mode: -- :ref:`DiffuseMode` **diffuse_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_diffuse_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_diffuse_mode() | -+-----------+-------------------------+ +:ref:`DiffuseMode` **diffuse_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_diffuse_mode** **(** :ref:`DiffuseMode` value **)** +- :ref:`DiffuseMode` **get_diffuse_mode** **(** **)** The algorithm used for diffuse light scattering. See :ref:`DiffuseMode`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_disable_ambient_light: -- :ref:`bool` **disable_ambient_light** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **disable_ambient_light** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, the object receives no ambient light. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_disable_receive_shadows: -- :ref:`bool` **disable_receive_shadows** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **disable_receive_shadows** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, the object receives no shadow that would otherwise be cast onto it. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_distance_fade_max_distance: -- :ref:`float` **distance_fade_max_distance** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``10.0`` | -+-----------+---------------------------------------+ -| *Setter* | set_distance_fade_max_distance(value) | -+-----------+---------------------------------------+ -| *Getter* | get_distance_fade_max_distance() | -+-----------+---------------------------------------+ +:ref:`float` **distance_fade_max_distance** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade_max_distance** **(** :ref:`float` value **)** +- :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``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_distance_fade_min_distance: -- :ref:`float` **distance_fade_min_distance** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------------+ -| *Setter* | set_distance_fade_min_distance(value) | -+-----------+---------------------------------------+ -| *Getter* | get_distance_fade_min_distance() | -+-----------+---------------------------------------+ +:ref:`float` **distance_fade_min_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade_min_distance** **(** :ref:`float` value **)** +- :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``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_distance_fade_mode: -- :ref:`DistanceFadeMode` **distance_fade_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_distance_fade(value) | -+-----------+--------------------------+ -| *Getter* | get_distance_fade() | -+-----------+--------------------------+ +:ref:`DistanceFadeMode` **distance_fade_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade** **(** :ref:`DistanceFadeMode` value **)** +- :ref:`DistanceFadeMode` **get_distance_fade** **(** **)** Specifies which type of fade to use. Can be any of the :ref:`DistanceFadeMode`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_emission: -- :ref:`Color` **emission** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_emission(value) | -+-----------+-----------------------+ -| *Getter* | get_emission() | -+-----------+-----------------------+ +:ref:`Color` **emission** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_emission** **(** :ref:`Color` value **)** +- :ref:`Color` **get_emission** **(** **)** The emitted light's color. See :ref:`emission_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_emission_enabled: -- :ref:`bool` **emission_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **emission_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` 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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_emission_energy_multiplier: -- :ref:`float` **emission_energy_multiplier** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------------------+ -| *Setter* | set_emission_energy_multiplier(value) | -+-----------+---------------------------------------+ -| *Getter* | get_emission_energy_multiplier() | -+-----------+---------------------------------------+ +:ref:`float` **emission_energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_energy_multiplier** **(** **)** Multiplier for emitted light. See :ref:`emission_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_emission_intensity: -- :ref:`float` **emission_intensity** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_emission_intensity(value) | -+----------+-------------------------------+ -| *Getter* | get_emission_intensity() | -+----------+-------------------------------+ +:ref:`float` **emission_intensity** + +.. rst-class:: classref-property-setget + +- void **set_emission_intensity** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_emission_on_uv2: -- :ref:`bool` **emission_on_uv2** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **emission_on_uv2** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| Use ``UV2`` to read from the :ref:`emission_texture`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_emission_operator: -- :ref:`EmissionOperator` **emission_operator** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_emission_operator(value) | -+-----------+------------------------------+ -| *Getter* | get_emission_operator() | -+-----------+------------------------------+ +:ref:`EmissionOperator` **emission_operator** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_operator** **(** :ref:`EmissionOperator` value **)** +- :ref:`EmissionOperator` **get_emission_operator** **(** **)** Sets how :ref:`emission` interacts with :ref:`emission_texture`. Can either add or multiply. See :ref:`EmissionOperator` for options. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_emission_texture: -- :ref:`Texture2D` **emission_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **emission_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture that specifies how much surface emits light at a given point. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_fixed_size: -- :ref:`bool` **fixed_size** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **fixed_size** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, the object is rendered at the same size regardless of distance. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_grow: -- :ref:`bool` **grow** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_grow_enabled(value) | -+-----------+-------------------------+ -| *Getter* | is_grow_enabled() | -+-----------+-------------------------+ +:ref:`bool` **grow** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_grow_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_grow_enabled** **(** **)** If ``true``, enables the vertex grow setting. See :ref:`grow_amount`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_grow_amount: -- :ref:`float` **grow_amount** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.0`` | -+-----------+-----------------+ -| *Setter* | set_grow(value) | -+-----------+-----------------+ -| *Getter* | get_grow() | -+-----------+-----------------+ +:ref:`float` **grow_amount** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_grow** **(** :ref:`float` value **)** +- :ref:`float` **get_grow** **(** **)** Grows object vertices in the direction of their normals. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_deep_parallax: -- :ref:`bool` **heightmap_deep_parallax** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------+ -| *Setter* | set_heightmap_deep_parallax(value) | -+-----------+--------------------------------------+ -| *Getter* | is_heightmap_deep_parallax_enabled() | -+-----------+--------------------------------------+ +:ref:`bool` **heightmap_deep_parallax** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_heightmap_deep_parallax** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_enabled: -- :ref:`bool` **heightmap_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **heightmap_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` 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. \ **Note:** Height mapping is not supported if triplanar mapping is used on the same material. The value of :ref:`heightmap_enabled` will be ignored if :ref:`uv1_triplanar` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_flip_binormal: -- :ref:`bool` **heightmap_flip_binormal** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_heightmap_deep_parallax_flip_binormal(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_heightmap_deep_parallax_flip_binormal() | -+-----------+--------------------------------------------------+ +:ref:`bool` **heightmap_flip_binormal** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_heightmap_deep_parallax_flip_binormal** **(** :ref:`bool` value **)** +- :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``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_flip_tangent: -- :ref:`bool` **heightmap_flip_tangent** +.. rst-class:: classref-property -+-----------+-------------------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------------------+ -| *Setter* | set_heightmap_deep_parallax_flip_tangent(value) | -+-----------+-------------------------------------------------+ -| *Getter* | get_heightmap_deep_parallax_flip_tangent() | -+-----------+-------------------------------------------------+ +:ref:`bool` **heightmap_flip_tangent** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_heightmap_deep_parallax_flip_tangent** **(** :ref:`bool` value **)** +- :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``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_flip_texture: -- :ref:`bool` **heightmap_flip_texture** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **heightmap_flip_texture** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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. This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case :ref:`heightmap_flip_texture` should remain ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_max_layers: -- :ref:`int` **heightmap_max_layers** +.. rst-class:: classref-property -+----------+-----------------------------------------------+ -| *Setter* | set_heightmap_deep_parallax_max_layers(value) | -+----------+-----------------------------------------------+ -| *Getter* | get_heightmap_deep_parallax_max_layers() | -+----------+-----------------------------------------------+ +:ref:`int` **heightmap_max_layers** + +.. rst-class:: classref-property-setget + +- void **set_heightmap_deep_parallax_max_layers** **(** :ref:`int` value **)** +- :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. \ **Note:** Only effective if :ref:`heightmap_deep_parallax` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_min_layers: -- :ref:`int` **heightmap_min_layers** +.. rst-class:: classref-property -+----------+-----------------------------------------------+ -| *Setter* | set_heightmap_deep_parallax_min_layers(value) | -+----------+-----------------------------------------------+ -| *Getter* | get_heightmap_deep_parallax_min_layers() | -+----------+-----------------------------------------------+ +:ref:`int` **heightmap_min_layers** + +.. rst-class:: classref-property-setget + +- void **set_heightmap_deep_parallax_min_layers** **(** :ref:`int` value **)** +- :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. \ **Note:** Only effective if :ref:`heightmap_deep_parallax` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_scale: -- :ref:`float` **heightmap_scale** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``5.0`` | -+-----------+----------------------------+ -| *Setter* | set_heightmap_scale(value) | -+-----------+----------------------------+ -| *Getter* | get_heightmap_scale() | -+-----------+----------------------------+ +:ref:`float` **heightmap_scale** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_heightmap_scale** **(** :ref:`float` value **)** +- :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. \ **Note:** If the height map effect looks strange regardless of this value, try adjusting :ref:`heightmap_flip_binormal` and :ref:`heightmap_flip_tangent`. See also :ref:`heightmap_texture` for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how :ref:`heightmap_scale` behaves. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_heightmap_texture: -- :ref:`Texture2D` **heightmap_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **heightmap_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| The texture to use as a height map. See also :ref:`heightmap_enabled`. @@ -1772,161 +2387,175 @@ For best results, the texture should be normalized (with :ref:`heightmap_scale` **metallic** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_metallic(value) | -+-----------+---------------------+ -| *Getter* | get_metallic() | -+-----------+---------------------+ +:ref:`float` **metallic** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_metallic** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_metallic_specular: -- :ref:`float` **metallic_specular** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.5`` | -+-----------+---------------------+ -| *Setter* | set_specular(value) | -+-----------+---------------------+ -| *Getter* | get_specular() | -+-----------+---------------------+ +:ref:`float` **metallic_specular** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_specular** **(** :ref:`float` value **)** +- :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. \ **Note:** Unlike :ref:`metallic`, this is not energy-conserving, so it should be left at ``0.5`` in most cases. See also :ref:`roughness`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_metallic_texture: -- :ref:`Texture2D` **metallic_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **metallic_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture used to specify metallic for an object. This is multiplied by :ref:`metallic`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_metallic_texture_channel: -- :ref:`TextureChannel` **metallic_texture_channel** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------------+ -| *Setter* | set_metallic_texture_channel(value) | -+-----------+-------------------------------------+ -| *Getter* | get_metallic_texture_channel() | -+-----------+-------------------------------------+ +:ref:`TextureChannel` **metallic_texture_channel** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_metallic_texture_channel** **(** :ref:`TextureChannel` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_msdf_outline_size: -- :ref:`float` **msdf_outline_size** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------+ -| *Setter* | set_msdf_outline_size(value) | -+-----------+------------------------------+ -| *Getter* | get_msdf_outline_size() | -+-----------+------------------------------+ +:ref:`float` **msdf_outline_size** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_msdf_outline_size** **(** :ref:`float` value **)** +- :ref:`float` **get_msdf_outline_size** **(** **)** The width of the shape outine. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_msdf_pixel_range: -- :ref:`float` **msdf_pixel_range** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``4.0`` | -+-----------+-----------------------------+ -| *Setter* | set_msdf_pixel_range(value) | -+-----------+-----------------------------+ -| *Getter* | get_msdf_pixel_range() | -+-----------+-----------------------------+ +:ref:`float` **msdf_pixel_range** = ``4.0`` + +.. rst-class:: classref-property-setget + +- void **set_msdf_pixel_range** **(** :ref:`float` value **)** +- :ref:`float` **get_msdf_pixel_range** **(** **)** The width of the range around the shape between the minimum and maximum representable signed distance. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_no_depth_test: -- :ref:`bool` **no_depth_test** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **no_depth_test** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, depth testing is disabled and the object will be drawn in render order. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_normal_enabled: -- :ref:`bool` **normal_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **normal_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| If ``true``, normal mapping is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_normal_scale: -- :ref:`float` **normal_scale** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_normal_scale(value) | -+-----------+-------------------------+ -| *Getter* | get_normal_scale() | -+-----------+-------------------------+ +:ref:`float` **normal_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_normal_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_normal_scale** **(** **)** The strength of the normal map's effect. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_normal_texture: -- :ref:`Texture2D` **normal_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **normal_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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`. @@ -1936,800 +2565,893 @@ Texture used to specify the normal at a given pixel. The :ref:`normal_texture` is ``true``, the :ref:`detail_albedo` texture is drawn *below* the :ref:`normal_texture`. To display a normal map *above* the :ref:`detail_albedo` texture, use :ref:`detail_normal` instead. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_orm_texture: -- :ref:`Texture2D` **orm_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **orm_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_particles_anim_h_frames: -- :ref:`int` **particles_anim_h_frames** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_particles_anim_h_frames(value) | -+----------+------------------------------------+ -| *Getter* | get_particles_anim_h_frames() | -+----------+------------------------------------+ +:ref:`int` **particles_anim_h_frames** + +.. rst-class:: classref-property-setget + +- void **set_particles_anim_h_frames** **(** :ref:`int` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_particles_anim_loop: -- :ref:`bool` **particles_anim_loop** +.. rst-class:: classref-property -+----------+--------------------------------+ -| *Setter* | set_particles_anim_loop(value) | -+----------+--------------------------------+ -| *Getter* | get_particles_anim_loop() | -+----------+--------------------------------+ +:ref:`bool` **particles_anim_loop** + +.. rst-class:: classref-property-setget + +- void **set_particles_anim_loop** **(** :ref:`bool` value **)** +- :ref:`bool` **get_particles_anim_loop** **(** **)** If ``true``, particle animations are looped. Only enabled when using :ref:`BILLBOARD_PARTICLES`. See :ref:`billboard_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_particles_anim_v_frames: -- :ref:`int` **particles_anim_v_frames** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_particles_anim_v_frames(value) | -+----------+------------------------------------+ -| *Getter* | get_particles_anim_v_frames() | -+----------+------------------------------------+ +:ref:`int` **particles_anim_v_frames** + +.. rst-class:: classref-property-setget + +- void **set_particles_anim_v_frames** **(** :ref:`int` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_point_size: -- :ref:`float` **point_size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_point_size(value) | -+-----------+-----------------------+ -| *Getter* | get_point_size() | -+-----------+-----------------------+ +:ref:`float` **point_size** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_point_size** **(** :ref:`float` value **)** +- :ref:`float` **get_point_size** **(** **)** The point size in pixels. See :ref:`use_point_size`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_proximity_fade_distance: -- :ref:`float` **proximity_fade_distance** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------------+ -| *Setter* | set_proximity_fade_distance(value) | -+-----------+------------------------------------+ -| *Getter* | get_proximity_fade_distance() | -+-----------+------------------------------------+ +:ref:`float` **proximity_fade_distance** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_proximity_fade_distance** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_proximity_fade_enabled: -- :ref:`bool` **proximity_fade_enabled** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_proximity_fade_enabled(value) | -+-----------+-----------------------------------+ -| *Getter* | is_proximity_fade_enabled() | -+-----------+-----------------------------------+ +:ref:`bool` **proximity_fade_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_proximity_fade_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_refraction_enabled: -- :ref:`bool` **refraction_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **refraction_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| If ``true``, the refraction effect is enabled. Distorts transparency based on light from behind the object. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_refraction_scale: -- :ref:`float` **refraction_scale** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.05`` | -+-----------+-----------------------+ -| *Setter* | set_refraction(value) | -+-----------+-----------------------+ -| *Getter* | get_refraction() | -+-----------+-----------------------+ +:ref:`float` **refraction_scale** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_refraction** **(** :ref:`float` value **)** +- :ref:`float` **get_refraction** **(** **)** The strength of the refraction effect. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_refraction_texture: -- :ref:`Texture2D` **refraction_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **refraction_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture that controls the strength of the refraction per-pixel. Multiplied by :ref:`refraction_scale`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_refraction_texture_channel: -- :ref:`TextureChannel` **refraction_texture_channel** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_refraction_texture_channel(value) | -+-----------+---------------------------------------+ -| *Getter* | get_refraction_texture_channel() | -+-----------+---------------------------------------+ +:ref:`TextureChannel` **refraction_texture_channel** = ``0`` -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. +.. rst-class:: classref-property-setget + +- void **set_refraction_texture_channel** **(** :ref:`TextureChannel` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_BaseMaterial3D_property_rim: -- :ref:`float` **rim** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``1.0`` | -+-----------+----------------+ -| *Setter* | set_rim(value) | -+-----------+----------------+ -| *Getter* | get_rim() | -+-----------+----------------+ +:ref:`float` **rim** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_rim** **(** :ref:`float` value **)** +- :ref:`float` **get_rim** **(** **)** Sets the strength of the rim lighting effect. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_rim_enabled: -- :ref:`bool` **rim_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **rim_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| If ``true``, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. \ **Note:** Rim lighting is not visible if the material's :ref:`shading_mode` is :ref:`SHADING_MODE_UNSHADED`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_rim_texture: -- :ref:`Texture2D` **rim_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **rim_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by :ref:`rim`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_rim_tint: -- :ref:`float` **rim_tint** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.5`` | -+-----------+---------------------+ -| *Setter* | set_rim_tint(value) | -+-----------+---------------------+ -| *Getter* | get_rim_tint() | -+-----------+---------------------+ +:ref:`float` **rim_tint** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_rim_tint** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_roughness: -- :ref:`float` **roughness** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_roughness(value) | -+-----------+----------------------+ -| *Getter* | get_roughness() | -+-----------+----------------------+ +:ref:`float` **roughness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_roughness** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_roughness_texture: -- :ref:`Texture2D` **roughness_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **roughness_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture used to control the roughness per-pixel. Multiplied by :ref:`roughness`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_roughness_texture_channel: -- :ref:`TextureChannel` **roughness_texture_channel** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------------+ -| *Setter* | set_roughness_texture_channel(value) | -+-----------+--------------------------------------+ -| *Getter* | get_roughness_texture_channel() | -+-----------+--------------------------------------+ +:ref:`TextureChannel` **roughness_texture_channel** = ``0`` -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. +.. rst-class:: classref-property-setget + +- void **set_roughness_texture_channel** **(** :ref:`TextureChannel` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_BaseMaterial3D_property_shading_mode: -- :ref:`ShadingMode` **shading_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_shading_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_shading_mode() | -+-----------+-------------------------+ +:ref:`ShadingMode` **shading_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_shading_mode** **(** :ref:`ShadingMode` value **)** +- :ref:`ShadingMode` **get_shading_mode** **(** **)** Sets whether the shading takes place per-pixel or per-vertex. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_shadow_to_opacity: -- :ref:`bool` **shadow_to_opacity** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **shadow_to_opacity** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_specular_mode: -- :ref:`SpecularMode` **specular_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_specular_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_specular_mode() | -+-----------+--------------------------+ +:ref:`SpecularMode` **specular_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_specular_mode** **(** :ref:`SpecularMode` value **)** +- :ref:`SpecularMode` **get_specular_mode** **(** **)** The method for rendering the specular blob. See :ref:`SpecularMode`. \ **Note:** :ref:`specular_mode` only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, :ref:`VoxelGI`, SDFGI or :ref:`ReflectionProbe`\ s. To disable reflections from these sources as well, set :ref:`metallic_specular` to ``0.0`` instead. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_enabled: -- :ref:`bool` **subsurf_scatter_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **subsurf_scatter_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| If ``true``, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_skin_mode: -- :ref:`bool` **subsurf_scatter_skin_mode** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **subsurf_scatter_skin_mode** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_strength: -- :ref:`float` **subsurf_scatter_strength** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------------------+ -| *Setter* | set_subsurface_scattering_strength(value) | -+-----------+-------------------------------------------+ -| *Getter* | get_subsurface_scattering_strength() | -+-----------+-------------------------------------------+ +:ref:`float` **subsurf_scatter_strength** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_subsurface_scattering_strength** **(** :ref:`float` value **)** +- :ref:`float` **get_subsurface_scattering_strength** **(** **)** The strength of the subsurface scattering effect. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_texture: -- :ref:`Texture2D` **subsurf_scatter_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **subsurf_scatter_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by :ref:`subsurf_scatter_strength`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_boost: -- :ref:`float` **subsurf_scatter_transmittance_boost** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_transmittance_boost(value) | -+-----------+--------------------------------+ -| *Getter* | get_transmittance_boost() | -+-----------+--------------------------------+ +:ref:`float` **subsurf_scatter_transmittance_boost** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_transmittance_boost** **(** :ref:`float` value **)** +- :ref:`float` **get_transmittance_boost** **(** **)** The intensity of the subsurface scattering transmittance effect. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_color: -- :ref:`Color` **subsurf_scatter_transmittance_color** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+--------------------------------+ -| *Setter* | set_transmittance_color(value) | -+-----------+--------------------------------+ -| *Getter* | get_transmittance_color() | -+-----------+--------------------------------+ +:ref:`Color` **subsurf_scatter_transmittance_color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_transmittance_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_transmittance_color** **(** **)** The color to multiply the subsurface scattering transmittance effect with. Ignored if :ref:`subsurf_scatter_skin_mode` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_depth: -- :ref:`float` **subsurf_scatter_transmittance_depth** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.1`` | -+-----------+--------------------------------+ -| *Setter* | set_transmittance_depth(value) | -+-----------+--------------------------------+ -| *Getter* | get_transmittance_depth() | -+-----------+--------------------------------+ +:ref:`float` **subsurf_scatter_transmittance_depth** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_transmittance_depth** **(** :ref:`float` value **)** +- :ref:`float` **get_transmittance_depth** **(** **)** The depth of the subsurface scattering transmittance effect. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_enabled: -- :ref:`bool` **subsurf_scatter_transmittance_enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_feature(value) | -+-----------+--------------------+ -| *Getter* | get_feature() | -+-----------+--------------------+ +:ref:`bool` **subsurf_scatter_transmittance_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| If ``true``, enables subsurface scattering transmittance. Only effective if :ref:`subsurf_scatter_enabled` is ``true``. See also :ref:`backlight_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_texture: -- :ref:`Texture2D` **subsurf_scatter_transmittance_texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **subsurf_scatter_transmittance_texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |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``. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_texture_filter: -- :ref:`TextureFilter` **texture_filter** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``3`` | -+-----------+---------------------------+ -| *Setter* | set_texture_filter(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_filter() | -+-----------+---------------------------+ +:ref:`TextureFilter` **texture_filter** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** +- :ref:`TextureFilter` **get_texture_filter** **(** **)** Filter flags for the texture. See :ref:`TextureFilter` for options. \ **Note:** :ref:`heightmap_texture` is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_texture_repeat: -- :ref:`bool` **texture_repeat** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``true`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **texture_repeat** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| Repeat flags for the texture. See :ref:`TextureFilter` for options. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_transparency: -- :ref:`Transparency` **transparency** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_transparency(value) | -+-----------+-------------------------+ -| *Getter* | get_transparency() | -+-----------+-------------------------+ +:ref:`Transparency` **transparency** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_transparency** **(** :ref:`Transparency` value **)** +- :ref:`Transparency` **get_transparency** **(** **)** If ``true``, transparency is enabled on the body. See also :ref:`blend_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_use_particle_trails: -- :ref:`bool` **use_particle_trails** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **use_particle_trails** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_use_point_size: -- :ref:`bool` **use_point_size** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **use_point_size** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, render point size can be changed. \ **Note:** This is only effective for objects whose geometry is point-based rather than triangle-based. See also :ref:`point_size`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv1_offset: -- :ref:`Vector3` **uv1_offset** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_uv1_offset(value) | -+-----------+-----------------------+ -| *Getter* | get_uv1_offset() | -+-----------+-----------------------+ +:ref:`Vector3` **uv1_offset** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_uv1_offset** **(** :ref:`Vector3` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv1_scale: -- :ref:`Vector3` **uv1_scale** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_uv1_scale(value) | -+-----------+----------------------+ -| *Getter* | get_uv1_scale() | -+-----------+----------------------+ +:ref:`Vector3` **uv1_scale** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_uv1_scale** **(** :ref:`Vector3` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv1_triplanar: -- :ref:`bool` **uv1_triplanar** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **uv1_triplanar** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv1_triplanar_sharpness: -- :ref:`float` **uv1_triplanar_sharpness** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_uv1_triplanar_blend_sharpness(value) | -+-----------+------------------------------------------+ -| *Getter* | get_uv1_triplanar_blend_sharpness() | -+-----------+------------------------------------------+ +:ref:`float` **uv1_triplanar_sharpness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_uv1_triplanar_blend_sharpness** **(** :ref:`float` value **)** +- :ref:`float` **get_uv1_triplanar_blend_sharpness** **(** **)** A lower number blends the texture more softly while a higher number blends the texture more sharply. \ **Note:** :ref:`uv1_triplanar_sharpness` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv1_world_triplanar: -- :ref:`bool` **uv1_world_triplanar** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **uv1_world_triplanar** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, triplanar mapping for ``UV`` is calculated in world space rather than object local space. See also :ref:`uv1_triplanar`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv2_offset: -- :ref:`Vector3` **uv2_offset** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_uv2_offset(value) | -+-----------+-----------------------+ -| *Getter* | get_uv2_offset() | -+-----------+-----------------------+ +:ref:`Vector3` **uv2_offset** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_uv2_offset** **(** :ref:`Vector3` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv2_scale: -- :ref:`Vector3` **uv2_scale** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_uv2_scale(value) | -+-----------+----------------------+ -| *Getter* | get_uv2_scale() | -+-----------+----------------------+ +:ref:`Vector3` **uv2_scale** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_uv2_scale** **(** :ref:`Vector3` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv2_triplanar: -- :ref:`bool` **uv2_triplanar** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **uv2_triplanar** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv2_triplanar_sharpness: -- :ref:`float` **uv2_triplanar_sharpness** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_uv2_triplanar_blend_sharpness(value) | -+-----------+------------------------------------------+ -| *Getter* | get_uv2_triplanar_blend_sharpness() | -+-----------+------------------------------------------+ +:ref:`float` **uv2_triplanar_sharpness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_uv2_triplanar_blend_sharpness** **(** :ref:`float` value **)** +- :ref:`float` **get_uv2_triplanar_blend_sharpness** **(** **)** A lower number blends the texture more softly while a higher number blends the texture more sharply. \ **Note:** :ref:`uv2_triplanar_sharpness` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_uv2_world_triplanar: -- :ref:`bool` **uv2_world_triplanar** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **uv2_world_triplanar** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, triplanar mapping for ``UV2`` is calculated in world space rather than object local space. See also :ref:`uv2_triplanar`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_vertex_color_is_srgb: -- :ref:`bool` **vertex_color_is_srgb** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **vertex_color_is_srgb** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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`. \ **Note:** Only effective when using the Vulkan Clustered or Vulkan Mobile backends. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_property_vertex_color_use_as_albedo: -- :ref:`bool` **vertex_color_use_as_albedo** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **vertex_color_use_as_albedo** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, the vertex color is used as albedo color. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_BaseMaterial3D_method_get_feature: -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| Returns ``true``, if the specified :ref:`Feature` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_method_get_flag: -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| Returns ``true``, if the specified flag is enabled. See :ref:`Flags` enumerator for options. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_method_get_texture: -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| Returns the :ref:`Texture2D` associated with the specified :ref:`TextureParam`. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_method_set_feature: -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +.. rst-class:: classref-method -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``. +void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** + +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``. + +.. rst-class:: classref-item-separator ---- .. _class_BaseMaterial3D_method_set_flag: -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_BaseMaterial3D_method_set_texture: -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** Sets the texture for the slot specified by ``param``. See :ref:`TextureParam` for available slots. diff --git a/classes/class_basis.rst b/classes/class_basis.rst index b79a5c526..b244793e0 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -12,6 +12,8 @@ Basis 3×3 matrix datatype. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ Can also be accessed as array of 3D vectors. These vectors are normally orthogon For more information, read the "Matrices and transforms" documentation article. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -40,386 +44,570 @@ Tutorials - `2.5D Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+----------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`x` | ``Vector3(1, 0, 0)`` | -+-------------------------------+----------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`y` | ``Vector3(0, 1, 0)`` | -+-------------------------------+----------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`z` | ``Vector3(0, 0, 1)`` | -+-------------------------------+----------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`x` | ``Vector3(1, 0, 0)`` | + +-------------------------------+----------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`y` | ``Vector3(0, 1, 0)`` | + +-------------------------------+----------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`z` | ``Vector3(0, 0, 1)`` | + +-------------------------------+----------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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) **)** |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| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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) **)** |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| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------+-----------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Basis_constant_IDENTITY: -.. _class_Basis_constant_FLIP_X: +.. rst-class:: classref-constant -.. _class_Basis_constant_FLIP_Y: +**IDENTITY** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` -.. _class_Basis_constant_FLIP_Z: - -- **IDENTITY** = **Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)** --- The identity basis, with no rotation or scaling applied. +The identity basis, with no rotation or scaling applied. This is identical to calling ``Basis()`` without any parameters. This constant can be used to make your code clearer, and for consistency with C#. -- **FLIP_X** = **Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)** --- The basis that will flip something along the X axis when used in a transformation. +.. _class_Basis_constant_FLIP_X: -- **FLIP_Y** = **Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)** --- The basis that will flip something along the Y axis when used in a transformation. +.. rst-class:: classref-constant -- **FLIP_Z** = **Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)** --- The basis that will flip something along the Z axis when used in a transformation. +**FLIP_X** = ``Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)`` + +The basis that will flip something along the X axis when used in a transformation. + +.. _class_Basis_constant_FLIP_Y: + +.. rst-class:: classref-constant + +**FLIP_Y** = ``Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)`` + +The basis that will flip something along the Y axis when used in a transformation. + +.. _class_Basis_constant_FLIP_Z: + +.. rst-class:: classref-constant + +**FLIP_Z** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)`` + +The basis that will flip something along the Z axis when used in a transformation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Basis_property_x: -- :ref:`Vector3` **x** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 0, 0)`` | -+-----------+----------------------+ +:ref:`Vector3` **x** = ``Vector3(1, 0, 0)`` The basis matrix's X vector (column 0). Equivalent to array index ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_property_y: -- :ref:`Vector3` **y** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 1, 0)`` | -+-----------+----------------------+ +:ref:`Vector3` **y** = ``Vector3(0, 1, 0)`` The basis matrix's Y vector (column 1). Equivalent to array index ``1``. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_property_z: -- :ref:`Vector3` **z** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 1)`` | -+-----------+----------------------+ +:ref:`Vector3` **z** = ``Vector3(0, 0, 1)`` The basis matrix's Z vector (column 2). Equivalent to array index ``2``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Basis_constructor_Basis: -- :ref:`Basis` **Basis** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Basis`` set to :ref:`IDENTITY`. +:ref:`Basis` **Basis** **(** **)** + +Constructs a default-initialized **Basis** set to :ref:`IDENTITY`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Basis` **Basis** **(** :ref:`Basis` from **)** +.. rst-class:: classref-constructor -Constructs a ``Basis`` as a copy of the given ``Basis``. +:ref:`Basis` **Basis** **(** :ref:`Basis` from **)** + +Constructs a **Basis** as a copy of the given **Basis**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Basis` **Basis** **(** :ref:`Vector3` axis, :ref:`float` angle **)** +.. rst-class:: classref-constructor + +:ref:`Basis` **Basis** **(** :ref:`Vector3` axis, :ref:`float` angle **)** Constructs a pure rotation basis matrix, rotated around the given ``axis`` by ``angle`` (in radians). The axis must be a normalized vector. +.. rst-class:: classref-item-separator + ---- -- :ref:`Basis` **Basis** **(** :ref:`Quaternion` from **)** +.. rst-class:: classref-constructor + +:ref:`Basis` **Basis** **(** :ref:`Quaternion` from **)** Constructs a pure rotation basis matrix from the given quaternion. +.. rst-class:: classref-item-separator + ---- -- :ref:`Basis` **Basis** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis **)** +.. rst-class:: classref-constructor + +:ref:`Basis` **Basis** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis **)** Constructs a basis matrix from 3 axis vectors (matrix columns). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Basis_method_determinant: -- :ref:`float` **determinant** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **determinant** **(** **)** |const| Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the 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. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_from_euler: -- :ref:`Basis` **from_euler** **(** :ref:`Vector3` euler, :ref:`int` order=2 **)** |static| +.. rst-class:: classref-method + +:ref:`Basis` **from_euler** **(** :ref:`Vector3` euler, :ref:`int` order=2 **)** |static| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_from_scale: -- :ref:`Basis` **from_scale** **(** :ref:`Vector3` scale **)** |static| +.. rst-class:: classref-method + +:ref:`Basis` **from_scale** **(** :ref:`Vector3` scale **)** |static| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_get_euler: -- :ref:`Vector3` **get_euler** **(** :ref:`int` order=2 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_euler** **(** :ref:`int` order=2 **)** |const| 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). Consider using the :ref:`get_rotation_quaternion` method instead, which returns a :ref:`Quaternion` quaternion instead of Euler angles. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_get_rotation_quaternion: -- :ref:`Quaternion` **get_rotation_quaternion** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **get_rotation_quaternion** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_get_scale: -- :ref:`Vector3` **get_scale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_scale** **(** **)** |const| Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_inverse: -- :ref:`Basis` **inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **inverse** **(** **)** |const| Returns the inverse of the matrix. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Basis` b **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Basis` b **)** |const| Returns ``true`` if this basis and ``b`` are approximately equal, by calling ``is_equal_approx`` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_looking_at: -- :ref:`Basis` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |static| +.. rst-class:: classref-method + +:ref:`Basis` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |static| Creates a 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. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_orthonormalized: -- :ref:`Basis` **orthonormalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **orthonormalized** **(** **)** |const| 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 + ---- .. _class_Basis_method_rotated: -- :ref:`Basis` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| Introduce an additional rotation around the given axis by ``angle`` (in radians). The axis must be a normalized vector. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_scaled: -- :ref:`Basis` **scaled** **(** :ref:`Vector3` scale **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **scaled** **(** :ref:`Vector3` scale **)** |const| Introduce an additional scaling specified by the given 3D scaling factor. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_slerp: -- :ref:`Basis` **slerp** **(** :ref:`Basis` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **slerp** **(** :ref:`Basis` to, :ref:`float` weight **)** |const| Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_tdotx: -- :ref:`float` **tdotx** **(** :ref:`Vector3` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **tdotx** **(** :ref:`Vector3` with **)** |const| Transposed dot product with the X axis of the matrix. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_tdoty: -- :ref:`float` **tdoty** **(** :ref:`Vector3` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **tdoty** **(** :ref:`Vector3` with **)** |const| Transposed dot product with the Y axis of the matrix. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_tdotz: -- :ref:`float` **tdotz** **(** :ref:`Vector3` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **tdotz** **(** :ref:`Vector3` with **)** |const| Transposed dot product with the Z axis of the matrix. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_method_transposed: -- :ref:`Basis` **transposed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **transposed** **(** **)** |const| Returns the transposed version of the matrix. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_Basis_operator_neq_bool: +.. _class_Basis_operator_neq_Basis: -- :ref:`bool` **operator !=** **(** :ref:`Basis` right **)** +.. rst-class:: classref-operator -Returns ``true`` if the ``Basis`` matrices are not equal. +:ref:`bool` **operator !=** **(** :ref:`Basis` right **)** + +Returns ``true`` if the **Basis** matrices are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- .. _class_Basis_operator_mul_Basis: -- :ref:`Basis` **operator *** **(** :ref:`Basis` right **)** +.. rst-class:: classref-operator + +:ref:`Basis` **operator *** **(** :ref:`Basis` right **)** 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). ----- - -- :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** - -Transforms (multiplies) the :ref:`Vector3` by the given ``Basis`` matrix. +.. rst-class:: classref-item-separator ---- -- :ref:`Basis` **operator *** **(** :ref:`float` right **)** +.. _class_Basis_operator_mul_Vector3: -This operator multiplies all components of the ``Basis``, which scales it uniformly. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** + +Transforms (multiplies) the :ref:`Vector3` by the given **Basis** matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`Basis` **operator *** **(** :ref:`int` right **)** +.. _class_Basis_operator_mul_float: -This operator multiplies all components of the ``Basis``, which scales it uniformly. +.. rst-class:: classref-operator + +:ref:`Basis` **operator *** **(** :ref:`float` right **)** + +This operator multiplies all components of the **Basis**, which scales it uniformly. + +.. rst-class:: classref-item-separator ---- -.. _class_Basis_operator_eq_bool: +.. _class_Basis_operator_mul_int: -- :ref:`bool` **operator ==** **(** :ref:`Basis` right **)** +.. rst-class:: classref-operator -Returns ``true`` if the ``Basis`` matrices are exactly equal. +:ref:`Basis` **operator *** **(** :ref:`int` right **)** + +This operator multiplies all components of the **Basis**, which scales it uniformly. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Basis_operator_eq_Basis: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Basis` right **)** + +Returns ``true`` if the **Basis** matrices are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- -.. _class_Basis_operator_idx_Vector3: +.. _class_Basis_operator_idx_int: -- :ref:`Vector3` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`Vector3` **operator []** **(** :ref:`int` index **)** 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``. diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index a6f0cf644..cb783059e 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -14,112 +14,159 @@ BitMap Boolean matrix. +.. rst-class:: classref-introduction-group + Description ----------- A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_BitMap_method_convert_to_image: -- :ref:`Image` **convert_to_image** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **convert_to_image** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_create: -- void **create** **(** :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **create** **(** :ref:`Vector2i` size **)** Creates a bitmap with the specified size, filled with ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_create_from_image_alpha: -- void **create_from_image_alpha** **(** :ref:`Image` image, :ref:`float` threshold=0.1 **)** +.. rst-class:: classref-method + +void **create_from_image_alpha** **(** :ref:`Image` image, :ref:`float` threshold=0.1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_get_bit: -- :ref:`bool` **get_bit** **(** :ref:`int` x, :ref:`int` y **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_bit** **(** :ref:`int` x, :ref:`int` y **)** |const| Returns bitmap's value at the specified position. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_get_bitv: -- :ref:`bool` **get_bitv** **(** :ref:`Vector2i` position **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_bitv** **(** :ref:`Vector2i` position **)** |const| Returns bitmap's value at the specified position. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_get_size: -- :ref:`Vector2i` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_size** **(** **)** |const| Returns bitmap's dimensions. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_get_true_bit_count: -- :ref:`int` **get_true_bit_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_true_bit_count** **(** **)** |const| Returns the number of bitmap elements that are set to ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_grow_mask: -- void **grow_mask** **(** :ref:`int` pixels, :ref:`Rect2i` rect **)** +.. rst-class:: classref-method + +void **grow_mask** **(** :ref:`int` pixels, :ref:`Rect2i` rect **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_opaque_to_polygons: -- :ref:`PackedVector2Array[]` **opaque_to_polygons** **(** :ref:`Rect2i` rect, :ref:`float` epsilon=2.0 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **opaque_to_polygons** **(** :ref:`Rect2i` rect, :ref:`float` epsilon=2.0 **)** |const| 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. @@ -131,35 +178,51 @@ To get polygons covering the whole bitmap, pass: \ ``epsilon`` is passed to RDP to control how accurately the polygons cover the bitmap: a lower ``epsilon`` corresponds to more points in the polygons. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_resize: -- void **resize** **(** :ref:`Vector2i` new_size **)** +.. rst-class:: classref-method + +void **resize** **(** :ref:`Vector2i` new_size **)** Resizes the image to ``new_size``. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_set_bit: -- void **set_bit** **(** :ref:`int` x, :ref:`int` y, :ref:`bool` bit **)** +.. rst-class:: classref-method + +void **set_bit** **(** :ref:`int` x, :ref:`int` y, :ref:`bool` bit **)** Sets the bitmap's element at the specified position, to the specified value. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_set_bit_rect: -- void **set_bit_rect** **(** :ref:`Rect2i` rect, :ref:`bool` bit **)** +.. rst-class:: classref-method + +void **set_bit_rect** **(** :ref:`Rect2i` rect, :ref:`bool` bit **)** Sets a rectangular portion of the bitmap to the specified value. +.. rst-class:: classref-item-separator + ---- .. _class_BitMap_method_set_bitv: -- void **set_bitv** **(** :ref:`Vector2i` position, :ref:`bool` bit **)** +.. rst-class:: classref-method + +void **set_bitv** **(** :ref:`Vector2i` position, :ref:`bool` bit **)** Sets the bitmap's element at the specified position, to the specified value. diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index 8ac9909e8..8e161dda6 100644 --- a/classes/class_bone2d.rst +++ b/classes/class_bone2d.rst @@ -14,6 +14,8 @@ Bone2D Joint used with :ref:`Skeleton2D` to control and animate other nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,147 +27,210 @@ Each bone has a :ref:`rest` transform that you can r If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+-----------------------------------------+-----------------------------------+ -| :ref:`Transform2D` | :ref:`rest` | ``Transform2D(0, 0, 0, 0, 0, 0)`` | -+---------------------------------------+-----------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`rest` | ``Transform2D(0, 0, 0, 0, 0, 0)`` | + +---------------------------------------+-----------------------------------------+-----------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_rest` **(** **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_autocalculate_length_and_angle` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_bone_angle` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_default_length` **(** **)** |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_default_length` **(** :ref:`float` default_length **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_length` **(** :ref:`float` length **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_rest` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_autocalculate_length_and_angle` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bone_angle` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_default_length` **(** **)** |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_default_length` **(** :ref:`float` default_length **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_length` **(** :ref:`float` length **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Bone2D_property_rest: -- :ref:`Transform2D` **rest** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``Transform2D(0, 0, 0, 0, 0, 0)`` | -+-----------+-----------------------------------+ -| *Setter* | set_rest(value) | -+-----------+-----------------------------------+ -| *Getter* | get_rest() | -+-----------+-----------------------------------+ +:ref:`Transform2D` **rest** = ``Transform2D(0, 0, 0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_rest** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_rest** **(** **)** Rest transform of the bone. You can reset the node's transforms to this value using :ref:`apply_rest`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Bone2D_method_apply_rest: -- void **apply_rest** **(** **)** +.. rst-class:: classref-method + +void **apply_rest** **(** **)** Stores the node's current transforms in :ref:`rest`. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_get_autocalculate_length_and_angle: -- :ref:`bool` **get_autocalculate_length_and_angle** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_autocalculate_length_and_angle** **(** **)** |const| Returns whether this ``Bone2D`` node 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. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_get_bone_angle: -- :ref:`float` **get_bone_angle** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_bone_angle** **(** **)** |const| Returns the angle of the bone in the ``Bone2D`` node. \ **Note:** This is different from the ``Bone2D``'s rotation. The bone angle is the rotation of the bone shown by the ``Bone2D`` gizmo, and because ``Bone2D`` bones are based on positions, this can vary from the actual rotation of the ``Bone2D`` node. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_get_default_length: -- :ref:`float` **get_default_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_default_length** **(** **)** |const| Deprecated. Please use ``get_length`` instead. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_get_index_in_skeleton: -- :ref:`int` **get_index_in_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_index_in_skeleton** **(** **)** |const| Returns the node's index as part of the entire skeleton. See :ref:`Skeleton2D`. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_get_length: -- :ref:`float` **get_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_length** **(** **)** |const| Returns the length of the bone in the ``Bone2D`` node. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_get_skeleton_rest: -- :ref:`Transform2D` **get_skeleton_rest** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_skeleton_rest** **(** **)** |const| Returns the node's :ref:`rest` ``Transform2D`` if it doesn't have a parent, or its rest pose relative to its parent. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_set_autocalculate_length_and_angle: -- void **set_autocalculate_length_and_angle** **(** :ref:`bool` auto_calculate **)** +.. rst-class:: classref-method + +void **set_autocalculate_length_and_angle** **(** :ref:`bool` auto_calculate **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_set_bone_angle: -- void **set_bone_angle** **(** :ref:`float` angle **)** +.. rst-class:: classref-method + +void **set_bone_angle** **(** :ref:`float` angle **)** Sets the bone angle for the ``Bone2D`` node. This is typically set to the rotation from the ``Bone2D`` node to a child ``Bone2D`` node. \ **Note:** This is different from the ``Bone2D``'s rotation. The bone angle is the rotation of the bone shown by the ``Bone2D`` gizmo, and because ``Bone2D`` bones are based on positions, this can vary from the actual rotation of the ``Bone2D`` node. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_set_default_length: -- void **set_default_length** **(** :ref:`float` default_length **)** +.. rst-class:: classref-method + +void **set_default_length** **(** :ref:`float` default_length **)** Deprecated. Please use ``set_length`` instead. +.. rst-class:: classref-item-separator + ---- .. _class_Bone2D_method_set_length: -- void **set_length** **(** :ref:`float` length **)** +.. rst-class:: classref-method + +void **set_length** **(** :ref:`float` length **)** Sets the length of the bone in the ``Bone2D`` node. diff --git a/classes/class_boneattachment3d.rst b/classes/class_boneattachment3d.rst index ce6fec882..24826d2c9 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -14,6 +14,8 @@ BoneAttachment3D A node that will attach to a bone. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,145 +23,201 @@ This node will allow you to select a bone for this node to attach to. The BoneAt The BoneAttachment3D node must either be a child of a :ref:`Skeleton3D` node or be given an external :ref:`Skeleton3D` to use in order to function properly. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`bone_idx` | ``-1`` | -+-----------------------------+-------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`bone_name` | ``""`` | -+-----------------------------+-------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`bone_idx` | ``-1`` | + +-----------------------------+-------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`bone_name` | ``""`` | + +-----------------------------+-------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_external_skeleton` **(** **)** |const| | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_override_mode` **(** **)** |const| | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_override_pose` **(** **)** |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_override_mode` **(** :ref:`int` override_mode **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_override_pose` **(** :ref:`bool` override_pose **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_external_skeleton` **(** :ref:`bool` use_external_skeleton **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_external_skeleton` **(** **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_override_mode` **(** **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_override_pose` **(** **)** |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_override_mode` **(** :ref:`int` override_mode **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_override_pose` **(** :ref:`bool` override_pose **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_external_skeleton` **(** :ref:`bool` use_external_skeleton **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BoneAttachment3D_property_bone_idx: -- :ref:`int` **bone_idx** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``-1`` | -+-----------+---------------------+ -| *Setter* | set_bone_idx(value) | -+-----------+---------------------+ -| *Getter* | get_bone_idx() | -+-----------+---------------------+ +:ref:`int` **bone_idx** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_bone_idx** **(** :ref:`int` value **)** +- :ref:`int` **get_bone_idx** **(** **)** The index of the attached bone. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_property_bone_name: -- :ref:`String` **bone_name** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``""`` | -+-----------+----------------------+ -| *Setter* | set_bone_name(value) | -+-----------+----------------------+ -| *Getter* | get_bone_name() | -+-----------+----------------------+ +:ref:`String` **bone_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_bone_name** **(** :ref:`String` value **)** +- :ref:`String` **get_bone_name** **(** **)** The name of the attached bone. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_BoneAttachment3D_method_get_external_skeleton: -- :ref:`NodePath` **get_external_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_external_skeleton** **(** **)** |const| Returns the :ref:`NodePath` to the external :ref:`Skeleton3D` node, if one has been set. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_get_override_mode: -- :ref:`int` **get_override_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_override_mode** **(** **)** |const| Deprecated. Local pose overrides will be removed. Returns the override mode for the BoneAttachment3D node (0=global / 1=local). +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_get_override_pose: -- :ref:`bool` **get_override_pose** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_override_pose** **(** **)** |const| Returns whether the BoneAttachment3D node is overriding the bone pose of the bone it's attached to. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_get_use_external_skeleton: -- :ref:`bool` **get_use_external_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_use_external_skeleton** **(** **)** |const| Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D` rather than attempting to use its parent node as the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_on_bone_pose_update: -- void **on_bone_pose_update** **(** :ref:`int` bone_index **)** +.. rst-class:: classref-method + +void **on_bone_pose_update** **(** :ref:`int` bone_index **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_set_external_skeleton: -- void **set_external_skeleton** **(** :ref:`NodePath` external_skeleton **)** +.. rst-class:: classref-method + +void **set_external_skeleton** **(** :ref:`NodePath` external_skeleton **)** Sets the :ref:`NodePath` to the external skeleton that the BoneAttachment3D node should use. The external :ref:`Skeleton3D` node is only used when ``use_external_skeleton`` is set to ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_set_override_mode: -- void **set_override_mode** **(** :ref:`int` override_mode **)** +.. rst-class:: classref-method + +void **set_override_mode** **(** :ref:`int` override_mode **)** Deprecated. Local pose overrides will be removed. Sets the override mode for the BoneAttachment3D node (0=global / 1=local). The override mode defines which of the bone poses the BoneAttachment3D node will override. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_set_override_pose: -- void **set_override_pose** **(** :ref:`bool` override_pose **)** +.. rst-class:: classref-method + +void **set_override_pose** **(** :ref:`bool` override_pose **)** Sets 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. +.. rst-class:: classref-item-separator + ---- .. _class_BoneAttachment3D_method_set_use_external_skeleton: -- void **set_use_external_skeleton** **(** :ref:`bool` use_external_skeleton **)** +.. rst-class:: classref-method + +void **set_use_external_skeleton** **(** :ref:`bool` use_external_skeleton **)** Sets whether the BoneAttachment3D node will use an extenral :ref:`Skeleton3D` node rather than attenpting 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 ``set_external_skeleton``. diff --git a/classes/class_bonemap.rst b/classes/class_bonemap.rst index 858a631fc..f5d6fa20a 100644 --- a/classes/class_bonemap.rst +++ b/classes/class_bonemap.rst @@ -14,6 +14,8 @@ BoneMap Bone map for retargeting. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,87 +23,134 @@ This class contains a hashmap that uses a list of bone names in :ref:`SkeletonPr By assigning the actual :ref:`Skeleton3D` bone name as the key value, it maps the :ref:`Skeleton3D` to the :ref:`SkeletonProfile`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Retargeting 3D Skeletons <../tutorials/assets_pipeline/retargeting_3d_skeletons>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+------------------------------------------------+ -| :ref:`SkeletonProfile` | :ref:`profile` | -+-----------------------------------------------+------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+------------------------------------------------+ + | :ref:`SkeletonProfile` | :ref:`profile` | + +-----------------------------------------------+------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :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 **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :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 **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_BoneMap_signal_bone_map_updated: -- **bone_map_updated** **(** **)** +.. rst-class:: classref-signal -This signal is emitted when change the key value in the ``BoneMap``. This is used to validate mapping and to update ``BoneMap`` editor. +**bone_map_updated** **(** **)** + +This signal is emitted when change the key value in the **BoneMap**. This is used to validate mapping and to update **BoneMap** editor. + +.. rst-class:: classref-item-separator ---- .. _class_BoneMap_signal_profile_updated: -- **profile_updated** **(** **)** +.. rst-class:: classref-signal -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. +**profile_updated** **(** **)** + +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. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BoneMap_property_profile: -- :ref:`SkeletonProfile` **profile** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_profile(value) | -+----------+--------------------+ -| *Getter* | get_profile() | -+----------+--------------------+ +:ref:`SkeletonProfile` **profile** -A :ref:`SkeletonProfile` of the mapping target. Key names in the ``BoneMap`` are synchronized with it. +.. rst-class:: classref-property-setget + +- void **set_profile** **(** :ref:`SkeletonProfile` value **)** +- :ref:`SkeletonProfile` **get_profile** **(** **)** + +A :ref:`SkeletonProfile` of the mapping target. Key names in the **BoneMap** are synchronized with it. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_BoneMap_method_find_profile_bone_name: -- :ref:`StringName` **find_profile_bone_name** **(** :ref:`StringName` skeleton_bone_name **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **find_profile_bone_name** **(** :ref:`StringName` skeleton_bone_name **)** |const| Returns a profile bone name having ``skeleton_bone_name``. If not found, an empty :ref:`StringName` will be returned. In the retargeting process, the returned bone name is the bone name of the target skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_BoneMap_method_get_skeleton_bone_name: -- :ref:`StringName` **get_skeleton_bone_name** **(** :ref:`StringName` profile_bone_name **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_skeleton_bone_name** **(** :ref:`StringName` profile_bone_name **)** |const| Returns a skeleton bone name is mapped to ``profile_bone_name``. In the retargeting process, the returned bone name is the bone name of the source skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_BoneMap_method_set_skeleton_bone_name: -- void **set_skeleton_bone_name** **(** :ref:`StringName` profile_bone_name, :ref:`StringName` skeleton_bone_name **)** +.. rst-class:: classref-method + +void **set_skeleton_bone_name** **(** :ref:`StringName` profile_bone_name, :ref:`StringName` skeleton_bone_name **)** Maps a skeleton bone name to ``profile_bone_name``. diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 5e07d7d79..d234198f1 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -12,6 +12,8 @@ bool Boolean built-in type. +.. rst-class:: classref-introduction-group + Description ----------- @@ -119,89 +121,139 @@ The following code will set ``can_shoot`` to ``false`` and start a timer. This w +.. rst-class:: classref-reftable-group + Constructors ------------ -+-------------------------+-------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------+-------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------+-------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------+--------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------+--------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_bool_constructor_bool: -- :ref:`bool` **bool** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``bool`` set to ``false``. +:ref:`bool` **bool** **(** **)** + +Constructs a default-initialized **bool** set to ``false``. + +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **bool** **(** :ref:`bool` from **)** +.. rst-class:: classref-constructor -Constructs a ``bool`` as a copy of the given ``bool``. +:ref:`bool` **bool** **(** :ref:`bool` from **)** + +Constructs a **bool** as a copy of the given **bool**. + +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **bool** **(** :ref:`float` from **)** +.. rst-class:: classref-constructor + +:ref:`bool` **bool** **(** :ref:`float` from **)** 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 floats. +.. rst-class:: classref-item-separator + ---- -- :ref:`bool` **bool** **(** :ref:`int` from **)** +.. rst-class:: classref-constructor + +:ref:`bool` **bool** **(** :ref:`int` from **)** Cast an :ref:`int` value to a boolean value, this method will return ``false`` if ``0`` is passed in, and ``true`` for all other ints. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- .. _class_bool_operator_neq_bool: -- :ref:`bool` **operator !=** **(** :ref:`bool` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`bool` right **)** Returns ``true`` if two bools are different, i.e. one is ``true`` and the other is ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_bool_operator_lt_bool: -- :ref:`bool` **operator <** **(** :ref:`bool` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <** **(** :ref:`bool` right **)** Returns ``true`` if the left operand is ``false`` and the right operand is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_bool_operator_eq_bool: -- :ref:`bool` **operator ==** **(** :ref:`bool` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`bool` right **)** Returns ``true`` if two bools are equal, i.e. both are ``true`` or both are ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_bool_operator_gt_bool: -- :ref:`bool` **operator >** **(** :ref:`bool` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator >** **(** :ref:`bool` right **)** Returns ``true`` if the left operand is ``true`` and the right operand is ``false``. diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 9fc59cb12..fad78d500 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -16,114 +16,171 @@ BoxContainer Base class for box containers. +.. rst-class:: classref-introduction-group + Description ----------- Arranges child :ref:`Control` nodes vertically or horizontally, and rearranges them automatically when their minimum size changes. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+---------------------------------------------------------+-----------+ -| :ref:`AlignmentMode` | :ref:`alignment` | ``0`` | -+-------------------------------------------------------+---------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`vertical` | ``false`` | -+-------------------------------------------------------+---------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+---------------------------------------------------------+-----------+ + | :ref:`AlignmentMode` | :ref:`alignment` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`vertical` | ``false`` | + +-------------------------------------------------------+---------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`add_spacer` **(** :ref:`bool` begin **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`add_spacer` **(** :ref:`bool` begin **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------+-----------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`separation` | ``4`` | -+-----------------------+-----------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`separation` | ``4`` | + +-----------------------+-----------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_BoxContainer_AlignmentMode: -.. _class_BoxContainer_constant_ALIGNMENT_BEGIN: - -.. _class_BoxContainer_constant_ALIGNMENT_CENTER: - -.. _class_BoxContainer_constant_ALIGNMENT_END: +.. rst-class:: classref-enumeration enum **AlignmentMode**: -- **ALIGNMENT_BEGIN** = **0** --- The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). +.. _class_BoxContainer_constant_ALIGNMENT_BEGIN: -- **ALIGNMENT_CENTER** = **1** --- The child controls will be centered in the container. +.. rst-class:: classref-enumeration-constant -- **ALIGNMENT_END** = **2** --- 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). +:ref:`AlignmentMode` **ALIGNMENT_BEGIN** = ``0`` + +The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). + +.. _class_BoxContainer_constant_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_CENTER** = ``1`` + +The child controls will be centered in the container. + +.. _class_BoxContainer_constant_ALIGNMENT_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_END** = ``2`` + +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-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BoxContainer_property_alignment: -- :ref:`AlignmentMode` **alignment** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_alignment(value) | -+-----------+----------------------+ -| *Getter* | get_alignment() | -+-----------+----------------------+ +:ref:`AlignmentMode` **alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_alignment** **(** :ref:`AlignmentMode` value **)** +- :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`). +.. rst-class:: classref-item-separator + ---- .. _class_BoxContainer_property_vertical: -- :ref:`bool` **vertical** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_vertical(value) | -+-----------+---------------------+ -| *Getter* | is_vertical() | -+-----------+---------------------+ +:ref:`bool` **vertical** = ``false`` -If ``true``, the ``BoxContainer`` will arrange its children vertically, rather than horizontally. +.. rst-class:: classref-property-setget + +- void **set_vertical** **(** :ref:`bool` value **)** +- :ref:`bool` **is_vertical** **(** **)** + +If ``true``, the **BoxContainer** will arrange its children vertically, rather than horizontally. Can't be changed when using :ref:`HBoxContainer` and :ref:`VBoxContainer`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_BoxContainer_method_add_spacer: -- :ref:`Control` **add_spacer** **(** :ref:`bool` begin **)** +.. rst-class:: classref-method + +:ref:`Control` **add_spacer** **(** :ref:`bool` begin **)** 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_BoxContainer_theme_constant_separation: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **separation** = ``4`` -The space between the ``BoxContainer``'s elements, in pixels. +The space between the **BoxContainer**'s elements, in pixels. .. |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.)` diff --git a/classes/class_boxmesh.rst b/classes/class_boxmesh.rst index 29d6a3ccf..56682e6b0 100644 --- a/classes/class_boxmesh.rst +++ b/classes/class_boxmesh.rst @@ -14,6 +14,8 @@ BoxMesh Generate an axis-aligned box :ref:`PrimitiveMesh`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,83 +23,96 @@ Generate an axis-aligned box :ref:`PrimitiveMesh`. The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to ``Vector3(3, 2, 1)``. -\ **Note:** When using a large textured ``BoxMesh`` (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase :ref:`subdivide_depth`, :ref:`subdivide_height` and :ref:`subdivide_width` until you no longer notice UV jittering. +\ **Note:** When using a large textured **BoxMesh** (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase :ref:`subdivide_depth`, :ref:`subdivide_height` and :ref:`subdivide_width` until you no longer notice UV jittering. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_depth` | ``0`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_height` | ``0`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_width` | ``0`` | -+-------------------------------+------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | + +-------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_depth` | ``0`` | + +-------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_height` | ``0`` | + +-------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_width` | ``0`` | + +-------------------------------+------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BoxMesh_property_size: -- :ref:`Vector3` **size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_size(value) | -+-----------+----------------------+ -| *Getter* | get_size() | -+-----------+----------------------+ +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_size** **(** **)** The box's width, height and depth. +.. rst-class:: classref-item-separator + ---- .. _class_BoxMesh_property_subdivide_depth: -- :ref:`int` **subdivide_depth** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_subdivide_depth(value) | -+-----------+----------------------------+ -| *Getter* | get_subdivide_depth() | -+-----------+----------------------------+ +:ref:`int` **subdivide_depth** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_depth** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_depth** **(** **)** Number of extra edge loops inserted along the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_BoxMesh_property_subdivide_height: -- :ref:`int` **subdivide_height** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_subdivide_height(value) | -+-----------+-----------------------------+ -| *Getter* | get_subdivide_height() | -+-----------+-----------------------------+ +:ref:`int` **subdivide_height** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_height** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_height** **(** **)** Number of extra edge loops inserted along the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_BoxMesh_property_subdivide_width: -- :ref:`int` **subdivide_width** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_subdivide_width(value) | -+-----------+----------------------------+ -| *Getter* | get_subdivide_width() | -+-----------+----------------------------+ +:ref:`int` **subdivide_width** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_width** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_width** **(** **)** Number of extra edge loops inserted along the X axis. diff --git a/classes/class_boxoccluder3d.rst b/classes/class_boxoccluder3d.rst index e403d701f..cb25784a4 100644 --- a/classes/class_boxoccluder3d.rst +++ b/classes/class_boxoccluder3d.rst @@ -14,34 +14,46 @@ BoxOccluder3D Cuboid shape for use with occlusion culling in :ref:`OccluderInstance3D`. +.. rst-class:: classref-introduction-group + Description ----------- -``BoxOccluder3D`` stores a cuboid shape that can be used by the engine's occlusion culling system. +**BoxOccluder3D** stores a cuboid shape that can be used by the engine's occlusion culling system. See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | -+-------------------------------+------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | + +-------------------------------+------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BoxOccluder3D_property_size: -- :ref:`Vector3` **size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_size(value) | -+-----------+----------------------+ -| *Getter* | get_size() | -+-----------+----------------------+ +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_size** **(** **)** The box's size in 3D units. diff --git a/classes/class_boxshape3d.rst b/classes/class_boxshape3d.rst index 11deee21d..82884ba67 100644 --- a/classes/class_boxshape3d.rst +++ b/classes/class_boxshape3d.rst @@ -14,12 +14,16 @@ BoxShape3D Box shape resource for 3D collisions. +.. rst-class:: classref-introduction-group + Description ----------- 3D box shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. -\ **Performance:** Being a primitive collision shape, ``BoxShape3D`` is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). +\ **Performance:** Being a primitive collision shape, **BoxShape3D** is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -30,27 +34,37 @@ Tutorials - `3D Platformer Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+---------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | -+-------------------------------+---------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | + +-------------------------------+---------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BoxShape3D_property_size: -- :ref:`Vector3` **size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_size(value) | -+-----------+----------------------+ -| *Getter* | get_size() | -+-----------+----------------------+ +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_size** **(** **)** The box's width, height and depth. diff --git a/classes/class_button.rst b/classes/class_button.rst index 57052223a..a815c774e 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -16,6 +16,8 @@ Button Standard themed Button. +.. rst-class:: classref-introduction-group + Description ----------- @@ -60,6 +62,8 @@ See also :ref:`BaseButton` which contains common properties an \ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions, as :ref:`TouchScreenButton` supports multitouch. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -67,477 +71,535 @@ Tutorials - `OS Test Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`HorizontalAlignment` | :ref:`alignment` | ``1`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`clip_text` | ``false`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`expand_icon` | ``false`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`flat` | ``false`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`icon` | | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`HorizontalAlignment` | :ref:`icon_alignment` | ``0`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`HorizontalAlignment` | :ref:`alignment` | ``1`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`clip_text` | ``false`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`expand_icon` | ``false`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`flat` | ``false`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`icon` | | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`HorizontalAlignment` | :ref:`icon_alignment` | ``0`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :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:`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` | | -+---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ +.. 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:`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` | | + +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Button_property_alignment: -- :ref:`HorizontalAlignment` **alignment** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_text_alignment(value) | -+-----------+---------------------------+ -| *Getter* | get_text_alignment() | -+-----------+---------------------------+ +:ref:`HorizontalAlignment` **alignment** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_text_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`HorizontalAlignment` **get_text_alignment** **(** **)** Text alignment policy for the button's text, use one of the :ref:`HorizontalAlignment` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_clip_text: -- :ref:`bool` **clip_text** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_clip_text(value) | -+-----------+----------------------+ -| *Getter* | get_clip_text() | -+-----------+----------------------+ +:ref:`bool` **clip_text** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_clip_text** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_expand_icon: -- :ref:`bool` **expand_icon** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_expand_icon(value) | -+-----------+------------------------+ -| *Getter* | is_expand_icon() | -+-----------+------------------------+ +:ref:`bool` **expand_icon** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_expand_icon** **(** :ref:`bool` value **)** +- :ref:`bool` **is_expand_icon** **(** **)** When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_flat: -- :ref:`bool` **flat** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flat(value) | -+-----------+-----------------+ -| *Getter* | is_flat() | -+-----------+-----------------+ +:ref:`bool` **flat** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flat** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flat** **(** **)** Flat buttons don't display decoration. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_icon: -- :ref:`Texture2D` **icon** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_button_icon(value) | -+----------+------------------------+ -| *Getter* | get_button_icon() | -+----------+------------------------+ +:ref:`Texture2D` **icon** + +.. rst-class:: classref-property-setget + +- void **set_button_icon** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_button_icon** **(** **)** Button's icon, if text is present the icon will be placed before the text. To edit margin and spacing of the icon, use :ref:`h_separation` theme property and ``content_margin_*`` properties of the used :ref:`StyleBox`\ es. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_icon_alignment: -- :ref:`HorizontalAlignment` **icon_alignment** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_icon_alignment(value) | -+-----------+---------------------------+ -| *Getter* | get_icon_alignment() | -+-----------+---------------------------+ +:ref:`HorizontalAlignment` **icon_alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_icon_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`HorizontalAlignment` **get_icon_alignment** **(** **)** Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same :ref:`HorizontalAlignment` constants as the text alignment. If centered, text will draw on top of the icon. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_Button_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** The button's text that will be displayed inside the button's area. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_Button_property_text_overrun_behavior: -- :ref:`OverrunBehavior` **text_overrun_behavior** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_text_overrun_behavior(value) | -+-----------+----------------------------------+ -| *Getter* | get_text_overrun_behavior() | -+-----------+----------------------------------+ +:ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_Button_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` -Default text :ref:`Color` of the ``Button``. +Default text :ref:`Color` of the **Button**. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` -Text :ref:`Color` used when the ``Button`` is disabled. +Text :ref:`Color` used when the **Button** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` -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. +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. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_hover_color: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Text :ref:`Color` used when the ``Button`` is being hovered. +Text :ref:`Color` used when the **Button** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_hover_pressed_color: -- :ref:`Color` **font_hover_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` used when the ``Button`` is being hovered and pressed. +Text :ref:`Color` used when the **Button** is being hovered and pressed. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``Button``. +The tint of text outline of the **Button**. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` used when the ``Button`` is being pressed. +Text :ref:`Color` used when the **Button** is being pressed. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_disabled_color: -- :ref:`Color` **icon_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------+ -| *Default* | ``Color(1, 1, 1, 0.4)`` | -+-----------+-------------------------+ +:ref:`Color` **icon_disabled_color** = ``Color(1, 1, 1, 0.4)`` -Icon modulate :ref:`Color` used when the ``Button`` is disabled. +Icon modulate :ref:`Color` used when the **Button** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_focus_color: -- :ref:`Color` **icon_focus_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **icon_focus_color** = ``Color(1, 1, 1, 1)`` -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. +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. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_hover_color: -- :ref:`Color` **icon_hover_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **icon_hover_color** = ``Color(1, 1, 1, 1)`` -Icon modulate :ref:`Color` used when the ``Button`` is being hovered. +Icon modulate :ref:`Color` used when the **Button** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_hover_pressed_color: -- :ref:`Color` **icon_hover_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **icon_hover_pressed_color** = ``Color(1, 1, 1, 1)`` -Icon modulate :ref:`Color` used when the ``Button`` is being hovered and pressed. +Icon modulate :ref:`Color` used when the **Button** is being hovered and pressed. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_normal_color: -- :ref:`Color` **icon_normal_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **icon_normal_color** = ``Color(1, 1, 1, 1)`` -Default icon modulate :ref:`Color` of the ``Button``. +Default icon modulate :ref:`Color` of the **Button**. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_color_icon_pressed_color: -- :ref:`Color` **icon_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **icon_pressed_color** = ``Color(1, 1, 1, 1)`` -Icon modulate :ref:`Color` used when the ``Button`` is being pressed. +Icon modulate :ref:`Color` used when the **Button** is being pressed. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``2`` -The horizontal space between ``Button``'s icon and text. Negative values will be treated as ``0`` when used. +The horizontal space between **Button**'s icon and text. Negative values will be treated as ``0`` when used. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_Button_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -:ref:`Font` of the ``Button``'s text. +:ref:`Font` **font** + +:ref:`Font` of the **Button**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``Button``'s text. +:ref:`int` **font_size** + +Font size of the **Button**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_disabled: -- :ref:`StyleBox` **disabled** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``Button`` is disabled. +:ref:`StyleBox` **disabled** + +:ref:`StyleBox` used when the **Button** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -: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` **focus** + +: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. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_hover: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``Button`` is being hovered. +:ref:`StyleBox` **hover** + +:ref:`StyleBox` used when the **Button** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -Default :ref:`StyleBox` for the ``Button``. +:ref:`StyleBox` **normal** + +Default :ref:`StyleBox` for the **Button**. + +.. rst-class:: classref-item-separator ---- .. _class_Button_theme_style_pressed: -- :ref:`StyleBox` **pressed** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``Button`` is being pressed. +:ref:`StyleBox` **pressed** + +:ref:`StyleBox` used when the **Button** 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.)` diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index 4234eda9e..b8f598ee3 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -14,6 +14,8 @@ ButtonGroup Group of Buttons. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,45 +23,75 @@ Group of :ref:`Button`. All direct and indirect children buttons b \ :ref:`BaseButton.toggle_mode` should be ``true``. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-------------------------+---------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | -+-------------------------+-------------------------+---------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | + +-------------------------+-------------------------+---------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`BaseButton[]` | :ref:`get_buttons` **(** **)** | -+---------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`BaseButton` | :ref:`get_pressed_button` **(** **)** | -+---------------------------------------+------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`BaseButton[]` | :ref:`get_buttons` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`BaseButton` | :ref:`get_pressed_button` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ButtonGroup_signal_pressed: -- **pressed** **(** :ref:`BaseButton` button **)** +.. rst-class:: classref-signal + +**pressed** **(** :ref:`BaseButton` button **)** Emitted when one of the buttons of the group is pressed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ButtonGroup_method_get_buttons: -- :ref:`BaseButton[]` **get_buttons** **(** **)** +.. rst-class:: classref-method -Returns an :ref:`Array` of :ref:`Button`\ s who have this as their ``ButtonGroup`` (see :ref:`BaseButton.button_group`). +:ref:`BaseButton[]` **get_buttons** **(** **)** + +Returns an :ref:`Array` of :ref:`Button`\ s who have this as their **ButtonGroup** (see :ref:`BaseButton.button_group`). + +.. rst-class:: classref-item-separator ---- .. _class_ButtonGroup_method_get_pressed_button: -- :ref:`BaseButton` **get_pressed_button** **(** **)** +.. rst-class:: classref-method + +:ref:`BaseButton` **get_pressed_button** **(** **)** Returns the current pressed button. diff --git a/classes/class_callable.rst b/classes/class_callable.rst index f1ef88dfb..b374080d6 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -10,12 +10,14 @@ Callable ======== -An object representing a method in a certain object that can be called. +Built-in type representing a method in an object instance or a standalone function. + +.. rst-class:: classref-introduction-group Description ----------- -``Callable`` is a first class object which can be held in variables and passed to functions. It represents a given method in an :ref:`Object`, and is typically 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 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. \ **Example:**\ @@ -50,226 +52,347 @@ Description +In GDScript, it's possible to create lambda functions within a method. Lambda functions are custom callables that are not associated with an :ref:`Object` instance. Optionally, lambda functions can also be named. The name will be displayed in the debugger, or when calling :ref:`get_method`. + +:: + + func _init(): + var my_lambda = func (message): + print(message) + + # Prints Hello everyone! + my_lambda.call("Hello everyone!") + + # Prints "Attack!", when the button_pressed signal is emitted. + button_pressed.connect(func(): print("Attack!")) + +.. rst-class:: classref-reftable-group + Constructors ------------ -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Callable` | :ref:`Callable` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Callable` | :ref:`Callable` **(** :ref:`Callable` from **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Callable` | :ref:`Callable` **(** :ref:`Object` object, :ref:`StringName` method **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`Callable` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`Callable` **(** :ref:`Callable` from **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`Callable` **(** :ref:`Object` object, :ref:`StringName` method **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Callable` | :ref:`bind` **(** ... **)** |vararg| |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call` **(** ... **)** |vararg| |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_deferred` **(** ... **)** |vararg| |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`callv` **(** :ref:`Array` arguments **)** |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| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`bind` **(** ... **)** |vararg| |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call` **(** ... **)** |vararg| |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | void | :ref:`call_deferred` **(** ... **)** |vararg| |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`callv` **(** :ref:`Array` arguments **)** |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| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Callable` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Callable` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Callable` right **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Callable` right **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_Callable_constructor_Callable: -- :ref:`Callable` **Callable** **(** **)** +.. rst-class:: classref-constructor -Constructs a null ``Callable`` with no object nor method bound. +:ref:`Callable` **Callable** **(** **)** + +Constructs an empty **Callable**, with no object nor method bound. + +.. rst-class:: classref-item-separator ---- -- :ref:`Callable` **Callable** **(** :ref:`Callable` from **)** +.. rst-class:: classref-constructor -Constructs a ``Callable`` as a copy of the given ``Callable``. +:ref:`Callable` **Callable** **(** :ref:`Callable` from **)** + +Constructs a **Callable** as a copy of the given **Callable**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Callable` **Callable** **(** :ref:`Object` object, :ref:`StringName` method **)** +.. rst-class:: classref-constructor -Creates a new ``Callable`` for the method called ``method`` in the specified ``object``. +:ref:`Callable` **Callable** **(** :ref:`Object` object, :ref:`StringName` method **)** + +Creates a new **Callable** for the method named ``method`` in the specified ``object``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Callable_method_bind: -- :ref:`Callable` **bind** **(** ... **)** |vararg| |const| +.. rst-class:: classref-method -Returns a copy of this ``Callable`` with the arguments bound. Bound arguments are passed after the arguments supplied by :ref:`call`. +:ref:`Callable` **bind** **(** ... **)** |vararg| |const| + +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`. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_call: -- :ref:`Variant` **call** **(** ... **)** |vararg| |const| +.. rst-class:: classref-method -Calls the method represented by this ``Callable``. Arguments can be passed and should match the method's signature. +:ref:`Variant` **call** **(** ... **)** |vararg| |const| + +Calls the method represented by this **Callable**. Arguments can be passed and should match the method's signature. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_call_deferred: -- void **call_deferred** **(** ... **)** |vararg| |const| +.. rst-class:: classref-method -Calls the method represented by this ``Callable`` in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature. +void **call_deferred** **(** ... **)** |vararg| |const| + +Calls the method represented by this **Callable** in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature. :: func _ready(): grab_focus.call_deferred() +.. rst-class:: classref-item-separator + ---- .. _class_Callable_method_callv: -- :ref:`Variant` **callv** **(** :ref:`Array` arguments **)** |const| +.. rst-class:: classref-method -Calls the method represented by this ``Callable``. Contrary to :ref:`call`, this method does not take a variable number of arguments but expects all arguments to be passed via a single :ref:`Array`. +:ref:`Variant` **callv** **(** :ref:`Array` arguments **)** |const| + +Calls the method represented by this **Callable**. Unlike :ref:`call`, this method expects all arguments to be contained inside the ``arguments`` :ref:`Array`. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_get_method: -- :ref:`StringName` **get_method** **(** **)** |const| +.. rst-class:: classref-method -Returns the name of the method represented by this ``Callable``. +:ref:`StringName` **get_method** **(** **)** |const| + +Returns the name of the method represented by this **Callable**. If the callable is a lambda function, returns the function's name. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_get_object: -- :ref:`Object` **get_object** **(** **)** |const| +.. rst-class:: classref-method -Returns the object on which this ``Callable`` is called. +:ref:`Object` **get_object** **(** **)** |const| + +Returns the object on which this **Callable** is called. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_get_object_id: -- :ref:`int` **get_object_id** **(** **)** |const| +.. rst-class:: classref-method -Returns the ID of this ``Callable``'s object (see :ref:`Object.get_instance_id`). +:ref:`int` **get_object_id** **(** **)** |const| + +Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id`). + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_hash: -- :ref:`int` **hash** **(** **)** |const| +.. rst-class:: classref-method -Returns the 32-bit hash value of this ``Callable``'s object. +:ref:`int` **hash** **(** **)** |const| -\ **Note:** ``Callable``\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the callables are equal, because different callables can have identical hash values due to hash collisions. The engine uses a 32-bit hash algorithm for :ref:`hash`. +Returns the 32-bit hash value of this **Callable**'s object. + +\ **Note:** **Callable**\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the callables are equal, because different callables can have identical hash values due to hash collisions. The engine uses a 32-bit hash algorithm for :ref:`hash`. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_is_custom: -- :ref:`bool` **is_custom** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Callable`` is a custom callable whose behavior differs based on implementation details. Custom callables are used in the engine for various reasons. If ``true``, you can't use :ref:`get_method`. +:ref:`bool` **is_custom** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_is_null: -- :ref:`bool` **is_null** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Callable`` has no target to call the method on. +:ref:`bool` **is_null** **(** **)** |const| + +Returns ``true`` if this **Callable** has no target to call the method on. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_is_standard: -- :ref:`bool` **is_standard** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Callable`` is a standard callable, referencing an object and a method using a :ref:`StringName`. +:ref:`bool` **is_standard** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_is_valid: -- :ref:`bool` **is_valid** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the object exists and has a valid function assigned, or is a custom callable. +:ref:`bool` **is_valid** **(** **)** |const| + +Returns ``true`` if the callable's object exists and has a valid method name assigned, or is a custom callable. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_rpc: -- void **rpc** **(** ... **)** |vararg| |const| +.. rst-class:: classref-method -Perform an RPC (Remote Procedure Call). This is used for multiplayer and is normally not available unless the function being called has been marked as *RPC*. Calling it on unsupported functions will result in an error. +void **rpc** **(** ... **)** |vararg| |const| + +Perform an RPC (Remote Procedure Call). This is used for multiplayer and is normally not available, unless the function being called has been marked as *RPC*. Calling this method on unsupported functions will result in an error. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_rpc_id: -- void **rpc_id** **(** :ref:`int` peer_id, ... **)** |vararg| |const| +.. rst-class:: classref-method -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*. Calling it on unsupported functions will result in an error. +void **rpc_id** **(** :ref:`int` peer_id, ... **)** |vararg| |const| + +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*. Calling this method on unsupported functions will result in an error. + +.. rst-class:: classref-item-separator ---- .. _class_Callable_method_unbind: -- :ref:`Callable` **unbind** **(** :ref:`int` argcount **)** |const| +.. rst-class:: classref-method -Returns a copy of this ``Callable`` with the arguments unbound. Calling the returned ``Callable`` will call the method without the extra arguments that are supplied in the ``Callable`` on which you are calling this method. +:ref:`Callable` **unbind** **(** :ref:`int` argcount **)** |const| + +Returns a copy of this **Callable** with the arguments unbound, as defined by ``argcount``. Calling the returned **Callable** will call the method without the extra arguments that are supplied in the **Callable** on which you are calling this method. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Callable_operator_neq_bool: +.. _class_Callable_operator_neq_Callable: -- :ref:`bool` **operator !=** **(** :ref:`Callable` right **)** +.. rst-class:: classref-operator -Returns ``true`` if both ``Callable``\ s invoke different targets. +:ref:`bool` **operator !=** **(** :ref:`Callable` right **)** + +Returns ``true`` if both **Callable**\ s invoke different targets. + +.. rst-class:: classref-item-separator ---- -.. _class_Callable_operator_eq_bool: +.. _class_Callable_operator_eq_Callable: -- :ref:`bool` **operator ==** **(** :ref:`Callable` right **)** +.. rst-class:: classref-operator -Returns ``true`` if both ``Callable``\ s invoke the same custom target. +:ref:`bool` **operator ==** **(** :ref:`Callable` right **)** + +Returns ``true`` if both **Callable**\ s invoke the same custom target. .. |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.)` diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index c29532308..9b957aeaa 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -14,26 +14,41 @@ CallbackTweener Calls the specified method after optional delay. +.. rst-class:: classref-introduction-group + Description ----------- -``CallbackTweener`` is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback` for more usage information. +**CallbackTweener** is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback` for more usage information. -\ **Note:** :ref:`Tween.tween_callback` is the only correct way to create ``CallbackTweener``. Any ``CallbackTweener`` created manually will not function correctly. +\ **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 Methods ------- -+-----------------------------------------------+------------------------------------------------------------------------------------------------------+ -| :ref:`CallbackTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+------------------------------------------------------------------------------------------------------+ + | :ref:`CallbackTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CallbackTweener_method_set_delay: -- :ref:`CallbackTweener` **set_delay** **(** :ref:`float` delay **)** +.. rst-class:: classref-method + +:ref:`CallbackTweener` **set_delay** **(** :ref:`float` delay **)** Makes the callback call delayed by given time in seconds. diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 871e9a843..ea2bd9bcb 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -14,6 +14,8 @@ Camera2D Camera node for 2D scenes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,7 +25,9 @@ Cameras register themselves in the nearest :ref:`Viewport` node This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from :ref:`Node2D` and change the transform of the canvas by setting :ref:`Viewport.canvas_transform` in :ref:`Viewport` (you can obtain the current :ref:`Viewport` by using :ref:`Node.get_viewport`). -Note that the ``Camera2D`` node's ``position`` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position` to get the real position. +Note that the **Camera2D** node's ``position`` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position` to get the real position. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -34,421 +38,484 @@ Tutorials - `2D HDR Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`AnchorMode` | :ref:`anchor_mode` | ``1`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`current` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`Node` | :ref:`custom_viewport` | | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`drag_bottom_margin` | ``0.2`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`drag_horizontal_enabled` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`drag_horizontal_offset` | ``0.0`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`drag_left_margin` | ``0.2`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`drag_right_margin` | ``0.2`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`drag_top_margin` | ``0.2`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`drag_vertical_enabled` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`drag_vertical_offset` | ``0.0`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`editor_draw_drag_margin` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`editor_draw_limits` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`editor_draw_screen` | ``true`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`ignore_rotation` | ``true`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`limit_bottom` | ``10000000`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`limit_left` | ``-10000000`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`limit_right` | ``10000000`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`limit_smoothed` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`limit_top` | ``-10000000`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`position_smoothing_enabled` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`position_smoothing_speed` | ``5.0`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`Camera2DProcessCallback` | :ref:`process_callback` | ``1`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`rotation_smoothing_enabled` | ``false`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`rotation_smoothing_speed` | ``5.0`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`zoom` | ``Vector2(1, 1)`` | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`AnchorMode` | :ref:`anchor_mode` | ``1`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`current` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`Node` | :ref:`custom_viewport` | | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`drag_bottom_margin` | ``0.2`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`drag_horizontal_enabled` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`drag_horizontal_offset` | ``0.0`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`drag_left_margin` | ``0.2`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`drag_right_margin` | ``0.2`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`drag_top_margin` | ``0.2`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`drag_vertical_enabled` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`drag_vertical_offset` | ``0.0`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`editor_draw_drag_margin` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`editor_draw_limits` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`editor_draw_screen` | ``true`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`ignore_rotation` | ``true`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`limit_bottom` | ``10000000`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`limit_left` | ``-10000000`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`limit_right` | ``10000000`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`limit_smoothed` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`limit_top` | ``-10000000`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`position_smoothing_enabled` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`position_smoothing_speed` | ``5.0`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`Camera2DProcessCallback` | :ref:`process_callback` | ``1`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`rotation_smoothing_enabled` | ``false`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`rotation_smoothing_speed` | ``5.0`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`zoom` | ``Vector2(1, 1)`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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| | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Camera2D_AnchorMode: -.. _class_Camera2D_constant_ANCHOR_MODE_FIXED_TOP_LEFT: - -.. _class_Camera2D_constant_ANCHOR_MODE_DRAG_CENTER: +.. rst-class:: classref-enumeration enum **AnchorMode**: -- **ANCHOR_MODE_FIXED_TOP_LEFT** = **0** --- The camera's position is fixed so that the top-left corner is always at the origin. +.. _class_Camera2D_constant_ANCHOR_MODE_FIXED_TOP_LEFT: -- **ANCHOR_MODE_DRAG_CENTER** = **1** --- The camera's position takes into account vertical/horizontal offsets and the screen size. +.. rst-class:: classref-enumeration-constant + +:ref:`AnchorMode` **ANCHOR_MODE_FIXED_TOP_LEFT** = ``0`` + +The camera's position is fixed so that the top-left corner is always at the origin. + +.. _class_Camera2D_constant_ANCHOR_MODE_DRAG_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnchorMode` **ANCHOR_MODE_DRAG_CENTER** = ``1`` + +The camera's position takes into account vertical/horizontal offsets and the screen size. + +.. rst-class:: classref-item-separator ---- .. _enum_Camera2D_Camera2DProcessCallback: -.. _class_Camera2D_constant_CAMERA2D_PROCESS_PHYSICS: - -.. _class_Camera2D_constant_CAMERA2D_PROCESS_IDLE: +.. rst-class:: classref-enumeration enum **Camera2DProcessCallback**: -- **CAMERA2D_PROCESS_PHYSICS** = **0** --- The camera updates with the ``_physics_process`` callback. +.. _class_Camera2D_constant_CAMERA2D_PROCESS_PHYSICS: -- **CAMERA2D_PROCESS_IDLE** = **1** --- The camera updates with the ``_process`` callback. +.. rst-class:: classref-enumeration-constant + +:ref:`Camera2DProcessCallback` **CAMERA2D_PROCESS_PHYSICS** = ``0`` + +The camera updates with the ``_physics_process`` callback. + +.. _class_Camera2D_constant_CAMERA2D_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Camera2DProcessCallback` **CAMERA2D_PROCESS_IDLE** = ``1`` + +The camera updates with the ``_process`` callback. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Camera2D_property_anchor_mode: -- :ref:`AnchorMode` **anchor_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_anchor_mode(value) | -+-----------+------------------------+ -| *Getter* | get_anchor_mode() | -+-----------+------------------------+ +:ref:`AnchorMode` **anchor_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_anchor_mode** **(** :ref:`AnchorMode` value **)** +- :ref:`AnchorMode` **get_anchor_mode** **(** **)** The Camera2D's anchor point. See :ref:`AnchorMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_current: -- :ref:`bool` **current** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_current(value) | -+-----------+--------------------+ -| *Getter* | is_current() | -+-----------+--------------------+ +:ref:`bool` **current** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_current** **(** :ref:`bool` value **)** +- :ref:`bool` **is_current** **(** **)** If ``true``, the camera acts as the active camera for its :ref:`Viewport` ancestor. Only one camera can be current in a given viewport, so setting a different camera in the same viewport ``current`` will disable whatever camera was already active in that viewport. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_custom_viewport: -- :ref:`Node` **custom_viewport** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_custom_viewport(value) | -+----------+----------------------------+ -| *Getter* | get_custom_viewport() | -+----------+----------------------------+ +:ref:`Node` **custom_viewport** -The custom :ref:`Viewport` node attached to the ``Camera2D``. If ``null`` or not a :ref:`Viewport`, uses the default viewport instead. +.. rst-class:: classref-property-setget + +- void **set_custom_viewport** **(** :ref:`Node` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_Camera2D_property_drag_bottom_margin: -- :ref:`float` **drag_bottom_margin** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.2`` | -+-----------+------------------------+ -| *Setter* | set_drag_margin(value) | -+-----------+------------------------+ -| *Getter* | get_drag_margin() | -+-----------+------------------------+ +:ref:`float` **drag_bottom_margin** = ``0.2`` + +.. 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| Bottom margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the bottom edge of the screen. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_drag_horizontal_enabled: -- :ref:`bool` **drag_horizontal_enabled** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------+ -| *Setter* | set_drag_horizontal_enabled(value) | -+-----------+------------------------------------+ -| *Getter* | is_drag_horizontal_enabled() | -+-----------+------------------------------------+ +:ref:`bool` **drag_horizontal_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_drag_horizontal_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_drag_horizontal_offset: -- :ref:`float` **drag_horizontal_offset** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_drag_horizontal_offset(value) | -+-----------+-----------------------------------+ -| *Getter* | get_drag_horizontal_offset() | -+-----------+-----------------------------------+ +:ref:`float` **drag_horizontal_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_drag_horizontal_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_drag_horizontal_offset** **(** **)** The relative horizontal drag offset of the camera between the right (``-1``) and left (``1``) drag margins. \ **Note:** Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when :ref:`drag_horizontal_enabled` is ``true`` or the drag margins are changed. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_drag_left_margin: -- :ref:`float` **drag_left_margin** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.2`` | -+-----------+------------------------+ -| *Setter* | set_drag_margin(value) | -+-----------+------------------------+ -| *Getter* | get_drag_margin() | -+-----------+------------------------+ +:ref:`float` **drag_left_margin** = ``0.2`` + +.. 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| Left margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the left edge of the screen. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_drag_right_margin: -- :ref:`float` **drag_right_margin** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.2`` | -+-----------+------------------------+ -| *Setter* | set_drag_margin(value) | -+-----------+------------------------+ -| *Getter* | get_drag_margin() | -+-----------+------------------------+ +:ref:`float` **drag_right_margin** = ``0.2`` + +.. 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| Right margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the right edge of the screen. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_drag_top_margin: -- :ref:`float` **drag_top_margin** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.2`` | -+-----------+------------------------+ -| *Setter* | set_drag_margin(value) | -+-----------+------------------------+ -| *Getter* | get_drag_margin() | -+-----------+------------------------+ +:ref:`float` **drag_top_margin** = ``0.2`` + +.. 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| Top margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the top edge of the screen. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_drag_vertical_enabled: -- :ref:`bool` **drag_vertical_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_drag_vertical_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_drag_vertical_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **drag_vertical_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_drag_vertical_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_drag_vertical_offset: -- :ref:`float` **drag_vertical_offset** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_drag_vertical_offset(value) | -+-----------+---------------------------------+ -| *Getter* | get_drag_vertical_offset() | -+-----------+---------------------------------+ +:ref:`float` **drag_vertical_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_drag_vertical_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_drag_vertical_offset** **(** **)** The relative vertical drag offset of the camera between the bottom (``-1``) and top (``1``) drag margins. \ **Note:** Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when :ref:`drag_vertical_enabled` is ``true`` or the drag margins are changed. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_editor_draw_drag_margin: -- :ref:`bool` **editor_draw_drag_margin** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_margin_drawing_enabled(value) | -+-----------+-----------------------------------+ -| *Getter* | is_margin_drawing_enabled() | -+-----------+-----------------------------------+ +:ref:`bool` **editor_draw_drag_margin** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_margin_drawing_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_margin_drawing_enabled** **(** **)** If ``true``, draws the camera's drag margin rectangle in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_editor_draw_limits: -- :ref:`bool` **editor_draw_limits** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_limit_drawing_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_limit_drawing_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **editor_draw_limits** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_limit_drawing_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_limit_drawing_enabled** **(** **)** If ``true``, draws the camera's limits rectangle in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_editor_draw_screen: -- :ref:`bool` **editor_draw_screen** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------+ -| *Setter* | set_screen_drawing_enabled(value) | -+-----------+-----------------------------------+ -| *Getter* | is_screen_drawing_enabled() | -+-----------+-----------------------------------+ +:ref:`bool` **editor_draw_screen** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_screen_drawing_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_screen_drawing_enabled** **(** **)** If ``true``, draws the camera's screen rectangle in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_ignore_rotation: -- :ref:`bool` **ignore_rotation** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_ignore_rotation(value) | -+-----------+----------------------------+ -| *Getter* | is_ignoring_rotation() | -+-----------+----------------------------+ +:ref:`bool` **ignore_rotation** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_ignore_rotation** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_limit_bottom: -- :ref:`int` **limit_bottom** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``10000000`` | -+-----------+------------------+ -| *Setter* | set_limit(value) | -+-----------+------------------+ -| *Getter* | get_limit() | -+-----------+------------------+ +:ref:`int` **limit_bottom** = ``10000000`` + +.. rst-class:: classref-property-setget + +- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** +- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| Bottom scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_limit_left: -- :ref:`int` **limit_left** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``-10000000`` | -+-----------+------------------+ -| *Setter* | set_limit(value) | -+-----------+------------------+ -| *Getter* | get_limit() | -+-----------+------------------+ +:ref:`int` **limit_left** = ``-10000000`` + +.. rst-class:: classref-property-setget + +- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** +- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| Left scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_limit_right: -- :ref:`int` **limit_right** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``10000000`` | -+-----------+------------------+ -| *Setter* | set_limit(value) | -+-----------+------------------+ -| *Getter* | get_limit() | -+-----------+------------------+ +:ref:`int` **limit_right** = ``10000000`` + +.. rst-class:: classref-property-setget + +- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** +- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| Right scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_limit_smoothed: -- :ref:`bool` **limit_smoothed** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------+ -| *Setter* | set_limit_smoothing_enabled(value) | -+-----------+------------------------------------+ -| *Getter* | is_limit_smoothing_enabled() | -+-----------+------------------------------------+ +:ref:`bool` **limit_smoothed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_limit_smoothing_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_limit_smoothing_enabled** **(** **)** If ``true``, the camera smoothly stops when reaches its limits. @@ -456,212 +523,260 @@ This property has no effect if :ref:`position_smoothing_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_limit_top: -- :ref:`int` **limit_top** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``-10000000`` | -+-----------+------------------+ -| *Setter* | set_limit(value) | -+-----------+------------------+ -| *Getter* | get_limit() | -+-----------+------------------+ +:ref:`int` **limit_top** = ``-10000000`` + +.. rst-class:: classref-property-setget + +- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** +- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| Top scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_position_smoothing_enabled: -- :ref:`bool` **position_smoothing_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------+ -| *Setter* | set_position_smoothing_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_position_smoothing_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **position_smoothing_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_position_smoothing_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_position_smoothing_enabled** **(** **)** If ``true``, the camera's view smoothly moves towards its target position at :ref:`position_smoothing_speed`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_position_smoothing_speed: -- :ref:`float` **position_smoothing_speed** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``5.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_position_smoothing_speed(value) | -+-----------+-------------------------------------+ -| *Getter* | get_position_smoothing_speed() | -+-----------+-------------------------------------+ +:ref:`float` **position_smoothing_speed** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_position_smoothing_speed** **(** :ref:`float` value **)** +- :ref:`float` **get_position_smoothing_speed** **(** **)** Speed in pixels per second of the camera's smoothing effect when :ref:`position_smoothing_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_process_callback: -- :ref:`Camera2DProcessCallback` **process_callback** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_process_callback(value) | -+-----------+-----------------------------+ -| *Getter* | get_process_callback() | -+-----------+-----------------------------+ +:ref:`Camera2DProcessCallback` **process_callback** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_process_callback** **(** :ref:`Camera2DProcessCallback` value **)** +- :ref:`Camera2DProcessCallback` **get_process_callback** **(** **)** The camera's process callback. See :ref:`Camera2DProcessCallback`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_rotation_smoothing_enabled: -- :ref:`bool` **rotation_smoothing_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------+ -| *Setter* | set_rotation_smoothing_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_rotation_smoothing_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **rotation_smoothing_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_rotation_smoothing_enabled** **(** :ref:`bool` value **)** +- :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`. \ **Note:** This property has no effect if :ref:`ignore_rotation` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_rotation_smoothing_speed: -- :ref:`float` **rotation_smoothing_speed** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``5.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_rotation_smoothing_speed(value) | -+-----------+-------------------------------------+ -| *Getter* | get_rotation_smoothing_speed() | -+-----------+-------------------------------------+ +:ref:`float` **rotation_smoothing_speed** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_rotation_smoothing_speed** **(** :ref:`float` value **)** +- :ref:`float` **get_rotation_smoothing_speed** **(** **)** The angular, asymptotic speed of the camera's rotation smoothing effect when :ref:`rotation_smoothing_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_property_zoom: -- :ref:`Vector2` **zoom** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------+ -| *Setter* | set_zoom(value) | -+-----------+-------------------+ -| *Getter* | get_zoom() | -+-----------+-------------------+ +:ref:`Vector2` **zoom** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_zoom** **(** :ref:`Vector2` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Camera2D_method_align: -- void **align** **(** **)** +.. rst-class:: classref-method + +void **align** **(** **)** Aligns the camera to the tracked node. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_force_update_scroll: -- void **force_update_scroll** **(** **)** +.. rst-class:: classref-method + +void **force_update_scroll** **(** **)** Forces the camera to update scroll immediately. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_get_drag_margin: -- :ref:`float` **get_drag_margin** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_drag_margin** **(** :ref:`Side` margin **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_get_limit: -- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| Returns the camera limit for the specified :ref:`Side`. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_get_screen_center_position: -- :ref:`Vector2` **get_screen_center_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_screen_center_position** **(** **)** |const| Returns the center of the screen from this camera's point of view, in global coordinates. \ **Note:** The exact targeted position of the camera may be different. See :ref:`get_target_position`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_get_target_position: -- :ref:`Vector2` **get_target_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_target_position** **(** **)** |const| Returns this camera's target position, in global coordinates. \ **Note:** The returned value is not the same as :ref:`Node2D.global_position`, as it is affected by the drag properties. It is also not the same as the current position if :ref:`position_smoothing_enabled` is ``true`` (see :ref:`get_screen_center_position`). +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_reset_smoothing: -- void **reset_smoothing** **(** **)** +.. rst-class:: classref-method + +void **reset_smoothing** **(** **)** Sets the camera's position immediately to its current smoothing destination. This method has no effect if :ref:`position_smoothing_enabled` is ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_set_drag_margin: -- void **set_drag_margin** **(** :ref:`Side` margin, :ref:`float` drag_margin **)** +.. rst-class:: classref-method + +void **set_drag_margin** **(** :ref:`Side` margin, :ref:`float` drag_margin **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera2D_method_set_limit: -- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** +.. rst-class:: classref-method + +void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** Sets the camera limit for the specified :ref:`Side`. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index df2a2cb9e..5b53b19ec 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -16,249 +16,326 @@ Camera3D Camera node, displays from a point of view. +.. rst-class:: classref-introduction-group + Description ----------- -``Camera3D`` is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a :ref:`Viewport`, and, without one, a scene registered in that :ref:`Viewport` (or higher viewports) can't be displayed. +**Camera3D** is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a :ref:`Viewport`, and, without one, a scene registered in that :ref:`Viewport` (or higher viewports) can't be displayed. + +.. rst-class:: classref-introduction-group Tutorials --------- - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`CameraAttributes` | :ref:`attributes` | | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`cull_mask` | ``1048575`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`current` | ``false`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`DopplerTracking` | :ref:`doppler_tracking` | ``0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`Environment` | :ref:`environment` | | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`far` | ``4000.0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`fov` | ``75.0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`frustum_offset` | ``Vector2(0, 0)`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`h_offset` | ``0.0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`KeepAspect` | :ref:`keep_aspect` | ``1`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`near` | ``0.05`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`ProjectionType` | :ref:`projection` | ``0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`size` | ``1.0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`v_offset` | ``0.0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`CameraAttributes` | :ref:`attributes` | | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`cull_mask` | ``1048575`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`current` | ``false`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`DopplerTracking` | :ref:`doppler_tracking` | ``0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`Environment` | :ref:`environment` | | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`far` | ``4000.0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`fov` | ``75.0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`frustum_offset` | ``Vector2(0, 0)`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`h_offset` | ``0.0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`KeepAspect` | :ref:`keep_aspect` | ``1`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`near` | ``0.05`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`ProjectionType` | :ref:`projection` | ``0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`size` | ``1.0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`v_offset` | ``0.0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_current` **(** :ref:`bool` enable_next=true **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_current` **(** :ref:`bool` enable_next=true **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Camera3D_ProjectionType: -.. _class_Camera3D_constant_PROJECTION_PERSPECTIVE: - -.. _class_Camera3D_constant_PROJECTION_ORTHOGONAL: - -.. _class_Camera3D_constant_PROJECTION_FRUSTUM: +.. rst-class:: classref-enumeration enum **ProjectionType**: -- **PROJECTION_PERSPECTIVE** = **0** --- Perspective projection. Objects on the screen becomes smaller when they are far away. +.. _class_Camera3D_constant_PROJECTION_PERSPECTIVE: -- **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. +.. rst-class:: classref-enumeration-constant -- **PROJECTION_FRUSTUM** = **2** --- Frustum projection. This mode allows adjusting :ref:`frustum_offset` to create "tilted frustum" effects. +:ref:`ProjectionType` **PROJECTION_PERSPECTIVE** = ``0`` + +Perspective projection. Objects on the screen becomes smaller when they are far away. + +.. _class_Camera3D_constant_PROJECTION_ORTHOGONAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProjectionType` **PROJECTION_ORTHOGONAL** = ``1`` + +Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. + +.. _class_Camera3D_constant_PROJECTION_FRUSTUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProjectionType` **PROJECTION_FRUSTUM** = ``2`` + +Frustum projection. This mode allows adjusting :ref:`frustum_offset` to create "tilted frustum" effects. + +.. rst-class:: classref-item-separator ---- .. _enum_Camera3D_KeepAspect: -.. _class_Camera3D_constant_KEEP_WIDTH: - -.. _class_Camera3D_constant_KEEP_HEIGHT: +.. rst-class:: classref-enumeration enum **KeepAspect**: -- **KEEP_WIDTH** = **0** --- Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. +.. _class_Camera3D_constant_KEEP_WIDTH: -- **KEEP_HEIGHT** = **1** --- Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. +.. rst-class:: classref-enumeration-constant + +:ref:`KeepAspect` **KEEP_WIDTH** = ``0`` + +Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. + +.. _class_Camera3D_constant_KEEP_HEIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeepAspect` **KEEP_HEIGHT** = ``1`` + +Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. + +.. rst-class:: classref-item-separator ---- .. _enum_Camera3D_DopplerTracking: -.. _class_Camera3D_constant_DOPPLER_TRACKING_DISABLED: - -.. _class_Camera3D_constant_DOPPLER_TRACKING_IDLE_STEP: - -.. _class_Camera3D_constant_DOPPLER_TRACKING_PHYSICS_STEP: +.. rst-class:: classref-enumeration enum **DopplerTracking**: -- **DOPPLER_TRACKING_DISABLED** = **0** --- Disables `Doppler effect `__ simulation (default). +.. _class_Camera3D_constant_DOPPLER_TRACKING_DISABLED: -- **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Simulate `Doppler effect `__ by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's :ref:`AudioStreamPlayer3D.pitch_scale`). +.. rst-class:: classref-enumeration-constant -- **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Simulate `Doppler effect `__ by tracking positions of objects that are changed in ``_physics_process``. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's :ref:`AudioStreamPlayer3D.pitch_scale`). +:ref:`DopplerTracking` **DOPPLER_TRACKING_DISABLED** = ``0`` + +Disables `Doppler effect `__ simulation (default). + +.. _class_Camera3D_constant_DOPPLER_TRACKING_IDLE_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`DopplerTracking` **DOPPLER_TRACKING_IDLE_STEP** = ``1`` + +Simulate `Doppler effect `__ by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's :ref:`AudioStreamPlayer3D.pitch_scale`). + +.. _class_Camera3D_constant_DOPPLER_TRACKING_PHYSICS_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`DopplerTracking` **DOPPLER_TRACKING_PHYSICS_STEP** = ``2`` + +Simulate `Doppler effect `__ by tracking positions of objects that are changed in ``_physics_process``. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's :ref:`AudioStreamPlayer3D.pitch_scale`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Camera3D_property_attributes: -- :ref:`CameraAttributes` **attributes** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_attributes(value) | -+----------+-----------------------+ -| *Getter* | get_attributes() | -+----------+-----------------------+ +:ref:`CameraAttributes` **attributes** + +.. rst-class:: classref-property-setget + +- void **set_attributes** **(** :ref:`CameraAttributes` value **)** +- :ref:`CameraAttributes` **get_attributes** **(** **)** The :ref:`CameraAttributes` to use for this camera. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_cull_mask: -- :ref:`int` **cull_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1048575`` | -+-----------+----------------------+ -| *Setter* | set_cull_mask(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mask() | -+-----------+----------------------+ +:ref:`int` **cull_mask** = ``1048575`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_cull_mask** **(** **)** The culling mask that describes which 3D render layers are rendered by this camera. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_current: -- :ref:`bool` **current** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_current(value) | -+-----------+--------------------+ -| *Getter* | is_current() | -+-----------+--------------------+ +:ref:`bool` **current** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_current** **(** :ref:`bool` value **)** +- :ref:`bool` **is_current** **(** **)** If ``true``, the ancestor :ref:`Viewport` is currently using this camera. -If multiple cameras are in the scene, one will always be made current. For example, if two ``Camera3D`` nodes are present in the scene and only one is current, setting one camera's :ref:`current` to ``false`` will cause the other camera to be made current. +If multiple cameras are in the scene, one will always be made current. For example, if two **Camera3D** nodes are present in the scene and only one is current, setting one camera's :ref:`current` to ``false`` will cause the other camera to be made current. + +.. rst-class:: classref-item-separator ---- .. _class_Camera3D_property_doppler_tracking: -- :ref:`DopplerTracking` **doppler_tracking** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_doppler_tracking(value) | -+-----------+-----------------------------+ -| *Getter* | get_doppler_tracking() | -+-----------+-----------------------------+ +:ref:`DopplerTracking` **doppler_tracking** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_doppler_tracking** **(** :ref:`DopplerTracking` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_environment: -- :ref:`Environment` **environment** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_environment(value) | -+----------+------------------------+ -| *Getter* | get_environment() | -+----------+------------------------+ +:ref:`Environment` **environment** + +.. rst-class:: classref-property-setget + +- void **set_environment** **(** :ref:`Environment` value **)** +- :ref:`Environment` **get_environment** **(** **)** The :ref:`Environment` to use for this camera. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_far: -- :ref:`float` **far** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``4000.0`` | -+-----------+----------------+ -| *Setter* | set_far(value) | -+-----------+----------------+ -| *Getter* | get_far() | -+-----------+----------------+ +:ref:`float` **far** = ``4000.0`` + +.. rst-class:: classref-property-setget + +- void **set_far** **(** :ref:`float` value **)** +- :ref:`float` **get_far** **(** **)** The distance to the far culling boundary for this camera relative to its local Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_fov: -- :ref:`float` **fov** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``75.0`` | -+-----------+----------------+ -| *Setter* | set_fov(value) | -+-----------+----------------+ -| *Getter* | get_fov() | -+-----------+----------------+ +:ref:`float` **fov** = ``75.0`` + +.. rst-class:: classref-property-setget + +- void **set_fov** **(** :ref:`float` value **)** +- :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. @@ -272,264 +349,347 @@ For reference, the default vertical field of view value (``75.0``) is equivalent - ~121.63 degrees in a 21:9 viewport +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_frustum_offset: -- :ref:`Vector2` **frustum_offset** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_frustum_offset(value) | -+-----------+---------------------------+ -| *Getter* | get_frustum_offset() | -+-----------+---------------------------+ +:ref:`Vector2` **frustum_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_frustum_offset** **(** :ref:`Vector2` value **)** +- :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 `__. \ **Note:** Only effective if :ref:`projection` is :ref:`PROJECTION_FRUSTUM`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_h_offset: -- :ref:`float` **h_offset** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_h_offset(value) | -+-----------+---------------------+ -| *Getter* | get_h_offset() | -+-----------+---------------------+ +:ref:`float` **h_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_h_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_h_offset** **(** **)** The horizontal (X) offset of the camera viewport. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_keep_aspect: -- :ref:`KeepAspect` **keep_aspect** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_keep_aspect_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_keep_aspect_mode() | -+-----------+-----------------------------+ +:ref:`KeepAspect` **keep_aspect** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_keep_aspect_mode** **(** :ref:`KeepAspect` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_near: -- :ref:`float` **near** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.05`` | -+-----------+-----------------+ -| *Setter* | set_near(value) | -+-----------+-----------------+ -| *Getter* | get_near() | -+-----------+-----------------+ +:ref:`float` **near** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_near** **(** :ref:`float` value **)** +- :ref:`float` **get_near** **(** **)** The distance to the near culling boundary for this camera relative to its local Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_projection: -- :ref:`ProjectionType` **projection** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_projection(value) | -+-----------+-----------------------+ -| *Getter* | get_projection() | -+-----------+-----------------------+ +:ref:`ProjectionType` **projection** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_projection** **(** :ref:`ProjectionType` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_size: -- :ref:`float` **size** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_size(value) | -+-----------+-----------------+ -| *Getter* | get_size() | -+-----------+-----------------+ +:ref:`float` **size** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_property_v_offset: -- :ref:`float` **v_offset** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_v_offset(value) | -+-----------+---------------------+ -| *Getter* | get_v_offset() | -+-----------+---------------------+ +:ref:`float` **v_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_v_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_v_offset** **(** **)** The vertical (Y) offset of the camera viewport. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Camera3D_method_clear_current: -- void **clear_current** **(** :ref:`bool` enable_next=true **)** +.. rst-class:: classref-method + +void **clear_current** **(** :ref:`bool` enable_next=true **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_get_camera_rid: -- :ref:`RID` **get_camera_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_camera_rid** **(** **)** |const| Returns the camera's RID from the :ref:`RenderingServer`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_get_camera_transform: -- :ref:`Transform3D` **get_camera_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_camera_transform** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_get_cull_mask_value: -- :ref:`bool` **get_cull_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_cull_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`cull_mask` is enabled, given a ``layer_number`` between 1 and 20. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_get_frustum: -- :ref:`Plane[]` **get_frustum** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Plane[]` **get_frustum** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_get_pyramid_shape_rid: -- :ref:`RID` **get_pyramid_shape_rid** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **get_pyramid_shape_rid** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_is_position_behind: -- :ref:`bool` **is_position_behind** **(** :ref:`Vector3` world_point **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_position_behind** **(** :ref:`Vector3` world_point **)** |const| 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. \ **Note:** A position which returns ``false`` may still be outside the camera's field of view. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_is_position_in_frustum: -- :ref:`bool` **is_position_in_frustum** **(** :ref:`Vector3` world_point **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_position_in_frustum** **(** :ref:`Vector3` world_point **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_make_current: -- void **make_current** **(** **)** +.. rst-class:: classref-method + +void **make_current** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_project_local_ray_normal: -- :ref:`Vector3` **project_local_ray_normal** **(** :ref:`Vector2` screen_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **project_local_ray_normal** **(** :ref:`Vector2` screen_point **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_project_position: -- :ref:`Vector3` **project_position** **(** :ref:`Vector2` screen_point, :ref:`float` z_depth **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **project_position** **(** :ref:`Vector2` screen_point, :ref:`float` z_depth **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_project_ray_normal: -- :ref:`Vector3` **project_ray_normal** **(** :ref:`Vector2` screen_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **project_ray_normal** **(** :ref:`Vector2` screen_point **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_project_ray_origin: -- :ref:`Vector3` **project_ray_origin** **(** :ref:`Vector2` screen_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **project_ray_origin** **(** :ref:`Vector2` screen_point **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_set_cull_mask_value: -- void **set_cull_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_cull_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`cull_mask`, given a ``layer_number`` between 1 and 20. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_set_frustum: -- void **set_frustum** **(** :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** +.. rst-class:: classref-method + +void **set_frustum** **(** :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_set_orthogonal: -- void **set_orthogonal** **(** :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** +.. rst-class:: classref-method + +void **set_orthogonal** **(** :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** 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.) +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_set_perspective: -- void **set_perspective** **(** :ref:`float` fov, :ref:`float` z_near, :ref:`float` z_far **)** +.. rst-class:: classref-method + +void **set_perspective** **(** :ref:`float` fov, :ref:`float` z_near, :ref:`float` z_far **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Camera3D_method_unproject_position: -- :ref:`Vector2` **unproject_position** **(** :ref:`Vector3` world_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **unproject_position** **(** :ref:`Vector3` world_point **)** |const| Returns the 2D coordinate in the :ref:`Viewport` rectangle that maps to the given 3D point in world space. diff --git a/classes/class_cameraattributes.rst b/classes/class_cameraattributes.rst index 2864ef1a1..6dd5c3d31 100644 --- a/classes/class_cameraattributes.rst +++ b/classes/class_cameraattributes.rst @@ -16,110 +16,126 @@ CameraAttributes Parent class for camera settings. +.. rst-class:: classref-introduction-group + Description ----------- Controls camera-specific attributes such as depth of field and exposure override. -When used in a :ref:`WorldEnvironment` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own ``CameraAttributes``, including the editor camera. When used in a :ref:`Camera3D` it will override any ``CameraAttributes`` set in the :ref:`WorldEnvironment`. When used in :ref:`VoxelGI` or :ref:`LightmapGI`, only the exposure settings will be used. +When used in a :ref:`WorldEnvironment` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own **CameraAttributes**, including the editor camera. When used in a :ref:`Camera3D` it will override any **CameraAttributes** set in the :ref:`WorldEnvironment`. When used in :ref:`VoxelGI` or :ref:`LightmapGI`, only the exposure settings will be used. See also :ref:`Environment` for general 3D environment settings. This is a pure virtual class that is inherited by :ref:`CameraAttributesPhysical` and :ref:`CameraAttributesPractical`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`auto_exposure_enabled` | ``false`` | -+---------------------------+-------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`auto_exposure_scale` | ``0.4`` | -+---------------------------+-------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`auto_exposure_speed` | ``0.5`` | -+---------------------------+-------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`exposure_multiplier` | ``1.0`` | -+---------------------------+-------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`exposure_sensitivity` | ``100.0`` | -+---------------------------+-------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`auto_exposure_enabled` | ``false`` | + +---------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`auto_exposure_scale` | ``0.4`` | + +---------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`auto_exposure_speed` | ``0.5`` | + +---------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`exposure_multiplier` | ``1.0`` | + +---------------------------+-------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`exposure_sensitivity` | ``100.0`` | + +---------------------------+-------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CameraAttributes_property_auto_exposure_enabled: -- :ref:`bool` **auto_exposure_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_auto_exposure_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_auto_exposure_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **auto_exposure_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_auto_exposure_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributes_property_auto_exposure_scale: -- :ref:`float` **auto_exposure_scale** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.4`` | -+-----------+--------------------------------+ -| *Setter* | set_auto_exposure_scale(value) | -+-----------+--------------------------------+ -| *Getter* | get_auto_exposure_scale() | -+-----------+--------------------------------+ +:ref:`float` **auto_exposure_scale** = ``0.4`` + +.. rst-class:: classref-property-setget + +- void **set_auto_exposure_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_auto_exposure_scale** **(** **)** The scale of the auto exposure effect. Affects the intensity of auto exposure. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributes_property_auto_exposure_speed: -- :ref:`float` **auto_exposure_speed** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------------------+ -| *Setter* | set_auto_exposure_speed(value) | -+-----------+--------------------------------+ -| *Getter* | get_auto_exposure_speed() | -+-----------+--------------------------------+ +:ref:`float` **auto_exposure_speed** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_auto_exposure_speed** **(** :ref:`float` value **)** +- :ref:`float` **get_auto_exposure_speed** **(** **)** The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributes_property_exposure_multiplier: -- :ref:`float` **exposure_multiplier** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------------+ -| *Setter* | set_exposure_multiplier(value) | -+-----------+--------------------------------+ -| *Getter* | get_exposure_multiplier() | -+-----------+--------------------------------+ +:ref:`float` **exposure_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_exposure_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_exposure_multiplier** **(** **)** Multiplier for the exposure amount. A higher value results in a brighter image. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributes_property_exposure_sensitivity: -- :ref:`float` **exposure_sensitivity** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``100.0`` | -+-----------+---------------------------------+ -| *Setter* | set_exposure_sensitivity(value) | -+-----------+---------------------------------+ -| *Getter* | get_exposure_sensitivity() | -+-----------+---------------------------------+ +:ref:`float` **exposure_sensitivity** = ``100.0`` + +.. rst-class:: classref-property-setget + +- void **set_exposure_sensitivity** **(** :ref:`float` value **)** +- :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. diff --git a/classes/class_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index 05c88a19b..e75664258 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -14,182 +14,214 @@ CameraAttributesPhysical Physically-based camera settings. +.. rst-class:: classref-introduction-group + Description ----------- -``CameraAttributesPhysical`` is used to set rendering settings based on a physically-based camera's settings. It is responsible for exposure, auto-exposure, and depth of field. +**CameraAttributesPhysical** is used to set rendering settings based on a physically-based camera's settings. It is responsible for exposure, auto-exposure, and depth of field. When used in a :ref:`WorldEnvironment` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own :ref:`CameraAttributes`, including the editor camera. When used in a :ref:`Camera3D` it will override any :ref:`CameraAttributes` set in the :ref:`WorldEnvironment` and will override the :ref:`Camera3D`\ s :ref:`Camera3D.far`, :ref:`Camera3D.near`, :ref:`Camera3D.fov`, and :ref:`Camera3D.keep_aspect` properties. When used in :ref:`VoxelGI` or :ref:`LightmapGI`, only the exposure settings will be used. The default settings are intended for use in an outdoor environment, tips for settings for use in an indoor environment can be found in each setting's documentation. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`auto_exposure_max_exposure_value` | ``10.0`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`auto_exposure_min_exposure_value` | ``-8.0`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`exposure_aperture` | ``16.0`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`exposure_shutter_speed` | ``100.0`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`frustum_far` | ``4000.0`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`frustum_focal_length` | ``35.0`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`frustum_focus_distance` | ``10.0`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`frustum_near` | ``0.05`` | -+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`auto_exposure_max_exposure_value` | ``10.0`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`auto_exposure_min_exposure_value` | ``-8.0`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`exposure_aperture` | ``16.0`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`exposure_shutter_speed` | ``100.0`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`frustum_far` | ``4000.0`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`frustum_focal_length` | ``35.0`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`frustum_focus_distance` | ``10.0`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`frustum_near` | ``0.05`` | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-----------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_fov` **(** **)** |const| | -+---------------------------+-----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_fov` **(** **)** |const| | + +---------------------------+-----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CameraAttributesPhysical_property_auto_exposure_max_exposure_value: -- :ref:`float` **auto_exposure_max_exposure_value** +.. rst-class:: classref-property -+-----------+---------------------------------------------+ -| *Default* | ``10.0`` | -+-----------+---------------------------------------------+ -| *Setter* | set_auto_exposure_max_exposure_value(value) | -+-----------+---------------------------------------------+ -| *Getter* | get_auto_exposure_max_exposure_value() | -+-----------+---------------------------------------------+ +:ref:`float` **auto_exposure_max_exposure_value** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_auto_exposure_max_exposure_value** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPhysical_property_auto_exposure_min_exposure_value: -- :ref:`float` **auto_exposure_min_exposure_value** +.. rst-class:: classref-property -+-----------+---------------------------------------------+ -| *Default* | ``-8.0`` | -+-----------+---------------------------------------------+ -| *Setter* | set_auto_exposure_min_exposure_value(value) | -+-----------+---------------------------------------------+ -| *Getter* | get_auto_exposure_min_exposure_value() | -+-----------+---------------------------------------------+ +:ref:`float` **auto_exposure_min_exposure_value** = ``-8.0`` + +.. rst-class:: classref-property-setget + +- void **set_auto_exposure_min_exposure_value** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPhysical_property_exposure_aperture: -- :ref:`float` **exposure_aperture** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``16.0`` | -+-----------+---------------------+ -| *Setter* | set_aperture(value) | -+-----------+---------------------+ -| *Getter* | get_aperture() | -+-----------+---------------------+ +:ref:`float` **exposure_aperture** = ``16.0`` + +.. rst-class:: classref-property-setget + +- void **set_aperture** **(** :ref:`float` value **)** +- :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. Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPhysical_property_exposure_shutter_speed: -- :ref:`float` **exposure_shutter_speed** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``100.0`` | -+-----------+--------------------------+ -| *Setter* | set_shutter_speed(value) | -+-----------+--------------------------+ -| *Getter* | get_shutter_speed() | -+-----------+--------------------------+ +:ref:`float` **exposure_shutter_speed** = ``100.0`` + +.. rst-class:: classref-property-setget + +- void **set_shutter_speed** **(** :ref:`float` value **)** +- :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. Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPhysical_property_frustum_far: -- :ref:`float` **frustum_far** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``4000.0`` | -+-----------+----------------+ -| *Setter* | set_far(value) | -+-----------+----------------+ -| *Getter* | get_far() | -+-----------+----------------+ +:ref:`float` **frustum_far** = ``4000.0`` + +.. rst-class:: classref-property-setget + +- void **set_far** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPhysical_property_frustum_focal_length: -- :ref:`float` **frustum_focal_length** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``35.0`` | -+-----------+-------------------------+ -| *Setter* | set_focal_length(value) | -+-----------+-------------------------+ -| *Getter* | get_focal_length() | -+-----------+-------------------------+ +:ref:`float` **frustum_focal_length** = ``35.0`` + +.. rst-class:: classref-property-setget + +- void **set_focal_length** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPhysical_property_frustum_focus_distance: -- :ref:`float` **frustum_focus_distance** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``10.0`` | -+-----------+---------------------------+ -| *Setter* | set_focus_distance(value) | -+-----------+---------------------------+ -| *Getter* | get_focus_distance() | -+-----------+---------------------------+ +:ref:`float` **frustum_focus_distance** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_focus_distance** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPhysical_property_frustum_near: -- :ref:`float` **frustum_near** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.05`` | -+-----------+-----------------+ -| *Setter* | set_near(value) | -+-----------+-----------------+ -| *Getter* | get_near() | -+-----------+-----------------+ +:ref:`float` **frustum_near** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_near** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CameraAttributesPhysical_method_get_fov: -- :ref:`float` **get_fov** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_fov** **(** **)** |const| 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. diff --git a/classes/class_cameraattributespractical.rst b/classes/class_cameraattributespractical.rst index e587107ac..25b0f2827 100644 --- a/classes/class_cameraattributespractical.rst +++ b/classes/class_cameraattributespractical.rst @@ -14,6 +14,8 @@ CameraAttributesPractical Camera settings in an easy to use format. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,171 +23,189 @@ Controls camera-specific attributes such as auto-exposure, depth of field, and e When used in a :ref:`WorldEnvironment` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own :ref:`CameraAttributes`, including the editor camera. When used in a :ref:`Camera3D` it will override any :ref:`CameraAttributes` set in the :ref:`WorldEnvironment`. When used in :ref:`VoxelGI` or :ref:`LightmapGI`, only the exposure settings will be used. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`auto_exposure_max_sensitivity` | ``800.0`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`auto_exposure_min_sensitivity` | ``0.0`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`dof_blur_amount` | ``0.1`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`dof_blur_far_distance` | ``10.0`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`dof_blur_far_enabled` | ``false`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`dof_blur_far_transition` | ``5.0`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`dof_blur_near_distance` | ``2.0`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`dof_blur_near_enabled` | ``false`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`dof_blur_near_transition` | ``1.0`` | -+---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`auto_exposure_max_sensitivity` | ``800.0`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`auto_exposure_min_sensitivity` | ``0.0`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`dof_blur_amount` | ``0.1`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`dof_blur_far_distance` | ``10.0`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`dof_blur_far_enabled` | ``false`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`dof_blur_far_transition` | ``5.0`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`dof_blur_near_distance` | ``2.0`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`dof_blur_near_enabled` | ``false`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`dof_blur_near_transition` | ``1.0`` | + +---------------------------+--------------------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CameraAttributesPractical_property_auto_exposure_max_sensitivity: -- :ref:`float` **auto_exposure_max_sensitivity** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``800.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_auto_exposure_max_sensitivity(value) | -+-----------+------------------------------------------+ -| *Getter* | get_auto_exposure_max_sensitivity() | -+-----------+------------------------------------------+ +:ref:`float` **auto_exposure_max_sensitivity** = ``800.0`` + +.. rst-class:: classref-property-setget + +- void **set_auto_exposure_max_sensitivity** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_auto_exposure_min_sensitivity: -- :ref:`float` **auto_exposure_min_sensitivity** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_auto_exposure_min_sensitivity(value) | -+-----------+------------------------------------------+ -| *Getter* | get_auto_exposure_min_sensitivity() | -+-----------+------------------------------------------+ +:ref:`float` **auto_exposure_min_sensitivity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_auto_exposure_min_sensitivity** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_dof_blur_amount: -- :ref:`float` **dof_blur_amount** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.1`` | -+-----------+----------------------------+ -| *Setter* | set_dof_blur_amount(value) | -+-----------+----------------------------+ -| *Getter* | get_dof_blur_amount() | -+-----------+----------------------------+ +:ref:`float` **dof_blur_amount** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_dof_blur_amount** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_dof_blur_far_distance: -- :ref:`float` **dof_blur_far_distance** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``10.0`` | -+-----------+----------------------------------+ -| *Setter* | set_dof_blur_far_distance(value) | -+-----------+----------------------------------+ -| *Getter* | get_dof_blur_far_distance() | -+-----------+----------------------------------+ +:ref:`float` **dof_blur_far_distance** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_dof_blur_far_distance** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_dof_blur_far_enabled: -- :ref:`bool` **dof_blur_far_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_dof_blur_far_enabled(value) | -+-----------+---------------------------------+ -| *Getter* | is_dof_blur_far_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **dof_blur_far_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_dof_blur_far_enabled** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_dof_blur_far_transition: -- :ref:`float` **dof_blur_far_transition** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``5.0`` | -+-----------+------------------------------------+ -| *Setter* | set_dof_blur_far_transition(value) | -+-----------+------------------------------------+ -| *Getter* | get_dof_blur_far_transition() | -+-----------+------------------------------------+ +:ref:`float` **dof_blur_far_transition** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_dof_blur_far_transition** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_dof_blur_near_distance: -- :ref:`float` **dof_blur_near_distance** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``2.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_dof_blur_near_distance(value) | -+-----------+-----------------------------------+ -| *Getter* | get_dof_blur_near_distance() | -+-----------+-----------------------------------+ +:ref:`float` **dof_blur_near_distance** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_dof_blur_near_distance** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_dof_blur_near_enabled: -- :ref:`bool` **dof_blur_near_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_dof_blur_near_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_dof_blur_near_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **dof_blur_near_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_dof_blur_near_enabled** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CameraAttributesPractical_property_dof_blur_near_transition: -- :ref:`float` **dof_blur_near_transition** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_dof_blur_near_transition(value) | -+-----------+-------------------------------------+ -| *Getter* | get_dof_blur_near_transition() | -+-----------+-------------------------------------+ +:ref:`float` **dof_blur_near_transition** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_dof_blur_near_transition** **(** :ref:`float` value **)** +- :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`. diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 1d2ef2fb1..77ccc28c4 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -14,6 +14,8 @@ CameraFeed A camera feed gives you access to a single physical camera attached to your device. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,132 +23,208 @@ A camera feed gives you access to a single physical camera attached to your devi \ **Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+-----------------------------------------------------------------+------------------------------------+ -| :ref:`bool` | :ref:`feed_is_active` | ``false`` | -+---------------------------------------+-----------------------------------------------------------------+------------------------------------+ -| :ref:`Transform2D` | :ref:`feed_transform` | ``Transform2D(1, 0, 0, -1, 0, 1)`` | -+---------------------------------------+-----------------------------------------------------------------+------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------+------------------------------------+ + | :ref:`bool` | :ref:`feed_is_active` | ``false`` | + +---------------------------------------+-----------------------------------------------------------------+------------------------------------+ + | :ref:`Transform2D` | :ref:`feed_transform` | ``Transform2D(1, 0, 0, -1, 0, 1)`` | + +---------------------------------------+-----------------------------------------------------------------+------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`FeedDataType` | :ref:`get_datatype` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_id` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`FeedPosition` | :ref:`get_position` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------+ +.. 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| | + +---------------------------------------------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CameraFeed_FeedDataType: -.. _class_CameraFeed_constant_FEED_NOIMAGE: - -.. _class_CameraFeed_constant_FEED_RGB: - -.. _class_CameraFeed_constant_FEED_YCBCR: - -.. _class_CameraFeed_constant_FEED_YCBCR_SEP: +.. rst-class:: classref-enumeration enum **FeedDataType**: -- **FEED_NOIMAGE** = **0** --- No image set for the feed. +.. _class_CameraFeed_constant_FEED_NOIMAGE: -- **FEED_RGB** = **1** --- Feed supplies RGB images. +.. rst-class:: classref-enumeration-constant -- **FEED_YCBCR** = **2** --- Feed supplies YCbCr images that need to be converted to RGB. +:ref:`FeedDataType` **FEED_NOIMAGE** = ``0`` -- **FEED_YCBCR_SEP** = **3** --- Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. +No image set for the feed. + +.. _class_CameraFeed_constant_FEED_RGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedDataType` **FEED_RGB** = ``1`` + +Feed supplies RGB images. + +.. _class_CameraFeed_constant_FEED_YCBCR: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedDataType` **FEED_YCBCR** = ``2`` + +Feed supplies YCbCr images that need to be converted to RGB. + +.. _class_CameraFeed_constant_FEED_YCBCR_SEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedDataType` **FEED_YCBCR_SEP** = ``3`` + +Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. + +.. rst-class:: classref-item-separator ---- .. _enum_CameraFeed_FeedPosition: -.. _class_CameraFeed_constant_FEED_UNSPECIFIED: - -.. _class_CameraFeed_constant_FEED_FRONT: - -.. _class_CameraFeed_constant_FEED_BACK: +.. rst-class:: classref-enumeration enum **FeedPosition**: -- **FEED_UNSPECIFIED** = **0** --- Unspecified position. +.. _class_CameraFeed_constant_FEED_UNSPECIFIED: -- **FEED_FRONT** = **1** --- Camera is mounted at the front of the device. +.. rst-class:: classref-enumeration-constant -- **FEED_BACK** = **2** --- Camera is mounted at the back of the device. +:ref:`FeedPosition` **FEED_UNSPECIFIED** = ``0`` + +Unspecified position. + +.. _class_CameraFeed_constant_FEED_FRONT: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedPosition` **FEED_FRONT** = ``1`` + +Camera is mounted at the front of the device. + +.. _class_CameraFeed_constant_FEED_BACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedPosition` **FEED_BACK** = ``2`` + +Camera is mounted at the back of the device. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CameraFeed_property_feed_is_active: -- :ref:`bool` **feed_is_active** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_active(value) | -+-----------+-------------------+ -| *Getter* | is_active() | -+-----------+-------------------+ +:ref:`bool` **feed_is_active** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_active** **(** :ref:`bool` value **)** +- :ref:`bool` **is_active** **(** **)** If ``true``, the feed is active. +.. rst-class:: classref-item-separator + ---- .. _class_CameraFeed_property_feed_transform: -- :ref:`Transform2D` **feed_transform** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``Transform2D(1, 0, 0, -1, 0, 1)`` | -+-----------+------------------------------------+ -| *Setter* | set_transform(value) | -+-----------+------------------------------------+ -| *Getter* | get_transform() | -+-----------+------------------------------------+ +:ref:`Transform2D` **feed_transform** = ``Transform2D(1, 0, 0, -1, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_transform** **(** **)** The transform applied to the camera's image. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CameraFeed_method_get_datatype: -- :ref:`FeedDataType` **get_datatype** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`FeedDataType` **get_datatype** **(** **)** |const| Returns feed image data type. +.. rst-class:: classref-item-separator + ---- .. _class_CameraFeed_method_get_id: -- :ref:`int` **get_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_id** **(** **)** |const| Returns the unique ID for this feed. +.. rst-class:: classref-item-separator + ---- .. _class_CameraFeed_method_get_name: -- :ref:`String` **get_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_name** **(** **)** |const| Returns the camera's name. +.. rst-class:: classref-item-separator + ---- .. _class_CameraFeed_method_get_position: -- :ref:`FeedPosition` **get_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`FeedPosition` **get_position** **(** **)** |const| Returns the position of camera on the device. diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index d7aca229c..82a58f862 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -14,108 +14,175 @@ CameraServer Server keeping track of different cameras accessible in Godot. +.. rst-class:: classref-introduction-group + Description ----------- -The ``CameraServer`` keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. +The **CameraServer** keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. 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. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_CameraServer_signal_camera_feed_added: -- **camera_feed_added** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**camera_feed_added** **(** :ref:`int` id **)** Emitted when a :ref:`CameraFeed` is added (e.g. a webcam is plugged in). +.. rst-class:: classref-item-separator + ---- .. _class_CameraServer_signal_camera_feed_removed: -- **camera_feed_removed** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**camera_feed_removed** **(** :ref:`int` id **)** Emitted when a :ref:`CameraFeed` is removed (e.g. a webcam is unplugged). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_CameraServer_FeedImage: -.. _class_CameraServer_constant_FEED_RGBA_IMAGE: - -.. _class_CameraServer_constant_FEED_YCBCR_IMAGE: - -.. _class_CameraServer_constant_FEED_Y_IMAGE: - -.. _class_CameraServer_constant_FEED_CBCR_IMAGE: +.. rst-class:: classref-enumeration enum **FeedImage**: -- **FEED_RGBA_IMAGE** = **0** --- The RGBA camera image. +.. _class_CameraServer_constant_FEED_RGBA_IMAGE: -- **FEED_YCBCR_IMAGE** = **0** --- The `YCbCr `__ camera image. +.. rst-class:: classref-enumeration-constant -- **FEED_Y_IMAGE** = **0** --- The Y component camera image. +:ref:`FeedImage` **FEED_RGBA_IMAGE** = ``0`` -- **FEED_CBCR_IMAGE** = **1** --- The CbCr component camera image. +The RGBA camera image. + +.. _class_CameraServer_constant_FEED_YCBCR_IMAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedImage` **FEED_YCBCR_IMAGE** = ``0`` + +The `YCbCr `__ camera image. + +.. _class_CameraServer_constant_FEED_Y_IMAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedImage` **FEED_Y_IMAGE** = ``0`` + +The Y component camera image. + +.. _class_CameraServer_constant_FEED_CBCR_IMAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedImage` **FEED_CBCR_IMAGE** = ``1`` + +The CbCr component camera image. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CameraServer_method_add_feed: -- void **add_feed** **(** :ref:`CameraFeed` feed **)** +.. rst-class:: classref-method + +void **add_feed** **(** :ref:`CameraFeed` feed **)** Adds the camera ``feed`` to the camera server. +.. rst-class:: classref-item-separator + ---- .. _class_CameraServer_method_feeds: -- :ref:`CameraFeed[]` **feeds** **(** **)** +.. rst-class:: classref-method + +:ref:`CameraFeed[]` **feeds** **(** **)** Returns an array of :ref:`CameraFeed`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_CameraServer_method_get_feed: -- :ref:`CameraFeed` **get_feed** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +:ref:`CameraFeed` **get_feed** **(** :ref:`int` index **)** Returns the :ref:`CameraFeed` corresponding to the camera with the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_CameraServer_method_get_feed_count: -- :ref:`int` **get_feed_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_feed_count** **(** **)** Returns the number of :ref:`CameraFeed`\ s registered. +.. rst-class:: classref-item-separator + ---- .. _class_CameraServer_method_remove_feed: -- void **remove_feed** **(** :ref:`CameraFeed` feed **)** +.. rst-class:: classref-method + +void **remove_feed** **(** :ref:`CameraFeed` feed **)** Removes the specified camera ``feed``. diff --git a/classes/class_cameratexture.rst b/classes/class_cameratexture.rst index 7d081bce0..93ef91ab7 100644 --- a/classes/class_cameratexture.rst +++ b/classes/class_cameratexture.rst @@ -14,6 +14,8 @@ CameraTexture Texture provided by a :ref:`CameraFeed`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,65 +23,77 @@ This texture gives access to the camera texture provided by a :ref:`CameraFeed` | :ref:`camera_feed_id` | ``0`` | -+-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`camera_is_active` | ``false`` | -+-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`FeedImage` | :ref:`which_feed` | ``0`` | -+-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`camera_feed_id` | ``0`` | + +-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`camera_is_active` | ``false`` | + +-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`FeedImage` | :ref:`which_feed` | ``0`` | + +-----------------------------------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CameraTexture_property_camera_feed_id: -- :ref:`int` **camera_feed_id** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_camera_feed_id(value) | -+-----------+---------------------------+ -| *Getter* | get_camera_feed_id() | -+-----------+---------------------------+ +:ref:`int` **camera_feed_id** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_camera_feed_id** **(** :ref:`int` value **)** +- :ref:`int` **get_camera_feed_id** **(** **)** The ID of the :ref:`CameraFeed` for which we want to display the image. +.. rst-class:: classref-item-separator + ---- .. _class_CameraTexture_property_camera_is_active: -- :ref:`bool` **camera_is_active** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_camera_active(value) | -+-----------+--------------------------+ -| *Getter* | get_camera_active() | -+-----------+--------------------------+ +:ref:`bool` **camera_is_active** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_camera_active** **(** :ref:`bool` value **)** +- :ref:`bool` **get_camera_active** **(** **)** Convenience property that gives access to the active property of the :ref:`CameraFeed`. +.. rst-class:: classref-item-separator + ---- .. _class_CameraTexture_property_which_feed: -- :ref:`FeedImage` **which_feed** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_which_feed(value) | -+-----------+-----------------------+ -| *Getter* | get_which_feed() | -+-----------+-----------------------+ +:ref:`FeedImage` **which_feed** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_which_feed** **(** :ref:`FeedImage` value **)** +- :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. diff --git a/classes/class_canvasgroup.rst b/classes/class_canvasgroup.rst index 3221568a1..83cfc9298 100644 --- a/classes/class_canvasgroup.rst +++ b/classes/class_canvasgroup.rst @@ -12,71 +12,90 @@ CanvasGroup **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -.. container:: contribute +Merges several 2D nodes into a single draw operation. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Child :ref:`CanvasItem` nodes of a **CanvasGroup** are drawn as a single object. It allows to e.g. draw overlapping translucent 2D nodes without blending (set :ref:`CanvasItem.self_modulate` property of **CanvasGroup** to achieve this effect). + +\ **Note:** Since **CanvasGroup** and :ref:`CanvasItem.clip_children` both utilize the backbuffer, children of a **CanvasGroup** who have their :ref:`CanvasItem.clip_children` set to anything other than :ref:`CanvasItem.CLIP_CHILDREN_DISABLED` will not function correctly. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+--------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`clear_margin` | ``10.0`` | -+---------------------------+--------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fit_margin` | ``10.0`` | -+---------------------------+--------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_mipmaps` | ``false`` | -+---------------------------+--------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`clear_margin` | ``10.0`` | + +---------------------------+--------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`fit_margin` | ``10.0`` | + +---------------------------+--------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_mipmaps` | ``false`` | + +---------------------------+--------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CanvasGroup_property_clear_margin: -- :ref:`float` **clear_margin** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``10.0`` | -+-----------+-------------------------+ -| *Setter* | set_clear_margin(value) | -+-----------+-------------------------+ -| *Getter* | get_clear_margin() | -+-----------+-------------------------+ +:ref:`float` **clear_margin** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_clear_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_clear_margin** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_CanvasGroup_property_fit_margin: -- :ref:`float` **fit_margin** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``10.0`` | -+-----------+-----------------------+ -| *Setter* | set_fit_margin(value) | -+-----------+-----------------------+ -| *Getter* | get_fit_margin() | -+-----------+-----------------------+ +:ref:`float` **fit_margin** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_fit_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_fit_margin** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_CanvasGroup_property_use_mipmaps: -- :ref:`bool` **use_mipmaps** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_use_mipmaps(value) | -+-----------+------------------------+ -| *Getter* | is_using_mipmaps() | -+-----------+------------------------+ +:ref:`bool` **use_mipmaps** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_mipmaps** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_mipmaps** **(** **)** .. container:: contribute diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 0ff9f603e..a0139ea70 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -16,21 +16,25 @@ CanvasItem Base class of anything 2D. +.. rst-class:: classref-introduction-group + Description ----------- -Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. ``CanvasItem`` is extended by :ref:`Control` for anything GUI-related, and by :ref:`Node2D` for anything related to the 2D engine. +Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. **CanvasItem** is extended by :ref:`Control` for anything GUI-related, and by :ref:`Node2D` for anything related to the 2D engine. -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 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 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. 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 also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. +A **CanvasItem** can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. \ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg_to_rad`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -40,580 +44,847 @@ Tutorials - `Audio Spectrum Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`ClipChildrenMode` | :ref:`clip_children` | ``0`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`light_mask` | ``1`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`Material` | :ref:`material` | | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`self_modulate` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`show_behind_parent` | ``false`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`top_level` | ``false`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`use_parent_material` | ``false`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`visibility_layer` | ``1`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`visible` | ``true`` | -+-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`ClipChildrenMode` | :ref:`clip_children` | ``0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`light_mask` | ``1`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`Material` | :ref:`material` | | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`self_modulate` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`show_behind_parent` | ``false`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`top_level` | ``false`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`use_parent_material` | ``false`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`visibility_layer` | ``1`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`visible` | ``true`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`y_sort_enabled` | ``false`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`z_as_relative` | ``true`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`z_index` | ``0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_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, :ref:`float` width=1.0 **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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), :ref:`JustificationFlag` jst_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), :ref:`JustificationFlag` jst_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` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_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, :ref:`float` width=1.0 **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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), :ref:`JustificationFlag` jst_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), :ref:`JustificationFlag` jst_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` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_CanvasItem_signal_draw: -- **draw** **(** **)** +.. rst-class:: classref-signal -Emitted when the ``CanvasItem`` must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw` is called. +**draw** **(** **)** + +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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_signal_hidden: -- **hidden** **(** **)** +.. rst-class:: classref-signal + +**hidden** **(** **)** Emitted when becoming hidden. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_signal_item_rect_changed: -- **item_rect_changed** **(** **)** +.. rst-class:: classref-signal + +**item_rect_changed** **(** **)** 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`). +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_signal_visibility_changed: -- **visibility_changed** **(** **)** +.. rst-class:: classref-signal + +**visibility_changed** **(** **)** Emitted when the visibility (hidden/visible) changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_CanvasItem_TextureFilter: -.. _class_CanvasItem_constant_TEXTURE_FILTER_PARENT_NODE: - -.. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST: - -.. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR: - -.. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: - -.. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: - -.. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: - -.. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: - -.. _class_CanvasItem_constant_TEXTURE_FILTER_MAX: +.. rst-class:: classref-enumeration enum **TextureFilter**: -- **TEXTURE_FILTER_PARENT_NODE** = **0** --- The ``CanvasItem`` will inherit the filter from its parent. +.. _class_CanvasItem_constant_TEXTURE_FILTER_PARENT_NODE: -- **TEXTURE_FILTER_NEAREST** = **1** --- The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`TextureFilter` **TEXTURE_FILTER_PARENT_NODE** = ``0`` -- **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 **CanvasItem** will inherit the filter from its parent. -- **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. +.. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST: -- **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`. +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +: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. + +.. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +: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`. \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate. -- **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`. +.. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +: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`. \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate. -- **TEXTURE_FILTER_MAX** = **7** --- Represents the size of the :ref:`TextureFilter` enum. +.. _class_CanvasItem_constant_TEXTURE_FILTER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **TEXTURE_FILTER_MAX** = ``7`` + +Represents the size of the :ref:`TextureFilter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_CanvasItem_TextureRepeat: -.. _class_CanvasItem_constant_TEXTURE_REPEAT_PARENT_NODE: - -.. _class_CanvasItem_constant_TEXTURE_REPEAT_DISABLED: - -.. _class_CanvasItem_constant_TEXTURE_REPEAT_ENABLED: - -.. _class_CanvasItem_constant_TEXTURE_REPEAT_MIRROR: - -.. _class_CanvasItem_constant_TEXTURE_REPEAT_MAX: +.. rst-class:: classref-enumeration enum **TextureRepeat**: -- **TEXTURE_REPEAT_PARENT_NODE** = **0** --- The ``CanvasItem`` will inherit the filter from its parent. +.. _class_CanvasItem_constant_TEXTURE_REPEAT_PARENT_NODE: -- **TEXTURE_REPEAT_DISABLED** = **1** --- Texture will not repeat. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_REPEAT_ENABLED** = **2** --- Texture will repeat normally. +:ref:`TextureRepeat` **TEXTURE_REPEAT_PARENT_NODE** = ``0`` -- **TEXTURE_REPEAT_MIRROR** = **3** --- Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored. +The **CanvasItem** will inherit the filter from its parent. -- **TEXTURE_REPEAT_MAX** = **4** --- Represents the size of the :ref:`TextureRepeat` enum. +.. _class_CanvasItem_constant_TEXTURE_REPEAT_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureRepeat` **TEXTURE_REPEAT_DISABLED** = ``1`` + +Texture will not repeat. + +.. _class_CanvasItem_constant_TEXTURE_REPEAT_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureRepeat` **TEXTURE_REPEAT_ENABLED** = ``2`` + +Texture will repeat normally. + +.. _class_CanvasItem_constant_TEXTURE_REPEAT_MIRROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureRepeat` **TEXTURE_REPEAT_MIRROR** = ``3`` + +Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored. + +.. _class_CanvasItem_constant_TEXTURE_REPEAT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureRepeat` **TEXTURE_REPEAT_MAX** = ``4`` + +Represents the size of the :ref:`TextureRepeat` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_CanvasItem_ClipChildrenMode: -.. _class_CanvasItem_constant_CLIP_CHILDREN_DISABLED: - -.. _class_CanvasItem_constant_CLIP_CHILDREN_ONLY: - -.. _class_CanvasItem_constant_CLIP_CHILDREN_AND_DRAW: - -.. _class_CanvasItem_constant_CLIP_CHILDREN_MAX: +.. rst-class:: classref-enumeration enum **ClipChildrenMode**: -- **CLIP_CHILDREN_DISABLED** = **0** +.. _class_CanvasItem_constant_CLIP_CHILDREN_DISABLED: -- **CLIP_CHILDREN_ONLY** = **1** +.. rst-class:: classref-enumeration-constant -- **CLIP_CHILDREN_AND_DRAW** = **2** +:ref:`ClipChildrenMode` **CLIP_CHILDREN_DISABLED** = ``0`` -- **CLIP_CHILDREN_MAX** = **3** +Child draws over parent and is not clipped. + +.. _class_CanvasItem_constant_CLIP_CHILDREN_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ClipChildrenMode` **CLIP_CHILDREN_ONLY** = ``1`` + +Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn. + +.. _class_CanvasItem_constant_CLIP_CHILDREN_AND_DRAW: + +.. rst-class:: classref-enumeration-constant + +:ref:`ClipChildrenMode` **CLIP_CHILDREN_AND_DRAW** = ``2`` + +Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area. + +.. _class_CanvasItem_constant_CLIP_CHILDREN_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ClipChildrenMode` **CLIP_CHILDREN_MAX** = ``3`` + +Represents the size of the :ref:`ClipChildrenMode` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_CanvasItem_constant_NOTIFICATION_TRANSFORM_CHANGED: +.. rst-class:: classref-constant + +**NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` + +The **CanvasItem**'s global transform has changed. This notification is only received if enabled by :ref:`set_notify_transform`. + .. _class_CanvasItem_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: +.. rst-class:: classref-constant + +**NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``35`` + +The **CanvasItem**'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform`. + .. _class_CanvasItem_constant_NOTIFICATION_DRAW: +.. rst-class:: classref-constant + +**NOTIFICATION_DRAW** = ``30`` + +The **CanvasItem** is requested to draw (see :ref:`_draw`). + .. _class_CanvasItem_constant_NOTIFICATION_VISIBILITY_CHANGED: +.. rst-class:: classref-constant + +**NOTIFICATION_VISIBILITY_CHANGED** = ``31`` + +The **CanvasItem**'s visibility has changed. + .. _class_CanvasItem_constant_NOTIFICATION_ENTER_CANVAS: +.. rst-class:: classref-constant + +**NOTIFICATION_ENTER_CANVAS** = ``32`` + +The **CanvasItem** has entered the canvas. + .. _class_CanvasItem_constant_NOTIFICATION_EXIT_CANVAS: -- **NOTIFICATION_TRANSFORM_CHANGED** = **2000** --- The ``CanvasItem``'s global transform has changed. This notification is only received if enabled by :ref:`set_notify_transform`. +.. rst-class:: classref-constant -- **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = **35** --- The ``CanvasItem``'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform`. +**NOTIFICATION_EXIT_CANVAS** = ``33`` -- **NOTIFICATION_DRAW** = **30** --- The ``CanvasItem`` is requested to draw (see :ref:`_draw`). +The **CanvasItem** has exited the canvas. -- **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- The ``CanvasItem``'s visibility has changed. +.. rst-class:: classref-section-separator -- **NOTIFICATION_ENTER_CANVAS** = **32** --- The ``CanvasItem`` has entered the canvas. +---- -- **NOTIFICATION_EXIT_CANVAS** = **33** --- The ``CanvasItem`` has exited the canvas. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CanvasItem_property_clip_children: -- :ref:`ClipChildrenMode` **clip_children** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_clip_children_mode(value) | -+-----------+-------------------------------+ -| *Getter* | get_clip_children_mode() | -+-----------+-------------------------------+ +:ref:`ClipChildrenMode` **clip_children** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_clip_children_mode** **(** :ref:`ClipChildrenMode` value **)** +- :ref:`ClipChildrenMode` **get_clip_children_mode** **(** **)** Allows the current node to clip children nodes, essentially acting as a mask. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_property_light_mask: -- :ref:`int` **light_mask** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1`` | -+-----------+-----------------------+ -| *Setter* | set_light_mask(value) | -+-----------+-----------------------+ -| *Getter* | get_light_mask() | -+-----------+-----------------------+ +:ref:`int` **light_mask** = ``1`` -The rendering layers in which this ``CanvasItem`` responds to :ref:`Light2D` nodes. +.. rst-class:: classref-property-setget + +- void **set_light_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_light_mask** **(** **)** + +The rendering layers in which this **CanvasItem** responds to :ref:`Light2D` nodes. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** -The material applied to textures on this ``CanvasItem``. +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** + +The material applied to textures on this **CanvasItem**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_modulate: -- :ref:`Color` **modulate** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_modulate(value) | -+-----------+-----------------------+ -| *Getter* | get_modulate() | -+-----------+-----------------------+ +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` -The color applied to textures on this ``CanvasItem``. +.. rst-class:: classref-property-setget + +- void **set_modulate** **(** :ref:`Color` value **)** +- :ref:`Color` **get_modulate** **(** **)** + +The color applied to textures on this **CanvasItem**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_self_modulate: -- :ref:`Color` **self_modulate** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_self_modulate(value) | -+-----------+--------------------------+ -| *Getter* | get_self_modulate() | -+-----------+--------------------------+ +:ref:`Color` **self_modulate** = ``Color(1, 1, 1, 1)`` -The color applied to textures on this ``CanvasItem``. This is not inherited by children ``CanvasItem``\ s. +.. rst-class:: classref-property-setget + +- void **set_self_modulate** **(** :ref:`Color` value **)** +- :ref:`Color` **get_self_modulate** **(** **)** + +The color applied to textures on this **CanvasItem**. This is not inherited by children **CanvasItem**\ s. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_show_behind_parent: -- :ref:`bool` **show_behind_parent** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_draw_behind_parent(value) | -+-----------+---------------------------------+ -| *Getter* | is_draw_behind_parent_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **show_behind_parent** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_behind_parent** **(** :ref:`bool` value **)** +- :ref:`bool` **is_draw_behind_parent_enabled** **(** **)** If ``true``, the object draws behind its parent. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_property_texture_filter: -- :ref:`TextureFilter` **texture_filter** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_texture_filter(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_filter() | -+-----------+---------------------------+ +:ref:`TextureFilter` **texture_filter** = ``0`` -The texture filtering mode to use on this ``CanvasItem``. +.. rst-class:: classref-property-setget + +- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** +- :ref:`TextureFilter` **get_texture_filter** **(** **)** + +The texture filtering mode to use on this **CanvasItem**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_texture_repeat: -- :ref:`TextureRepeat` **texture_repeat** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_texture_repeat(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_repeat() | -+-----------+---------------------------+ +:ref:`TextureRepeat` **texture_repeat** = ``0`` -The texture repeating mode to use on this ``CanvasItem``. +.. rst-class:: classref-property-setget + +- void **set_texture_repeat** **(** :ref:`TextureRepeat` value **)** +- :ref:`TextureRepeat` **get_texture_repeat** **(** **)** + +The texture repeating mode to use on this **CanvasItem**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_top_level: -- :ref:`bool` **top_level** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_as_top_level(value) | -+-----------+-------------------------+ -| *Getter* | is_set_as_top_level() | -+-----------+-------------------------+ +:ref:`bool` **top_level** = ``false`` -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`. +.. rst-class:: classref-property-setget + +- void **set_as_top_level** **(** :ref:`bool` value **)** +- :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`. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_use_parent_material: -- :ref:`bool` **use_parent_material** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_use_parent_material(value) | -+-----------+--------------------------------+ -| *Getter* | get_use_parent_material() | -+-----------+--------------------------------+ +:ref:`bool` **use_parent_material** = ``false`` -If ``true``, the parent ``CanvasItem``'s :ref:`material` property is used as this one's material. +.. rst-class:: classref-property-setget + +- void **set_use_parent_material** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_parent_material** **(** **)** + +If ``true``, the parent **CanvasItem**'s :ref:`material` property is used as this one's material. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_visibility_layer: -- :ref:`int` **visibility_layer** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_visibility_layer(value) | -+-----------+-----------------------------+ -| *Getter* | get_visibility_layer() | -+-----------+-----------------------------+ +:ref:`int` **visibility_layer** = ``1`` -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. +.. rst-class:: classref-property-setget + +- void **set_visibility_layer** **(** :ref:`int` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_property_visible: -- :ref:`bool` **visible** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_visible(value) | -+-----------+--------------------+ -| *Getter* | is_visible() | -+-----------+--------------------+ +:ref:`bool` **visible** = ``true`` -If ``true``, this ``CanvasItem`` is drawn. The node is only visible if all of its antecedents are visible as well (in other words, :ref:`is_visible_in_tree` must return ``true``). +.. rst-class:: classref-property-setget + +- void **set_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_visible** **(** **)** + +If ``true``, this **CanvasItem** is drawn. The node is only visible if all of its antecedents are visible as well (in other words, :ref:`is_visible_in_tree` must return ``true``). \ **Note:** For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. +.. rst-class:: classref-item-separator + +---- + +.. _class_CanvasItem_property_y_sort_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **y_sort_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_y_sort_enabled** **(** :ref:`bool` value **)** +- :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**. + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CanvasItem_property_z_as_relative: + +.. rst-class:: classref-property + +:ref:`bool` **z_as_relative** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_z_as_relative** **(** :ref:`bool` value **)** +- :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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CanvasItem_property_z_index: + +.. rst-class:: classref-property + +:ref:`int` **z_index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_z_index** **(** :ref:`int` value **)** +- :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). + +\ **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. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CanvasItem_method__draw: -- void **_draw** **(** **)** |virtual| +.. rst-class:: classref-method -Called when ``CanvasItem`` has been requested to redraw (after :ref:`queue_redraw` is called, either manually or by the engine). +void **_draw** **(** **)** |virtual| + +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`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_animation_slice: -- void **draw_animation_slice** **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** +.. rst-class:: classref-method + +void **draw_animation_slice** **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_arc: -- 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 **)** +.. 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 **)** Draws a unfilled arc between the given angles. The larger the value of ``point_count``, the smoother the curve. See also :ref:`draw_circle`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_char: -- 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| +.. 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| Draws a string first character using a custom font. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_char_outline: -- 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| +.. 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| Draws a string first character outline using a custom font. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_circle: -- void **draw_circle** **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **draw_circle** **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** Draws a colored, filled circle. See also :ref:`draw_arc`, :ref:`draw_polyline` and :ref:`draw_polygon`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_colored_polygon: -- void **draw_colored_polygon** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** +.. rst-class:: classref-method + +void **draw_colored_polygon** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_dashed_line: -- void **draw_dashed_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`float` dash=2.0 **)** +.. 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 **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_end_animation: -- void **draw_end_animation** **(** **)** +.. rst-class:: classref-method + +void **draw_end_animation** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_lcd_texture_rect_region: -- void **draw_lcd_texture_rect_region** **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +.. rst-class:: classref-method + +void **draw_lcd_texture_rect_region** **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. @@ -626,27 +897,39 @@ Texture is drawn using the following blend operation, blend mode of the :ref:`Ca dst.b = texture.b * modulate.b * modulate.a + dst.b * (1.0 - texture.b * modulate.a); dst.a = modulate.a + dst.a * (1.0 - modulate.a); +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_line: -- void **draw_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** +.. 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 **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_mesh: -- 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) **)** +.. 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) **)** Draws a :ref:`Mesh` in 2D, using the provided texture. See :ref:`MeshInstance2D` for related documentation. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_msdf_texture_rect_region: -- 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 **)** +.. 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 **)** 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. @@ -654,109 +937,161 @@ If ``outline`` is positive, each alpha channel value of pixel in region is set t Value of the ``pixel_range`` should the same that was used during distance field texture generation. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_multiline: -- void **draw_multiline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=1.0 **)** +.. rst-class:: classref-method + +void **draw_multiline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=1.0 **)** Draws multiple disconnected lines with a uniform ``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` instead. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_multiline_colors: -- void **draw_multiline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0 **)** +.. rst-class:: classref-method + +void **draw_multiline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0 **)** Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Colors assigned to line segments match by index between ``points`` and ``colors``. 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_multiline_string: -- 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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. 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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_multiline_string_outline: -- 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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. 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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_multimesh: -- void **draw_multimesh** **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **draw_multimesh** **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** Draws a :ref:`MultiMesh` in 2D with the provided texture. See :ref:`MultiMeshInstance2D` for related documentation. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_polygon: -- void **draw_polygon** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** +.. rst-class:: classref-method + +void **draw_polygon** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_polyline: -- void **draw_polyline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** +.. rst-class:: classref-method + +void **draw_polyline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing. 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`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_polyline_colors: -- void **draw_polyline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** +.. rst-class:: classref-method + +void **draw_polyline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** Draws interconnected line segments with a uniform ``width`` and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between ``points`` and ``colors``. 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`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_primitive: -- void **draw_primitive** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null, :ref:`float` width=1.0 **)** +.. rst-class:: classref-method + +void **draw_primitive** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null, :ref:`float` width=1.0 **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_rect: -- void **draw_rect** **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=1.0 **)** +.. rst-class:: classref-method + +void **draw_rect** **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=1.0 **)** 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. \ **Note:** ``width`` is only effective if ``filled`` is ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_set_transform: -- void **draw_set_transform** **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** +.. rst-class:: classref-method + +void **draw_set_transform** **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_set_transform_matrix: -- void **draw_set_transform_matrix** **(** :ref:`Transform2D` xform **)** +.. rst-class:: classref-method + +void **draw_set_transform_matrix** **(** :ref:`Transform2D` xform **)** Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_string: -- 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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. 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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. @@ -787,257 +1122,381 @@ Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner u See also :ref:`Font.draw_string`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_string_outline: -- 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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. 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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_style_box: -- void **draw_style_box** **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** +.. rst-class:: classref-method + +void **draw_style_box** **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** Draws a styled rectangle. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_texture: -- void **draw_texture** **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +.. rst-class:: classref-method + +void **draw_texture** **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** Draws a texture at a given position. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_texture_rect: -- 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 **)** +.. 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 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_draw_texture_rect_region: -- 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 **)** +.. 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 **)** Draws a textured rectangle region at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_force_update_transform: -- void **force_update_transform** **(** **)** +.. rst-class:: classref-method + +void **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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_canvas: -- :ref:`RID` **get_canvas** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_canvas** **(** **)** |const| Returns the :ref:`RID` of the :ref:`World2D` canvas where this item is in. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_canvas_item: -- :ref:`RID` **get_canvas_item** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_canvas_item** **(** **)** |const| Returns the canvas item RID used by :ref:`RenderingServer` for this item. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_canvas_transform: -- :ref:`Transform2D` **get_canvas_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_canvas_transform** **(** **)** |const| Returns the transform matrix of this item's canvas. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_global_mouse_position: -- :ref:`Vector2` **get_global_mouse_position** **(** **)** |const| +.. rst-class:: classref-method -Returns the mouse's position in the :ref:`CanvasLayer` that this ``CanvasItem`` is in using the coordinate system of the :ref:`CanvasLayer`. +:ref:`Vector2` **get_global_mouse_position** **(** **)** |const| + +Returns the mouse's position in the :ref:`CanvasLayer` that this **CanvasItem** is in using the coordinate system of the :ref:`CanvasLayer`. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_method_get_global_transform: -- :ref:`Transform2D` **get_global_transform** **(** **)** |const| +.. rst-class:: classref-method -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. +:ref:`Transform2D` **get_global_transform** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_method_get_global_transform_with_canvas: -- :ref:`Transform2D` **get_global_transform_with_canvas** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_global_transform_with_canvas** **(** **)** |const| Returns the global transform matrix of this item in relation to the canvas. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_local_mouse_position: -- :ref:`Vector2` **get_local_mouse_position** **(** **)** |const| +.. rst-class:: classref-method -Returns the mouse's position in this ``CanvasItem`` using the local coordinate system of this ``CanvasItem``. +:ref:`Vector2` **get_local_mouse_position** **(** **)** |const| + +Returns the mouse's position in this **CanvasItem** using the local coordinate system of this **CanvasItem**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_method_get_screen_transform: -- :ref:`Transform2D` **get_screen_transform** **(** **)** |const| +.. rst-class:: classref-method -Returns the transform of this ``CanvasItem`` in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. +:ref:`Transform2D` **get_screen_transform** **(** **)** |const| + +Returns the transform of this **CanvasItem** in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. Equals to :ref:`get_global_transform` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_transform: -- :ref:`Transform2D` **get_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_transform** **(** **)** |const| Returns the transform matrix of this item. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_viewport_rect: -- :ref:`Rect2` **get_viewport_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_viewport_rect** **(** **)** |const| Returns the viewport's boundaries as a :ref:`Rect2`. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_viewport_transform: -- :ref:`Transform2D` **get_viewport_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_viewport_transform** **(** **)** |const| Returns this item's transform in relation to the viewport. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_visibility_layer_bit: -- :ref:`bool` **get_visibility_layer_bit** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_visibility_layer_bit** **(** :ref:`int` layer **)** |const| Returns an individual bit on the rendering visibility layer. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_get_world_2d: -- :ref:`World2D` **get_world_2d** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`World2D` **get_world_2d** **(** **)** |const| Returns the :ref:`World2D` where this item is in. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_hide: -- void **hide** **(** **)** +.. rst-class:: classref-method -Hide the ``CanvasItem`` if it's currently visible. This is equivalent to setting :ref:`visible` to ``false``. +void **hide** **(** **)** + +Hide the **CanvasItem** if it's currently visible. This is equivalent to setting :ref:`visible` to ``false``. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_method_is_local_transform_notification_enabled: -- :ref:`bool` **is_local_transform_notification_enabled** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_local_transform_notification_enabled** **(** **)** |const| Returns ``true`` if local transform notifications are communicated to children. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_is_transform_notification_enabled: -- :ref:`bool` **is_transform_notification_enabled** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_transform_notification_enabled** **(** **)** |const| Returns ``true`` if global transform notifications are communicated to children. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_is_visible_in_tree: -- :ref:`bool` **is_visible_in_tree** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_visible_in_tree** **(** **)** |const| Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see :ref:`_draw`). +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_make_canvas_position_local: -- :ref:`Vector2` **make_canvas_position_local** **(** :ref:`Vector2` screen_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **make_canvas_position_local** **(** :ref:`Vector2` screen_point **)** |const| Assigns ``screen_point`` as this node's new local transform. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_make_input_local: -- :ref:`InputEvent` **make_input_local** **(** :ref:`InputEvent` event **)** |const| +.. rst-class:: classref-method + +:ref:`InputEvent` **make_input_local** **(** :ref:`InputEvent` event **)** |const| Transformations issued by ``event``'s inputs are applied in local space instead of global space. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_move_to_front: -- void **move_to_front** **(** **)** +.. rst-class:: classref-method -Moves this node to display on top of its siblings. This has more use in :ref:`Control`, as :ref:`Node2D` can be ordered with :ref:`Node2D.z_index`. +void **move_to_front** **(** **)** + +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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_queue_redraw: -- void **queue_redraw** **(** **)** +.. rst-class:: classref-method -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. +void **queue_redraw** **(** **)** + +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 ---- .. _class_CanvasItem_method_set_notify_local_transform: -- void **set_notify_local_transform** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_notify_local_transform** **(** :ref:`bool` enable **)** If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` when its local transform changes. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_set_notify_transform: -- void **set_notify_transform** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_notify_transform** **(** :ref:`bool` enable **)** If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_TRANSFORM_CHANGED` when its global transform changes. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItem_method_set_visibility_layer_bit: -- void **set_visibility_layer_bit** **(** :ref:`int` layer, :ref:`bool` enabled **)** +.. rst-class:: classref-method -Set/clear individual bits on the rendering visibility layer. This simplifies editing this ``CanvasItem``'s visibility layer. +void **set_visibility_layer_bit** **(** :ref:`int` layer, :ref:`bool` enabled **)** + +Set/clear individual bits on the rendering visibility layer. This simplifies editing this **CanvasItem**'s visibility layer. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasItem_method_show: -- void **show** **(** **)** +.. rst-class:: classref-method -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. +void **show** **(** **)** + +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. .. |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.)` diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index e8ffcc3e9..99e2bf38e 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -14,167 +14,234 @@ CanvasItemMaterial A material for :ref:`CanvasItem`\ s. +.. rst-class:: classref-introduction-group + Description ----------- -``CanvasItemMaterial``\ s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a :ref:`ShaderMaterial` to more fully customize a material's interactions with a :ref:`CanvasItem`. +**CanvasItemMaterial**\ s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a :ref:`ShaderMaterial` to more fully customize a material's interactions with a :ref:`CanvasItem`. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ -| :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ -| :ref:`LightMode` | :ref:`light_mode` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`particles_anim_h_frames` | | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`particles_anim_loop` | | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`particles_anim_v_frames` | | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`particles_animation` | ``false`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ + | :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ + | :ref:`LightMode` | :ref:`light_mode` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`particles_anim_h_frames` | | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`particles_anim_loop` | | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`particles_anim_v_frames` | | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`particles_animation` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CanvasItemMaterial_BlendMode: -.. _class_CanvasItemMaterial_constant_BLEND_MODE_MIX: - -.. _class_CanvasItemMaterial_constant_BLEND_MODE_ADD: - -.. _class_CanvasItemMaterial_constant_BLEND_MODE_SUB: - -.. _class_CanvasItemMaterial_constant_BLEND_MODE_MUL: - -.. _class_CanvasItemMaterial_constant_BLEND_MODE_PREMULT_ALPHA: +.. rst-class:: classref-enumeration enum **BlendMode**: -- **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. +.. _class_CanvasItemMaterial_constant_BLEND_MODE_MIX: -- **BLEND_MODE_ADD** = **1** --- Additive blending mode. +.. rst-class:: classref-enumeration-constant -- **BLEND_MODE_SUB** = **2** --- Subtractive blending mode. +:ref:`BlendMode` **BLEND_MODE_MIX** = ``0`` -- **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode. +Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. -- **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. +.. _class_CanvasItemMaterial_constant_BLEND_MODE_ADD: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_ADD** = ``1`` + +Additive blending mode. + +.. _class_CanvasItemMaterial_constant_BLEND_MODE_SUB: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_SUB** = ``2`` + +Subtractive blending mode. + +.. _class_CanvasItemMaterial_constant_BLEND_MODE_MUL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_MUL** = ``3`` + +Multiplicative blending mode. + +.. _class_CanvasItemMaterial_constant_BLEND_MODE_PREMULT_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_PREMULT_ALPHA** = ``4`` + +Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. + +.. rst-class:: classref-item-separator ---- .. _enum_CanvasItemMaterial_LightMode: -.. _class_CanvasItemMaterial_constant_LIGHT_MODE_NORMAL: - -.. _class_CanvasItemMaterial_constant_LIGHT_MODE_UNSHADED: - -.. _class_CanvasItemMaterial_constant_LIGHT_MODE_LIGHT_ONLY: +.. rst-class:: classref-enumeration enum **LightMode**: -- **LIGHT_MODE_NORMAL** = **0** --- Render the material using both light and non-light sensitive material properties. +.. _class_CanvasItemMaterial_constant_LIGHT_MODE_NORMAL: -- **LIGHT_MODE_UNSHADED** = **1** --- Render the material as if there were no light. +.. rst-class:: classref-enumeration-constant -- **LIGHT_MODE_LIGHT_ONLY** = **2** --- Render the material as if there were only light. +:ref:`LightMode` **LIGHT_MODE_NORMAL** = ``0`` + +Render the material using both light and non-light sensitive material properties. + +.. _class_CanvasItemMaterial_constant_LIGHT_MODE_UNSHADED: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightMode` **LIGHT_MODE_UNSHADED** = ``1`` + +Render the material as if there were no light. + +.. _class_CanvasItemMaterial_constant_LIGHT_MODE_LIGHT_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightMode` **LIGHT_MODE_LIGHT_ONLY** = ``2`` + +Render the material as if there were only light. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CanvasItemMaterial_property_blend_mode: -- :ref:`BlendMode` **blend_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_blend_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_blend_mode() | -+-----------+-----------------------+ +:ref:`BlendMode` **blend_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_blend_mode** **(** :ref:`BlendMode` value **)** +- :ref:`BlendMode` **get_blend_mode** **(** **)** The manner in which a material's rendering is applied to underlying textures. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItemMaterial_property_light_mode: -- :ref:`LightMode` **light_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_light_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_light_mode() | -+-----------+-----------------------+ +:ref:`LightMode` **light_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_light_mode** **(** :ref:`LightMode` value **)** +- :ref:`LightMode` **get_light_mode** **(** **)** The manner in which material reacts to lighting. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItemMaterial_property_particles_anim_h_frames: -- :ref:`int` **particles_anim_h_frames** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_particles_anim_h_frames(value) | -+----------+------------------------------------+ -| *Getter* | get_particles_anim_h_frames() | -+----------+------------------------------------+ +:ref:`int` **particles_anim_h_frames** + +.. rst-class:: classref-property-setget + +- void **set_particles_anim_h_frames** **(** :ref:`int` value **)** +- :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`. \ **Note:** This property is only used and visible in the editor if :ref:`particles_animation` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItemMaterial_property_particles_anim_loop: -- :ref:`bool` **particles_anim_loop** +.. rst-class:: classref-property -+----------+--------------------------------+ -| *Setter* | set_particles_anim_loop(value) | -+----------+--------------------------------+ -| *Getter* | get_particles_anim_loop() | -+----------+--------------------------------+ +:ref:`bool` **particles_anim_loop** + +.. rst-class:: classref-property-setget + +- void **set_particles_anim_loop** **(** :ref:`bool` value **)** +- :ref:`bool` **get_particles_anim_loop** **(** **)** If ``true``, the particles animation will loop. \ **Note:** This property is only used and visible in the editor if :ref:`particles_animation` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItemMaterial_property_particles_anim_v_frames: -- :ref:`int` **particles_anim_v_frames** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_particles_anim_v_frames(value) | -+----------+------------------------------------+ -| *Getter* | get_particles_anim_v_frames() | -+----------+------------------------------------+ +:ref:`int` **particles_anim_v_frames** + +.. rst-class:: classref-property-setget + +- void **set_particles_anim_v_frames** **(** :ref:`int` value **)** +- :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`. \ **Note:** This property is only used and visible in the editor if :ref:`particles_animation` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasItemMaterial_property_particles_animation: -- :ref:`bool` **particles_animation** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_particles_animation(value) | -+-----------+--------------------------------+ -| *Getter* | get_particles_animation() | -+-----------+--------------------------------+ +:ref:`bool` **particles_animation** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_particles_animation** **(** :ref:`bool` value **)** +- :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. diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 9e92e1dcb..3677aee8f 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -16,13 +16,17 @@ CanvasLayer Canvas drawing layer. +.. rst-class:: classref-introduction-group + Description ----------- -Canvas drawing layer. :ref:`CanvasItem` nodes that are direct or indirect children of a ``CanvasLayer`` will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a ``CanvasLayer`` with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). +Canvas drawing layer. :ref:`CanvasItem` nodes that are direct or indirect children of a **CanvasLayer** will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a **CanvasLayer** with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). Embedded :ref:`Window`\ s are placed in layer 1024. CanvasItems in layer 1025 or above appear in front of embedded windows, CanvasItems in layer 1023 or below appear behind embedded windows. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,220 +36,269 @@ Tutorials - `2D Dodge The Creeps Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Node` | :ref:`custom_viewport` | | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`follow_viewport_enabled` | ``false`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`follow_viewport_scale` | ``1.0`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`layer` | ``1`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`rotation` | ``0.0`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`visible` | ``true`` | -+---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Node` | :ref:`custom_viewport` | | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`follow_viewport_enabled` | ``false`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`follow_viewport_scale` | ``1.0`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`layer` | ``1`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`rotation` | ``0.0`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`visible` | ``true`` | + +---------------------------------------+------------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+----------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | -+-----------------------+----------------------------------------------------------------------------+ -| void | :ref:`hide` **(** **)** | -+-----------------------+----------------------------------------------------------------------------+ -| void | :ref:`show` **(** **)** | -+-----------------------+----------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | + +-----------------------+----------------------------------------------------------------------------+ + | void | :ref:`hide` **(** **)** | + +-----------------------+----------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +-----------------------+----------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_CanvasLayer_signal_visibility_changed: -- **visibility_changed** **(** **)** +.. rst-class:: classref-signal + +**visibility_changed** **(** **)** Emitted when visibility of the layer is changed. See :ref:`visible`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_CanvasLayer_property_custom_viewport: -- :ref:`Node` **custom_viewport** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_custom_viewport(value) | -+----------+----------------------------+ -| *Getter* | get_custom_viewport() | -+----------+----------------------------+ +:ref:`Node` **custom_viewport** -The custom :ref:`Viewport` node assigned to the ``CanvasLayer``. If ``null``, uses the default viewport instead. +.. rst-class:: classref-property-setget + +- void **set_custom_viewport** **(** :ref:`Node` value **)** +- :ref:`Node` **get_custom_viewport** **(** **)** + +The custom :ref:`Viewport` node assigned to the **CanvasLayer**. If ``null``, uses the default viewport instead. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasLayer_property_follow_viewport_enabled: -- :ref:`bool` **follow_viewport_enabled** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_follow_viewport(value) | -+-----------+----------------------------+ -| *Getter* | is_following_viewport() | -+-----------+----------------------------+ +:ref:`bool` **follow_viewport_enabled** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_follow_viewport** **(** :ref:`bool` value **)** +- :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. Together with :ref:`follow_viewport_scale` it can be used for a pseudo 3D effect. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_property_follow_viewport_scale: -- :ref:`float` **follow_viewport_scale** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------------+ -| *Setter* | set_follow_viewport_scale(value) | -+-----------+----------------------------------+ -| *Getter* | get_follow_viewport_scale() | -+-----------+----------------------------------+ +:ref:`float` **follow_viewport_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_follow_viewport_scale** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_property_layer: -- :ref:`int` **layer** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1`` | -+-----------+------------------+ -| *Setter* | set_layer(value) | -+-----------+------------------+ -| *Getter* | get_layer() | -+-----------+------------------+ +:ref:`int` **layer** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_layer** **(** :ref:`int` value **)** +- :ref:`int` **get_layer** **(** **)** Layer index for draw order. Lower values are drawn first. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The layer's base offset. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_property_rotation: -- :ref:`float` **rotation** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_rotation(value) | -+-----------+---------------------+ -| *Getter* | get_rotation() | -+-----------+---------------------+ +:ref:`float` **rotation** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_rotation** **(** :ref:`float` value **)** +- :ref:`float` **get_rotation** **(** **)** The layer's rotation in radians. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_property_scale: -- :ref:`Vector2` **scale** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------+ -| *Setter* | set_scale(value) | -+-----------+-------------------+ -| *Getter* | get_scale() | -+-----------+-------------------+ +:ref:`Vector2` **scale** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_scale** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_scale** **(** **)** The layer's scale. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_property_transform: -- :ref:`Transform2D` **transform** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+-----------+-----------------------------------+ -| *Setter* | set_transform(value) | -+-----------+-----------------------------------+ -| *Getter* | get_transform() | -+-----------+-----------------------------------+ +:ref:`Transform2D` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_transform** **(** **)** The layer's transform. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_property_visible: -- :ref:`bool` **visible** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_visible(value) | -+-----------+--------------------+ -| *Getter* | is_visible() | -+-----------+--------------------+ +:ref:`bool` **visible** = ``true`` -If ``false``, any :ref:`CanvasItem` under this ``CanvasLayer`` will be hidden. +.. rst-class:: classref-property-setget -Unlike :ref:`CanvasItem.visible`, visibility of a ``CanvasLayer`` isn't propagated to underlying layers. +- void **set_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_visible** **(** **)** + +If ``false``, any :ref:`CanvasItem` under this **CanvasLayer** will be hidden. + +Unlike :ref:`CanvasItem.visible`, visibility of a **CanvasLayer** isn't propagated to underlying layers. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CanvasLayer_method_get_canvas: -- :ref:`RID` **get_canvas** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_canvas** **(** **)** |const| Returns the RID of the canvas used by this layer. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasLayer_method_hide: -- void **hide** **(** **)** +.. rst-class:: classref-method -Hides any :ref:`CanvasItem` under this ``CanvasLayer``. This is equivalent to setting :ref:`visible` to ``false``. +void **hide** **(** **)** + +Hides any :ref:`CanvasItem` under this **CanvasLayer**. This is equivalent to setting :ref:`visible` to ``false``. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasLayer_method_show: -- void **show** **(** **)** +.. rst-class:: classref-method -Shows any :ref:`CanvasItem` under this ``CanvasLayer``. This is equivalent to setting :ref:`visible` to ``true``. +void **show** **(** **)** + +Shows any :ref:`CanvasItem` under this **CanvasLayer**. This is equivalent to setting :ref:`visible` 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.)` diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index 2a3406faa..7bfaa1d9a 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -14,32 +14,44 @@ CanvasModulate Tint the entire canvas. +.. rst-class:: classref-introduction-group + Description ----------- -``CanvasModulate`` tints the canvas elements using its assigned :ref:`color`. +**CanvasModulate** tints the canvas elements using its assigned :ref:`color`. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+---------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+---------------------------+---------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +---------------------------+---------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CanvasModulate_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** The tint color to apply. diff --git a/classes/class_canvastexture.rst b/classes/class_canvastexture.rst index becd2bc4f..6e1ddc593 100644 --- a/classes/class_canvastexture.rst +++ b/classes/class_canvastexture.rst @@ -14,142 +14,166 @@ CanvasTexture Texture with optional normal and specular maps for use in 2D rendering. +.. rst-class:: classref-introduction-group + 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). +**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 rendering. For physically-based materials in 3D, use :ref:`BaseMaterial3D` instead. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`diffuse_texture` | | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`normal_texture` | | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`specular_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`specular_shininess` | ``1.0`` | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`specular_texture` | | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | -+-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`diffuse_texture` | | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`normal_texture` | | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`specular_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`specular_shininess` | ``1.0`` | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`specular_texture` | | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | + +-----------------------------------------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CanvasTexture_property_diffuse_texture: -- :ref:`Texture2D` **diffuse_texture** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_diffuse_texture(value) | -+----------+----------------------------+ -| *Getter* | get_diffuse_texture() | -+----------+----------------------------+ +:ref:`Texture2D` **diffuse_texture** + +.. rst-class:: classref-property-setget + +- void **set_diffuse_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_diffuse_texture** **(** **)** The diffuse (color) texture to use. This is the main texture you want to set in most cases. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasTexture_property_normal_texture: -- :ref:`Texture2D` **normal_texture** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_normal_texture(value) | -+----------+---------------------------+ -| *Getter* | get_normal_texture() | -+----------+---------------------------+ +:ref:`Texture2D` **normal_texture** -The normal map texture to use. Only has a visible effect if :ref:`Light2D`\ s are affecting this ``CanvasTexture``. +.. rst-class:: classref-property-setget + +- void **set_normal_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_normal_texture** **(** **)** + +The normal map texture to use. Only has a visible effect if :ref:`Light2D`\ s are affecting this **CanvasTexture**. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. +.. rst-class:: classref-item-separator + ---- .. _class_CanvasTexture_property_specular_color: -- :ref:`Color` **specular_color** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+---------------------------+ -| *Setter* | set_specular_color(value) | -+-----------+---------------------------+ -| *Getter* | get_specular_color() | -+-----------+---------------------------+ +:ref:`Color` **specular_color** = ``Color(1, 1, 1, 1)`` -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``. +.. rst-class:: classref-property-setget + +- void **set_specular_color** **(** :ref:`Color` value **)** +- :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**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasTexture_property_specular_shininess: -- :ref:`float` **specular_shininess** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------+ -| *Setter* | set_specular_shininess(value) | -+-----------+-------------------------------+ -| *Getter* | get_specular_shininess() | -+-----------+-------------------------------+ +:ref:`float` **specular_shininess** = ``1.0`` -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``. +.. rst-class:: classref-property-setget + +- void **set_specular_shininess** **(** :ref:`float` value **)** +- :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**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasTexture_property_specular_texture: -- :ref:`Texture2D` **specular_texture** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_specular_texture(value) | -+----------+-----------------------------+ -| *Getter* | get_specular_texture() | -+----------+-----------------------------+ +:ref:`Texture2D` **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``. +.. rst-class:: classref-property-setget + +- void **set_specular_texture** **(** :ref:`Texture2D` value **)** +- :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**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasTexture_property_texture_filter: -- :ref:`TextureFilter` **texture_filter** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_texture_filter(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_filter() | -+-----------+---------------------------+ +:ref:`TextureFilter` **texture_filter** = ``0`` -The texture filtering mode to use when drawing this ``CanvasTexture``. +.. rst-class:: classref-property-setget + +- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** +- :ref:`TextureFilter` **get_texture_filter** **(** **)** + +The texture filtering mode to use when drawing this **CanvasTexture**. + +.. rst-class:: classref-item-separator ---- .. _class_CanvasTexture_property_texture_repeat: -- :ref:`TextureRepeat` **texture_repeat** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_texture_repeat(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_repeat() | -+-----------+---------------------------+ +:ref:`TextureRepeat` **texture_repeat** = ``0`` -The texture repeat mode to use when drawing this ``CanvasTexture``. +.. rst-class:: classref-property-setget + +- void **set_texture_repeat** **(** :ref:`TextureRepeat` value **)** +- :ref:`TextureRepeat` **get_texture_repeat** **(** **)** + +The texture repeat mode to use when drawing this **CanvasTexture**. .. |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.)` diff --git a/classes/class_capsulemesh.rst b/classes/class_capsulemesh.rst index abd72780a..97262f7a0 100644 --- a/classes/class_capsulemesh.rst +++ b/classes/class_capsulemesh.rst @@ -14,86 +14,101 @@ CapsuleMesh Class representing a capsule-shaped :ref:`PrimitiveMesh`. +.. rst-class:: classref-introduction-group + Description ----------- Class representing a capsule-shaped :ref:`PrimitiveMesh`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`height` | ``2.0`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`radial_segments` | ``64`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`rings` | ``8`` | -+---------------------------+--------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`height` | ``2.0`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`radial_segments` | ``64`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`rings` | ``8`` | + +---------------------------+--------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CapsuleMesh_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** Total height of the capsule mesh (including the hemispherical ends). +.. rst-class:: classref-item-separator + ---- .. _class_CapsuleMesh_property_radial_segments: -- :ref:`int` **radial_segments** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``64`` | -+-----------+----------------------------+ -| *Setter* | set_radial_segments(value) | -+-----------+----------------------------+ -| *Getter* | get_radial_segments() | -+-----------+----------------------------+ +:ref:`int` **radial_segments** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_radial_segments** **(** :ref:`int` value **)** +- :ref:`int` **get_radial_segments** **(** **)** Number of radial segments on the capsule mesh. +.. rst-class:: classref-item-separator + ---- .. _class_CapsuleMesh_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** Radius of the capsule mesh. +.. rst-class:: classref-item-separator + ---- .. _class_CapsuleMesh_property_rings: -- :ref:`int` **rings** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``8`` | -+-----------+------------------+ -| *Setter* | set_rings(value) | -+-----------+------------------+ -| *Getter* | get_rings() | -+-----------+------------------+ +:ref:`int` **rings** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_rings** **(** :ref:`int` value **)** +- :ref:`int` **get_rings** **(** **)** Number of rings along the height of the capsule. diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index 13035c5e5..e6da37198 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -14,52 +14,65 @@ CapsuleShape2D Capsule shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- 2D capsule shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. In 2D, a capsule is a rectangle shape with half-circles at both ends. -\ **Performance:** Being a primitive collision shape, ``CapsuleShape2D`` is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). +\ **Performance:** Being a primitive collision shape, **CapsuleShape2D** is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+-----------------------------------------------------+----------+ -| :ref:`float` | :ref:`height` | ``30.0`` | -+---------------------------+-----------------------------------------------------+----------+ -| :ref:`float` | :ref:`radius` | ``10.0`` | -+---------------------------+-----------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------+----------+ + | :ref:`float` | :ref:`height` | ``30.0`` | + +---------------------------+-----------------------------------------------------+----------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +---------------------------+-----------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CapsuleShape2D_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``30.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``30.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** The capsule's height. +.. rst-class:: classref-item-separator + ---- .. _class_CapsuleShape2D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``10.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The capsule's radius. diff --git a/classes/class_capsuleshape3d.rst b/classes/class_capsuleshape3d.rst index ab124fe9b..18fe5c3d8 100644 --- a/classes/class_capsuleshape3d.rst +++ b/classes/class_capsuleshape3d.rst @@ -14,57 +14,72 @@ CapsuleShape3D Capsule shape resource for 3D collisions. +.. rst-class:: classref-introduction-group + Description ----------- 3D capsule shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. In 3D, a capsule is a cylinder shape with hemispheres at both ends. -\ **Performance:** Being a primitive collision shape, ``CapsuleShape3D`` is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). ``CapsuleShape3D`` is cheaper to check collisions against compared to :ref:`CylinderShape3D`. +\ **Performance:** Being a primitive collision shape, **CapsuleShape3D** is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). **CapsuleShape3D** is cheaper to check collisions against compared to :ref:`CylinderShape3D`. + +.. rst-class:: classref-introduction-group Tutorials --------- - `3D Physics Tests Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------+---------+ -| :ref:`float` | :ref:`height` | ``2.0`` | -+---------------------------+-----------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------+-----------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------+---------+ + | :ref:`float` | :ref:`height` | ``2.0`` | + +---------------------------+-----------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+-----------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CapsuleShape3D_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** The capsule's height. +.. rst-class:: classref-item-separator + ---- .. _class_CapsuleShape3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The capsule's radius. diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index f01ac224c..a9d885315 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -14,39 +14,53 @@ CenterContainer Keeps children controls centered. +.. rst-class:: classref-introduction-group + Description ----------- CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_top_left` | ``false`` | -+-------------------------+------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_top_left` | ``false`` | + +-------------------------+------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CenterContainer_property_use_top_left: -- :ref:`bool` **use_top_left** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_use_top_left(value) | -+-----------+-------------------------+ -| *Getter* | is_using_top_left() | -+-----------+-------------------------+ +:ref:`bool` **use_top_left** = ``false`` -If ``true``, centers children relative to the ``CenterContainer``'s top left corner. +.. rst-class:: classref-property-setget + +- void **set_use_top_left** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_top_left** **(** **)** + +If ``true``, centers children relative to the **CenterContainer**'s top left corner. .. |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.)` diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index c262ef54a..37105409f 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -14,6 +14,8 @@ CharacterBody2D Specialized 2D physics body node for characters moved by script. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ Character bodies are special types of bodies that are meant to be user-controlle \ **Kinematic motion:** Character bodies can also be used for kinematic motion (same functionality as :ref:`AnimatableBody2D`), which allows them to be moved by code and push other bodies on their path. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,293 +38,350 @@ Tutorials - `2D Platformer Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`floor_snap_length` | ``1.0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`max_slides` | ``4`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`platform_floor_layers` | ``4294967295`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`PlatformOnLeave` | :ref:`platform_on_leave` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`platform_wall_layers` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`safe_margin` | ``0.08`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`up_direction` | ``Vector2(0, -1)`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`floor_snap_length` | ``1.0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`max_slides` | ``4`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`platform_floor_layers` | ``4294967295`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`PlatformOnLeave` | :ref:`platform_on_leave` | ``0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`platform_wall_layers` | ``0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`safe_margin` | ``0.08`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`up_direction` | ``Vector2(0, -1)`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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` **(** **)** | -+---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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` **(** **)** | + +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CharacterBody2D_MotionMode: -.. _class_CharacterBody2D_constant_MOTION_MODE_GROUNDED: - -.. _class_CharacterBody2D_constant_MOTION_MODE_FLOATING: +.. rst-class:: classref-enumeration enum **MotionMode**: -- **MOTION_MODE_GROUNDED** = **0** --- Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers. +.. _class_CharacterBody2D_constant_MOTION_MODE_GROUNDED: -- **MOTION_MODE_FLOATING** = **1** --- Apply when there is no notion of floor or ceiling. All collisions will be reported as ``on_wall``. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games. +.. rst-class:: classref-enumeration-constant + +:ref:`MotionMode` **MOTION_MODE_GROUNDED** = ``0`` + +Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers. + +.. _class_CharacterBody2D_constant_MOTION_MODE_FLOATING: + +.. rst-class:: classref-enumeration-constant + +:ref:`MotionMode` **MOTION_MODE_FLOATING** = ``1`` + +Apply when there is no notion of floor or ceiling. All collisions will be reported as ``on_wall``. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games. + +.. rst-class:: classref-item-separator ---- .. _enum_CharacterBody2D_PlatformOnLeave: -.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: - -.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY: - -.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_DO_NOTHING: +.. rst-class:: classref-enumeration enum **PlatformOnLeave**: -- **PLATFORM_ON_LEAVE_ADD_VELOCITY** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. +.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: -- **PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. +.. rst-class:: classref-enumeration-constant -- **PLATFORM_ON_LEAVE_DO_NOTHING** = **2** --- Do nothing when leaving a platform. +:ref:`PlatformOnLeave` **PLATFORM_ON_LEAVE_ADD_VELOCITY** = ``0`` + +Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. + +.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlatformOnLeave` **PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY** = ``1`` + +Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. + +.. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_DO_NOTHING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlatformOnLeave` **PLATFORM_ON_LEAVE_DO_NOTHING** = ``2`` + +Do nothing when leaving a platform. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CharacterBody2D_property_floor_block_on_wall: -- :ref:`bool` **floor_block_on_wall** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------------+ -| *Setter* | set_floor_block_on_wall_enabled(value) | -+-----------+----------------------------------------+ -| *Getter* | is_floor_block_on_wall_enabled() | -+-----------+----------------------------------------+ +:ref:`bool` **floor_block_on_wall** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_floor_block_on_wall_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_floor_constant_speed: -- :ref:`bool` **floor_constant_speed** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------+ -| *Setter* | set_floor_constant_speed_enabled(value) | -+-----------+-----------------------------------------+ -| *Getter* | is_floor_constant_speed_enabled() | -+-----------+-----------------------------------------+ +:ref:`bool` **floor_constant_speed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_floor_constant_speed_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_floor_constant_speed_enabled** **(** **)** If ``false`` (by default), the body will move faster on downward slopes and slower on upward slopes. If ``true``, the body will always move at the same speed on the ground no matter the slope. Note that you need to use :ref:`floor_snap_length` to stick along a downward slope at constant speed. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_floor_max_angle: -- :ref:`float` **floor_max_angle** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.785398`` | -+-----------+----------------------------+ -| *Setter* | set_floor_max_angle(value) | -+-----------+----------------------------+ -| *Getter* | get_floor_max_angle() | -+-----------+----------------------------+ +:ref:`float` **floor_max_angle** = ``0.785398`` + +.. rst-class:: classref-property-setget + +- void **set_floor_max_angle** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_floor_snap_length: -- :ref:`float` **floor_snap_length** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------+ -| *Setter* | set_floor_snap_length(value) | -+-----------+------------------------------+ -| *Getter* | get_floor_snap_length() | -+-----------+------------------------------+ +:ref:`float` **floor_snap_length** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_floor_snap_length** **(** :ref:`float` value **)** +- :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`. As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, so it will be able to detach from the ground when jumping. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_floor_stop_on_slope: -- :ref:`bool` **floor_stop_on_slope** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------------+ -| *Setter* | set_floor_stop_on_slope_enabled(value) | -+-----------+----------------------------------------+ -| *Getter* | is_floor_stop_on_slope_enabled() | -+-----------+----------------------------------------+ +:ref:`bool` **floor_stop_on_slope** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_floor_stop_on_slope_enabled** **(** :ref:`bool` value **)** +- :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. If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_max_slides: -- :ref:`int` **max_slides** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``4`` | -+-----------+-----------------------+ -| *Setter* | set_max_slides(value) | -+-----------+-----------------------+ -| *Getter* | get_max_slides() | -+-----------+-----------------------+ +:ref:`int` **max_slides** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_max_slides** **(** :ref:`int` value **)** +- :ref:`int` **get_max_slides** **(** **)** Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_motion_mode: -- :ref:`MotionMode` **motion_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_motion_mode(value) | -+-----------+------------------------+ -| *Getter* | get_motion_mode() | -+-----------+------------------------+ +:ref:`MotionMode` **motion_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_motion_mode** **(** :ref:`MotionMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_platform_floor_layers: -- :ref:`int` **platform_floor_layers** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``4294967295`` | -+-----------+----------------------------------+ -| *Setter* | set_platform_floor_layers(value) | -+-----------+----------------------------------+ -| *Getter* | get_platform_floor_layers() | -+-----------+----------------------------------+ +:ref:`int` **platform_floor_layers** = ``4294967295`` -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. +.. rst-class:: classref-property-setget + +- void **set_platform_floor_layers** **(** :ref:`int` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CharacterBody2D_property_platform_on_leave: -- :ref:`PlatformOnLeave` **platform_on_leave** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_platform_on_leave(value) | -+-----------+------------------------------+ -| *Getter* | get_platform_on_leave() | -+-----------+------------------------------+ +:ref:`PlatformOnLeave` **platform_on_leave** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_platform_on_leave** **(** :ref:`PlatformOnLeave` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_platform_wall_layers: -- :ref:`int` **platform_wall_layers** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_platform_wall_layers(value) | -+-----------+---------------------------------+ -| *Getter* | get_platform_wall_layers() | -+-----------+---------------------------------+ +:ref:`int` **platform_wall_layers** = ``0`` -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. +.. rst-class:: classref-property-setget + +- void **set_platform_wall_layers** **(** :ref:`int` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CharacterBody2D_property_safe_margin: -- :ref:`float` **safe_margin** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.08`` | -+-----------+------------------------+ -| *Setter* | set_safe_margin(value) | -+-----------+------------------------+ -| *Getter* | get_safe_margin() | -+-----------+------------------------+ +:ref:`float` **safe_margin** = ``0.08`` + +.. rst-class:: classref-property-setget + +- void **set_safe_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_safe_margin** **(** **)** Extra margin used for collision recovery when calling :ref:`move_and_slide`. @@ -330,132 +391,172 @@ A higher value means it's more flexible for detecting collision, which helps wit A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_slide_on_ceiling: -- :ref:`bool` **slide_on_ceiling** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------+ -| *Setter* | set_slide_on_ceiling_enabled(value) | -+-----------+-------------------------------------+ -| *Getter* | is_slide_on_ceiling_enabled() | -+-----------+-------------------------------------+ +:ref:`bool` **slide_on_ceiling** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_slide_on_ceiling_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_up_direction: -- :ref:`Vector2` **up_direction** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2(0, -1)`` | -+-----------+-------------------------+ -| *Setter* | set_up_direction(value) | -+-----------+-------------------------+ -| *Getter* | get_up_direction() | -+-----------+-------------------------+ +:ref:`Vector2` **up_direction** = ``Vector2(0, -1)`` + +.. rst-class:: classref-property-setget + +- void **set_up_direction** **(** :ref:`Vector2` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_velocity: -- :ref:`Vector2` **velocity** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_velocity(value) | -+-----------+---------------------+ -| *Getter* | get_velocity() | -+-----------+---------------------+ +:ref:`Vector2` **velocity** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_velocity** **(** **)** Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_property_wall_min_slide_angle: -- :ref:`float` **wall_min_slide_angle** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.261799`` | -+-----------+---------------------------------+ -| *Setter* | set_wall_min_slide_angle(value) | -+-----------+---------------------------------+ -| *Getter* | get_wall_min_slide_angle() | -+-----------+---------------------------------+ +:ref:`float` **wall_min_slide_angle** = ``0.261799`` + +.. rst-class:: classref-property-setget + +- void **set_wall_min_slide_angle** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CharacterBody2D_method_get_floor_angle: -- :ref:`float` **get_floor_angle** **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_floor_angle** **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_floor_normal: -- :ref:`Vector2` **get_floor_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_floor_normal** **(** **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_last_motion: -- :ref:`Vector2` **get_last_motion** **(** **)** |const| +.. rst-class:: classref-method -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. +:ref:`Vector2` **get_last_motion** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_CharacterBody2D_method_get_last_slide_collision: -- :ref:`KinematicCollision2D` **get_last_slide_collision** **(** **)** +.. rst-class:: classref-method + +:ref:`KinematicCollision2D` **get_last_slide_collision** **(** **)** Returns a :ref:`KinematicCollision2D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_platform_velocity: -- :ref:`Vector2` **get_platform_velocity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_platform_velocity** **(** **)** |const| Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_position_delta: -- :ref:`Vector2` **get_position_delta** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_position_delta** **(** **)** |const| Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_real_velocity: -- :ref:`Vector2` **get_real_velocity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_real_velocity** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_slide_collision: -- :ref:`KinematicCollision2D` **get_slide_collision** **(** :ref:`int` slide_idx **)** +.. rst-class:: classref-method + +:ref:`KinematicCollision2D` **get_slide_collision** **(** :ref:`int` slide_idx **)** 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). @@ -480,77 +581,113 @@ Returns a :ref:`KinematicCollision2D`, which contain +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_slide_collision_count: -- :ref:`int` **get_slide_collision_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_slide_collision_count** **(** **)** |const| Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_get_wall_normal: -- :ref:`Vector2` **get_wall_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_wall_normal** **(** **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_is_on_ceiling: -- :ref:`bool` **is_on_ceiling** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_ceiling** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_is_on_ceiling_only: -- :ref:`bool` **is_on_ceiling_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_ceiling_only** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_is_on_floor: -- :ref:`bool` **is_on_floor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_floor** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_is_on_floor_only: -- :ref:`bool` **is_on_floor_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_floor_only** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_is_on_wall: -- :ref:`bool` **is_on_wall** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_wall** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_is_on_wall_only: -- :ref:`bool` **is_on_wall_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_wall_only** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody2D_method_move_and_slide: -- :ref:`bool` **move_and_slide** **(** **)** +.. rst-class:: classref-method -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. +:ref:`bool` **move_and_slide** **(** **)** + +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. Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for detailed information about collisions that occurred, use :ref:`get_slide_collision`. diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 81c727073..6cd42b765 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -14,6 +14,8 @@ CharacterBody3D Specialized 3D physics body node for characters moved by script. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ Character bodies are special types of bodies that are meant to be user-controlle \ **Kinematic motion:** Character bodies can also be used for kinematic motion (same functionality as :ref:`AnimatableBody3D`), which allows them to be moved by code and push other bodies on their path. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,293 +40,350 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`floor_snap_length` | ``0.1`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`max_slides` | ``6`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`platform_floor_layers` | ``4294967295`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`PlatformOnLeave` | :ref:`platform_on_leave` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`platform_wall_layers` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`safe_margin` | ``0.001`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`up_direction` | ``Vector3(0, 1, 0)`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | -+--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`floor_block_on_wall` | ``true`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`floor_snap_length` | ``0.1`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`floor_stop_on_slope` | ``true`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`max_slides` | ``6`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`MotionMode` | :ref:`motion_mode` | ``0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`platform_floor_layers` | ``4294967295`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`PlatformOnLeave` | :ref:`platform_on_leave` | ``0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`platform_wall_layers` | ``0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`safe_margin` | ``0.001`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`slide_on_ceiling` | ``true`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`up_direction` | ``Vector3(0, 1, 0)`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | + +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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_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` **(** **)** | -+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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_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` **(** **)** | + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CharacterBody3D_MotionMode: -.. _class_CharacterBody3D_constant_MOTION_MODE_GROUNDED: - -.. _class_CharacterBody3D_constant_MOTION_MODE_FLOATING: +.. rst-class:: classref-enumeration enum **MotionMode**: -- **MOTION_MODE_GROUNDED** = **0** --- Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers. +.. _class_CharacterBody3D_constant_MOTION_MODE_GROUNDED: -- **MOTION_MODE_FLOATING** = **1** --- Apply when there is no notion of floor or ceiling. All collisions will be reported as ``on_wall``. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games. +.. rst-class:: classref-enumeration-constant + +:ref:`MotionMode` **MOTION_MODE_GROUNDED** = ``0`` + +Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers. + +.. _class_CharacterBody3D_constant_MOTION_MODE_FLOATING: + +.. rst-class:: classref-enumeration-constant + +:ref:`MotionMode` **MOTION_MODE_FLOATING** = ``1`` + +Apply when there is no notion of floor or ceiling. All collisions will be reported as ``on_wall``. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games. + +.. rst-class:: classref-item-separator ---- .. _enum_CharacterBody3D_PlatformOnLeave: -.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: - -.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY: - -.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_DO_NOTHING: +.. rst-class:: classref-enumeration enum **PlatformOnLeave**: -- **PLATFORM_ON_LEAVE_ADD_VELOCITY** = **0** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. +.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: -- **PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY** = **1** --- Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. +.. rst-class:: classref-enumeration-constant -- **PLATFORM_ON_LEAVE_DO_NOTHING** = **2** --- Do nothing when leaving a platform. +:ref:`PlatformOnLeave` **PLATFORM_ON_LEAVE_ADD_VELOCITY** = ``0`` + +Add the last platform velocity to the :ref:`velocity` when you leave a moving platform. + +.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlatformOnLeave` **PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY** = ``1`` + +Add the last platform velocity to the :ref:`velocity` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. + +.. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_DO_NOTHING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlatformOnLeave` **PLATFORM_ON_LEAVE_DO_NOTHING** = ``2`` + +Do nothing when leaving a platform. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CharacterBody3D_property_floor_block_on_wall: -- :ref:`bool` **floor_block_on_wall** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------------+ -| *Setter* | set_floor_block_on_wall_enabled(value) | -+-----------+----------------------------------------+ -| *Getter* | is_floor_block_on_wall_enabled() | -+-----------+----------------------------------------+ +:ref:`bool` **floor_block_on_wall** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_floor_block_on_wall_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_floor_constant_speed: -- :ref:`bool` **floor_constant_speed** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------+ -| *Setter* | set_floor_constant_speed_enabled(value) | -+-----------+-----------------------------------------+ -| *Getter* | is_floor_constant_speed_enabled() | -+-----------+-----------------------------------------+ +:ref:`bool` **floor_constant_speed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_floor_constant_speed_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_floor_constant_speed_enabled** **(** **)** If ``false`` (by default), the body will move faster on downward slopes and slower on upward slopes. If ``true``, the body will always move at the same speed on the ground no matter the slope. Note that you need to use :ref:`floor_snap_length` to stick along a downward slope at constant speed. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_floor_max_angle: -- :ref:`float` **floor_max_angle** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.785398`` | -+-----------+----------------------------+ -| *Setter* | set_floor_max_angle(value) | -+-----------+----------------------------+ -| *Getter* | get_floor_max_angle() | -+-----------+----------------------------+ +:ref:`float` **floor_max_angle** = ``0.785398`` + +.. rst-class:: classref-property-setget + +- void **set_floor_max_angle** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_floor_snap_length: -- :ref:`float` **floor_snap_length** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0.1`` | -+-----------+------------------------------+ -| *Setter* | set_floor_snap_length(value) | -+-----------+------------------------------+ -| *Getter* | get_floor_snap_length() | -+-----------+------------------------------+ +:ref:`float` **floor_snap_length** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_floor_snap_length** **(** :ref:`float` value **)** +- :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`. As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, so it will be able to detach from the ground when jumping. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_floor_stop_on_slope: -- :ref:`bool` **floor_stop_on_slope** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------------+ -| *Setter* | set_floor_stop_on_slope_enabled(value) | -+-----------+----------------------------------------+ -| *Getter* | is_floor_stop_on_slope_enabled() | -+-----------+----------------------------------------+ +:ref:`bool` **floor_stop_on_slope** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_floor_stop_on_slope_enabled** **(** :ref:`bool` value **)** +- :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. If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_max_slides: -- :ref:`int` **max_slides** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``6`` | -+-----------+-----------------------+ -| *Setter* | set_max_slides(value) | -+-----------+-----------------------+ -| *Getter* | get_max_slides() | -+-----------+-----------------------+ +:ref:`int` **max_slides** = ``6`` + +.. rst-class:: classref-property-setget + +- void **set_max_slides** **(** :ref:`int` value **)** +- :ref:`int` **get_max_slides** **(** **)** Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_motion_mode: -- :ref:`MotionMode` **motion_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_motion_mode(value) | -+-----------+------------------------+ -| *Getter* | get_motion_mode() | -+-----------+------------------------+ +:ref:`MotionMode` **motion_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_motion_mode** **(** :ref:`MotionMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_platform_floor_layers: -- :ref:`int` **platform_floor_layers** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``4294967295`` | -+-----------+----------------------------------+ -| *Setter* | set_platform_floor_layers(value) | -+-----------+----------------------------------+ -| *Getter* | get_platform_floor_layers() | -+-----------+----------------------------------+ +:ref:`int` **platform_floor_layers** = ``4294967295`` -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. +.. rst-class:: classref-property-setget + +- void **set_platform_floor_layers** **(** :ref:`int` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CharacterBody3D_property_platform_on_leave: -- :ref:`PlatformOnLeave` **platform_on_leave** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_platform_on_leave(value) | -+-----------+------------------------------+ -| *Getter* | get_platform_on_leave() | -+-----------+------------------------------+ +:ref:`PlatformOnLeave` **platform_on_leave** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_platform_on_leave** **(** :ref:`PlatformOnLeave` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_platform_wall_layers: -- :ref:`int` **platform_wall_layers** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_platform_wall_layers(value) | -+-----------+---------------------------------+ -| *Getter* | get_platform_wall_layers() | -+-----------+---------------------------------+ +:ref:`int` **platform_wall_layers** = ``0`` -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. +.. rst-class:: classref-property-setget + +- void **set_platform_wall_layers** **(** :ref:`int` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CharacterBody3D_property_safe_margin: -- :ref:`float` **safe_margin** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.001`` | -+-----------+------------------------+ -| *Setter* | set_safe_margin(value) | -+-----------+------------------------+ -| *Getter* | get_safe_margin() | -+-----------+------------------------+ +:ref:`float` **safe_margin** = ``0.001`` + +.. rst-class:: classref-property-setget + +- void **set_safe_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_safe_margin** **(** **)** Extra margin used for collision recovery when calling :ref:`move_and_slide`. @@ -332,206 +393,282 @@ A higher value means it's more flexible for detecting collision, which helps wit A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_slide_on_ceiling: -- :ref:`bool` **slide_on_ceiling** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------+ -| *Setter* | set_slide_on_ceiling_enabled(value) | -+-----------+-------------------------------------+ -| *Getter* | is_slide_on_ceiling_enabled() | -+-----------+-------------------------------------+ +:ref:`bool` **slide_on_ceiling** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_slide_on_ceiling_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_up_direction: -- :ref:`Vector3` **up_direction** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector3(0, 1, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_up_direction(value) | -+-----------+-------------------------+ -| *Getter* | get_up_direction() | -+-----------+-------------------------+ +:ref:`Vector3` **up_direction** = ``Vector3(0, 1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_up_direction** **(** :ref:`Vector3` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_velocity: -- :ref:`Vector3` **velocity** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_velocity(value) | -+-----------+----------------------+ -| *Getter* | get_velocity() | -+-----------+----------------------+ +:ref:`Vector3` **velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_velocity** **(** **)** Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_property_wall_min_slide_angle: -- :ref:`float` **wall_min_slide_angle** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.261799`` | -+-----------+---------------------------------+ -| *Setter* | set_wall_min_slide_angle(value) | -+-----------+---------------------------------+ -| *Getter* | get_wall_min_slide_angle() | -+-----------+---------------------------------+ +:ref:`float` **wall_min_slide_angle** = ``0.261799`` + +.. rst-class:: classref-property-setget + +- void **set_wall_min_slide_angle** **(** :ref:`float` value **)** +- :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``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CharacterBody3D_method_get_floor_angle: -- :ref:`float` **get_floor_angle** **(** :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_floor_angle** **(** :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_floor_normal: -- :ref:`Vector3` **get_floor_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_floor_normal** **(** **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_last_motion: -- :ref:`Vector3` **get_last_motion** **(** **)** |const| +.. rst-class:: classref-method -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. +:ref:`Vector3` **get_last_motion** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_CharacterBody3D_method_get_last_slide_collision: -- :ref:`KinematicCollision3D` **get_last_slide_collision** **(** **)** +.. rst-class:: classref-method + +:ref:`KinematicCollision3D` **get_last_slide_collision** **(** **)** Returns a :ref:`KinematicCollision3D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_platform_velocity: -- :ref:`Vector3` **get_platform_velocity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_platform_velocity** **(** **)** |const| Returns the linear velocity of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_position_delta: -- :ref:`Vector3` **get_position_delta** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_position_delta** **(** **)** |const| Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_real_velocity: -- :ref:`Vector3` **get_real_velocity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_real_velocity** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_slide_collision: -- :ref:`KinematicCollision3D` **get_slide_collision** **(** :ref:`int` slide_idx **)** +.. rst-class:: classref-method + +:ref:`KinematicCollision3D` **get_slide_collision** **(** :ref:`int` slide_idx **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_slide_collision_count: -- :ref:`int` **get_slide_collision_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_slide_collision_count** **(** **)** |const| Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_get_wall_normal: -- :ref:`Vector3` **get_wall_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_wall_normal** **(** **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_is_on_ceiling: -- :ref:`bool` **is_on_ceiling** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_ceiling** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_is_on_ceiling_only: -- :ref:`bool` **is_on_ceiling_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_ceiling_only** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_is_on_floor: -- :ref:`bool` **is_on_floor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_floor** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_is_on_floor_only: -- :ref:`bool` **is_on_floor_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_floor_only** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_is_on_wall: -- :ref:`bool` **is_on_wall** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_wall** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_is_on_wall_only: -- :ref:`bool` **is_on_wall_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_wall_only** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CharacterBody3D_method_move_and_slide: -- :ref:`bool` **move_and_slide** **(** **)** +.. rst-class:: classref-method -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. +:ref:`bool` **move_and_slide** **(** **)** + +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. Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision`. diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index 9bd9d3b53..efd83afb1 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -14,11 +14,15 @@ CharFXTransform Controls how an individual character will be displayed in a :ref:`RichTextEffect`. +.. rst-class:: classref-introduction-group + Description ----------- By setting various properties on this object, you can control how individual characters will be displayed in a :ref:`RichTextEffect`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,81 +30,95 @@ Tutorials - `RichTextEffect test project (third-party) `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`elapsed_time` | ``0.0`` | -+-------------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`Dictionary` | :ref:`env` | ``{}`` | -+-------------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`RID` | :ref:`font` | | -+-------------------------------------+------------------------------------------------------------------+-----------------------+ -| :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:`bool` | :ref:`visible` | ``true`` | -+-------------------------------------+------------------------------------------------------------------+-----------------------+ +.. 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` | | + +-------------------------------------+----------------------------------------------------------------------+-----------------------+ + | :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`` | + +-------------------------------------+----------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CharFXTransform_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** The color the character will be drawn with. +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_elapsed_time: -- :ref:`float` **elapsed_time** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_elapsed_time(value) | -+-----------+-------------------------+ -| *Getter* | get_elapsed_time() | -+-----------+-------------------------+ +:ref:`float` **elapsed_time** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_elapsed_time** **(** :ref:`float` value **)** +- :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. \ **Note:** Time still passes while the :ref:`RichTextLabel` is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_env: -- :ref:`Dictionary` **env** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``{}`` | -+-----------+------------------------+ -| *Setter* | set_environment(value) | -+-----------+------------------------+ -| *Getter* | get_environment() | -+-----------+------------------------+ +:ref:`Dictionary` **env** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_environment** **(** :ref:`Dictionary` value **)** +- :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. @@ -110,129 +128,156 @@ For example, the opening BBCode tag ``[example foo=hello bar=true baz=42 color=# {"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)} +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_font: -- :ref:`RID` **font** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_font(value) | -+----------+-----------------+ -| *Getter* | get_font() | -+----------+-----------------+ +:ref:`RID` **font** + +.. rst-class:: classref-property-setget + +- void **set_font** **(** :ref:`RID` value **)** +- :ref:`RID` **get_font** **(** **)** Font resource used to render glyph. +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_glyph_count: -- :ref:`int` **glyph_count** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_glyph_count(value) | -+-----------+------------------------+ -| *Getter* | get_glyph_count() | -+-----------+------------------------+ +:ref:`int` **glyph_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_glyph_count** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_glyph_flags: -- :ref:`int` **glyph_flags** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_glyph_flags(value) | -+-----------+------------------------+ -| *Getter* | get_glyph_flags() | -+-----------+------------------------+ +:ref:`int` **glyph_flags** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_glyph_flags** **(** :ref:`int` value **)** +- :ref:`int` **get_glyph_flags** **(** **)** Glyph flags. See :ref:`GraphemeFlag` for more info. Setting this property won't affect drawing. +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_glyph_index: -- :ref:`int` **glyph_index** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_glyph_index(value) | -+-----------+------------------------+ -| *Getter* | get_glyph_index() | -+-----------+------------------------+ +:ref:`int` **glyph_index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_glyph_index** **(** :ref:`int` value **)** +- :ref:`int` **get_glyph_index** **(** **)** Font specific glyph index. +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The position offset the character will be drawn with (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_outline: -- :ref:`bool` **outline** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_outline(value) | -+-----------+--------------------+ -| *Getter* | is_outline() | -+-----------+--------------------+ +:ref:`bool` **outline** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_outline** **(** :ref:`bool` value **)** +- :ref:`bool` **is_outline** **(** **)** If ``true``, FX transform is called for outline drawing. Setting this property won't affect drawing. +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_range: -- :ref:`Vector2i` **range** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+--------------------+ -| *Setter* | set_range(value) | -+-----------+--------------------+ -| *Getter* | get_range() | -+-----------+--------------------+ +:ref:`Vector2i` **range** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_range** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_range** **(** **)** Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. +.. rst-class:: classref-item-separator + +---- + +.. _class_CharFXTransform_property_relative_index: + +.. rst-class:: classref-property + +:ref:`int` **relative_index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_relative_index** **(** :ref:`int` value **)** +- :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. + +.. rst-class:: classref-item-separator + ---- .. _class_CharFXTransform_property_visible: -- :ref:`bool` **visible** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_visibility(value) | -+-----------+-----------------------+ -| *Getter* | is_visible() | -+-----------+-----------------------+ +:ref:`bool` **visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_visibility** **(** :ref:`bool` value **)** +- :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. diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index 2d2fb151b..ad6a0b5c1 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -14,6 +14,8 @@ CheckBox Binary choice user interface widget. See also :ref:`CheckButton`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,320 +23,398 @@ A checkbox allows the user to make a binary choice (choosing only one of two pos See also :ref:`BaseButton` which contains common properties and methods associated with this node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | -+-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | -+-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | + +-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | + +-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ -| :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` | | -+-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ +.. 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` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_CheckBox_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` -The ``CheckBox`` text's font color. +The **CheckBox** text's font color. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` -The ``CheckBox`` text's font color when it's disabled. +The **CheckBox** text's font color when it's disabled. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +: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. +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: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` -The ``CheckBox`` text's font color when it's hovered. +The **CheckBox** text's font color when it's hovered. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_color_font_hover_pressed_color: -- :ref:`Color` **font_hover_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` -The ``CheckBox`` text's font color when it's hovered and pressed. +The **CheckBox** text's font color when it's hovered and pressed. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``CheckBox``. +The tint of text outline of the **CheckBox**. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` -The ``CheckBox`` text's font color when it's pressed. +The **CheckBox** text's font color when it's pressed. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_constant_check_v_offset: -- :ref:`int` **check_v_offset** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **check_v_offset** = ``0`` The vertical offset used when rendering the check icons (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_CheckBox_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +: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: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_CheckBox_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -The :ref:`Font` to use for the ``CheckBox`` text. +:ref:`Font` **font** + +The :ref:`Font` to use for the **CheckBox** text. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``CheckBox``'s text. +:ref:`int` **font_size** + +Font size of the **CheckBox**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_checked: -- :ref:`Texture2D` **checked** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is checked. +:ref:`Texture2D` **checked** + +The check icon to display when the **CheckBox** is checked. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_checked_disabled: -- :ref:`Texture2D` **checked_disabled** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is checked and is disabled. +:ref:`Texture2D` **checked_disabled** + +The check icon to display when the **CheckBox** is checked and is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_radio_checked: -- :ref:`Texture2D` **radio_checked** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is configured as a radio button and is checked. +:ref:`Texture2D` **radio_checked** + +The check icon to display when the **CheckBox** is configured as a radio button and is checked. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_radio_checked_disabled: -- :ref:`Texture2D` **radio_checked_disabled** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is configured as a radio button, is disabled, and is unchecked. +:ref:`Texture2D` **radio_checked_disabled** + +The check icon to display when the **CheckBox** is configured as a radio button, is disabled, and is unchecked. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_radio_unchecked: -- :ref:`Texture2D` **radio_unchecked** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is configured as a radio button and is unchecked. +:ref:`Texture2D` **radio_unchecked** + +The check icon to display when the **CheckBox** is configured as a radio button and is unchecked. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_radio_unchecked_disabled: -- :ref:`Texture2D` **radio_unchecked_disabled** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is configured as a radio button, is disabled, and is unchecked. +:ref:`Texture2D` **radio_unchecked_disabled** + +The check icon to display when the **CheckBox** is configured as a radio button, is disabled, and is unchecked. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_unchecked: -- :ref:`Texture2D` **unchecked** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is unchecked. +:ref:`Texture2D` **unchecked** + +The check icon to display when the **CheckBox** is unchecked. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_icon_unchecked_disabled: -- :ref:`Texture2D` **unchecked_disabled** +.. rst-class:: classref-themeproperty -The check icon to display when the ``CheckBox`` is unchecked and is disabled. +:ref:`Texture2D` **unchecked_disabled** + +The check icon to display when the **CheckBox** is unchecked and is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_CheckBox_theme_style_disabled: -- :ref:`StyleBox` **disabled** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckBox`` is disabled. +: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: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -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. +: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: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckBox`` is hovered. +: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: -- :ref:`StyleBox` **hover_pressed** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckBox`` is hovered and pressed. +: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: -- :ref:`StyleBox` **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: -- :ref:`StyleBox` **pressed** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckBox`` is pressed. +: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.)` diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index 19b4c0330..fc7c91616 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -14,6 +14,8 @@ CheckButton Checkable button. See also :ref:`CheckBox`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,320 +23,398 @@ CheckButton is a toggle button displayed as a check field. It's similar to :ref: See also :ref:`BaseButton` which contains common properties and methods associated with this node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | -+-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | -+-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | + +-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | + +-------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ -| :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` | | -+-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ +.. 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` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_CheckButton_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` -The ``CheckButton`` text's font color. +The **CheckButton** text's font color. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` -The ``CheckButton`` text's font color when it's disabled. +The **CheckButton** text's font color when it's disabled. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +: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. +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: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` -The ``CheckButton`` text's font color when it's hovered. +The **CheckButton** text's font color when it's hovered. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_color_font_hover_pressed_color: -- :ref:`Color` **font_hover_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` -The ``CheckButton`` text's font color when it's hovered and pressed. +The **CheckButton** text's font color when it's hovered and pressed. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``CheckButton``. +The tint of text outline of the **CheckButton**. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` -The ``CheckButton`` text's font color when it's pressed. +The **CheckButton** text's font color when it's pressed. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_constant_check_v_offset: -- :ref:`int` **check_v_offset** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **check_v_offset** = ``0`` The vertical offset used when rendering the toggle icons (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_CheckButton_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +: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: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_CheckButton_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -The :ref:`Font` to use for the ``CheckButton`` text. +:ref:`Font` **font** + +The :ref:`Font` to use for the **CheckButton** text. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``CheckButton``'s text. +:ref:`int` **font_size** + +Font size of the **CheckButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_checked: -- :ref:`Texture2D` **checked** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is checked (for left-to-right layouts). +:ref:`Texture2D` **checked** + +The icon to display when the **CheckButton** is checked (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_checked_disabled: -- :ref:`Texture2D` **checked_disabled** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is checked and disabled (for left-to-right layouts). +:ref:`Texture2D` **checked_disabled** + +The icon to display when the **CheckButton** is checked and disabled (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_checked_disabled_mirrored: -- :ref:`Texture2D` **checked_disabled_mirrored** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is checked and disabled (for right-to-left layouts). +:ref:`Texture2D` **checked_disabled_mirrored** + +The icon to display when the **CheckButton** is checked and disabled (for right-to-left layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_checked_mirrored: -- :ref:`Texture2D` **checked_mirrored** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is checked (for right-to-left layouts). +:ref:`Texture2D` **checked_mirrored** + +The icon to display when the **CheckButton** is checked (for right-to-left layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_unchecked: -- :ref:`Texture2D` **unchecked** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is unchecked (for left-to-right layouts). +:ref:`Texture2D` **unchecked** + +The icon to display when the **CheckButton** is unchecked (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_unchecked_disabled: -- :ref:`Texture2D` **unchecked_disabled** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is unchecked and disabled (for left-to-right layouts). +:ref:`Texture2D` **unchecked_disabled** + +The icon to display when the **CheckButton** is unchecked and disabled (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_unchecked_disabled_mirrored: -- :ref:`Texture2D` **unchecked_disabled_mirrored** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is unchecked and disabled (for right-to-left layouts). +:ref:`Texture2D` **unchecked_disabled_mirrored** + +The icon to display when the **CheckButton** is unchecked and disabled (for right-to-left layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_icon_unchecked_mirrored: -- :ref:`Texture2D` **unchecked_mirrored** +.. rst-class:: classref-themeproperty -The icon to display when the ``CheckButton`` is unchecked (for right-to-left layouts). +:ref:`Texture2D` **unchecked_mirrored** + +The icon to display when the **CheckButton** is unchecked (for right-to-left layouts). + +.. rst-class:: classref-item-separator ---- .. _class_CheckButton_theme_style_disabled: -- :ref:`StyleBox` **disabled** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckButton`` is disabled. +: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: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -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. +: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: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckButton`` is hovered. +: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: -- :ref:`StyleBox` **hover_pressed** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckButton`` is hovered and pressed. +: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: -- :ref:`StyleBox` **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: -- :ref:`StyleBox` **pressed** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` to display as a background when the ``CheckButton`` is pressed. +: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.)` diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst index 70b94daf4..dc453acbc 100644 --- a/classes/class_circleshape2d.rst +++ b/classes/class_circleshape2d.rst @@ -14,34 +14,46 @@ CircleShape2D Circular shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- 2D circular shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. -\ **Performance:** Being a primitive collision shape, ``CircleShape2D`` is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. +\ **Performance:** Being a primitive collision shape, **CircleShape2D** is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+----------------------------------------------------+----------+ -| :ref:`float` | :ref:`radius` | ``10.0`` | -+---------------------------+----------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------+----------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +---------------------------+----------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CircleShape2D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``10.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The circle's radius. diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 57b2bcc29..57e055981 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -14,246 +14,349 @@ ClassDB Class information repository. +.. rst-class:: classref-introduction-group + Description ----------- Provides access to metadata stored for every available class. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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| | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ClassDB_method_can_instantiate: -- :ref:`bool` **can_instantiate** **(** :ref:`StringName` class **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_instantiate** **(** :ref:`StringName` class **)** |const| Returns ``true`` if objects can be instantiated from the specified ``class``, otherwise returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_exists: -- :ref:`bool` **class_exists** **(** :ref:`StringName` class **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **class_exists** **(** :ref:`StringName` class **)** |const| Returns whether the specified ``class`` is available or not. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_enum_constants: -- :ref:`PackedStringArray` **class_get_enum_constants** **(** :ref:`StringName` class, :ref:`StringName` enum, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **class_get_enum_constants** **(** :ref:`StringName` class, :ref:`StringName` enum, :ref:`bool` no_inheritance=false **)** |const| Returns an array with all the keys in ``enum`` of ``class`` or its ancestry. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_enum_list: -- :ref:`PackedStringArray` **class_get_enum_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **class_get_enum_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| Returns an array with all the enums of ``class`` or its ancestry. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_integer_constant: -- :ref:`int` **class_get_integer_constant** **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **class_get_integer_constant** **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| Returns the value of the integer constant ``name`` of ``class`` or its ancestry. Always returns 0 when the constant could not be found. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_integer_constant_enum: -- :ref:`StringName` **class_get_integer_constant_enum** **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **class_get_integer_constant_enum** **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| Returns which enum the integer constant ``name`` of ``class`` or its ancestry belongs to. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_integer_constant_list: -- :ref:`PackedStringArray` **class_get_integer_constant_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **class_get_integer_constant_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| Returns an array with the names all the integer constants of ``class`` or its ancestry. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_method_list: -- :ref:`Dictionary[]` **class_get_method_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **class_get_method_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| 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)``. \ **Note:** In exported release builds the debug info is not available, so the returned dictionaries will contain only method names. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_property: -- :ref:`Variant` **class_get_property** **(** :ref:`Object` object, :ref:`StringName` property **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **class_get_property** **(** :ref:`Object` object, :ref:`StringName` property **)** |const| Returns the value of ``property`` of ``object`` or its ancestry. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_property_list: -- :ref:`Dictionary[]` **class_get_property_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **class_get_property_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| Returns an array with all the properties of ``class`` or its ancestry if ``no_inheritance`` is ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_signal: -- :ref:`Dictionary` **class_get_signal** **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **class_get_signal** **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_get_signal_list: -- :ref:`Dictionary[]` **class_get_signal_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **class_get_signal_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_has_enum: -- :ref:`bool` **class_has_enum** **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **class_has_enum** **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| Returns whether ``class`` or its ancestry has an enum called ``name`` or not. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_has_integer_constant: -- :ref:`bool` **class_has_integer_constant** **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **class_has_integer_constant** **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| Returns whether ``class`` or its ancestry has an integer constant called ``name`` or not. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_has_method: -- :ref:`bool` **class_has_method** **(** :ref:`StringName` class, :ref:`StringName` method, :ref:`bool` no_inheritance=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **class_has_method** **(** :ref:`StringName` class, :ref:`StringName` method, :ref:`bool` no_inheritance=false **)** |const| Returns whether ``class`` (or its ancestry if ``no_inheritance`` is ``false``) has a method called ``method`` or not. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_has_signal: -- :ref:`bool` **class_has_signal** **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **class_has_signal** **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| Returns whether ``class`` or its ancestry has a signal called ``signal`` or not. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_class_set_property: -- :ref:`Error` **class_set_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **class_set_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** |const| Sets ``property`` value of ``object`` to ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_get_class_list: -- :ref:`PackedStringArray` **get_class_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_class_list** **(** **)** |const| Returns the names of all the classes available. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_get_inheriters_from_class: -- :ref:`PackedStringArray` **get_inheriters_from_class** **(** :ref:`StringName` class **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_inheriters_from_class** **(** :ref:`StringName` class **)** |const| Returns the names of all the classes that directly or indirectly inherit from ``class``. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_get_parent_class: -- :ref:`StringName` **get_parent_class** **(** :ref:`StringName` class **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_parent_class** **(** :ref:`StringName` class **)** |const| Returns the parent class of ``class``. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_instantiate: -- :ref:`Variant` **instantiate** **(** :ref:`StringName` class **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **instantiate** **(** :ref:`StringName` class **)** |const| Creates an instance of ``class``. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_is_class_enabled: -- :ref:`bool` **is_class_enabled** **(** :ref:`StringName` class **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_class_enabled** **(** :ref:`StringName` class **)** |const| Returns whether this ``class`` is enabled or not. +.. rst-class:: classref-item-separator + ---- .. _class_ClassDB_method_is_parent_class: -- :ref:`bool` **is_parent_class** **(** :ref:`StringName` class, :ref:`StringName` inherits **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_parent_class** **(** :ref:`StringName` class, :ref:`StringName` inherits **)** |const| Returns whether ``inherits`` is an ancestor of ``class`` or not. diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index d0ba53675..9c2971389 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -14,733 +14,870 @@ CodeEdit Multiline text control intended for editing code. +.. rst-class:: classref-introduction-group + Description ----------- CodeEdit is a specialized :ref:`TextEdit` designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management. -\ **Note:** By default ``CodeEdit`` always use left-to-right text direction to correctly display source code. +\ **Note:** By default **CodeEdit** always use left-to-right text direction to correctly display source code. + +.. rst-class:: classref-reftable-group Properties ---------- -+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :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`) | -+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +.. 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`) | + +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`do_indent` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`do_unindent` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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:`do_indent` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`do_unindent` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ -| :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` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ +.. 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` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_CodeEdit_signal_breakpoint_toggled: -- **breakpoint_toggled** **(** :ref:`int` line **)** +.. rst-class:: classref-signal + +**breakpoint_toggled** **(** :ref:`int` line **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_signal_code_completion_requested: -- **code_completion_requested** **(** **)** +.. rst-class:: classref-signal + +**code_completion_requested** **(** **)** Emitted when the user requests code completion. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_signal_symbol_lookup: -- **symbol_lookup** **(** :ref:`String` symbol, :ref:`int` line, :ref:`int` column **)** +.. rst-class:: classref-signal + +**symbol_lookup** **(** :ref:`String` symbol, :ref:`int` line, :ref:`int` column **)** Emitted when the user has clicked on a valid symbol. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_signal_symbol_validate: -- **symbol_validate** **(** :ref:`String` symbol **)** +.. rst-class:: classref-signal + +**symbol_validate** **(** :ref:`String` symbol **)** 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`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_CodeEdit_CodeCompletionKind: -.. _class_CodeEdit_constant_KIND_CLASS: - -.. _class_CodeEdit_constant_KIND_FUNCTION: - -.. _class_CodeEdit_constant_KIND_SIGNAL: - -.. _class_CodeEdit_constant_KIND_VARIABLE: - -.. _class_CodeEdit_constant_KIND_MEMBER: - -.. _class_CodeEdit_constant_KIND_ENUM: - -.. _class_CodeEdit_constant_KIND_CONSTANT: - -.. _class_CodeEdit_constant_KIND_NODE_PATH: - -.. _class_CodeEdit_constant_KIND_FILE_PATH: - -.. _class_CodeEdit_constant_KIND_PLAIN_TEXT: +.. rst-class:: classref-enumeration enum **CodeCompletionKind**: -- **KIND_CLASS** = **0** --- Marks the option as a class. +.. _class_CodeEdit_constant_KIND_CLASS: -- **KIND_FUNCTION** = **1** --- Marks the option as a function. +.. rst-class:: classref-enumeration-constant -- **KIND_SIGNAL** = **2** --- Marks the option as a Godot signal. +:ref:`CodeCompletionKind` **KIND_CLASS** = ``0`` -- **KIND_VARIABLE** = **3** --- Marks the option as a variable. +Marks the option as a class. -- **KIND_MEMBER** = **4** --- Marks the option as a member. +.. _class_CodeEdit_constant_KIND_FUNCTION: -- **KIND_ENUM** = **5** --- Marks the option as a enum entry. +.. rst-class:: classref-enumeration-constant -- **KIND_CONSTANT** = **6** --- Marks the option as a constant. +:ref:`CodeCompletionKind` **KIND_FUNCTION** = ``1`` -- **KIND_NODE_PATH** = **7** --- Marks the option as a Godot node path. +Marks the option as a function. -- **KIND_FILE_PATH** = **8** --- Marks the option as a file path. +.. _class_CodeEdit_constant_KIND_SIGNAL: -- **KIND_PLAIN_TEXT** = **9** --- Marks the option as unclassified or plain text. +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_SIGNAL** = ``2`` + +Marks the option as a Godot signal. + +.. _class_CodeEdit_constant_KIND_VARIABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_VARIABLE** = ``3`` + +Marks the option as a variable. + +.. _class_CodeEdit_constant_KIND_MEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_MEMBER** = ``4`` + +Marks the option as a member. + +.. _class_CodeEdit_constant_KIND_ENUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_ENUM** = ``5`` + +Marks the option as a enum entry. + +.. _class_CodeEdit_constant_KIND_CONSTANT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_CONSTANT** = ``6`` + +Marks the option as a constant. + +.. _class_CodeEdit_constant_KIND_NODE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_NODE_PATH** = ``7`` + +Marks the option as a Godot node path. + +.. _class_CodeEdit_constant_KIND_FILE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_FILE_PATH** = ``8`` + +Marks the option as a file path. + +.. _class_CodeEdit_constant_KIND_PLAIN_TEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **KIND_PLAIN_TEXT** = ``9`` + +Marks the option as unclassified or plain text. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CodeEdit_property_auto_brace_completion_enabled: -- :ref:`bool` **auto_brace_completion_enabled** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------------+ -| *Setter* | set_auto_brace_completion_enabled(value) | -+-----------+------------------------------------------+ -| *Getter* | is_auto_brace_completion_enabled() | -+-----------+------------------------------------------+ +:ref:`bool` **auto_brace_completion_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_auto_brace_completion_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_auto_brace_completion_enabled** **(** **)** Sets whether brace pairs should be autocompleted. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_auto_brace_completion_highlight_matching: -- :ref:`bool` **auto_brace_completion_highlight_matching** +.. rst-class:: classref-property -+-----------+----------------------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------------------+ -| *Setter* | set_highlight_matching_braces_enabled(value) | -+-----------+----------------------------------------------+ -| *Getter* | is_highlight_matching_braces_enabled() | -+-----------+----------------------------------------------+ +:ref:`bool` **auto_brace_completion_highlight_matching** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_highlight_matching_braces_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_highlight_matching_braces_enabled** **(** **)** Highlight mismatching brace pairs. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_auto_brace_completion_pairs: -- :ref:`Dictionary` **auto_brace_completion_pairs** +.. rst-class:: classref-property -+-----------+------------------------------------------------------------+ -| *Default* | ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` | -+-----------+------------------------------------------------------------+ -| *Setter* | set_auto_brace_completion_pairs(value) | -+-----------+------------------------------------------------------------+ -| *Getter* | get_auto_brace_completion_pairs() | -+-----------+------------------------------------------------------------+ +:ref:`Dictionary` **auto_brace_completion_pairs** = ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` + +.. rst-class:: classref-property-setget + +- void **set_auto_brace_completion_pairs** **(** :ref:`Dictionary` value **)** +- :ref:`Dictionary` **get_auto_brace_completion_pairs** **(** **)** Sets the brace pairs to be autocompleted. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_code_completion_enabled: -- :ref:`bool` **code_completion_enabled** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------+ -| *Setter* | set_code_completion_enabled(value) | -+-----------+------------------------------------+ -| *Getter* | is_code_completion_enabled() | -+-----------+------------------------------------+ +:ref:`bool` **code_completion_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_code_completion_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_code_completion_enabled** **(** **)** Sets whether code completion is allowed. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_code_completion_prefixes: -- :ref:`String[]` **code_completion_prefixes** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``[]`` | -+-----------+-------------------------------------+ -| *Setter* | set_code_completion_prefixes(value) | -+-----------+-------------------------------------+ -| *Getter* | get_code_comletion_prefixes() | -+-----------+-------------------------------------+ +:ref:`String[]` **code_completion_prefixes** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_code_completion_prefixes** **(** :ref:`String[]` value **)** +- :ref:`String[]` **get_code_comletion_prefixes** **(** **)** Sets prefixes that will trigger code completion. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_delimiter_comments: -- :ref:`String[]` **delimiter_comments** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``[]`` | -+-----------+-------------------------------+ -| *Setter* | set_comment_delimiters(value) | -+-----------+-------------------------------+ -| *Getter* | get_comment_delimiters() | -+-----------+-------------------------------+ +:ref:`String[]` **delimiter_comments** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_comment_delimiters** **(** :ref:`String[]` value **)** +- :ref:`String[]` **get_comment_delimiters** **(** **)** Sets the comment delimiters. All existing comment delimiters will be removed. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_delimiter_strings: -- :ref:`String[]` **delimiter_strings** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``["' '", "\" \""]`` | -+-----------+------------------------------+ -| *Setter* | set_string_delimiters(value) | -+-----------+------------------------------+ -| *Getter* | get_string_delimiters() | -+-----------+------------------------------+ +:ref:`String[]` **delimiter_strings** = ``["' '", "\" \""]`` + +.. rst-class:: classref-property-setget + +- void **set_string_delimiters** **(** :ref:`String[]` value **)** +- :ref:`String[]` **get_string_delimiters** **(** **)** Sets the string delimiters. All existing string delimiters will be removed. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_gutters_draw_bookmarks: -- :ref:`bool` **gutters_draw_bookmarks** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_draw_bookmarks_gutter(value) | -+-----------+----------------------------------+ -| *Getter* | is_drawing_bookmarks_gutter() | -+-----------+----------------------------------+ +:ref:`bool` **gutters_draw_bookmarks** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_bookmarks_gutter** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_bookmarks_gutter** **(** **)** Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_gutters_draw_breakpoints_gutter: -- :ref:`bool` **gutters_draw_breakpoints_gutter** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------+ -| *Setter* | set_draw_breakpoints_gutter(value) | -+-----------+------------------------------------+ -| *Getter* | is_drawing_breakpoints_gutter() | -+-----------+------------------------------------+ +:ref:`bool` **gutters_draw_breakpoints_gutter** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_breakpoints_gutter** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_breakpoints_gutter** **(** **)** Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_gutters_draw_executing_lines: -- :ref:`bool` **gutters_draw_executing_lines** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------------+ -| *Setter* | set_draw_executing_lines_gutter(value) | -+-----------+----------------------------------------+ -| *Getter* | is_drawing_executing_lines_gutter() | -+-----------+----------------------------------------+ +:ref:`bool` **gutters_draw_executing_lines** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_executing_lines_gutter** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_gutters_draw_fold_gutter: -- :ref:`bool` **gutters_draw_fold_gutter** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_draw_fold_gutter(value) | -+-----------+-----------------------------+ -| *Getter* | is_drawing_fold_gutter() | -+-----------+-----------------------------+ +:ref:`bool` **gutters_draw_fold_gutter** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_fold_gutter** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_fold_gutter** **(** **)** Sets if foldable lines icons should be drawn in the gutter. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_gutters_draw_line_numbers: -- :ref:`bool` **gutters_draw_line_numbers** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_draw_line_numbers(value) | -+-----------+--------------------------------+ -| *Getter* | is_draw_line_numbers_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **gutters_draw_line_numbers** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_line_numbers** **(** :ref:`bool` value **)** +- :ref:`bool` **is_draw_line_numbers_enabled** **(** **)** Sets if line numbers should be drawn in the gutter. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_gutters_zero_pad_line_numbers: -- :ref:`bool` **gutters_zero_pad_line_numbers** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------+ -| *Setter* | set_line_numbers_zero_padded(value) | -+-----------+-------------------------------------+ -| *Getter* | is_line_numbers_zero_padded() | -+-----------+-------------------------------------+ +:ref:`bool` **gutters_zero_pad_line_numbers** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_line_numbers_zero_padded** **(** :ref:`bool` value **)** +- :ref:`bool` **is_line_numbers_zero_padded** **(** **)** Sets if line numbers drawn in the gutter are zero padded. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_indent_automatic: -- :ref:`bool` **indent_automatic** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_auto_indent_enabled(value) | -+-----------+--------------------------------+ -| *Getter* | is_auto_indent_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **indent_automatic** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_auto_indent_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_indent_automatic_prefixes: -- :ref:`String[]` **indent_automatic_prefixes** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``[":", "{", "[", "("]`` | -+-----------+---------------------------------+ -| *Setter* | set_auto_indent_prefixes(value) | -+-----------+---------------------------------+ -| *Getter* | get_auto_indent_prefixes() | -+-----------+---------------------------------+ +:ref:`String[]` **indent_automatic_prefixes** = ``[":", "{", "[", "("]`` + +.. rst-class:: classref-property-setget + +- void **set_auto_indent_prefixes** **(** :ref:`String[]` value **)** +- :ref:`String[]` **get_auto_indent_prefixes** **(** **)** Prefixes to trigger an automatic indent. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_indent_size: -- :ref:`int` **indent_size** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``4`` | -+-----------+------------------------+ -| *Setter* | set_indent_size(value) | -+-----------+------------------------+ -| *Getter* | get_indent_size() | -+-----------+------------------------+ +:ref:`int` **indent_size** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_indent_size** **(** :ref:`int` value **)** +- :ref:`int` **get_indent_size** **(** **)** Size of tabs, if ``indent_use_spaces`` is enabled the number of spaces to use. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_indent_use_spaces: -- :ref:`bool` **indent_use_spaces** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_indent_using_spaces(value) | -+-----------+--------------------------------+ -| *Getter* | is_indent_using_spaces() | -+-----------+--------------------------------+ +:ref:`bool` **indent_use_spaces** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_indent_using_spaces** **(** :ref:`bool` value **)** +- :ref:`bool` **is_indent_using_spaces** **(** **)** Use spaces instead of tabs for indentation. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_line_folding: -- :ref:`bool` **line_folding** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_line_folding_enabled(value) | -+-----------+---------------------------------+ -| *Getter* | is_line_folding_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **line_folding** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_line_folding_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_line_folding_enabled** **(** **)** Sets whether line folding is allowed. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_line_length_guidelines: -- :ref:`int[]` **line_length_guidelines** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``[]`` | -+-----------+-----------------------------------+ -| *Setter* | set_line_length_guidelines(value) | -+-----------+-----------------------------------+ -| *Getter* | get_line_length_guidelines() | -+-----------+-----------------------------------+ +:ref:`int[]` **line_length_guidelines** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_line_length_guidelines** **(** :ref:`int[]` value **)** +- :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 +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_property_symbol_lookup_on_click: -- :ref:`bool` **symbol_lookup_on_click** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------------+ -| *Setter* | set_symbol_lookup_on_click_enabled(value) | -+-----------+-------------------------------------------+ -| *Getter* | is_symbol_lookup_on_click_enabled() | -+-----------+-------------------------------------------+ +:ref:`bool` **symbol_lookup_on_click** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_symbol_lookup_on_click_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CodeEdit_method__confirm_code_completion: -- void **_confirm_code_completion** **(** :ref:`bool` replace **)** |virtual| +.. rst-class:: classref-method + +void **_confirm_code_completion** **(** :ref:`bool` replace **)** |virtual| 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: -- :ref:`Dictionary[]` **_filter_code_completion_candidates** **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_filter_code_completion_candidates** **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| Override this method to define what items in ``candidates`` should be displayed. Both ``candidates`` and the return is a :ref:`Array` of :ref:`Dictionary`, see :ref:`get_code_completion_option` for :ref:`Dictionary` content. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method__request_code_completion: -- void **_request_code_completion** **(** :ref:`bool` force **)** |virtual| +.. rst-class:: classref-method + +void **_request_code_completion** **(** :ref:`bool` force **)** |virtual| 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 + ---- .. _class_CodeEdit_method_add_auto_brace_completion_pair: -- void **add_auto_brace_completion_pair** **(** :ref:`String` start_key, :ref:`String` end_key **)** +.. rst-class:: classref-method + +void **add_auto_brace_completion_pair** **(** :ref:`String` start_key, :ref:`String` end_key **)** Adds a brace pair. Both the start and end keys must be symbols. Only the start key has to be unique. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_add_code_completion_option: -- 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 **)** +.. 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 **)** Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options` to update the list. \ **Note:** This list will replace all current candidates. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_add_comment_delimiter: -- void **add_comment_delimiter** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** +.. rst-class:: classref-method + +void **add_comment_delimiter** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** Adds a comment delimiter. @@ -748,11 +885,15 @@ 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_add_string_delimiter: -- void **add_string_delimiter** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** +.. rst-class:: classref-method + +void **add_string_delimiter** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** Adds a string delimiter. @@ -760,131 +901,195 @@ 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_can_fold_line: -- :ref:`bool` **can_fold_line** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_fold_line** **(** :ref:`int` line **)** |const| Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_cancel_code_completion: -- void **cancel_code_completion** **(** **)** +.. rst-class:: classref-method + +void **cancel_code_completion** **(** **)** Cancels the autocomplete menu. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_clear_bookmarked_lines: -- void **clear_bookmarked_lines** **(** **)** +.. rst-class:: classref-method + +void **clear_bookmarked_lines** **(** **)** Clears all bookmarked lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_clear_breakpointed_lines: -- void **clear_breakpointed_lines** **(** **)** +.. rst-class:: classref-method + +void **clear_breakpointed_lines** **(** **)** Clears all breakpointed lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_clear_comment_delimiters: -- void **clear_comment_delimiters** **(** **)** +.. rst-class:: classref-method + +void **clear_comment_delimiters** **(** **)** Removes all comment delimiters. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_clear_executing_lines: -- void **clear_executing_lines** **(** **)** +.. rst-class:: classref-method + +void **clear_executing_lines** **(** **)** Clears all executed lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_clear_string_delimiters: -- void **clear_string_delimiters** **(** **)** +.. rst-class:: classref-method + +void **clear_string_delimiters** **(** **)** Removes all string delimiters. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_confirm_code_completion: -- void **confirm_code_completion** **(** :ref:`bool` replace=false **)** +.. rst-class:: classref-method + +void **confirm_code_completion** **(** :ref:`bool` replace=false **)** Inserts the selected entry into the text. If ``replace`` is true, any existing text is replaced rather then merged. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_do_indent: -- void **do_indent** **(** **)** +.. rst-class:: classref-method + +void **do_indent** **(** **)** Perform an indent as if the user activated the "ui_text_indent" action. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_do_unindent: -- void **do_unindent** **(** **)** +.. rst-class:: classref-method + +void **do_unindent** **(** **)** Perform an unindent as if the user activated the "ui_text_unindent" action. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_fold_all_lines: -- void **fold_all_lines** **(** **)** +.. rst-class:: classref-method + +void **fold_all_lines** **(** **)** Folds all lines that are possible to be folded (see :ref:`can_fold_line`). +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_fold_line: -- void **fold_line** **(** :ref:`int` line **)** +.. rst-class:: classref-method + +void **fold_line** **(** :ref:`int` line **)** Folds the given line, if possible (see :ref:`can_fold_line`). +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_auto_brace_completion_close_key: -- :ref:`String` **get_auto_brace_completion_close_key** **(** :ref:`String` open_key **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_auto_brace_completion_close_key** **(** :ref:`String` open_key **)** |const| Gets the matching auto brace close key for ``open_key``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_bookmarked_lines: -- :ref:`PackedInt32Array` **get_bookmarked_lines** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_bookmarked_lines** **(** **)** |const| Gets all bookmarked lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_breakpointed_lines: -- :ref:`PackedInt32Array` **get_breakpointed_lines** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_breakpointed_lines** **(** **)** |const| Gets all breakpointed lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_code_completion_option: -- :ref:`Dictionary` **get_code_completion_option** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_code_completion_option** **(** :ref:`int` index **)** |const| Gets the completion option at ``index``. The return :ref:`Dictionary` has the following key-values: @@ -900,778 +1105,982 @@ Gets the completion option at ``index``. The return :ref:`Dictionary` **get_code_completion_options** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_code_completion_options** **(** **)** |const| Gets all completion options, see :ref:`get_code_completion_option` for return content. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_code_completion_selected_index: -- :ref:`int` **get_code_completion_selected_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_code_completion_selected_index** **(** **)** |const| Gets the index of the current selected completion option. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_delimiter_end_key: -- :ref:`String` **get_delimiter_end_key** **(** :ref:`int` delimiter_index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_delimiter_end_key** **(** :ref:`int` delimiter_index **)** |const| Gets the end key for a string or comment region index. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_delimiter_end_position: -- :ref:`Vector2` **get_delimiter_end_position** **(** :ref:`int` line, :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_delimiter_end_position** **(** :ref:`int` line, :ref:`int` column **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_delimiter_start_key: -- :ref:`String` **get_delimiter_start_key** **(** :ref:`int` delimiter_index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_delimiter_start_key** **(** :ref:`int` delimiter_index **)** |const| Gets the start key for a string or comment region index. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_delimiter_start_position: -- :ref:`Vector2` **get_delimiter_start_position** **(** :ref:`int` line, :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_delimiter_start_position** **(** :ref:`int` line, :ref:`int` column **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_executing_lines: -- :ref:`PackedInt32Array` **get_executing_lines** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_executing_lines** **(** **)** |const| Gets all executing lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_folded_lines: -- :ref:`int[]` **get_folded_lines** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int[]` **get_folded_lines** **(** **)** |const| Returns all lines that are current folded. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_text_for_code_completion: -- :ref:`String` **get_text_for_code_completion** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_text_for_code_completion** **(** **)** |const| Returns the full text with char ``0xFFFF`` at the caret location. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_get_text_for_symbol_lookup: -- :ref:`String` **get_text_for_symbol_lookup** **(** **)** +.. rst-class:: classref-method + +:ref:`String` **get_text_for_symbol_lookup** **(** **)** Returns the full text with char ``0xFFFF`` at the cursor location. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_has_auto_brace_completion_close_key: -- :ref:`bool` **has_auto_brace_completion_close_key** **(** :ref:`String` close_key **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_auto_brace_completion_close_key** **(** :ref:`String` close_key **)** |const| Returns ``true`` if close key ``close_key`` exists. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_has_auto_brace_completion_open_key: -- :ref:`bool` **has_auto_brace_completion_open_key** **(** :ref:`String` open_key **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_auto_brace_completion_open_key** **(** :ref:`String` open_key **)** |const| Returns ``true`` if open key ``open_key`` exists. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_has_comment_delimiter: -- :ref:`bool` **has_comment_delimiter** **(** :ref:`String` start_key **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_comment_delimiter** **(** :ref:`String` start_key **)** |const| Returns ``true`` if comment ``start_key`` exists. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_has_string_delimiter: -- :ref:`bool` **has_string_delimiter** **(** :ref:`String` start_key **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_string_delimiter** **(** :ref:`String` start_key **)** |const| Returns ``true`` if string ``start_key`` exists. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_indent_lines: -- void **indent_lines** **(** **)** +.. rst-class:: classref-method + +void **indent_lines** **(** **)** Indents selected lines, or in the case of no selection the caret line by one. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_is_in_comment: -- :ref:`int` **is_in_comment** **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **is_in_comment** **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_is_in_string: -- :ref:`int` **is_in_string** **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **is_in_string** **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_is_line_bookmarked: -- :ref:`bool` **is_line_bookmarked** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_line_bookmarked** **(** :ref:`int` line **)** |const| Returns whether the line at the specified index is bookmarked or not. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_is_line_breakpointed: -- :ref:`bool` **is_line_breakpointed** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_line_breakpointed** **(** :ref:`int` line **)** |const| Returns whether the line at the specified index is breakpointed or not. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_is_line_executing: -- :ref:`bool` **is_line_executing** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_line_executing** **(** :ref:`int` line **)** |const| Returns whether the line at the specified index is marked as executing or not. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_is_line_folded: -- :ref:`bool` **is_line_folded** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_line_folded** **(** :ref:`int` line **)** |const| Returns whether the line at the specified index is folded or not. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_remove_comment_delimiter: -- void **remove_comment_delimiter** **(** :ref:`String` start_key **)** +.. rst-class:: classref-method + +void **remove_comment_delimiter** **(** :ref:`String` start_key **)** Removes the comment delimiter with ``start_key``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_remove_string_delimiter: -- void **remove_string_delimiter** **(** :ref:`String` start_key **)** +.. rst-class:: classref-method + +void **remove_string_delimiter** **(** :ref:`String` start_key **)** Removes the string delimiter with ``start_key``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_request_code_completion: -- void **request_code_completion** **(** :ref:`bool` force=false **)** +.. rst-class:: classref-method + +void **request_code_completion** **(** :ref:`bool` force=false **)** 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 + ---- .. _class_CodeEdit_method_set_code_completion_selected_index: -- void **set_code_completion_selected_index** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **set_code_completion_selected_index** **(** :ref:`int` index **)** Sets the current selected completion option. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_set_code_hint: -- void **set_code_hint** **(** :ref:`String` code_hint **)** +.. rst-class:: classref-method + +void **set_code_hint** **(** :ref:`String` code_hint **)** Sets the code hint text. Pass an empty string to clear. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_set_code_hint_draw_below: -- void **set_code_hint_draw_below** **(** :ref:`bool` draw_below **)** +.. rst-class:: classref-method + +void **set_code_hint_draw_below** **(** :ref:`bool` draw_below **)** Sets if the code hint should draw below the text. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_set_line_as_bookmarked: -- void **set_line_as_bookmarked** **(** :ref:`int` line, :ref:`bool` bookmarked **)** +.. rst-class:: classref-method + +void **set_line_as_bookmarked** **(** :ref:`int` line, :ref:`bool` bookmarked **)** Sets the line as bookmarked. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_set_line_as_breakpoint: -- void **set_line_as_breakpoint** **(** :ref:`int` line, :ref:`bool` breakpointed **)** +.. rst-class:: classref-method + +void **set_line_as_breakpoint** **(** :ref:`int` line, :ref:`bool` breakpointed **)** Sets the line as breakpointed. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_set_line_as_executing: -- void **set_line_as_executing** **(** :ref:`int` line, :ref:`bool` executing **)** +.. rst-class:: classref-method + +void **set_line_as_executing** **(** :ref:`int` line, :ref:`bool` executing **)** Sets the line as executing. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_set_symbol_lookup_word_as_valid: -- void **set_symbol_lookup_word_as_valid** **(** :ref:`bool` valid **)** +.. rst-class:: classref-method + +void **set_symbol_lookup_word_as_valid** **(** :ref:`bool` valid **)** Sets the symbol emitted by :ref:`symbol_validate` as a valid lookup. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_toggle_foldable_line: -- void **toggle_foldable_line** **(** :ref:`int` line **)** +.. rst-class:: classref-method + +void **toggle_foldable_line** **(** :ref:`int` line **)** Toggle the folding of the code block at the given line. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_unfold_all_lines: -- void **unfold_all_lines** **(** **)** +.. rst-class:: classref-method + +void **unfold_all_lines** **(** **)** Unfolds all lines, folded or not. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_unfold_line: -- void **unfold_line** **(** :ref:`int` line **)** +.. rst-class:: classref-method + +void **unfold_line** **(** :ref:`int` line **)** Unfolds all lines that were previously folded. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_unindent_lines: -- void **unindent_lines** **(** **)** +.. rst-class:: classref-method + +void **unindent_lines** **(** **)** Unindents selected lines, or in the case of no selection the caret line by one. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_method_update_code_completion_options: -- void **update_code_completion_options** **(** :ref:`bool` force **)** +.. rst-class:: classref-method + +void **update_code_completion_options** **(** :ref:`bool` force **)** Submits all completion options added with :ref:`add_code_completion_option`. Will try to force the autoccomplete menu to popup, if ``force`` is ``true``. \ **Note:** This will replace all current candidates. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_CodeEdit_theme_color_background_color: -- :ref:`Color` **background_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **background_color** = ``Color(0, 0, 0, 0)`` Sets the background :ref:`Color`. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_bookmark_color: -- :ref:`Color` **bookmark_color** +.. rst-class:: classref-themeproperty -+-----------+------------------------------+ -| *Default* | ``Color(0.5, 0.64, 1, 0.8)`` | -+-----------+------------------------------+ +:ref:`Color` **bookmark_color** = ``Color(0.5, 0.64, 1, 0.8)`` :ref:`Color` of the bookmark icon for bookmarked lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_brace_mismatch_color: -- :ref:`Color` **brace_mismatch_color** +.. rst-class:: classref-themeproperty -+-----------+---------------------------+ -| *Default* | ``Color(1, 0.2, 0.2, 1)`` | -+-----------+---------------------------+ +:ref:`Color` **brace_mismatch_color** = ``Color(1, 0.2, 0.2, 1)`` :ref:`Color` of the text to highlight mismatched braces. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_breakpoint_color: -- :ref:`Color` **breakpoint_color** +.. rst-class:: classref-themeproperty -+-----------+------------------------------+ -| *Default* | ``Color(0.9, 0.29, 0.3, 1)`` | -+-----------+------------------------------+ +:ref:`Color` **breakpoint_color** = ``Color(0.9, 0.29, 0.3, 1)`` :ref:`Color` of the breakpoint icon for bookmarked lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_caret_background_color: -- :ref:`Color` **caret_background_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ +: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: -- :ref:`Color` **caret_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +: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: -- :ref:`Color` **code_folding_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``Color(0.8, 0.8, 0.8, 0.8)`` | -+-----------+-------------------------------+ +:ref:`Color` **code_folding_color** = ``Color(0.8, 0.8, 0.8, 0.8)`` :ref:`Color` for all icons related to line folding. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_completion_background_color: -- :ref:`Color` **completion_background_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``Color(0.17, 0.16, 0.2, 1)`` | -+-----------+-------------------------------+ +:ref:`Color` **completion_background_color** = ``Color(0.17, 0.16, 0.2, 1)`` Sets the background :ref:`Color` for the code completion popup. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_completion_existing_color: -- :ref:`Color` **completion_existing_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.87, 0.87, 0.87, 0.13)`` | -+-----------+-----------------------------------+ +:ref:`Color` **completion_existing_color** = ``Color(0.87, 0.87, 0.87, 0.13)`` Background highlight :ref:`Color` for matching text in code completion options. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_completion_font_color: -- :ref:`Color` **completion_font_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.67, 0.67, 0.67, 1)`` | -+-----------+--------------------------------+ +: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: -- :ref:`Color` **completion_scroll_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 0.29)`` | -+-----------+--------------------------+ +:ref:`Color` **completion_scroll_color** = ``Color(1, 1, 1, 0.29)`` :ref:`Color` of the scrollbar in the code completion popup. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_completion_scroll_hovered_color: -- :ref:`Color` **completion_scroll_hovered_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------+ -| *Default* | ``Color(1, 1, 1, 0.4)`` | -+-----------+-------------------------+ +:ref:`Color` **completion_scroll_hovered_color** = ``Color(1, 1, 1, 0.4)`` :ref:`Color` of the scrollbar in the code completion popup when hovered. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_completion_selected_color: -- :ref:`Color` **completion_selected_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.26, 0.26, 0.27, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **completion_selected_color** = ``Color(0.26, 0.26, 0.27, 1)`` Background highlight :ref:`Color` for the current selected option item in the code completion popup. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_current_line_color: -- :ref:`Color` **current_line_color** +.. rst-class:: classref-themeproperty -+-----------+----------------------------------+ -| *Default* | ``Color(0.25, 0.25, 0.26, 0.8)`` | -+-----------+----------------------------------+ +: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: -- :ref:`Color` **executing_line_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.98, 0.89, 0.27, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **executing_line_color** = ``Color(0.98, 0.89, 0.27, 1)`` :ref:`Color` of the executing icon for executing lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +: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: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``CodeEdit``. +The tint of text outline of the **CodeEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_CodeEdit_theme_color_font_placeholder_color: -- :ref:`Color` **font_placeholder_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.6)`` | -+-----------+-------------------------------------+ +: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: -- :ref:`Color` **font_readonly_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` Sets the font :ref:`Color` when :ref:`TextEdit.editable` is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +: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. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_line_length_guideline_color: -- :ref:`Color` **line_length_guideline_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``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:`Color` of the main line length guideline, secondary guidelines will have 50% alpha applied. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_line_number_color: -- :ref:`Color` **line_number_color** +.. rst-class:: classref-themeproperty -+-----------+----------------------------------+ -| *Default* | ``Color(0.67, 0.67, 0.67, 0.4)`` | -+-----------+----------------------------------+ +:ref:`Color` **line_number_color** = ``Color(0.67, 0.67, 0.67, 0.4)`` Sets the :ref:`Color` of line numbers. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_color_search_result_border_color: -- :ref:`Color` **search_result_border_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``Color(0.3, 0.3, 0.3, 0.4)`` | -+-----------+-------------------------------+ +: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: -- :ref:`Color` **search_result_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.3, 0.3, 0.3, 1)`` | -+-----------+-----------------------------+ +: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: -- :ref:`Color` **selection_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.5, 0.5, 0.5, 1)`` | -+-----------+-----------------------------+ +: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: -- :ref:`Color` **word_highlighted_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.8, 0.9, 0.9, 0.15)`` | -+-----------+--------------------------------+ +: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: -- :ref:`int` **completion_lines** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``7`` | -+-----------+-------+ +:ref:`int` **completion_lines** = ``7`` Max number of options to display in the code completion popup at any one time. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_constant_completion_max_width: -- :ref:`int` **completion_max_width** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``50`` | -+-----------+--------+ +:ref:`int` **completion_max_width** = ``50`` Max width of options in the code completion popup. Options longer then this will be cut off. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_constant_completion_scroll_width: -- :ref:`int` **completion_scroll_width** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``6`` | -+-----------+-------+ +:ref:`int` **completion_scroll_width** = ``6`` Width of the scrollbar in the code completion popup. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_constant_line_spacing: -- :ref:`int` **line_spacing** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **line_spacing** = ``4`` Sets the spacing between the lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_font_font: -- :ref:`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: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Sets default font size. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_icon_bookmark: -- :ref:`Texture2D` **bookmark** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **bookmark** Sets a custom :ref:`Texture2D` to draw in the bookmark gutter for bookmarked lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_icon_breakpoint: -- :ref:`Texture2D` **breakpoint** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **breakpoint** Sets a custom :ref:`Texture2D` to draw in the breakpoint gutter for breakpointed lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_icon_can_fold: -- :ref:`Texture2D` **can_fold** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **can_fold** Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a line can be folded. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_icon_executing_line: -- :ref:`Texture2D` **executing_line** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **executing_line** Icon to draw in the executing gutter for executing lines. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_icon_folded: -- :ref:`Texture2D` **folded** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **folded** 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_folded_eol_icon: -- :ref:`Texture2D` **folded_eol_icon** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **folded_eol_icon** Sets a custom :ref:`Texture2D` to draw at the end of a folded line. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_icon_space: -- :ref:`Texture2D` **space** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **space** Sets a custom :ref:`Texture2D` for space text characters. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_icon_tab: -- :ref:`Texture2D` **tab** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **tab** Sets a custom :ref:`Texture2D` for tab text characters. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_style_completion: -- :ref:`StyleBox` **completion** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **completion** :ref:`StyleBox` for the code completion popup. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_style_focus: -- :ref:`StyleBox` **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: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **normal** Sets the :ref:`StyleBox`. +.. rst-class:: classref-item-separator + ---- .. _class_CodeEdit_theme_style_read_only: -- :ref:`StyleBox` **read_only** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **read_only** Sets the :ref:`StyleBox` when :ref:`TextEdit.editable` is disabled. diff --git a/classes/class_codehighlighter.rst b/classes/class_codehighlighter.rst index 478f1a5a3..42afc402a 100644 --- a/classes/class_codehighlighter.rst +++ b/classes/class_codehighlighter.rst @@ -14,182 +14,213 @@ CodeHighlighter A syntax highlighter for code. +.. rst-class:: classref-introduction-group + Description ----------- A syntax highlighter for code. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Dictionary` | :ref:`color_regions` | ``{}`` | -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`function_color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Dictionary` | :ref:`keyword_colors` | ``{}`` | -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Dictionary` | :ref:`member_keyword_colors` | ``{}`` | -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`member_variable_color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`number_color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`symbol_color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Dictionary` | :ref:`color_regions` | ``{}`` | + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`function_color` | ``Color(0, 0, 0, 1)`` | + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Dictionary` | :ref:`keyword_colors` | ``{}`` | + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Dictionary` | :ref:`member_keyword_colors` | ``{}`` | + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`member_variable_color` | ``Color(0, 0, 0, 1)`` | + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`number_color` | ``Color(0, 0, 0, 1)`` | + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`symbol_color` | ``Color(0, 0, 0, 1)`` | + +-------------------------------------+------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_color_region` **(** :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 **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_color_region` **(** :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 **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CodeHighlighter_property_color_regions: -- :ref:`Dictionary` **color_regions** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``{}`` | -+-----------+--------------------------+ -| *Setter* | set_color_regions(value) | -+-----------+--------------------------+ -| *Getter* | get_color_regions() | -+-----------+--------------------------+ +:ref:`Dictionary` **color_regions** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_color_regions** **(** :ref:`Dictionary` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_property_function_color: -- :ref:`Color` **function_color** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+---------------------------+ -| *Setter* | set_function_color(value) | -+-----------+---------------------------+ -| *Getter* | get_function_color() | -+-----------+---------------------------+ +:ref:`Color` **function_color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_function_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_function_color** **(** **)** Sets color for functions. A function is a non-keyword string followed by a '('. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_property_keyword_colors: -- :ref:`Dictionary` **keyword_colors** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``{}`` | -+-----------+---------------------------+ -| *Setter* | set_keyword_colors(value) | -+-----------+---------------------------+ -| *Getter* | get_keyword_colors() | -+-----------+---------------------------+ +:ref:`Dictionary` **keyword_colors** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_keyword_colors** **(** :ref:`Dictionary` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_property_member_keyword_colors: -- :ref:`Dictionary` **member_keyword_colors** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``{}`` | -+-----------+----------------------------------+ -| *Setter* | set_member_keyword_colors(value) | -+-----------+----------------------------------+ -| *Getter* | get_member_keyword_colors() | -+-----------+----------------------------------+ +:ref:`Dictionary` **member_keyword_colors** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_member_keyword_colors** **(** :ref:`Dictionary` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_property_member_variable_color: -- :ref:`Color` **member_variable_color** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+----------------------------------+ -| *Setter* | set_member_variable_color(value) | -+-----------+----------------------------------+ -| *Getter* | get_member_variable_color() | -+-----------+----------------------------------+ +:ref:`Color` **member_variable_color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_member_variable_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_member_variable_color** **(** **)** Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_property_number_color: -- :ref:`Color` **number_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-------------------------+ -| *Setter* | set_number_color(value) | -+-----------+-------------------------+ -| *Getter* | get_number_color() | -+-----------+-------------------------+ +:ref:`Color` **number_color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_number_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_number_color** **(** **)** Sets the color for numbers. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_property_symbol_color: -- :ref:`Color` **symbol_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-------------------------+ -| *Setter* | set_symbol_color(value) | -+-----------+-------------------------+ -| *Getter* | get_symbol_color() | -+-----------+-------------------------+ +:ref:`Color` **symbol_color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_symbol_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_symbol_color** **(** **)** Sets the color for symbols. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CodeHighlighter_method_add_color_region: -- void **add_color_region** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** +.. rst-class:: classref-method + +void **add_color_region** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** Adds a color region such as comments or strings. @@ -197,21 +228,29 @@ 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``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_add_keyword_color: -- void **add_keyword_color** **(** :ref:`String` keyword, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **add_keyword_color** **(** :ref:`String` keyword, :ref:`Color` color **)** Sets the color for a keyword. The keyword cannot contain any symbols except '\_'. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_add_member_keyword_color: -- void **add_member_keyword_color** **(** :ref:`String` member_keyword, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **add_member_keyword_color** **(** :ref:`String` member_keyword, :ref:`Color` color **)** Sets the color for a member keyword. @@ -219,91 +258,135 @@ The member keyword cannot contain any symbols except '\_'. It will not be highlighted if preceded by a '.'. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_clear_color_regions: -- void **clear_color_regions** **(** **)** +.. rst-class:: classref-method + +void **clear_color_regions** **(** **)** Removes all color regions. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_clear_keyword_colors: -- void **clear_keyword_colors** **(** **)** +.. rst-class:: classref-method + +void **clear_keyword_colors** **(** **)** Removes all keywords. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_clear_member_keyword_colors: -- void **clear_member_keyword_colors** **(** **)** +.. rst-class:: classref-method + +void **clear_member_keyword_colors** **(** **)** Removes all member keywords. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_get_keyword_color: -- :ref:`Color` **get_keyword_color** **(** :ref:`String` keyword **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_keyword_color** **(** :ref:`String` keyword **)** |const| Returns the color for a keyword. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_get_member_keyword_color: -- :ref:`Color` **get_member_keyword_color** **(** :ref:`String` member_keyword **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_member_keyword_color** **(** :ref:`String` member_keyword **)** |const| Returns the color for a member keyword. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_has_color_region: -- :ref:`bool` **has_color_region** **(** :ref:`String` start_key **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_color_region** **(** :ref:`String` start_key **)** |const| Returns ``true`` if the start key exists, else ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_has_keyword_color: -- :ref:`bool` **has_keyword_color** **(** :ref:`String` keyword **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_keyword_color** **(** :ref:`String` keyword **)** |const| Returns ``true`` if the keyword exists, else ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_has_member_keyword_color: -- :ref:`bool` **has_member_keyword_color** **(** :ref:`String` member_keyword **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_member_keyword_color** **(** :ref:`String` member_keyword **)** |const| Returns ``true`` if the member keyword exists, else ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_remove_color_region: -- void **remove_color_region** **(** :ref:`String` start_key **)** +.. rst-class:: classref-method + +void **remove_color_region** **(** :ref:`String` start_key **)** Removes the color region that uses that start key. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_remove_keyword_color: -- void **remove_keyword_color** **(** :ref:`String` keyword **)** +.. rst-class:: classref-method + +void **remove_keyword_color** **(** :ref:`String` keyword **)** Removes the keyword. +.. rst-class:: classref-item-separator + ---- .. _class_CodeHighlighter_method_remove_member_keyword_color: -- void **remove_member_keyword_color** **(** :ref:`String` member_keyword **)** +.. rst-class:: classref-method + +void **remove_member_keyword_color** **(** :ref:`String` member_keyword **)** Removes the member keyword. diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index f0969d73e..c6a72e083 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -16,6 +16,8 @@ CollisionObject2D Base node for 2D collision objects. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,469 +25,652 @@ CollisionObject2D is the base class for 2D physics objects. It can hold any numb \ **Note:** Only collisions between objects within the same canvas (:ref:`Viewport` canvas or :ref:`CanvasLayer`) are supported. The behavior of collisions between objects in different canvases is undefined. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`collision_layer` | ``1`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`collision_priority` | ``1.0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`input_pickable` | ``true`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`collision_layer` | ``1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`collision_priority` | ``1.0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`input_pickable` | ``true`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_CollisionObject2D_signal_input_event: -- **input_event** **(** :ref:`Node` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** +.. rst-class:: classref-signal + +**input_event** **(** :ref:`Node` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** 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 + ---- .. _class_CollisionObject2D_signal_mouse_entered: -- **mouse_entered** **(** **)** +.. rst-class:: classref-signal -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. +**mouse_entered** **(** **)** -\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject2D``'s area is small. This signal may also not be emitted if another ``CollisionObject2D`` is overlapping the ``CollisionObject2D`` in question. +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. + +\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the **CollisionObject2D**'s area is small. This signal may also not be emitted if another **CollisionObject2D** is overlapping the **CollisionObject2D** in question. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject2D_signal_mouse_exited: -- **mouse_exited** **(** **)** +.. rst-class:: classref-signal -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. +**mouse_exited** **(** **)** -\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject2D``'s area is small. This signal may also not be emitted if another ``CollisionObject2D`` is overlapping the ``CollisionObject2D`` in question. +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. + +\ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the **CollisionObject2D**'s area is small. This signal may also not be emitted if another **CollisionObject2D** is overlapping the **CollisionObject2D** in question. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject2D_signal_mouse_shape_entered: -- **mouse_shape_entered** **(** :ref:`int` shape_idx **)** +.. rst-class:: classref-signal + +**mouse_shape_entered** **(** :ref:`int` shape_idx **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_signal_mouse_shape_exited: -- **mouse_shape_exited** **(** :ref:`int` shape_idx **)** +.. rst-class:: classref-signal + +**mouse_shape_exited** **(** :ref:`int` shape_idx **)** 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_CollisionObject2D_DisableMode: -.. _class_CollisionObject2D_constant_DISABLE_MODE_REMOVE: - -.. _class_CollisionObject2D_constant_DISABLE_MODE_MAKE_STATIC: - -.. _class_CollisionObject2D_constant_DISABLE_MODE_KEEP_ACTIVE: +.. rst-class:: classref-enumeration enum **DisableMode**: -- **DISABLE_MODE_REMOVE** = **0** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this ``CollisionObject2D``. +.. _class_CollisionObject2D_constant_DISABLE_MODE_REMOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_REMOVE** = ``0`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this **CollisionObject2D**. Automatically re-added to the physics simulation when the :ref:`Node` is processed again. -- **DISABLE_MODE_MAKE_STATIC** = **1** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, make the body static. Doesn't affect :ref:`Area2D`. :ref:`PhysicsBody2D` can't be affected by forces or other bodies while static. +.. _class_CollisionObject2D_constant_DISABLE_MODE_MAKE_STATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_MAKE_STATIC** = ``1`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, make the body static. Doesn't affect :ref:`Area2D`. :ref:`PhysicsBody2D` can't be affected by forces or other bodies while static. Automatically set :ref:`PhysicsBody2D` back to its original mode when the :ref:`Node` is processed again. -- **DISABLE_MODE_KEEP_ACTIVE** = **2** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, do not affect the physics simulation. +.. _class_CollisionObject2D_constant_DISABLE_MODE_KEEP_ACTIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_KEEP_ACTIVE** = ``2`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, do not affect the physics simulation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CollisionObject2D_property_collision_layer: -- :ref:`int` **collision_layer** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``1`` | -+-----------+----------------------------+ -| *Setter* | set_collision_layer(value) | -+-----------+----------------------------+ -| *Getter* | get_collision_layer() | -+-----------+----------------------------+ +:ref:`int` **collision_layer** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_layer** **(** :ref:`int` value **)** +- :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`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :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`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_property_collision_priority: -- :ref:`float` **collision_priority** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------+ -| *Setter* | set_collision_priority(value) | -+-----------+-------------------------------+ -| *Getter* | get_collision_priority() | -+-----------+-------------------------------+ +:ref:`float` **collision_priority** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_collision_priority** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_property_disable_mode: -- :ref:`DisableMode` **disable_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_disable_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_disable_mode() | -+-----------+-------------------------+ +:ref:`DisableMode` **disable_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_disable_mode** **(** :ref:`DisableMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_property_input_pickable: -- :ref:`bool` **input_pickable** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_pickable(value) | -+-----------+---------------------+ -| *Getter* | is_pickable() | -+-----------+---------------------+ +:ref:`bool` **input_pickable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_pickable** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CollisionObject2D_method__input_event: -- void **_input_event** **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_input_event** **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| 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. \ **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: -- void **_mouse_enter** **(** **)** |virtual| +.. rst-class:: classref-method -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. +void **_mouse_enter** **(** **)** |virtual| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject2D_method__mouse_exit: -- void **_mouse_exit** **(** **)** |virtual| +.. rst-class:: classref-method -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. +void **_mouse_exit** **(** **)** |virtual| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject2D_method__mouse_shape_enter: -- void **_mouse_shape_enter** **(** :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_mouse_shape_enter** **(** :ref:`int` shape_idx **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method__mouse_shape_exit: -- void **_mouse_shape_exit** **(** :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_mouse_shape_exit** **(** :ref:`int` shape_idx **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_create_shape_owner: -- :ref:`int` **create_shape_owner** **(** :ref:`Object` owner **)** +.. rst-class:: classref-method + +:ref:`int` **create_shape_owner** **(** :ref:`Object` owner **)** Creates a new shape owner for the given object. Returns ``owner_id`` of the new owner for future reference. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_get_collision_layer_value: -- :ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns the object's :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_get_shape_owner_one_way_collision_margin: -- :ref:`float` **get_shape_owner_one_way_collision_margin** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_shape_owner_one_way_collision_margin** **(** :ref:`int` owner_id **)** |const| Returns the ``one_way_collision_margin`` of the shape owner identified by given ``owner_id``. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_get_shape_owners: -- :ref:`PackedInt32Array` **get_shape_owners** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_shape_owners** **(** **)** Returns an :ref:`Array` of ``owner_id`` identifiers. You can use these ids in other methods that take ``owner_id`` as an argument. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_is_shape_owner_disabled: -- :ref:`bool` **is_shape_owner_disabled** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_shape_owner_disabled** **(** :ref:`int` owner_id **)** |const| If ``true``, the shape owner and its shapes are disabled. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_is_shape_owner_one_way_collision_enabled: -- :ref:`bool` **is_shape_owner_one_way_collision_enabled** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method -Returns ``true`` if collisions for the shape owner originating from this ``CollisionObject2D`` will not be reported to collided with ``CollisionObject2D``\ s. +:ref:`bool` **is_shape_owner_one_way_collision_enabled** **(** :ref:`int` owner_id **)** |const| + +Returns ``true`` if collisions for the shape owner originating from this **CollisionObject2D** will not be reported to collided with **CollisionObject2D**\ s. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject2D_method_remove_shape_owner: -- void **remove_shape_owner** **(** :ref:`int` owner_id **)** +.. rst-class:: classref-method + +void **remove_shape_owner** **(** :ref:`int` owner_id **)** Removes the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_set_collision_layer_value: -- void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_find_owner: -- :ref:`int` **shape_find_owner** **(** :ref:`int` shape_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shape_find_owner** **(** :ref:`int` shape_index **)** |const| Returns the ``owner_id`` of the given shape. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_add_shape: -- void **shape_owner_add_shape** **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** +.. rst-class:: classref-method + +void **shape_owner_add_shape** **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** Adds a :ref:`Shape2D` to the shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_clear_shapes: -- void **shape_owner_clear_shapes** **(** :ref:`int` owner_id **)** +.. rst-class:: classref-method + +void **shape_owner_clear_shapes** **(** :ref:`int` owner_id **)** Removes all shapes from the shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_get_owner: -- :ref:`Object` **shape_owner_get_owner** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **shape_owner_get_owner** **(** :ref:`int` owner_id **)** |const| Returns the parent object of the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_get_shape: -- :ref:`Shape2D` **shape_owner_get_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +.. rst-class:: classref-method + +:ref:`Shape2D` **shape_owner_get_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| Returns the :ref:`Shape2D` with the given id from the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_get_shape_count: -- :ref:`int` **shape_owner_get_shape_count** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shape_owner_get_shape_count** **(** :ref:`int` owner_id **)** |const| Returns the number of shapes the given shape owner contains. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_get_shape_index: -- :ref:`int` **shape_owner_get_shape_index** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shape_owner_get_shape_index** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| Returns the child index of the :ref:`Shape2D` with the given id from the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_get_transform: -- :ref:`Transform2D` **shape_owner_get_transform** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **shape_owner_get_transform** **(** :ref:`int` owner_id **)** |const| Returns the shape owner's :ref:`Transform2D`. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_remove_shape: -- void **shape_owner_remove_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** +.. rst-class:: classref-method + +void **shape_owner_remove_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** Removes a shape from the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_set_disabled: -- void **shape_owner_set_disabled** **(** :ref:`int` owner_id, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **shape_owner_set_disabled** **(** :ref:`int` owner_id, :ref:`bool` disabled **)** If ``true``, disables the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_set_one_way_collision: -- void **shape_owner_set_one_way_collision** **(** :ref:`int` owner_id, :ref:`bool` enable **)** +.. rst-class:: classref-method -If ``enable`` is ``true``, collisions for the shape owner originating from this ``CollisionObject2D`` will not be reported to collided with ``CollisionObject2D``\ s. +void **shape_owner_set_one_way_collision** **(** :ref:`int` owner_id, :ref:`bool` enable **)** + +If ``enable`` is ``true``, collisions for the shape owner originating from this **CollisionObject2D** will not be reported to collided with **CollisionObject2D**\ s. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject2D_method_shape_owner_set_one_way_collision_margin: -- void **shape_owner_set_one_way_collision_margin** **(** :ref:`int` owner_id, :ref:`float` margin **)** +.. rst-class:: classref-method + +void **shape_owner_set_one_way_collision_margin** **(** :ref:`int` owner_id, :ref:`float` margin **)** Sets the ``one_way_collision_margin`` of the shape owner identified by given ``owner_id`` to ``margin`` pixels. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject2D_method_shape_owner_set_transform: -- void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** Sets the :ref:`Transform2D` of the given shape owner. diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index f2ad3c424..51a3e4ba5 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -16,416 +16,570 @@ CollisionObject3D Base node for collision objects. +.. rst-class:: classref-introduction-group + Description ----------- CollisionObject3D is the base class for physics objects. It can hold any number of collision :ref:`Shape3D`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject3D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`collision_layer` | ``1`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`collision_priority` | ``1.0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`input_capture_on_drag` | ``false`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`input_ray_pickable` | ``true`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`collision_layer` | ``1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`collision_priority` | ``1.0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`input_capture_on_drag` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`input_ray_pickable` | ``true`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_CollisionObject3D_signal_input_event: -- **input_event** **(** :ref:`Node` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** +.. rst-class:: classref-signal + +**input_event** **(** :ref:`Node` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_signal_mouse_entered: -- **mouse_entered** **(** **)** +.. rst-class:: classref-signal + +**mouse_entered** **(** **)** 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. \ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the :ref:`CollisionObject2D`'s area is small. This signal may also not be emitted if another :ref:`CollisionObject2D` is overlapping the :ref:`CollisionObject2D` in question. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_signal_mouse_exited: -- **mouse_exited** **(** **)** +.. rst-class:: classref-signal + +**mouse_exited** **(** **)** 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. \ **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the :ref:`CollisionObject2D`'s area is small. This signal may also not be emitted if another :ref:`CollisionObject2D` is overlapping the :ref:`CollisionObject2D` in question. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_CollisionObject3D_DisableMode: -.. _class_CollisionObject3D_constant_DISABLE_MODE_REMOVE: - -.. _class_CollisionObject3D_constant_DISABLE_MODE_MAKE_STATIC: - -.. _class_CollisionObject3D_constant_DISABLE_MODE_KEEP_ACTIVE: +.. rst-class:: classref-enumeration enum **DisableMode**: -- **DISABLE_MODE_REMOVE** = **0** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this ``CollisionObject3D``. +.. _class_CollisionObject3D_constant_DISABLE_MODE_REMOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_REMOVE** = ``0`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this **CollisionObject3D**. Automatically re-added to the physics simulation when the :ref:`Node` is processed again. -- **DISABLE_MODE_MAKE_STATIC** = **1** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, make the body static. Doesn't affect :ref:`Area2D`. :ref:`PhysicsBody3D` can't be affected by forces or other bodies while static. +.. _class_CollisionObject3D_constant_DISABLE_MODE_MAKE_STATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_MAKE_STATIC** = ``1`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, make the body static. Doesn't affect :ref:`Area2D`. :ref:`PhysicsBody3D` can't be affected by forces or other bodies while static. Automatically set :ref:`PhysicsBody3D` back to its original mode when the :ref:`Node` is processed again. -- **DISABLE_MODE_KEEP_ACTIVE** = **2** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, do not affect the physics simulation. +.. _class_CollisionObject3D_constant_DISABLE_MODE_KEEP_ACTIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_KEEP_ACTIVE** = ``2`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, do not affect the physics simulation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CollisionObject3D_property_collision_layer: -- :ref:`int` **collision_layer** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``1`` | -+-----------+----------------------------+ -| *Setter* | set_collision_layer(value) | -+-----------+----------------------------+ -| *Getter* | get_collision_layer() | -+-----------+----------------------------+ +:ref:`int` **collision_layer** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_layer** **(** :ref:`int` value **)** +- :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`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :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`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_property_collision_priority: -- :ref:`float` **collision_priority** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------+ -| *Setter* | set_collision_priority(value) | -+-----------+-------------------------------+ -| *Getter* | get_collision_priority() | -+-----------+-------------------------------+ +:ref:`float` **collision_priority** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_collision_priority** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_property_disable_mode: -- :ref:`DisableMode` **disable_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_disable_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_disable_mode() | -+-----------+-------------------------+ +:ref:`DisableMode` **disable_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_disable_mode** **(** :ref:`DisableMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_property_input_capture_on_drag: -- :ref:`bool` **input_capture_on_drag** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_capture_input_on_drag(value) | -+-----------+----------------------------------+ -| *Getter* | get_capture_input_on_drag() | -+-----------+----------------------------------+ +:ref:`bool` **input_capture_on_drag** = ``false`` -If ``true``, the ``CollisionObject3D`` will continue to receive input events as the mouse is dragged across its shapes. +.. rst-class:: classref-property-setget + +- void **set_capture_input_on_drag** **(** :ref:`bool` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject3D_property_input_ray_pickable: -- :ref:`bool` **input_ray_pickable** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_ray_pickable(value) | -+-----------+-------------------------+ -| *Getter* | is_ray_pickable() | -+-----------+-------------------------+ +:ref:`bool` **input_ray_pickable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_ray_pickable** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CollisionObject3D_method__input_event: -- void **_input_event** **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_input_event** **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| 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. \ **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: -- void **_mouse_enter** **(** **)** |virtual| +.. rst-class:: classref-method -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. +void **_mouse_enter** **(** **)** |virtual| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject3D_method__mouse_exit: -- void **_mouse_exit** **(** **)** |virtual| +.. rst-class:: classref-method -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. +void **_mouse_exit** **(** **)** |virtual| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionObject3D_method_create_shape_owner: -- :ref:`int` **create_shape_owner** **(** :ref:`Object` owner **)** +.. rst-class:: classref-method + +:ref:`int` **create_shape_owner** **(** :ref:`Object` owner **)** Creates a new shape owner for the given object. Returns ``owner_id`` of the new owner for future reference. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_get_collision_layer_value: -- :ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns the object's :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_get_shape_owners: -- :ref:`PackedInt32Array` **get_shape_owners** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_shape_owners** **(** **)** Returns an :ref:`Array` of ``owner_id`` identifiers. You can use these ids in other methods that take ``owner_id`` as an argument. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_is_shape_owner_disabled: -- :ref:`bool` **is_shape_owner_disabled** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_shape_owner_disabled** **(** :ref:`int` owner_id **)** |const| If ``true``, the shape owner and its shapes are disabled. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_remove_shape_owner: -- void **remove_shape_owner** **(** :ref:`int` owner_id **)** +.. rst-class:: classref-method + +void **remove_shape_owner** **(** :ref:`int` owner_id **)** Removes the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_set_collision_layer_value: -- void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_find_owner: -- :ref:`int` **shape_find_owner** **(** :ref:`int` shape_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shape_find_owner** **(** :ref:`int` shape_index **)** |const| Returns the ``owner_id`` of the given shape. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_add_shape: -- void **shape_owner_add_shape** **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** +.. rst-class:: classref-method + +void **shape_owner_add_shape** **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** Adds a :ref:`Shape3D` to the shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_clear_shapes: -- void **shape_owner_clear_shapes** **(** :ref:`int` owner_id **)** +.. rst-class:: classref-method + +void **shape_owner_clear_shapes** **(** :ref:`int` owner_id **)** Removes all shapes from the shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_get_owner: -- :ref:`Object` **shape_owner_get_owner** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **shape_owner_get_owner** **(** :ref:`int` owner_id **)** |const| Returns the parent object of the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_get_shape: -- :ref:`Shape3D` **shape_owner_get_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +.. rst-class:: classref-method + +:ref:`Shape3D` **shape_owner_get_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| Returns the :ref:`Shape3D` with the given id from the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_get_shape_count: -- :ref:`int` **shape_owner_get_shape_count** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shape_owner_get_shape_count** **(** :ref:`int` owner_id **)** |const| Returns the number of shapes the given shape owner contains. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_get_shape_index: -- :ref:`int` **shape_owner_get_shape_index** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shape_owner_get_shape_index** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| Returns the child index of the :ref:`Shape3D` with the given id from the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_get_transform: -- :ref:`Transform3D` **shape_owner_get_transform** **(** :ref:`int` owner_id **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **shape_owner_get_transform** **(** :ref:`int` owner_id **)** |const| Returns the shape owner's :ref:`Transform3D`. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_remove_shape: -- void **shape_owner_remove_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** +.. rst-class:: classref-method + +void **shape_owner_remove_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** Removes a shape from the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_set_disabled: -- void **shape_owner_set_disabled** **(** :ref:`int` owner_id, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **shape_owner_set_disabled** **(** :ref:`int` owner_id, :ref:`bool` disabled **)** If ``true``, disables the given shape owner. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionObject3D_method_shape_owner_set_transform: -- void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** Sets the :ref:`Transform3D` of the given shape owner. diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index c4f929c15..737222346 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -14,123 +14,155 @@ CollisionPolygon2D Defines a 2D collision polygon. +.. rst-class:: classref-introduction-group + Description ----------- Provides a concave or convex 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. See also :ref:`ConvexPolygonShape2D`. -In the editor, a ``CollisionPolygon2D`` can be generated from a :ref:`Sprite2D`'s outline by selecting a :ref:`Sprite2D` node, going to the **Sprite2D** menu at the top of the 2D editor viewport then choosing **Create CollisionPolygon2D Sibling**. +In the editor, a **CollisionPolygon2D** can be generated from a :ref:`Sprite2D`'s outline by selecting a :ref:`Sprite2D` node, going to the **Sprite2D** menu at the top of the 2D editor viewport then choosing **Create CollisionPolygon2D Sibling**. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`BuildMode` | :ref:`build_mode` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`disabled` | ``false`` | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`one_way_collision` | ``false`` | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`float` | :ref:`one_way_collision_margin` | ``1.0`` | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`BuildMode` | :ref:`build_mode` | ``0`` | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`one_way_collision` | ``false`` | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`one_way_collision_margin` | ``1.0`` | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CollisionPolygon2D_BuildMode: -.. _class_CollisionPolygon2D_constant_BUILD_SOLIDS: - -.. _class_CollisionPolygon2D_constant_BUILD_SEGMENTS: +.. rst-class:: classref-enumeration enum **BuildMode**: -- **BUILD_SOLIDS** = **0** --- Collisions will include the polygon and its contained area. +.. _class_CollisionPolygon2D_constant_BUILD_SOLIDS: -- **BUILD_SEGMENTS** = **1** --- Collisions will only include the polygon edges. +.. rst-class:: classref-enumeration-constant + +:ref:`BuildMode` **BUILD_SOLIDS** = ``0`` + +Collisions will include the polygon and its contained area. + +.. _class_CollisionPolygon2D_constant_BUILD_SEGMENTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BuildMode` **BUILD_SEGMENTS** = ``1`` + +Collisions will only include the polygon edges. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CollisionPolygon2D_property_build_mode: -- :ref:`BuildMode` **build_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_build_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_build_mode() | -+-----------+-----------------------+ +:ref:`BuildMode` **build_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_build_mode** **(** :ref:`BuildMode` value **)** +- :ref:`BuildMode` **get_build_mode** **(** **)** Collision build mode. Use one of the :ref:`BuildMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionPolygon2D_property_disabled: -- :ref:`bool` **disabled** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_disabled(value) | -+-----------+---------------------+ -| *Getter* | is_disabled() | -+-----------+---------------------+ +:ref:`bool` **disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_disabled** **(** **)** If ``true``, no collisions will be detected. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionPolygon2D_property_one_way_collision: -- :ref:`bool` **one_way_collision** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_one_way_collision(value) | -+-----------+--------------------------------+ -| *Getter* | is_one_way_collision_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **one_way_collision** = ``false`` -If ``true``, only edges that face up, relative to ``CollisionPolygon2D``'s rotation, will collide with other objects. +.. rst-class:: classref-property-setget -\ **Note:** This property has no effect if this ``CollisionPolygon2D`` is a child of an :ref:`Area2D` node. +- void **set_one_way_collision** **(** :ref:`bool` value **)** +- :ref:`bool` **is_one_way_collision_enabled** **(** **)** + +If ``true``, only edges that face up, relative to **CollisionPolygon2D**'s rotation, will collide with other objects. + +\ **Note:** This property has no effect if this **CollisionPolygon2D** is a child of an :ref:`Area2D` node. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionPolygon2D_property_one_way_collision_margin: -- :ref:`float` **one_way_collision_margin** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_one_way_collision_margin(value) | -+-----------+-------------------------------------+ -| *Getter* | get_one_way_collision_margin() | -+-----------+-------------------------------------+ +:ref:`float` **one_way_collision_margin** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_one_way_collision_margin** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionPolygon2D_property_polygon: -- :ref:`PackedVector2Array` **polygon** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_polygon(value) | -+-----------+--------------------------+ -| *Getter* | get_polygon() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_polygon** **(** **)** The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the :ref:`PackedVector2Array`, not a reference. diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 49b2a4516..6caef1ae7 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -14,6 +14,8 @@ CollisionPolygon3D Editor-only node for defining a collision polygon in 3D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,81 +23,94 @@ Allows editing a concave or convex collision polygon's vertices on a selected pl \ **Note:** Since this is an editor-only helper, properties modified during gameplay will have no effect. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ -| :ref:`float` | :ref:`depth` | ``1.0`` | -+-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`disabled` | ``false`` | -+-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ -| :ref:`float` | :ref:`margin` | ``0.04`` | -+-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | -+-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`depth` | ``1.0`` | + +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`margin` | ``0.04`` | + +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CollisionPolygon3D_property_depth: -- :ref:`float` **depth** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_depth(value) | -+-----------+------------------+ -| *Getter* | get_depth() | -+-----------+------------------+ +:ref:`float` **depth** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth** **(** :ref:`float` value **)** +- :ref:`float` **get_depth** **(** **)** Length that the resulting collision extends in either direction perpendicular to its polygon. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionPolygon3D_property_disabled: -- :ref:`bool` **disabled** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_disabled(value) | -+-----------+---------------------+ -| *Getter* | is_disabled() | -+-----------+---------------------+ +:ref:`bool` **disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_disabled** **(** **)** If ``true``, no collision will be produced. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionPolygon3D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.04`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.04`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** The collision margin for the generated :ref:`Shape3D`. See :ref:`Shape3D.margin` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionPolygon3D_property_polygon: -- :ref:`PackedVector2Array` **polygon** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_polygon(value) | -+-----------+--------------------------+ -| *Getter* | get_polygon() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_polygon** **(** **)** Array of vertices which define the polygon. diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 9618d0edd..7a3edb780 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -14,6 +14,8 @@ CollisionShape2D Node that represents collision shape data in 2D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ Editor facility for creating and editing collision shapes in 2D space. Set the : You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,101 +36,117 @@ Tutorials - `2D Kinematic Character Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`debug_color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`disabled` | ``false`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`one_way_collision` | ``false`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`one_way_collision_margin` | ``1.0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Shape2D` | :ref:`shape` | | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_color` | ``Color(0, 0, 0, 1)`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`one_way_collision` | ``false`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`one_way_collision_margin` | ``1.0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Shape2D` | :ref:`shape` | | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CollisionShape2D_property_debug_color: -- :ref:`Color` **debug_color** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+------------------------+ -| *Setter* | set_debug_color(value) | -+-----------+------------------------+ -| *Getter* | get_debug_color() | -+-----------+------------------------+ +:ref:`Color` **debug_color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_debug_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_debug_color** **(** **)** The collision shape debug color. \ **Note:** The default value is :ref:`ProjectSettings.debug/shapes/collision/shape_color`. The ``Color(0, 0, 0, 1)`` value documented here is a placeholder, and not the actual default debug color. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionShape2D_property_disabled: -- :ref:`bool` **disabled** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_disabled(value) | -+-----------+---------------------+ -| *Getter* | is_disabled() | -+-----------+---------------------+ +:ref:`bool` **disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_disabled** **(** **)** A disabled collision shape has no effect in the world. This property should be changed with :ref:`Object.set_deferred`. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionShape2D_property_one_way_collision: -- :ref:`bool` **one_way_collision** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_one_way_collision(value) | -+-----------+--------------------------------+ -| *Getter* | is_one_way_collision_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **one_way_collision** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_one_way_collision** **(** :ref:`bool` value **)** +- :ref:`bool` **is_one_way_collision_enabled** **(** **)** Sets whether this collision shape should only detect collision on one side (top or bottom). -\ **Note:** This property has no effect if this ``CollisionShape2D`` is a child of an :ref:`Area2D` node. +\ **Note:** This property has no effect if this **CollisionShape2D** is a child of an :ref:`Area2D` node. + +.. rst-class:: classref-item-separator ---- .. _class_CollisionShape2D_property_one_way_collision_margin: -- :ref:`float` **one_way_collision_margin** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_one_way_collision_margin(value) | -+-----------+-------------------------------------+ -| *Getter* | get_one_way_collision_margin() | -+-----------+-------------------------------------+ +:ref:`float` **one_way_collision_margin** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_one_way_collision_margin** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionShape2D_property_shape: -- :ref:`Shape2D` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Shape2D` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Shape2D` value **)** +- :ref:`Shape2D` **get_shape** **(** **)** The actual shape owned by this collision shape. diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index c45d22c80..554654876 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -14,6 +14,8 @@ CollisionShape3D Node that represents collision shape data in 3D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ Editor facility for creating and editing collision shapes in 3D space. Set the : You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area3D` to give it a detection shape, or add it to a :ref:`PhysicsBody3D` to create a solid object. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,69 +36,99 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`disabled` | ``false`` | -+-------------------------------+-----------------------------------------------------------+-----------+ -| :ref:`Shape3D` | :ref:`shape` | | -+-------------------------------+-----------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +-------------------------------+-----------------------------------------------------------+-----------+ + | :ref:`Shape3D` | :ref:`shape` | | + +-------------------------------+-----------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_convex_from_siblings` **(** **)** | -+------+------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | -+------+------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`make_convex_from_siblings` **(** **)** | + +------+------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | + +------+------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CollisionShape3D_property_disabled: -- :ref:`bool` **disabled** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_disabled(value) | -+-----------+---------------------+ -| *Getter* | is_disabled() | -+-----------+---------------------+ +:ref:`bool` **disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_disabled** **(** **)** A disabled collision shape has no effect in the world. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionShape3D_property_shape: -- :ref:`Shape3D` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Shape3D` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Shape3D` value **)** +- :ref:`Shape3D` **get_shape** **(** **)** The actual shape owned by this collision shape. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CollisionShape3D_method_make_convex_from_siblings: -- void **make_convex_from_siblings** **(** **)** +.. rst-class:: classref-method + +void **make_convex_from_siblings** **(** **)** Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance3D` siblings geometry. +.. rst-class:: classref-item-separator + ---- .. _class_CollisionShape3D_method_resource_changed: -- void **resource_changed** **(** :ref:`Resource` resource **)** +.. rst-class:: classref-method + +void **resource_changed** **(** :ref:`Resource` resource **)** If this method exists within a script it will be called whenever the shape resource has been modified. diff --git a/classes/class_color.rst b/classes/class_color.rst index f0e298111..dda4a7bac 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -10,21 +10,23 @@ Color ===== -Color in RGBA format using floats on the range of 0 to 1. +Color built-in type, in RGBA format. + +.. rst-class:: classref-introduction-group Description ----------- -A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for opacity. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors). +A color represented in RGBA format by red (:ref:`r`), green (:ref:`g`), blue (:ref:`b`), and alpha (:ref:`a`) components. Each component is a 16-bit floating-point value, usually ranging from 0 to 1. Some properties (such as :ref:`CanvasItem.modulate`) may support values greater than 1, for overbright or High Dynamic Range colors. If you want to supply values in a range of 0 to 255, you should use :ref:`@GDScript.Color8`. -You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the `X11 color names `__. - -If you want to supply values in a range of 0 to 255, you should use :ref:`@GDScript.Color8`. +Colors can also be created by name from a set of standardized colors, through the :ref:`String` constructor, :ref:`from_string`, or by directly fetching the color constants documented here. The standardized color set is based on the `X11 color names `__, with the addition of :ref:`TRANSPARENT`. \ **Note:** In a boolean context, a Color will evaluate to ``false`` if it's equal to ``Color(0, 0, 0, 1)`` (opaque black). Otherwise, a Color will always evaluate to ``true``. \ `Color constants cheatsheet `__ +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,879 +36,1507 @@ Tutorials - `GUI Drag And Drop Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`a` | ``1.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`int` | :ref:`a8` | ``255`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`b` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`int` | :ref:`b8` | ``0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`g` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`int` | :ref:`g8` | ``0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`h` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`r` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`int` | :ref:`r8` | ``0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`s` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`v` | ``0.0`` | -+---------------------------+------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`a` | ``1.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`int` | :ref:`a8` | ``255`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`b` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`int` | :ref:`b8` | ``0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`g` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`int` | :ref:`g8` | ``0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`h` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`r` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`int` | :ref:`r8` | ``0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`s` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`v` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :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-` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ +.. 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-` **(** **)** | + +---------------------------+------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Color_constant_ALICE_BLUE: +.. rst-class:: classref-constant + +**ALICE_BLUE** = ``Color(0.941176, 0.972549, 1, 1)`` + +Alice blue color. + .. _class_Color_constant_ANTIQUE_WHITE: +.. rst-class:: classref-constant + +**ANTIQUE_WHITE** = ``Color(0.980392, 0.921569, 0.843137, 1)`` + +Antique white color. + .. _class_Color_constant_AQUA: +.. rst-class:: classref-constant + +**AQUA** = ``Color(0, 1, 1, 1)`` + +Aqua color. + .. _class_Color_constant_AQUAMARINE: +.. rst-class:: classref-constant + +**AQUAMARINE** = ``Color(0.498039, 1, 0.831373, 1)`` + +Aquamarine color. + .. _class_Color_constant_AZURE: +.. rst-class:: classref-constant + +**AZURE** = ``Color(0.941176, 1, 1, 1)`` + +Azure color. + .. _class_Color_constant_BEIGE: +.. rst-class:: classref-constant + +**BEIGE** = ``Color(0.960784, 0.960784, 0.862745, 1)`` + +Beige color. + .. _class_Color_constant_BISQUE: +.. rst-class:: classref-constant + +**BISQUE** = ``Color(1, 0.894118, 0.768627, 1)`` + +Bisque color. + .. _class_Color_constant_BLACK: +.. rst-class:: classref-constant + +**BLACK** = ``Color(0, 0, 0, 1)`` + +Black color. In GDScript, this is the default value of any color. + .. _class_Color_constant_BLANCHED_ALMOND: +.. rst-class:: classref-constant + +**BLANCHED_ALMOND** = ``Color(1, 0.921569, 0.803922, 1)`` + +Blanched almond color. + .. _class_Color_constant_BLUE: +.. rst-class:: classref-constant + +**BLUE** = ``Color(0, 0, 1, 1)`` + +Blue color. + .. _class_Color_constant_BLUE_VIOLET: +.. rst-class:: classref-constant + +**BLUE_VIOLET** = ``Color(0.541176, 0.168627, 0.886275, 1)`` + +Blue violet color. + .. _class_Color_constant_BROWN: +.. rst-class:: classref-constant + +**BROWN** = ``Color(0.647059, 0.164706, 0.164706, 1)`` + +Brown color. + .. _class_Color_constant_BURLYWOOD: +.. rst-class:: classref-constant + +**BURLYWOOD** = ``Color(0.870588, 0.721569, 0.529412, 1)`` + +Burlywood color. + .. _class_Color_constant_CADET_BLUE: +.. rst-class:: classref-constant + +**CADET_BLUE** = ``Color(0.372549, 0.619608, 0.627451, 1)`` + +Cadet blue color. + .. _class_Color_constant_CHARTREUSE: +.. rst-class:: classref-constant + +**CHARTREUSE** = ``Color(0.498039, 1, 0, 1)`` + +Chartreuse color. + .. _class_Color_constant_CHOCOLATE: +.. rst-class:: classref-constant + +**CHOCOLATE** = ``Color(0.823529, 0.411765, 0.117647, 1)`` + +Chocolate color. + .. _class_Color_constant_CORAL: +.. rst-class:: classref-constant + +**CORAL** = ``Color(1, 0.498039, 0.313726, 1)`` + +Coral color. + .. _class_Color_constant_CORNFLOWER_BLUE: +.. rst-class:: classref-constant + +**CORNFLOWER_BLUE** = ``Color(0.392157, 0.584314, 0.929412, 1)`` + +Cornflower blue color. + .. _class_Color_constant_CORNSILK: +.. rst-class:: classref-constant + +**CORNSILK** = ``Color(1, 0.972549, 0.862745, 1)`` + +Cornsilk color. + .. _class_Color_constant_CRIMSON: +.. rst-class:: classref-constant + +**CRIMSON** = ``Color(0.862745, 0.0784314, 0.235294, 1)`` + +Crimson color. + .. _class_Color_constant_CYAN: +.. rst-class:: classref-constant + +**CYAN** = ``Color(0, 1, 1, 1)`` + +Cyan color. + .. _class_Color_constant_DARK_BLUE: +.. rst-class:: classref-constant + +**DARK_BLUE** = ``Color(0, 0, 0.545098, 1)`` + +Dark blue color. + .. _class_Color_constant_DARK_CYAN: +.. rst-class:: classref-constant + +**DARK_CYAN** = ``Color(0, 0.545098, 0.545098, 1)`` + +Dark cyan color. + .. _class_Color_constant_DARK_GOLDENROD: +.. rst-class:: classref-constant + +**DARK_GOLDENROD** = ``Color(0.721569, 0.52549, 0.0431373, 1)`` + +Dark goldenrod color. + .. _class_Color_constant_DARK_GRAY: +.. rst-class:: classref-constant + +**DARK_GRAY** = ``Color(0.662745, 0.662745, 0.662745, 1)`` + +Dark gray color. + .. _class_Color_constant_DARK_GREEN: +.. rst-class:: classref-constant + +**DARK_GREEN** = ``Color(0, 0.392157, 0, 1)`` + +Dark green color. + .. _class_Color_constant_DARK_KHAKI: +.. rst-class:: classref-constant + +**DARK_KHAKI** = ``Color(0.741176, 0.717647, 0.419608, 1)`` + +Dark khaki color. + .. _class_Color_constant_DARK_MAGENTA: +.. rst-class:: classref-constant + +**DARK_MAGENTA** = ``Color(0.545098, 0, 0.545098, 1)`` + +Dark magenta color. + .. _class_Color_constant_DARK_OLIVE_GREEN: +.. rst-class:: classref-constant + +**DARK_OLIVE_GREEN** = ``Color(0.333333, 0.419608, 0.184314, 1)`` + +Dark olive green color. + .. _class_Color_constant_DARK_ORANGE: +.. rst-class:: classref-constant + +**DARK_ORANGE** = ``Color(1, 0.54902, 0, 1)`` + +Dark orange color. + .. _class_Color_constant_DARK_ORCHID: +.. rst-class:: classref-constant + +**DARK_ORCHID** = ``Color(0.6, 0.196078, 0.8, 1)`` + +Dark orchid color. + .. _class_Color_constant_DARK_RED: +.. rst-class:: classref-constant + +**DARK_RED** = ``Color(0.545098, 0, 0, 1)`` + +Dark red color. + .. _class_Color_constant_DARK_SALMON: +.. rst-class:: classref-constant + +**DARK_SALMON** = ``Color(0.913725, 0.588235, 0.478431, 1)`` + +Dark salmon color. + .. _class_Color_constant_DARK_SEA_GREEN: +.. rst-class:: classref-constant + +**DARK_SEA_GREEN** = ``Color(0.560784, 0.737255, 0.560784, 1)`` + +Dark sea green color. + .. _class_Color_constant_DARK_SLATE_BLUE: +.. rst-class:: classref-constant + +**DARK_SLATE_BLUE** = ``Color(0.282353, 0.239216, 0.545098, 1)`` + +Dark slate blue color. + .. _class_Color_constant_DARK_SLATE_GRAY: +.. rst-class:: classref-constant + +**DARK_SLATE_GRAY** = ``Color(0.184314, 0.309804, 0.309804, 1)`` + +Dark slate gray color. + .. _class_Color_constant_DARK_TURQUOISE: +.. rst-class:: classref-constant + +**DARK_TURQUOISE** = ``Color(0, 0.807843, 0.819608, 1)`` + +Dark turquoise color. + .. _class_Color_constant_DARK_VIOLET: +.. rst-class:: classref-constant + +**DARK_VIOLET** = ``Color(0.580392, 0, 0.827451, 1)`` + +Dark violet color. + .. _class_Color_constant_DEEP_PINK: +.. rst-class:: classref-constant + +**DEEP_PINK** = ``Color(1, 0.0784314, 0.576471, 1)`` + +Deep pink color. + .. _class_Color_constant_DEEP_SKY_BLUE: +.. rst-class:: classref-constant + +**DEEP_SKY_BLUE** = ``Color(0, 0.74902, 1, 1)`` + +Deep sky blue color. + .. _class_Color_constant_DIM_GRAY: +.. rst-class:: classref-constant + +**DIM_GRAY** = ``Color(0.411765, 0.411765, 0.411765, 1)`` + +Dim gray color. + .. _class_Color_constant_DODGER_BLUE: +.. rst-class:: classref-constant + +**DODGER_BLUE** = ``Color(0.117647, 0.564706, 1, 1)`` + +Dodger blue color. + .. _class_Color_constant_FIREBRICK: +.. rst-class:: classref-constant + +**FIREBRICK** = ``Color(0.698039, 0.133333, 0.133333, 1)`` + +Firebrick color. + .. _class_Color_constant_FLORAL_WHITE: +.. rst-class:: classref-constant + +**FLORAL_WHITE** = ``Color(1, 0.980392, 0.941176, 1)`` + +Floral white color. + .. _class_Color_constant_FOREST_GREEN: +.. rst-class:: classref-constant + +**FOREST_GREEN** = ``Color(0.133333, 0.545098, 0.133333, 1)`` + +Forest green color. + .. _class_Color_constant_FUCHSIA: +.. rst-class:: classref-constant + +**FUCHSIA** = ``Color(1, 0, 1, 1)`` + +Fuchsia color. + .. _class_Color_constant_GAINSBORO: +.. rst-class:: classref-constant + +**GAINSBORO** = ``Color(0.862745, 0.862745, 0.862745, 1)`` + +Gainsboro color. + .. _class_Color_constant_GHOST_WHITE: +.. rst-class:: classref-constant + +**GHOST_WHITE** = ``Color(0.972549, 0.972549, 1, 1)`` + +Ghost white color. + .. _class_Color_constant_GOLD: +.. rst-class:: classref-constant + +**GOLD** = ``Color(1, 0.843137, 0, 1)`` + +Gold color. + .. _class_Color_constant_GOLDENROD: +.. rst-class:: classref-constant + +**GOLDENROD** = ``Color(0.854902, 0.647059, 0.12549, 1)`` + +Goldenrod color. + .. _class_Color_constant_GRAY: +.. rst-class:: classref-constant + +**GRAY** = ``Color(0.745098, 0.745098, 0.745098, 1)`` + +Gray color. + .. _class_Color_constant_GREEN: +.. rst-class:: classref-constant + +**GREEN** = ``Color(0, 1, 0, 1)`` + +Green color. + .. _class_Color_constant_GREEN_YELLOW: +.. rst-class:: classref-constant + +**GREEN_YELLOW** = ``Color(0.678431, 1, 0.184314, 1)`` + +Green yellow color. + .. _class_Color_constant_HONEYDEW: +.. rst-class:: classref-constant + +**HONEYDEW** = ``Color(0.941176, 1, 0.941176, 1)`` + +Honeydew color. + .. _class_Color_constant_HOT_PINK: +.. rst-class:: classref-constant + +**HOT_PINK** = ``Color(1, 0.411765, 0.705882, 1)`` + +Hot pink color. + .. _class_Color_constant_INDIAN_RED: +.. rst-class:: classref-constant + +**INDIAN_RED** = ``Color(0.803922, 0.360784, 0.360784, 1)`` + +Indian red color. + .. _class_Color_constant_INDIGO: +.. rst-class:: classref-constant + +**INDIGO** = ``Color(0.294118, 0, 0.509804, 1)`` + +Indigo color. + .. _class_Color_constant_IVORY: +.. rst-class:: classref-constant + +**IVORY** = ``Color(1, 1, 0.941176, 1)`` + +Ivory color. + .. _class_Color_constant_KHAKI: +.. rst-class:: classref-constant + +**KHAKI** = ``Color(0.941176, 0.901961, 0.54902, 1)`` + +Khaki color. + .. _class_Color_constant_LAVENDER: +.. rst-class:: classref-constant + +**LAVENDER** = ``Color(0.901961, 0.901961, 0.980392, 1)`` + +Lavender color. + .. _class_Color_constant_LAVENDER_BLUSH: +.. rst-class:: classref-constant + +**LAVENDER_BLUSH** = ``Color(1, 0.941176, 0.960784, 1)`` + +Lavender blush color. + .. _class_Color_constant_LAWN_GREEN: +.. rst-class:: classref-constant + +**LAWN_GREEN** = ``Color(0.486275, 0.988235, 0, 1)`` + +Lawn green color. + .. _class_Color_constant_LEMON_CHIFFON: +.. rst-class:: classref-constant + +**LEMON_CHIFFON** = ``Color(1, 0.980392, 0.803922, 1)`` + +Lemon chiffon color. + .. _class_Color_constant_LIGHT_BLUE: +.. rst-class:: classref-constant + +**LIGHT_BLUE** = ``Color(0.678431, 0.847059, 0.901961, 1)`` + +Light blue color. + .. _class_Color_constant_LIGHT_CORAL: +.. rst-class:: classref-constant + +**LIGHT_CORAL** = ``Color(0.941176, 0.501961, 0.501961, 1)`` + +Light coral color. + .. _class_Color_constant_LIGHT_CYAN: +.. rst-class:: classref-constant + +**LIGHT_CYAN** = ``Color(0.878431, 1, 1, 1)`` + +Light cyan color. + .. _class_Color_constant_LIGHT_GOLDENROD: +.. rst-class:: classref-constant + +**LIGHT_GOLDENROD** = ``Color(0.980392, 0.980392, 0.823529, 1)`` + +Light goldenrod color. + .. _class_Color_constant_LIGHT_GRAY: +.. rst-class:: classref-constant + +**LIGHT_GRAY** = ``Color(0.827451, 0.827451, 0.827451, 1)`` + +Light gray color. + .. _class_Color_constant_LIGHT_GREEN: +.. rst-class:: classref-constant + +**LIGHT_GREEN** = ``Color(0.564706, 0.933333, 0.564706, 1)`` + +Light green color. + .. _class_Color_constant_LIGHT_PINK: +.. rst-class:: classref-constant + +**LIGHT_PINK** = ``Color(1, 0.713726, 0.756863, 1)`` + +Light pink color. + .. _class_Color_constant_LIGHT_SALMON: +.. rst-class:: classref-constant + +**LIGHT_SALMON** = ``Color(1, 0.627451, 0.478431, 1)`` + +Light salmon color. + .. _class_Color_constant_LIGHT_SEA_GREEN: +.. rst-class:: classref-constant + +**LIGHT_SEA_GREEN** = ``Color(0.12549, 0.698039, 0.666667, 1)`` + +Light sea green color. + .. _class_Color_constant_LIGHT_SKY_BLUE: +.. rst-class:: classref-constant + +**LIGHT_SKY_BLUE** = ``Color(0.529412, 0.807843, 0.980392, 1)`` + +Light sky blue color. + .. _class_Color_constant_LIGHT_SLATE_GRAY: +.. rst-class:: classref-constant + +**LIGHT_SLATE_GRAY** = ``Color(0.466667, 0.533333, 0.6, 1)`` + +Light slate gray color. + .. _class_Color_constant_LIGHT_STEEL_BLUE: +.. rst-class:: classref-constant + +**LIGHT_STEEL_BLUE** = ``Color(0.690196, 0.768627, 0.870588, 1)`` + +Light steel blue color. + .. _class_Color_constant_LIGHT_YELLOW: +.. rst-class:: classref-constant + +**LIGHT_YELLOW** = ``Color(1, 1, 0.878431, 1)`` + +Light yellow color. + .. _class_Color_constant_LIME: +.. rst-class:: classref-constant + +**LIME** = ``Color(0, 1, 0, 1)`` + +Lime color. + .. _class_Color_constant_LIME_GREEN: +.. rst-class:: classref-constant + +**LIME_GREEN** = ``Color(0.196078, 0.803922, 0.196078, 1)`` + +Lime green color. + .. _class_Color_constant_LINEN: +.. rst-class:: classref-constant + +**LINEN** = ``Color(0.980392, 0.941176, 0.901961, 1)`` + +Linen color. + .. _class_Color_constant_MAGENTA: +.. rst-class:: classref-constant + +**MAGENTA** = ``Color(1, 0, 1, 1)`` + +Magenta color. + .. _class_Color_constant_MAROON: +.. rst-class:: classref-constant + +**MAROON** = ``Color(0.690196, 0.188235, 0.376471, 1)`` + +Maroon color. + .. _class_Color_constant_MEDIUM_AQUAMARINE: +.. rst-class:: classref-constant + +**MEDIUM_AQUAMARINE** = ``Color(0.4, 0.803922, 0.666667, 1)`` + +Medium aquamarine color. + .. _class_Color_constant_MEDIUM_BLUE: +.. rst-class:: classref-constant + +**MEDIUM_BLUE** = ``Color(0, 0, 0.803922, 1)`` + +Medium blue color. + .. _class_Color_constant_MEDIUM_ORCHID: +.. rst-class:: classref-constant + +**MEDIUM_ORCHID** = ``Color(0.729412, 0.333333, 0.827451, 1)`` + +Medium orchid color. + .. _class_Color_constant_MEDIUM_PURPLE: +.. rst-class:: classref-constant + +**MEDIUM_PURPLE** = ``Color(0.576471, 0.439216, 0.858824, 1)`` + +Medium purple color. + .. _class_Color_constant_MEDIUM_SEA_GREEN: +.. rst-class:: classref-constant + +**MEDIUM_SEA_GREEN** = ``Color(0.235294, 0.701961, 0.443137, 1)`` + +Medium sea green color. + .. _class_Color_constant_MEDIUM_SLATE_BLUE: +.. rst-class:: classref-constant + +**MEDIUM_SLATE_BLUE** = ``Color(0.482353, 0.407843, 0.933333, 1)`` + +Medium slate blue color. + .. _class_Color_constant_MEDIUM_SPRING_GREEN: +.. rst-class:: classref-constant + +**MEDIUM_SPRING_GREEN** = ``Color(0, 0.980392, 0.603922, 1)`` + +Medium spring green color. + .. _class_Color_constant_MEDIUM_TURQUOISE: +.. rst-class:: classref-constant + +**MEDIUM_TURQUOISE** = ``Color(0.282353, 0.819608, 0.8, 1)`` + +Medium turquoise color. + .. _class_Color_constant_MEDIUM_VIOLET_RED: +.. rst-class:: classref-constant + +**MEDIUM_VIOLET_RED** = ``Color(0.780392, 0.0823529, 0.521569, 1)`` + +Medium violet red color. + .. _class_Color_constant_MIDNIGHT_BLUE: +.. rst-class:: classref-constant + +**MIDNIGHT_BLUE** = ``Color(0.0980392, 0.0980392, 0.439216, 1)`` + +Midnight blue color. + .. _class_Color_constant_MINT_CREAM: +.. rst-class:: classref-constant + +**MINT_CREAM** = ``Color(0.960784, 1, 0.980392, 1)`` + +Mint cream color. + .. _class_Color_constant_MISTY_ROSE: +.. rst-class:: classref-constant + +**MISTY_ROSE** = ``Color(1, 0.894118, 0.882353, 1)`` + +Misty rose color. + .. _class_Color_constant_MOCCASIN: +.. rst-class:: classref-constant + +**MOCCASIN** = ``Color(1, 0.894118, 0.709804, 1)`` + +Moccasin color. + .. _class_Color_constant_NAVAJO_WHITE: +.. rst-class:: classref-constant + +**NAVAJO_WHITE** = ``Color(1, 0.870588, 0.678431, 1)`` + +Navajo white color. + .. _class_Color_constant_NAVY_BLUE: +.. rst-class:: classref-constant + +**NAVY_BLUE** = ``Color(0, 0, 0.501961, 1)`` + +Navy blue color. + .. _class_Color_constant_OLD_LACE: +.. rst-class:: classref-constant + +**OLD_LACE** = ``Color(0.992157, 0.960784, 0.901961, 1)`` + +Old lace color. + .. _class_Color_constant_OLIVE: +.. rst-class:: classref-constant + +**OLIVE** = ``Color(0.501961, 0.501961, 0, 1)`` + +Olive color. + .. _class_Color_constant_OLIVE_DRAB: +.. rst-class:: classref-constant + +**OLIVE_DRAB** = ``Color(0.419608, 0.556863, 0.137255, 1)`` + +Olive drab color. + .. _class_Color_constant_ORANGE: +.. rst-class:: classref-constant + +**ORANGE** = ``Color(1, 0.647059, 0, 1)`` + +Orange color. + .. _class_Color_constant_ORANGE_RED: +.. rst-class:: classref-constant + +**ORANGE_RED** = ``Color(1, 0.270588, 0, 1)`` + +Orange red color. + .. _class_Color_constant_ORCHID: +.. rst-class:: classref-constant + +**ORCHID** = ``Color(0.854902, 0.439216, 0.839216, 1)`` + +Orchid color. + .. _class_Color_constant_PALE_GOLDENROD: +.. rst-class:: classref-constant + +**PALE_GOLDENROD** = ``Color(0.933333, 0.909804, 0.666667, 1)`` + +Pale goldenrod color. + .. _class_Color_constant_PALE_GREEN: +.. rst-class:: classref-constant + +**PALE_GREEN** = ``Color(0.596078, 0.984314, 0.596078, 1)`` + +Pale green color. + .. _class_Color_constant_PALE_TURQUOISE: +.. rst-class:: classref-constant + +**PALE_TURQUOISE** = ``Color(0.686275, 0.933333, 0.933333, 1)`` + +Pale turquoise color. + .. _class_Color_constant_PALE_VIOLET_RED: +.. rst-class:: classref-constant + +**PALE_VIOLET_RED** = ``Color(0.858824, 0.439216, 0.576471, 1)`` + +Pale violet red color. + .. _class_Color_constant_PAPAYA_WHIP: +.. rst-class:: classref-constant + +**PAPAYA_WHIP** = ``Color(1, 0.937255, 0.835294, 1)`` + +Papaya whip color. + .. _class_Color_constant_PEACH_PUFF: +.. rst-class:: classref-constant + +**PEACH_PUFF** = ``Color(1, 0.854902, 0.72549, 1)`` + +Peach puff color. + .. _class_Color_constant_PERU: +.. rst-class:: classref-constant + +**PERU** = ``Color(0.803922, 0.521569, 0.247059, 1)`` + +Peru color. + .. _class_Color_constant_PINK: +.. rst-class:: classref-constant + +**PINK** = ``Color(1, 0.752941, 0.796078, 1)`` + +Pink color. + .. _class_Color_constant_PLUM: +.. rst-class:: classref-constant + +**PLUM** = ``Color(0.866667, 0.627451, 0.866667, 1)`` + +Plum color. + .. _class_Color_constant_POWDER_BLUE: +.. rst-class:: classref-constant + +**POWDER_BLUE** = ``Color(0.690196, 0.878431, 0.901961, 1)`` + +Powder blue color. + .. _class_Color_constant_PURPLE: +.. rst-class:: classref-constant + +**PURPLE** = ``Color(0.627451, 0.12549, 0.941176, 1)`` + +Purple color. + .. _class_Color_constant_REBECCA_PURPLE: +.. rst-class:: classref-constant + +**REBECCA_PURPLE** = ``Color(0.4, 0.2, 0.6, 1)`` + +Rebecca purple color. + .. _class_Color_constant_RED: +.. rst-class:: classref-constant + +**RED** = ``Color(1, 0, 0, 1)`` + +Red color. + .. _class_Color_constant_ROSY_BROWN: +.. rst-class:: classref-constant + +**ROSY_BROWN** = ``Color(0.737255, 0.560784, 0.560784, 1)`` + +Rosy brown color. + .. _class_Color_constant_ROYAL_BLUE: +.. rst-class:: classref-constant + +**ROYAL_BLUE** = ``Color(0.254902, 0.411765, 0.882353, 1)`` + +Royal blue color. + .. _class_Color_constant_SADDLE_BROWN: +.. rst-class:: classref-constant + +**SADDLE_BROWN** = ``Color(0.545098, 0.270588, 0.0745098, 1)`` + +Saddle brown color. + .. _class_Color_constant_SALMON: +.. rst-class:: classref-constant + +**SALMON** = ``Color(0.980392, 0.501961, 0.447059, 1)`` + +Salmon color. + .. _class_Color_constant_SANDY_BROWN: +.. rst-class:: classref-constant + +**SANDY_BROWN** = ``Color(0.956863, 0.643137, 0.376471, 1)`` + +Sandy brown color. + .. _class_Color_constant_SEA_GREEN: +.. rst-class:: classref-constant + +**SEA_GREEN** = ``Color(0.180392, 0.545098, 0.341176, 1)`` + +Sea green color. + .. _class_Color_constant_SEASHELL: +.. rst-class:: classref-constant + +**SEASHELL** = ``Color(1, 0.960784, 0.933333, 1)`` + +Seashell color. + .. _class_Color_constant_SIENNA: +.. rst-class:: classref-constant + +**SIENNA** = ``Color(0.627451, 0.321569, 0.176471, 1)`` + +Sienna color. + .. _class_Color_constant_SILVER: +.. rst-class:: classref-constant + +**SILVER** = ``Color(0.752941, 0.752941, 0.752941, 1)`` + +Silver color. + .. _class_Color_constant_SKY_BLUE: +.. rst-class:: classref-constant + +**SKY_BLUE** = ``Color(0.529412, 0.807843, 0.921569, 1)`` + +Sky blue color. + .. _class_Color_constant_SLATE_BLUE: +.. rst-class:: classref-constant + +**SLATE_BLUE** = ``Color(0.415686, 0.352941, 0.803922, 1)`` + +Slate blue color. + .. _class_Color_constant_SLATE_GRAY: +.. rst-class:: classref-constant + +**SLATE_GRAY** = ``Color(0.439216, 0.501961, 0.564706, 1)`` + +Slate gray color. + .. _class_Color_constant_SNOW: +.. rst-class:: classref-constant + +**SNOW** = ``Color(1, 0.980392, 0.980392, 1)`` + +Snow color. + .. _class_Color_constant_SPRING_GREEN: +.. rst-class:: classref-constant + +**SPRING_GREEN** = ``Color(0, 1, 0.498039, 1)`` + +Spring green color. + .. _class_Color_constant_STEEL_BLUE: +.. rst-class:: classref-constant + +**STEEL_BLUE** = ``Color(0.27451, 0.509804, 0.705882, 1)`` + +Steel blue color. + .. _class_Color_constant_TAN: +.. rst-class:: classref-constant + +**TAN** = ``Color(0.823529, 0.705882, 0.54902, 1)`` + +Tan color. + .. _class_Color_constant_TEAL: +.. rst-class:: classref-constant + +**TEAL** = ``Color(0, 0.501961, 0.501961, 1)`` + +Teal color. + .. _class_Color_constant_THISTLE: +.. rst-class:: classref-constant + +**THISTLE** = ``Color(0.847059, 0.74902, 0.847059, 1)`` + +Thistle color. + .. _class_Color_constant_TOMATO: +.. rst-class:: classref-constant + +**TOMATO** = ``Color(1, 0.388235, 0.278431, 1)`` + +Tomato color. + .. _class_Color_constant_TRANSPARENT: +.. rst-class:: classref-constant + +**TRANSPARENT** = ``Color(1, 1, 1, 0)`` + +Transparent color (white with zero alpha). + .. _class_Color_constant_TURQUOISE: +.. rst-class:: classref-constant + +**TURQUOISE** = ``Color(0.25098, 0.878431, 0.815686, 1)`` + +Turquoise color. + .. _class_Color_constant_VIOLET: +.. rst-class:: classref-constant + +**VIOLET** = ``Color(0.933333, 0.509804, 0.933333, 1)`` + +Violet color. + .. _class_Color_constant_WEB_GRAY: +.. rst-class:: classref-constant + +**WEB_GRAY** = ``Color(0.501961, 0.501961, 0.501961, 1)`` + +Web gray color. + .. _class_Color_constant_WEB_GREEN: +.. rst-class:: classref-constant + +**WEB_GREEN** = ``Color(0, 0.501961, 0, 1)`` + +Web green color. + .. _class_Color_constant_WEB_MAROON: +.. rst-class:: classref-constant + +**WEB_MAROON** = ``Color(0.501961, 0, 0, 1)`` + +Web maroon color. + .. _class_Color_constant_WEB_PURPLE: +.. rst-class:: classref-constant + +**WEB_PURPLE** = ``Color(0.501961, 0, 0.501961, 1)`` + +Web purple color. + .. _class_Color_constant_WHEAT: +.. rst-class:: classref-constant + +**WHEAT** = ``Color(0.960784, 0.870588, 0.701961, 1)`` + +Wheat color. + .. _class_Color_constant_WHITE: +.. rst-class:: classref-constant + +**WHITE** = ``Color(1, 1, 1, 1)`` + +White color. + .. _class_Color_constant_WHITE_SMOKE: +.. rst-class:: classref-constant + +**WHITE_SMOKE** = ``Color(0.960784, 0.960784, 0.960784, 1)`` + +White smoke color. + .. _class_Color_constant_YELLOW: +.. rst-class:: classref-constant + +**YELLOW** = ``Color(1, 1, 0, 1)`` + +Yellow color. + .. _class_Color_constant_YELLOW_GREEN: -- **ALICE_BLUE** = **Color(0.941176, 0.972549, 1, 1)** --- Alice blue color. +.. rst-class:: classref-constant -- **ANTIQUE_WHITE** = **Color(0.980392, 0.921569, 0.843137, 1)** --- Antique white color. +**YELLOW_GREEN** = ``Color(0.603922, 0.803922, 0.196078, 1)`` -- **AQUA** = **Color(0, 1, 1, 1)** --- Aqua color. +Yellow green color. -- **AQUAMARINE** = **Color(0.498039, 1, 0.831373, 1)** --- Aquamarine color. +.. rst-class:: classref-section-separator -- **AZURE** = **Color(0.941176, 1, 1, 1)** --- Azure color. +---- -- **BEIGE** = **Color(0.960784, 0.960784, 0.862745, 1)** --- Beige color. - -- **BISQUE** = **Color(1, 0.894118, 0.768627, 1)** --- Bisque color. - -- **BLACK** = **Color(0, 0, 0, 1)** --- Black color. - -- **BLANCHED_ALMOND** = **Color(1, 0.921569, 0.803922, 1)** --- Blanched almond color. - -- **BLUE** = **Color(0, 0, 1, 1)** --- Blue color. - -- **BLUE_VIOLET** = **Color(0.541176, 0.168627, 0.886275, 1)** --- Blue violet color. - -- **BROWN** = **Color(0.647059, 0.164706, 0.164706, 1)** --- Brown color. - -- **BURLYWOOD** = **Color(0.870588, 0.721569, 0.529412, 1)** --- Burlywood color. - -- **CADET_BLUE** = **Color(0.372549, 0.619608, 0.627451, 1)** --- Cadet blue color. - -- **CHARTREUSE** = **Color(0.498039, 1, 0, 1)** --- Chartreuse color. - -- **CHOCOLATE** = **Color(0.823529, 0.411765, 0.117647, 1)** --- Chocolate color. - -- **CORAL** = **Color(1, 0.498039, 0.313726, 1)** --- Coral color. - -- **CORNFLOWER_BLUE** = **Color(0.392157, 0.584314, 0.929412, 1)** --- Cornflower blue color. - -- **CORNSILK** = **Color(1, 0.972549, 0.862745, 1)** --- Cornsilk color. - -- **CRIMSON** = **Color(0.862745, 0.0784314, 0.235294, 1)** --- Crimson color. - -- **CYAN** = **Color(0, 1, 1, 1)** --- Cyan color. - -- **DARK_BLUE** = **Color(0, 0, 0.545098, 1)** --- Dark blue color. - -- **DARK_CYAN** = **Color(0, 0.545098, 0.545098, 1)** --- Dark cyan color. - -- **DARK_GOLDENROD** = **Color(0.721569, 0.52549, 0.0431373, 1)** --- Dark goldenrod color. - -- **DARK_GRAY** = **Color(0.662745, 0.662745, 0.662745, 1)** --- Dark gray color. - -- **DARK_GREEN** = **Color(0, 0.392157, 0, 1)** --- Dark green color. - -- **DARK_KHAKI** = **Color(0.741176, 0.717647, 0.419608, 1)** --- Dark khaki color. - -- **DARK_MAGENTA** = **Color(0.545098, 0, 0.545098, 1)** --- Dark magenta color. - -- **DARK_OLIVE_GREEN** = **Color(0.333333, 0.419608, 0.184314, 1)** --- Dark olive green color. - -- **DARK_ORANGE** = **Color(1, 0.54902, 0, 1)** --- Dark orange color. - -- **DARK_ORCHID** = **Color(0.6, 0.196078, 0.8, 1)** --- Dark orchid color. - -- **DARK_RED** = **Color(0.545098, 0, 0, 1)** --- Dark red color. - -- **DARK_SALMON** = **Color(0.913725, 0.588235, 0.478431, 1)** --- Dark salmon color. - -- **DARK_SEA_GREEN** = **Color(0.560784, 0.737255, 0.560784, 1)** --- Dark sea green color. - -- **DARK_SLATE_BLUE** = **Color(0.282353, 0.239216, 0.545098, 1)** --- Dark slate blue color. - -- **DARK_SLATE_GRAY** = **Color(0.184314, 0.309804, 0.309804, 1)** --- Dark slate gray color. - -- **DARK_TURQUOISE** = **Color(0, 0.807843, 0.819608, 1)** --- Dark turquoise color. - -- **DARK_VIOLET** = **Color(0.580392, 0, 0.827451, 1)** --- Dark violet color. - -- **DEEP_PINK** = **Color(1, 0.0784314, 0.576471, 1)** --- Deep pink color. - -- **DEEP_SKY_BLUE** = **Color(0, 0.74902, 1, 1)** --- Deep sky blue color. - -- **DIM_GRAY** = **Color(0.411765, 0.411765, 0.411765, 1)** --- Dim gray color. - -- **DODGER_BLUE** = **Color(0.117647, 0.564706, 1, 1)** --- Dodger blue color. - -- **FIREBRICK** = **Color(0.698039, 0.133333, 0.133333, 1)** --- Firebrick color. - -- **FLORAL_WHITE** = **Color(1, 0.980392, 0.941176, 1)** --- Floral white color. - -- **FOREST_GREEN** = **Color(0.133333, 0.545098, 0.133333, 1)** --- Forest green color. - -- **FUCHSIA** = **Color(1, 0, 1, 1)** --- Fuchsia color. - -- **GAINSBORO** = **Color(0.862745, 0.862745, 0.862745, 1)** --- Gainsboro color. - -- **GHOST_WHITE** = **Color(0.972549, 0.972549, 1, 1)** --- Ghost white color. - -- **GOLD** = **Color(1, 0.843137, 0, 1)** --- Gold color. - -- **GOLDENROD** = **Color(0.854902, 0.647059, 0.12549, 1)** --- Goldenrod color. - -- **GRAY** = **Color(0.745098, 0.745098, 0.745098, 1)** --- Gray color. - -- **GREEN** = **Color(0, 1, 0, 1)** --- Green color. - -- **GREEN_YELLOW** = **Color(0.678431, 1, 0.184314, 1)** --- Green yellow color. - -- **HONEYDEW** = **Color(0.941176, 1, 0.941176, 1)** --- Honeydew color. - -- **HOT_PINK** = **Color(1, 0.411765, 0.705882, 1)** --- Hot pink color. - -- **INDIAN_RED** = **Color(0.803922, 0.360784, 0.360784, 1)** --- Indian red color. - -- **INDIGO** = **Color(0.294118, 0, 0.509804, 1)** --- Indigo color. - -- **IVORY** = **Color(1, 1, 0.941176, 1)** --- Ivory color. - -- **KHAKI** = **Color(0.941176, 0.901961, 0.54902, 1)** --- Khaki color. - -- **LAVENDER** = **Color(0.901961, 0.901961, 0.980392, 1)** --- Lavender color. - -- **LAVENDER_BLUSH** = **Color(1, 0.941176, 0.960784, 1)** --- Lavender blush color. - -- **LAWN_GREEN** = **Color(0.486275, 0.988235, 0, 1)** --- Lawn green color. - -- **LEMON_CHIFFON** = **Color(1, 0.980392, 0.803922, 1)** --- Lemon chiffon color. - -- **LIGHT_BLUE** = **Color(0.678431, 0.847059, 0.901961, 1)** --- Light blue color. - -- **LIGHT_CORAL** = **Color(0.941176, 0.501961, 0.501961, 1)** --- Light coral color. - -- **LIGHT_CYAN** = **Color(0.878431, 1, 1, 1)** --- Light cyan color. - -- **LIGHT_GOLDENROD** = **Color(0.980392, 0.980392, 0.823529, 1)** --- Light goldenrod color. - -- **LIGHT_GRAY** = **Color(0.827451, 0.827451, 0.827451, 1)** --- Light gray color. - -- **LIGHT_GREEN** = **Color(0.564706, 0.933333, 0.564706, 1)** --- Light green color. - -- **LIGHT_PINK** = **Color(1, 0.713726, 0.756863, 1)** --- Light pink color. - -- **LIGHT_SALMON** = **Color(1, 0.627451, 0.478431, 1)** --- Light salmon color. - -- **LIGHT_SEA_GREEN** = **Color(0.12549, 0.698039, 0.666667, 1)** --- Light sea green color. - -- **LIGHT_SKY_BLUE** = **Color(0.529412, 0.807843, 0.980392, 1)** --- Light sky blue color. - -- **LIGHT_SLATE_GRAY** = **Color(0.466667, 0.533333, 0.6, 1)** --- Light slate gray color. - -- **LIGHT_STEEL_BLUE** = **Color(0.690196, 0.768627, 0.870588, 1)** --- Light steel blue color. - -- **LIGHT_YELLOW** = **Color(1, 1, 0.878431, 1)** --- Light yellow color. - -- **LIME** = **Color(0, 1, 0, 1)** --- Lime color. - -- **LIME_GREEN** = **Color(0.196078, 0.803922, 0.196078, 1)** --- Lime green color. - -- **LINEN** = **Color(0.980392, 0.941176, 0.901961, 1)** --- Linen color. - -- **MAGENTA** = **Color(1, 0, 1, 1)** --- Magenta color. - -- **MAROON** = **Color(0.690196, 0.188235, 0.376471, 1)** --- Maroon color. - -- **MEDIUM_AQUAMARINE** = **Color(0.4, 0.803922, 0.666667, 1)** --- Medium aquamarine color. - -- **MEDIUM_BLUE** = **Color(0, 0, 0.803922, 1)** --- Medium blue color. - -- **MEDIUM_ORCHID** = **Color(0.729412, 0.333333, 0.827451, 1)** --- Medium orchid color. - -- **MEDIUM_PURPLE** = **Color(0.576471, 0.439216, 0.858824, 1)** --- Medium purple color. - -- **MEDIUM_SEA_GREEN** = **Color(0.235294, 0.701961, 0.443137, 1)** --- Medium sea green color. - -- **MEDIUM_SLATE_BLUE** = **Color(0.482353, 0.407843, 0.933333, 1)** --- Medium slate blue color. - -- **MEDIUM_SPRING_GREEN** = **Color(0, 0.980392, 0.603922, 1)** --- Medium spring green color. - -- **MEDIUM_TURQUOISE** = **Color(0.282353, 0.819608, 0.8, 1)** --- Medium turquoise color. - -- **MEDIUM_VIOLET_RED** = **Color(0.780392, 0.0823529, 0.521569, 1)** --- Medium violet red color. - -- **MIDNIGHT_BLUE** = **Color(0.0980392, 0.0980392, 0.439216, 1)** --- Midnight blue color. - -- **MINT_CREAM** = **Color(0.960784, 1, 0.980392, 1)** --- Mint cream color. - -- **MISTY_ROSE** = **Color(1, 0.894118, 0.882353, 1)** --- Misty rose color. - -- **MOCCASIN** = **Color(1, 0.894118, 0.709804, 1)** --- Moccasin color. - -- **NAVAJO_WHITE** = **Color(1, 0.870588, 0.678431, 1)** --- Navajo white color. - -- **NAVY_BLUE** = **Color(0, 0, 0.501961, 1)** --- Navy blue color. - -- **OLD_LACE** = **Color(0.992157, 0.960784, 0.901961, 1)** --- Old lace color. - -- **OLIVE** = **Color(0.501961, 0.501961, 0, 1)** --- Olive color. - -- **OLIVE_DRAB** = **Color(0.419608, 0.556863, 0.137255, 1)** --- Olive drab color. - -- **ORANGE** = **Color(1, 0.647059, 0, 1)** --- Orange color. - -- **ORANGE_RED** = **Color(1, 0.270588, 0, 1)** --- Orange red color. - -- **ORCHID** = **Color(0.854902, 0.439216, 0.839216, 1)** --- Orchid color. - -- **PALE_GOLDENROD** = **Color(0.933333, 0.909804, 0.666667, 1)** --- Pale goldenrod color. - -- **PALE_GREEN** = **Color(0.596078, 0.984314, 0.596078, 1)** --- Pale green color. - -- **PALE_TURQUOISE** = **Color(0.686275, 0.933333, 0.933333, 1)** --- Pale turquoise color. - -- **PALE_VIOLET_RED** = **Color(0.858824, 0.439216, 0.576471, 1)** --- Pale violet red color. - -- **PAPAYA_WHIP** = **Color(1, 0.937255, 0.835294, 1)** --- Papaya whip color. - -- **PEACH_PUFF** = **Color(1, 0.854902, 0.72549, 1)** --- Peach puff color. - -- **PERU** = **Color(0.803922, 0.521569, 0.247059, 1)** --- Peru color. - -- **PINK** = **Color(1, 0.752941, 0.796078, 1)** --- Pink color. - -- **PLUM** = **Color(0.866667, 0.627451, 0.866667, 1)** --- Plum color. - -- **POWDER_BLUE** = **Color(0.690196, 0.878431, 0.901961, 1)** --- Powder blue color. - -- **PURPLE** = **Color(0.627451, 0.12549, 0.941176, 1)** --- Purple color. - -- **REBECCA_PURPLE** = **Color(0.4, 0.2, 0.6, 1)** --- Rebecca purple color. - -- **RED** = **Color(1, 0, 0, 1)** --- Red color. - -- **ROSY_BROWN** = **Color(0.737255, 0.560784, 0.560784, 1)** --- Rosy brown color. - -- **ROYAL_BLUE** = **Color(0.254902, 0.411765, 0.882353, 1)** --- Royal blue color. - -- **SADDLE_BROWN** = **Color(0.545098, 0.270588, 0.0745098, 1)** --- Saddle brown color. - -- **SALMON** = **Color(0.980392, 0.501961, 0.447059, 1)** --- Salmon color. - -- **SANDY_BROWN** = **Color(0.956863, 0.643137, 0.376471, 1)** --- Sandy brown color. - -- **SEA_GREEN** = **Color(0.180392, 0.545098, 0.341176, 1)** --- Sea green color. - -- **SEASHELL** = **Color(1, 0.960784, 0.933333, 1)** --- Seashell color. - -- **SIENNA** = **Color(0.627451, 0.321569, 0.176471, 1)** --- Sienna color. - -- **SILVER** = **Color(0.752941, 0.752941, 0.752941, 1)** --- Silver color. - -- **SKY_BLUE** = **Color(0.529412, 0.807843, 0.921569, 1)** --- Sky blue color. - -- **SLATE_BLUE** = **Color(0.415686, 0.352941, 0.803922, 1)** --- Slate blue color. - -- **SLATE_GRAY** = **Color(0.439216, 0.501961, 0.564706, 1)** --- Slate gray color. - -- **SNOW** = **Color(1, 0.980392, 0.980392, 1)** --- Snow color. - -- **SPRING_GREEN** = **Color(0, 1, 0.498039, 1)** --- Spring green color. - -- **STEEL_BLUE** = **Color(0.27451, 0.509804, 0.705882, 1)** --- Steel blue color. - -- **TAN** = **Color(0.823529, 0.705882, 0.54902, 1)** --- Tan color. - -- **TEAL** = **Color(0, 0.501961, 0.501961, 1)** --- Teal color. - -- **THISTLE** = **Color(0.847059, 0.74902, 0.847059, 1)** --- Thistle color. - -- **TOMATO** = **Color(1, 0.388235, 0.278431, 1)** --- Tomato color. - -- **TRANSPARENT** = **Color(1, 1, 1, 0)** --- Transparent color (white with zero alpha). - -- **TURQUOISE** = **Color(0.25098, 0.878431, 0.815686, 1)** --- Turquoise color. - -- **VIOLET** = **Color(0.933333, 0.509804, 0.933333, 1)** --- Violet color. - -- **WEB_GRAY** = **Color(0.501961, 0.501961, 0.501961, 1)** --- Web gray color. - -- **WEB_GREEN** = **Color(0, 0.501961, 0, 1)** --- Web green color. - -- **WEB_MAROON** = **Color(0.501961, 0, 0, 1)** --- Web maroon color. - -- **WEB_PURPLE** = **Color(0.501961, 0, 0.501961, 1)** --- Web purple color. - -- **WHEAT** = **Color(0.960784, 0.870588, 0.701961, 1)** --- Wheat color. - -- **WHITE** = **Color(1, 1, 1, 1)** --- White color. - -- **WHITE_SMOKE** = **Color(0.960784, 0.960784, 0.960784, 1)** --- White smoke color. - -- **YELLOW** = **Color(1, 1, 0, 1)** --- Yellow color. - -- **YELLOW_GREEN** = **Color(0.603922, 0.803922, 0.196078, 1)** --- Yellow green color. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Color_property_a: -- :ref:`float` **a** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **a** = ``1.0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Color_property_a8: -- :ref:`int` **a8** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``255`` | -+-----------+---------+ +:ref:`int` **a8** = ``255`` -Wrapper for :ref:`a` that uses the range 0 to 255 instead of 0 to 1. +Wrapper for :ref:`a` that uses the range 0 to 255, instead of 0 to 1. + +.. rst-class:: classref-item-separator ---- .. _class_Color_property_b: -- :ref:`float` **b** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **b** = ``0.0`` The color's blue component, typically on the range of 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_Color_property_b8: -- :ref:`int` **b8** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **b8** = ``0`` -Wrapper for :ref:`b` that uses the range 0 to 255 instead of 0 to 1. +Wrapper for :ref:`b` that uses the range 0 to 255, instead of 0 to 1. + +.. rst-class:: classref-item-separator ---- .. _class_Color_property_g: -- :ref:`float` **g** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **g** = ``0.0`` The color's green component, typically on the range of 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_Color_property_g8: -- :ref:`int` **g8** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **g8** = ``0`` -Wrapper for :ref:`g` that uses the range 0 to 255 instead of 0 to 1. +Wrapper for :ref:`g` that uses the range 0 to 255, instead of 0 to 1. + +.. rst-class:: classref-item-separator ---- .. _class_Color_property_h: -- :ref:`float` **h** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **h** = ``0.0`` The HSV hue of this color, on the range 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_Color_property_r: -- :ref:`float` **r** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **r** = ``0.0`` The color's red component, typically on the range of 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_Color_property_r8: -- :ref:`int` **r8** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **r8** = ``0`` -Wrapper for :ref:`r` that uses the range 0 to 255 instead of 0 to 1. +Wrapper for :ref:`r` that uses the range 0 to 255, instead of 0 to 1. + +.. rst-class:: classref-item-separator ---- .. _class_Color_property_s: -- :ref:`float` **s** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **s** = ``0.0`` The HSV saturation of this color, on the range 0 to 1. +.. rst-class:: classref-item-separator + ---- .. _class_Color_property_v: -- :ref:`float` **v** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **v** = ``0.0`` The HSV value (brightness) of this color, on the range 0 to 1. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Color_constructor_Color: -- :ref:`Color` **Color** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Color`` with all components set to ``0``. +:ref:`Color` **Color** **(** **)** + +Constructs a default **Color** from opaque black. This is the same as :ref:`BLACK`. + +\ **Note:** in C#, constructs an empty color with all of its components set to ``0.0`` (transparent black). + +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **Color** **(** :ref:`Color` from, :ref:`float` alpha **)** +.. rst-class:: classref-constructor -Constructs a ``Color`` from an existing color, but with a custom alpha value. +:ref:`Color` **Color** **(** :ref:`Color` from, :ref:`float` alpha **)** + +Constructs a **Color** from the existing color, with :ref:`a` set to the given ``alpha`` value. .. tabs:: .. code-tab:: gdscript - var red = Color(Color.red, 0.2) # 20% opaque red. + var red = Color(Color.RED, 0.2) # 20% opaque red. .. code-tab:: csharp @@ -914,29 +1544,45 @@ Constructs a ``Color`` from an existing color, but with a custom alpha value. ----- - -- :ref:`Color` **Color** **(** :ref:`Color` from **)** - -Constructs a ``Color`` as a copy of the given ``Color``. +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **Color** **(** :ref:`String` code **)** +.. rst-class:: classref-constructor -Constructs a ``Color`` either from an HTML color code or from a standardized color name. Supported color names are the same as the constants. +:ref:`Color` **Color** **(** :ref:`Color` from **)** + +Constructs a **Color** as a copy of the given **Color**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **Color** **(** :ref:`String` code, :ref:`float` alpha **)** +.. rst-class:: classref-constructor -Constructs a ``Color`` either from an HTML color code or from a standardized color name, with ``alpha`` on the range of 0 to 1. Supported color names are the same as the constants. +:ref:`Color` **Color** **(** :ref:`String` code **)** + +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. + +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b **)** +.. rst-class:: classref-constructor -Constructs a ``Color`` from RGB values, typically between 0 and 1. Alpha will be 1. +:ref:`Color` **Color** **(** :ref:`String` code, :ref:`float` alpha **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + +:ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b **)** + +Constructs a **Color** from RGB values, typically between 0.0 and 1.0. :ref:`a` is set to 1.0. .. tabs:: @@ -951,11 +1597,15 @@ Constructs a ``Color`` from RGB values, typically between 0 and 1. Alpha will be +.. rst-class:: classref-item-separator + ---- -- :ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b, :ref:`float` a **)** +.. rst-class:: classref-constructor -Constructs a ``Color`` from RGBA values, typically between 0 and 1. +:ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b, :ref:`float` a **)** + +Constructs a **Color** from RGBA values, typically between 0.0 and 1.0. .. tabs:: @@ -970,14 +1620,22 @@ Constructs a ``Color`` from RGBA values, typically between 0 and 1. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Color_method_blend: -- :ref:`Color` **blend** **(** :ref:`Color` over **)** |const| +.. rst-class:: classref-method -Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values. +:ref:`Color` **blend** **(** :ref:`Color` over **)** |const| + +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 colour (including alpha). .. tabs:: @@ -996,21 +1654,29 @@ Returns a new color resulting from blending this color over another. If the colo +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_clamp: -- :ref:`Color` **clamp** **(** :ref:`Color` min=Color(0, 0, 0, 0), :ref:`Color` max=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **clamp** **(** :ref:`Color` min=Color(0, 0, 0, 0), :ref:`Color` max=Color(1, 1, 1, 1) **)** |const| Returns a new color with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_darkened: -- :ref:`Color` **darkened** **(** :ref:`float` amount **)** |const| +.. rst-class:: classref-method -Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1). +:ref:`Color` **darkened** **(** :ref:`float` amount **)** |const| + +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`. .. tabs:: @@ -1027,13 +1693,17 @@ Returns a new color resulting from making this color darker by the specified per +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_from_hsv: -- :ref:`Color` **from_hsv** **(** :ref:`float` h, :ref:`float` s, :ref:`float` v, :ref:`float` alpha=1.0 **)** |static| +.. rst-class:: classref-method -Constructs a color from an `HSV profile `__. ``h`` (hue), ``s`` (saturation), and ``v`` (value) are typically between 0 and 1. +:ref:`Color` **from_hsv** **(** :ref:`float` h, :ref:`float` s, :ref:`float` v, :ref:`float` alpha=1.0 **)** |static| + +Constructs a color from an `HSV profile `__. The hue (``h``), saturation (``s``), and value (``v``) are typically between 0.0 and 1.0. .. tabs:: @@ -1048,13 +1718,17 @@ 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| +.. rst-class:: classref-method -Constructs a color from an `OK HSL profile `__. ``h`` (hue), ``s`` (saturation), and ``l`` (lightness) are typically between 0 and 1. +:ref:`Color` **from_ok_hsl** **(** :ref:`float` h, :ref:`float` s, :ref:`float` l, :ref:`float` alpha=1.0 **)** |static| + +Constructs a color from an `OK HSL profile `__. The hue (``h``), saturation (``s``), and lightness (``l``) are typically between 0.0 and 1.0. .. tabs:: @@ -1069,179 +1743,236 @@ Constructs a color from an `OK HSL profile ` **from_rgbe9995** **(** :ref:`int` rgbe **)** |static| +.. rst-class:: classref-method -Encodes a ``Color`` from a RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995`. +:ref:`Color` **from_rgbe9995** **(** :ref:`int` rgbe **)** |static| + +Encodes a **Color** from a RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995`. + +.. rst-class:: classref-item-separator ---- .. _class_Color_method_from_string: -- :ref:`Color` **from_string** **(** :ref:`String` str, :ref:`Color` default **)** |static| +.. rst-class:: classref-method -Creates a ``Color`` from string, which can be either a HTML color code or a named color. Fallbacks to ``default`` if the string does not denote any valid color. +:ref:`Color` **from_string** **(** :ref:`String` str, :ref:`Color` default **)** |static| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Color_method_get_luminance: -- :ref:`float` **get_luminance** **(** **)** |const| +.. rst-class:: classref-method -Returns the luminance of the color in the ``[0.0, 1.0]`` range. +:ref:`float` **get_luminance** **(** **)** |const| -This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark. +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. \ **Note:** :ref:`get_luminance` relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use :ref:`srgb_to_linear` to convert it to the linear color space first. +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_hex: -- :ref:`Color` **hex** **(** :ref:`int` hex **)** |static| +.. rst-class:: classref-method -Returns the ``Color`` associated with the provided integer number, with 8 bits per channel in ARGB order. The integer should be 32-bit. Best used with hexadecimal notation. +:ref:`Color` **hex** **(** :ref:`int` hex **)** |static| + +Returns the **Color** associated with the provided ``hex`` integer in 32-bit ARGB format (8 bits per channel, alpha channel first). + +In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix). :: - modulate = Color.hex(0xffff0000) # red + var red = Color.hex(0xffff0000) + var dark_cyan = Color.hex(0xff008b8b) + var my_color = Color.hex(0xa4bbefd2) + +.. rst-class:: classref-item-separator ---- .. _class_Color_method_hex64: -- :ref:`Color` **hex64** **(** :ref:`int` hex **)** |static| +.. rst-class:: classref-method -Same as :ref:`hex`, but takes 64-bit integer and the color uses 16 bits per channel. +:ref:`Color` **hex64** **(** :ref:`int` hex **)** |static| + +Returns the **Color** associated with the provided ``hex`` integer in 64-bit ARGB format (16 bits per channel, alpha channel first). + +In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix). + +.. rst-class:: classref-item-separator ---- .. _class_Color_method_html: -- :ref:`Color` **html** **(** :ref:`String` rgba **)** |static| +.. rst-class:: classref-method -Returns a new color from ``rgba``, an HTML hexadecimal color string. ``rgba`` is not case sensitive, and may be prefixed with a '#' character. +:ref:`Color` **html** **(** :ref:`String` rgba **)** |static| -\ ``rgba`` must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If ``rgba`` does not contain an alpha channel value, an alpha channel value of 1.0 is applied. +Returns a new color from ``rgba``, an HTML hexadecimal color string. ``rgba`` is not case-sensitive, and may be prefixed by a hash sign (``#``). -If ``rgba`` is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned. +\ ``rgba`` must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If ``rgba`` does not contain an alpha channel value, an alpha channel value of 1.0 is applied. If ``rgba`` is invalid, returns an empty color. -\ **Note:** This method is not implemented in C#, but the same functionality is provided in the class constructor. +\ **Note:** In C#, this method is not implemented. The same functionality is provided by the Color constructor. .. tabs:: .. code-tab:: gdscript - var green = Color.html("#00FF00FF") # set green to Color(0.0, 1.0, 0.0, 1.0) - var blue = Color.html("#0000FF") # set blue to Color(0.0, 0.0, 1.0, 1.0) + var blue = Color.html("#0000ff") # blue is Color(0.0, 0.0, 1.0, 1.0) + var green = Color.html("#0F0") # green is Color(0.0, 1.0, 0.0, 1.0) + var col = Color.html("663399cc") # col is Color(0.4, 0.2, 0.6, 0.8) .. code-tab:: csharp - var green = new Color("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0) - var blue = new Color("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0) + var blue = new Color("#0000ff"); // blue is Color(0.0, 0.0, 1.0, 1.0) + var green = new Color("#0F0"); // green is Color(0.0, 1.0, 0.0, 1.0) + var col = new Color("663399cc"); // col is Color(0.4, 0.2, 0.6, 0.8) +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_html_is_valid: -- :ref:`bool` **html_is_valid** **(** :ref:`String` color **)** |static| +.. rst-class:: classref-method -Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. ``color`` is not case sensitive, and may be prefixed with a '#' character. +:ref:`bool` **html_is_valid** **(** :ref:`String` color **)** |static| -For a string to be valid it must be three-digit or six-digit hexadecimal, and may contain an alpha channel value. +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`. .. tabs:: .. code-tab:: gdscript - var result = Color.html_is_valid("#55aaFF") # result is true - result = Color.html_is_valid("#55AAFF20") # result is true - result = Color.html_is_valid("55AAFF") # result is true - result = Color.html_is_valid("#F2C") # result is true - result = Color.html_is_valid("#AABBC) # result is false - result = Color.html_is_valid("#55aaFF5") # result is false + Color.html_is_valid("#55aaFF") # Returns true + Color.html_is_valid("#55AAFF20") # Returns true + 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("#55aaFF5") # Returns false .. code-tab:: csharp - var result = Color.HtmlIsValid("#55AAFF"); // result is true - result = Color.HtmlIsValid("#55AAFF20"); // result is true - result = Color.HtmlIsValid("55AAFF); // result is true - result = Color.HtmlIsValid("#F2C"); // result is true - result = Color.HtmlIsValid("#AABBC"); // result is false - result = Color.HtmlIsValid("#55aaFF5"); // result is false + // This method is not available in C#. Use `StringExtensions.IsValidHtmlColor()`, instead. + "#55AAFF".IsValidHtmlColor(); // Returns true + "#55AAFF20".IsValidHtmlColor(); // Returns true + "55AAFF".IsValidHtmlColor(); // Returns true + "#F2C".IsValidHtmlColor(); // Returns true + + "#AABBC".IsValidHtmlColor(); // Returns false + "#55aaFF5".IsValidHtmlColor(); // Returns false +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_inverted: -- :ref:`Color` **inverted** **(** **)** |const| +.. rst-class:: classref-method -Returns the inverted color ``(1 - r, 1 - g, 1 - b, a)``. +:ref:`Color` **inverted** **(** **)** |const| + +Returns the color with its :ref:`r`, :ref:`g`, and :ref:`b` components inverted (``(1 - r, 1 - g, 1 - b, a)``). .. tabs:: .. code-tab:: gdscript + var black = Color.WHITE.inverted() var color = Color(0.3, 0.4, 0.9) var inverted_color = color.inverted() # Equivalent to `Color(0.7, 0.6, 0.1)` .. code-tab:: csharp + var black = Colors.White.Inverted(); var color = new Color(0.3f, 0.4f, 0.9f); Color invertedColor = color.Inverted(); // Equivalent to `new Color(0.7f, 0.6f, 0.1f)` +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Color` to **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Color` to **)** |const| Returns ``true`` if this color and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_lerp: -- :ref:`Color` **lerp** **(** :ref:`Color` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method -Returns the linear interpolation with another color. The interpolation factor ``weight`` is between 0 and 1. +:ref:`Color` **lerp** **(** :ref:`Color` to, :ref:`float` weight **)** |const| + +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`. .. tabs:: .. code-tab:: gdscript - var c1 = Color(1.0, 0.0, 0.0) - var c2 = Color(0.0, 1.0, 0.0) - var lerp_color = c1.lerp(c2, 0.5) # Equivalent to `Color(0.5, 0.5, 0.0)` + var red = Color(1.0, 0.0, 0.0) + var aqua = Color(0.0, 1.0, 0.8) + + red.lerp(aqua, 0.2) # Returns Color(0.8, 0.2, 0.16) + red.lerp(aqua, 0.5) # Returns Color(0.5, 0.5, 0.4) + red.lerp(aqua, 1.0) # Returns Color(0.0, 1.0, 0.8) .. code-tab:: csharp - var c1 = new Color(1.0f, 0.0f, 0.0f); - var c2 = new Color(0.0f, 1.0f, 0.0f); - Color lerpColor = c1.Lerp(c2, 0.5f); // Equivalent to `new Color(0.5f, 0.5f, 0.0f)` + var red = new Color(1.0f, 0.0f, 0.0f); + var aqua = new Color(0.0f, 1.0f, 0.8f); + + red.Lerp(aqua, 0.2f); // Returns Color(0.8f, 0.2f, 0.16f) + red.Lerp(aqua, 0.5f); // Returns Color(0.5f, 0.5f, 0.4f) + red.Lerp(aqua, 1.0f); // Returns Color(0.0f, 1.0f, 0.8f) +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_lightened: -- :ref:`Color` **lightened** **(** :ref:`float` amount **)** |const| +.. rst-class:: classref-method -Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). +:ref:`Color` **lightened** **(** :ref:`float` amount **)** |const| + +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`. .. tabs:: @@ -1249,38 +1980,50 @@ Returns a new color resulting from making this color lighter by the specified pe .. code-tab:: gdscript var green = Color(0.0, 1.0, 0.0) - var lightgreen = green.lightened(0.2) # 20% lighter than regular green + var light_green = green.lightened(0.2) # 20% lighter than regular green .. code-tab:: csharp var green = new Color(0.0f, 1.0f, 0.0f); - Color lightgreen = green.Lightened(0.2f); // 20% lighter than regular green + Color lightGreen = green.Lightened(0.2f); // 20% lighter than regular green +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_linear_to_srgb: -- :ref:`Color` **linear_to_srgb** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to the `sRGB `__ color space. This assumes the original color is in the linear color space. See also :ref:`srgb_to_linear` which performs the opposite operation. +:ref:`Color` **linear_to_srgb** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Color_method_srgb_to_linear: -- :ref:`Color` **srgb_to_linear** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to the linear color space. This assumes the original color is in the sRGB color space. See also :ref:`linear_to_srgb` which performs the opposite operation. +:ref:`Color` **srgb_to_linear** **(** **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Color_method_to_abgr32: -- :ref:`int` **to_abgr32** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to a 32-bit integer in ABGR format (each byte represents a color channel). ABGR is the reversed version of the default format. +:ref:`int` **to_abgr32** **(** **)** |const| + +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. .. tabs:: @@ -1297,13 +2040,17 @@ Returns the color converted to a 32-bit integer in ABGR format (each byte repres +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_to_abgr64: -- :ref:`int` **to_abgr64** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to a 64-bit integer in ABGR format (each word represents a color channel). ABGR is the reversed version of the default format. +:ref:`int` **to_abgr64** **(** **)** |const| + +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. .. tabs:: @@ -1320,13 +2067,17 @@ Returns the color converted to a 64-bit integer in ABGR format (each word repres +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_to_argb32: -- :ref:`int` **to_argb32** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to a 32-bit integer in ARGB format (each byte represents a color channel). ARGB is more compatible with DirectX. +:ref:`int` **to_argb32** **(** **)** |const| + +Returns the color converted to a 32-bit integer in ARGB format (each component is 8 bits). ARGB is more compatible with DirectX. .. tabs:: @@ -1343,13 +2094,17 @@ Returns the color converted to a 32-bit integer in ARGB format (each byte repres +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_to_argb64: -- :ref:`int` **to_argb64** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to a 64-bit integer in ARGB format (each word represents a color channel). ARGB is more compatible with DirectX. +:ref:`int` **to_argb64** **(** **)** |const| + +Returns the color converted to a 64-bit integer in ARGB format (each component is 16 bits). ARGB is more compatible with DirectX. .. tabs:: @@ -1366,40 +2121,48 @@ Returns the color converted to a 64-bit integer in ARGB format (each word repres +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_to_html: -- :ref:`String` **to_html** **(** :ref:`bool` with_alpha=true **)** |const| +.. rst-class:: classref-method -Returns the color converted to an HTML hexadecimal color string in RGBA format (ex: ``ff34f822``). +:ref:`String` **to_html** **(** :ref:`bool` with_alpha=true **)** |const| -Setting ``with_alpha`` to ``false`` excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format). +Returns the color converted to an HTML hexadecimal color :ref:`String` in RGBA format, without the hash (``#``) prefix. + +Setting ``with_alpha`` to ``false``, excludes alpha from the hexadecimal string, using RGB format instead of RGBA format. .. tabs:: .. code-tab:: gdscript - var color = Color(1, 1, 1, 0.5) - var with_alpha = color.to_html() # Returns "ffffff7f" - var without_alpha = color.to_html(false) # Returns "ffffff" + var white = Color(1, 1, 1, 0.5) + var with_alpha = white.to_html() # Returns "ffffff7f" + var without_alpha = white.to_html(false) # Returns "ffffff" .. code-tab:: csharp - var color = new Color(1, 1, 1, 0.5f); - String withAlpha = color.ToHtml(); // Returns "ffffff7f" - String withoutAlpha = color.ToHtml(false); // Returns "ffffff" + var white = new Color(1, 1, 1, 0.5f); + string withAlpha = white.ToHtml(); // Returns "ffffff7f" + string withoutAlpha = white.ToHtml(false); // Returns "ffffff" +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_to_rgba32: -- :ref:`int` **to_rgba32** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to a 32-bit integer in RGBA format (each byte represents a color channel). RGBA is Godot's default format. +:ref:`int` **to_rgba32** **(** **)** |const| + +Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. .. tabs:: @@ -1416,13 +2179,17 @@ Returns the color converted to a 32-bit integer in RGBA format (each byte repres +.. rst-class:: classref-item-separator + ---- .. _class_Color_method_to_rgba64: -- :ref:`int` **to_rgba64** **(** **)** |const| +.. rst-class:: classref-method -Returns the color converted to a 64-bit integer in RGBA format (each word represents a color channel). RGBA is Godot's default format. +:ref:`int` **to_rgba64** **(** **)** |const| + +Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. .. tabs:: @@ -1439,106 +2206,170 @@ Returns the color converted to a 64-bit integer in RGBA format (each word repres +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_Color_operator_neq_bool: +.. _class_Color_operator_neq_Color: -- :ref:`bool` **operator !=** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator -Returns ``true`` if the colors are not equal. +:ref:`bool` **operator !=** **(** :ref:`Color` right **)** + +Returns ``true`` if the colors are not exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- .. _class_Color_operator_mul_Color: -- :ref:`Color` **operator *** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator -Multiplies each component of the ``Color`` by the components of the given ``Color``. +:ref:`Color` **operator *** **(** :ref:`Color` right **)** + +Multiplies each component of the **Color** by the components of the given **Color**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **operator *** **(** :ref:`float` right **)** +.. _class_Color_operator_mul_float: -Multiplies each component of the ``Color`` by the given :ref:`float`. +.. rst-class:: classref-operator + +:ref:`Color` **operator *** **(** :ref:`float` right **)** + +Multiplies each component of the **Color** by the given :ref:`float`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **operator *** **(** :ref:`int` right **)** +.. _class_Color_operator_mul_int: -Multiplies each component of the ``Color`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Color` **operator *** **(** :ref:`int` right **)** + +Multiplies each component of the **Color** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- .. _class_Color_operator_sum_Color: -- :ref:`Color` **operator +** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator -Adds each component of the ``Color`` with the components of the given ``Color``. +:ref:`Color` **operator +** **(** :ref:`Color` right **)** + +Adds each component of the **Color** with the components of the given **Color**. + +.. rst-class:: classref-item-separator ---- .. _class_Color_operator_dif_Color: -- :ref:`Color` **operator -** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator -Subtracts each component of the ``Color`` by the components of the given ``Color``. +:ref:`Color` **operator -** **(** :ref:`Color` right **)** + +Subtracts each component of the **Color** by the components of the given **Color**. + +.. rst-class:: classref-item-separator ---- .. _class_Color_operator_div_Color: -- :ref:`Color` **operator /** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator -Divides each component of the ``Color`` by the components of the given ``Color``. +:ref:`Color` **operator /** **(** :ref:`Color` right **)** + +Divides each component of the **Color** by the components of the given **Color**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **operator /** **(** :ref:`float` right **)** +.. _class_Color_operator_div_float: -Divides each component of the ``Color`` by the given :ref:`float`. +.. rst-class:: classref-operator + +:ref:`Color` **operator /** **(** :ref:`float` right **)** + +Divides each component of the **Color** by the given :ref:`float`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Color` **operator /** **(** :ref:`int` right **)** +.. _class_Color_operator_div_int: -Divides each component of the ``Color`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Color` **operator /** **(** :ref:`int` right **)** + +Divides each component of the **Color** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- -.. _class_Color_operator_eq_bool: +.. _class_Color_operator_eq_Color: -- :ref:`bool` **operator ==** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Color` right **)** Returns ``true`` if the colors are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. ----- - -.. _class_Color_operator_idx_float: - -- :ref:`float` **operator []** **(** :ref:`int` index **)** - -Access color components using their index. ``c[0]`` is equivalent to ``c.r``, ``c[1]`` is equivalent to ``c.g``, ``c[2]`` is equivalent to ``c.b``, and ``c[3]`` is equivalent to ``c.a``. +.. rst-class:: classref-item-separator ---- -.. _class_Color_operator_unplus_Color: +.. _class_Color_operator_idx_int: -- :ref:`Color` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`float` **operator []** **(** :ref:`int` index **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Color_operator_unplus: + +.. rst-class:: classref-operator + +:ref:`Color` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Color_operator_unminus_Color: +.. _class_Color_operator_unminus: -- :ref:`Color` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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)``. +:ref:`Color` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 4db0df109..7a6c47fd4 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -14,575 +14,757 @@ ColorPicker Color picker control. +.. rst-class:: classref-introduction-group + Description ----------- Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace. -\ **Note:** This control is the color picker widget itself. You can use a :ref:`ColorPickerButton` instead if you need a button that brings up a ``ColorPicker`` in a pop-up. +\ **Note:** This control is the color picker widget itself. You can use a :ref:`ColorPickerButton` instead if you need a button that brings up a **ColorPicker** in a pop-up. + +.. rst-class:: classref-introduction-group Tutorials --------- - `Tween Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_add_swatches` | ``true`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`ColorModeType` | :ref:`color_mode` | ``0`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`color_modes_visible` | ``true`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`deferred_mode` | ``false`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`edit_alpha` | ``true`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hex_visible` | ``true`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`PickerShapeType` | :ref:`picker_shape` | ``0`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`presets_visible` | ``true`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`sampler_visible` | ``true`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`sliders_visible` | ``true`` | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | vertical | ``true`` (overrides :ref:`BoxContainer`) | -+----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_add_swatches` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`ColorModeType` | :ref:`color_mode` | ``0`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`color_modes_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`deferred_mode` | ``false`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`edit_alpha` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`hex_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`PickerShapeType` | :ref:`picker_shape` | ``0`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`presets_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`sampler_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`sliders_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | vertical | ``true`` (overrides :ref:`BoxContainer`) | + +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ -| 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| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`h_width` | ``30`` | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`label_width` | ``10`` | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`margin` | ``4`` | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`sv_height` | ``256`` | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`sv_width` | ``256`` | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`add_preset` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`bar_arrow` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`color_hue` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`color_okhsl_hue` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`expanded_arrow` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`folded_arrow` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`overbright_indicator` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`picker_cursor` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`sample_bg` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`screen_picker` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`shape_circle` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`shape_rect` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`shape_rect_wheel` | | -+-----------------------------------+--------------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`h_width` | ``30`` | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`label_width` | ``10`` | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`margin` | ``4`` | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`sv_height` | ``256`` | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`sv_width` | ``256`` | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`add_preset` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`bar_arrow` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`color_hue` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`color_okhsl_hue` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`expanded_arrow` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`folded_arrow` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`overbright_indicator` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`picker_cursor` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`sample_bg` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`screen_picker` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`shape_circle` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`shape_rect` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`shape_rect_wheel` | | + +-----------------------------------+--------------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ColorPicker_signal_color_changed: -- **color_changed** **(** :ref:`Color` color **)** +.. rst-class:: classref-signal + +**color_changed** **(** :ref:`Color` color **)** Emitted when the color is changed. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_signal_preset_added: -- **preset_added** **(** :ref:`Color` color **)** +.. rst-class:: classref-signal + +**preset_added** **(** :ref:`Color` color **)** Emitted when a preset is added. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_signal_preset_removed: -- **preset_removed** **(** :ref:`Color` color **)** +.. rst-class:: classref-signal + +**preset_removed** **(** :ref:`Color` color **)** Emitted when a preset is removed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_ColorPicker_ColorModeType: -.. _class_ColorPicker_constant_MODE_RGB: - -.. _class_ColorPicker_constant_MODE_HSV: - -.. _class_ColorPicker_constant_MODE_RAW: - -.. _class_ColorPicker_constant_MODE_OKHSL: +.. rst-class:: classref-enumeration enum **ColorModeType**: -- **MODE_RGB** = **0** --- Allows editing the color with Red/Green/Blue sliders. +.. _class_ColorPicker_constant_MODE_RGB: -- **MODE_HSV** = **1** --- Allows editing the color with Hue/Saturation/Value sliders. +.. rst-class:: classref-enumeration-constant -- **MODE_RAW** = **2** --- Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). +:ref:`ColorModeType` **MODE_RGB** = ``0`` -- **MODE_OKHSL** = **3** --- Allows editing the color with Hue/Saturation/Lightness sliders. +Allows editing the color with Red/Green/Blue sliders. + +.. _class_ColorPicker_constant_MODE_HSV: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorModeType` **MODE_HSV** = ``1`` + +Allows editing the color with Hue/Saturation/Value sliders. + +.. _class_ColorPicker_constant_MODE_RAW: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorModeType` **MODE_RAW** = ``2`` + +Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). + +.. _class_ColorPicker_constant_MODE_OKHSL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorModeType` **MODE_OKHSL** = ``3`` + +Allows editing the color with Hue/Saturation/Lightness sliders. OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue. \ `Okhsv and Okhsl color spaces `__ +.. rst-class:: classref-item-separator + ---- .. _enum_ColorPicker_PickerShapeType: -.. _class_ColorPicker_constant_SHAPE_HSV_RECTANGLE: - -.. _class_ColorPicker_constant_SHAPE_HSV_WHEEL: - -.. _class_ColorPicker_constant_SHAPE_VHS_CIRCLE: - -.. _class_ColorPicker_constant_SHAPE_OKHSL_CIRCLE: - -.. _class_ColorPicker_constant_SHAPE_NONE: +.. rst-class:: classref-enumeration enum **PickerShapeType**: -- **SHAPE_HSV_RECTANGLE** = **0** --- HSV Color Model rectangle color space. +.. _class_ColorPicker_constant_SHAPE_HSV_RECTANGLE: -- **SHAPE_HSV_WHEEL** = **1** --- HSV Color Model rectangle color space with a wheel. +.. rst-class:: classref-enumeration-constant -- **SHAPE_VHS_CIRCLE** = **2** --- HSV Color Model circle color space. Use Saturation as a radius. +:ref:`PickerShapeType` **SHAPE_HSV_RECTANGLE** = ``0`` -- **SHAPE_OKHSL_CIRCLE** = **3** --- HSL OK Color Model circle color space. +HSV Color Model rectangle color space. -- **SHAPE_NONE** = **4** --- The color space shape and the shape select button are hidden. Can't be selected from the shapes popup. +.. _class_ColorPicker_constant_SHAPE_HSV_WHEEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PickerShapeType` **SHAPE_HSV_WHEEL** = ``1`` + +HSV Color Model rectangle color space with a wheel. + +.. _class_ColorPicker_constant_SHAPE_VHS_CIRCLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PickerShapeType` **SHAPE_VHS_CIRCLE** = ``2`` + +HSV Color Model circle color space. Use Saturation as a radius. + +.. _class_ColorPicker_constant_SHAPE_OKHSL_CIRCLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PickerShapeType` **SHAPE_OKHSL_CIRCLE** = ``3`` + +HSL OK Color Model circle color space. + +.. _class_ColorPicker_constant_SHAPE_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PickerShapeType` **SHAPE_NONE** = ``4`` + +The color space shape and the shape select button are hidden. Can't be selected from the shapes popup. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ColorPicker_property_can_add_swatches: -- :ref:`bool` **can_add_swatches** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_can_add_swatches(value) | -+-----------+-----------------------------+ -| *Getter* | are_swatches_enabled() | -+-----------+-----------------------------+ +:ref:`bool` **can_add_swatches** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_can_add_swatches** **(** :ref:`bool` value **)** +- :ref:`bool` **are_swatches_enabled** **(** **)** If ``true``, it's possible to add presets under Swatches. If ``false``, the button to add presets is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_pick_color(value) | -+-----------+-----------------------+ -| *Getter* | get_pick_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_pick_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_pick_color** **(** **)** The currently selected color. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_color_mode: -- :ref:`ColorModeType` **color_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_color_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_color_mode() | -+-----------+-----------------------+ +:ref:`ColorModeType` **color_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_color_mode** **(** :ref:`ColorModeType` value **)** +- :ref:`ColorModeType` **get_color_mode** **(** **)** The currently selected color mode. See :ref:`ColorModeType`. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_color_modes_visible: -- :ref:`bool` **color_modes_visible** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_modes_visible(value) | -+-----------+--------------------------+ -| *Getter* | are_modes_visible() | -+-----------+--------------------------+ +:ref:`bool` **color_modes_visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_modes_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **are_modes_visible** **(** **)** If ``true``, the color mode buttons are visible. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_deferred_mode: -- :ref:`bool` **deferred_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_deferred_mode(value) | -+-----------+--------------------------+ -| *Getter* | is_deferred_mode() | -+-----------+--------------------------+ +:ref:`bool` **deferred_mode** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_deferred_mode** **(** :ref:`bool` value **)** +- :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). +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_edit_alpha: -- :ref:`bool` **edit_alpha** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_edit_alpha(value) | -+-----------+-----------------------+ -| *Getter* | is_editing_alpha() | -+-----------+-----------------------+ +:ref:`bool` **edit_alpha** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_edit_alpha** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editing_alpha** **(** **)** If ``true``, shows an alpha channel slider (opacity). +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_hex_visible: -- :ref:`bool` **hex_visible** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_hex_visible(value) | -+-----------+------------------------+ -| *Getter* | is_hex_visible() | -+-----------+------------------------+ +:ref:`bool` **hex_visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_hex_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_hex_visible** **(** **)** If ``true``, the hex color code input field is visible. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_picker_shape: -- :ref:`PickerShapeType` **picker_shape** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_picker_shape(value) | -+-----------+-------------------------+ -| *Getter* | get_picker_shape() | -+-----------+-------------------------+ +:ref:`PickerShapeType` **picker_shape** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_picker_shape** **(** :ref:`PickerShapeType` value **)** +- :ref:`PickerShapeType` **get_picker_shape** **(** **)** The shape of the color space view. See :ref:`PickerShapeType`. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_presets_visible: -- :ref:`bool` **presets_visible** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_presets_visible(value) | -+-----------+----------------------------+ -| *Getter* | are_presets_visible() | -+-----------+----------------------------+ +:ref:`bool` **presets_visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_presets_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **are_presets_visible** **(** **)** If ``true``, the Swatches and Recent Colors presets are visible. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_sampler_visible: -- :ref:`bool` **sampler_visible** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_sampler_visible(value) | -+-----------+----------------------------+ -| *Getter* | is_sampler_visible() | -+-----------+----------------------------+ +:ref:`bool` **sampler_visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_sampler_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_sampler_visible** **(** **)** If ``true``, the color sampler and color preview are visible. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_property_sliders_visible: -- :ref:`bool` **sliders_visible** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_sliders_visible(value) | -+-----------+----------------------------+ -| *Getter* | are_sliders_visible() | -+-----------+----------------------------+ +:ref:`bool` **sliders_visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_sliders_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **are_sliders_visible** **(** **)** If ``true``, the color sliders are visible. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ColorPicker_method_add_preset: -- void **add_preset** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **add_preset** **(** :ref:`Color` color **)** Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. \ **Note:** The presets list is only for *this* color picker. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_method_add_recent_preset: -- void **add_recent_preset** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **add_recent_preset** **(** :ref:`Color` color **)** 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. \ **Note:** The recent presets list is only for *this* color picker. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_method_erase_preset: -- void **erase_preset** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **erase_preset** **(** :ref:`Color` color **)** Removes the given color from the list of color presets of this color picker. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_method_erase_recent_preset: -- void **erase_recent_preset** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **erase_recent_preset** **(** :ref:`Color` color **)** Removes the given color from the list of color recent presets of this color picker. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_method_get_presets: -- :ref:`PackedColorArray` **get_presets** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedColorArray` **get_presets** **(** **)** |const| Returns the list of colors in the presets of the color picker. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_method_get_recent_presets: -- :ref:`PackedColorArray` **get_recent_presets** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedColorArray` **get_recent_presets** **(** **)** |const| Returns the list of colors in the recent presets of the color picker. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_ColorPicker_theme_constant_h_width: -- :ref:`int` **h_width** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``30`` | -+-----------+--------+ +:ref:`int` **h_width** = ``30`` The width of the hue selection slider. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_constant_label_width: -- :ref:`int` **label_width** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``10`` | -+-----------+--------+ +:ref:`int` **label_width** = ``10`` The minimum width of the color labels next to sliders. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_constant_margin: -- :ref:`int` **margin** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **margin** = ``4`` -The margin around the ``ColorPicker``. +The margin around the **ColorPicker**. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPicker_theme_constant_sv_height: -- :ref:`int` **sv_height** +.. rst-class:: classref-themeproperty -+-----------+---------+ -| *Default* | ``256`` | -+-----------+---------+ +:ref:`int` **sv_height** = ``256`` The height of the saturation-value selection box. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_constant_sv_width: -- :ref:`int` **sv_width** +.. rst-class:: classref-themeproperty -+-----------+---------+ -| *Default* | ``256`` | -+-----------+---------+ +:ref:`int` **sv_width** = ``256`` The width of the saturation-value selection box. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_add_preset: -- :ref:`Texture2D` **add_preset** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **add_preset** The icon for the "Add Preset" button. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_bar_arrow: -- :ref:`Texture2D` **bar_arrow** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **bar_arrow** The texture for the arrow grabber. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_color_hue: -- :ref:`Texture2D` **color_hue** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **color_hue** Custom texture for the hue selection slider on the right. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_color_okhsl_hue: -- :ref:`Texture2D` **color_okhsl_hue** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **color_okhsl_hue** Custom texture for the H slider in the OKHSL color mode. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_expanded_arrow: -- :ref:`Texture2D` **expanded_arrow** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **expanded_arrow** The icon for color preset drop down menu when expanded. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_folded_arrow: -- :ref:`Texture2D` **folded_arrow** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **folded_arrow** The icon for color preset drop down menu when folded. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_overbright_indicator: -- :ref:`Texture2D` **overbright_indicator** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **overbright_indicator** The indicator used to signalize that the color value is outside the 0-1 range. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_picker_cursor: -- :ref:`Texture2D` **picker_cursor** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **picker_cursor** The image displayed over the color box/circle (depending on the :ref:`picker_shape`), marking the currently selected color. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_sample_bg: -- :ref:`Texture2D` **sample_bg** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **sample_bg** Background panel for the color preview box (visible when the color is translucent). +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_screen_picker: -- :ref:`Texture2D` **screen_picker** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **screen_picker** The icon for the screen color picker button. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_shape_circle: -- :ref:`Texture2D` **shape_circle** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **shape_circle** The icon for circular picker shapes. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_shape_rect: -- :ref:`Texture2D` **shape_rect** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **shape_rect** The icon for rectangular picker shapes. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPicker_theme_icon_shape_rect_wheel: -- :ref:`Texture2D` **shape_rect_wheel** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **shape_rect_wheel** The icon for rectangular wheel picker shapes. diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index ebbaef35f..c7ecbe27c 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -14,6 +14,8 @@ ColorPickerButton Button that pops out a :ref:`ColorPicker`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ See also :ref:`BaseButton` which contains common properties an \ **Note:** By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set :ref:`Control.custom_minimum_size` to a big enough value to give the button enough space. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,302 +34,387 @@ Tutorials - `2D GD Paint Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | -+---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`edit_alpha` | ``true`` | -+---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | -+---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | + +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`edit_alpha` | ``true`` | + +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | + +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+--------------------------------------------------------------------------+ -| :ref:`ColorPicker` | :ref:`get_picker` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------+ -| :ref:`PopupPanel` | :ref:`get_popup` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------+ + | :ref:`ColorPicker` | :ref:`get_picker` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------+ + | :ref:`PopupPanel` | :ref:`get_popup` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ -| :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` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ +.. 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` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ColorPickerButton_signal_color_changed: -- **color_changed** **(** :ref:`Color` color **)** +.. rst-class:: classref-signal + +**color_changed** **(** :ref:`Color` color **)** Emitted when the color changes. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPickerButton_signal_picker_created: -- **picker_created** **(** **)** +.. rst-class:: classref-signal + +**picker_created** **(** **)** Emitted when the :ref:`ColorPicker` is created (the button is pressed for the first time). +.. rst-class:: classref-item-separator + ---- .. _class_ColorPickerButton_signal_popup_closed: -- **popup_closed** **(** **)** +.. rst-class:: classref-signal + +**popup_closed** **(** **)** Emitted when the :ref:`ColorPicker` is closed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_ColorPickerButton_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_pick_color(value) | -+-----------+-----------------------+ -| *Getter* | get_pick_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_pick_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_pick_color** **(** **)** The currently selected color. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPickerButton_property_edit_alpha: -- :ref:`bool` **edit_alpha** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_edit_alpha(value) | -+-----------+-----------------------+ -| *Getter* | is_editing_alpha() | -+-----------+-----------------------+ +:ref:`bool` **edit_alpha** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_edit_alpha** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editing_alpha** **(** **)** If ``true``, the alpha channel in the displayed :ref:`ColorPicker` will be visible. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ColorPickerButton_method_get_picker: -- :ref:`ColorPicker` **get_picker** **(** **)** +.. rst-class:: classref-method + +:ref:`ColorPicker` **get_picker** **(** **)** Returns the :ref:`ColorPicker` that this node toggles. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPickerButton_method_get_popup: -- :ref:`PopupPanel` **get_popup** **(** **)** +.. rst-class:: classref-method + +:ref:`PopupPanel` **get_popup** **(** **)** 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. \ **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:`Window.visible` property. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_ColorPickerButton_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_color** = ``Color(1, 1, 1, 1)`` -Default text :ref:`Color` of the ``ColorPickerButton``. +Default text :ref:`Color` of the **ColorPickerButton**. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``Color(0.9, 0.9, 0.9, 0.3)`` | -+-----------+-------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.9, 0.9, 0.9, 0.3)`` -Text :ref:`Color` used when the ``ColorPickerButton`` is disabled. +Text :ref:`Color` used when the **ColorPickerButton** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +: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. +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: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_hover_color** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` used when the ``ColorPickerButton`` is being hovered. +Text :ref:`Color` used when the **ColorPickerButton** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``ColorPickerButton``. +The tint of text outline of the **ColorPickerButton**. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.8, 0.8, 0.8, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **font_pressed_color** = ``Color(0.8, 0.8, 0.8, 1)`` -Text :ref:`Color` used when the ``ColorPickerButton`` is being pressed. +Text :ref:`Color` used when the **ColorPickerButton** is being pressed. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``2`` -The horizontal space between ``ColorPickerButton``'s icon and text. +The horizontal space between **ColorPickerButton**'s icon and text. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPickerButton_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -:ref:`Font` of the ``ColorPickerButton``'s text. +:ref:`Font` **font** + +:ref:`Font` of the **ColorPickerButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``ColorPickerButton``'s text. +:ref:`int` **font_size** + +Font size of the **ColorPickerButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_icon_bg: -- :ref:`Texture2D` **bg** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **bg** The background of the color preview rect on the button. +.. rst-class:: classref-item-separator + ---- .. _class_ColorPickerButton_theme_style_disabled: -- :ref:`StyleBox` **disabled** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``ColorPickerButton`` is disabled. +:ref:`StyleBox` **disabled** + +:ref:`StyleBox` used when the **ColorPickerButton** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -: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. +: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: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``ColorPickerButton`` is being hovered. +:ref:`StyleBox` **hover** + +:ref:`StyleBox` used when the **ColorPickerButton** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -Default :ref:`StyleBox` for the ``ColorPickerButton``. +:ref:`StyleBox` **normal** + +Default :ref:`StyleBox` for the **ColorPickerButton**. + +.. rst-class:: classref-item-separator ---- .. _class_ColorPickerButton_theme_style_pressed: -- :ref:`StyleBox` **pressed** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``ColorPickerButton`` is being pressed. +: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.)` diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index ffdaa0b34..532f8c328 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -14,37 +14,51 @@ ColorRect Colored rectangle. +.. rst-class:: classref-introduction-group + Description ----------- Displays a rectangle filled with a solid :ref:`color`. If you need to display the border alone, consider using :ref:`ReferenceRect` instead. +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Dodge The Creeps Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+---------------------------+----------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +---------------------------+----------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ColorRect_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** The fill color. diff --git a/classes/class_compressedcubemap.rst b/classes/class_compressedcubemap.rst index f4a3f6066..e69c8af1b 100644 --- a/classes/class_compressedcubemap.rst +++ b/classes/class_compressedcubemap.rst @@ -14,10 +14,12 @@ CompressedCubemap 6-sided texture typically used in 3D rendering, optionally compressed. +.. 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 compresson methods: - Uncompressed (uncompressed on the GPU) diff --git a/classes/class_compressedcubemaparray.rst b/classes/class_compressedcubemaparray.rst index bd315daab..fa085b54f 100644 --- a/classes/class_compressedcubemaparray.rst +++ b/classes/class_compressedcubemaparray.rst @@ -14,10 +14,12 @@ CompressedCubemapArray Array of 6-sided textures typically used in 3D rendering, optionally compressed. +.. 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 compresson methods: - Uncompressed (uncompressed on the GPU) diff --git a/classes/class_compressedtexture2d.rst b/classes/class_compressedtexture2d.rst index ecf15b082..dbbe5e594 100644 --- a/classes/class_compressedtexture2d.rst +++ b/classes/class_compressedtexture2d.rst @@ -14,10 +14,12 @@ CompressedTexture2D Texture with 2 dimensions, optionally compressed. +.. rst-class:: classref-introduction-group + Description ----------- -A texture that is loaded from a ``.ctex`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. ``CompressedTexture2D`` can use one of 4 compression methods (including a lack of any compression): +A texture that is loaded from a ``.ctex`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedTexture2D** can use one of 4 compression methods (including a lack of any compression): - Uncompressed (uncompressed on the GPU) @@ -31,45 +33,68 @@ Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Los Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`load_path` | ``""`` | -+-----------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-----------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`load_path` | ``""`` | + +-----------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-----------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CompressedTexture2D_property_load_path: -- :ref:`String` **load_path** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | load(value) | -+-----------+-----------------+ -| *Getter* | get_load_path() | -+-----------+-----------------+ +:ref:`String` **load_path** = ``""`` -The ``CompressedTexture2D``'s file path to a ``.ctex`` file. +.. rst-class:: classref-property-setget + +- :ref:`Error` **load** **(** :ref:`String` path **)** +- :ref:`String` **get_load_path** **(** **)** + +The **CompressedTexture2D**'s file path to a ``.ctex`` file. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CompressedTexture2D_method_load: -- :ref:`Error` **load** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load** **(** :ref:`String` path **)** Loads the texture from the specified ``path``. diff --git a/classes/class_compressedtexture2darray.rst b/classes/class_compressedtexture2darray.rst index e3b203e17..d70e4e6b4 100644 --- a/classes/class_compressedtexture2darray.rst +++ b/classes/class_compressedtexture2darray.rst @@ -14,10 +14,12 @@ CompressedTexture2DArray Array of 2-dimensional textures, optionally compressed. +.. rst-class:: classref-introduction-group + 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 compresson methods: - Uncompressed (uncompressed on the GPU) diff --git a/classes/class_compressedtexture3d.rst b/classes/class_compressedtexture3d.rst index 1cba04160..936ba7a99 100644 --- a/classes/class_compressedtexture3d.rst +++ b/classes/class_compressedtexture3d.rst @@ -14,52 +14,77 @@ CompressedTexture3D Texture with 3 dimensions, optionally compressed. +.. rst-class:: classref-introduction-group + Description ----------- -``CompressedTexture3D`` is the VRAM-compressed counterpart of :ref:`ImageTexture3D`. The file extension for ``CompressedTexture3D`` files is ``.ctex3d``. This file format is internal to Godot; it is created by importing other image formats with the import system. +**CompressedTexture3D** is the VRAM-compressed counterpart of :ref:`ImageTexture3D`. The file extension for **CompressedTexture3D** files is ``.ctex3d``. This file format is internal to Godot; it is created by importing other image formats with the import system. -\ ``CompressedTexture3D`` uses VRAM compression, which allows to reduce memory usage on the GPU when rendering the texture. This also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +\ **CompressedTexture3D** uses VRAM compression, which allows to reduce memory usage on the GPU when rendering the texture. This also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. See :ref:`Texture3D` for a general description of 3D textures. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+----------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`load_path` | ``""`` | -+-----------------------------+----------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`load_path` | ``""`` | + +-----------------------------+----------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CompressedTexture3D_property_load_path: -- :ref:`String` **load_path** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | load(value) | -+-----------+-----------------+ -| *Getter* | get_load_path() | -+-----------+-----------------+ +:ref:`String` **load_path** = ``""`` -The ``CompressedTexture3D``'s file path to a ``.ctex3d`` file. +.. rst-class:: classref-property-setget + +- :ref:`Error` **load** **(** :ref:`String` path **)** +- :ref:`String` **get_load_path** **(** **)** + +The **CompressedTexture3D**'s file path to a ``.ctex3d`` file. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CompressedTexture3D_method_load: -- :ref:`Error` **load** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load** **(** :ref:`String` path **)** Loads the texture from the specified ``path``. diff --git a/classes/class_compressedtexturelayered.rst b/classes/class_compressedtexturelayered.rst index 1a880aebd..f95e69fce 100644 --- a/classes/class_compressedtexturelayered.rst +++ b/classes/class_compressedtexturelayered.rst @@ -16,6 +16,8 @@ CompressedTextureLayered Base class for texture arrays that can optionally be compressed. +.. rst-class:: classref-introduction-group + Description ----------- @@ -33,43 +35,66 @@ Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Los Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+---------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`load_path` | ``""`` | -+-----------------------------+---------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`load_path` | ``""`` | + +-----------------------------+---------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CompressedTextureLayered_property_load_path: -- :ref:`String` **load_path** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | load(value) | -+-----------+-----------------+ -| *Getter* | get_load_path() | -+-----------+-----------------+ +:ref:`String` **load_path** = ``""`` + +.. rst-class:: classref-property-setget + +- :ref:`Error` **load** **(** :ref:`String` path **)** +- :ref:`String` **get_load_path** **(** **)** The path the texture should be loaded from. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CompressedTextureLayered_method_load: -- :ref:`Error` **load** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load** **(** :ref:`String` path **)** Loads the texture at ``path``. diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index 579b5d63b..04c3232dd 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -14,40 +14,52 @@ ConcavePolygonShape2D Concave polygon shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- 2D concave polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. -The main difference between a :ref:`ConvexPolygonShape2D` and a ``ConcavePolygonShape2D`` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. +The main difference between a :ref:`ConvexPolygonShape2D` and a **ConcavePolygonShape2D** is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. -\ **Performance:** Due to its complexity, ``ConcavePolygonShape2D`` is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape2D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape2D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D` first. +\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape2D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape2D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D` first. -\ **Warning:** Using this shape for an :ref:`Area2D` (via a :ref:`CollisionShape2D` node) may give unexpected results: the area will only detect collisions with the segments in the ``ConcavePolygonShape2D`` (and not with any "inside" of the shape, for example). +\ **Warning:** Using this shape for an :ref:`Area2D` (via a :ref:`CollisionShape2D` node) may give unexpected results: the area will only detect collisions with the segments in the **ConcavePolygonShape2D** (and not with any "inside" of the shape, for example). + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------------+----------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`segments` | ``PackedVector2Array()`` | -+-----------------------------------------------------+----------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`segments` | ``PackedVector2Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ConcavePolygonShape2D_property_segments: -- :ref:`PackedVector2Array` **segments** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_segments(value) | -+-----------+--------------------------+ -| *Getter* | get_segments() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **segments** = ``PackedVector2Array()`` -The array of points that make up the ``ConcavePolygonShape2D``'s line segments. +.. rst-class:: classref-property-setget + +- void **set_segments** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_segments** **(** **)** + +The array of points that make up the **ConcavePolygonShape2D**'s line segments. .. |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.)` diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index 911b1ac22..3c603a2e3 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -14,69 +14,100 @@ ConcavePolygonShape3D Concave polygon shape resource (also called "trimesh") for 3D physics. +.. rst-class:: classref-introduction-group + Description ----------- -3D concave polygon shape resource (also called "trimesh") to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is created by feeding a list of triangles. Despite its name, ``ConcavePolygonShape3D`` can also store convex polygon shapes. However, unlike :ref:`ConvexPolygonShape3D`, ``ConcavePolygonShape3D`` is *not* limited to storing convex shapes exclusively. +3D concave polygon shape resource (also called "trimesh") to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is created by feeding a list of triangles. Despite its name, **ConcavePolygonShape3D** can also store convex polygon shapes. However, unlike :ref:`ConvexPolygonShape3D`, **ConcavePolygonShape3D** is *not* limited to storing convex shapes exclusively. -\ **Note:** When used for collision, ``ConcavePolygonShape3D`` is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidBody3D` with a mode other than Static. +\ **Note:** When used for collision, **ConcavePolygonShape3D** is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidBody3D` with a mode other than Static. -\ **Performance:** Due to its complexity, ``ConcavePolygonShape3D`` is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape3D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D` first. +\ **Performance:** Due to its complexity, **ConcavePolygonShape3D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape3D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D` first. -\ **Warning:** Using this shape for an :ref:`Area3D` (via a :ref:`CollisionShape3D` 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: the area will only detect collisions with the triangle faces in the ``ConcavePolygonShape3D`` (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if :ref:`backface_collision` is ``true``. +\ **Warning:** Using this shape for an :ref:`Area3D` (via a :ref:`CollisionShape3D` 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: the area will only detect collisions with the triangle faces in the **ConcavePolygonShape3D** (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if :ref:`backface_collision` is ``true``. + +.. rst-class:: classref-introduction-group Tutorials --------- - `3D Physics Tests Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`backface_collision` | ``false`` | -+-------------------------+------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`backface_collision` | ``false`` | + +-------------------------+------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_faces` **(** :ref:`PackedVector3Array` faces **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_faces` **(** :ref:`PackedVector3Array` faces **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ConcavePolygonShape3D_property_backface_collision: -- :ref:`bool` **backface_collision** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------+ -| *Setter* | set_backface_collision_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_backface_collision_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **backface_collision** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_backface_collision_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ConcavePolygonShape3D_method_get_faces: -- :ref:`PackedVector3Array` **get_faces** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_faces** **(** **)** |const| Returns the faces (an array of triangles). +.. rst-class:: classref-item-separator + ---- .. _class_ConcavePolygonShape3D_method_set_faces: -- void **set_faces** **(** :ref:`PackedVector3Array` faces **)** +.. rst-class:: classref-method + +void **set_faces** **(** :ref:`PackedVector3Array` faces **)** Sets the faces (an array of triangles). diff --git a/classes/class_conetwistjoint3d.rst b/classes/class_conetwistjoint3d.rst index 890227d5f..1d9cf6cd1 100644 --- a/classes/class_conetwistjoint3d.rst +++ b/classes/class_conetwistjoint3d.rst @@ -14,6 +14,8 @@ ConeTwistJoint3D A twist joint between two 3D PhysicsBodies. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,178 +25,241 @@ The twist axis is initiated as the X axis of the :ref:`Joint3D`. Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint3D in the local space of the two Bodies. See also :ref:`Generic6DOFJoint3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------+--------------+ -| :ref:`float` | :ref:`bias` | ``0.3`` | -+---------------------------+---------------------------------------------------------------+--------------+ -| :ref:`float` | :ref:`relaxation` | ``1.0`` | -+---------------------------+---------------------------------------------------------------+--------------+ -| :ref:`float` | :ref:`softness` | ``0.8`` | -+---------------------------+---------------------------------------------------------------+--------------+ -| :ref:`float` | :ref:`swing_span` | ``0.785398`` | -+---------------------------+---------------------------------------------------------------+--------------+ -| :ref:`float` | :ref:`twist_span` | ``3.14159`` | -+---------------------------+---------------------------------------------------------------+--------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`bias` | ``0.3`` | + +---------------------------+---------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`relaxation` | ``1.0`` | + +---------------------------+---------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`softness` | ``0.8`` | + +---------------------------+---------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`swing_span` | ``0.785398`` | + +---------------------------+---------------------------------------------------------------+--------------+ + | :ref:`float` | :ref:`twist_span` | ``3.14159`` | + +---------------------------+---------------------------------------------------------------+--------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ConeTwistJoint3D_Param: -.. _class_ConeTwistJoint3D_constant_PARAM_SWING_SPAN: - -.. _class_ConeTwistJoint3D_constant_PARAM_TWIST_SPAN: - -.. _class_ConeTwistJoint3D_constant_PARAM_BIAS: - -.. _class_ConeTwistJoint3D_constant_PARAM_SOFTNESS: - -.. _class_ConeTwistJoint3D_constant_PARAM_RELAXATION: - -.. _class_ConeTwistJoint3D_constant_PARAM_MAX: +.. rst-class:: classref-enumeration enum **Param**: -- **PARAM_SWING_SPAN** = **0** --- Swing is rotation from side to side, around the axis perpendicular to the twist axis. +.. _class_ConeTwistJoint3D_constant_PARAM_SWING_SPAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SWING_SPAN** = ``0`` + +Swing is rotation from side to side, around the axis perpendicular to the twist axis. The swing span defines, how much rotation will not get corrected along the swing axis. -Could be defined as looseness in the ``ConeTwistJoint3D``. +Could be defined as looseness in the **ConeTwistJoint3D**. If below 0.05, this behavior is locked. -- **PARAM_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. +.. _class_ConeTwistJoint3D_constant_PARAM_TWIST_SPAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_TWIST_SPAN** = ``1`` + +Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. -- **PARAM_BIAS** = **2** --- The speed with which the swing or twist will take place. +.. _class_ConeTwistJoint3D_constant_PARAM_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_BIAS** = ``2`` + +The speed with which the swing or twist will take place. The higher, the faster. -- **PARAM_SOFTNESS** = **3** --- The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. +.. _class_ConeTwistJoint3D_constant_PARAM_SOFTNESS: -- **PARAM_RELAXATION** = **4** --- Defines, how fast the swing- and twist-speed-difference on both sides gets synced. +.. rst-class:: classref-enumeration-constant -- **PARAM_MAX** = **5** --- Represents the size of the :ref:`Param` enum. +:ref:`Param` **PARAM_SOFTNESS** = ``3`` + +The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + +.. _class_ConeTwistJoint3D_constant_PARAM_RELAXATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_RELAXATION** = ``4`` + +Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + +.. _class_ConeTwistJoint3D_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_MAX** = ``5`` + +Represents the size of the :ref:`Param` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ConeTwistJoint3D_property_bias: -- :ref:`float` **bias** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.3`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **bias** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The speed with which the swing or twist will take place. The higher, the faster. +.. rst-class:: classref-item-separator + ---- .. _class_ConeTwistJoint3D_property_relaxation: -- :ref:`float` **relaxation** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **relaxation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Defines, how fast the swing- and twist-speed-difference on both sides gets synced. +.. rst-class:: classref-item-separator + ---- .. _class_ConeTwistJoint3D_property_softness: -- :ref:`float` **softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.8`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **softness** = ``0.8`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ConeTwistJoint3D_property_swing_span: -- :ref:`float` **swing_span** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.785398`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **swing_span** = ``0.785398`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Swing is rotation from side to side, around the axis perpendicular to the twist axis. The swing span defines, how much rotation will not get corrected along the swing axis. -Could be defined as looseness in the ``ConeTwistJoint3D``. +Could be defined as looseness in the **ConeTwistJoint3D**. If below 0.05, this behavior is locked. +.. rst-class:: classref-item-separator + ---- .. _class_ConeTwistJoint3D_property_twist_span: -- :ref:`float` **twist_span** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``3.14159`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **twist_span** = ``3.14159`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ConeTwistJoint3D_method_get_param: -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ConeTwistJoint3D_method_set_param: -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** .. container:: contribute diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 133747786..18b6d7ab2 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -14,6 +14,8 @@ ConfigFile Helper class to handle INI-style files. +.. rst-class:: classref-introduction-group + Description ----------- @@ -28,7 +30,7 @@ This helper class can be used to store :ref:`Variant` values on t The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. -The following example shows how to create a simple ``ConfigFile`` and save it on disc: +The following example shows how to create a simple **ConfigFile** and save it on disc: .. tabs:: @@ -120,193 +122,270 @@ ConfigFiles can also contain manually written comment lines starting with a semi \ **Note:** The file extension given to a ConfigFile does not have any impact on its formatting or behavior. By convention, the ``.cfg`` extension is used here, but any other extension such as ``.ini`` is also valid. Since neither ``.cfg`` nor ``.ini`` are standardized, Godot's ConfigFile formatting may differ from files written by other programs. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ConfigFile_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Removes the entire contents of the config. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_encode_to_text: -- :ref:`String` **encode_to_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **encode_to_text** **(** **)** |const| Obtain the text version of this config file (the same text that would be written to a file). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_erase_section: -- void **erase_section** **(** :ref:`String` section **)** +.. rst-class:: classref-method + +void **erase_section** **(** :ref:`String` section **)** Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_erase_section_key: -- void **erase_section_key** **(** :ref:`String` section, :ref:`String` key **)** +.. rst-class:: classref-method + +void **erase_section_key** **(** :ref:`String` section, :ref:`String` key **)** Deletes the specified key in a section. Raises an error if either the section or the key do not exist. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_get_section_keys: -- :ref:`PackedStringArray` **get_section_keys** **(** :ref:`String` section **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_section_keys** **(** :ref:`String` section **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_get_sections: -- :ref:`PackedStringArray` **get_sections** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_sections** **(** **)** |const| Returns an array of all defined section identifiers. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_get_value: -- :ref:`Variant` **get_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_has_section: -- :ref:`bool` **has_section** **(** :ref:`String` section **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_section** **(** :ref:`String` section **)** |const| Returns ``true`` if the specified section exists. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_has_section_key: -- :ref:`bool` **has_section_key** **(** :ref:`String` section, :ref:`String` key **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_section_key** **(** :ref:`String` section, :ref:`String` key **)** |const| Returns ``true`` if the specified section-key pair exists. +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_load: -- :ref:`Error` **load** **(** :ref:`String` path **)** +.. rst-class:: classref-method -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. +:ref:`Error` **load** **(** :ref:`String` path **)** + +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). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_load_encrypted: -- :ref:`Error` **load_encrypted** **(** :ref:`String` path, :ref:`PackedByteArray` key **)** +.. rst-class:: classref-method -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. +:ref:`Error` **load_encrypted** **(** :ref:`String` path, :ref:`PackedByteArray` key **)** + +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). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_load_encrypted_pass: -- :ref:`Error` **load_encrypted_pass** **(** :ref:`String` path, :ref:`String` password **)** +.. rst-class:: classref-method -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. +:ref:`Error` **load_encrypted_pass** **(** :ref:`String` path, :ref:`String` password **)** + +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). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_parse: -- :ref:`Error` **parse** **(** :ref:`String` data **)** +.. rst-class:: classref-method + +:ref:`Error` **parse** **(** :ref:`String` data **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_save: -- :ref:`Error` **save** **(** :ref:`String` path **)** +.. rst-class:: classref-method -Saves the contents of the ``ConfigFile`` object to the file specified as a parameter. The output file uses an INI-style structure. +:ref:`Error` **save** **(** :ref:`String` path **)** + +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). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_save_encrypted: -- :ref:`Error` **save_encrypted** **(** :ref:`String` path, :ref:`PackedByteArray` key **)** +.. rst-class:: classref-method -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. +:ref:`Error` **save_encrypted** **(** :ref:`String` path, :ref:`PackedByteArray` key **)** + +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). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_save_encrypted_pass: -- :ref:`Error` **save_encrypted_pass** **(** :ref:`String` path, :ref:`String` password **)** +.. rst-class:: classref-method -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. +:ref:`Error` **save_encrypted_pass** **(** :ref:`String` path, :ref:`String` password **)** + +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). +.. rst-class:: classref-item-separator + ---- .. _class_ConfigFile_method_set_value: -- void **set_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** 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. diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst index 7f274dd58..fa8b3aacc 100644 --- a/classes/class_confirmationdialog.rst +++ b/classes/class_confirmationdialog.rst @@ -16,6 +16,8 @@ ConfirmationDialog Dialog for confirmation of actions. +.. rst-class:: classref-introduction-group + Description ----------- @@ -36,49 +38,72 @@ To get cancel action, you can use: +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`cancel_button_text` | ``"Cancel"`` | -+---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ -| :ref:`Vector2i` | min_size | ``Vector2i(200, 70)`` (overrides :ref:`Window`) | -+---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ -| :ref:`Vector2i` | size | ``Vector2i(200, 100)`` (overrides :ref:`Window`) | -+---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ -| :ref:`String` | title | ``"Please Confirm..."`` (overrides :ref:`Window`) | -+---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`cancel_button_text` | ``"Cancel"`` | + +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ + | :ref:`Vector2i` | min_size | ``Vector2i(200, 70)`` (overrides :ref:`Window`) | + +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ + | :ref:`Vector2i` | size | ``Vector2i(200, 100)`` (overrides :ref:`Window`) | + +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ + | :ref:`String` | title | ``"Please Confirm..."`` (overrides :ref:`Window`) | + +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`Button` | :ref:`get_cancel_button` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`Button` | :ref:`get_cancel_button` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ConfirmationDialog_property_cancel_button_text: -- :ref:`String` **cancel_button_text** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``"Cancel"`` | -+-----------+-------------------------------+ -| *Setter* | set_cancel_button_text(value) | -+-----------+-------------------------------+ -| *Getter* | get_cancel_button_text() | -+-----------+-------------------------------+ +:ref:`String` **cancel_button_text** = ``"Cancel"`` + +.. rst-class:: classref-property-setget + +- void **set_cancel_button_text** **(** :ref:`String` value **)** +- :ref:`String` **get_cancel_button_text** **(** **)** The text displayed by the cancel button (see :ref:`get_cancel_button`). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ConfirmationDialog_method_get_cancel_button: -- :ref:`Button` **get_cancel_button** **(** **)** +.. rst-class:: classref-method + +:ref:`Button` **get_cancel_button** **(** **)** Returns the cancel button. diff --git a/classes/class_container.rst b/classes/class_container.rst index 78be01a10..19b40f838 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -16,100 +16,160 @@ Container Base node for containers. +.. rst-class:: classref-introduction-group + Description ----------- -Base node for containers. A ``Container`` contains other controls and automatically arranges them in a certain way. +Base node for containers. A **Container** contains other controls and automatically arranges them in a certain way. A Control can inherit this to create custom container classes. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------+--------------+-----------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``1`` (overrides :ref:`Control`) | -+----------------------------------------------+--------------+-----------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------+--------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``1`` (overrides :ref:`Control`) | + +----------------------------------------------+--------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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` **(** **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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` **(** **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Container_signal_pre_sort_children: -- **pre_sort_children** **(** **)** +.. rst-class:: classref-signal + +**pre_sort_children** **(** **)** Emitted when children are going to be sorted. +.. rst-class:: classref-item-separator + ---- .. _class_Container_signal_sort_children: -- **sort_children** **(** **)** +.. rst-class:: classref-signal + +**sort_children** **(** **)** Emitted when sorting the children is needed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constants --------- .. _class_Container_constant_NOTIFICATION_PRE_SORT_CHILDREN: +.. rst-class:: classref-constant + +**NOTIFICATION_PRE_SORT_CHILDREN** = ``50`` + +Notification just before children are going to be sorted, in case there's something to process beforehand. + .. _class_Container_constant_NOTIFICATION_SORT_CHILDREN: -- **NOTIFICATION_PRE_SORT_CHILDREN** = **50** --- Notification just before children are going to be sorted, in case there's something to process beforehand. +.. rst-class:: classref-constant -- **NOTIFICATION_SORT_CHILDREN** = **51** --- Notification for when sorting the children, it must be obeyed immediately. +**NOTIFICATION_SORT_CHILDREN** = ``51`` + +Notification for when sorting the children, it must be obeyed immediately. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Container_method__get_allowed_size_flags_horizontal: -- :ref:`PackedInt32Array` **_get_allowed_size_flags_horizontal** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_get_allowed_size_flags_horizontal** **(** **)** |virtual| |const| 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. \ **Note:** Having no size flags is equal to having :ref:`Control.SIZE_SHRINK_BEGIN`. As such, this value is always implicitly allowed. +.. rst-class:: classref-item-separator + ---- .. _class_Container_method__get_allowed_size_flags_vertical: -- :ref:`PackedInt32Array` **_get_allowed_size_flags_vertical** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_get_allowed_size_flags_vertical** **(** **)** |virtual| |const| 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. \ **Note:** Having no size flags is equal to having :ref:`Control.SIZE_SHRINK_BEGIN`. As such, this value is always implicitly allowed. +.. rst-class:: classref-item-separator + ---- .. _class_Container_method_fit_child_in_rect: -- void **fit_child_in_rect** **(** :ref:`Control` child, :ref:`Rect2` rect **)** +.. rst-class:: classref-method + +void **fit_child_in_rect** **(** :ref:`Control` child, :ref:`Rect2` rect **)** Fit a child control in a given rect. This is mainly a helper for creating custom container classes. +.. rst-class:: classref-item-separator + ---- .. _class_Container_method_queue_sort: -- void **queue_sort** **(** **)** +.. rst-class:: classref-method + +void **queue_sort** **(** **)** Queue resort of the contained children. This is called automatically anyway, but can be called upon request. diff --git a/classes/class_control.rst b/classes/class_control.rst index cc95bece9..44edcfaa9 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -16,12 +16,14 @@ Control All user interface nodes inherit from Control. A control's anchors and offsets adapt its position and size relative to its parent. +.. rst-class:: classref-introduction-group + Description ----------- -Base class for all UI-related nodes. ``Control`` features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and offsets relative to the anchor. The offsets update automatically when the node, any of its parents, or the screen size change. +Base class for all UI-related nodes. **Control** features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and offsets relative to the anchor. The offsets update automatically when the node, any of its parents, or the screen size change. -For more information on Godot's UI system, anchors, offsets, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from ``Control`` and :ref:`Container` nodes. +For more information on Godot's UI system, anchors, offsets, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from **Control** and :ref:`Container` nodes. \ **User Interface nodes and input**\ @@ -31,14 +33,16 @@ Input events are propagated through the :ref:`SceneTree` from t 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. +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. -Sets :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` to tell a ``Control`` node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. +Sets :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` to tell a **Control** node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. -\ :ref:`Theme` resources change the Control's appearance. If you change the :ref:`Theme` on a ``Control`` node, it affects all of its children. To override some of the theme's parameters, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override`. You can override the theme with the Inspector. +\ :ref:`Theme` resources change the Control's appearance. If you change the :ref:`Theme` on a **Control** node, it affects all of its children. To override some of the theme's parameters, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override`. You can override the theme with the Inspector. \ **Note:** Theme items are *not* :ref:`Object` properties. This means you can't access their values using :ref:`Object.get` and :ref:`Object.set`. Instead, use the ``get_theme_*`` and ``add_theme_*_override`` methods provided by this class. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -50,312 +54,350 @@ Tutorials - `All GUI Demos `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :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:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Node` | :ref:`shortcut_context` | | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`size_flags_horizontal` | ``1`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`size_flags_vertical` | ``1`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Theme` | :ref:`theme` | | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`String` | :ref:`tooltip_text` | ``""`` | -+------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +.. 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:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | + +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Node` | :ref:`shortcut_context` | | + +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | + +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`size_flags_horizontal` | ``1`` | + +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | + +------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :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 Methods ------- -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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| |const| | -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_point` **(** :ref:`Vector2` position **)** |virtual| |const| | -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_make_custom_tooltip` **(** :ref:`String` for_text **)** |virtual| |const| | -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :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:`Object` target **)** | -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| |const| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_point` **(** :ref:`Vector2` position **)** |virtual| |const| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_make_custom_tooltip` **(** :ref:`String` for_text **)** |virtual| |const| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :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:`Object` target **)** | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Control_signal_focus_entered: -- **focus_entered** **(** **)** +.. rst-class:: classref-signal + +**focus_entered** **(** **)** Emitted when the node gains focus. +.. rst-class:: classref-item-separator + ---- .. _class_Control_signal_focus_exited: -- **focus_exited** **(** **)** +.. rst-class:: classref-signal + +**focus_exited** **(** **)** Emitted when the node loses focus. +.. rst-class:: classref-item-separator + ---- .. _class_Control_signal_gui_input: -- **gui_input** **(** :ref:`InputEvent` event **)** +.. rst-class:: classref-signal + +**gui_input** **(** :ref:`InputEvent` event **)** Emitted when the node receives an :ref:`InputEvent`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_signal_minimum_size_changed: -- **minimum_size_changed** **(** **)** +.. rst-class:: classref-signal + +**minimum_size_changed** **(** **)** Emitted when the node's minimum size changes. +.. rst-class:: classref-item-separator + ---- .. _class_Control_signal_mouse_entered: -- **mouse_entered** **(** **)** +.. rst-class:: classref-signal + +**mouse_entered** **(** **)** Emitted when the mouse enters the control's ``Rect`` area, provided its :ref:`mouse_filter` lets the event reach it. -\ **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:`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. + +.. rst-class:: classref-item-separator ---- .. _class_Control_signal_mouse_exited: -- **mouse_exited** **(** **)** +.. rst-class:: classref-signal + +**mouse_exited** **(** **)** Emitted when the mouse leaves the control's ``Rect`` area, provided its :ref:`mouse_filter` lets the event reach it. -\ **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:`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. If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: @@ -365,373 +407,701 @@ If you want to check whether the mouse truly left the area, ignoring any top nod if not Rect2(Vector2(), size).has_point(get_local_mouse_position()): # Not hovering over area. +.. rst-class:: classref-item-separator + ---- .. _class_Control_signal_resized: -- **resized** **(** **)** +.. rst-class:: classref-signal + +**resized** **(** **)** Emitted when the control changes size. +.. rst-class:: classref-item-separator + ---- .. _class_Control_signal_size_flags_changed: -- **size_flags_changed** **(** **)** +.. rst-class:: classref-signal + +**size_flags_changed** **(** **)** Emitted when one of the size flags changes. See :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_signal_theme_changed: -- **theme_changed** **(** **)** +.. rst-class:: classref-signal + +**theme_changed** **(** **)** Emitted when the :ref:`NOTIFICATION_THEME_CHANGED` notification is sent. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Control_FocusMode: -.. _class_Control_constant_FOCUS_NONE: - -.. _class_Control_constant_FOCUS_CLICK: - -.. _class_Control_constant_FOCUS_ALL: +.. rst-class:: classref-enumeration enum **FocusMode**: -- **FOCUS_NONE** = **0** --- The node cannot grab focus. Use with :ref:`focus_mode`. +.. _class_Control_constant_FOCUS_NONE: -- **FOCUS_CLICK** = **1** --- The node can only grab focus on mouse clicks. Use with :ref:`focus_mode`. +.. rst-class:: classref-enumeration-constant -- **FOCUS_ALL** = **2** --- The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with :ref:`focus_mode`. +:ref:`FocusMode` **FOCUS_NONE** = ``0`` + +The node cannot grab focus. Use with :ref:`focus_mode`. + +.. _class_Control_constant_FOCUS_CLICK: + +.. rst-class:: classref-enumeration-constant + +:ref:`FocusMode` **FOCUS_CLICK** = ``1`` + +The node can only grab focus on mouse clicks. Use with :ref:`focus_mode`. + +.. _class_Control_constant_FOCUS_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`FocusMode` **FOCUS_ALL** = ``2`` + +The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with :ref:`focus_mode`. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_CursorShape: -.. _class_Control_constant_CURSOR_ARROW: - -.. _class_Control_constant_CURSOR_IBEAM: - -.. _class_Control_constant_CURSOR_POINTING_HAND: - -.. _class_Control_constant_CURSOR_CROSS: - -.. _class_Control_constant_CURSOR_WAIT: - -.. _class_Control_constant_CURSOR_BUSY: - -.. _class_Control_constant_CURSOR_DRAG: - -.. _class_Control_constant_CURSOR_CAN_DROP: - -.. _class_Control_constant_CURSOR_FORBIDDEN: - -.. _class_Control_constant_CURSOR_VSIZE: - -.. _class_Control_constant_CURSOR_HSIZE: - -.. _class_Control_constant_CURSOR_BDIAGSIZE: - -.. _class_Control_constant_CURSOR_FDIAGSIZE: - -.. _class_Control_constant_CURSOR_MOVE: - -.. _class_Control_constant_CURSOR_VSPLIT: - -.. _class_Control_constant_CURSOR_HSPLIT: - -.. _class_Control_constant_CURSOR_HELP: +.. rst-class:: classref-enumeration enum **CursorShape**: -- **CURSOR_ARROW** = **0** --- Show the system's arrow mouse cursor when the user hovers the node. Use with :ref:`mouse_default_cursor_shape`. +.. _class_Control_constant_CURSOR_ARROW: -- **CURSOR_IBEAM** = **1** --- Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. +.. rst-class:: classref-enumeration-constant -- **CURSOR_POINTING_HAND** = **2** --- Show the system's pointing hand mouse cursor when the user hovers the node. +:ref:`CursorShape` **CURSOR_ARROW** = ``0`` -- **CURSOR_CROSS** = **3** --- Show the system's cross mouse cursor when the user hovers the node. +Show the system's arrow mouse cursor when the user hovers the node. Use with :ref:`mouse_default_cursor_shape`. -- **CURSOR_WAIT** = **4** --- Show the system's wait mouse cursor when the user hovers the node. Often an hourglass. +.. _class_Control_constant_CURSOR_IBEAM: -- **CURSOR_BUSY** = **5** --- Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass. +.. rst-class:: classref-enumeration-constant -- **CURSOR_DRAG** = **6** --- Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. +:ref:`CursorShape` **CURSOR_IBEAM** = ``1`` -- **CURSOR_CAN_DROP** = **7** --- Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock. +Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. -- **CURSOR_FORBIDDEN** = **8** --- Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. +.. _class_Control_constant_CURSOR_POINTING_HAND: -- **CURSOR_VSIZE** = **9** --- Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. +.. rst-class:: classref-enumeration-constant -- **CURSOR_HSIZE** = **10** --- Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. +:ref:`CursorShape` **CURSOR_POINTING_HAND** = ``2`` -- **CURSOR_BDIAGSIZE** = **11** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. +Show the system's pointing hand mouse cursor when the user hovers the node. -- **CURSOR_FDIAGSIZE** = **12** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of :ref:`CURSOR_BDIAGSIZE`. It tells the user they can resize the window or the panel both horizontally and vertically. +.. _class_Control_constant_CURSOR_CROSS: -- **CURSOR_MOVE** = **13** --- Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. +.. rst-class:: classref-enumeration-constant -- **CURSOR_VSPLIT** = **14** --- Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as :ref:`CURSOR_VSIZE`. +:ref:`CursorShape` **CURSOR_CROSS** = ``3`` -- **CURSOR_HSPLIT** = **15** --- Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as :ref:`CURSOR_HSIZE`. +Show the system's cross mouse cursor when the user hovers the node. -- **CURSOR_HELP** = **16** --- Show the system's help mouse cursor when the user hovers the node, a question mark. +.. _class_Control_constant_CURSOR_WAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_WAIT** = ``4`` + +Show the system's wait mouse cursor when the user hovers the node. Often an hourglass. + +.. _class_Control_constant_CURSOR_BUSY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_BUSY** = ``5`` + +Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass. + +.. _class_Control_constant_CURSOR_DRAG: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_DRAG** = ``6`` + +Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. + +.. _class_Control_constant_CURSOR_CAN_DROP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_CAN_DROP** = ``7`` + +Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock. + +.. _class_Control_constant_CURSOR_FORBIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_FORBIDDEN** = ``8`` + +Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. + +.. _class_Control_constant_CURSOR_VSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSIZE** = ``9`` + +Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. + +.. _class_Control_constant_CURSOR_HSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSIZE** = ``10`` + +Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + +.. _class_Control_constant_CURSOR_BDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_BDIAGSIZE** = ``11`` + +Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + +.. _class_Control_constant_CURSOR_FDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_FDIAGSIZE** = ``12`` + +Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of :ref:`CURSOR_BDIAGSIZE`. It tells the user they can resize the window or the panel both horizontally and vertically. + +.. _class_Control_constant_CURSOR_MOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_MOVE** = ``13`` + +Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. + +.. _class_Control_constant_CURSOR_VSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSPLIT** = ``14`` + +Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as :ref:`CURSOR_VSIZE`. + +.. _class_Control_constant_CURSOR_HSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSPLIT** = ``15`` + +Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as :ref:`CURSOR_HSIZE`. + +.. _class_Control_constant_CURSOR_HELP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HELP** = ``16`` + +Show the system's help mouse cursor when the user hovers the node, a question mark. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_LayoutPreset: -.. _class_Control_constant_PRESET_TOP_LEFT: - -.. _class_Control_constant_PRESET_TOP_RIGHT: - -.. _class_Control_constant_PRESET_BOTTOM_LEFT: - -.. _class_Control_constant_PRESET_BOTTOM_RIGHT: - -.. _class_Control_constant_PRESET_CENTER_LEFT: - -.. _class_Control_constant_PRESET_CENTER_TOP: - -.. _class_Control_constant_PRESET_CENTER_RIGHT: - -.. _class_Control_constant_PRESET_CENTER_BOTTOM: - -.. _class_Control_constant_PRESET_CENTER: - -.. _class_Control_constant_PRESET_LEFT_WIDE: - -.. _class_Control_constant_PRESET_TOP_WIDE: - -.. _class_Control_constant_PRESET_RIGHT_WIDE: - -.. _class_Control_constant_PRESET_BOTTOM_WIDE: - -.. _class_Control_constant_PRESET_VCENTER_WIDE: - -.. _class_Control_constant_PRESET_HCENTER_WIDE: - -.. _class_Control_constant_PRESET_FULL_RECT: +.. rst-class:: classref-enumeration enum **LayoutPreset**: -- **PRESET_TOP_LEFT** = **0** --- Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. +.. _class_Control_constant_PRESET_TOP_LEFT: -- **PRESET_TOP_RIGHT** = **1** --- Snap all 4 anchors to the top-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. +.. rst-class:: classref-enumeration-constant -- **PRESET_BOTTOM_LEFT** = **2** --- Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. +:ref:`LayoutPreset` **PRESET_TOP_LEFT** = ``0`` -- **PRESET_BOTTOM_RIGHT** = **3** --- Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_CENTER_LEFT** = **4** --- Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +.. _class_Control_constant_PRESET_TOP_RIGHT: -- **PRESET_CENTER_TOP** = **5** --- Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +.. rst-class:: classref-enumeration-constant -- **PRESET_CENTER_RIGHT** = **6** --- Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +:ref:`LayoutPreset` **PRESET_TOP_RIGHT** = ``1`` -- **PRESET_CENTER_BOTTOM** = **7** --- Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_CENTER** = **8** --- Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:`set_anchors_preset`. +.. _class_Control_constant_PRESET_BOTTOM_LEFT: -- **PRESET_LEFT_WIDE** = **9** --- Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset`. +.. rst-class:: classref-enumeration-constant -- **PRESET_TOP_WIDE** = **10** --- Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +:ref:`LayoutPreset` **PRESET_BOTTOM_LEFT** = ``2`` -- **PRESET_RIGHT_WIDE** = **11** --- Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_BOTTOM_WIDE** = **12** --- Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset`. +.. _class_Control_constant_PRESET_BOTTOM_RIGHT: -- **PRESET_VCENTER_WIDE** = **13** --- Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. +.. rst-class:: classref-enumeration-constant -- **PRESET_HCENTER_WIDE** = **14** --- Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. +:ref:`LayoutPreset` **PRESET_BOTTOM_RIGHT** = ``3`` -- **PRESET_FULL_RECT** = **15** --- Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the ``Control`` will fit its parent control. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_CENTER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_CENTER_LEFT** = ``4`` + +Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_CENTER_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_CENTER_TOP** = ``5`` + +Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_CENTER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_CENTER_RIGHT** = ``6`` + +Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_CENTER_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_CENTER_BOTTOM** = ``7`` + +Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_CENTER** = ``8`` + +Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_LEFT_WIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_LEFT_WIDE** = ``9`` + +Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_TOP_WIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_TOP_WIDE** = ``10`` + +Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_RIGHT_WIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_RIGHT_WIDE** = ``11`` + +Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_BOTTOM_WIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_BOTTOM_WIDE** = ``12`` + +Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_VCENTER_WIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_VCENTER_WIDE** = ``13`` + +Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_HCENTER_WIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_HCENTER_WIDE** = ``14`` + +Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. + +.. _class_Control_constant_PRESET_FULL_RECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPreset` **PRESET_FULL_RECT** = ``15`` + +Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the **Control** will fit its parent control. Use with :ref:`set_anchors_preset`. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_LayoutPresetMode: -.. _class_Control_constant_PRESET_MODE_MINSIZE: - -.. _class_Control_constant_PRESET_MODE_KEEP_WIDTH: - -.. _class_Control_constant_PRESET_MODE_KEEP_HEIGHT: - -.. _class_Control_constant_PRESET_MODE_KEEP_SIZE: +.. rst-class:: classref-enumeration enum **LayoutPresetMode**: -- **PRESET_MODE_MINSIZE** = **0** --- The control will be resized to its minimum size. +.. _class_Control_constant_PRESET_MODE_MINSIZE: -- **PRESET_MODE_KEEP_WIDTH** = **1** --- The control's width will not change. +.. rst-class:: classref-enumeration-constant -- **PRESET_MODE_KEEP_HEIGHT** = **2** --- The control's height will not change. +:ref:`LayoutPresetMode` **PRESET_MODE_MINSIZE** = ``0`` -- **PRESET_MODE_KEEP_SIZE** = **3** --- The control's size will not change. +The control will be resized to its minimum size. + +.. _class_Control_constant_PRESET_MODE_KEEP_WIDTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPresetMode` **PRESET_MODE_KEEP_WIDTH** = ``1`` + +The control's width will not change. + +.. _class_Control_constant_PRESET_MODE_KEEP_HEIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPresetMode` **PRESET_MODE_KEEP_HEIGHT** = ``2`` + +The control's height will not change. + +.. _class_Control_constant_PRESET_MODE_KEEP_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutPresetMode` **PRESET_MODE_KEEP_SIZE** = ``3`` + +The control's size will not change. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_SizeFlags: -.. _class_Control_constant_SIZE_SHRINK_BEGIN: - -.. _class_Control_constant_SIZE_FILL: - -.. _class_Control_constant_SIZE_EXPAND: - -.. _class_Control_constant_SIZE_EXPAND_FILL: - -.. _class_Control_constant_SIZE_SHRINK_CENTER: - -.. _class_Control_constant_SIZE_SHRINK_END: +.. rst-class:: classref-enumeration enum **SizeFlags**: -- **SIZE_SHRINK_BEGIN** = **0** --- Tells the parent :ref:`Container` to align the node with its start, either the top or the left edge. It is mutually exclusive with :ref:`SIZE_FILL` and other shrink size flags, but can be used with :ref:`SIZE_EXPAND` in some containers. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. +.. _class_Control_constant_SIZE_SHRINK_BEGIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`SizeFlags` **SIZE_SHRINK_BEGIN** = ``0`` + +Tells the parent :ref:`Container` to align the node with its start, either the top or the left edge. It is mutually exclusive with :ref:`SIZE_FILL` and other shrink size flags, but can be used with :ref:`SIZE_EXPAND` in some containers. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. \ **Note:** Setting this flag is equal to not having any size flags. -- **SIZE_FILL** = **1** --- Tells the parent :ref:`Container` to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. +.. _class_Control_constant_SIZE_FILL: -- **SIZE_EXPAND** = **2** --- Tells the parent :ref:`Container` to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See :ref:`size_flags_stretch_ratio`. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. +.. rst-class:: classref-enumeration-constant -- **SIZE_EXPAND_FILL** = **3** --- Sets the node's size flags to both fill and expand. See :ref:`SIZE_FILL` and :ref:`SIZE_EXPAND` for more information. +:ref:`SizeFlags` **SIZE_FILL** = ``1`` -- **SIZE_SHRINK_CENTER** = **4** --- Tells the parent :ref:`Container` to center the node in the available space. It is mutually exclusive with :ref:`SIZE_FILL` and other shrink size flags, but can be used with :ref:`SIZE_EXPAND` in some containers. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. +Tells the parent :ref:`Container` to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. -- **SIZE_SHRINK_END** = **8** --- Tells the parent :ref:`Container` to align the node with its end, either the bottom or the right edge. It is mutually exclusive with :ref:`SIZE_FILL` and other shrink size flags, but can be used with :ref:`SIZE_EXPAND` in some containers. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. +.. _class_Control_constant_SIZE_EXPAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`SizeFlags` **SIZE_EXPAND** = ``2`` + +Tells the parent :ref:`Container` to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See :ref:`size_flags_stretch_ratio`. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. + +.. _class_Control_constant_SIZE_EXPAND_FILL: + +.. rst-class:: classref-enumeration-constant + +:ref:`SizeFlags` **SIZE_EXPAND_FILL** = ``3`` + +Sets the node's size flags to both fill and expand. See :ref:`SIZE_FILL` and :ref:`SIZE_EXPAND` for more information. + +.. _class_Control_constant_SIZE_SHRINK_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SizeFlags` **SIZE_SHRINK_CENTER** = ``4`` + +Tells the parent :ref:`Container` to center the node in the available space. It is mutually exclusive with :ref:`SIZE_FILL` and other shrink size flags, but can be used with :ref:`SIZE_EXPAND` in some containers. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. + +.. _class_Control_constant_SIZE_SHRINK_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`SizeFlags` **SIZE_SHRINK_END** = ``8`` + +Tells the parent :ref:`Container` to align the node with its end, either the bottom or the right edge. It is mutually exclusive with :ref:`SIZE_FILL` and other shrink size flags, but can be used with :ref:`SIZE_EXPAND` in some containers. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_MouseFilter: -.. _class_Control_constant_MOUSE_FILTER_STOP: - -.. _class_Control_constant_MOUSE_FILTER_PASS: - -.. _class_Control_constant_MOUSE_FILTER_IGNORE: +.. rst-class:: classref-enumeration enum **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. +.. _class_Control_constant_MOUSE_FILTER_STOP: -- **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. +.. rst-class:: classref-enumeration-constant -- **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. +: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. + +.. _class_Control_constant_MOUSE_FILTER_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseFilter` **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. + +.. _class_Control_constant_MOUSE_FILTER_IGNORE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseFilter` **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. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_GrowDirection: -.. _class_Control_constant_GROW_DIRECTION_BEGIN: - -.. _class_Control_constant_GROW_DIRECTION_END: - -.. _class_Control_constant_GROW_DIRECTION_BOTH: +.. rst-class:: classref-enumeration enum **GrowDirection**: -- **GROW_DIRECTION_BEGIN** = **0** --- The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. +.. _class_Control_constant_GROW_DIRECTION_BEGIN: -- **GROW_DIRECTION_END** = **1** --- The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. +.. rst-class:: classref-enumeration-constant -- **GROW_DIRECTION_BOTH** = **2** --- The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size. +:ref:`GrowDirection` **GROW_DIRECTION_BEGIN** = ``0`` + +The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. + +.. _class_Control_constant_GROW_DIRECTION_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`GrowDirection` **GROW_DIRECTION_END** = ``1`` + +The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. + +.. _class_Control_constant_GROW_DIRECTION_BOTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`GrowDirection` **GROW_DIRECTION_BOTH** = ``2`` + +The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_Anchor: -.. _class_Control_constant_ANCHOR_BEGIN: - -.. _class_Control_constant_ANCHOR_END: +.. rst-class:: classref-enumeration enum **Anchor**: -- **ANCHOR_BEGIN** = **0** --- Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the top left. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. +.. _class_Control_constant_ANCHOR_BEGIN: -- **ANCHOR_END** = **1** --- Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bottom right. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. +.. rst-class:: classref-enumeration-constant + +:ref:`Anchor` **ANCHOR_BEGIN** = ``0`` + +Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the top left. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. + +.. _class_Control_constant_ANCHOR_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`Anchor` **ANCHOR_END** = ``1`` + +Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bottom right. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_LayoutDirection: -.. _class_Control_constant_LAYOUT_DIRECTION_INHERITED: - -.. _class_Control_constant_LAYOUT_DIRECTION_LOCALE: - -.. _class_Control_constant_LAYOUT_DIRECTION_LTR: - -.. _class_Control_constant_LAYOUT_DIRECTION_RTL: +.. rst-class:: classref-enumeration enum **LayoutDirection**: -- **LAYOUT_DIRECTION_INHERITED** = **0** --- Automatic layout direction, determined from the parent control layout direction. +.. _class_Control_constant_LAYOUT_DIRECTION_INHERITED: -- **LAYOUT_DIRECTION_LOCALE** = **1** --- Automatic layout direction, determined from the current locale. +.. rst-class:: classref-enumeration-constant -- **LAYOUT_DIRECTION_LTR** = **2** --- Left-to-right layout direction. +:ref:`LayoutDirection` **LAYOUT_DIRECTION_INHERITED** = ``0`` -- **LAYOUT_DIRECTION_RTL** = **3** --- Right-to-left layout direction. +Automatic layout direction, determined from the parent control layout direction. + +.. _class_Control_constant_LAYOUT_DIRECTION_LOCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_LOCALE** = ``1`` + +Automatic layout direction, determined from the current locale. + +.. _class_Control_constant_LAYOUT_DIRECTION_LTR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_LTR** = ``2`` + +Left-to-right layout direction. + +.. _class_Control_constant_LAYOUT_DIRECTION_RTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_RTL** = ``3`` + +Right-to-left layout direction. + +.. rst-class:: classref-item-separator ---- .. _enum_Control_TextDirection: -.. _class_Control_constant_TEXT_DIRECTION_INHERITED: - -.. _class_Control_constant_TEXT_DIRECTION_AUTO: - -.. _class_Control_constant_TEXT_DIRECTION_LTR: - -.. _class_Control_constant_TEXT_DIRECTION_RTL: +.. rst-class:: classref-enumeration enum **TextDirection**: -- **TEXT_DIRECTION_INHERITED** = **3** --- Text writing direction is the same as layout direction. +.. _class_Control_constant_TEXT_DIRECTION_INHERITED: -- **TEXT_DIRECTION_AUTO** = **0** --- Automatic text writing direction, determined from the current locale and text content. +.. rst-class:: classref-enumeration-constant -- **TEXT_DIRECTION_LTR** = **1** --- Left-to-right text writing direction. +:ref:`TextDirection` **TEXT_DIRECTION_INHERITED** = ``3`` -- **TEXT_DIRECTION_RTL** = **2** --- Right-to-left text writing direction. +Text writing direction is the same as layout direction. + +.. _class_Control_constant_TEXT_DIRECTION_AUTO: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextDirection` **TEXT_DIRECTION_AUTO** = ``0`` + +Automatic text writing direction, determined from the current locale and text content. + +.. _class_Control_constant_TEXT_DIRECTION_LTR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextDirection` **TEXT_DIRECTION_LTR** = ``1`` + +Left-to-right text writing direction. + +.. _class_Control_constant_TEXT_DIRECTION_RTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextDirection` **TEXT_DIRECTION_RTL** = ``2`` + +Right-to-left text writing direction. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Control_constant_NOTIFICATION_RESIZED: +.. rst-class:: classref-constant + +**NOTIFICATION_RESIZED** = ``40`` + +Sent when the node changes size. Use :ref:`size` to get the new size. + .. _class_Control_constant_NOTIFICATION_MOUSE_ENTER: +.. rst-class:: classref-constant + +**NOTIFICATION_MOUSE_ENTER** = ``41`` + +Sent when the mouse pointer enters the node. + .. _class_Control_constant_NOTIFICATION_MOUSE_EXIT: +.. rst-class:: classref-constant + +**NOTIFICATION_MOUSE_EXIT** = ``42`` + +Sent when the mouse pointer exits the node. + .. _class_Control_constant_NOTIFICATION_FOCUS_ENTER: +.. rst-class:: classref-constant + +**NOTIFICATION_FOCUS_ENTER** = ``43`` + +Sent when the node grabs focus. + .. _class_Control_constant_NOTIFICATION_FOCUS_EXIT: +.. rst-class:: classref-constant + +**NOTIFICATION_FOCUS_EXIT** = ``44`` + +Sent when the node loses focus. + .. _class_Control_constant_NOTIFICATION_THEME_CHANGED: -.. _class_Control_constant_NOTIFICATION_SCROLL_BEGIN: +.. rst-class:: classref-constant -.. _class_Control_constant_NOTIFICATION_SCROLL_END: +**NOTIFICATION_THEME_CHANGED** = ``45`` -.. _class_Control_constant_NOTIFICATION_LAYOUT_DIRECTION_CHANGED: - -- **NOTIFICATION_RESIZED** = **40** --- Sent when the node changes size. Use :ref:`size` to get the new size. - -- **NOTIFICATION_MOUSE_ENTER** = **41** --- Sent when the mouse pointer enters the node. - -- **NOTIFICATION_MOUSE_EXIT** = **42** --- Sent when the mouse pointer exits the node. - -- **NOTIFICATION_FOCUS_ENTER** = **43** --- Sent when the node grabs focus. - -- **NOTIFICATION_FOCUS_EXIT** = **44** --- Sent when the node loses focus. - -- **NOTIFICATION_THEME_CHANGED** = **45** --- Sent when the node needs to refresh its theme items. This happens in one of the following cases: +Sent when the node needs to refresh its theme items. This happens in one of the following cases: - The :ref:`theme` property is changed on this node or any of its ancestors. @@ -743,496 +1113,556 @@ Constants \ **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. -- **NOTIFICATION_SCROLL_BEGIN** = **47** --- Sent when this node is inside a :ref:`ScrollContainer` which has begun being scrolled. +.. _class_Control_constant_NOTIFICATION_SCROLL_BEGIN: -- **NOTIFICATION_SCROLL_END** = **48** --- Sent when this node is inside a :ref:`ScrollContainer` which has stopped being scrolled. +.. rst-class:: classref-constant -- **NOTIFICATION_LAYOUT_DIRECTION_CHANGED** = **49** --- Sent when control layout direction is changed. +**NOTIFICATION_SCROLL_BEGIN** = ``47`` + +Sent when this node is inside a :ref:`ScrollContainer` which has begun being scrolled. + +.. _class_Control_constant_NOTIFICATION_SCROLL_END: + +.. rst-class:: classref-constant + +**NOTIFICATION_SCROLL_END** = ``48`` + +Sent when this node is inside a :ref:`ScrollContainer` which has stopped being scrolled. + +.. _class_Control_constant_NOTIFICATION_LAYOUT_DIRECTION_CHANGED: + +.. rst-class:: classref-constant + +**NOTIFICATION_LAYOUT_DIRECTION_CHANGED** = ``49`` + +Sent when control layout direction is changed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Control_property_anchor_bottom: -- :ref:`float` **anchor_bottom** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``0.0`` | -+-----------+--------------+ -| *Getter* | get_anchor() | -+-----------+--------------+ +:ref:`float` **anchor_bottom** = ``0.0`` + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_anchor** **(** :ref:`Side` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_anchor_left: -- :ref:`float` **anchor_left** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``0.0`` | -+-----------+--------------+ -| *Getter* | get_anchor() | -+-----------+--------------+ +:ref:`float` **anchor_left** = ``0.0`` + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_anchor** **(** :ref:`Side` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_anchor_right: -- :ref:`float` **anchor_right** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``0.0`` | -+-----------+--------------+ -| *Getter* | get_anchor() | -+-----------+--------------+ +:ref:`float` **anchor_right** = ``0.0`` + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_anchor** **(** :ref:`Side` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_anchor_top: -- :ref:`float` **anchor_top** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``0.0`` | -+-----------+--------------+ -| *Getter* | get_anchor() | -+-----------+--------------+ +:ref:`float` **anchor_top** = ``0.0`` + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_anchor** **(** :ref:`Side` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_auto_translate: -- :ref:`bool` **auto_translate** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------+ -| *Setter* | set_auto_translate(value) | -+-----------+---------------------------+ -| *Getter* | is_auto_translating() | -+-----------+---------------------------+ +:ref:`bool` **auto_translate** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_auto_translate** **(** :ref:`bool` value **)** +- :ref:`bool` **is_auto_translating** **(** **)** Toggles if any text should automatically change to its translated version depending on the current locale. Note that this will not affect any internal nodes (e.g. the popup of a :ref:`MenuButton`). Also decides if the node's strings should be parsed for POT generation. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_clip_contents: -- :ref:`bool` **clip_contents** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_clip_contents(value) | -+-----------+--------------------------+ -| *Getter* | is_clipping_contents() | -+-----------+--------------------------+ +:ref:`bool` **clip_contents** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_clip_contents** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_custom_minimum_size: -- :ref:`Vector2` **custom_minimum_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+--------------------------------+ -| *Setter* | set_custom_minimum_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_custom_minimum_size() | -+-----------+--------------------------------+ +:ref:`Vector2` **custom_minimum_size** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_custom_minimum_size** **(** :ref:`Vector2` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_focus_mode: -- :ref:`FocusMode` **focus_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_focus_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_focus_mode() | -+-----------+-----------------------+ +:ref:`FocusMode` **focus_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_focus_mode** **(** :ref:`FocusMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_focus_neighbor_bottom: -- :ref:`NodePath` **focus_neighbor_bottom** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------------+ -| *Setter* | set_focus_neighbor(value) | -+-----------+---------------------------+ -| *Getter* | get_focus_neighbor() | -+-----------+---------------------------+ +:ref:`NodePath` **focus_neighbor_bottom** = ``NodePath("")`` -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. +.. rst-class:: classref-property-setget + +- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** +- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` 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. + +.. rst-class:: classref-item-separator ---- .. _class_Control_property_focus_neighbor_left: -- :ref:`NodePath` **focus_neighbor_left** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------------+ -| *Setter* | set_focus_neighbor(value) | -+-----------+---------------------------+ -| *Getter* | get_focus_neighbor() | -+-----------+---------------------------+ +:ref:`NodePath` **focus_neighbor_left** = ``NodePath("")`` -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. +.. rst-class:: classref-property-setget + +- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** +- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` 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. + +.. rst-class:: classref-item-separator ---- .. _class_Control_property_focus_neighbor_right: -- :ref:`NodePath` **focus_neighbor_right** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------------+ -| *Setter* | set_focus_neighbor(value) | -+-----------+---------------------------+ -| *Getter* | get_focus_neighbor() | -+-----------+---------------------------+ +:ref:`NodePath` **focus_neighbor_right** = ``NodePath("")`` -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 bottom of this one. +.. rst-class:: classref-property-setget + +- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** +- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` 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 bottom of this one. + +.. rst-class:: classref-item-separator ---- .. _class_Control_property_focus_neighbor_top: -- :ref:`NodePath` **focus_neighbor_top** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------------+ -| *Setter* | set_focus_neighbor(value) | -+-----------+---------------------------+ -| *Getter* | get_focus_neighbor() | -+-----------+---------------------------+ +:ref:`NodePath` **focus_neighbor_top** = ``NodePath("")`` -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 bottom of this one. +.. rst-class:: classref-property-setget + +- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** +- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` 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 bottom of this one. + +.. rst-class:: classref-item-separator ---- .. _class_Control_property_focus_next: -- :ref:`NodePath` **focus_next** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-----------------------+ -| *Setter* | set_focus_next(value) | -+-----------+-----------------------+ -| *Getter* | get_focus_next() | -+-----------+-----------------------+ +:ref:`NodePath` **focus_next** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_focus_next** **(** :ref:`NodePath` value **)** +- :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. If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_focus_previous: -- :ref:`NodePath` **focus_previous** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------------+ -| *Setter* | set_focus_previous(value) | -+-----------+---------------------------+ -| *Getter* | get_focus_previous() | -+-----------+---------------------------+ +:ref:`NodePath` **focus_previous** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_focus_previous** **(** :ref:`NodePath` value **)** +- :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. If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_global_position: -- :ref:`Vector2` **global_position** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Getter* | get_global_position() | -+----------+-----------------------+ +:ref:`Vector2` **global_position** + +.. rst-class:: classref-property-setget + +- :ref:`Vector2` **get_global_position** **(** **)** The node's global position, relative to the world (usually to the :ref:`CanvasLayer`). +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_grow_horizontal: -- :ref:`GrowDirection` **grow_horizontal** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_h_grow_direction(value) | -+-----------+-----------------------------+ -| *Getter* | get_h_grow_direction() | -+-----------+-----------------------------+ +:ref:`GrowDirection` **grow_horizontal** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_h_grow_direction** **(** :ref:`GrowDirection` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_grow_vertical: -- :ref:`GrowDirection` **grow_vertical** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_v_grow_direction(value) | -+-----------+-----------------------------+ -| *Getter* | get_v_grow_direction() | -+-----------+-----------------------------+ +:ref:`GrowDirection` **grow_vertical** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_v_grow_direction** **(** :ref:`GrowDirection` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_layout_direction: -- :ref:`LayoutDirection` **layout_direction** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_layout_direction(value) | -+-----------+-----------------------------+ -| *Getter* | get_layout_direction() | -+-----------+-----------------------------+ +:ref:`LayoutDirection` **layout_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_layout_direction** **(** :ref:`LayoutDirection` value **)** +- :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). +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_localize_numeral_system: -- :ref:`bool` **localize_numeral_system** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------------+ -| *Setter* | set_localize_numeral_system(value) | -+-----------+------------------------------------+ -| *Getter* | is_localizing_numeral_system() | -+-----------+------------------------------------+ +:ref:`bool` **localize_numeral_system** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_localize_numeral_system** **(** :ref:`bool` value **)** +- :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. \ **Note:** Numbers within the text are not automatically converted, it can be done manually, using :ref:`TextServer.format_number`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_mouse_default_cursor_shape: -- :ref:`CursorShape` **mouse_default_cursor_shape** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_default_cursor_shape(value) | -+-----------+---------------------------------+ -| *Getter* | get_default_cursor_shape() | -+-----------+---------------------------------+ +:ref:`CursorShape` **mouse_default_cursor_shape** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_default_cursor_shape** **(** :ref:`CursorShape` value **)** +- :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. \ **Note:** On Linux, shapes may vary depending on the cursor theme of the system. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_mouse_filter: -- :ref:`MouseFilter` **mouse_filter** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_mouse_filter(value) | -+-----------+-------------------------+ -| *Getter* | get_mouse_filter() | -+-----------+-------------------------+ +:ref:`MouseFilter` **mouse_filter** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mouse_filter** **(** :ref:`MouseFilter` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_mouse_force_pass_scroll_events: -- :ref:`bool` **mouse_force_pass_scroll_events** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------+ -| *Setter* | set_force_pass_scroll_events(value) | -+-----------+-------------------------------------+ -| *Getter* | is_force_pass_scroll_events() | -+-----------+-------------------------------------+ +:ref:`bool` **mouse_force_pass_scroll_events** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_force_pass_scroll_events** **(** :ref:`bool` value **)** +- :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. 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 + ---- .. _class_Control_property_offset_bottom: -- :ref:`float` **offset_bottom** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`float` **offset_bottom** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** +- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| Distance between the node's bottom edge and its parent control, based on :ref:`anchor_bottom`. Offsets are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Offsets update automatically when you move or resize the node. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_offset_left: -- :ref:`float` **offset_left** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`float` **offset_left** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** +- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| Distance between the node's left edge and its parent control, based on :ref:`anchor_left`. Offsets are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Offsets update automatically when you move or resize the node. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_offset_right: -- :ref:`float` **offset_right** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`float` **offset_right** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** +- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| Distance between the node's right edge and its parent control, based on :ref:`anchor_right`. Offsets are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Offsets update automatically when you move or resize the node. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_offset_top: -- :ref:`float` **offset_top** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`float` **offset_top** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** +- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| Distance between the node's top edge and its parent control, based on :ref:`anchor_top`. Offsets are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Offsets update automatically when you move or resize the node. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_pivot_offset: -- :ref:`Vector2` **pivot_offset** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_pivot_offset(value) | -+-----------+-------------------------+ -| *Getter* | get_pivot_offset() | -+-----------+-------------------------+ +:ref:`Vector2` **pivot_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_pivot_offset** **(** :ref:`Vector2` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Getter* | get_position() | -+-----------+-------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- :ref:`Vector2` **get_position** **(** **)** The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by :ref:`pivot_offset`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_rotation: -- :ref:`float` **rotation** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_rotation(value) | -+-----------+---------------------+ -| *Getter* | get_rotation() | -+-----------+---------------------+ +:ref:`float` **rotation** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_rotation** **(** :ref:`float` value **)** +- :ref:`float` **get_rotation** **(** **)** The node's rotation around its pivot, in radians. See :ref:`pivot_offset` to change the pivot's position. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_scale: -- :ref:`Vector2` **scale** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------+ -| *Setter* | set_scale(value) | -+-----------+-------------------+ -| *Getter* | get_scale() | -+-----------+-------------------+ +:ref:`Vector2` **scale** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_scale** **(** :ref:`Vector2` value **)** +- :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. @@ -1240,131 +1670,144 @@ The node's scale, relative to its :ref:`size`. Chan \ **Note:** If the Control node is a child of a :ref:`Container` node, the scale will be reset to ``Vector2(1, 1)`` when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using ``await get_tree().process_frame`` then set its :ref:`scale` property. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_shortcut_context: -- :ref:`Node` **shortcut_context** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_shortcut_context(value) | -+----------+-----------------------------+ -| *Getter* | get_shortcut_context() | -+----------+-----------------------------+ +:ref:`Node` **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. +.. rst-class:: classref-property-setget + +- void **set_shortcut_context** **(** :ref:`Node` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_Control_property_size: -- :ref:`Vector2` **size** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Getter* | get_size() | -+-----------+-------------------+ +:ref:`Vector2` **size** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- :ref:`Vector2` **get_size** **(** **)** The size of the node's bounding rectangle, in pixels. :ref:`Container` nodes update this property automatically. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_size_flags_horizontal: -- :ref:`int` **size_flags_horizontal** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_h_size_flags(value) | -+-----------+-------------------------+ -| *Getter* | get_h_size_flags() | -+-----------+-------------------------+ +:ref:`int` **size_flags_horizontal** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_h_size_flags** **(** :ref:`int` value **)** +- :ref:`int` **get_h_size_flags** **(** **)** Tells the parent :ref:`Container` nodes how they should resize and place the node on the X axis. Use one of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_size_flags_stretch_ratio: -- :ref:`float` **size_flags_stretch_ratio** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_stretch_ratio(value) | -+-----------+--------------------------+ -| *Getter* | get_stretch_ratio() | -+-----------+--------------------------+ +:ref:`float` **size_flags_stretch_ratio** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_ratio** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_size_flags_vertical: -- :ref:`int` **size_flags_vertical** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_v_size_flags(value) | -+-----------+-------------------------+ -| *Getter* | get_v_size_flags() | -+-----------+-------------------------+ +:ref:`int` **size_flags_vertical** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_v_size_flags** **(** :ref:`int` value **)** +- :ref:`int` **get_v_size_flags** **(** **)** Tells the parent :ref:`Container` nodes how they should resize and place the node on the Y axis. Use one of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. +.. rst-class:: classref-item-separator + ---- .. _class_Control_property_theme: -- :ref:`Theme` **theme** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_theme(value) | -+----------+------------------+ -| *Getter* | get_theme() | -+----------+------------------+ +:ref:`Theme` **theme** -The :ref:`Theme` resource this node and all its ``Control`` children use. If a child node has its own :ref:`Theme` resource set, theme items are merged with child's definitions having higher priority. +.. rst-class:: classref-property-setget + +- void **set_theme** **(** :ref:`Theme` value **)** +- :ref:`Theme` **get_theme** **(** **)** + +The :ref:`Theme` resource this node and all its **Control** children use. If a child node has its own :ref:`Theme` resource set, theme items are merged with child's definitions having higher priority. + +.. rst-class:: classref-item-separator ---- .. _class_Control_property_theme_type_variation: -- :ref:`StringName` **theme_type_variation** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``&""`` | -+-----------+---------------------------------+ -| *Setter* | set_theme_type_variation(value) | -+-----------+---------------------------------+ -| *Getter* | get_theme_type_variation() | -+-----------+---------------------------------+ +:ref:`StringName` **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). +.. rst-class:: classref-property-setget + +- void **set_theme_type_variation** **(** :ref:`StringName` value **)** +- :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). When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See :ref:`Theme.set_type_variation`. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. -\ **Note:** To look up ``Control``'s own items use various ``get_theme_*`` methods without specifying ``theme_type``. +\ **Note:** To look up **Control**'s own items use various ``get_theme_*`` methods without specifying ``theme_type``. -\ **Note:** Theme items are looked for in the tree order, from branch to root, where each ``Control`` node is checked for its :ref:`theme` property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. +\ **Note:** Theme items are looked for in the tree order, from branch to root, where each **Control** node is checked for its :ref:`theme` property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. + +.. rst-class:: classref-item-separator ---- .. _class_Control_property_tooltip_text: -- :ref:`String` **tooltip_text** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_tooltip_text(value) | -+-----------+-------------------------+ -| *Getter* | get_tooltip_text() | -+-----------+-------------------------+ +:ref:`String` **tooltip_text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_tooltip_text** **(** :ref:`String` value **)** +- :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`. @@ -1393,12 +1836,20 @@ The tooltip popup will use either a default implementation, or a custom one that +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Control_method__can_drop_data: -- :ref:`bool` **_can_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| 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. @@ -1425,11 +1876,15 @@ This method should only be used to test the data. Process the data in :ref:`_dro +.. rst-class:: classref-item-separator + ---- .. _class_Control_method__drop_data: -- void **_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| +.. rst-class:: classref-method + +void **_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| 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. @@ -1456,11 +1911,15 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra +.. rst-class:: classref-item-separator + ---- .. _class_Control_method__get_drag_data: -- :ref:`Variant` **_get_drag_data** **(** :ref:`Vector2` at_position **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_drag_data** **(** :ref:`Vector2` at_position **)** |virtual| |const| 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`. @@ -1487,23 +1946,31 @@ A preview that will follow the mouse that should represent the data can be set w +.. rst-class:: classref-item-separator + ---- .. _class_Control_method__get_minimum_size: -- :ref:`Vector2` **_get_minimum_size** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_minimum_size** **(** **)** |virtual| |const| 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). If not overridden, defaults to :ref:`Vector2.ZERO`. -\ **Note:** This method will not be called when the script is attached to a ``Control`` node that already overrides its minimum size (e.g. :ref:`Label`, :ref:`Button`, :ref:`PanelContainer` etc.). It can only be used with most basic GUI nodes, like ``Control``, :ref:`Container`, :ref:`Panel` etc. +\ **Note:** This method will not be called when the script is attached to a **Control** node that already overrides its minimum size (e.g. :ref:`Label`, :ref:`Button`, :ref:`PanelContainer` etc.). It can only be used with most basic GUI nodes, like **Control**, :ref:`Container`, :ref:`Panel` etc. + +.. rst-class:: classref-item-separator ---- .. _class_Control_method__gui_input: -- void **_gui_input** **(** :ref:`InputEvent` event **)** |virtual| +.. rst-class:: classref-method + +void **_gui_input** **(** :ref:`InputEvent` event **)** |virtual| Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See :ref:`accept_event`. @@ -1541,7 +2008,7 @@ The event won't trigger if: \* control has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; -\* control is obstructed by another ``Control`` on top of it, which doesn't have :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; +\* control is obstructed by another **Control** on top of it, which doesn't have :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; \* control's parent has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_STOP` or has accepted the event; @@ -1549,11 +2016,15 @@ The event won't trigger if: \ **Note:** Event position is relative to the control origin. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method__has_point: -- :ref:`bool` **_has_point** **(** :ref:`Vector2` position **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_point** **(** :ref:`Vector2` position **)** |virtual| |const| Virtual method to be implemented by the user. Returns whether the given ``position`` is inside this control. @@ -1561,15 +2032,19 @@ If not overridden, default behavior is checking if the point is within control's \ **Note:** If you want to check if a point is inside the control, you can use ``get_rect().has_point(point)``. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method__make_custom_tooltip: -- :ref:`Object` **_make_custom_tooltip** **(** :ref:`String` for_text **)** |virtual| |const| +.. rst-class:: classref-method -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. +:ref:`Object` **_make_custom_tooltip** **(** :ref:`String` for_text **)** |virtual| |const| -The returned node must be of type ``Control`` or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When ``null`` or a non-Control node is returned, the default tooltip will be used instead. +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. + +The returned node must be of type **Control** or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When ``null`` or a non-Control node is returned, the default tooltip will be used instead. The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox` for the type ``"TooltipPanel"`` (see :ref:`tooltip_text` for an example). @@ -1623,29 +2098,41 @@ The returned node will be added as child to a :ref:`PopupPanel +.. rst-class:: classref-item-separator + ---- .. _class_Control_method__structured_text_parser: -- :ref:`Vector2i[]` **_structured_text_parser** **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **_structured_text_parser** **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| User defined BiDi algorithm override function. Returns an :ref:`Array` of :ref:`Vector2i` text ranges, in the left-to-right order. Ranges should cover full source ``text`` without overlaps. BiDi algorithm will be used on each range separately. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_accept_event: -- void **accept_event** **(** **)** +.. rst-class:: classref-method + +void **accept_event** **(** **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_add_theme_color_override: -- void **add_theme_color_override** **(** :ref:`StringName` name, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **add_theme_color_override** **(** :ref:`StringName` name, :ref:`Color` color **)** 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`. @@ -1676,51 +2163,71 @@ See also :ref:`get_theme_color`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_add_theme_constant_override: -- void **add_theme_constant_override** **(** :ref:`StringName` name, :ref:`int` constant **)** +.. rst-class:: classref-method + +void **add_theme_constant_override** **(** :ref:`StringName` name, :ref:`int` constant **)** 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`. See also :ref:`get_theme_constant`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_add_theme_font_override: -- void **add_theme_font_override** **(** :ref:`StringName` name, :ref:`Font` font **)** +.. rst-class:: classref-method + +void **add_theme_font_override** **(** :ref:`StringName` name, :ref:`Font` font **)** 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`. See also :ref:`get_theme_font`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_add_theme_font_size_override: -- void **add_theme_font_size_override** **(** :ref:`StringName` name, :ref:`int` font_size **)** +.. rst-class:: classref-method + +void **add_theme_font_size_override** **(** :ref:`StringName` name, :ref:`int` font_size **)** 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`. See also :ref:`get_theme_font_size`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_add_theme_icon_override: -- void **add_theme_icon_override** **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **add_theme_icon_override** **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** 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`. See also :ref:`get_theme_icon`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_add_theme_stylebox_override: -- void **add_theme_stylebox_override** **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** +.. rst-class:: classref-method + +void **add_theme_stylebox_override** **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** 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`. @@ -1757,151 +2264,223 @@ See also :ref:`get_theme_stylebox`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_begin_bulk_theme_override: -- void **begin_bulk_theme_override** **(** **)** +.. rst-class:: classref-method + +void **begin_bulk_theme_override** **(** **)** Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override` is called. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_end_bulk_theme_override: -- void **end_bulk_theme_override** **(** **)** +.. rst-class:: classref-method + +void **end_bulk_theme_override** **(** **)** Ends a bulk theme override update. See :ref:`begin_bulk_theme_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_find_next_valid_focus: -- :ref:`Control` **find_next_valid_focus** **(** **)** |const| +.. rst-class:: classref-method -Finds the next (below in the tree) ``Control`` that can receive the focus. +:ref:`Control` **find_next_valid_focus** **(** **)** |const| + +Finds the next (below in the tree) **Control** that can receive the focus. + +.. rst-class:: classref-item-separator ---- .. _class_Control_method_find_prev_valid_focus: -- :ref:`Control` **find_prev_valid_focus** **(** **)** |const| +.. rst-class:: classref-method -Finds the previous (above in the tree) ``Control`` that can receive the focus. +:ref:`Control` **find_prev_valid_focus** **(** **)** |const| + +Finds the previous (above in the tree) **Control** that can receive the focus. + +.. rst-class:: classref-item-separator ---- .. _class_Control_method_force_drag: -- void **force_drag** **(** :ref:`Variant` data, :ref:`Control` preview **)** +.. rst-class:: classref-method + +void **force_drag** **(** :ref:`Variant` data, :ref:`Control` preview **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_anchor: -- :ref:`float` **get_anchor** **(** :ref:`Side` side **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_anchor** **(** :ref:`Side` side **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_begin: -- :ref:`Vector2` **get_begin** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_begin** **(** **)** |const| Returns :ref:`offset_left` and :ref:`offset_top`. See also :ref:`position`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_combined_minimum_size: -- :ref:`Vector2` **get_combined_minimum_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_combined_minimum_size** **(** **)** |const| Returns combined minimum size from :ref:`custom_minimum_size` and :ref:`get_minimum_size`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_cursor_shape: -- :ref:`CursorShape` **get_cursor_shape** **(** :ref:`Vector2` position=Vector2(0, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`CursorShape` **get_cursor_shape** **(** :ref:`Vector2` position=Vector2(0, 0) **)** |const| Returns the mouse cursor shape the control displays on mouse hover. See :ref:`CursorShape`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_end: -- :ref:`Vector2` **get_end** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_end** **(** **)** |const| Returns :ref:`offset_right` and :ref:`offset_bottom`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_focus_neighbor: -- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_global_rect: -- :ref:`Rect2` **get_global_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_global_rect** **(** **)** |const| Returns the position and size of the control relative to the :ref:`CanvasLayer`. See :ref:`global_position` and :ref:`size`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_minimum_size: -- :ref:`Vector2` **get_minimum_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_minimum_size** **(** **)** |const| Returns the minimum size for this control. See :ref:`custom_minimum_size`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_offset: -- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| Returns the anchor for the specified :ref:`Side`. A getter method for :ref:`offset_bottom`, :ref:`offset_left`, :ref:`offset_right` and :ref:`offset_top`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_parent_area_size: -- :ref:`Vector2` **get_parent_area_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_parent_area_size** **(** **)** |const| Returns the width/height occupied in the parent control. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_parent_control: -- :ref:`Control` **get_parent_control** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Control` **get_parent_control** **(** **)** |const| Returns the parent control node. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_rect: -- :ref:`Rect2` **get_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_rect** **(** **)** |const| Returns the position and size of the control relative to the top-left corner of the parent Control. See :ref:`position` and :ref:`size`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_screen_position: -- :ref:`Vector2` **get_screen_position** **(** **)** |const| +.. rst-class:: classref-method -Returns the position of this ``Control`` in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. +:ref:`Vector2` **get_screen_position** **(** **)** |const| + +Returns the position of this **Control** in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. Equals to :ref:`global_position` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). @@ -1913,11 +2492,15 @@ Equals to :ref:`global_position` if the popup_menu.reset_size() popup_menu.popup() +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_color: -- :ref:`Color` **get_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| 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. @@ -1946,101 +2529,141 @@ For the current control its local overrides are considered first (see :ref:`add_ +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_constant: -- :ref:`int` **get_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| 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``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_default_base_scale: -- :ref:`float` **get_theme_default_base_scale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_theme_default_base_scale** **(** **)** |const| 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. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_default_font: -- :ref:`Font` **get_theme_default_font** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Font` **get_theme_default_font** **(** **)** |const| 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. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_default_font_size: -- :ref:`int` **get_theme_default_font_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_theme_default_font_size** **(** **)** |const| 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. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_font: -- :ref:`Font` **get_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`Font` **get_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| 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``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_font_size: -- :ref:`int` **get_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| 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``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_icon: -- :ref:`Texture2D` **get_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| 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``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_theme_stylebox: -- :ref:`StyleBox` **get_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`StyleBox` **get_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| 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``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_get_tooltip: -- :ref:`String` **get_tooltip** **(** :ref:`Vector2` at_position=Vector2(0, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_tooltip** **(** :ref:`Vector2` at_position=Vector2(0, 0) **)** |const| Returns the tooltip text ``at_position`` in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. \ **Note:** This method can be overridden to customize its behavior. If this method returns an empty :ref:`String`, no tooltip is displayed. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_grab_click_focus: -- void **grab_click_focus** **(** **)** +.. rst-class:: classref-method + +void **grab_click_focus** **(** **)** Creates an :ref:`InputEventMouseButton` that attempts to click the control. If the event is received, the control acquires focus. @@ -2061,231 +2684,331 @@ Creates an :ref:`InputEventMouseButton` that attemp +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_grab_focus: -- void **grab_focus** **(** **)** +.. rst-class:: classref-method + +void **grab_focus** **(** **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_focus: -- :ref:`bool` **has_focus** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_focus** **(** **)** |const| Returns ``true`` if this is the current focused control. See :ref:`focus_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_color: -- :ref:`bool` **has_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a color item with the specified ``name`` and ``theme_type``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_color_override: -- :ref:`bool` **has_theme_color_override** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if there is a local override for a theme :ref:`Color` with the specified ``name`` in this ``Control`` node. +:ref:`bool` **has_theme_color_override** **(** :ref:`StringName` name **)** |const| + +Returns ``true`` if there is a local override for a theme :ref:`Color` with the specified ``name`` in this **Control** node. See :ref:`add_theme_color_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_constant: -- :ref:`bool` **has_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a constant item with the specified ``name`` and ``theme_type``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_constant_override: -- :ref:`bool` **has_theme_constant_override** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this ``Control`` node. +:ref:`bool` **has_theme_constant_override** **(** :ref:`StringName` name **)** |const| + +Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this **Control** node. See :ref:`add_theme_constant_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_font: -- :ref:`bool` **has_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a font item with the specified ``name`` and ``theme_type``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_font_override: -- :ref:`bool` **has_theme_font_override** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if there is a local override for a theme :ref:`Font` with the specified ``name`` in this ``Control`` node. +:ref:`bool` **has_theme_font_override** **(** :ref:`StringName` name **)** |const| + +Returns ``true`` if there is a local override for a theme :ref:`Font` with the specified ``name`` in this **Control** node. See :ref:`add_theme_font_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_font_size: -- :ref:`bool` **has_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| 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``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_font_size_override: -- :ref:`bool` **has_theme_font_size_override** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this ``Control`` node. +:ref:`bool` **has_theme_font_size_override** **(** :ref:`StringName` name **)** |const| + +Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this **Control** node. See :ref:`add_theme_font_size_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_icon: -- :ref:`bool` **has_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if there is a matching :ref:`Theme` in the tree that has an icon item with the specified ``name`` and ``theme_type``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_icon_override: -- :ref:`bool` **has_theme_icon_override** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this ``Control`` node. +:ref:`bool` **has_theme_icon_override** **(** :ref:`StringName` name **)** |const| + +Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this **Control** node. See :ref:`add_theme_icon_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_stylebox: -- :ref:`bool` **has_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a stylebox item with the specified ``name`` and ``theme_type``. See :ref:`get_theme_color` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_has_theme_stylebox_override: -- :ref:`bool` **has_theme_stylebox_override** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method -Returns ``true`` if there is a local override for a theme :ref:`StyleBox` with the specified ``name`` in this ``Control`` node. +:ref:`bool` **has_theme_stylebox_override** **(** :ref:`StringName` name **)** |const| + +Returns ``true`` if there is a local override for a theme :ref:`StyleBox` with the specified ``name`` in this **Control** node. See :ref:`add_theme_stylebox_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_is_drag_successful: -- :ref:`bool` **is_drag_successful** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_drag_successful** **(** **)** |const| Returns ``true`` if a drag operation is successful. Alternative to :ref:`Viewport.gui_is_drag_successful`. Best used with :ref:`Node.NOTIFICATION_DRAG_END`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_is_layout_rtl: -- :ref:`bool` **is_layout_rtl** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_layout_rtl** **(** **)** |const| Returns ``true`` if layout is right-to-left. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_release_focus: -- void **release_focus** **(** **)** +.. rst-class:: classref-method + +void **release_focus** **(** **)** Give up the focus. No other control will be able to receive input. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_remove_theme_color_override: -- void **remove_theme_color_override** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_theme_color_override** **(** :ref:`StringName` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_remove_theme_constant_override: -- void **remove_theme_constant_override** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_theme_constant_override** **(** :ref:`StringName` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_remove_theme_font_override: -- void **remove_theme_font_override** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_theme_font_override** **(** :ref:`StringName` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_remove_theme_font_size_override: -- void **remove_theme_font_size_override** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_theme_font_size_override** **(** :ref:`StringName` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_remove_theme_icon_override: -- void **remove_theme_icon_override** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_theme_icon_override** **(** :ref:`StringName` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_remove_theme_stylebox_override: -- void **remove_theme_stylebox_override** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_theme_stylebox_override** **(** :ref:`StringName` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_reset_size: -- void **reset_size** **(** **)** +.. rst-class:: classref-method + +void **reset_size** **(** **)** Resets the size to :ref:`get_combined_minimum_size`. This is equivalent to calling ``set_size(Vector2())`` (or any size below the minimum). +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_anchor: -- void **set_anchor** **(** :ref:`Side` side, :ref:`float` anchor, :ref:`bool` keep_offset=false, :ref:`bool` push_opposite_anchor=true **)** +.. rst-class:: classref-method + +void **set_anchor** **(** :ref:`Side` side, :ref:`float` anchor, :ref:`bool` keep_offset=false, :ref:`bool` push_opposite_anchor=true **)** 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`. @@ -2293,45 +3016,65 @@ If ``keep_offset`` is ``true``, offsets aren't updated after this operation. If ``push_opposite_anchor`` is ``true`` and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If ``push_opposite_anchor`` was ``false``, the left anchor would get value 0.5. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_anchor_and_offset: -- void **set_anchor_and_offset** **(** :ref:`Side` side, :ref:`float` anchor, :ref:`float` offset, :ref:`bool` push_opposite_anchor=false **)** +.. rst-class:: classref-method + +void **set_anchor_and_offset** **(** :ref:`Side` side, :ref:`float` anchor, :ref:`float` offset, :ref:`bool` push_opposite_anchor=false **)** 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`). +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_anchors_and_offsets_preset: -- void **set_anchors_and_offsets_preset** **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** +.. rst-class:: classref-method + +void **set_anchors_and_offsets_preset** **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** Sets both anchor preset and offset preset. See :ref:`set_anchors_preset` and :ref:`set_offsets_preset`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_anchors_preset: -- void **set_anchors_preset** **(** :ref:`LayoutPreset` preset, :ref:`bool` keep_offsets=false **)** +.. rst-class:: classref-method + +void **set_anchors_preset** **(** :ref:`LayoutPreset` preset, :ref:`bool` keep_offsets=false **)** Sets the anchors to a ``preset`` from :ref:`LayoutPreset` enum. This is the code equivalent to using the Layout menu in the 2D editor. If ``keep_offsets`` is ``true``, control's position will also be updated. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_begin: -- void **set_begin** **(** :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_begin** **(** :ref:`Vector2` position **)** Sets :ref:`offset_left` and :ref:`offset_top` at the same time. Equivalent of changing :ref:`position`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_drag_forwarding: -- void **set_drag_forwarding** **(** :ref:`Object` target **)** +.. rst-class:: classref-method + +void **set_drag_forwarding** **(** :ref:`Object` target **)** Forwards the handling of this control's drag and drop to ``target`` object. @@ -2401,11 +3144,15 @@ Forwarding can be implemented in the target object similar to the methods :ref:` +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_drag_preview: -- void **set_drag_preview** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **set_drag_preview** **(** :ref:`Control` control **)** 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. @@ -2441,87 +3188,123 @@ Shows the given control at the mouse pointer. A good time to call this method is +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_end: -- void **set_end** **(** :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_end** **(** :ref:`Vector2` position **)** Sets :ref:`offset_right` and :ref:`offset_bottom` at the same time. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_focus_neighbor: -- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** +.. rst-class:: classref-method -Sets the anchor 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`. +void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** + +Sets the anchor 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`. + +.. rst-class:: classref-item-separator ---- .. _class_Control_method_set_global_position: -- void **set_global_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** +.. rst-class:: classref-method + +void **set_global_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** Sets the :ref:`global_position` to given ``position``. If ``keep_offsets`` is ``true``, control's anchors will be updated instead of offsets. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_offset: -- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** +.. rst-class:: classref-method + +void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_offsets_preset: -- void **set_offsets_preset** **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** +.. rst-class:: classref-method + +void **set_offsets_preset** **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** Sets the offsets to a ``preset`` from :ref:`LayoutPreset` enum. This is the code equivalent to using the Layout menu in the 2D editor. -Use parameter ``resize_mode`` with constants from :ref:`LayoutPresetMode` to better determine the resulting size of the ``Control``. Constant size will be ignored if used with presets that change size, e.g. :ref:`PRESET_LEFT_WIDE`. +Use parameter ``resize_mode`` with constants from :ref:`LayoutPresetMode` to better determine the resulting size of the **Control**. Constant size will be ignored if used with presets that change size, e.g. :ref:`PRESET_LEFT_WIDE`. -Use parameter ``margin`` to determine the gap between the ``Control`` and the edges. +Use parameter ``margin`` to determine the gap between the **Control** and the edges. + +.. rst-class:: classref-item-separator ---- .. _class_Control_method_set_position: -- void **set_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** +.. rst-class:: classref-method + +void **set_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** Sets the :ref:`position` to given ``position``. If ``keep_offsets`` is ``true``, control's anchors will be updated instead of offsets. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_set_size: -- void **set_size** **(** :ref:`Vector2` size, :ref:`bool` keep_offsets=false **)** +.. rst-class:: classref-method + +void **set_size** **(** :ref:`Vector2` size, :ref:`bool` keep_offsets=false **)** Sets the size (see :ref:`size`). If ``keep_offsets`` is ``true``, control's anchors will be updated instead of offsets. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_update_minimum_size: -- void **update_minimum_size** **(** **)** +.. rst-class:: classref-method + +void **update_minimum_size** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Control_method_warp_mouse: -- void **warp_mouse** **(** :ref:`Vector2` position **)** +.. rst-class:: classref-method -Moves the mouse cursor to ``position``, relative to :ref:`position` of this ``Control``. +void **warp_mouse** **(** :ref:`Vector2` position **)** + +Moves the mouse cursor to ``position``, relative to :ref:`position` of this **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.)` diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 92a34968a..6177f19fe 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -14,52 +14,77 @@ ConvexPolygonShape2D Convex polygon shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- 2D convex polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). See also :ref:`CollisionPolygon2D`. -The main difference between a ``ConvexPolygonShape2D`` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. +The main difference between a **ConvexPolygonShape2D** and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. -\ **Performance:** ``ConvexPolygonShape2D`` is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. +\ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`points` | ``PackedVector2Array()`` | -+-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`points` | ``PackedVector2Array()`` | + +-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_cloud` **(** :ref:`PackedVector2Array` point_cloud **)** | -+------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_cloud` **(** :ref:`PackedVector2Array` point_cloud **)** | + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ConvexPolygonShape2D_property_points: -- :ref:`PackedVector2Array` **points** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_points(value) | -+-----------+--------------------------+ -| *Getter* | get_points() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **points** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_points** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_points** **(** **)** The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use :ref:`set_point_cloud` to generate a convex hull shape from concave shape points. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ConvexPolygonShape2D_method_set_point_cloud: -- void **set_point_cloud** **(** :ref:`PackedVector2Array` point_cloud **)** +.. rst-class:: classref-method + +void **set_point_cloud** **(** :ref:`PackedVector2Array` point_cloud **)** Based on the set of points provided, this creates and assigns the :ref:`points` property using the convex hull algorithm. Removing all unneeded points. See :ref:`Geometry2D.convex_hull` for details. diff --git a/classes/class_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index 9a63e125c..0e3db7538 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -14,41 +14,55 @@ ConvexPolygonShape3D Convex polygon shape resource for 3D physics. +.. rst-class:: classref-introduction-group + Description ----------- -3D convex polygon shape resource to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. Unlike :ref:`ConcavePolygonShape3D`, ``ConvexPolygonShape3D`` cannot store concave polygon shapes. :ref:`ConvexPolygonShape2D`\ s can be manually drawn in the editor using the :ref:`CollisionPolygon3D` node. +3D convex polygon shape resource to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. Unlike :ref:`ConcavePolygonShape3D`, **ConvexPolygonShape3D** cannot store concave polygon shapes. :ref:`ConvexPolygonShape2D`\ s can be manually drawn in the editor using the :ref:`CollisionPolygon3D` node. -\ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* ``ConvexPolygonShape3D``\ s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the :ref:`MeshInstance3D`, going to the **Mesh** menu and choosing **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. +\ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* **ConvexPolygonShape3D**\ s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the :ref:`MeshInstance3D`, going to the **Mesh** menu and choosing **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. -\ **Performance:** ``ConvexPolygonShape3D`` is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. +\ **Performance:** **ConvexPolygonShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. + +.. rst-class:: classref-introduction-group Tutorials --------- - `3D Physics Tests Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ -| :ref:`PackedVector3Array` | :ref:`points` | ``PackedVector3Array()`` | -+-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array` | :ref:`points` | ``PackedVector3Array()`` | + +-----------------------------------------------------+-----------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ConvexPolygonShape3D_property_points: -- :ref:`PackedVector3Array` **points** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector3Array()`` | -+-----------+--------------------------+ -| *Setter* | set_points(value) | -+-----------+--------------------------+ -| *Getter* | get_points() | -+-----------+--------------------------+ +:ref:`PackedVector3Array` **points** = ``PackedVector3Array()`` + +.. rst-class:: classref-property-setget + +- void **set_points** **(** :ref:`PackedVector3Array` value **)** +- :ref:`PackedVector3Array` **get_points** **(** **)** The list of 3D points forming the convex polygon shape. diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index bcffbc23d..2318dfdcf 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -14,6 +14,8 @@ CPUParticles2D CPU-based 2D particle emitter. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,1383 +23,1674 @@ CPU-based 2D particle node used to create a variety of particle systems and effe See also :ref:`GPUParticles2D`, which provides the same functionality with hardware acceleration, but may not run on older devices. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Particle systems (2D) <../tutorials/2d/particle_systems_2d>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :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:`Vector2` | :ref:`direction` | ``Vector2(1, 0)`` | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedColorArray` | :ref:`emission_colors` | | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedVector2Array` | :ref:`emission_normals` | | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedVector2Array` | :ref:`emission_points` | | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`emission_rect_extents` | | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :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:`bool` | :ref:`fract_delta` | ``true`` | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`gravity` | ``Vector2(0, 980)`` | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :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:`bool` | :ref:`one_shot` | ``false`` | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Curve` | :ref:`orbit_velocity_curve` | | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`orbit_velocity_max` | ``0.0`` | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`orbit_velocity_min` | ``0.0`` | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`particle_flag_align_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:`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:`Texture2D` | :ref:`texture` | | -+---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ +.. 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:`Vector2` | :ref:`direction` | ``Vector2(1, 0)`` | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedColorArray` | :ref:`emission_colors` | | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedVector2Array` | :ref:`emission_normals` | | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedVector2Array` | :ref:`emission_points` | | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`emission_rect_extents` | | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :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:`bool` | :ref:`fract_delta` | ``true`` | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`gravity` | ``Vector2(0, 980)`` | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :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:`bool` | :ref:`one_shot` | ``false`` | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Curve` | :ref:`orbit_velocity_curve` | | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`orbit_velocity_max` | ``0.0`` | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`orbit_velocity_min` | ``0.0`` | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`particle_flag_align_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:`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:`Texture2D` | :ref:`texture` | | + +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CPUParticles2D_DrawOrder: -.. _class_CPUParticles2D_constant_DRAW_ORDER_INDEX: - -.. _class_CPUParticles2D_constant_DRAW_ORDER_LIFETIME: +.. rst-class:: classref-enumeration enum **DrawOrder**: -- **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted. +.. _class_CPUParticles2D_constant_DRAW_ORDER_INDEX: -- **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime. +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_INDEX** = ``0`` + +Particles are drawn in the order emitted. + +.. _class_CPUParticles2D_constant_DRAW_ORDER_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` + +Particles are drawn in order of remaining lifetime. + +.. rst-class:: classref-item-separator ---- .. _enum_CPUParticles2D_Parameter: -.. _class_CPUParticles2D_constant_PARAM_INITIAL_LINEAR_VELOCITY: - -.. _class_CPUParticles2D_constant_PARAM_ANGULAR_VELOCITY: - -.. _class_CPUParticles2D_constant_PARAM_ORBIT_VELOCITY: - -.. _class_CPUParticles2D_constant_PARAM_LINEAR_ACCEL: - -.. _class_CPUParticles2D_constant_PARAM_RADIAL_ACCEL: - -.. _class_CPUParticles2D_constant_PARAM_TANGENTIAL_ACCEL: - -.. _class_CPUParticles2D_constant_PARAM_DAMPING: - -.. _class_CPUParticles2D_constant_PARAM_ANGLE: - -.. _class_CPUParticles2D_constant_PARAM_SCALE: - -.. _class_CPUParticles2D_constant_PARAM_HUE_VARIATION: - -.. _class_CPUParticles2D_constant_PARAM_ANIM_SPEED: - -.. _class_CPUParticles2D_constant_PARAM_ANIM_OFFSET: - -.. _class_CPUParticles2D_constant_PARAM_MAX: +.. rst-class:: classref-enumeration enum **Parameter**: -- **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. +.. _class_CPUParticles2D_constant_PARAM_INITIAL_LINEAR_VELOCITY: -- **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. +:ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -- **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. -- **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. +.. _class_CPUParticles2D_constant_PARAM_ANGULAR_VELOCITY: -- **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_DAMPING** = **6** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. +:ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -- **PARAM_ANGLE** = **7** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. -- **PARAM_SCALE** = **8** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. +.. _class_CPUParticles2D_constant_PARAM_ORBIT_VELOCITY: -- **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. +:ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -- **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. -- **PARAM_MAX** = **12** --- Represents the size of the :ref:`Parameter` enum. +.. _class_CPUParticles2D_constant_PARAM_LINEAR_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. + +.. _class_CPUParticles2D_constant_PARAM_RADIAL_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. + +.. _class_CPUParticles2D_constant_PARAM_TANGENTIAL_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. + +.. _class_CPUParticles2D_constant_PARAM_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_DAMPING** = ``6`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. + +.. _class_CPUParticles2D_constant_PARAM_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANGLE** = ``7`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. + +.. _class_CPUParticles2D_constant_PARAM_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_SCALE** = ``8`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. + +.. _class_CPUParticles2D_constant_PARAM_HUE_VARIATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. + +.. _class_CPUParticles2D_constant_PARAM_ANIM_SPEED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. + +.. _class_CPUParticles2D_constant_PARAM_ANIM_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. + +.. _class_CPUParticles2D_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_MAX** = ``12`` + +Represents the size of the :ref:`Parameter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_CPUParticles2D_ParticleFlags: -.. _class_CPUParticles2D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: - -.. _class_CPUParticles2D_constant_PARTICLE_FLAG_ROTATE_Y: - -.. _class_CPUParticles2D_constant_PARTICLE_FLAG_DISABLE_Z: - -.. _class_CPUParticles2D_constant_PARTICLE_FLAG_MAX: +.. rst-class:: classref-enumeration enum **ParticleFlags**: -- **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +.. _class_CPUParticles2D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: -- **PARTICLE_FLAG_ROTATE_Y** = **1** --- Present for consistency with 3D particle nodes, not used in 2D. +.. rst-class:: classref-enumeration-constant -- **PARTICLE_FLAG_DISABLE_Z** = **2** --- Present for consistency with 3D particle nodes, not used in 2D. +:ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -- **PARTICLE_FLAG_MAX** = **3** --- Represents the size of the :ref:`ParticleFlags` enum. +Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. + +.. _class_CPUParticles2D_constant_PARTICLE_FLAG_ROTATE_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_ROTATE_Y** = ``1`` + +Present for consistency with 3D particle nodes, not used in 2D. + +.. _class_CPUParticles2D_constant_PARTICLE_FLAG_DISABLE_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_DISABLE_Z** = ``2`` + +Present for consistency with 3D particle nodes, not used in 2D. + +.. _class_CPUParticles2D_constant_PARTICLE_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_MAX** = ``3`` + +Represents the size of the :ref:`ParticleFlags` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_CPUParticles2D_EmissionShape: -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINT: - -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE: - -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE_SURFACE: - -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE: - -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS: - -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS: - -.. _class_CPUParticles2D_constant_EMISSION_SHAPE_MAX: +.. rst-class:: classref-enumeration enum **EmissionShape**: -- **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINT: -- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere flattened to two dimensions. +.. rst-class:: classref-enumeration-constant -- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere flattened to two dimensions. +:ref:`EmissionShape` **EMISSION_SHAPE_POINT** = ``0`` -- **EMISSION_SHAPE_RECTANGLE** = **3** --- Particles will be emitted in the area of a rectangle. +All particles will be emitted from a single point. -- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE: -- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. +.. rst-class:: classref-enumeration-constant -- **EMISSION_SHAPE_MAX** = **6** --- Represents the size of the :ref:`EmissionShape` enum. +:ref:`EmissionShape` **EMISSION_SHAPE_SPHERE** = ``1`` + +Particles will be emitted in the volume of a sphere flattened to two dimensions. + +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE_SURFACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_SPHERE_SURFACE** = ``2`` + +Particles will be emitted on the surface of a sphere flattened to two dimensions. + +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_RECTANGLE** = ``3`` + +Particles will be emitted in the area of a rectangle. + +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_POINTS** = ``4`` + +Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. + +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_DIRECTED_POINTS** = ``5`` + +Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. + +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_MAX** = ``6`` + +Represents the size of the :ref:`EmissionShape` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CPUParticles2D_property_amount: -- :ref:`int` **amount** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``8`` | -+-----------+-------------------+ -| *Setter* | set_amount(value) | -+-----------+-------------------+ -| *Getter* | get_amount() | -+-----------+-------------------+ +:ref:`int` **amount** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_amount** **(** :ref:`int` value **)** +- :ref:`int` **get_amount** **(** **)** Number of particles emitted in one emission cycle. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_angle_curve: -- :ref:`Curve` **angle_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **angle_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's rotation will be animated along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_angle_max: -- :ref:`float` **angle_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **angle_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial rotation applied to each particle, in degrees. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_angle_min: -- :ref:`float` **angle_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **angle_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`angle_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_angular_velocity_curve: -- :ref:`Curve` **angular_velocity_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **angular_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's angular velocity will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_angular_velocity_max: -- :ref:`float` **angular_velocity_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **angular_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_angular_velocity_min: -- :ref:`float` **angular_velocity_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **angular_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`angular_velocity_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_anim_offset_curve: -- :ref:`Curve` **anim_offset_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **anim_offset_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's animation offset will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_anim_offset_max: -- :ref:`float` **anim_offset_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **anim_offset_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |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`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_anim_offset_min: -- :ref:`float` **anim_offset_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **anim_offset_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`anim_offset_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_anim_speed_curve: -- :ref:`Curve` **anim_speed_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **anim_speed_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's animation speed will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_anim_speed_max: -- :ref:`float` **anim_speed_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **anim_speed_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |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. With animation speed greater than ``1``, remember to enable :ref:`CanvasItemMaterial.particles_anim_loop` property if you want the animation to repeat. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_anim_speed_min: -- :ref:`float` **anim_speed_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **anim_speed_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`anim_speed_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** Each particle's initial color. If :ref:`texture` is defined, it will be multiplied by this color. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_color_initial_ramp: -- :ref:`Gradient` **color_initial_ramp** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_color_initial_ramp(value) | -+----------+-------------------------------+ -| *Getter* | get_color_initial_ramp() | -+----------+-------------------------------+ +:ref:`Gradient` **color_initial_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_initial_ramp** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_color_initial_ramp** **(** **)** Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_color_ramp: -- :ref:`Gradient` **color_ramp** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_color_ramp(value) | -+----------+-----------------------+ -| *Getter* | get_color_ramp() | -+----------+-----------------------+ +:ref:`Gradient` **color_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_ramp** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_color_ramp** **(** **)** Each particle's color will vary along this :ref:`Gradient` (multiplied with :ref:`color`). +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_damping_curve: -- :ref:`Curve` **damping_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **damping_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Damping will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_damping_max: -- :ref:`float` **damping_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **damping_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_damping_min: -- :ref:`float` **damping_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **damping_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`damping_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_direction: -- :ref:`Vector2` **direction** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2(1, 0)`` | -+-----------+----------------------+ -| *Setter* | set_direction(value) | -+-----------+----------------------+ -| *Getter* | get_direction() | -+-----------+----------------------+ +:ref:`Vector2` **direction** = ``Vector2(1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_direction** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_direction** **(** **)** Unit vector specifying the particles' emission direction. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_draw_order: -- :ref:`DrawOrder` **draw_order** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_draw_order(value) | -+-----------+-----------------------+ -| *Getter* | get_draw_order() | -+-----------+-----------------------+ +:ref:`DrawOrder` **draw_order** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_draw_order** **(** :ref:`DrawOrder` value **)** +- :ref:`DrawOrder` **get_draw_order** **(** **)** Particle draw order. Uses :ref:`DrawOrder` values. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_emission_colors: -- :ref:`PackedColorArray` **emission_colors** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_emission_colors(value) | -+----------+----------------------------+ -| *Getter* | get_emission_colors() | -+----------+----------------------------+ +:ref:`PackedColorArray` **emission_colors** + +.. rst-class:: classref-property-setget + +- void **set_emission_colors** **(** :ref:`PackedColorArray` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_emission_normals: -- :ref:`PackedVector2Array` **emission_normals** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_emission_normals(value) | -+----------+-----------------------------+ -| *Getter* | get_emission_normals() | -+----------+-----------------------------+ +:ref:`PackedVector2Array` **emission_normals** + +.. rst-class:: classref-property-setget + +- void **set_emission_normals** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_emission_normals** **(** **)** Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_emission_points: -- :ref:`PackedVector2Array` **emission_points** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_emission_points(value) | -+----------+----------------------------+ -| *Getter* | get_emission_points() | -+----------+----------------------------+ +:ref:`PackedVector2Array` **emission_points** + +.. rst-class:: classref-property-setget + +- void **set_emission_points** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_emission_points** **(** **)** Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_emission_rect_extents: -- :ref:`Vector2` **emission_rect_extents** +.. rst-class:: classref-property -+----------+----------------------------------+ -| *Setter* | set_emission_rect_extents(value) | -+----------+----------------------------------+ -| *Getter* | get_emission_rect_extents() | -+----------+----------------------------------+ +:ref:`Vector2` **emission_rect_extents** + +.. rst-class:: classref-property-setget + +- void **set_emission_rect_extents** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_emission_rect_extents** **(** **)** The rectangle's extents if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_RECTANGLE`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_emission_shape: -- :ref:`EmissionShape` **emission_shape** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_emission_shape(value) | -+-----------+---------------------------+ -| *Getter* | get_emission_shape() | -+-----------+---------------------------+ +:ref:`EmissionShape` **emission_shape** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_shape** **(** :ref:`EmissionShape` value **)** +- :ref:`EmissionShape` **get_emission_shape** **(** **)** Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_emission_sphere_radius: -- :ref:`float` **emission_sphere_radius** +.. rst-class:: classref-property -+----------+-----------------------------------+ -| *Setter* | set_emission_sphere_radius(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_sphere_radius() | -+----------+-----------------------------------+ +:ref:`float` **emission_sphere_radius** + +.. rst-class:: classref-property-setget + +- void **set_emission_sphere_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_sphere_radius** **(** **)** The sphere's radius if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_SPHERE`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_emitting: -- :ref:`bool` **emitting** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_emitting(value) | -+-----------+---------------------+ -| *Getter* | is_emitting() | -+-----------+---------------------+ +:ref:`bool` **emitting** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_emitting** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emitting** **(** **)** If ``true``, particles are being emitted. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_explosiveness: -- :ref:`float` **explosiveness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_explosiveness_ratio(value) | -+-----------+--------------------------------+ -| *Getter* | get_explosiveness_ratio() | -+-----------+--------------------------------+ +:ref:`float` **explosiveness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_explosiveness_ratio** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_fixed_fps: -- :ref:`int` **fixed_fps** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_fixed_fps(value) | -+-----------+----------------------+ -| *Getter* | get_fixed_fps() | -+-----------+----------------------+ +:ref:`int` **fixed_fps** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_fps** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_fract_delta: -- :ref:`bool` **fract_delta** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_fractional_delta(value) | -+-----------+-----------------------------+ -| *Getter* | get_fractional_delta() | -+-----------+-----------------------------+ +:ref:`bool` **fract_delta** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_fractional_delta** **(** :ref:`bool` value **)** +- :ref:`bool` **get_fractional_delta** **(** **)** If ``true``, results in fractional delta calculation which has a smoother particles display effect. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_gravity: -- :ref:`Vector2` **gravity** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 980)`` | -+-----------+---------------------+ -| *Setter* | set_gravity(value) | -+-----------+---------------------+ -| *Getter* | get_gravity() | -+-----------+---------------------+ +:ref:`Vector2` **gravity** = ``Vector2(0, 980)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_gravity** **(** **)** Gravity applied to every particle. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_hue_variation_curve: -- :ref:`Curve` **hue_variation_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **hue_variation_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's hue will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_hue_variation_max: -- :ref:`float` **hue_variation_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **hue_variation_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial hue variation applied to each particle. It will shift the particle color's hue. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_hue_variation_min: -- :ref:`float` **hue_variation_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **hue_variation_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`hue_variation_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_initial_velocity_max: -- :ref:`float` **initial_velocity_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **initial_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial velocity magnitude for each particle. Direction comes from :ref:`direction` and :ref:`spread`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_initial_velocity_min: -- :ref:`float` **initial_velocity_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **initial_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`initial_velocity_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_lifetime: -- :ref:`float` **lifetime** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_lifetime(value) | -+-----------+---------------------+ -| *Getter* | get_lifetime() | -+-----------+---------------------+ +:ref:`float` **lifetime** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_lifetime** **(** :ref:`float` value **)** +- :ref:`float` **get_lifetime** **(** **)** Amount of time each particle will exist. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_lifetime_randomness: -- :ref:`float` **lifetime_randomness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_lifetime_randomness(value) | -+-----------+--------------------------------+ -| *Getter* | get_lifetime_randomness() | -+-----------+--------------------------------+ +:ref:`float` **lifetime_randomness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_lifetime_randomness** **(** :ref:`float` value **)** +- :ref:`float` **get_lifetime_randomness** **(** **)** Particle lifetime randomness ratio. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_linear_accel_curve: -- :ref:`Curve` **linear_accel_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **linear_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's linear acceleration will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_linear_accel_max: -- :ref:`float` **linear_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **linear_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum linear acceleration applied to each particle in the direction of motion. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_linear_accel_min: -- :ref:`float` **linear_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **linear_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`linear_accel_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_local_coords: -- :ref:`bool` **local_coords** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_local_coordinates(value) | -+-----------+----------------------------------+ -| *Getter* | get_use_local_coordinates() | -+-----------+----------------------------------+ +:ref:`bool` **local_coords** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_use_local_coordinates** **(** :ref:`bool` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CPUParticles2D_property_one_shot: -- :ref:`bool` **one_shot** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_one_shot(value) | -+-----------+---------------------+ -| *Getter* | get_one_shot() | -+-----------+---------------------+ +:ref:`bool` **one_shot** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_one_shot** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_orbit_velocity_curve: -- :ref:`Curve` **orbit_velocity_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **orbit_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's orbital velocity will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_orbit_velocity_max: -- :ref:`float` **orbit_velocity_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **orbit_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_orbit_velocity_min: -- :ref:`float` **orbit_velocity_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **orbit_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`orbit_velocity_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_particle_flag_align_y: -- :ref:`bool` **particle_flag_align_y** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ +:ref:`bool` **particle_flag_align_y** = ``false`` + +.. 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| Align Y axis of particle with the direction of its velocity. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_preprocess: -- :ref:`float` **preprocess** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_pre_process_time(value) | -+-----------+-----------------------------+ -| *Getter* | get_pre_process_time() | -+-----------+-----------------------------+ +:ref:`float` **preprocess** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pre_process_time** **(** :ref:`float` value **)** +- :ref:`float` **get_pre_process_time** **(** **)** Particle system starts as if it had already run for this many seconds. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_radial_accel_curve: -- :ref:`Curve` **radial_accel_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **radial_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's radial acceleration will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_radial_accel_max: -- :ref:`float` **radial_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **radial_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_radial_accel_min: -- :ref:`float` **radial_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **radial_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`radial_accel_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_randomness: -- :ref:`float` **randomness** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_randomness_ratio(value) | -+-----------+-----------------------------+ -| *Getter* | get_randomness_ratio() | -+-----------+-----------------------------+ +:ref:`float` **randomness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_randomness_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_randomness_ratio** **(** **)** Emission lifetime randomness ratio. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_scale_amount_curve: -- :ref:`Curve` **scale_amount_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **scale_amount_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's scale will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_scale_amount_max: -- :ref:`float` **scale_amount_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **scale_amount_max** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial scale applied to each particle. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_scale_amount_min: -- :ref:`float` **scale_amount_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **scale_amount_min** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`scale_amount_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_scale_curve_x: -- :ref:`Curve` **scale_curve_x** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_scale_curve_x(value) | -+----------+--------------------------+ -| *Getter* | get_scale_curve_x() | -+----------+--------------------------+ +:ref:`Curve` **scale_curve_x** + +.. rst-class:: classref-property-setget + +- void **set_scale_curve_x** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_scale_curve_x** **(** **)** Each particle's horizontal scale will vary along this :ref:`Curve`. \ :ref:`split_scale` must be enabled. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_scale_curve_y: -- :ref:`Curve` **scale_curve_y** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_scale_curve_y(value) | -+----------+--------------------------+ -| *Getter* | get_scale_curve_y() | -+----------+--------------------------+ +:ref:`Curve` **scale_curve_y** + +.. rst-class:: classref-property-setget + +- void **set_scale_curve_y** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_scale_curve_y** **(** **)** Each particle's vertical scale will vary along this :ref:`Curve`. \ :ref:`split_scale` must be enabled. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_speed_scale: -- :ref:`float` **speed_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_speed_scale** **(** **)** Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_split_scale: -- :ref:`bool` **split_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_split_scale(value) | -+-----------+------------------------+ -| *Getter* | get_split_scale() | -+-----------+------------------------+ +:ref:`bool` **split_scale** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_split_scale** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_spread: -- :ref:`float` **spread** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``45.0`` | -+-----------+-------------------+ -| *Setter* | set_spread(value) | -+-----------+-------------------+ -| *Getter* | get_spread() | -+-----------+-------------------+ +:ref:`float` **spread** = ``45.0`` + +.. rst-class:: classref-property-setget + +- void **set_spread** **(** :ref:`float` value **)** +- :ref:`float` **get_spread** **(** **)** Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_tangential_accel_curve: -- :ref:`Curve` **tangential_accel_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **tangential_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's tangential acceleration will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_tangential_accel_max: -- :ref:`float` **tangential_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **tangential_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_tangential_accel_min: -- :ref:`float` **tangential_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **tangential_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`tangential_accel_max`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** Particle texture. If ``null``, particles will be squares. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CPUParticles2D_method_convert_from_particles: -- void **convert_from_particles** **(** :ref:`Node` particles **)** +.. rst-class:: classref-method + +void **convert_from_particles** **(** :ref:`Node` particles **)** Sets this node's properties to match a given :ref:`GPUParticles2D` node with an assigned :ref:`ParticleProcessMaterial`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_get_param_curve: -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Returns the :ref:`Curve` of the parameter specified by :ref:`Parameter`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_get_param_max: -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Returns the maximum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_get_param_min: -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Returns the minimum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_get_particle_flag: -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| Returns the enabled state of the given flag (see :ref:`ParticleFlags` for options). +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_restart: -- void **restart** **(** **)** +.. rst-class:: classref-method + +void **restart** **(** **)** Restarts the particle emitter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_set_param_curve: -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +.. rst-class:: classref-method + +void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_set_param_max: -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** Sets the maximum value for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_set_param_min: -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** Sets the minimum value for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles2D_method_set_particle_flag: -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** Enables or disables the given flag (see :ref:`ParticleFlags` for options). diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index 4cff50bd8..ab0b33cb6 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -14,6 +14,8 @@ CPUParticles3D CPU-based 3D particle emitter. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,1520 +23,1837 @@ 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-reftable-group + Properties ---------- -+---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ -| :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`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ +.. 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`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CPUParticles3D_DrawOrder: -.. _class_CPUParticles3D_constant_DRAW_ORDER_INDEX: - -.. _class_CPUParticles3D_constant_DRAW_ORDER_LIFETIME: - -.. _class_CPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: +.. rst-class:: classref-enumeration enum **DrawOrder**: -- **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted. +.. _class_CPUParticles3D_constant_DRAW_ORDER_INDEX: -- **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime. +.. rst-class:: classref-enumeration-constant -- **DRAW_ORDER_VIEW_DEPTH** = **2** --- Particles are drawn in order of depth. +:ref:`DrawOrder` **DRAW_ORDER_INDEX** = ``0`` + +Particles are drawn in the order emitted. + +.. _class_CPUParticles3D_constant_DRAW_ORDER_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` + +Particles are drawn in order of remaining lifetime. + +.. _class_CPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_VIEW_DEPTH** = ``2`` + +Particles are drawn in order of depth. + +.. rst-class:: classref-item-separator ---- .. _enum_CPUParticles3D_Parameter: -.. _class_CPUParticles3D_constant_PARAM_INITIAL_LINEAR_VELOCITY: - -.. _class_CPUParticles3D_constant_PARAM_ANGULAR_VELOCITY: - -.. _class_CPUParticles3D_constant_PARAM_ORBIT_VELOCITY: - -.. _class_CPUParticles3D_constant_PARAM_LINEAR_ACCEL: - -.. _class_CPUParticles3D_constant_PARAM_RADIAL_ACCEL: - -.. _class_CPUParticles3D_constant_PARAM_TANGENTIAL_ACCEL: - -.. _class_CPUParticles3D_constant_PARAM_DAMPING: - -.. _class_CPUParticles3D_constant_PARAM_ANGLE: - -.. _class_CPUParticles3D_constant_PARAM_SCALE: - -.. _class_CPUParticles3D_constant_PARAM_HUE_VARIATION: - -.. _class_CPUParticles3D_constant_PARAM_ANIM_SPEED: - -.. _class_CPUParticles3D_constant_PARAM_ANIM_OFFSET: - -.. _class_CPUParticles3D_constant_PARAM_MAX: +.. rst-class:: classref-enumeration enum **Parameter**: -- **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. +.. _class_CPUParticles3D_constant_PARAM_INITIAL_LINEAR_VELOCITY: -- **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. +:ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -- **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. -- **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. +.. _class_CPUParticles3D_constant_PARAM_ANGULAR_VELOCITY: -- **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_DAMPING** = **6** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. +:ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -- **PARAM_ANGLE** = **7** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. -- **PARAM_SCALE** = **8** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. +.. _class_CPUParticles3D_constant_PARAM_ORBIT_VELOCITY: -- **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. +:ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -- **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. -- **PARAM_MAX** = **12** --- Represents the size of the :ref:`Parameter` enum. +.. _class_CPUParticles3D_constant_PARAM_LINEAR_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. + +.. _class_CPUParticles3D_constant_PARAM_RADIAL_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. + +.. _class_CPUParticles3D_constant_PARAM_TANGENTIAL_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. + +.. _class_CPUParticles3D_constant_PARAM_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_DAMPING** = ``6`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. + +.. _class_CPUParticles3D_constant_PARAM_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANGLE** = ``7`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. + +.. _class_CPUParticles3D_constant_PARAM_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_SCALE** = ``8`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. + +.. _class_CPUParticles3D_constant_PARAM_HUE_VARIATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. + +.. _class_CPUParticles3D_constant_PARAM_ANIM_SPEED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. + +.. _class_CPUParticles3D_constant_PARAM_ANIM_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. + +.. _class_CPUParticles3D_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_MAX** = ``12`` + +Represents the size of the :ref:`Parameter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_CPUParticles3D_ParticleFlags: -.. _class_CPUParticles3D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: - -.. _class_CPUParticles3D_constant_PARTICLE_FLAG_ROTATE_Y: - -.. _class_CPUParticles3D_constant_PARTICLE_FLAG_DISABLE_Z: - -.. _class_CPUParticles3D_constant_PARTICLE_FLAG_MAX: +.. rst-class:: classref-enumeration enum **ParticleFlags**: -- **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +.. _class_CPUParticles3D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: -- **PARTICLE_FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. +.. rst-class:: classref-enumeration-constant -- **PARTICLE_FLAG_DISABLE_Z** = **2** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. +:ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -- **PARTICLE_FLAG_MAX** = **3** --- Represents the size of the :ref:`ParticleFlags` enum. +Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. + +.. _class_CPUParticles3D_constant_PARTICLE_FLAG_ROTATE_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_ROTATE_Y** = ``1`` + +Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. + +.. _class_CPUParticles3D_constant_PARTICLE_FLAG_DISABLE_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_DISABLE_Z** = ``2`` + +Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. + +.. _class_CPUParticles3D_constant_PARTICLE_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_MAX** = ``3`` + +Represents the size of the :ref:`ParticleFlags` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_CPUParticles3D_EmissionShape: -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_POINT: - -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_SPHERE: - -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_SPHERE_SURFACE: - -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_BOX: - -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_POINTS: - -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_DIRECTED_POINTS: - -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_RING: - -.. _class_CPUParticles3D_constant_EMISSION_SHAPE_MAX: +.. rst-class:: classref-enumeration enum **EmissionShape**: -- **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_POINT: -- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere. +.. rst-class:: classref-enumeration-constant -- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere. +:ref:`EmissionShape` **EMISSION_SHAPE_POINT** = ``0`` -- **EMISSION_SHAPE_BOX** = **3** --- Particles will be emitted in the volume of a box. +All particles will be emitted from a single point. -- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_SPHERE: -- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. +.. rst-class:: classref-enumeration-constant -- **EMISSION_SHAPE_RING** = **6** --- Particles will be emitted in a ring or cylinder. +:ref:`EmissionShape` **EMISSION_SHAPE_SPHERE** = ``1`` -- **EMISSION_SHAPE_MAX** = **7** --- Represents the size of the :ref:`EmissionShape` enum. +Particles will be emitted in the volume of a sphere. + +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_SPHERE_SURFACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_SPHERE_SURFACE** = ``2`` + +Particles will be emitted on the surface of a sphere. + +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_BOX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_BOX** = ``3`` + +Particles will be emitted in the volume of a box. + +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_POINTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_POINTS** = ``4`` + +Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. + +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_DIRECTED_POINTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_DIRECTED_POINTS** = ``5`` + +Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. + +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_RING: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_RING** = ``6`` + +Particles will be emitted in a ring or cylinder. + +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_MAX** = ``7`` + +Represents the size of the :ref:`EmissionShape` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CPUParticles3D_property_amount: -- :ref:`int` **amount** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``8`` | -+-----------+-------------------+ -| *Setter* | set_amount(value) | -+-----------+-------------------+ -| *Getter* | get_amount() | -+-----------+-------------------+ +:ref:`int` **amount** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_amount** **(** :ref:`int` value **)** +- :ref:`int` **get_amount** **(** **)** Number of particles emitted in one emission cycle. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_angle_curve: -- :ref:`Curve` **angle_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **angle_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's rotation will be animated along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_angle_max: -- :ref:`float` **angle_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **angle_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum angle. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_angle_min: -- :ref:`float` **angle_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **angle_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum angle. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_angular_velocity_curve: -- :ref:`Curve` **angular_velocity_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **angular_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's angular velocity (rotation speed) will vary along this :ref:`Curve` over its lifetime. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_angular_velocity_max: -- :ref:`float` **angular_velocity_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **angular_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_angular_velocity_min: -- :ref:`float` **angular_velocity_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **angular_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_anim_offset_curve: -- :ref:`Curve` **anim_offset_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **anim_offset_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's animation offset will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_anim_offset_max: -- :ref:`float` **anim_offset_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **anim_offset_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum animation offset. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_anim_offset_min: -- :ref:`float` **anim_offset_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **anim_offset_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum animation offset. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_anim_speed_curve: -- :ref:`Curve` **anim_speed_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **anim_speed_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's animation speed will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_anim_speed_max: -- :ref:`float` **anim_speed_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **anim_speed_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum particle animation speed. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_anim_speed_min: -- :ref:`float` **anim_speed_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **anim_speed_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum particle animation speed. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** Each particle's initial color. \ **Note:** :ref:`color` 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:`color` will have no visible effect. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_color_initial_ramp: -- :ref:`Gradient` **color_initial_ramp** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_color_initial_ramp(value) | -+----------+-------------------------------+ -| *Getter* | get_color_initial_ramp() | -+----------+-------------------------------+ +:ref:`Gradient` **color_initial_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_initial_ramp** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_color_initial_ramp** **(** **)** Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). \ **Note:** :ref:`color_initial_ramp` 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:`color_initial_ramp` will have no visible effect. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_color_ramp: -- :ref:`Gradient` **color_ramp** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_color_ramp(value) | -+----------+-----------------------+ -| *Getter* | get_color_ramp() | -+----------+-----------------------+ +:ref:`Gradient` **color_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_ramp** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_color_ramp** **(** **)** Each particle's color will vary along this :ref:`GradientTexture1D` over its lifetime (multiplied with :ref:`color`). \ **Note:** :ref:`color_ramp` 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:`color_ramp` will have no visible effect. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_damping_curve: -- :ref:`Curve` **damping_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **damping_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Damping will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_damping_max: -- :ref:`float` **damping_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **damping_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum damping. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_damping_min: -- :ref:`float` **damping_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **damping_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum damping +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_direction: -- :ref:`Vector3` **direction** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_direction(value) | -+-----------+----------------------+ -| *Getter* | get_direction() | -+-----------+----------------------+ +:ref:`Vector3` **direction** = ``Vector3(1, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_direction** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_direction** **(** **)** Unit vector specifying the particles' emission direction. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_draw_order: -- :ref:`DrawOrder` **draw_order** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_draw_order(value) | -+-----------+-----------------------+ -| *Getter* | get_draw_order() | -+-----------+-----------------------+ +:ref:`DrawOrder` **draw_order** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_draw_order** **(** :ref:`DrawOrder` value **)** +- :ref:`DrawOrder` **get_draw_order** **(** **)** Particle draw order. Uses :ref:`DrawOrder` values. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_box_extents: -- :ref:`Vector3` **emission_box_extents** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_emission_box_extents(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_box_extents() | -+----------+---------------------------------+ +:ref:`Vector3` **emission_box_extents** + +.. rst-class:: classref-property-setget + +- void **set_emission_box_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_emission_box_extents** **(** **)** The rectangle's extents if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_BOX`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_colors: -- :ref:`PackedColorArray` **emission_colors** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``PackedColorArray()`` | -+-----------+----------------------------+ -| *Setter* | set_emission_colors(value) | -+-----------+----------------------------+ -| *Getter* | get_emission_colors() | -+-----------+----------------------------+ +:ref:`PackedColorArray` **emission_colors** = ``PackedColorArray()`` + +.. rst-class:: classref-property-setget + +- void **set_emission_colors** **(** :ref:`PackedColorArray` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_normals: -- :ref:`PackedVector3Array` **emission_normals** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_emission_normals(value) | -+----------+-----------------------------+ -| *Getter* | get_emission_normals() | -+----------+-----------------------------+ +:ref:`PackedVector3Array` **emission_normals** + +.. rst-class:: classref-property-setget + +- void **set_emission_normals** **(** :ref:`PackedVector3Array` value **)** +- :ref:`PackedVector3Array` **get_emission_normals** **(** **)** Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_points: -- :ref:`PackedVector3Array` **emission_points** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_emission_points(value) | -+----------+----------------------------+ -| *Getter* | get_emission_points() | -+----------+----------------------------+ +:ref:`PackedVector3Array` **emission_points** + +.. rst-class:: classref-property-setget + +- void **set_emission_points** **(** :ref:`PackedVector3Array` value **)** +- :ref:`PackedVector3Array` **get_emission_points** **(** **)** Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_ring_axis: -- :ref:`Vector3` **emission_ring_axis** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_emission_ring_axis(value) | -+----------+-------------------------------+ -| *Getter* | get_emission_ring_axis() | -+----------+-------------------------------+ +:ref:`Vector3` **emission_ring_axis** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_axis** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_emission_ring_axis** **(** **)** The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_ring_height: -- :ref:`float` **emission_ring_height** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_emission_ring_height(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_ring_height() | -+----------+---------------------------------+ +:ref:`float` **emission_ring_height** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_height** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_ring_height** **(** **)** The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_ring_inner_radius: -- :ref:`float` **emission_ring_inner_radius** +.. rst-class:: classref-property -+----------+---------------------------------------+ -| *Setter* | set_emission_ring_inner_radius(value) | -+----------+---------------------------------------+ -| *Getter* | get_emission_ring_inner_radius() | -+----------+---------------------------------------+ +:ref:`float` **emission_ring_inner_radius** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_inner_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_ring_inner_radius** **(** **)** The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_ring_radius: -- :ref:`float` **emission_ring_radius** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_emission_ring_radius(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_ring_radius() | -+----------+---------------------------------+ +:ref:`float` **emission_ring_radius** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_ring_radius** **(** **)** The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_shape: -- :ref:`EmissionShape` **emission_shape** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_emission_shape(value) | -+-----------+---------------------------+ -| *Getter* | get_emission_shape() | -+-----------+---------------------------+ +:ref:`EmissionShape` **emission_shape** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_shape** **(** :ref:`EmissionShape` value **)** +- :ref:`EmissionShape` **get_emission_shape** **(** **)** Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emission_sphere_radius: -- :ref:`float` **emission_sphere_radius** +.. rst-class:: classref-property -+----------+-----------------------------------+ -| *Setter* | set_emission_sphere_radius(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_sphere_radius() | -+----------+-----------------------------------+ +:ref:`float` **emission_sphere_radius** + +.. rst-class:: classref-property-setget + +- void **set_emission_sphere_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_sphere_radius** **(** **)** The sphere's radius if :ref:`EmissionShape` is set to :ref:`EMISSION_SHAPE_SPHERE`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_emitting: -- :ref:`bool` **emitting** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_emitting(value) | -+-----------+---------------------+ -| *Getter* | is_emitting() | -+-----------+---------------------+ +:ref:`bool` **emitting** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_emitting** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emitting** **(** **)** If ``true``, particles are being emitted. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_explosiveness: -- :ref:`float` **explosiveness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_explosiveness_ratio(value) | -+-----------+--------------------------------+ -| *Getter* | get_explosiveness_ratio() | -+-----------+--------------------------------+ +:ref:`float` **explosiveness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_explosiveness_ratio** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_fixed_fps: -- :ref:`int` **fixed_fps** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_fixed_fps(value) | -+-----------+----------------------+ -| *Getter* | get_fixed_fps() | -+-----------+----------------------+ +:ref:`int` **fixed_fps** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_fps** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_flatness: -- :ref:`float` **flatness** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_flatness(value) | -+-----------+---------------------+ -| *Getter* | get_flatness() | -+-----------+---------------------+ +:ref:`float` **flatness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_flatness** **(** :ref:`float` value **)** +- :ref:`float` **get_flatness** **(** **)** Amount of :ref:`spread` in Y/Z plane. A value of ``1`` restricts particles to X/Z plane. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_fract_delta: -- :ref:`bool` **fract_delta** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_fractional_delta(value) | -+-----------+-----------------------------+ -| *Getter* | get_fractional_delta() | -+-----------+-----------------------------+ +:ref:`bool` **fract_delta** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_fractional_delta** **(** :ref:`bool` value **)** +- :ref:`bool` **get_fractional_delta** **(** **)** If ``true``, results in fractional delta calculation which has a smoother particles display effect. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_gravity: -- :ref:`Vector3` **gravity** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector3(0, -9.8, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_gravity(value) | -+-----------+-------------------------+ -| *Getter* | get_gravity() | -+-----------+-------------------------+ +:ref:`Vector3` **gravity** = ``Vector3(0, -9.8, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_gravity** **(** **)** Gravity applied to every particle. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_hue_variation_curve: -- :ref:`Curve` **hue_variation_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **hue_variation_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's hue will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_hue_variation_max: -- :ref:`float` **hue_variation_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **hue_variation_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum hue variation. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_hue_variation_min: -- :ref:`float` **hue_variation_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **hue_variation_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum hue variation. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_initial_velocity_max: -- :ref:`float` **initial_velocity_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **initial_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum value of the initial velocity. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_initial_velocity_min: -- :ref:`float` **initial_velocity_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **initial_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum value of the initial velocity. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_lifetime: -- :ref:`float` **lifetime** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_lifetime(value) | -+-----------+---------------------+ -| *Getter* | get_lifetime() | -+-----------+---------------------+ +:ref:`float` **lifetime** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_lifetime** **(** :ref:`float` value **)** +- :ref:`float` **get_lifetime** **(** **)** Amount of time each particle will exist. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_lifetime_randomness: -- :ref:`float` **lifetime_randomness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_lifetime_randomness(value) | -+-----------+--------------------------------+ -| *Getter* | get_lifetime_randomness() | -+-----------+--------------------------------+ +:ref:`float` **lifetime_randomness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_lifetime_randomness** **(** :ref:`float` value **)** +- :ref:`float` **get_lifetime_randomness** **(** **)** Particle lifetime randomness ratio. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_linear_accel_curve: -- :ref:`Curve` **linear_accel_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **linear_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's linear acceleration will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_linear_accel_max: -- :ref:`float` **linear_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **linear_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum linear acceleration. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_linear_accel_min: -- :ref:`float` **linear_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **linear_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum linear acceleration. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_local_coords: -- :ref:`bool` **local_coords** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_local_coordinates(value) | -+-----------+----------------------------------+ -| *Getter* | get_use_local_coordinates() | -+-----------+----------------------------------+ +:ref:`bool` **local_coords** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_use_local_coordinates** **(** :ref:`bool` value **)** +- :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. + +.. rst-class:: classref-item-separator ---- .. _class_CPUParticles3D_property_mesh: -- :ref:`Mesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`Mesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`Mesh` value **)** +- :ref:`Mesh` **get_mesh** **(** **)** The :ref:`Mesh` used for each particle. If ``null``, particles will be spheres. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_one_shot: -- :ref:`bool` **one_shot** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_one_shot(value) | -+-----------+---------------------+ -| *Getter* | get_one_shot() | -+-----------+---------------------+ +:ref:`bool` **one_shot** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_one_shot** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_orbit_velocity_curve: -- :ref:`Curve` **orbit_velocity_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **orbit_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's orbital velocity will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_orbit_velocity_max: -- :ref:`float` **orbit_velocity_max** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_param_max(value) | -+----------+----------------------+ -| *Getter* | get_param_max() | -+----------+----------------------+ +:ref:`float` **orbit_velocity_max** + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum orbit velocity. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_orbit_velocity_min: -- :ref:`float` **orbit_velocity_min** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_param_min(value) | -+----------+----------------------+ -| *Getter* | get_param_min() | -+----------+----------------------+ +:ref:`float` **orbit_velocity_min** + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum orbit velocity. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_particle_flag_align_y: -- :ref:`bool` **particle_flag_align_y** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ +:ref:`bool` **particle_flag_align_y** = ``false`` + +.. 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| Align Y axis of particle with the direction of its velocity. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_particle_flag_disable_z: -- :ref:`bool` **particle_flag_disable_z** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ +:ref:`bool` **particle_flag_disable_z** = ``false`` + +.. 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| If ``true``, particles will not move on the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_particle_flag_rotate_y: -- :ref:`bool` **particle_flag_rotate_y** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ +:ref:`bool` **particle_flag_rotate_y** = ``false`` + +.. 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| If ``true``, particles rotate around Y axis by :ref:`angle_min`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_preprocess: -- :ref:`float` **preprocess** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_pre_process_time(value) | -+-----------+-----------------------------+ -| *Getter* | get_pre_process_time() | -+-----------+-----------------------------+ +:ref:`float` **preprocess** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pre_process_time** **(** :ref:`float` value **)** +- :ref:`float` **get_pre_process_time** **(** **)** Particle system starts as if it had already run for this many seconds. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_radial_accel_curve: -- :ref:`Curve` **radial_accel_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **radial_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's radial acceleration will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_radial_accel_max: -- :ref:`float` **radial_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **radial_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum radial acceleration. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_radial_accel_min: -- :ref:`float` **radial_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **radial_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum radial acceleration. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_randomness: -- :ref:`float` **randomness** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_randomness_ratio(value) | -+-----------+-----------------------------+ -| *Getter* | get_randomness_ratio() | -+-----------+-----------------------------+ +:ref:`float` **randomness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_randomness_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_randomness_ratio** **(** **)** Emission lifetime randomness ratio. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_scale_amount_curve: -- :ref:`Curve` **scale_amount_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **scale_amount_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's scale will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_scale_amount_max: -- :ref:`float` **scale_amount_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **scale_amount_max** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum scale. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_scale_amount_min: -- :ref:`float` **scale_amount_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **scale_amount_min** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum scale. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_scale_curve_x: -- :ref:`Curve` **scale_curve_x** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_scale_curve_x(value) | -+----------+--------------------------+ -| *Getter* | get_scale_curve_x() | -+----------+--------------------------+ +:ref:`Curve` **scale_curve_x** + +.. rst-class:: classref-property-setget + +- void **set_scale_curve_x** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_scale_curve_x** **(** **)** Curve for the scale over life, along the x axis. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_scale_curve_y: -- :ref:`Curve` **scale_curve_y** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_scale_curve_y(value) | -+----------+--------------------------+ -| *Getter* | get_scale_curve_y() | -+----------+--------------------------+ +:ref:`Curve` **scale_curve_y** + +.. rst-class:: classref-property-setget + +- void **set_scale_curve_y** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_scale_curve_y** **(** **)** Curve for the scale over life, along the y axis. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_scale_curve_z: -- :ref:`Curve` **scale_curve_z** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_scale_curve_z(value) | -+----------+--------------------------+ -| *Getter* | get_scale_curve_z() | -+----------+--------------------------+ +:ref:`Curve` **scale_curve_z** + +.. rst-class:: classref-property-setget + +- void **set_scale_curve_z** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_scale_curve_z** **(** **)** Curve for the scale over life, along the z axis. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_speed_scale: -- :ref:`float` **speed_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_speed_scale** **(** **)** Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_split_scale: -- :ref:`bool` **split_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_split_scale(value) | -+-----------+------------------------+ -| *Getter* | get_split_scale() | -+-----------+------------------------+ +:ref:`bool` **split_scale** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_split_scale** **(** :ref:`bool` value **)** +- :ref:`bool` **get_split_scale** **(** **)** If set to true, three different scale curves can be specified, one per scale axis. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_spread: -- :ref:`float` **spread** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``45.0`` | -+-----------+-------------------+ -| *Setter* | set_spread(value) | -+-----------+-------------------+ -| *Getter* | get_spread() | -+-----------+-------------------+ +:ref:`float` **spread** = ``45.0`` + +.. rst-class:: classref-property-setget + +- void **set_spread** **(** :ref:`float` value **)** +- :ref:`float` **get_spread** **(** **)** Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. Applied to X/Z plane and Y/Z planes. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_tangential_accel_curve: -- :ref:`Curve` **tangential_accel_curve** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_param_curve(value) | -+----------+------------------------+ -| *Getter* | get_param_curve() | -+----------+------------------------+ +:ref:`Curve` **tangential_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Each particle's tangential acceleration will vary along this :ref:`Curve`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_tangential_accel_max: -- :ref:`float` **tangential_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **tangential_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum tangent acceleration. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_property_tangential_accel_min: -- :ref:`float` **tangential_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **tangential_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum tangent acceleration. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CPUParticles3D_method_convert_from_particles: -- void **convert_from_particles** **(** :ref:`Node` particles **)** +.. rst-class:: classref-method + +void **convert_from_particles** **(** :ref:`Node` particles **)** Sets this node's properties to match a given :ref:`GPUParticles3D` node with an assigned :ref:`ParticleProcessMaterial`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_get_param_curve: -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| Returns the :ref:`Curve` of the parameter specified by :ref:`Parameter`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_get_param_max: -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Returns the maximum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_get_param_min: -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Returns the minimum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_get_particle_flag: -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` for options). +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_restart: -- void **restart** **(** **)** +.. rst-class:: classref-method + +void **restart** **(** **)** Restarts the particle emitter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_set_param_curve: -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +.. rst-class:: classref-method + +void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_set_param_max: -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** Sets the maximum value for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_set_param_min: -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** Sets the minimum value for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_CPUParticles3D_method_set_particle_flag: -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** Enables or disables the given particle flag (see :ref:`ParticleFlags` for options). diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index 04200fd5a..cab9a9f16 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -14,6 +14,8 @@ Crypto Access to advanced cryptographic functionalities. +.. rst-class:: classref-introduction-group + Description ----------- @@ -88,81 +90,114 @@ For now, this includes generating cryptographically secure random bytes, RSA key +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :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 **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :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 **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Crypto_method_constant_time_compare: -- :ref:`bool` **constant_time_compare** **(** :ref:`PackedByteArray` trusted, :ref:`PackedByteArray` received **)** +.. rst-class:: classref-method + +:ref:`bool` **constant_time_compare** **(** :ref:`PackedByteArray` trusted, :ref:`PackedByteArray` received **)** Compares two :ref:`PackedByteArray`\ s for equality without leaking timing information in order to prevent timing attacks. See `this blog post `__ for more information. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_decrypt: -- :ref:`PackedByteArray` **decrypt** **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` ciphertext **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **decrypt** **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` ciphertext **)** Decrypt the given ``ciphertext`` with the provided private ``key``. \ **Note:** The maximum size of accepted ciphertext is limited by the key size. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_encrypt: -- :ref:`PackedByteArray` **encrypt** **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` plaintext **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **encrypt** **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` plaintext **)** Encrypt the given ``plaintext`` with the provided public ``key``. \ **Note:** The maximum size of accepted plaintext is limited by the key size. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_generate_random_bytes: -- :ref:`PackedByteArray` **generate_random_bytes** **(** :ref:`int` size **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **generate_random_bytes** **(** :ref:`int` size **)** Generates a :ref:`PackedByteArray` of cryptographically secure random bytes with given ``size``. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_generate_rsa: -- :ref:`CryptoKey` **generate_rsa** **(** :ref:`int` size **)** +.. rst-class:: classref-method + +:ref:`CryptoKey` **generate_rsa** **(** :ref:`int` size **)** Generates an RSA :ref:`CryptoKey` that can be used for creating self-signed certificates and passed to :ref:`StreamPeerTLS.accept_stream`. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_generate_self_signed_certificate: -- :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" **)** +.. 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" **)** 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). @@ -189,29 +224,41 @@ A small example to generate an RSA key and a X509 self-signed certificate. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_hmac_digest: -- :ref:`PackedByteArray` **hmac_digest** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key, :ref:`PackedByteArray` msg **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **hmac_digest** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key, :ref:`PackedByteArray` msg **)** 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. Currently, only :ref:`HashingContext.HASH_SHA256` and :ref:`HashingContext.HASH_SHA1` are supported. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_sign: -- :ref:`PackedByteArray` **sign** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`CryptoKey` key **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **sign** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`CryptoKey` key **)** Sign a given ``hash`` of type ``hash_type`` with the provided private ``key``. +.. rst-class:: classref-item-separator + ---- .. _class_Crypto_method_verify: -- :ref:`bool` **verify** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`PackedByteArray` signature, :ref:`CryptoKey` key **)** +.. rst-class:: classref-method + +:ref:`bool` **verify** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`PackedByteArray` signature, :ref:`CryptoKey` key **)** Verify that a given ``signature`` for ``hash`` of type ``hash_type`` against the provided public ``key``. diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index 38e34d434..15367dc0f 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -14,6 +14,8 @@ CryptoKey A cryptographic key (RSA). +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,63 +23,92 @@ 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-reftable-group + Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CryptoKey_method_is_public_only: -- :ref:`bool` **is_public_only** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_public_only** **(** **)** |const| Returns ``true`` if this CryptoKey only has the public part, and not the private one. +.. rst-class:: classref-item-separator + ---- .. _class_CryptoKey_method_load: -- :ref:`Error` **load** **(** :ref:`String` path, :ref:`bool` public_only=false **)** +.. rst-class:: classref-method + +:ref:`Error` **load** **(** :ref:`String` path, :ref:`bool` public_only=false **)** Loads a key from ``path``. If ``public_only`` is ``true``, only the public key will be loaded. \ **Note:** ``path`` should be a "\*.pub" file if ``public_only`` is ``true``, a "\*.key" file otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_CryptoKey_method_load_from_string: -- :ref:`Error` **load_from_string** **(** :ref:`String` string_key, :ref:`bool` public_only=false **)** +.. rst-class:: classref-method + +:ref:`Error` **load_from_string** **(** :ref:`String` string_key, :ref:`bool` public_only=false **)** Loads a key from the given ``string_key``. If ``public_only`` is ``true``, only the public key will be loaded. +.. rst-class:: classref-item-separator + ---- .. _class_CryptoKey_method_save: -- :ref:`Error` **save** **(** :ref:`String` path, :ref:`bool` public_only=false **)** +.. rst-class:: classref-method + +:ref:`Error` **save** **(** :ref:`String` path, :ref:`bool` public_only=false **)** Saves a key to the given ``path``. If ``public_only`` is ``true``, only the public key will be saved. \ **Note:** ``path`` should be a "\*.pub" file if ``public_only`` is ``true``, a "\*.key" file otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_CryptoKey_method_save_to_string: -- :ref:`String` **save_to_string** **(** :ref:`bool` public_only=false **)** +.. rst-class:: classref-method + +:ref:`String` **save_to_string** **(** :ref:`bool` public_only=false **)** Returns a string containing the key in PEM format. If ``public_only`` is ``true``, only the public key will be included. diff --git a/classes/class_csgbox3d.rst b/classes/class_csgbox3d.rst index b50f1ccf4..b8b7cf12c 100644 --- a/classes/class_csgbox3d.rst +++ b/classes/class_csgbox3d.rst @@ -14,6 +14,8 @@ CSGBox3D A CSG Box shape. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,48 +23,63 @@ This node allows you to create a box for use with the CSG system. \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+---------------------------------------------------+----------------------+ -| :ref:`Material` | :ref:`material` | | -+---------------------------------+---------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | -+---------------------------------+---------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------+----------------------+ + | :ref:`Material` | :ref:`material` | | + +---------------------------------+---------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | + +---------------------------------+---------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGBox3D_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** The material used to render the box. +.. rst-class:: classref-item-separator + ---- .. _class_CSGBox3D_property_size: -- :ref:`Vector3` **size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_size(value) | -+-----------+----------------------+ -| *Getter* | get_size() | -+-----------+----------------------+ +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_size** **(** **)** The box's width, height and depth. diff --git a/classes/class_csgcombiner3d.rst b/classes/class_csgcombiner3d.rst index 3a8389a29..40e181738 100644 --- a/classes/class_csgcombiner3d.rst +++ b/classes/class_csgcombiner3d.rst @@ -14,6 +14,8 @@ CSGCombiner3D A CSG node that allows you to combine other CSG modifiers. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ For complex arrangements of shapes, it is sometimes needed to add structure to y \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_csgcylinder3d.rst b/classes/class_csgcylinder3d.rst index 9ad47ea49..c70735c08 100644 --- a/classes/class_csgcylinder3d.rst +++ b/classes/class_csgcylinder3d.rst @@ -14,6 +14,8 @@ CSGCylinder3D A CSG Cylinder shape. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,120 +23,139 @@ This node allows you to create a cylinder (or cone) for use with the CSG system. \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`cone` | ``false`` | -+---------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`height` | ``2.0`` | -+---------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`Material` | :ref:`material` | | -+---------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`sides` | ``8`` | -+---------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`smooth_faces` | ``true`` | -+---------------------------------+----------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`cone` | ``false`` | + +---------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`height` | ``2.0`` | + +---------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`Material` | :ref:`material` | | + +---------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`sides` | ``8`` | + +---------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`smooth_faces` | ``true`` | + +---------------------------------+----------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGCylinder3D_property_cone: -- :ref:`bool` **cone** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_cone(value) | -+-----------+-----------------+ -| *Getter* | is_cone() | -+-----------+-----------------+ +:ref:`bool` **cone** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_cone** **(** :ref:`bool` value **)** +- :ref:`bool` **is_cone** **(** **)** If ``true`` a cone is created, the :ref:`radius` will only apply to one side. +.. rst-class:: classref-item-separator + ---- .. _class_CSGCylinder3D_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** The height of the cylinder. +.. rst-class:: classref-item-separator + ---- .. _class_CSGCylinder3D_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** The material used to render the cylinder. +.. rst-class:: classref-item-separator + ---- .. _class_CSGCylinder3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The radius of the cylinder. +.. rst-class:: classref-item-separator + ---- .. _class_CSGCylinder3D_property_sides: -- :ref:`int` **sides** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``8`` | -+-----------+------------------+ -| *Setter* | set_sides(value) | -+-----------+------------------+ -| *Getter* | get_sides() | -+-----------+------------------+ +:ref:`int` **sides** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_sides** **(** :ref:`int` value **)** +- :ref:`int` **get_sides** **(** **)** The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder. +.. rst-class:: classref-item-separator + ---- .. _class_CSGCylinder3D_property_smooth_faces: -- :ref:`bool` **smooth_faces** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_smooth_faces(value) | -+-----------+-------------------------+ -| *Getter* | get_smooth_faces() | -+-----------+-------------------------+ +:ref:`bool` **smooth_faces** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_smooth_faces** **(** :ref:`bool` value **)** +- :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. diff --git a/classes/class_csgmesh3d.rst b/classes/class_csgmesh3d.rst index 14bb0b67b..b4d60139a 100644 --- a/classes/class_csgmesh3d.rst +++ b/classes/class_csgmesh3d.rst @@ -14,6 +14,8 @@ CSGMesh3D A CSG Mesh shape that uses a mesh resource. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,46 +23,63 @@ This CSG node allows you to use any mesh resource as a CSG shape, provided it is \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+----------------------------------------------------+ -| :ref:`Material` | :ref:`material` | -+---------------------------------+----------------------------------------------------+ -| :ref:`Mesh` | :ref:`mesh` | -+---------------------------------+----------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------+ + | :ref:`Material` | :ref:`material` | + +---------------------------------+----------------------------------------------------+ + | :ref:`Mesh` | :ref:`mesh` | + +---------------------------------+----------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGMesh3D_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** The :ref:`Material` used in drawing the CSG shape. +.. rst-class:: classref-item-separator + ---- .. _class_CSGMesh3D_property_mesh: -- :ref:`Mesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`Mesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`Mesh` value **)** +- :ref:`Mesh` **get_mesh** **(** **)** The :ref:`Mesh` resource to use as a CSG shape. diff --git a/classes/class_csgpolygon3d.rst b/classes/class_csgpolygon3d.rst index 1bd25f282..7b382121c 100644 --- a/classes/class_csgpolygon3d.rst +++ b/classes/class_csgpolygon3d.rst @@ -14,6 +14,8 @@ CSGPolygon3D Extrudes a 2D polygon shape to create a 3D mesh. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,335 +23,434 @@ An array of 2D points is extruded to quickly and easily create a variety of 3D m \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`float` | :ref:`depth` | ``1.0`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`Material` | :ref:`material` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`Mode` | :ref:`mode` | ``0`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`bool` | :ref:`path_continuous_u` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`float` | :ref:`path_interval` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`PathIntervalType` | :ref:`path_interval_type` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`bool` | :ref:`path_joined` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`bool` | :ref:`path_local` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`NodePath` | :ref:`path_node` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`PathRotation` | :ref:`path_rotation` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`float` | :ref:`path_simplify_angle` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`float` | :ref:`path_u_distance` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`bool` | :ref:`smooth_faces` | ``false`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`float` | :ref:`spin_degrees` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ -| :ref:`int` | :ref:`spin_sides` | | -+-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`depth` | ``1.0`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`Material` | :ref:`material` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`Mode` | :ref:`mode` | ``0`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`path_continuous_u` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`path_interval` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`PathIntervalType` | :ref:`path_interval_type` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`path_joined` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`path_local` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`NodePath` | :ref:`path_node` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`PathRotation` | :ref:`path_rotation` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`path_simplify_angle` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`path_u_distance` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`smooth_faces` | ``false`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`spin_degrees` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`int` | :ref:`spin_sides` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CSGPolygon3D_Mode: -.. _class_CSGPolygon3D_constant_MODE_DEPTH: - -.. _class_CSGPolygon3D_constant_MODE_SPIN: - -.. _class_CSGPolygon3D_constant_MODE_PATH: +.. rst-class:: classref-enumeration enum **Mode**: -- **MODE_DEPTH** = **0** --- The :ref:`polygon` shape is extruded along the negative Z axis. +.. _class_CSGPolygon3D_constant_MODE_DEPTH: -- **MODE_SPIN** = **1** --- The :ref:`polygon` shape is extruded by rotating it around the Y axis. +.. rst-class:: classref-enumeration-constant -- **MODE_PATH** = **2** --- The :ref:`polygon` shape is extruded along the :ref:`Path3D` specified in :ref:`path_node`. +:ref:`Mode` **MODE_DEPTH** = ``0`` + +The :ref:`polygon` shape is extruded along the negative Z axis. + +.. _class_CSGPolygon3D_constant_MODE_SPIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_SPIN** = ``1`` + +The :ref:`polygon` shape is extruded by rotating it around the Y axis. + +.. _class_CSGPolygon3D_constant_MODE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_PATH** = ``2`` + +The :ref:`polygon` shape is extruded along the :ref:`Path3D` specified in :ref:`path_node`. + +.. rst-class:: classref-item-separator ---- .. _enum_CSGPolygon3D_PathRotation: -.. _class_CSGPolygon3D_constant_PATH_ROTATION_POLYGON: - -.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH: - -.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH_FOLLOW: +.. rst-class:: classref-enumeration enum **PathRotation**: -- **PATH_ROTATION_POLYGON** = **0** --- The :ref:`polygon` shape is not rotated. +.. _class_CSGPolygon3D_constant_PATH_ROTATION_POLYGON: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathRotation` **PATH_ROTATION_POLYGON** = ``0`` + +The :ref:`polygon` shape is not rotated. \ **Note:** Requires the path Z coordinates to continually decrease to ensure viable shapes. -- **PATH_ROTATION_PATH** = **1** --- The :ref:`polygon` shape is rotated along the path, but it is not rotated around the path axis. +.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathRotation` **PATH_ROTATION_PATH** = ``1`` + +The :ref:`polygon` shape is rotated along the path, but it is not rotated around the path axis. \ **Note:** Requires the path Z coordinates to continually decrease to ensure viable shapes. -- **PATH_ROTATION_PATH_FOLLOW** = **2** --- The :ref:`polygon` shape follows the path and its rotations around the path axis. +.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH_FOLLOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathRotation` **PATH_ROTATION_PATH_FOLLOW** = ``2`` + +The :ref:`polygon` shape follows the path and its rotations around the path axis. + +.. rst-class:: classref-item-separator ---- .. _enum_CSGPolygon3D_PathIntervalType: -.. _class_CSGPolygon3D_constant_PATH_INTERVAL_DISTANCE: - -.. _class_CSGPolygon3D_constant_PATH_INTERVAL_SUBDIVIDE: +.. rst-class:: classref-enumeration enum **PathIntervalType**: -- **PATH_INTERVAL_DISTANCE** = **0** --- When :ref:`mode` is set to :ref:`MODE_PATH`, :ref:`path_interval` will determine the distance, in meters, each interval of the path will extrude. +.. _class_CSGPolygon3D_constant_PATH_INTERVAL_DISTANCE: -- **PATH_INTERVAL_SUBDIVIDE** = **1** --- When :ref:`mode` is set to :ref:`MODE_PATH`, :ref:`path_interval` will subdivide the polygons along the path. +.. rst-class:: classref-enumeration-constant + +:ref:`PathIntervalType` **PATH_INTERVAL_DISTANCE** = ``0`` + +When :ref:`mode` is set to :ref:`MODE_PATH`, :ref:`path_interval` will determine the distance, in meters, each interval of the path will extrude. + +.. _class_CSGPolygon3D_constant_PATH_INTERVAL_SUBDIVIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathIntervalType` **PATH_INTERVAL_SUBDIVIDE** = ``1`` + +When :ref:`mode` is set to :ref:`MODE_PATH`, :ref:`path_interval` will subdivide the polygons along the path. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGPolygon3D_property_depth: -- :ref:`float` **depth** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_depth(value) | -+-----------+------------------+ -| *Getter* | get_depth() | -+-----------+------------------+ +:ref:`float` **depth** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth** **(** :ref:`float` value **)** +- :ref:`float` **get_depth** **(** **)** When :ref:`mode` is :ref:`MODE_DEPTH`, the depth of the extrusion. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_mode: -- :ref:`Mode` **mode** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_mode(value) | -+-----------+-----------------+ -| *Getter* | get_mode() | -+-----------+-----------------+ +:ref:`Mode` **mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mode** **(** :ref:`Mode` value **)** +- :ref:`Mode` **get_mode** **(** **)** The :ref:`mode` used to extrude the :ref:`polygon`. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_continuous_u: -- :ref:`bool` **path_continuous_u** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_path_continuous_u(value) | -+----------+------------------------------+ -| *Getter* | is_path_continuous_u() | -+----------+------------------------------+ +:ref:`bool` **path_continuous_u** + +.. rst-class:: classref-property-setget + +- void **set_path_continuous_u** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_interval: -- :ref:`float` **path_interval** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_path_interval(value) | -+----------+--------------------------+ -| *Getter* | get_path_interval() | -+----------+--------------------------+ +:ref:`float` **path_interval** + +.. rst-class:: classref-property-setget + +- void **set_path_interval** **(** :ref:`float` value **)** +- :ref:`float` **get_path_interval** **(** **)** When :ref:`mode` is :ref:`MODE_PATH`, the path interval or ratio of path points to extrusions. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_interval_type: -- :ref:`PathIntervalType` **path_interval_type** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_path_interval_type(value) | -+----------+-------------------------------+ -| *Getter* | get_path_interval_type() | -+----------+-------------------------------+ +:ref:`PathIntervalType` **path_interval_type** + +.. rst-class:: classref-property-setget + +- void **set_path_interval_type** **(** :ref:`PathIntervalType` value **)** +- :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`). +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_joined: -- :ref:`bool` **path_joined** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_path_joined(value) | -+----------+------------------------+ -| *Getter* | is_path_joined() | -+----------+------------------------+ +:ref:`bool` **path_joined** + +.. rst-class:: classref-property-setget + +- void **set_path_joined** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_local: -- :ref:`bool` **path_local** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_path_local(value) | -+----------+-----------------------+ -| *Getter* | is_path_local() | -+----------+-----------------------+ +:ref:`bool` **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`. +.. rst-class:: classref-property-setget + +- void **set_path_local** **(** :ref:`bool` value **)** +- :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`. + +.. rst-class:: classref-item-separator ---- .. _class_CSGPolygon3D_property_path_node: -- :ref:`NodePath` **path_node** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_path_node(value) | -+----------+----------------------+ -| *Getter* | get_path_node() | -+----------+----------------------+ +:ref:`NodePath` **path_node** + +.. rst-class:: classref-property-setget + +- void **set_path_node** **(** :ref:`NodePath` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_rotation: -- :ref:`PathRotation` **path_rotation** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_path_rotation(value) | -+----------+--------------------------+ -| *Getter* | get_path_rotation() | -+----------+--------------------------+ +:ref:`PathRotation` **path_rotation** + +.. rst-class:: classref-property-setget + +- void **set_path_rotation** **(** :ref:`PathRotation` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_simplify_angle: -- :ref:`float` **path_simplify_angle** +.. rst-class:: classref-property -+----------+--------------------------------+ -| *Setter* | set_path_simplify_angle(value) | -+----------+--------------------------------+ -| *Getter* | get_path_simplify_angle() | -+----------+--------------------------------+ +:ref:`float` **path_simplify_angle** + +.. rst-class:: classref-property-setget + +- void **set_path_simplify_angle** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_path_u_distance: -- :ref:`float` **path_u_distance** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_path_u_distance(value) | -+----------+----------------------------+ -| *Getter* | get_path_u_distance() | -+----------+----------------------------+ +:ref:`float` **path_u_distance** + +.. rst-class:: classref-property-setget + +- void **set_path_u_distance** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_polygon: -- :ref:`PackedVector2Array` **polygon** +.. rst-class:: classref-property -+-----------+------------------------------------------------+ -| *Default* | ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` | -+-----------+------------------------------------------------+ -| *Setter* | set_polygon(value) | -+-----------+------------------------------------------------+ -| *Getter* | get_polygon() | -+-----------+------------------------------------------------+ +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_smooth_faces: -- :ref:`bool` **smooth_faces** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_smooth_faces(value) | -+-----------+-------------------------+ -| *Getter* | get_smooth_faces() | -+-----------+-------------------------+ +:ref:`bool` **smooth_faces** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_smooth_faces** **(** :ref:`bool` value **)** +- :ref:`bool` **get_smooth_faces** **(** **)** If ``true``, applies smooth shading to the extrusions. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_spin_degrees: -- :ref:`float` **spin_degrees** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_spin_degrees(value) | -+----------+-------------------------+ -| *Getter* | get_spin_degrees() | -+----------+-------------------------+ +:ref:`float` **spin_degrees** + +.. rst-class:: classref-property-setget + +- void **set_spin_degrees** **(** :ref:`float` value **)** +- :ref:`float` **get_spin_degrees** **(** **)** When :ref:`mode` is :ref:`MODE_SPIN`, the total number of degrees the :ref:`polygon` is rotated when extruding. +.. rst-class:: classref-item-separator + ---- .. _class_CSGPolygon3D_property_spin_sides: -- :ref:`int` **spin_sides** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_spin_sides(value) | -+----------+-----------------------+ -| *Getter* | get_spin_sides() | -+----------+-----------------------+ +:ref:`int` **spin_sides** + +.. rst-class:: classref-property-setget + +- void **set_spin_sides** **(** :ref:`int` value **)** +- :ref:`int` **get_spin_sides** **(** **)** When :ref:`mode` is :ref:`MODE_SPIN`, the number of extrusions made. diff --git a/classes/class_csgprimitive3d.rst b/classes/class_csgprimitive3d.rst index ad363a9af..554cda0c9 100644 --- a/classes/class_csgprimitive3d.rst +++ b/classes/class_csgprimitive3d.rst @@ -16,6 +16,8 @@ CSGPrimitive3D Base class for CSG primitives. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,32 +25,44 @@ Parent class for various CSG primitives. It contains code and functionality that \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`flip_faces` | ``false`` | -+-------------------------+-------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`flip_faces` | ``false`` | + +-------------------------+-------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGPrimitive3D_property_flip_faces: -- :ref:`bool` **flip_faces** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_flip_faces(value) | -+-----------+-----------------------+ -| *Getter* | get_flip_faces() | -+-----------+-----------------------+ +:ref:`bool` **flip_faces** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_faces** **(** :ref:`bool` value **)** +- :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. diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index f8a4e51b7..3203e3c58 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -16,6 +16,8 @@ CSGShape3D The CSG base class. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,96 +25,134 @@ This is the CSG base class that provides CSG operation support to the various CS \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`calculate_tangents` | ``true`` | -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`collision_layer` | ``1`` | -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`collision_priority` | ``1.0`` | -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`Operation` | :ref:`operation` | ``0`` | -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`snap` | ``0.001`` | -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_collision` | ``false`` | -+---------------------------------------------+-------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`calculate_tangents` | ``true`` | + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`collision_layer` | ``1`` | + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`collision_priority` | ``1.0`` | + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`Operation` | :ref:`operation` | ``0`` | + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`snap` | ``0.001`` | + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_collision` | ``false`` | + +---------------------------------------------+-------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CSGShape3D_Operation: -.. _class_CSGShape3D_constant_OPERATION_UNION: - -.. _class_CSGShape3D_constant_OPERATION_INTERSECTION: - -.. _class_CSGShape3D_constant_OPERATION_SUBTRACTION: +.. rst-class:: classref-enumeration enum **Operation**: -- **OPERATION_UNION** = **0** --- Geometry of both primitives is merged, intersecting geometry is removed. +.. _class_CSGShape3D_constant_OPERATION_UNION: -- **OPERATION_INTERSECTION** = **1** --- Only intersecting geometry remains, the rest is removed. +.. rst-class:: classref-enumeration-constant -- **OPERATION_SUBTRACTION** = **2** --- The second shape is subtracted from the first, leaving a dent with its shape. +:ref:`Operation` **OPERATION_UNION** = ``0`` + +Geometry of both primitives is merged, intersecting geometry is removed. + +.. _class_CSGShape3D_constant_OPERATION_INTERSECTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_INTERSECTION** = ``1`` + +Only intersecting geometry remains, the rest is removed. + +.. _class_CSGShape3D_constant_OPERATION_SUBTRACTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OPERATION_SUBTRACTION** = ``2`` + +The second shape is subtracted from the first, leaving a dent with its shape. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGShape3D_property_calculate_tangents: -- :ref:`bool` **calculate_tangents** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------+ -| *Setter* | set_calculate_tangents(value) | -+-----------+-------------------------------+ -| *Getter* | is_calculating_tangents() | -+-----------+-------------------------------+ +:ref:`bool` **calculate_tangents** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_calculate_tangents** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_property_collision_layer: -- :ref:`int` **collision_layer** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``1`` | -+-----------+----------------------------+ -| *Setter* | set_collision_layer(value) | -+-----------+----------------------------+ -| *Getter* | get_collision_layer() | -+-----------+----------------------------+ +:ref:`int` **collision_layer** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_layer** **(** :ref:`int` value **)** +- :ref:`int` **get_collision_layer** **(** **)** The physics layers this area is in. @@ -120,132 +160,165 @@ Collidable objects can exist in any of 32 different layers. These layers work li A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_property_collision_priority: -- :ref:`float` **collision_priority** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------+ -| *Setter* | set_collision_priority(value) | -+-----------+-------------------------------+ -| *Getter* | get_collision_priority() | -+-----------+-------------------------------+ +:ref:`float` **collision_priority** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_collision_priority** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_property_operation: -- :ref:`Operation` **operation** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_operation(value) | -+-----------+----------------------+ -| *Getter* | get_operation() | -+-----------+----------------------+ +:ref:`Operation` **operation** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operation** **(** :ref:`Operation` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_property_snap: -- :ref:`float` **snap** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.001`` | -+-----------+-----------------+ -| *Setter* | set_snap(value) | -+-----------+-----------------+ -| *Getter* | get_snap() | -+-----------+-----------------+ +:ref:`float` **snap** = ``0.001`` + +.. rst-class:: classref-property-setget + +- void **set_snap** **(** :ref:`float` value **)** +- :ref:`float` **get_snap** **(** **)** Snap makes the mesh 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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_property_use_collision: -- :ref:`bool` **use_collision** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_use_collision(value) | -+-----------+--------------------------+ -| *Getter* | is_using_collision() | -+-----------+--------------------------+ +:ref:`bool` **use_collision** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_collision** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_CSGShape3D_method_get_collision_layer_value: -- :ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_method_get_meshes: -- :ref:`Array` **get_meshes** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_meshes** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_method_is_root_shape: -- :ref:`bool` **is_root_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_root_shape** **(** **)** |const| Returns ``true`` if this is a root shape and is thus the object that is rendered. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_method_set_collision_layer_value: -- void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_CSGShape3D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_csgsphere3d.rst b/classes/class_csgsphere3d.rst index 078f35555..a982c5dc3 100644 --- a/classes/class_csgsphere3d.rst +++ b/classes/class_csgsphere3d.rst @@ -14,6 +14,8 @@ CSGSphere3D A CSG Sphere shape. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,102 +23,120 @@ This node allows you to create a sphere for use with the CSG system. \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+--------------------------------------------------------------------+----------+ -| :ref:`Material` | :ref:`material` | | -+---------------------------------+--------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`radial_segments` | ``12`` | -+---------------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------------+--------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`rings` | ``6`` | -+---------------------------------+--------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`smooth_faces` | ``true`` | -+---------------------------------+--------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------+----------+ + | :ref:`Material` | :ref:`material` | | + +---------------------------------+--------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`radial_segments` | ``12`` | + +---------------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------------+--------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`rings` | ``6`` | + +---------------------------------+--------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`smooth_faces` | ``true`` | + +---------------------------------+--------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGSphere3D_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** The material used to render the sphere. +.. rst-class:: classref-item-separator + ---- .. _class_CSGSphere3D_property_radial_segments: -- :ref:`int` **radial_segments** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``12`` | -+-----------+----------------------------+ -| *Setter* | set_radial_segments(value) | -+-----------+----------------------------+ -| *Getter* | get_radial_segments() | -+-----------+----------------------------+ +:ref:`int` **radial_segments** = ``12`` + +.. rst-class:: classref-property-setget + +- void **set_radial_segments** **(** :ref:`int` value **)** +- :ref:`int` **get_radial_segments** **(** **)** Number of vertical slices for the sphere. +.. rst-class:: classref-item-separator + ---- .. _class_CSGSphere3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** Radius of the sphere. +.. rst-class:: classref-item-separator + ---- .. _class_CSGSphere3D_property_rings: -- :ref:`int` **rings** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``6`` | -+-----------+------------------+ -| *Setter* | set_rings(value) | -+-----------+------------------+ -| *Getter* | get_rings() | -+-----------+------------------+ +:ref:`int` **rings** = ``6`` + +.. rst-class:: classref-property-setget + +- void **set_rings** **(** :ref:`int` value **)** +- :ref:`int` **get_rings** **(** **)** Number of horizontal slices for the sphere. +.. rst-class:: classref-item-separator + ---- .. _class_CSGSphere3D_property_smooth_faces: -- :ref:`bool` **smooth_faces** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_smooth_faces(value) | -+-----------+-------------------------+ -| *Getter* | get_smooth_faces() | -+-----------+-------------------------+ +:ref:`bool` **smooth_faces** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_smooth_faces** **(** :ref:`bool` value **)** +- :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. diff --git a/classes/class_csgtorus3d.rst b/classes/class_csgtorus3d.rst index 51b7d45b6..19b2c1cb8 100644 --- a/classes/class_csgtorus3d.rst +++ b/classes/class_csgtorus3d.rst @@ -14,6 +14,8 @@ CSGTorus3D A CSG Torus shape. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,120 +23,139 @@ This node allows you to create a torus for use with the CSG system. \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`inner_radius` | ``0.5`` | -+---------------------------------+-------------------------------------------------------------+----------+ -| :ref:`Material` | :ref:`material` | | -+---------------------------------+-------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`outer_radius` | ``1.0`` | -+---------------------------------+-------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`ring_sides` | ``6`` | -+---------------------------------+-------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`sides` | ``8`` | -+---------------------------------+-------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`smooth_faces` | ``true`` | -+---------------------------------+-------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`inner_radius` | ``0.5`` | + +---------------------------------+-------------------------------------------------------------+----------+ + | :ref:`Material` | :ref:`material` | | + +---------------------------------+-------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`outer_radius` | ``1.0`` | + +---------------------------------+-------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`ring_sides` | ``6`` | + +---------------------------------+-------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`sides` | ``8`` | + +---------------------------------+-------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`smooth_faces` | ``true`` | + +---------------------------------+-------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CSGTorus3D_property_inner_radius: -- :ref:`float` **inner_radius** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------------+ -| *Setter* | set_inner_radius(value) | -+-----------+-------------------------+ -| *Getter* | get_inner_radius() | -+-----------+-------------------------+ +:ref:`float` **inner_radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_inner_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_inner_radius** **(** **)** The inner radius of the torus. +.. rst-class:: classref-item-separator + ---- .. _class_CSGTorus3D_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** The material used to render the torus. +.. rst-class:: classref-item-separator + ---- .. _class_CSGTorus3D_property_outer_radius: -- :ref:`float` **outer_radius** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_outer_radius(value) | -+-----------+-------------------------+ -| *Getter* | get_outer_radius() | -+-----------+-------------------------+ +:ref:`float` **outer_radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_outer_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_outer_radius** **(** **)** The outer radius of the torus. +.. rst-class:: classref-item-separator + ---- .. _class_CSGTorus3D_property_ring_sides: -- :ref:`int` **ring_sides** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``6`` | -+-----------+-----------------------+ -| *Setter* | set_ring_sides(value) | -+-----------+-----------------------+ -| *Getter* | get_ring_sides() | -+-----------+-----------------------+ +:ref:`int` **ring_sides** = ``6`` + +.. rst-class:: classref-property-setget + +- void **set_ring_sides** **(** :ref:`int` value **)** +- :ref:`int` **get_ring_sides** **(** **)** The number of edges each ring of the torus is constructed of. +.. rst-class:: classref-item-separator + ---- .. _class_CSGTorus3D_property_sides: -- :ref:`int` **sides** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``8`` | -+-----------+------------------+ -| *Setter* | set_sides(value) | -+-----------+------------------+ -| *Getter* | get_sides() | -+-----------+------------------+ +:ref:`int` **sides** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_sides** **(** :ref:`int` value **)** +- :ref:`int` **get_sides** **(** **)** The number of slices the torus is constructed of. +.. rst-class:: classref-item-separator + ---- .. _class_CSGTorus3D_property_smooth_faces: -- :ref:`bool` **smooth_faces** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_smooth_faces(value) | -+-----------+-------------------------+ -| *Getter* | get_smooth_faces() | -+-----------+-------------------------+ +:ref:`bool` **smooth_faces** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_smooth_faces** **(** :ref:`bool` value **)** +- :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. diff --git a/classes/class_csharpscript.rst b/classes/class_csharpscript.rst index f2b201046..9ddb3e090 100644 --- a/classes/class_csharpscript.rst +++ b/classes/class_csharpscript.rst @@ -14,6 +14,8 @@ CSharpScript A script implemented in the C# programming language (Mono-enabled builds only). +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,24 +23,39 @@ This class represents a C# script. It is the C# equivalent of the :ref:`GDScript See also :ref:`GodotSharp`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`C# documentation index <../tutorials/scripting/c_sharp/index>` +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+--------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`new` **(** ... **)** |vararg| | -+-------------------------------+--------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`new` **(** ... **)** |vararg| | + +-------------------------------+--------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CSharpScript_method_new: -- :ref:`Variant` **new** **(** ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Variant` **new** **(** ... **)** |vararg| Returns a new instance of the script. diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index cc77c2414..347a026a3 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -14,12 +14,14 @@ Cubemap 6-sided texture typically used in 3D rendering. +.. rst-class:: classref-introduction-group + Description ----------- A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections in 3D rendering (see :ref:`ReflectionProbe`). It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. -This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of ``Cubemap`` resources. +This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of **Cubemap** resources. To create such a texture file yourself, reimport your image files using the Godot Editor import presets. diff --git a/classes/class_cubemaparray.rst b/classes/class_cubemaparray.rst index d5156d187..0c3e2af7d 100644 --- a/classes/class_cubemaparray.rst +++ b/classes/class_cubemaparray.rst @@ -14,18 +14,20 @@ CubemapArray A single composite texture resource which consists of multiple :ref:`Cubemap`\ s. +.. 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. 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**. -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. +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. -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``. +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:** ``CubemapArray`` is not supported in the OpenGL 3 rendering backend. +\ **Note:** **CubemapArray** is not supported in the OpenGL 3 rendering backend. .. |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.)` diff --git a/classes/class_curve.rst b/classes/class_curve.rst index f7ce7d92a..3187db086 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -14,6 +14,8 @@ Curve A mathematic curve. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,295 +23,417 @@ A curve that can be saved and re-used for other objects. By default, it ranges b See also :ref:`Gradient` which is designed for color interpolation. See also :ref:`Curve2D` and :ref:`Curve3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`bake_resolution` | ``100`` | -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`max_value` | ``1.0`` | -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`min_value` | ``0.0`` | -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`point_count` | ``0`` | -+---------------------------+--------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`bake_resolution` | ``100`` | + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`max_value` | ``1.0`` | + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`min_value` | ``0.0`` | + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`point_count` | ``0`` | + +---------------------------+--------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Curve_signal_range_changed: -- **range_changed** **(** **)** +.. rst-class:: classref-signal + +**range_changed** **(** **)** Emitted when :ref:`max_value` or :ref:`min_value` is changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Curve_TangentMode: -.. _class_Curve_constant_TANGENT_FREE: - -.. _class_Curve_constant_TANGENT_LINEAR: - -.. _class_Curve_constant_TANGENT_MODE_COUNT: +.. rst-class:: classref-enumeration enum **TangentMode**: -- **TANGENT_FREE** = **0** --- The tangent on this side of the point is user-defined. +.. _class_Curve_constant_TANGENT_FREE: -- **TANGENT_LINEAR** = **1** --- The curve calculates the tangent on this side of the point as the slope halfway towards the adjacent point. +.. rst-class:: classref-enumeration-constant -- **TANGENT_MODE_COUNT** = **2** --- The total number of available tangent modes. +:ref:`TangentMode` **TANGENT_FREE** = ``0`` + +The tangent on this side of the point is user-defined. + +.. _class_Curve_constant_TANGENT_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TangentMode` **TANGENT_LINEAR** = ``1`` + +The curve calculates the tangent on this side of the point as the slope halfway towards the adjacent point. + +.. _class_Curve_constant_TANGENT_MODE_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TangentMode` **TANGENT_MODE_COUNT** = ``2`` + +The total number of available tangent modes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Curve_property_bake_resolution: -- :ref:`int` **bake_resolution** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``100`` | -+-----------+----------------------------+ -| *Setter* | set_bake_resolution(value) | -+-----------+----------------------------+ -| *Getter* | get_bake_resolution() | -+-----------+----------------------------+ +:ref:`int` **bake_resolution** = ``100`` + +.. rst-class:: classref-property-setget + +- void **set_bake_resolution** **(** :ref:`int` value **)** +- :ref:`int` **get_bake_resolution** **(** **)** The number of points to include in the baked (i.e. cached) curve data. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_property_max_value: -- :ref:`float` **max_value** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_max_value(value) | -+-----------+----------------------+ -| *Getter* | get_max_value() | -+-----------+----------------------+ +:ref:`float` **max_value** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_value** **(** :ref:`float` value **)** +- :ref:`float` **get_max_value** **(** **)** The maximum value the curve can reach. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_property_min_value: -- :ref:`float` **min_value** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_min_value(value) | -+-----------+----------------------+ -| *Getter* | get_min_value() | -+-----------+----------------------+ +:ref:`float` **min_value** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_min_value** **(** :ref:`float` value **)** +- :ref:`float` **get_min_value** **(** **)** The minimum value the curve can reach. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_property_point_count: -- :ref:`int` **point_count** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_point_count(value) | -+-----------+------------------------+ -| *Getter* | get_point_count() | -+-----------+------------------------+ +:ref:`int` **point_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_point_count** **(** :ref:`int` value **)** +- :ref:`int` **get_point_count** **(** **)** The number of points describing the curve. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Curve_method_add_point: -- :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 **)** +.. 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 **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_bake: -- void **bake** **(** **)** +.. rst-class:: classref-method + +void **bake** **(** **)** Recomputes the baked cache of points for the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_clean_dupes: -- void **clean_dupes** **(** **)** +.. rst-class:: classref-method + +void **clean_dupes** **(** **)** Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_clear_points: -- void **clear_points** **(** **)** +.. rst-class:: classref-method + +void **clear_points** **(** **)** Removes all points from the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_get_point_left_mode: -- :ref:`TangentMode` **get_point_left_mode** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`TangentMode` **get_point_left_mode** **(** :ref:`int` index **)** |const| Returns the left :ref:`TangentMode` for the point at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_get_point_left_tangent: -- :ref:`float` **get_point_left_tangent** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_point_left_tangent** **(** :ref:`int` index **)** |const| Returns the left tangent angle (in degrees) for the point at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_get_point_position: -- :ref:`Vector2` **get_point_position** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_point_position** **(** :ref:`int` index **)** |const| Returns the curve coordinates for the point at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_get_point_right_mode: -- :ref:`TangentMode` **get_point_right_mode** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`TangentMode` **get_point_right_mode** **(** :ref:`int` index **)** |const| Returns the right :ref:`TangentMode` for the point at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_get_point_right_tangent: -- :ref:`float` **get_point_right_tangent** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_point_right_tangent** **(** :ref:`int` index **)** |const| Returns the right tangent angle (in degrees) for the point at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_remove_point: -- void **remove_point** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_point** **(** :ref:`int` index **)** Removes the point at ``index`` from the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_sample: -- :ref:`float` **sample** **(** :ref:`float` offset **)** |const| +.. rst-class:: classref-method + +:ref:`float` **sample** **(** :ref:`float` offset **)** |const| Returns the Y value for the point that would exist at the X position ``offset`` along the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_sample_baked: -- :ref:`float` **sample_baked** **(** :ref:`float` offset **)** |const| +.. rst-class:: classref-method + +:ref:`float` **sample_baked** **(** :ref:`float` offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_set_point_left_mode: -- void **set_point_left_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** +.. rst-class:: classref-method + +void **set_point_left_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** Sets the left :ref:`TangentMode` for the point at ``index`` to ``mode``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_set_point_left_tangent: -- void **set_point_left_tangent** **(** :ref:`int` index, :ref:`float` tangent **)** +.. rst-class:: classref-method + +void **set_point_left_tangent** **(** :ref:`int` index, :ref:`float` tangent **)** Sets the left tangent angle for the point at ``index`` to ``tangent``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_set_point_offset: -- :ref:`int` **set_point_offset** **(** :ref:`int` index, :ref:`float` offset **)** +.. rst-class:: classref-method + +:ref:`int` **set_point_offset** **(** :ref:`int` index, :ref:`float` offset **)** Sets the offset from ``0.5``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_set_point_right_mode: -- void **set_point_right_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** +.. rst-class:: classref-method + +void **set_point_right_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** Sets the right :ref:`TangentMode` for the point at ``index`` to ``mode``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_set_point_right_tangent: -- void **set_point_right_tangent** **(** :ref:`int` index, :ref:`float` tangent **)** +.. rst-class:: classref-method + +void **set_point_right_tangent** **(** :ref:`int` index, :ref:`float` tangent **)** Sets the right tangent angle for the point at ``index`` to ``tangent``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve_method_set_point_value: -- void **set_point_value** **(** :ref:`int` index, :ref:`float` y **)** +.. rst-class:: classref-method + +void **set_point_value** **(** :ref:`int` index, :ref:`float` y **)** Assigns the vertical position ``y`` to the point at ``index``. diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index acad23d31..c780ca099 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -14,6 +14,8 @@ Curve2D Describes a Bézier curve in 2D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,191 +23,261 @@ This class describes a Bézier curve in 2D space. It is mainly used to give a sh It keeps a cache of precalculated points along the curve, to speed up further calculations. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`bake_interval` | ``5.0`` | -+---------------------------+------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`point_count` | ``0`` | -+---------------------------+------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`bake_interval` | ``5.0`` | + +---------------------------+------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`point_count` | ``0`` | + +---------------------------+------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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, :ref:`bool` cubic=false **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`sample_baked_with_rotation` **(** :ref:`float` offset, :ref:`bool` cubic=false, :ref:`bool` loop=true, :ref:`float` lookahead=4.0 **)** |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| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Curve2D_property_bake_interval: -- :ref:`float` **bake_interval** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``5.0`` | -+-----------+--------------------------+ -| *Setter* | set_bake_interval(value) | -+-----------+--------------------------+ -| *Getter* | get_bake_interval() | -+-----------+--------------------------+ +:ref:`float` **bake_interval** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_bake_interval** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_property_point_count: -- :ref:`int` **point_count** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_point_count(value) | -+-----------+------------------------+ -| *Getter* | get_point_count() | -+-----------+------------------------+ +:ref:`int` **point_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_point_count** **(** :ref:`int` value **)** +- :ref:`int` **get_point_count** **(** **)** The number of points describing the curve. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Curve2D_method_add_point: -- void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` index=-1 **)** +.. 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 **)** 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. 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:`point_count`. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_clear_points: -- void **clear_points** **(** **)** +.. rst-class:: classref-method + +void **clear_points** **(** **)** Removes all points from the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_get_baked_length: -- :ref:`float` **get_baked_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_baked_length** **(** **)** |const| Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`bake_interval`), it should be approximate enough. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_get_baked_points: -- :ref:`PackedVector2Array` **get_baked_points** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_baked_points** **(** **)** |const| Returns the cache of points as a :ref:`PackedVector2Array`. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_get_closest_offset: -- :ref:`float` **get_closest_offset** **(** :ref:`Vector2` to_point **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_closest_offset** **(** :ref:`Vector2` to_point **)** |const| Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked`. \ ``to_point`` must be in this curve's local space. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_get_closest_point: -- :ref:`Vector2` **get_closest_point** **(** :ref:`Vector2` to_point **)** |const| +.. rst-class:: classref-method -Returns the closest baked point (in curve's local space) to ``to_point``. +:ref:`Vector2` **get_closest_point** **(** :ref:`Vector2` to_point **)** |const| + +Returns the closest point on baked segments (in curve's local space) to ``to_point``. \ ``to_point`` must be in this curve's local space. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_get_point_in: -- :ref:`Vector2` **get_point_in** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_point_in** **(** :ref:`int` idx **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_get_point_out: -- :ref:`Vector2` **get_point_out** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_point_out** **(** :ref:`int` idx **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_get_point_position: -- :ref:`Vector2` **get_point_position** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_point_position** **(** :ref:`int` idx **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_remove_point: -- void **remove_point** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **remove_point** **(** :ref:`int` idx **)** Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_sample: -- :ref:`Vector2` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results. If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t`` is ignored. If the curve has no points, the function sends an error to the console, and returns ``(0, 0)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_sample_baked: -- :ref:`Vector2` **sample_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **sample_baked** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| Returns a point within the curve at position ``offset``, where ``offset`` is measured as a pixel distance along the curve. @@ -213,59 +285,81 @@ To do that, it finds the two cached points where the ``offset`` lies between, th Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_sample_baked_with_rotation: -- :ref:`Transform2D` **sample_baked_with_rotation** **(** :ref:`float` offset, :ref:`bool` cubic=false, :ref:`bool` loop=true, :ref:`float` lookahead=4.0 **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **sample_baked_with_rotation** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| Similar to :ref:`sample_baked`, but returns :ref:`Transform2D` that includes a rotation along the curve. Returns empty transform if length of the curve is ``0``. -Use ``loop`` to smooth the tangent at the end of the curve. ``lookahead`` defines the distance to a nearby point for calculating the tangent vector. - :: var transform = curve.sample_baked_with_rotation(offset) position = transform.get_origin() rotation = transform.get_rotation() +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_samplef: -- :ref:`Vector2` **samplef** **(** :ref:`float` fofs **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **samplef** **(** :ref:`float` fofs **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_set_point_in: -- void **set_point_in** **(** :ref:`int` idx, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_point_in** **(** :ref:`int` idx, :ref:`Vector2` position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_set_point_out: -- void **set_point_out** **(** :ref:`int` idx, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_point_out** **(** :ref:`int` idx, :ref:`Vector2` position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_set_point_position: -- void **set_point_position** **(** :ref:`int` idx, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_point_position** **(** :ref:`int` idx, :ref:`Vector2` position **)** Sets the position for the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. +.. rst-class:: classref-item-separator + ---- .. _class_Curve2D_method_tessellate: -- :ref:`PackedVector2Array` **tessellate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **tessellate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| 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. @@ -275,6 +369,20 @@ This approximation makes straight segments between each point, then subdivides t \ ``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. +.. rst-class:: classref-item-separator + +---- + +.. _class_Curve2D_method_tessellate_even_length: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **tessellate_even_length** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_length=20.0 **)** |const| + +.. container:: contribute + + There is currently no description for this method. 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.)` diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 68a1a2d94..fbf64751e 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -14,6 +14,8 @@ Curve3D Describes a Bézier curve in 3D space. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,243 +23,328 @@ This class describes a Bézier curve in 3D space. It is mainly used to give a sh It keeps a cache of precalculated points along the curve, to speed up further calculations. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`bake_interval` | ``0.2`` | -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`point_count` | ``0`` | -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`up_vector_enabled` | ``true`` | -+---------------------------+--------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`bake_interval` | ``0.2`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`point_count` | ``0`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`up_vector_enabled` | ``true`` | + +---------------------------+--------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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, :ref:`bool` cubic=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`sample_baked_up_vector` **(** :ref:`float` offset, :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| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Curve3D_property_bake_interval: -- :ref:`float` **bake_interval** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.2`` | -+-----------+--------------------------+ -| *Setter* | set_bake_interval(value) | -+-----------+--------------------------+ -| *Getter* | get_bake_interval() | -+-----------+--------------------------+ +:ref:`float` **bake_interval** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_bake_interval** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_property_point_count: -- :ref:`int` **point_count** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_point_count(value) | -+-----------+------------------------+ -| *Getter* | get_point_count() | -+-----------+------------------------+ +:ref:`int` **point_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_point_count** **(** :ref:`int` value **)** +- :ref:`int` **get_point_count** **(** **)** The number of points describing the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_property_up_vector_enabled: -- :ref:`bool` **up_vector_enabled** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_up_vector_enabled(value) | -+-----------+------------------------------+ -| *Getter* | is_up_vector_enabled() | -+-----------+------------------------------+ +:ref:`bool` **up_vector_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_up_vector_enabled** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Curve3D_method_add_point: -- void **add_point** **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` index=-1 **)** +.. 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 **)** 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. 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:`point_count`. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_clear_points: -- void **clear_points** **(** **)** +.. rst-class:: classref-method + +void **clear_points** **(** **)** Removes all points from the curve. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_baked_length: -- :ref:`float` **get_baked_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_baked_length** **(** **)** |const| Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`bake_interval`), it should be approximate enough. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_baked_points: -- :ref:`PackedVector3Array` **get_baked_points** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_baked_points** **(** **)** |const| Returns the cache of points as a :ref:`PackedVector3Array`. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_baked_tilts: -- :ref:`PackedFloat32Array` **get_baked_tilts** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **get_baked_tilts** **(** **)** |const| Returns the cache of tilts as a :ref:`PackedFloat32Array`. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_baked_up_vectors: -- :ref:`PackedVector3Array` **get_baked_up_vectors** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_baked_up_vectors** **(** **)** |const| Returns the cache of up vectors as a :ref:`PackedVector3Array`. If :ref:`up_vector_enabled` is ``false``, the cache will be empty. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_closest_offset: -- :ref:`float` **get_closest_offset** **(** :ref:`Vector3` to_point **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_closest_offset** **(** :ref:`Vector3` to_point **)** |const| Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked` or :ref:`sample_baked_up_vector`. \ ``to_point`` must be in this curve's local space. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_closest_point: -- :ref:`Vector3` **get_closest_point** **(** :ref:`Vector3` to_point **)** |const| +.. rst-class:: classref-method -Returns the closest baked point (in curve's local space) to ``to_point``. +:ref:`Vector3` **get_closest_point** **(** :ref:`Vector3` to_point **)** |const| + +Returns the closest point on baked segments (in curve's local space) to ``to_point``. \ ``to_point`` must be in this curve's local space. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_point_in: -- :ref:`Vector3` **get_point_in** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_point_in** **(** :ref:`int` idx **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_point_out: -- :ref:`Vector3` **get_point_out** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_point_out** **(** :ref:`int` idx **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_point_position: -- :ref:`Vector3` **get_point_position** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_point_position** **(** :ref:`int` idx **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_get_point_tilt: -- :ref:`float` **get_point_tilt** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_point_tilt** **(** :ref:`int` idx **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_remove_point: -- void **remove_point** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **remove_point** **(** :ref:`int` idx **)** Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_sample: -- :ref:`Vector3` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results. If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t`` is ignored. If the curve has no points, the function sends an error to the console, and returns ``(0, 0, 0)``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_sample_baked: -- :ref:`Vector3` **sample_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **sample_baked** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| Returns a point within the curve at position ``offset``, where ``offset`` is measured as a distance in 3D units along the curve. @@ -265,11 +352,15 @@ To do that, it finds the two cached points where the ``offset`` lies between, th Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_sample_baked_up_vector: -- :ref:`Vector3` **sample_baked_up_vector** **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| +.. 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. @@ -277,53 +368,89 @@ To do that, it finds the two cached up vectors where the ``offset`` lies between If the curve has no up vectors, the function sends an error to the console, and returns ``(0, 1, 0)``. +.. rst-class:: classref-item-separator + +---- + +.. _class_Curve3D_method_sample_baked_with_rotation: + +.. 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| + +Similar with ``interpolate_baked()``. The 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 caculate the rotation, all vectors aligned with global space axes. + +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_samplef: -- :ref:`Vector3` **samplef** **(** :ref:`float` fofs **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **samplef** **(** :ref:`float` fofs **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_set_point_in: -- void **set_point_in** **(** :ref:`int` idx, :ref:`Vector3` position **)** +.. rst-class:: classref-method + +void **set_point_in** **(** :ref:`int` idx, :ref:`Vector3` position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_set_point_out: -- void **set_point_out** **(** :ref:`int` idx, :ref:`Vector3` position **)** +.. rst-class:: classref-method + +void **set_point_out** **(** :ref:`int` idx, :ref:`Vector3` position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_set_point_position: -- void **set_point_position** **(** :ref:`int` idx, :ref:`Vector3` position **)** +.. rst-class:: classref-method + +void **set_point_position** **(** :ref:`int` idx, :ref:`Vector3` position **)** Sets the position for the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_set_point_tilt: -- void **set_point_tilt** **(** :ref:`int` idx, :ref:`float` tilt **)** +.. rst-class:: classref-method + +void **set_point_tilt** **(** :ref:`int` idx, :ref:`float` tilt **)** Sets the tilt angle in radians for the point ``idx``. If the index is out of bounds, the function sends an error to the console. The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a :ref:`PathFollow3D`, this tilt is an offset over the natural tilt the :ref:`PathFollow3D` calculates. +.. rst-class:: classref-item-separator + ---- .. _class_Curve3D_method_tessellate: -- :ref:`PackedVector3Array` **tessellate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **tessellate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| 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. @@ -333,6 +460,20 @@ This approximation makes straight segments between each point, then subdivides t \ ``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. +.. rst-class:: classref-item-separator + +---- + +.. _class_Curve3D_method_tessellate_even_length: + +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **tessellate_even_length** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_length=0.2 **)** |const| + +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! + +\ ``tolerance_length`` controls the maximal distance between two neighbouring points, before the segment has to be subdivided. + .. |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.)` diff --git a/classes/class_curvetexture.rst b/classes/class_curvetexture.rst index 3adf2379e..ea86e498c 100644 --- a/classes/class_curvetexture.rst +++ b/classes/class_curvetexture.rst @@ -14,6 +14,8 @@ CurveTexture A texture that shows a curve. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,78 +23,108 @@ Renders a given :ref:`Curve` provided to it. Simplifies the task of If you need to store up to 3 curves within a single texture, use :ref:`CurveXYZTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Curve` | :ref:`curve` | | -+---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`TextureMode` | :ref:`texture_mode` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`width` | ``256`` | -+---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`curve` | | + +---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`TextureMode` | :ref:`texture_mode` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`width` | ``256`` | + +---------------------------------------------------+---------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CurveTexture_TextureMode: -.. _class_CurveTexture_constant_TEXTURE_MODE_RGB: - -.. _class_CurveTexture_constant_TEXTURE_MODE_RED: +.. rst-class:: classref-enumeration enum **TextureMode**: -- **TEXTURE_MODE_RGB** = **0** --- Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values. +.. _class_CurveTexture_constant_TEXTURE_MODE_RGB: -- **TEXTURE_MODE_RED** = **1** --- Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this. +.. rst-class:: classref-enumeration-constant + +:ref:`TextureMode` **TEXTURE_MODE_RGB** = ``0`` + +Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values. + +.. _class_CurveTexture_constant_TEXTURE_MODE_RED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureMode` **TEXTURE_MODE_RED** = ``1`` + +Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CurveTexture_property_curve: -- :ref:`Curve` **curve** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_curve(value) | -+----------+------------------+ -| *Getter* | get_curve() | -+----------+------------------+ +:ref:`Curve` **curve** + +.. rst-class:: classref-property-setget + +- void **set_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_curve** **(** **)** The :ref:`Curve` that is rendered onto the texture. +.. rst-class:: classref-item-separator + ---- .. _class_CurveTexture_property_texture_mode: -- :ref:`TextureMode` **texture_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_texture_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_texture_mode() | -+-----------+-------------------------+ +:ref:`TextureMode` **texture_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_mode** **(** :ref:`TextureMode` value **)** +- :ref:`TextureMode` **get_texture_mode** **(** **)** The format the texture should be generated with. When passing a CurveTexture as a input to a :ref:`Shader`, this may need to be adjusted. +.. rst-class:: classref-item-separator + ---- .. _class_CurveTexture_property_width: -- :ref:`int` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``256`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`int` **width** = ``256`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`int` value **)** +- :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. diff --git a/classes/class_curvexyztexture.rst b/classes/class_curvexyztexture.rst index d62624a86..5f4c60b1b 100644 --- a/classes/class_curvexyztexture.rst +++ b/classes/class_curvexyztexture.rst @@ -14,6 +14,8 @@ CurveXYZTexture A texture that shows 3 different curves (stored on the red, green and blue color channels). +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,77 +23,96 @@ Renders 3 given :ref:`Curve`\ s provided to it, on the red, green a If you only need to store one curve within a single texture, use :ref:`CurveTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Curve` | :ref:`curve_x` | | -+---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Curve` | :ref:`curve_y` | | -+---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Curve` | :ref:`curve_z` | | -+---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`width` | ``256`` | -+---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`curve_x` | | + +---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`curve_y` | | + +---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`curve_z` | | + +---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`width` | ``256`` | + +---------------------------+--------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CurveXYZTexture_property_curve_x: -- :ref:`Curve` **curve_x** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_curve_x(value) | -+----------+--------------------+ -| *Getter* | get_curve_x() | -+----------+--------------------+ +:ref:`Curve` **curve_x** + +.. rst-class:: classref-property-setget + +- void **set_curve_x** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_curve_x** **(** **)** The :ref:`Curve` that is rendered onto the texture's red channel. +.. rst-class:: classref-item-separator + ---- .. _class_CurveXYZTexture_property_curve_y: -- :ref:`Curve` **curve_y** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_curve_y(value) | -+----------+--------------------+ -| *Getter* | get_curve_y() | -+----------+--------------------+ +:ref:`Curve` **curve_y** + +.. rst-class:: classref-property-setget + +- void **set_curve_y** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_curve_y** **(** **)** The :ref:`Curve` that is rendered onto the texture's green channel. +.. rst-class:: classref-item-separator + ---- .. _class_CurveXYZTexture_property_curve_z: -- :ref:`Curve` **curve_z** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_curve_z(value) | -+----------+--------------------+ -| *Getter* | get_curve_z() | -+----------+--------------------+ +:ref:`Curve` **curve_z** + +.. rst-class:: classref-property-setget + +- void **set_curve_z** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_curve_z** **(** **)** The :ref:`Curve` that is rendered onto the texture's blue channel. +.. rst-class:: classref-item-separator + ---- .. _class_CurveXYZTexture_property_width: -- :ref:`int` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``256`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`int` **width** = ``256`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`int` value **)** +- :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. diff --git a/classes/class_cylindermesh.rst b/classes/class_cylindermesh.rst index 2672e4730..3eb70ce41 100644 --- a/classes/class_cylindermesh.rst +++ b/classes/class_cylindermesh.rst @@ -14,144 +14,162 @@ CylinderMesh Class representing a cylindrical :ref:`PrimitiveMesh`. +.. rst-class:: classref-introduction-group + Description ----------- Class representing a cylindrical :ref:`PrimitiveMesh`. This class can be used to create cones by setting either the :ref:`top_radius` or :ref:`bottom_radius` properties to ``0.0``. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`bottom_radius` | ``0.5`` | -+---------------------------+---------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`cap_bottom` | ``true`` | -+---------------------------+---------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`cap_top` | ``true`` | -+---------------------------+---------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`height` | ``2.0`` | -+---------------------------+---------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`radial_segments` | ``64`` | -+---------------------------+---------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`rings` | ``4`` | -+---------------------------+---------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`top_radius` | ``0.5`` | -+---------------------------+---------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`bottom_radius` | ``0.5`` | + +---------------------------+---------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`cap_bottom` | ``true`` | + +---------------------------+---------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`cap_top` | ``true`` | + +---------------------------+---------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`height` | ``2.0`` | + +---------------------------+---------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`radial_segments` | ``64`` | + +---------------------------+---------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`rings` | ``4`` | + +---------------------------+---------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`top_radius` | ``0.5`` | + +---------------------------+---------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CylinderMesh_property_bottom_radius: -- :ref:`float` **bottom_radius** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------------+ -| *Setter* | set_bottom_radius(value) | -+-----------+--------------------------+ -| *Getter* | get_bottom_radius() | -+-----------+--------------------------+ +:ref:`float` **bottom_radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_bottom_radius** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_CylinderMesh_property_cap_bottom: -- :ref:`bool` **cap_bottom** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_cap_bottom(value) | -+-----------+-----------------------+ -| *Getter* | is_cap_bottom() | -+-----------+-----------------------+ +:ref:`bool` **cap_bottom** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_cap_bottom** **(** :ref:`bool` value **)** +- :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`. \ **Note:** If :ref:`bottom_radius` is ``0.0``, cap generation is always skipped even if :ref:`cap_bottom` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_CylinderMesh_property_cap_top: -- :ref:`bool` **cap_top** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_cap_top(value) | -+-----------+--------------------+ -| *Getter* | is_cap_top() | -+-----------+--------------------+ +:ref:`bool` **cap_top** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_cap_top** **(** :ref:`bool` value **)** +- :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`. \ **Note:** If :ref:`top_radius` is ``0.0``, cap generation is always skipped even if :ref:`cap_top` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_CylinderMesh_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** Full height of the cylinder. +.. rst-class:: classref-item-separator + ---- .. _class_CylinderMesh_property_radial_segments: -- :ref:`int` **radial_segments** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``64`` | -+-----------+----------------------------+ -| *Setter* | set_radial_segments(value) | -+-----------+----------------------------+ -| *Getter* | get_radial_segments() | -+-----------+----------------------------+ +:ref:`int` **radial_segments** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_radial_segments** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CylinderMesh_property_rings: -- :ref:`int` **rings** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``4`` | -+-----------+------------------+ -| *Setter* | set_rings(value) | -+-----------+------------------+ -| *Getter* | get_rings() | -+-----------+------------------+ +:ref:`int` **rings** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_rings** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_CylinderMesh_property_top_radius: -- :ref:`float` **top_radius** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.5`` | -+-----------+-----------------------+ -| *Setter* | set_top_radius(value) | -+-----------+-----------------------+ -| *Getter* | get_top_radius() | -+-----------+-----------------------+ +:ref:`float` **top_radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_top_radius** **(** :ref:`float` value **)** +- :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`. diff --git a/classes/class_cylindershape3d.rst b/classes/class_cylindershape3d.rst index 8c73dfb3f..7bb50c0dc 100644 --- a/classes/class_cylindershape3d.rst +++ b/classes/class_cylindershape3d.rst @@ -14,6 +14,8 @@ CylinderShape3D Cylinder shape for 3D collisions. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,7 +23,9 @@ Cylinder shape for collisions. Like :ref:`CapsuleShape3D`, \ **Note:** There are several known bugs with cylinder collision shapes. Using :ref:`CapsuleShape3D` or :ref:`BoxShape3D` instead is recommended. -\ **Performance:** Being a primitive collision shape, ``CylinderShape3D`` is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). ``CylinderShape3D`` is also more demanding compared to :ref:`CapsuleShape3D`. +\ **Performance:** Being a primitive collision shape, **CylinderShape3D** is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). **CylinderShape3D** is also more demanding compared to :ref:`CapsuleShape3D`. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -32,45 +36,56 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------+---------+ -| :ref:`float` | :ref:`height` | ``2.0`` | -+---------------------------+------------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------+------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------+---------+ + | :ref:`float` | :ref:`height` | ``2.0`` | + +---------------------------+------------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CylinderShape3D_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** The cylinder's height. +.. rst-class:: classref-item-separator + ---- .. _class_CylinderShape3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The cylinder's radius. diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index d67722e79..ef1a58c0c 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -14,86 +14,101 @@ DampedSpringJoint2D Damped spring constraint for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`damping` | ``1.0`` | -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`length` | ``50.0`` | -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`rest_length` | ``0.0`` | -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`stiffness` | ``20.0`` | -+---------------------------+--------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`damping` | ``1.0`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`length` | ``50.0`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`rest_length` | ``0.0`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`stiffness` | ``20.0`` | + +---------------------------+--------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_DampedSpringJoint2D_property_damping: -- :ref:`float` **damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_damping(value) | -+-----------+--------------------+ -| *Getter* | get_damping() | -+-----------+--------------------+ +:ref:`float` **damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_damping** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_DampedSpringJoint2D_property_length: -- :ref:`float` **length** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``50.0`` | -+-----------+-------------------+ -| *Setter* | set_length(value) | -+-----------+-------------------+ -| *Getter* | get_length() | -+-----------+-------------------+ +:ref:`float` **length** = ``50.0`` + +.. rst-class:: classref-property-setget + +- void **set_length** **(** :ref:`float` value **)** +- :ref:`float` **get_length** **(** **)** The spring joint's maximum length. The two attached bodies cannot stretch it past this value. +.. rst-class:: classref-item-separator + ---- .. _class_DampedSpringJoint2D_property_rest_length: -- :ref:`float` **rest_length** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_rest_length(value) | -+-----------+------------------------+ -| *Getter* | get_rest_length() | -+-----------+------------------------+ +:ref:`float` **rest_length** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_rest_length** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_DampedSpringJoint2D_property_stiffness: -- :ref:`float` **stiffness** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``20.0`` | -+-----------+----------------------+ -| *Setter* | set_stiffness(value) | -+-----------+----------------------+ -| *Getter* | get_stiffness() | -+-----------+----------------------+ +:ref:`float` **stiffness** = ``20.0`` + +.. rst-class:: classref-property-setget + +- void **set_stiffness** **(** :ref:`float` value **)** +- :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. diff --git a/classes/class_decal.rst b/classes/class_decal.rst index db95a8b2a..7ba22d8de 100644 --- a/classes/class_decal.rst +++ b/classes/class_decal.rst @@ -14,10 +14,12 @@ Decal Node that projects a texture onto a :ref:`MeshInstance3D`. +.. rst-class:: classref-introduction-group + Description ----------- -``Decal``\ s are used to project a texture onto a :ref:`Mesh` in the scene. Use Decals to add detail to a scene without affecting the underlying :ref:`Mesh`. They are often used to add weathering to building, add dirt or mud to the ground, or add variety to props. Decals can be moved at any time, making them suitable for things like blob shadows or laser sight dots. +**Decal**\ s are used to project a texture onto a :ref:`Mesh` in the scene. Use Decals to add detail to a scene without affecting the underlying :ref:`Mesh`. They are often used to add weathering to building, add dirt or mud to the ground, or add variety to props. Decals can be moved at any time, making them suitable for things like blob shadows or laser sight dots. They are made of an :ref:`AABB` and a group of :ref:`Texture2D`\ s specifying :ref:`Color`, normal, ORM (ambient occlusion, roughness, metallic), and emission. Decals are projected within their :ref:`AABB` so altering the orientation of the Decal affects the direction in which they are projected. By default, Decals are projected down (i.e. from positive Y to negative Y). @@ -25,330 +27,403 @@ The :ref:`Texture2D`\ s associated with the Decal are automatic \ **Note:** Decals cannot affect an underlying material's transparency, regardless of its transparency mode (alpha blend, alpha scissor, alpha hash, opaque pre-pass). This means translucent or transparent areas of a material will remain translucent or transparent even if an opaque decal is applied on them. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`albedo_mix` | ``1.0`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`cull_mask` | ``1048575`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_begin` | ``40.0`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`distance_fade_enabled` | ``false`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_length` | ``10.0`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`emission_energy` | ``1.0`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`lower_fade` | ``0.3`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`normal_fade` | ``0.0`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`texture_albedo` | | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`texture_emission` | | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`texture_normal` | | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`texture_orm` | | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`upper_fade` | ``0.3`` | -+-----------------------------------+--------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`albedo_mix` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`cull_mask` | ``1048575`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`distance_fade_begin` | ``40.0`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`distance_fade_enabled` | ``false`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`distance_fade_length` | ``10.0`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`emission_energy` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`lower_fade` | ``0.3`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`normal_fade` | ``0.0`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`texture_albedo` | | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`texture_emission` | | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`texture_normal` | | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`texture_orm` | | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`upper_fade` | ``0.3`` | + +-----------------------------------+--------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_texture` **(** :ref:`DecalTexture` type **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture` **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_texture` **(** :ref:`DecalTexture` type **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_texture` **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Decal_DecalTexture: -.. _class_Decal_constant_TEXTURE_ALBEDO: - -.. _class_Decal_constant_TEXTURE_NORMAL: - -.. _class_Decal_constant_TEXTURE_ORM: - -.. _class_Decal_constant_TEXTURE_EMISSION: - -.. _class_Decal_constant_TEXTURE_MAX: +.. rst-class:: classref-enumeration enum **DecalTexture**: -- **TEXTURE_ALBEDO** = **0** --- :ref:`Texture2D` corresponding to :ref:`texture_albedo`. +.. _class_Decal_constant_TEXTURE_ALBEDO: -- **TEXTURE_NORMAL** = **1** --- :ref:`Texture2D` corresponding to :ref:`texture_normal`. +.. rst-class:: classref-enumeration-constant -- **TEXTURE_ORM** = **2** --- :ref:`Texture2D` corresponding to :ref:`texture_orm`. +:ref:`DecalTexture` **TEXTURE_ALBEDO** = ``0`` -- **TEXTURE_EMISSION** = **3** --- :ref:`Texture2D` corresponding to :ref:`texture_emission`. +:ref:`Texture2D` corresponding to :ref:`texture_albedo`. -- **TEXTURE_MAX** = **4** --- Max size of :ref:`DecalTexture` enum. +.. _class_Decal_constant_TEXTURE_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **TEXTURE_NORMAL** = ``1`` + +:ref:`Texture2D` corresponding to :ref:`texture_normal`. + +.. _class_Decal_constant_TEXTURE_ORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **TEXTURE_ORM** = ``2`` + +:ref:`Texture2D` corresponding to :ref:`texture_orm`. + +.. _class_Decal_constant_TEXTURE_EMISSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **TEXTURE_EMISSION** = ``3`` + +:ref:`Texture2D` corresponding to :ref:`texture_emission`. + +.. _class_Decal_constant_TEXTURE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **TEXTURE_MAX** = ``4`` + +Max size of :ref:`DecalTexture` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Decal_property_albedo_mix: -- :ref:`float` **albedo_mix** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_albedo_mix(value) | -+-----------+-----------------------+ -| *Getter* | get_albedo_mix() | -+-----------+-----------------------+ +:ref:`float` **albedo_mix** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_albedo_mix** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_cull_mask: -- :ref:`int` **cull_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1048575`` | -+-----------+----------------------+ -| *Setter* | set_cull_mask(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mask() | -+-----------+----------------------+ +:ref:`int` **cull_mask** = ``1048575`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mask** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_distance_fade_begin: -- :ref:`float` **distance_fade_begin** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``40.0`` | -+-----------+--------------------------------+ -| *Setter* | set_distance_fade_begin(value) | -+-----------+--------------------------------+ -| *Getter* | get_distance_fade_begin() | -+-----------+--------------------------------+ +:ref:`float` **distance_fade_begin** = ``40.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade_begin** **(** :ref:`float` value **)** +- :ref:`float` **get_distance_fade_begin** **(** **)** The distance from the camera at which the Decal begins to fade away (in 3D units). +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_distance_fade_enabled: -- :ref:`bool` **distance_fade_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_enable_distance_fade(value) | -+-----------+---------------------------------+ -| *Getter* | is_distance_fade_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **distance_fade_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_distance_fade** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_distance_fade_length: -- :ref:`float` **distance_fade_length** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``10.0`` | -+-----------+---------------------------------+ -| *Setter* | set_distance_fade_length(value) | -+-----------+---------------------------------+ -| *Getter* | get_distance_fade_length() | -+-----------+---------------------------------+ +:ref:`float` **distance_fade_length** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade_length** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_emission_energy: -- :ref:`float` **emission_energy** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------+ -| *Setter* | set_emission_energy(value) | -+-----------+----------------------------+ -| *Getter* | get_emission_energy() | -+-----------+----------------------------+ +:ref:`float` **emission_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_energy** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_extents(value) | -+-----------+----------------------+ -| *Getter* | get_extents() | -+-----------+----------------------+ +:ref:`Vector3` **extents** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** Sets the size of the :ref:`AABB` used by the decal. The AABB goes from ``-extents`` to ``extents``. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_lower_fade: -- :ref:`float` **lower_fade** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.3`` | -+-----------+-----------------------+ -| *Setter* | set_lower_fade(value) | -+-----------+-----------------------+ -| *Getter* | get_lower_fade() | -+-----------+-----------------------+ +:ref:`float` **lower_fade** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_lower_fade** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_modulate: -- :ref:`Color` **modulate** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_modulate(value) | -+-----------+-----------------------+ -| *Getter* | get_modulate() | -+-----------+-----------------------+ +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_modulate** **(** :ref:`Color` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_normal_fade: -- :ref:`float` **normal_fade** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_normal_fade(value) | -+-----------+------------------------+ -| *Getter* | get_normal_fade() | -+-----------+------------------------+ +:ref:`float` **normal_fade** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_normal_fade** **(** :ref:`float` value **)** +- :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. \ **Note:** Setting :ref:`normal_fade` to a value greater than ``0.0`` has a small performance cost due to the added normal angle computations. +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_texture_albedo: -- :ref:`Texture2D` **texture_albedo** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture_albedo** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |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. -\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. +\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for **Decal** textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. + +.. rst-class:: classref-item-separator ---- .. _class_Decal_property_texture_emission: -- :ref:`Texture2D` **texture_emission** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture_emission** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| :ref:`Texture2D` with the emission :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. -\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. +\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for **Decal** textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. + +.. rst-class:: classref-item-separator ---- .. _class_Decal_property_texture_normal: -- :ref:`Texture2D` **texture_normal** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture_normal** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| :ref:`Texture2D` with the per-pixel normal map for the decal. Use this to add extra detail to decals. -\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. +\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for **Decal** textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. \ **Note:** Setting this texture alone will not result in a visible decal, as :ref:`texture_albedo` must also be set. To create a normal-only decal, load an albedo texture into :ref:`texture_albedo` and set :ref:`albedo_mix` to ``0.0``. The albedo texture's alpha channel will be used to determine where the underlying surface's normal map should be overridden (and its intensity). +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_texture_orm: -- :ref:`Texture2D` **texture_orm** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture_orm** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| :ref:`Texture2D` storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals. -\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. +\ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for **Decal** textures is set globally with :ref:`ProjectSettings.rendering/textures/decals/filter`. \ **Note:** Setting this texture alone will not result in a visible decal, as :ref:`texture_albedo` must also be set. To create a ORM-only decal, load an albedo texture into :ref:`texture_albedo` and set :ref:`albedo_mix` to ``0.0``. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity). +.. rst-class:: classref-item-separator + ---- .. _class_Decal_property_upper_fade: -- :ref:`float` **upper_fade** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.3`` | -+-----------+-----------------------+ -| *Setter* | set_upper_fade(value) | -+-----------+-----------------------+ -| *Getter* | get_upper_fade() | -+-----------+-----------------------+ +:ref:`float` **upper_fade** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_upper_fade** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Decal_method_get_texture: -- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| Returns the :ref:`Texture2D` associated with the specified :ref:`DecalTexture`. This is a convenience method, in most cases you should access the texture directly. @@ -373,11 +448,15 @@ One case where this is better than accessing the texture directly is when you wa +.. rst-class:: classref-item-separator + ---- .. _class_Decal_method_set_texture: -- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** Sets the :ref:`Texture2D` associated with the specified :ref:`DecalTexture`. This is a convenience method, in most cases you should access the texture directly. diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index cf3327856..d0ec62138 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -12,15 +12,15 @@ Dictionary Dictionary type. +.. rst-class:: classref-introduction-group + Description ----------- -Dictionary type. Associative container, which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements. In other programming languages, this data structure is sometimes referred to as a hash map or associative array. +Dictionary type. Associative container, which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding new entries. In other programming languages, this data structure is sometimes referred to as a hash map or associative array. You can define a dictionary by placing a comma-separated list of ``key: value`` pairs in curly braces ``{}``. -Erasing elements while iterating over them **is not supported** and will result in undefined behavior. - \ **Note:** Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use :ref:`duplicate`. Creating a dictionary: @@ -61,14 +61,14 @@ Creating a dictionary: -You can access a dictionary's values by referencing the appropriate key. In the above example, ``points_dict["White"]`` will return ``50``. You can also write ``points_dict.White``, which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). +You can access a dictionary's value by referencing its corresponding key. In the above example, ``points_dict["White"]`` will return ``50``. You can also write ``points_dict.White``, which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). .. tabs:: .. code-tab:: gdscript - export(String, "White", "Yellow", "Orange") var my_color + @export(String, "White", "Yellow", "Orange") var my_color var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} func _ready(): # We can't use dot syntax here as `my_color` is a variable. @@ -101,7 +101,9 @@ Dictionaries can contain more complex data: .. code-tab:: gdscript - my_dict = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key. + var my_dict = { + "First Array": [1, 2, 3, 4] # Assigns an Array to a String key. + } .. code-tab:: csharp @@ -130,7 +132,7 @@ To add a key to an existing dictionary, access it like an existing key and assig {"Yellow", 75}, {"Orange", 100} }; - pointsDict["blue"] = 150; // Add "Blue" as a key and assign 150 as its value. + pointsDict["Blue"] = 150; // Add "Blue" as a key and assign 150 as its value. @@ -164,75 +166,32 @@ Finally, dictionaries can contain different types of keys and values in the same -\ **Note:** Unlike :ref:`Array`\ s, you can't compare dictionaries directly: +The keys of a dictionary can be iterated with the ``for`` keyword: .. tabs:: .. code-tab:: gdscript - var array1 = [1, 2, 3] - var array2 = [1, 2, 3] - - func compare_arrays(): - print(array1 == array2) # Will print true. - - var dict1 = {"a": 1, "b": 2, "c": 3} - var dict2 = {"a": 1, "b": 2, "c": 3} - - func compare_dictionaries(): - print(dict1 == dict2) # Will NOT print true. + var groceries = {"Orange": 20, "Apple": 2, "Banana": 4} + for fruit in groceries: + var amount = groceries[fruit] .. code-tab:: csharp - // You have to use GD.Hash(). - - public Godot.Collections.Array array1 = new Godot.Collections.Array{1, 2, 3}; - public Godot.Collections.Array array2 = new Godot.Collections.Array{1, 2, 3}; - - public void CompareArrays() + var groceries = new Godot.Collections.Dictionary{{"Orange", 20}, {"Apple", 2}, {"Banana", 4}}; + foreach (var (fruit, amount) in groceries) { - GD.Print(array1 == array2); // Will print FALSE!! - GD.Print(GD.Hash(array1) == GD.Hash(array2)); // Will print true. - } - - public Godot.Collections.Dictionary dict1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; - public Godot.Collections.Dictionary dict2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; - - public void CompareDictionaries() - { - GD.Print(dict1 == dict2); // Will NOT print true. + // `fruit` is the key, `amount` is the value. } -You need to first calculate the dictionary's hash with :ref:`hash` before you can compare them: +\ **Note:** Erasing elements while iterating over dictionaries is **not** supported and will result in unpredictable behavior. +\ **Note:** When declaring a dictionary with ``const``, the dictionary becomes read-only. A read-only Dictionary's entries cannot be overriden at run-time. This does *not* affect nested :ref:`Array` and **Dictionary** values. -.. tabs:: - - .. code-tab:: gdscript - - var dict1 = {"a": 1, "b": 2, "c": 3} - var dict2 = {"a": 1, "b": 2, "c": 3} - - func compare_dictionaries(): - print(dict1.hash() == dict2.hash()) # Will print true. - - .. code-tab:: csharp - - // You have to use GD.Hash(). - public Godot.Collections.Dictionary dict1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; - public Godot.Collections.Dictionary dict2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; - - public void CompareDictionaries() - { - GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Will print true. - } - - - -\ **Note:** When declaring a dictionary with ``const``, the dictionary itself can still be mutated by defining the values of individual keys. Using ``const`` will only prevent assigning the constant with another value after it was initialized. +.. rst-class:: classref-introduction-group Tutorials --------- @@ -243,252 +202,372 @@ Tutorials - `OS Test Demo `__ +.. rst-class:: classref-reftable-group + Constructors ------------ -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`Dictionary` **(** **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`Dictionary` **(** :ref:`Dictionary` from **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`Dictionary` **(** **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`Dictionary` **(** :ref:`Dictionary` from **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`Array` | :ref:`keys` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`merge` **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`values` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`Array` | :ref:`keys` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`merge` **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`values` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Dictionary` right **)** | -+-------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Dictionary` right **)** | -+-------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`operator []` **(** :ref:`Variant` key **)** | -+-------------------------------+--------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Dictionary` right **)** | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Dictionary` right **)** | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`operator []` **(** :ref:`Variant` key **)** | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_Dictionary_constructor_Dictionary: -- :ref:`Dictionary` **Dictionary** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``Dictionary``. +:ref:`Dictionary` **Dictionary** **(** **)** + +Constructs an empty **Dictionary**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Dictionary` **Dictionary** **(** :ref:`Dictionary` from **)** +.. rst-class:: classref-constructor -Constructs a ``Dictionary`` as a copy of the given ``Dictionary``. +:ref:`Dictionary` **Dictionary** **(** :ref:`Dictionary` from **)** + +Returns the same array as ``from``. If you need a copy of the array, use :ref:`duplicate`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Dictionary_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method -Clear the dictionary, removing all key/value pairs. +void **clear** **(** **)** + +Clears the dictionary, removing all entries from it. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_duplicate: -- :ref:`Dictionary` **duplicate** **(** :ref:`bool` deep=false **)** |const| +.. rst-class:: classref-method -Creates a copy of the dictionary, and returns it. The ``deep`` parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects. +:ref:`Dictionary` **duplicate** **(** :ref:`bool` deep=false **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_erase: -- :ref:`bool` **erase** **(** :ref:`Variant` key **)** +.. rst-class:: classref-method -Erase a dictionary key/value pair by key. Returns ``true`` if the given key was present in the dictionary, ``false`` otherwise. +:ref:`bool` **erase** **(** :ref:`Variant` key **)** -\ **Note:** Don't erase elements while iterating over the dictionary. You can iterate over the :ref:`keys` array instead. +Removes the dictionary entry by key, if it exists. Returns ``true`` if the given ``key`` existed in the dictionary, otherwise ``false``. + +\ **Note:** Do not erase entries while iterating over the dictionary. You can iterate over the :ref:`keys` array instead. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_find_key: -- :ref:`Variant` **find_key** **(** :ref:`Variant` value **)** |const| +.. rst-class:: classref-method -Returns the first key whose associated value is equal to ``value``, or ``null`` if no such value is found. +:ref:`Variant` **find_key** **(** :ref:`Variant` value **)** |const| -\ **Note:** ``null`` is also a valid key. If you have it in your ``Dictionary``, the :ref:`find_key` method can give misleading results. +Finds and returns the first key whose associated value is equal to ``value``, or ``null`` if it is not found. + +\ **Note:** ``null`` is also a valid key. If inside the dictionary, :ref:`find_key` may give misleading results. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_get: -- :ref:`Variant` **get** **(** :ref:`Variant` key, :ref:`Variant` default=null **)** |const| +.. rst-class:: classref-method -Returns the current value for the specified key in the ``Dictionary``. If the key does not exist, the method returns the value of the optional default argument, or ``null`` if it is omitted. +:ref:`Variant` **get** **(** :ref:`Variant` key, :ref:`Variant` default=null **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_has: -- :ref:`bool` **has** **(** :ref:`Variant` key **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the dictionary has a given key. +:ref:`bool` **has** **(** :ref:`Variant` key **)** |const| -\ **Note:** This is equivalent to using the ``in`` operator as follows: +Returns ``true`` if the dictionary contains an entry with the given ``key``. .. tabs:: .. code-tab:: gdscript - # Will evaluate to `true`. - if "godot" in {"godot": "engine"}: - pass + var my_dict = { + "Godot" : 4, + 210 : null, + } + + print(my_dict.has("Godot")) # Prints true + print(my_dict.has(210)) # Prints true + print(my_dict.has(4)) # Prints false .. code-tab:: csharp - // You have to use Contains() here as an alternative to GDScript's `in` operator. - if (new Godot.Collections.Dictionary{{"godot", "engine"}}.Contains("godot")) + var myDict = new Godot.Collections.Dictionary { - // I am executed. - } + { "Godot", 4 }, + { 210, default }, + }; + + GD.Print(myDict.Contains("Godot")); // Prints true + GD.Print(myDict.Contains(210)); // Prints true + GD.Print(myDict.Contains(4)); // Prints false -This method (like the ``in`` operator) will evaluate to ``true`` as long as the key exists, even if the associated value is ``null``. +In GDScript, this is equivalent to the ``in`` operator: + +:: + + if "Godot" in {"Godot": 4}: + print("The key is here!") # Will be printed. + +\ **Note:** This method returns ``true`` as long as the ``key`` exists, even if its corresponding value is ``null``. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_has_all: -- :ref:`bool` **has_all** **(** :ref:`Array` keys **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the dictionary has all the keys in the given array. +:ref:`bool` **has_all** **(** :ref:`Array` keys **)** |const| + +Returns ``true`` if the dictionary contains all keys in the given ``keys`` array. + +:: + + var data = {"width" : 10, "height" : 20} + data.has_all(["height", "width"]) # Returns true + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_hash: -- :ref:`int` **hash** **(** **)** |const| +.. rst-class:: classref-method -Returns a hashed 32-bit integer value representing the dictionary contents. This can be used to compare dictionaries by value: +:ref:`int` **hash** **(** **)** |const| + +Returns a hashed 32-bit integer value representing the dictionary contents. .. tabs:: .. code-tab:: gdscript - var dict1 = {0: 10} - var dict2 = {0: 10} - # The line below prints `true`, whereas it would have printed `false` if both variables were compared directly. - print(dict1.hash() == dict2.hash()) + var dict1 = {"A": 10, "B": 2} + var dict2 = {"A": 10, "B": 2} + + print(dict1.hash() == dict2.hash()) # Prints true .. code-tab:: csharp - var dict1 = new Godot.Collections.Dictionary{{0, 10}}; - var dict2 = new Godot.Collections.Dictionary{{0, 10}}; - // The line below prints `true`, whereas it would have printed `false` if both variables were compared directly. - // Dictionary has no Hash() method. Use GD.Hash() instead. - GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); + var dict1 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; + var dict2 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; + + // Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead. + GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints true -\ **Note:** Dictionaries with the same keys/values but in a different order will have a different hash. +\ **Note:** Dictionaries with the same entries but in a different order will not have the same hash. -\ **Note:** Dictionaries with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the dictionaries are equal, because different dictionaries can have identical hash values due to hash collisions. +\ **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. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the dictionary is empty. +:ref:`bool` **is_empty** **(** **)** |const| + +Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:`size`. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_keys: -- :ref:`Array` **keys** **(** **)** |const| +.. rst-class:: classref-method -Returns the list of keys in the ``Dictionary``. +:ref:`Array` **keys** **(** **)** |const| + +Returns the list of keys in the dictionary. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_merge: -- void **merge** **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** +.. rst-class:: classref-method -Adds elements from ``dictionary`` to this ``Dictionary``. By default, duplicate keys will not be copied over, unless ``overwrite`` is ``true``. +void **merge** **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** + +Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of keys in the dictionary. +:ref:`int` **size** **(** **)** |const| + +Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) always return ``0``. See also :ref:`is_empty`. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_method_values: -- :ref:`Array` **values** **(** **)** |const| +.. rst-class:: classref-method -Returns the list of values in the ``Dictionary``. +:ref:`Array` **values** **(** **)** |const| + +Returns the list of values in this dictionary. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Dictionary_operator_neq_bool: +.. _class_Dictionary_operator_neq_Dictionary: -- :ref:`bool` **operator !=** **(** :ref:`Dictionary` right **)** +.. rst-class:: classref-operator -Returns ``true`` if the dictionaries differ, i.e. their key or value lists are different (including the order). +:ref:`bool` **operator !=** **(** :ref:`Dictionary` right **)** + +Returns ``true`` if the two dictionaries do not contain the same keys and values. + +.. rst-class:: classref-item-separator ---- -.. _class_Dictionary_operator_eq_bool: +.. _class_Dictionary_operator_eq_Dictionary: -- :ref:`bool` **operator ==** **(** :ref:`Dictionary` right **)** +.. rst-class:: classref-operator -Returns ``true`` if both dictionaries have the same contents, i.e. their keys list and value list are equal. +:ref:`bool` **operator ==** **(** :ref:`Dictionary` right **)** + +Returns ``true`` if the two dictionaries contain the same keys and values. The order of the entries does not matter. + +\ **Note:** In C#, by convention, this operator compares by **reference**. If you need to compare by value, iterate over both dictionaries. + +.. rst-class:: classref-item-separator ---- .. _class_Dictionary_operator_idx_Variant: -- :ref:`Variant` **operator []** **(** :ref:`Variant` key **)** +.. rst-class:: classref-operator -Returns a value at the given ``key`` or ``null`` and error if the key does not exist. For safe access, use :ref:`get` or :ref:`has`. +:ref:`Variant` **operator []** **(** :ref:`Variant` key **)** + +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`. .. |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.)` diff --git a/classes/class_diraccess.rst b/classes/class_diraccess.rst index 14e51618d..0a1fae44c 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -14,14 +14,16 @@ DirAccess Type used to handle the filesystem. +.. rst-class:: classref-introduction-group + Description ----------- Directory type. It is used to manage directories and their content (not restricted to the project folder). -\ ``DirAccess`` can't be instantiated directly. Instead it is created with a static method that takes a path for which it will be opened. +\ **DirAccess** can't be instantiated directly. Instead it is created with a static method that takes a path for which it will be opened. -Most of the methods have a static alternative that can be used without creating a ``DirAccess``. Static methods only support absolute paths (including ``res://`` and ``user://``). +Most of the methods have a static alternative that can be used without creating a **DirAccess**. Static methods only support absolute paths (including ``res://`` and ``user://``). :: @@ -84,132 +86,166 @@ Here is an example on how to iterate through the files of a directory: +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`File system <../tutorials/scripting/filesystem>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+----------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`include_hidden` | -+-------------------------+----------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`include_navigational` | -+-------------------------+----------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`include_hidden` | + +-------------------------+----------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`include_navigational` | + +-------------------------+----------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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| | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_DirAccess_property_include_hidden: -- :ref:`bool` **include_hidden** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_include_hidden(value) | -+----------+---------------------------+ -| *Getter* | get_include_hidden() | -+----------+---------------------------+ +:ref:`bool` **include_hidden** + +.. rst-class:: classref-property-setget + +- void **set_include_hidden** **(** :ref:`bool` value **)** +- :ref:`bool` **get_include_hidden** **(** **)** If ``true``, hidden files are included when the navigating directory. Affects :ref:`list_dir_begin`, :ref:`get_directories` and :ref:`get_files`. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_property_include_navigational: -- :ref:`bool` **include_navigational** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_include_navigational(value) | -+----------+---------------------------------+ -| *Getter* | get_include_navigational() | -+----------+---------------------------------+ +:ref:`bool` **include_navigational** + +.. rst-class:: classref-property-setget + +- void **set_include_navigational** **(** :ref:`bool` value **)** +- :ref:`bool` **get_include_navigational** **(** **)** If ``true``, ``.`` and ``..`` are included when navigating the directory. Affects :ref:`list_dir_begin` and :ref:`get_directories`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_DirAccess_method_change_dir: -- :ref:`Error` **change_dir** **(** :ref:`String` to_dir **)** +.. rst-class:: classref-method + +:ref:`Error` **change_dir** **(** :ref:`String` to_dir **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_copy: -- :ref:`Error` **copy** **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** +.. rst-class:: classref-method + +:ref:`Error` **copy** **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** 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. @@ -217,89 +253,129 @@ If ``chmod_flags`` is different than ``-1``, the Unix permissions for the destin Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_copy_absolute: -- :ref:`Error` **copy_absolute** **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** |static| +.. rst-class:: classref-method + +:ref:`Error` **copy_absolute** **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** |static| Static version of :ref:`copy`. Supports only absolute paths. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_current_is_dir: -- :ref:`bool` **current_is_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **current_is_dir** **(** **)** |const| Returns whether the current item processed with the last :ref:`get_next` call is a directory (``.`` and ``..`` are considered directories). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_dir_exists: -- :ref:`bool` **dir_exists** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`bool` **dir_exists** **(** :ref:`String` path **)** Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_dir_exists_absolute: -- :ref:`bool` **dir_exists_absolute** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`bool` **dir_exists_absolute** **(** :ref:`String` path **)** |static| Static version of :ref:`dir_exists`. Supports only absolute paths. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_file_exists: -- :ref:`bool` **file_exists** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`bool` **file_exists** **(** :ref:`String` path **)** Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. For a static equivalent, use :ref:`FileAccess.file_exists`. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_current_dir: -- :ref:`String` **get_current_dir** **(** :ref:`bool` include_drive=true **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_current_dir** **(** :ref:`bool` include_drive=true **)** |const| Returns the absolute path to the currently opened directory (e.g. ``res://folder`` or ``C:\tmp\folder``). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_current_drive: -- :ref:`int` **get_current_drive** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_current_drive** **(** **)** Returns the currently opened directory's drive index. See :ref:`get_drive_name` to convert returned index to the name of the drive. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_directories: -- :ref:`PackedStringArray` **get_directories** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_directories** **(** **)** Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding files. The array is sorted alphabetically. Affected by :ref:`include_hidden` and :ref:`include_navigational`. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_directories_at: -- :ref:`PackedStringArray` **get_directories_at** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_directories_at** **(** :ref:`String` path **)** |static| Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding files, at the given ``path``. The array is sorted alphabetically. Use :ref:`get_directories` if you want more control of what gets included. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_drive_count: -- :ref:`int` **get_drive_count** **(** **)** |static| +.. rst-class:: classref-method + +:ref:`int` **get_drive_count** **(** **)** |static| On Windows, returns the number of drives (partitions) mounted on the current filesystem. @@ -309,11 +385,15 @@ On Linux, returns the number of mounted volumes and GTK 3 bookmarks. On other platforms, the method returns 0. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_drive_name: -- :ref:`String` **get_drive_name** **(** :ref:`int` idx **)** |static| +.. rst-class:: classref-method + +:ref:`String` **get_drive_name** **(** :ref:`int` idx **)** |static| On Windows, returns the name of the drive (partition) passed as an argument (e.g. ``C:``). @@ -323,57 +403,81 @@ On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an On other platforms, or if the requested drive does not exist, the method returns an empty String. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_files: -- :ref:`PackedStringArray` **get_files** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_files** **(** **)** Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding directories. The array is sorted alphabetically. Affected by :ref:`include_hidden`. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_files_at: -- :ref:`PackedStringArray` **get_files_at** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_files_at** **(** :ref:`String` path **)** |static| Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding directories, at the given ``path``. The array is sorted alphabetically. Use :ref:`get_files` if you want more control of what gets included. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_next: -- :ref:`String` **get_next** **(** **)** +.. rst-class:: classref-method + +:ref:`String` **get_next** **(** **)** Returns the next element (file or directory) in the current directory. The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty :ref:`String` and closes the stream automatically (i.e. :ref:`list_dir_end` would not be mandatory in such a case). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_open_error: -- :ref:`Error` **get_open_error** **(** **)** |static| +.. rst-class:: classref-method + +:ref:`Error` **get_open_error** **(** **)** |static| Returns the result of the last :ref:`open` call in the current thread. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_get_space_left: -- :ref:`int` **get_space_left** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_space_left** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_list_dir_begin: -- :ref:`Error` **list_dir_begin** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **list_dir_begin** **(** **)** 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`. @@ -381,65 +485,93 @@ Affected by :ref:`include_hidden` and : \ **Note:** The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use :ref:`get_files` or :ref:`get_directories`. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_list_dir_end: -- void **list_dir_end** **(** **)** +.. rst-class:: classref-method + +void **list_dir_end** **(** **)** Closes the current stream opened with :ref:`list_dir_begin` (whether it has been fully processed with :ref:`get_next` does not matter). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_make_dir: -- :ref:`Error` **make_dir** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **make_dir** **(** :ref:`String` path **)** 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`). Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_make_dir_absolute: -- :ref:`Error` **make_dir_absolute** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`Error` **make_dir_absolute** **(** :ref:`String` path **)** |static| Static version of :ref:`make_dir`. Supports only absolute paths. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_make_dir_recursive: -- :ref:`Error` **make_dir_recursive** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **make_dir_recursive** **(** :ref:`String` path **)** 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. Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_make_dir_recursive_absolute: -- :ref:`Error` **make_dir_recursive_absolute** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`Error` **make_dir_recursive_absolute** **(** :ref:`String` path **)** |static| Static version of :ref:`make_dir_recursive`. Supports only absolute paths. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_open: -- :ref:`DirAccess` **open** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method -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``). +:ref:`DirAccess` **open** **(** :ref:`String` path **)** |static| + +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``). Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error` to check the error that occurred. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_remove: -- :ref:`Error` **remove** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **remove** **(** :ref:`String` path **)** 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. @@ -447,29 +579,41 @@ If you don't want to delete the file/directory permanently, use :ref:`OS.move_to Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_remove_absolute: -- :ref:`Error` **remove_absolute** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`Error` **remove_absolute** **(** :ref:`String` path **)** |static| Static version of :ref:`remove`. Supports only absolute paths. +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_rename: -- :ref:`Error` **rename** **(** :ref:`String` from, :ref:`String` to **)** +.. rst-class:: classref-method + +:ref:`Error` **rename** **(** :ref:`String` from, :ref:`String` to **)** 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. Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +.. rst-class:: classref-item-separator + ---- .. _class_DirAccess_method_rename_absolute: -- :ref:`Error` **rename_absolute** **(** :ref:`String` from, :ref:`String` to **)** |static| +.. rst-class:: classref-method + +:ref:`Error` **rename_absolute** **(** :ref:`String` from, :ref:`String` to **)** |static| Static version of :ref:`rename`. Supports only absolute paths. diff --git a/classes/class_directionallight2d.rst b/classes/class_directionallight2d.rst index 2b730cdd8..3909342d9 100644 --- a/classes/class_directionallight2d.rst +++ b/classes/class_directionallight2d.rst @@ -12,54 +12,74 @@ DirectionalLight2D **Inherits:** :ref:`Light2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Directional light from a distance. +Directional 2D light from a distance. + +.. rst-class:: classref-introduction-group Description ----------- A directional light is a type of :ref:`Light2D` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene (for example: to model sunlight or moonlight). +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>` + +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`height` | ``0.0`` | -+---------------------------+---------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`max_distance` | ``10000.0`` | -+---------------------------+---------------------------------------------------------------------+-------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`height` | ``0.0`` | + +---------------------------+---------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`max_distance` | ``10000.0`` | + +---------------------------+---------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_DirectionalLight2D_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :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). +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight2D_property_max_distance: -- :ref:`float` **max_distance** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``10000.0`` | -+-----------+-------------------------+ -| *Setter* | set_max_distance(value) | -+-----------+-------------------------+ -| *Getter* | get_max_distance() | -+-----------+-------------------------+ +:ref:`float` **max_distance** = ``10000.0`` -Maximum distance this light covers. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (due to more objects being included in shadow rendering). +.. rst-class:: classref-property-setget + +- void **set_max_distance** **(** :ref:`float` value **)** +- :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. .. |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.)` diff --git a/classes/class_directionallight3d.rst b/classes/class_directionallight3d.rst index 33cc9b9c1..fca64ccad 100644 --- a/classes/class_directionallight3d.rst +++ b/classes/class_directionallight3d.rst @@ -14,220 +14,278 @@ DirectionalLight3D Directional light from a distance, as from the Sun. +.. rst-class:: classref-introduction-group + Description ----------- A directional light is a type of :ref:`Light3D` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Lights and shadows <../tutorials/3d/lights_and_shadows>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`directional_shadow_blend_splits` | ``false`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`directional_shadow_fade_start` | ``0.8`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`directional_shadow_max_distance` | ``100.0`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`ShadowMode` | :ref:`directional_shadow_mode` | ``2`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`directional_shadow_pancake_size` | ``20.0`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`directional_shadow_split_1` | ``0.1`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`directional_shadow_split_2` | ``0.2`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`directional_shadow_split_3` | ``0.5`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`SkyMode` | :ref:`sky_mode` | ``0`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`directional_shadow_blend_splits` | ``false`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`directional_shadow_fade_start` | ``0.8`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`directional_shadow_max_distance` | ``100.0`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`ShadowMode` | :ref:`directional_shadow_mode` | ``2`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`directional_shadow_pancake_size` | ``20.0`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`directional_shadow_split_1` | ``0.1`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`directional_shadow_split_2` | ``0.2`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`directional_shadow_split_3` | ``0.5`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`SkyMode` | :ref:`sky_mode` | ``0`` | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_DirectionalLight3D_ShadowMode: -.. _class_DirectionalLight3D_constant_SHADOW_ORTHOGONAL: - -.. _class_DirectionalLight3D_constant_SHADOW_PARALLEL_2_SPLITS: - -.. _class_DirectionalLight3D_constant_SHADOW_PARALLEL_4_SPLITS: +.. rst-class:: classref-enumeration enum **ShadowMode**: -- **SHADOW_ORTHOGONAL** = **0** --- Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects. +.. _class_DirectionalLight3D_constant_SHADOW_ORTHOGONAL: -- **SHADOW_PARALLEL_2_SPLITS** = **1** --- Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between :ref:`SHADOW_ORTHOGONAL` and :ref:`SHADOW_PARALLEL_4_SPLITS` in terms of performance. +.. rst-class:: classref-enumeration-constant -- **SHADOW_PARALLEL_4_SPLITS** = **2** --- Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. +:ref:`ShadowMode` **SHADOW_ORTHOGONAL** = ``0`` + +Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects. + +.. _class_DirectionalLight3D_constant_SHADOW_PARALLEL_2_SPLITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowMode` **SHADOW_PARALLEL_2_SPLITS** = ``1`` + +Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between :ref:`SHADOW_ORTHOGONAL` and :ref:`SHADOW_PARALLEL_4_SPLITS` in terms of performance. + +.. _class_DirectionalLight3D_constant_SHADOW_PARALLEL_4_SPLITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowMode` **SHADOW_PARALLEL_4_SPLITS** = ``2`` + +Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. + +.. rst-class:: classref-item-separator ---- .. _enum_DirectionalLight3D_SkyMode: -.. _class_DirectionalLight3D_constant_SKY_MODE_LIGHT_AND_SKY: - -.. _class_DirectionalLight3D_constant_SKY_MODE_LIGHT_ONLY: - -.. _class_DirectionalLight3D_constant_SKY_MODE_SKY_ONLY: +.. rst-class:: classref-enumeration enum **SkyMode**: -- **SKY_MODE_LIGHT_AND_SKY** = **0** --- Makes the light visible in both scene lighting and sky rendering. +.. _class_DirectionalLight3D_constant_SKY_MODE_LIGHT_AND_SKY: -- **SKY_MODE_LIGHT_ONLY** = **1** --- Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders. +.. rst-class:: classref-enumeration-constant -- **SKY_MODE_SKY_ONLY** = **2** --- Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example). +:ref:`SkyMode` **SKY_MODE_LIGHT_AND_SKY** = ``0`` + +Makes the light visible in both scene lighting and sky rendering. + +.. _class_DirectionalLight3D_constant_SKY_MODE_LIGHT_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkyMode` **SKY_MODE_LIGHT_ONLY** = ``1`` + +Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders. + +.. _class_DirectionalLight3D_constant_SKY_MODE_SKY_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkyMode` **SKY_MODE_SKY_ONLY** = ``2`` + +Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_DirectionalLight3D_property_directional_shadow_blend_splits: -- :ref:`bool` **directional_shadow_blend_splits** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_blend_splits(value) | -+-----------+---------------------------+ -| *Getter* | is_blend_splits_enabled() | -+-----------+---------------------------+ +:ref:`bool` **directional_shadow_blend_splits** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_blend_splits** **(** :ref:`bool` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_directional_shadow_fade_start: -- :ref:`float` **directional_shadow_fade_start** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.8`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **directional_shadow_fade_start** = ``0.8`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :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). +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_directional_shadow_max_distance: -- :ref:`float` **directional_shadow_max_distance** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``100.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **directional_shadow_max_distance** = ``100.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :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). +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_directional_shadow_mode: -- :ref:`ShadowMode` **directional_shadow_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``2`` | -+-----------+------------------------+ -| *Setter* | set_shadow_mode(value) | -+-----------+------------------------+ -| *Getter* | get_shadow_mode() | -+-----------+------------------------+ +:ref:`ShadowMode` **directional_shadow_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_mode** **(** :ref:`ShadowMode` value **)** +- :ref:`ShadowMode` **get_shadow_mode** **(** **)** The light's shadow rendering algorithm. See :ref:`ShadowMode`. +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_directional_shadow_pancake_size: -- :ref:`float` **directional_shadow_pancake_size** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``20.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **directional_shadow_pancake_size** = ``20.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_directional_shadow_split_1: -- :ref:`float` **directional_shadow_split_1** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.1`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **directional_shadow_split_1** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_directional_shadow_split_2: -- :ref:`float` **directional_shadow_split_2** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.2`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **directional_shadow_split_2** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_directional_shadow_split_3: -- :ref:`float` **directional_shadow_split_3** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.5`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **directional_shadow_split_3** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :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`. +.. rst-class:: classref-item-separator + ---- .. _class_DirectionalLight3D_property_sky_mode: -- :ref:`SkyMode` **sky_mode** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_sky_mode(value) | -+-----------+---------------------+ -| *Getter* | get_sky_mode() | -+-----------+---------------------+ +:ref:`SkyMode` **sky_mode** = ``0`` -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. +.. rst-class:: classref-property-setget + +- void **set_sky_mode** **(** :ref:`SkyMode` value **)** +- :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. .. |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.)` diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 39c56a8aa..f09fce961 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -14,616 +14,903 @@ DisplayServer Singleton for window management functions. +.. rst-class:: classref-introduction-group + Description ----------- -``DisplayServer`` handles everything related to window management. This is separated from :ref:`OS` as a single operating system may support multiple display servers. +**DisplayServer** handles everything related to window management. This is separated from :ref:`OS` as a single operating system may support multiple display servers. -\ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from ``DisplayServer`` will return dummy values in this case. +\ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from **DisplayServer** will return dummy values in this case. + +.. rst-class:: classref-reftable-group Methods ------- -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`String` | :ref:`get_name` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_screen_count` **(** **)** |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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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:`int` | :ref:`keyboard_get_current_layout` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Key` | :ref:`keyboard_get_keycode_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 **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MouseButton` | :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:`float` | :ref:`screen_get_max_scale` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |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| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`screen_is_touchscreen` **(** :ref:`int` screen=-1 **)** |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_real_size` **(** :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:`VSyncMode` | :ref:`window_get_vsync_mode` **(** :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 **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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:`String` | :ref:`get_name` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_screen_count` **(** **)** |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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Callable` key_callback, :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, :ref:`Callable` key_callback, :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:`int` | :ref:`keyboard_get_current_layout` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`keyboard_get_keycode_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 **)** | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MouseButton` | :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:`float` | :ref:`screen_get_max_scale` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |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| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen_is_touchscreen` **(** :ref:`int` screen=-1 **)** |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_real_size` **(** :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:`VSyncMode` | :ref:`window_get_vsync_mode` **(** :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 **)** | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_DisplayServer_Feature: -.. _class_DisplayServer_constant_FEATURE_GLOBAL_MENU: - -.. _class_DisplayServer_constant_FEATURE_SUBWINDOWS: - -.. _class_DisplayServer_constant_FEATURE_TOUCHSCREEN: - -.. _class_DisplayServer_constant_FEATURE_MOUSE: - -.. _class_DisplayServer_constant_FEATURE_MOUSE_WARP: - -.. _class_DisplayServer_constant_FEATURE_CLIPBOARD: - -.. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD: - -.. _class_DisplayServer_constant_FEATURE_CURSOR_SHAPE: - -.. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE: - -.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG: - -.. _class_DisplayServer_constant_FEATURE_IME: - -.. _class_DisplayServer_constant_FEATURE_WINDOW_TRANSPARENCY: - -.. _class_DisplayServer_constant_FEATURE_HIDPI: - -.. _class_DisplayServer_constant_FEATURE_ICON: - -.. _class_DisplayServer_constant_FEATURE_NATIVE_ICON: - -.. _class_DisplayServer_constant_FEATURE_ORIENTATION: - -.. _class_DisplayServer_constant_FEATURE_SWAP_BUFFERS: - -.. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY: - -.. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH: - -.. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE: +.. rst-class:: classref-enumeration enum **Feature**: -- **FEATURE_GLOBAL_MENU** = **0** --- 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_GLOBAL_MENU: -- **FEATURE_SUBWINDOWS** = **1** --- Display server supports multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)** +.. rst-class:: classref-enumeration-constant -- **FEATURE_TOUCHSCREEN** = **2** --- Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, Web** +:ref:`Feature` **FEATURE_GLOBAL_MENU** = ``0`` -- **FEATURE_MOUSE** = **3** --- Display server supports mouse input. **Windows, macOS, Linux (X11), Android, Web** +Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS** -- **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)** +.. _class_DisplayServer_constant_FEATURE_SUBWINDOWS: -- **FEATURE_CLIPBOARD** = **5** --- Display server supports setting and getting clipboard data. See also :ref:`FEATURE_CLIPBOARD_PRIMARY`. **Windows, macOS, Linux (X11), Android, iOS, Web** +.. rst-class:: classref-enumeration-constant -- **FEATURE_VIRTUAL_KEYBOARD** = **6** --- Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web** +:ref:`Feature` **FEATURE_SUBWINDOWS** = ``1`` -- **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 multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)** -- **FEATURE_CUSTOM_CURSOR_SHAPE** = **8** --- Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11), Web** +.. _class_DisplayServer_constant_FEATURE_TOUCHSCREEN: -- **FEATURE_NATIVE_DIALOG** = **9** --- Display server supports spawning dialogs using the operating system's native look-and-feel. **macOS** +.. rst-class:: classref-enumeration-constant -- **FEATURE_IME** = **10** --- Display server supports `Input Method Editor `__, which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. **Windows, macOS, Linux (X11)** +:ref:`Feature` **FEATURE_TOUCHSCREEN** = ``2`` -- **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 touchscreen input. **Windows, Linux (X11), Android, iOS, Web** -- **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** +.. _class_DisplayServer_constant_FEATURE_MOUSE: -- **FEATURE_ICON** = **13** --- Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)** +.. rst-class:: classref-enumeration-constant -- **FEATURE_NATIVE_ICON** = **14** --- Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS** +:ref:`Feature` **FEATURE_MOUSE** = ``3`` -- **FEATURE_ORIENTATION** = **15** --- Display server supports changing the screen orientation. **Android, iOS** +Display server supports mouse input. **Windows, macOS, Linux (X11), Android, Web** -- **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)** +.. _class_DisplayServer_constant_FEATURE_MOUSE_WARP: -- **FEATURE_CLIPBOARD_PRIMARY** = **18** --- Display server supports Primary clipboard can be used. This is a different clipboard from :ref:`FEATURE_CLIPBOARD`. **Linux (X11)** +.. rst-class:: classref-enumeration-constant -- **FEATURE_TEXT_TO_SPEECH** = **19** --- Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11), Android, iOS, Web** +:ref:`Feature` **FEATURE_MOUSE_WARP** = ``4`` -- **FEATURE_EXTEND_TO_TITLE** = **20** --- Display server supports expanding window content to the title. See :ref:`WINDOW_FLAG_EXTEND_TO_TITLE`. **macOS** +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)** + +.. _class_DisplayServer_constant_FEATURE_CLIPBOARD: + +.. rst-class:: classref-enumeration-constant + +: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** + +.. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_VIRTUAL_KEYBOARD** = ``6`` + +Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web** + +.. _class_DisplayServer_constant_FEATURE_CURSOR_SHAPE: + +.. rst-class:: classref-enumeration-constant + +: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** + +.. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_CUSTOM_CURSOR_SHAPE** = ``8`` + +Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11), Web** + +.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_DIALOG** = ``9`` + +Display server supports spawning dialogs using the operating system's native look-and-feel. **macOS** + +.. _class_DisplayServer_constant_FEATURE_IME: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_IME** = ``10`` + +Display server supports `Input Method Editor `__, which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. **Windows, macOS, Linux (X11)** + +.. _class_DisplayServer_constant_FEATURE_WINDOW_TRANSPARENCY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **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)** + +.. _class_DisplayServer_constant_FEATURE_HIDPI: + +.. rst-class:: classref-enumeration-constant + +: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** + +.. _class_DisplayServer_constant_FEATURE_ICON: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_ICON** = ``13`` + +Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)** + +.. _class_DisplayServer_constant_FEATURE_NATIVE_ICON: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_ICON** = ``14`` + +Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS** + +.. _class_DisplayServer_constant_FEATURE_ORIENTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_ORIENTATION** = ``15`` + +Display server supports changing the screen orientation. **Android, iOS** + +.. _class_DisplayServer_constant_FEATURE_SWAP_BUFFERS: + +.. rst-class:: classref-enumeration-constant + +: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)** + +.. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY: + +.. rst-class:: classref-enumeration-constant + +: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)** + +.. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_TEXT_TO_SPEECH** = ``19`` + +Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11), Android, iOS, Web** + +.. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_EXTEND_TO_TITLE** = ``20`` + +Display server supports expanding window content to the title. See :ref:`WINDOW_FLAG_EXTEND_TO_TITLE`. **macOS** + +.. rst-class:: classref-item-separator ---- .. _enum_DisplayServer_MouseMode: -.. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE: - -.. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN: - -.. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED: - -.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED: - -.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN: +.. rst-class:: classref-enumeration enum **MouseMode**: -- **MOUSE_MODE_VISIBLE** = **0** --- Makes the mouse cursor visible if it is hidden. +.. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE: -- **MOUSE_MODE_HIDDEN** = **1** --- Makes the mouse cursor hidden if it is visible. +.. rst-class:: classref-enumeration-constant -- **MOUSE_MODE_CAPTURED** = **2** --- Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. +:ref:`MouseMode` **MOUSE_MODE_VISIBLE** = ``0`` + +Makes the mouse cursor visible if it is hidden. + +.. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_HIDDEN** = ``1`` + +Makes the mouse cursor hidden if it is visible. + +.. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CAPTURED** = ``2`` + +Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. \ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative`. -- **MOUSE_MODE_CONFINED** = **3** --- Confines the mouse cursor to the game window, and make it visible. +.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED: -- **MOUSE_MODE_CONFINED_HIDDEN** = **4** --- Confines the mouse cursor to the game window, and make it hidden. +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CONFINED** = ``3`` + +Confines the mouse cursor to the game window, and make it visible. + +.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CONFINED_HIDDEN** = ``4`` + +Confines the mouse cursor to the game window, and make it hidden. + +.. rst-class:: classref-item-separator ---- .. _enum_DisplayServer_ScreenOrientation: -.. _class_DisplayServer_constant_SCREEN_LANDSCAPE: - -.. _class_DisplayServer_constant_SCREEN_PORTRAIT: - -.. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE: - -.. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT: - -.. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE: - -.. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT: - -.. _class_DisplayServer_constant_SCREEN_SENSOR: +.. rst-class:: classref-enumeration enum **ScreenOrientation**: -- **SCREEN_LANDSCAPE** = **0** --- Default landscape orientation. +.. _class_DisplayServer_constant_SCREEN_LANDSCAPE: -- **SCREEN_PORTRAIT** = **1** --- Default portrait orienstation. +.. rst-class:: classref-enumeration-constant -- **SCREEN_REVERSE_LANDSCAPE** = **2** --- Reverse landscape orientation (upside down). +:ref:`ScreenOrientation` **SCREEN_LANDSCAPE** = ``0`` -- **SCREEN_REVERSE_PORTRAIT** = **3** --- Reverse portrait orientation (upside down). +Default landscape orientation. -- **SCREEN_SENSOR_LANDSCAPE** = **4** --- Automatic landscape orientation (default or reverse depending on sensor). +.. _class_DisplayServer_constant_SCREEN_PORTRAIT: -- **SCREEN_SENSOR_PORTRAIT** = **5** --- Automatic portrait orientation (default or reverse depending on sensor). +.. rst-class:: classref-enumeration-constant -- **SCREEN_SENSOR** = **6** --- Automatic landscape or portrait orientation (default or reverse depending on sensor). +:ref:`ScreenOrientation` **SCREEN_PORTRAIT** = ``1`` + +Default portrait orienstation. + +.. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_REVERSE_LANDSCAPE** = ``2`` + +Reverse landscape orientation (upside down). + +.. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_REVERSE_PORTRAIT** = ``3`` + +Reverse portrait orientation (upside down). + +.. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_SENSOR_LANDSCAPE** = ``4`` + +Automatic landscape orientation (default or reverse depending on sensor). + +.. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_SENSOR_PORTRAIT** = ``5`` + +Automatic portrait orientation (default or reverse depending on sensor). + +.. _class_DisplayServer_constant_SCREEN_SENSOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_SENSOR** = ``6`` + +Automatic landscape or portrait orientation (default or reverse depending on sensor). + +.. rst-class:: classref-item-separator ---- .. _enum_DisplayServer_VirtualKeyboardType: -.. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT: - -.. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE: - -.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER: - -.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: - -.. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE: - -.. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: - -.. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD: - -.. _class_DisplayServer_constant_KEYBOARD_TYPE_URL: +.. rst-class:: classref-enumeration enum **VirtualKeyboardType**: -- **KEYBOARD_TYPE_DEFAULT** = **0** --- Default text virtual keyboard. +.. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT: -- **KEYBOARD_TYPE_MULTILINE** = **1** --- Multiline virtual keyboard. +.. rst-class:: classref-enumeration-constant -- **KEYBOARD_TYPE_NUMBER** = **2** --- Virtual number keypad, useful for PIN entry. +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_DEFAULT** = ``0`` -- **KEYBOARD_TYPE_NUMBER_DECIMAL** = **3** --- Virtual number keypad, useful for entering fractional numbers. +Default text virtual keyboard. -- **KEYBOARD_TYPE_PHONE** = **4** --- Virtual phone number keypad. +.. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE: -- **KEYBOARD_TYPE_EMAIL_ADDRESS** = **5** --- Virtual keyboard with additional keys to assist with typing email addresses. +.. rst-class:: classref-enumeration-constant -- **KEYBOARD_TYPE_PASSWORD** = **6** --- Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_MULTILINE** = ``1`` + +Multiline virtual keyboard. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER** = ``2`` + +Virtual number keypad, useful for PIN entry. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3`` + +Virtual number keypad, useful for entering fractional numbers. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PHONE** = ``4`` + +Virtual phone number keypad. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5`` + +Virtual keyboard with additional keys to assist with typing email addresses. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PASSWORD** = ``6`` + +Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT`. -- **KEYBOARD_TYPE_URL** = **7** --- Virtual keyboard with additional keys to assist with typing URLs. +.. _class_DisplayServer_constant_KEYBOARD_TYPE_URL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_URL** = ``7`` + +Virtual keyboard with additional keys to assist with typing URLs. + +.. rst-class:: classref-item-separator ---- .. _enum_DisplayServer_CursorShape: -.. _class_DisplayServer_constant_CURSOR_ARROW: - -.. _class_DisplayServer_constant_CURSOR_IBEAM: - -.. _class_DisplayServer_constant_CURSOR_POINTING_HAND: - -.. _class_DisplayServer_constant_CURSOR_CROSS: - -.. _class_DisplayServer_constant_CURSOR_WAIT: - -.. _class_DisplayServer_constant_CURSOR_BUSY: - -.. _class_DisplayServer_constant_CURSOR_DRAG: - -.. _class_DisplayServer_constant_CURSOR_CAN_DROP: - -.. _class_DisplayServer_constant_CURSOR_FORBIDDEN: - -.. _class_DisplayServer_constant_CURSOR_VSIZE: - -.. _class_DisplayServer_constant_CURSOR_HSIZE: - -.. _class_DisplayServer_constant_CURSOR_BDIAGSIZE: - -.. _class_DisplayServer_constant_CURSOR_FDIAGSIZE: - -.. _class_DisplayServer_constant_CURSOR_MOVE: - -.. _class_DisplayServer_constant_CURSOR_VSPLIT: - -.. _class_DisplayServer_constant_CURSOR_HSPLIT: - -.. _class_DisplayServer_constant_CURSOR_HELP: - -.. _class_DisplayServer_constant_CURSOR_MAX: +.. rst-class:: classref-enumeration enum **CursorShape**: -- **CURSOR_ARROW** = **0** --- Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a :ref:`LineEdit` or :ref:`TextEdit`. +.. _class_DisplayServer_constant_CURSOR_ARROW: -- **CURSOR_IBEAM** = **1** --- I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as :ref:`LineEdit` or :ref:`TextEdit`. +.. rst-class:: classref-enumeration-constant -- **CURSOR_POINTING_HAND** = **2** --- Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton` or an URL tag in a :ref:`RichTextLabel`.⋅ +:ref:`CursorShape` **CURSOR_ARROW** = ``0`` -- **CURSOR_CROSS** = **3** --- Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. +Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a :ref:`LineEdit` or :ref:`TextEdit`. -- **CURSOR_WAIT** = **4** --- Wait cursor. On most cursor themes, this displays a spinning icon *besides* the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also :ref:`CURSOR_BUSY`. +.. _class_DisplayServer_constant_CURSOR_IBEAM: -- **CURSOR_BUSY** = **5** --- Wait cursor. On most cursor themes, this *replaces* the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also :ref:`CURSOR_WAIT`. +.. rst-class:: classref-enumeration-constant -- **CURSOR_DRAG** = **6** --- Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP`. +:ref:`CursorShape` **CURSOR_IBEAM** = ``1`` -- **CURSOR_CAN_DROP** = **7** --- "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a :ref:`Control` that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also :ref:`CURSOR_DRAG`. +I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as :ref:`LineEdit` or :ref:`TextEdit`. -- **CURSOR_FORBIDDEN** = **8** --- Forbidden cursor. This is displayed during drag-and-drop operations if the hovered :ref:`Control` can't accept the drag-and-drop event. +.. _class_DisplayServer_constant_CURSOR_POINTING_HAND: -- **CURSOR_VSIZE** = **9** --- Vertical resize cursor. Intended to be displayed when the hovered :ref:`Control` can be vertically resized using the mouse. See also :ref:`CURSOR_VSPLIT`. +.. rst-class:: classref-enumeration-constant -- **CURSOR_HSIZE** = **10** --- Horizontal resize cursor. Intended to be displayed when the hovered :ref:`Control` can be horizontally resized using the mouse. See also :ref:`CURSOR_HSPLIT`. +:ref:`CursorShape` **CURSOR_POINTING_HAND** = ``2`` -- **CURSOR_BDIAGSIZE** = **11** --- Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. +Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton` or an URL tag in a :ref:`RichTextLabel`.⋅ -- **CURSOR_FDIAGSIZE** = **12** --- Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. +.. _class_DisplayServer_constant_CURSOR_CROSS: -- **CURSOR_MOVE** = **13** --- Move cursor. Intended to be displayed when the hovered :ref:`Control` can be moved using the mouse. +.. rst-class:: classref-enumeration-constant -- **CURSOR_VSPLIT** = **14** --- Vertical split cursor. This is displayed when hovering a :ref:`Control` with splits that can be vertically resized using the mouse, such as :ref:`VSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_VSIZE`. +:ref:`CursorShape` **CURSOR_CROSS** = ``3`` -- **CURSOR_HSPLIT** = **15** --- Horizontal split cursor. This is displayed when hovering a :ref:`Control` with splits that can be horizontally resized using the mouse, such as :ref:`HSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_HSIZE`. +Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. -- **CURSOR_HELP** = **16** --- Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. +.. _class_DisplayServer_constant_CURSOR_WAIT: -- **CURSOR_MAX** = **17** --- Represents the size of the :ref:`CursorShape` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_WAIT** = ``4`` + +Wait cursor. On most cursor themes, this displays a spinning icon *besides* the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also :ref:`CURSOR_BUSY`. + +.. _class_DisplayServer_constant_CURSOR_BUSY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_BUSY** = ``5`` + +Wait cursor. On most cursor themes, this *replaces* the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also :ref:`CURSOR_WAIT`. + +.. _class_DisplayServer_constant_CURSOR_DRAG: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_DRAG** = ``6`` + +Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP`. + +.. _class_DisplayServer_constant_CURSOR_CAN_DROP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_CAN_DROP** = ``7`` + +"Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a :ref:`Control` that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also :ref:`CURSOR_DRAG`. + +.. _class_DisplayServer_constant_CURSOR_FORBIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_FORBIDDEN** = ``8`` + +Forbidden cursor. This is displayed during drag-and-drop operations if the hovered :ref:`Control` can't accept the drag-and-drop event. + +.. _class_DisplayServer_constant_CURSOR_VSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSIZE** = ``9`` + +Vertical resize cursor. Intended to be displayed when the hovered :ref:`Control` can be vertically resized using the mouse. See also :ref:`CURSOR_VSPLIT`. + +.. _class_DisplayServer_constant_CURSOR_HSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSIZE** = ``10`` + +Horizontal resize cursor. Intended to be displayed when the hovered :ref:`Control` can be horizontally resized using the mouse. See also :ref:`CURSOR_HSPLIT`. + +.. _class_DisplayServer_constant_CURSOR_BDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_BDIAGSIZE** = ``11`` + +Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. + +.. _class_DisplayServer_constant_CURSOR_FDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_FDIAGSIZE** = ``12`` + +Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. + +.. _class_DisplayServer_constant_CURSOR_MOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_MOVE** = ``13`` + +Move cursor. Intended to be displayed when the hovered :ref:`Control` can be moved using the mouse. + +.. _class_DisplayServer_constant_CURSOR_VSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSPLIT** = ``14`` + +Vertical split cursor. This is displayed when hovering a :ref:`Control` with splits that can be vertically resized using the mouse, such as :ref:`VSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_VSIZE`. + +.. _class_DisplayServer_constant_CURSOR_HSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSPLIT** = ``15`` + +Horizontal split cursor. This is displayed when hovering a :ref:`Control` with splits that can be horizontally resized using the mouse, such as :ref:`HSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_HSIZE`. + +.. _class_DisplayServer_constant_CURSOR_HELP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HELP** = ``16`` + +Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. + +.. _class_DisplayServer_constant_CURSOR_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_MAX** = ``17`` + +Represents the size of the :ref:`CursorShape` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_DisplayServer_WindowMode: -.. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED: - -.. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED: - -.. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED: - -.. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN: - -.. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN: +.. rst-class:: classref-enumeration enum **WindowMode**: -- **WINDOW_MODE_WINDOWED** = **0** --- Windowed mode, i.e. :ref:`Window` doesn't occupy the whole screen (unless set to the size of the screen). +.. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED: -- **WINDOW_MODE_MINIMIZED** = **1** --- Minimized window mode, i.e. :ref:`Window` is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. +.. rst-class:: classref-enumeration-constant -- **WINDOW_MODE_MAXIMIZED** = **2** --- Maximized window mode, i.e. :ref:`Window` will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed. +:ref:`WindowMode` **WINDOW_MODE_WINDOWED** = ``0`` -- **WINDOW_MODE_FULLSCREEN** = **3** --- Full screen window mode. Note that this is not *exclusive* full screen. On Windows and Linux (X11), a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. +Windowed mode, i.e. :ref:`Window` doesn't occupy the whole screen (unless set to the size of the screen). + +.. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_MINIMIZED** = ``1`` + +Minimized window mode, i.e. :ref:`Window` is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. + +.. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_MAXIMIZED** = ``2`` + +Maximized window mode, i.e. :ref:`Window` will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed. + +.. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_FULLSCREEN** = ``3`` + +Full screen window mode. Note that this is not *exclusive* full screen. On Windows and Linux (X11), a borderless window is used to emulate full screen. 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. -- **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = **4** --- Exclusive full screen window mode. This mode is implemented on Windows and macOS only. On other platforms, it is equivalent to :ref:`WINDOW_MODE_FULLSCREEN`. +.. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4`` + +Exclusive full screen window mode. This mode is implemented on Windows and macOS only. On other platforms, it is equivalent to :ref:`WINDOW_MODE_FULLSCREEN`. \ **On Windows:** 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. @@ -631,45 +918,75 @@ Regardless of the platform, enabling full screen will change the window size to 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 + ---- .. _enum_DisplayServer_WindowFlags: -.. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED: - -.. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS: - -.. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP: - -.. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT: - -.. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS: - -.. _class_DisplayServer_constant_WINDOW_FLAG_POPUP: - -.. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: - -.. _class_DisplayServer_constant_WINDOW_FLAG_MAX: +.. rst-class:: classref-enumeration enum **WindowFlags**: -- **WINDOW_FLAG_RESIZE_DISABLED** = **0** --- The window can't be resizing by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size`. This flag is ignored for full screen windows. +.. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED: -- **WINDOW_FLAG_BORDERLESS** = **1** --- The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. +.. rst-class:: classref-enumeration-constant -- **WINDOW_FLAG_ALWAYS_ON_TOP** = **2** --- The window is floating on top of all other windows. This flag is ignored for full-screen windows. +:ref:`WindowFlags` **WINDOW_FLAG_RESIZE_DISABLED** = ``0`` -- **WINDOW_FLAG_TRANSPARENT** = **3** --- The window background can be transparent. +The window can't be resizing by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size`. This flag is ignored for full screen windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_BORDERLESS** = ``1`` + +The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2`` + +The window is floating on top of all other windows. This flag is ignored for full-screen windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_TRANSPARENT** = ``3`` + +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:** Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. -- **WINDOW_FLAG_NO_FOCUS** = **4** --- The window can't be focused. No-focus window will ignore all input, except mouse clicks. +.. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS: -- **WINDOW_FLAG_POPUP** = **5** --- Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have ``transient parent`` set (see :ref:`window_set_transient`). +.. rst-class:: classref-enumeration-constant -- **WINDOW_FLAG_EXTEND_TO_TITLE** = **6** --- Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. +:ref:`WindowFlags` **WINDOW_FLAG_NO_FOCUS** = ``4`` + +The window can't be focused. No-focus window will ignore all input, except mouse clicks. + +.. _class_DisplayServer_constant_WINDOW_FLAG_POPUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_POPUP** = ``5`` + +Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have ``transient parent`` set (see :ref:`window_set_transient`). + +.. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6`` + +Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Use :ref:`window_set_window_buttons_offset` to adjust minimize/maximize/close buttons offset. @@ -677,331 +994,533 @@ Use :ref:`window_get_safe_title_margins`. +.. _class_DisplayServer_constant_WINDOW_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``7`` + +Max value of the :ref:`WindowFlags`. + +.. rst-class:: classref-item-separator ---- .. _enum_DisplayServer_WindowEvent: -.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER: - -.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT: - -.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN: - -.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT: - -.. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST: - -.. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST: - -.. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE: - -.. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE: +.. rst-class:: classref-enumeration enum **WindowEvent**: -- **WINDOW_EVENT_MOUSE_ENTER** = **0** --- Sent when the mouse pointer enters the window, see :ref:`window_set_window_event_callback`. +.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER: -- **WINDOW_EVENT_MOUSE_EXIT** = **1** --- Sent when the mouse pointer exits the window, see :ref:`window_set_window_event_callback`. +.. rst-class:: classref-enumeration-constant -- **WINDOW_EVENT_FOCUS_IN** = **2** --- Sent when the window grabs focus, see :ref:`window_set_window_event_callback`. +:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_ENTER** = ``0`` -- **WINDOW_EVENT_FOCUS_OUT** = **3** --- Sent when the window loses focus, see :ref:`window_set_window_event_callback`. +Sent when the mouse pointer enters the window, 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`. +.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT: -- **WINDOW_EVENT_GO_BACK_REQUEST** = **5** --- Sent when the device "Back" button is pressed, see :ref:`window_set_window_event_callback`. +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_EXIT** = ``1`` + +Sent when the mouse pointer exits the window, see :ref:`window_set_window_event_callback`. + +.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_FOCUS_IN** = ``2`` + +Sent when the window grabs focus, see :ref:`window_set_window_event_callback`. + +.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_FOCUS_OUT** = ``3`` + +Sent when the window loses focus, see :ref:`window_set_window_event_callback`. + +.. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **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`. + +.. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5`` + +Sent when the device "Back" button is pressed, see :ref:`window_set_window_event_callback`. \ **Note:** This event is implemented on Android. -- **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`. +.. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE: + +.. rst-class:: classref-enumeration-constant + +: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`. \ **Note:** This flag is implemented on macOS. -- **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`. +.. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE: + +.. rst-class:: classref-enumeration-constant + +: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`. \ **Note:** This flag is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _enum_DisplayServer_VSyncMode: -.. _class_DisplayServer_constant_VSYNC_DISABLED: - -.. _class_DisplayServer_constant_VSYNC_ENABLED: - -.. _class_DisplayServer_constant_VSYNC_ADAPTIVE: - -.. _class_DisplayServer_constant_VSYNC_MAILBOX: +.. rst-class:: classref-enumeration enum **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`). +.. _class_DisplayServer_constant_VSYNC_DISABLED: -- **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`). +.. rst-class:: classref-enumeration-constant -- **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`). +:ref:`VSyncMode` **VSYNC_DISABLED** = ``0`` -- **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`). +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`). + +.. _class_DisplayServer_constant_VSYNC_ENABLED: + +.. rst-class:: classref-enumeration-constant + +: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`). + +.. _class_DisplayServer_constant_VSYNC_ADAPTIVE: + +.. rst-class:: classref-enumeration-constant + +: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`). + +.. _class_DisplayServer_constant_VSYNC_MAILBOX: + +.. rst-class:: classref-enumeration-constant + +: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`). 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. +.. rst-class:: classref-item-separator + ---- .. _enum_DisplayServer_HandleType: -.. _class_DisplayServer_constant_DISPLAY_HANDLE: - -.. _class_DisplayServer_constant_WINDOW_HANDLE: - -.. _class_DisplayServer_constant_WINDOW_VIEW: - -.. _class_DisplayServer_constant_OPENGL_CONTEXT: +.. rst-class:: classref-enumeration enum **HandleType**: -- **DISPLAY_HANDLE** = **0** --- Display handle: +.. _class_DisplayServer_constant_DISPLAY_HANDLE: - - Linux (X11): ``X11::Display*`` for the display. +.. rst-class:: classref-enumeration-constant -- **WINDOW_HANDLE** = **1** --- Window handle: +:ref:`HandleType` **DISPLAY_HANDLE** = ``0`` - - Windows: ``HWND`` for the window. +Display handle: - - Linux (X11): ``X11::Window*`` for the window. +- Linux (X11): ``X11::Display*`` for the display. - - macOS: ``NSWindow*`` for the window. +- Android: ``EGLDisplay`` for the display. - - iOS: ``UIViewController*`` for the view controller. +.. _class_DisplayServer_constant_WINDOW_HANDLE: - - Android: ``jObject`` for the activity. +.. rst-class:: classref-enumeration-constant -- **WINDOW_VIEW** = **2** --- Window view: +:ref:`HandleType` **WINDOW_HANDLE** = ``1`` - - Windows: ``HDC`` for the window (only with the GL Compatibility renderer). +Window handle: - - macOS: ``NSView*`` for the window main view. +- Windows: ``HWND`` for the window. - - iOS: ``UIView*`` for the window main view. +- Linux (X11): ``X11::Window*`` for the window. -- **OPENGL_CONTEXT** = **3** --- OpenGL context (only with the GL Compatibility renderer): +- macOS: ``NSWindow*`` for the window. - - Windows: ``HGLRC`` for the window. +- iOS: ``UIViewController*`` for the view controller. - - Linux: ``GLXContext*`` for the window. +- Android: ``jObject`` for the activity. - - MacOS: ``NSOpenGLContext*`` for the window. +.. _class_DisplayServer_constant_WINDOW_VIEW: - - Android: ``EGLContext`` for the window. +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **WINDOW_VIEW** = ``2`` + +Window view: + +- Windows: ``HDC`` for the window (only with the GL Compatibility renderer). + +- macOS: ``NSView*`` for the window main view. + +- iOS: ``UIView*`` for the window main view. + +.. _class_DisplayServer_constant_OPENGL_CONTEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **OPENGL_CONTEXT** = ``3`` + +OpenGL context (only with the GL Compatibility renderer): + +- Windows: ``HGLRC`` for the window. + +- Linux: ``GLXContext*`` for the window. + +- MacOS: ``NSOpenGLContext*`` for the window. + +- Android: ``EGLContext`` for the window. + +.. rst-class:: classref-item-separator ---- .. _enum_DisplayServer_TTSUtteranceEvent: -.. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED: - -.. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED: - -.. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED: - -.. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY: +.. rst-class:: classref-enumeration enum **TTSUtteranceEvent**: -- **TTS_UTTERANCE_STARTED** = **0** --- Utterance has begun to be spoken. +.. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED: -- **TTS_UTTERANCE_ENDED** = **1** --- Utterance was successfully finished. +.. rst-class:: classref-enumeration-constant -- **TTS_UTTERANCE_CANCELED** = **2** --- Utterance was canceled, or TTS service was unable to process it. +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_STARTED** = ``0`` -- **TTS_UTTERANCE_BOUNDARY** = **3** --- Utterance reached a word or sentence boundary. +Utterance has begun to be spoken. + +.. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_ENDED** = ``1`` + +Utterance was successfully finished. + +.. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_CANCELED** = ``2`` + +Utterance was canceled, or TTS service was unable to process it. + +.. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_BOUNDARY** = ``3`` + +Utterance reached a word or sentence boundary. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW: +.. rst-class:: classref-constant + +**SCREEN_OF_MAIN_WINDOW** = ``-1`` + +Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. + .. _class_DisplayServer_constant_MAIN_WINDOW_ID: +.. rst-class:: classref-constant + +**MAIN_WINDOW_ID** = ``0`` + +The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``. + .. _class_DisplayServer_constant_INVALID_WINDOW_ID: -- **SCREEN_OF_MAIN_WINDOW** = **-1** --- Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. +.. rst-class:: classref-constant -- **MAIN_WINDOW_ID** = **0** --- The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``. +**INVALID_WINDOW_ID** = ``-1`` -- **INVALID_WINDOW_ID** = **-1** --- The ID that refers to a nonexisting window. This is be 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. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_DisplayServer_method_clipboard_get: -- :ref:`String` **clipboard_get** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **clipboard_get** **(** **)** |const| Returns the user's clipboard as a string if possible. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_clipboard_get_primary: -- :ref:`String` **clipboard_get_primary** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **clipboard_get_primary** **(** **)** |const| 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). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_clipboard_has: -- :ref:`bool` **clipboard_has** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **clipboard_has** **(** **)** |const| Returns ``true`` if there is content on the user's clipboard. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_clipboard_set: -- void **clipboard_set** **(** :ref:`String` clipboard **)** +.. rst-class:: classref-method + +void **clipboard_set** **(** :ref:`String` clipboard **)** Sets the user's clipboard content to the given string. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_clipboard_set_primary: -- void **clipboard_set_primary** **(** :ref:`String` clipboard_primary **)** +.. rst-class:: classref-method + +void **clipboard_set_primary** **(** :ref:`String` clipboard_primary **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_cursor_get_shape: -- :ref:`CursorShape` **cursor_get_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`CursorShape` **cursor_get_shape** **(** **)** |const| Returns the default mouse cursor shape set by :ref:`cursor_set_shape`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_cursor_set_custom_image: -- void **cursor_set_custom_image** **(** :ref:`Resource` cursor, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **cursor_set_custom_image** **(** :ref:`Resource` cursor, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_cursor_set_shape: -- void **cursor_set_shape** **(** :ref:`CursorShape` shape **)** +.. rst-class:: classref-method + +void **cursor_set_shape** **(** :ref:`CursorShape` shape **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_dialog_input_text: -- :ref:`Error` **dialog_input_text** **(** :ref:`String` title, :ref:`String` description, :ref:`String` existing_text, :ref:`Callable` callback **)** +.. rst-class:: classref-method + +:ref:`Error` **dialog_input_text** **(** :ref:`String` title, :ref:`String` description, :ref:`String` existing_text, :ref:`Callable` callback **)** 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_dialog_show: -- :ref:`Error` **dialog_show** **(** :ref:`String` title, :ref:`String` description, :ref:`PackedStringArray` buttons, :ref:`Callable` callback **)** +.. rst-class:: classref-method + +:ref:`Error` **dialog_show** **(** :ref:`String` title, :ref:`String` description, :ref:`PackedStringArray` buttons, :ref:`Callable` callback **)** 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_enable_for_stealing_focus: -- void **enable_for_stealing_focus** **(** :ref:`int` process_id **)** +.. rst-class:: classref-method + +void **enable_for_stealing_focus** **(** :ref:`int` process_id **)** 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. \ **Note:** This method is implemented on Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_force_process_and_drop_events: -- void **force_process_and_drop_events** **(** **)** +.. rst-class:: classref-method + +void **force_process_and_drop_events** **(** **)** Forces window manager processing while ignoring all :ref:`InputEvent`\ s. See also :ref:`process_events`. \ **Note:** This method is implemented on Windows and macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_accent_color: -- :ref:`Color` **get_accent_color** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_accent_color** **(** **)** |const| Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is unknown. \ **Note:** This method is implemented on macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_display_cutouts: -- :ref:`Rect2[]` **get_display_cutouts** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2[]` **get_display_cutouts** **(** **)** |const| 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`. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_display_safe_area: -- :ref:`Rect2i` **get_display_safe_area** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2i` **get_display_safe_area** **(** **)** |const| Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_name: -- :ref:`String` **get_name** **(** **)** |const| +.. rst-class:: classref-method -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). +:ref:`String` **get_name** **(** **)** |const| + +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). 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>`). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_screen_count: -- :ref:`int` **get_screen_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_screen_count** **(** **)** |const| Returns the number of displays available. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_swap_cancel_ok: -- :ref:`bool` **get_swap_cancel_ok** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **get_swap_cancel_ok** **(** **)** 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`. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_window_at_screen_position: -- :ref:`int` **get_window_at_screen_position** **(** :ref:`Vector2i` position **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_window_at_screen_position** **(** :ref:`Vector2i` position **)** |const| 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: @@ -1014,21 +1533,29 @@ Returns the ID of the window at the specified screen ``position`` (in pixels). O | | | | +-------------+ +-------+ +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_get_window_list: -- :ref:`PackedInt32Array` **get_window_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_window_list** **(** **)** |const| Returns the list of Godot window IDs belonging to this process. \ **Note:** Native dialogs are not included in this list. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_check_item: -- :ref:`int` **global_menu_add_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **global_menu_add_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``. @@ -1043,11 +1570,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_icon_check_item: -- :ref:`int` **global_menu_add_icon_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +.. 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, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. @@ -1062,11 +1593,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_icon_item: -- :ref:`int` **global_menu_add_icon_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **global_menu_add_icon_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. @@ -1081,11 +1616,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_icon_radio_check_item: -- :ref:`int` **global_menu_add_icon_radio_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +.. 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, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. @@ -1102,11 +1641,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_item: -- :ref:`int` **global_menu_add_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **global_menu_add_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new item with text ``label`` to the global menu with ID ``menu_root``. @@ -1121,11 +1664,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_multistate_item: -- :ref:`int` **global_menu_add_multistate_item** **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **global_menu_add_multistate_item** **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new item with text ``labe`` to the global menu with ID ``menu_root``. @@ -1144,11 +1691,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_radio_check_item: -- :ref:`int` **global_menu_add_radio_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **global_menu_add_radio_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Callable` key_callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``. @@ -1165,11 +1716,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_separator: -- :ref:`int` **global_menu_add_separator** **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **global_menu_add_separator** **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index. @@ -1184,11 +1739,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_add_submenu_item: -- :ref:`int` **global_menu_add_submenu_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** +.. 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 **)** 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. @@ -1203,11 +1762,15 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_clear: -- void **global_menu_clear** **(** :ref:`String` menu_root **)** +.. rst-class:: classref-method + +void **global_menu_clear** **(** :ref:`String` menu_root **)** Removes all items from the global menu with ID ``menu_root``. @@ -1220,171 +1783,239 @@ Removes all items from the global menu with ID ``menu_root``. "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_accelerator: -- :ref:`Key` **global_menu_get_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Key` **global_menu_get_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| 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 on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_callback: -- :ref:`Callable` **global_menu_get_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Callable` **global_menu_get_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns the callback of the item at index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_count: -- :ref:`int` **global_menu_get_item_count** **(** :ref:`String` menu_root **)** |const| +.. rst-class:: classref-method + +:ref:`int` **global_menu_get_item_count** **(** :ref:`String` menu_root **)** |const| Returns number of items in the global menu with ID ``menu_root``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_icon: -- :ref:`Texture2D` **global_menu_get_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **global_menu_get_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns the icon of the item at index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_indentation_level: -- :ref:`int` **global_menu_get_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **global_menu_get_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns the horizontal offset of the item at the given ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_index_from_tag: -- :ref:`int` **global_menu_get_item_index_from_tag** **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| +.. rst-class:: classref-method + +:ref:`int` **global_menu_get_item_index_from_tag** **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_index_from_text: -- :ref:`int` **global_menu_get_item_index_from_text** **(** :ref:`String` menu_root, :ref:`String` text **)** |const| +.. rst-class:: classref-method + +:ref:`int` **global_menu_get_item_index_from_text** **(** :ref:`String` menu_root, :ref:`String` text **)** |const| 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_key_callback: -- :ref:`Callable` **global_menu_get_item_key_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Callable` **global_menu_get_item_key_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns the callback of the item accelerator at index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_max_states: -- :ref:`int` **global_menu_get_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **global_menu_get_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns number of states of an multistate item. See :ref:`global_menu_add_multistate_item` for details. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_state: -- :ref:`int` **global_menu_get_item_state** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **global_menu_get_item_state** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns the state of an multistate item. See :ref:`global_menu_add_multistate_item` for details. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_submenu: -- :ref:`String` **global_menu_get_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **global_menu_get_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_tag: -- :ref:`Variant` **global_menu_get_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **global_menu_get_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_text: -- :ref:`String` **global_menu_get_item_text** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **global_menu_get_item_text** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns the text of the item at index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_get_item_tooltip: -- :ref:`String` **global_menu_get_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **global_menu_get_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns the tooltip associated with the specified index index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_is_item_checkable: -- :ref:`bool` **global_menu_is_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **global_menu_is_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_is_item_checked: -- :ref:`bool` **global_menu_is_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **global_menu_is_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns ``true`` if the item at index ``idx`` is checked. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_is_item_disabled: -- :ref:`bool` **global_menu_is_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **global_menu_is_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. @@ -1392,11 +2023,15 @@ See :ref:`global_menu_set_item_disabled` **global_menu_is_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **global_menu_is_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| Returns ``true`` if the item at index ``idx`` has radio button-style checkability. @@ -1404,11 +2039,15 @@ Returns ``true`` if the item at index ``idx`` has radio button-style checkabilit \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_remove_item: -- void **global_menu_remove_item** **(** :ref:`String` menu_root, :ref:`int` idx **)** +.. rst-class:: classref-method + +void **global_menu_remove_item** **(** :ref:`String` menu_root, :ref:`int` idx **)** Removes the item at index ``idx`` from the global menu ``menu_root``. @@ -1416,61 +2055,85 @@ Removes the item at index ``idx`` from the global menu ``menu_root``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_accelerator: -- void **global_menu_set_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** +.. rst-class:: classref-method + +void **global_menu_set_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** Sets the accelerator of the item at index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_callback: -- void **global_menu_set_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** +.. rst-class:: classref-method + +void **global_menu_set_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_checkable: -- void **global_menu_set_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** +.. rst-class:: classref-method + +void **global_menu_set_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_checked: -- void **global_menu_set_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checked **)** +.. rst-class:: classref-method + +void **global_menu_set_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checked **)** Sets the checkstate status of the item at index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_disabled: -- void **global_menu_set_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **global_menu_set_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_icon: -- void **global_menu_set_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **global_menu_set_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** Replaces the :ref:`Texture2D` icon of the specified ``idx``. @@ -1478,41 +2141,57 @@ Replaces the :ref:`Texture2D` icon of the specified ``idx``. \ **Note:** This method is not supported by macOS "_dock" menu items. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_indentation_level: -- void **global_menu_set_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` level **)** +.. rst-class:: classref-method + +void **global_menu_set_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` level **)** Sets the horizontal offset of the item at the given ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_key_callback: -- void **global_menu_set_item_key_callback** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` key_callback **)** +.. rst-class:: classref-method + +void **global_menu_set_item_key_callback** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` key_callback **)** Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_max_states: -- void **global_menu_set_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** +.. rst-class:: classref-method + +void **global_menu_set_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** Sets number of state of an multistate item. See :ref:`global_menu_add_multistate_item` for details. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_radio_checkable: -- void **global_menu_set_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** +.. rst-class:: classref-method + +void **global_menu_set_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` 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 @@ -1520,209 +2199,297 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_state: -- void **global_menu_set_item_state** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` state **)** +.. rst-class:: classref-method + +void **global_menu_set_item_state** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` state **)** Sets the state of an multistate item. See :ref:`global_menu_add_multistate_item` for details. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_submenu: -- void **global_menu_set_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` submenu **)** +.. rst-class:: classref-method + +void **global_menu_set_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` submenu **)** 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_tag: -- void **global_menu_set_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Variant` tag **)** +.. rst-class:: classref-method + +void **global_menu_set_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Variant` tag **)** 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_text: -- void **global_menu_set_item_text** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` text **)** +.. rst-class:: classref-method + +void **global_menu_set_item_text** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` text **)** Sets the text of the item at index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_global_menu_set_item_tooltip: -- void **global_menu_set_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` tooltip **)** +.. rst-class:: classref-method + +void **global_menu_set_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` tooltip **)** Sets the :ref:`String` tooltip of the item at the specified index ``idx``. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_has_feature: -- :ref:`bool` **has_feature** **(** :ref:`Feature` feature **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the specified ``feature`` is supported by the current ``DisplayServer``, ``false`` otherwise. +:ref:`bool` **has_feature** **(** :ref:`Feature` feature **)** |const| + +Returns ``true`` if the specified ``feature`` is supported by the current **DisplayServer**, ``false`` otherwise. + +.. rst-class:: classref-item-separator ---- .. _class_DisplayServer_method_ime_get_selection: -- :ref:`Vector2i` **ime_get_selection** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **ime_get_selection** **(** **)** |const| 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. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_ime_get_text: -- :ref:`String` **ime_get_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **ime_get_text** **(** **)** |const| Returns the composition string contained within the `Input Method Editor `__ window. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_is_dark_mode: -- :ref:`bool` **is_dark_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_dark_mode** **(** **)** |const| Returns ``true`` if OS is using dark mode. \ **Note:** This method is implemented on macOS, Windows and Linux (X11). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_is_dark_mode_supported: -- :ref:`bool` **is_dark_mode_supported** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_dark_mode_supported** **(** **)** |const| Returns ``true`` if OS supports dark mode. \ **Note:** This method is implemented on macOS, Windows and Linux (X11). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_keyboard_get_current_layout: -- :ref:`int` **keyboard_get_current_layout** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **keyboard_get_current_layout** **(** **)** |const| Returns active keyboard layout index. \ **Note:** This method is implemented on Linux (X11), macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_keyboard_get_keycode_from_physical: -- :ref:`Key` **keyboard_get_keycode_from_physical** **(** :ref:`Key` keycode **)** |const| +.. rst-class:: classref-method + +:ref:`Key` **keyboard_get_keycode_from_physical** **(** :ref:`Key` keycode **)** |const| Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout. \ **Note:** This method is implemented on Linux (X11), macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_keyboard_get_layout_count: -- :ref:`int` **keyboard_get_layout_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **keyboard_get_layout_count** **(** **)** |const| Returns the number of keyboard layouts. \ **Note:** This method is implemented on Linux (X11), macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_keyboard_get_layout_language: -- :ref:`String` **keyboard_get_layout_language** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **keyboard_get_layout_language** **(** :ref:`int` index **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_keyboard_get_layout_name: -- :ref:`String` **keyboard_get_layout_name** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **keyboard_get_layout_name** **(** :ref:`int` index **)** |const| Returns the localized name of the keyboard layout at position ``index``. \ **Note:** This method is implemented on Linux (X11), macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_keyboard_set_current_layout: -- void **keyboard_set_current_layout** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **keyboard_set_current_layout** **(** :ref:`int` index **)** Sets the active keyboard layout. \ **Note:** This method is implemented on Linux (X11), macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_mouse_get_button_state: -- :ref:`MouseButton` **mouse_get_button_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`MouseButton` **mouse_get_button_state** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_mouse_get_mode: -- :ref:`MouseMode` **mouse_get_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`MouseMode` **mouse_get_mode** **(** **)** |const| Returns the current mouse mode. See also :ref:`mouse_set_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_mouse_get_position: -- :ref:`Vector2i` **mouse_get_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **mouse_get_position** **(** **)** |const| Returns the mouse cursor's current position. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_mouse_set_mode: -- void **mouse_set_mode** **(** :ref:`MouseMode` mouse_mode **)** +.. rst-class:: classref-method + +void **mouse_set_mode** **(** :ref:`MouseMode` mouse_mode **)** Sets the current mouse mode. See also :ref:`mouse_get_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_process_events: -- void **process_events** **(** **)** +.. rst-class:: classref-method + +void **process_events** **(** **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_dpi: -- :ref:`int` **screen_get_dpi** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **screen_get_dpi** **(** :ref:`int` screen=-1 **)** |const| 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. @@ -1741,11 +2508,15 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref \ **Note:** This method is implemented on Android, Linux (X11), macOS and Windows. Returns ``72`` on unsupported platforms. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_max_scale: -- :ref:`float` **screen_get_max_scale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **screen_get_max_scale** **(** **)** |const| Returns the greatest scale factor of all screens. @@ -1753,21 +2524,29 @@ Returns the greatest scale factor of all screens. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_orientation: -- :ref:`ScreenOrientation` **screen_get_orientation** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`ScreenOrientation` **screen_get_orientation** **(** :ref:`int` screen=-1 **)** |const| Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation`. \ **Note:** This method is implemented on Android and iOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_position: -- :ref:`Vector2i` **screen_get_position** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **screen_get_position** **(** :ref:`int` screen=-1 **)** |const| 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: @@ -1782,11 +2561,15 @@ Returns the screen's top-left corner position in pixels. On multi-monitor setups See also :ref:`screen_get_size`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_refresh_rate: -- :ref:`float` **screen_get_refresh_rate** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **screen_get_refresh_rate** **(** :ref:`int` screen=-1 **)** |const| 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. @@ -1800,11 +2583,15 @@ To fallback to a default refresh rate if the method fails, try: if refresh_rate < 0: refresh_rate = 60.0 +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_scale: -- :ref:`float` **screen_get_scale** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **screen_get_scale** **(** :ref:`int` screen=-1 **)** |const| Returns the scale factor of the specified screen by index. @@ -1812,115 +2599,167 @@ Returns the scale factor of the specified screen by index. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_size: -- :ref:`Vector2i` **screen_get_size** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **screen_get_size** **(** :ref:`int` screen=-1 **)** |const| Returns the screen's size in pixels. See also :ref:`screen_get_position` and :ref:`screen_get_usable_rect`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_get_usable_rect: -- :ref:`Rect2i` **screen_get_usable_rect** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2i` **screen_get_usable_rect** **(** :ref:`int` screen=-1 **)** |const| Returns the portion of the screen that is not obstructed by a status bar in pixels. See also :ref:`screen_get_size`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_is_kept_on: -- :ref:`bool` **screen_is_kept_on** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **screen_is_kept_on** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_is_touchscreen: -- :ref:`bool` **screen_is_touchscreen** **(** :ref:`int` screen=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **screen_is_touchscreen** **(** :ref:`int` screen=-1 **)** |const| Returns ``true`` if the screen can send touch events or if :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_set_keep_on: -- void **screen_set_keep_on** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **screen_set_keep_on** **(** :ref:`bool` enable **)** Sets whether the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_is_kept_on`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_screen_set_orientation: -- void **screen_set_orientation** **(** :ref:`ScreenOrientation` orientation, :ref:`int` screen=-1 **)** +.. rst-class:: classref-method + +void **screen_set_orientation** **(** :ref:`ScreenOrientation` orientation, :ref:`int` screen=-1 **)** Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_set_icon: -- void **set_icon** **(** :ref:`Image` image **)** +.. rst-class:: classref-method + +void **set_icon** **(** :ref:`Image` image **)** Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. To use icons in the operating system's native format, use :ref:`set_native_icon` instead. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_set_native_icon: -- void **set_native_icon** **(** :ref:`String` filename **)** +.. rst-class:: classref-method + +void **set_native_icon** **(** :ref:`String` filename **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tablet_get_current_driver: -- :ref:`String` **tablet_get_current_driver** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **tablet_get_current_driver** **(** **)** |const| Returns current active tablet driver name. \ **Note:** This method is implemented on Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tablet_get_driver_count: -- :ref:`int` **tablet_get_driver_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **tablet_get_driver_count** **(** **)** |const| Returns the total number of available tablet drivers. \ **Note:** This method is implemented on Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tablet_get_driver_name: -- :ref:`String` **tablet_get_driver_name** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **tablet_get_driver_name** **(** :ref:`int` idx **)** |const| Returns the tablet driver name for the given index. \ **Note:** This method is implemented on Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tablet_set_current_driver: -- void **tablet_set_current_driver** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **tablet_set_current_driver** **(** :ref:`String` name **)** Set active tablet driver name. \ **Note:** This method is implemented on Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_get_voices: -- :ref:`Dictionary[]` **tts_get_voices** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **tts_get_voices** **(** **)** |const| Returns an :ref:`Array` of voice information dictionaries. @@ -1934,61 +2773,85 @@ Each :ref:`Dictionary` contains two :ref:`String \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_get_voices_for_language: -- :ref:`PackedStringArray` **tts_get_voices_for_language** **(** :ref:`String` language **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **tts_get_voices_for_language** **(** :ref:`String` language **)** |const| Returns an :ref:`PackedStringArray` of voice identifiers for the ``language``. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_is_paused: -- :ref:`bool` **tts_is_paused** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **tts_is_paused** **(** **)** |const| Returns ``true`` if the synthesizer is in a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_is_speaking: -- :ref:`bool` **tts_is_speaking** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **tts_is_speaking** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_pause: -- void **tts_pause** **(** **)** +.. rst-class:: classref-method + +void **tts_pause** **(** **)** Puts the synthesizer into a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_resume: -- void **tts_resume** **(** **)** +.. rst-class:: classref-method + +void **tts_resume** **(** **)** Resumes the synthesizer if it was paused. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_set_utterance_callback: -- void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent` event, :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent` event, :ref:`Callable` callable **)** Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary. @@ -2000,11 +2863,15 @@ Adds a callback, which is called when the utterance has started, finished, cance \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_speak: -- 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 **)** +.. 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 **)** Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first. @@ -2024,37 +2891,53 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_tts_stop: -- void **tts_stop** **(** **)** +.. rst-class:: classref-method + +void **tts_stop** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_virtual_keyboard_get_height: -- :ref:`int` **virtual_keyboard_get_height** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **virtual_keyboard_get_height** **(** **)** |const| Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_virtual_keyboard_hide: -- void **virtual_keyboard_hide** **(** **)** +.. rst-class:: classref-method + +void **virtual_keyboard_hide** **(** **)** Hides the virtual keyboard if it is shown, does nothing otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_virtual_keyboard_show: -- 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 **)** +.. 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 **)** Shows the virtual keyboard if the platform has one. @@ -2072,203 +2955,299 @@ Shows the virtual keyboard if the platform has one. \ **Note:** This method is implemented on Android, iOS and Web. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_warp_mouse: -- void **warp_mouse** **(** :ref:`Vector2i` position **)** +.. rst-class:: classref-method + +void **warp_mouse** **(** :ref:`Vector2i` position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_can_draw: -- :ref:`bool` **window_can_draw** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **window_can_draw** **(** :ref:`int` window_id=0 **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_active_popup: -- :ref:`int` **window_get_active_popup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **window_get_active_popup** **(** **)** |const| Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID` if there is none. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_attached_instance_id: -- :ref:`int` **window_get_attached_instance_id** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **window_get_attached_instance_id** **(** :ref:`int` window_id=0 **)** |const| Returns the :ref:`Object.get_instance_id` of the :ref:`Window` the ``window_id`` is attached to. also :ref:`window_get_attached_instance_id`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_current_screen: -- :ref:`int` **window_get_current_screen** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **window_get_current_screen** **(** :ref:`int` window_id=0 **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_flag: -- :ref:`bool` **window_get_flag** **(** :ref:`WindowFlags` flag, :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **window_get_flag** **(** :ref:`WindowFlags` flag, :ref:`int` window_id=0 **)** |const| Returns the current value of the given window's ``flag``. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_max_size: -- :ref:`Vector2i` **window_get_max_size** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **window_get_max_size** **(** :ref:`int` window_id=0 **)** |const| Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_min_size: -- :ref:`Vector2i` **window_get_min_size** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **window_get_min_size** **(** :ref:`int` window_id=0 **)** |const| Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_mode: -- :ref:`WindowMode` **window_get_mode** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`WindowMode` **window_get_mode** **(** :ref:`int` window_id=0 **)** |const| Returns the mode of the given window. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_native_handle: -- :ref:`int` **window_get_native_handle** **(** :ref:`HandleType` handle_type, :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **window_get_native_handle** **(** :ref:`HandleType` handle_type, :ref:`int` window_id=0 **)** |const| Returns internal structure pointers for use in plugins. \ **Note:** This method is implemented on Android, Linux (X11), macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_popup_safe_rect: -- :ref:`Rect2i` **window_get_popup_safe_rect** **(** :ref:`int` window **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2i` **window_get_popup_safe_rect** **(** :ref:`int` window **)** |const| Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_position: -- :ref:`Vector2i` **window_get_position** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **window_get_position** **(** :ref:`int` window_id=0 **)** |const| Returns the position of the given window to on the screen. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_real_size: -- :ref:`Vector2i` **window_get_real_size** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **window_get_real_size** **(** :ref:`int` window_id=0 **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_safe_title_margins: -- :ref:`Vector3i` **window_get_safe_title_margins** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3i` **window_get_safe_title_margins** **(** :ref:`int` window_id=0 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_size: -- :ref:`Vector2i` **window_get_size** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **window_get_size** **(** :ref:`int` window_id=0 **)** |const| 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_real_size`, :ref:`window_set_size` and :ref:`window_get_position`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_get_vsync_mode: -- :ref:`VSyncMode` **window_get_vsync_mode** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`VSyncMode` **window_get_vsync_mode** **(** :ref:`int` window_id=0 **)** |const| Returns the V-Sync mode of the given window. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_is_maximize_allowed: -- :ref:`bool` **window_is_maximize_allowed** **(** :ref:`int` window_id=0 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **window_is_maximize_allowed** **(** :ref:`int` window_id=0 **)** |const| Returns ``true`` if the given window can be maximized (the maximize button is enabled). +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_maximize_on_title_dbl_click: -- :ref:`bool` **window_maximize_on_title_dbl_click** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **window_maximize_on_title_dbl_click** **(** **)** |const| Returns ``true``, if double-click on a window title should maximize it. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_minimize_on_title_dbl_click: -- :ref:`bool` **window_minimize_on_title_dbl_click** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **window_minimize_on_title_dbl_click** **(** **)** |const| Returns ``true``, if double-click on a window title should minimize it. \ **Note:** This method is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_move_to_foreground: -- void **window_move_to_foreground** **(** :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_move_to_foreground** **(** :ref:`int` window_id=0 **)** Moves the window specified by ``window_id`` to the foreground, so that it is visible over other windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_request_attention: -- void **window_request_attention** **(** :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_request_attention** **(** :ref:`int` window_id=0 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_current_screen: -- void **window_set_current_screen** **(** :ref:`int` screen, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_current_screen** **(** :ref:`int` screen, :ref:`int` window_id=0 **)** Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_drop_files_callback: -- void **window_set_drop_files_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_drop_files_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** 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``. \ **Note:** This method is implemented on Windows, macOS, Linux (X11) and Web. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_exclusive: -- void **window_set_exclusive** **(** :ref:`int` window_id, :ref:`bool` exclusive **)** +.. rst-class:: classref-method + +void **window_set_exclusive** **(** :ref:`int` window_id, :ref:`bool` exclusive **)** 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. @@ -2276,61 +3255,89 @@ If set to ``true``, this window will always stay on top of its parent window, pa \ **Note:** This method is implemented on macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_flag: -- void **window_set_flag** **(** :ref:`WindowFlags` flag, :ref:`bool` enabled, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_flag** **(** :ref:`WindowFlags` flag, :ref:`bool` enabled, :ref:`int` window_id=0 **)** Enables or disables the given window's given ``flag``. See :ref:`WindowFlags` for possible values and their behavior. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_ime_active: -- void **window_set_ime_active** **(** :ref:`bool` active, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_ime_active** **(** :ref:`bool` active, :ref:`int` window_id=0 **)** Sets whether `Input Method Editor `__ should be enabled for the window specified by ``window_id``. See also :ref:`window_set_ime_position`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_ime_position: -- void **window_set_ime_position** **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_ime_position** **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_input_event_callback: -- void **window_set_input_event_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_input_event_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** Sets the ``callback`` that should be called when any :ref:`InputEvent` is sent to the window specified by ``window_id``. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_input_text_callback: -- void **window_set_input_text_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_input_text_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** Sets the ``callback`` that should be called when text is entered using the virtual keyboard to the window specified by ``window_id``. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_max_size: -- void **window_set_max_size** **(** :ref:`Vector2i` max_size, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_max_size** **(** :ref:`Vector2i` max_size, :ref:`int` window_id=0 **)** 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`. \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_min_size: -- void **window_set_min_size** **(** :ref:`Vector2i` min_size, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_min_size** **(** :ref:`Vector2i` min_size, :ref:`int` window_id=0 **)** 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`. @@ -2338,21 +3345,29 @@ Sets the minimum size for the given window to ``min_size`` (in pixels). Normally \ **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_mode: -- void **window_set_mode** **(** :ref:`WindowMode` mode, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_mode** **(** :ref:`WindowMode` mode, :ref:`int` window_id=0 **)** Sets window mode for the given window to ``mode``. See :ref:`WindowMode` for possible values and how each mode behaves. \ **Note:** Setting the window to full screen forcibly sets the borderless flag to ``true``, so make sure to set it back to ``false`` when not wanted. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_mouse_passthrough: -- void **window_set_mouse_passthrough** **(** :ref:`PackedVector2Array` region, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_mouse_passthrough** **(** :ref:`PackedVector2Array` region, :ref:`int` window_id=0 **)** Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. @@ -2389,19 +3404,27 @@ Passing an empty array will disable passthrough support (all mouse events will b \ **Note:** This method is implemented on Linux (X11), macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_popup_safe_rect: -- void **window_set_popup_safe_rect** **(** :ref:`int` window, :ref:`Rect2i` rect **)** +.. rst-class:: classref-method + +void **window_set_popup_safe_rect** **(** :ref:`int` window, :ref:`Rect2i` rect **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_position: -- void **window_set_position** **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_position** **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** 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: @@ -2416,47 +3439,67 @@ Sets the position of the given window to ``position``. On multi-monitor setups, See also :ref:`window_get_position` and :ref:`window_set_size`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_rect_changed_callback: -- void **window_set_rect_changed_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_rect_changed_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** Sets the ``callback`` that will be called when the window specified by ``window_id`` is moved or resized. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_size: -- void **window_set_size** **(** :ref:`Vector2i` size, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_size** **(** :ref:`Vector2i` size, :ref:`int` window_id=0 **)** Sets the size of the given window to ``size`` (in pixels). See also :ref:`window_get_size` and :ref:`window_get_position`. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_title: -- void **window_set_title** **(** :ref:`String` title, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_title** **(** :ref:`String` title, :ref:`int` window_id=0 **)** Sets the title of the given window to ``title``. \ **Note:** Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_transient: -- void **window_set_transient** **(** :ref:`int` window_id, :ref:`int` parent_window_id **)** +.. rst-class:: classref-method + +void **window_set_transient** **(** :ref:`int` window_id, :ref:`int` parent_window_id **)** 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. Note that behavior might be different depending on the platform. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_vsync_mode: -- void **window_set_vsync_mode** **(** :ref:`VSyncMode` vsync_mode, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_vsync_mode** **(** :ref:`VSyncMode` vsync_mode, :ref:`int` window_id=0 **)** Sets the V-Sync mode of the given window. @@ -2464,21 +3507,29 @@ See :ref:`VSyncMode` for possible values and how t Depending on the platform and used renderer, the engine will fall back to :ref:`VSYNC_ENABLED`, if the desired mode is not supported. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_window_buttons_offset: -- void **window_set_window_buttons_offset** **(** :ref:`Vector2i` offset, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_window_buttons_offset** **(** :ref:`Vector2i` offset, :ref:`int` window_id=0 **)** When :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` flag is set, set offset to the center of the first titlebar button. \ **Note:** This flag is implemented on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_DisplayServer_method_window_set_window_event_callback: -- void **window_set_window_event_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** +.. rst-class:: classref-method + +void **window_set_window_event_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** Sets the ``callback`` that will be called when an event occurs in the window specified by ``window_id``. diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index d86946ba9..0ae4d2697 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -14,6 +14,8 @@ DTLSServer Helper class to implement a DTLS server. +.. rst-class:: classref-introduction-group + Description ----------- @@ -167,29 +169,46 @@ Below a small example of how to use it: +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`setup` **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** | -+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PacketPeerDTLS` | :ref:`take_connection` **(** :ref:`PacketPeerUDP` udp_peer **)** | -+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`setup` **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PacketPeerDTLS` | :ref:`take_connection` **(** :ref:`PacketPeerUDP` udp_peer **)** | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_DTLSServer_method_setup: -- :ref:`Error` **setup** **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** +.. rst-class:: classref-method + +:ref:`Error` **setup** **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** Setup the DTLS server to use the given ``key`` and provide the given ``certificate`` to clients. You can pass the optional ``chain`` parameter to provide additional CA chain information along with the certificate. +.. rst-class:: classref-item-separator + ---- .. _class_DTLSServer_method_take_connection: -- :ref:`PacketPeerDTLS` **take_connection** **(** :ref:`PacketPeerUDP` udp_peer **)** +.. rst-class:: classref-method + +:ref:`PacketPeerDTLS` **take_connection** **(** :ref:`PacketPeerUDP` udp_peer **)** Try to initiate the DTLS handshake with the given ``udp_peer`` which must be already connected (see :ref:`PacketPeerUDP.connect_to_host`). diff --git a/classes/class_editorcommandpalette.rst b/classes/class_editorcommandpalette.rst index 88bd94683..1c3682d4f 100644 --- a/classes/class_editorcommandpalette.rst +++ b/classes/class_editorcommandpalette.rst @@ -14,6 +14,8 @@ EditorCommandPalette Godot editor's command palette. +.. rst-class:: classref-introduction-group + Description ----------- @@ -42,28 +44,46 @@ Command key names use slash delimiters to distinguish sections, for example: ``" \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_command_palette`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | -+-------------------------+-------------------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | + +-------------------------+-------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorCommandPalette_method_add_command: -- void **add_command** **(** :ref:`String` command_name, :ref:`String` key_name, :ref:`Callable` binded_callable, :ref:`String` shortcut_text="None" **)** +.. rst-class:: classref-method + +void **add_command** **(** :ref:`String` command_name, :ref:`String` key_name, :ref:`Callable` binded_callable, :ref:`String` shortcut_text="None" **)** Adds a custom command to EditorCommandPalette. @@ -75,11 +95,15 @@ Adds a custom command to EditorCommandPalette. - ``shortcut_text``: :ref:`String` (Shortcut text of the **Command** if available.) +.. rst-class:: classref-item-separator + ---- .. _class_EditorCommandPalette_method_remove_command: -- void **remove_command** **(** :ref:`String` key_name **)** +.. rst-class:: classref-method + +void **remove_command** **(** :ref:`String` key_name **)** Removes the custom command from EditorCommandPalette. diff --git a/classes/class_editordebuggerplugin.rst b/classes/class_editordebuggerplugin.rst index ff0735b80..0a90bf7ef 100644 --- a/classes/class_editordebuggerplugin.rst +++ b/classes/class_editordebuggerplugin.rst @@ -14,10 +14,12 @@ EditorDebuggerPlugin A base class to implement debugger plugins. +.. rst-class:: classref-introduction-group + Description ----------- -``EditorDebuggerPlugin`` provides functions related to the editor side of the debugger. +**EditorDebuggerPlugin** provides functions related to the editor side of the debugger. To interact with the debugger, an instance of this class must be added to the editor via :ref:`EditorPlugin.add_debugger_plugin`. @@ -64,59 +66,88 @@ You can retrieve the available :ref:`EditorDebuggerSession` | :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` **(** **)** | -+-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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` **(** **)** | + +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorDebuggerPlugin_method__capture: -- :ref:`bool` **_capture** **(** :ref:`String` message, :ref:`Array` data, :ref:`int` session_id **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_capture** **(** :ref:`String` message, :ref:`Array` data, :ref:`int` session_id **)** |virtual| 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`). +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerPlugin_method__has_capture: -- :ref:`bool` **_has_capture** **(** :ref:`String` capture **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_capture** **(** :ref:`String` capture **)** |virtual| |const| 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: -- void **_setup_session** **(** :ref:`int` session_id **)** |virtual| +.. rst-class:: classref-method + +void **_setup_session** **(** :ref:`int` session_id **)** |virtual| Override this method to be notified whenever a new :ref:`EditorDebuggerSession` is created (the session may be inactive during this stage). +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerPlugin_method_get_session: -- :ref:`EditorDebuggerSession` **get_session** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +:ref:`EditorDebuggerSession` **get_session** **(** :ref:`int` id **)** Returns the :ref:`EditorDebuggerSession` with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerPlugin_method_get_sessions: -- :ref:`Array` **get_sessions** **(** **)** +.. rst-class:: classref-method + +:ref:`Array` **get_sessions** **(** **)** Returns an array of :ref:`EditorDebuggerSession` currently available to this debugger plugin. diff --git a/classes/class_editordebuggersession.rst b/classes/class_editordebuggersession.rst index 8d83bae56..a9b79a58a 100644 --- a/classes/class_editordebuggersession.rst +++ b/classes/class_editordebuggersession.rst @@ -14,6 +14,8 @@ EditorDebuggerSession A class to interact with the editor debugger. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,112 +23,169 @@ This class cannot be directly instantiated and must be retrieved via a :ref:`Edi You can add tabs to the session UI via :ref:`add_session_tab`, send messages via :ref:`send_message`, and toggle :ref:`EngineProfiler`\ s via :ref:`toggle_profiler`. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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=[] **)** | -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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=[] **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorDebuggerSession_signal_breaked: -- **breaked** **(** :ref:`bool` can_debug **)** +.. rst-class:: classref-signal + +**breaked** **(** :ref:`bool` can_debug **)** Emitted when the attached remote instance enters a break state. If ``can_debug`` is ``true``, the remote instance will enter the debug loop. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_signal_continued: -- **continued** **(** **)** +.. rst-class:: classref-signal + +**continued** **(** **)** Emitted when the attached remote instance exits a break state. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_signal_started: -- **started** **(** **)** +.. rst-class:: classref-signal + +**started** **(** **)** Emitted when a remote instance is attached to this session (i.e. the session becomes active). +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_signal_stopped: -- **stopped** **(** **)** +.. rst-class:: classref-signal + +**stopped** **(** **)** Emitted when a remote instance is detached from this session (i.e. the session becomes inactive). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorDebuggerSession_method_add_session_tab: -- void **add_session_tab** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **add_session_tab** **(** :ref:`Control` control **)** Adds the given ``control`` to the debug session UI in the debugger bottom panel. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_method_is_active: -- :ref:`bool` **is_active** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_active** **(** **)** Returns ``true`` if the debug session is currently attached to a remote instance. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_method_is_breaked: -- :ref:`bool` **is_breaked** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_breaked** **(** **)** Returns ``true`` if the attached remote instance is currently in the debug loop. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_method_is_debuggable: -- :ref:`bool` **is_debuggable** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_debuggable** **(** **)** Returns ``true`` if the attached remote instance can be debugged. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_method_remove_session_tab: -- void **remove_session_tab** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **remove_session_tab** **(** :ref:`Control` control **)** Removes the given ``control`` from the debug session UI in the debugger bottom panel. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_method_send_message: -- void **send_message** **(** :ref:`String` message, :ref:`Array` data=[] **)** +.. rst-class:: classref-method + +void **send_message** **(** :ref:`String` message, :ref:`Array` data=[] **)** Sends the given ``message`` to the attached remote instance, optionally passing additionally ``data``. See :ref:`EngineDebugger` for how to retrieve those messages. +.. rst-class:: classref-item-separator + ---- .. _class_EditorDebuggerSession_method_toggle_profiler: -- void **toggle_profiler** **(** :ref:`String` profiler, :ref:`bool` enable, :ref:`Array` data=[] **)** +.. rst-class:: classref-method + +void **toggle_profiler** **(** :ref:`String` profiler, :ref:`bool` enable, :ref:`Array` data=[] **)** Toggle the given ``profiler`` on the attached remote instance, optionally passing additionally ``data``. See :ref:`EngineProfiler` for more details. diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 237c426fc..be9857266 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -14,184 +14,255 @@ EditorExportPlugin A script that is executed when exporting the project. +.. rst-class:: classref-introduction-group + 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` is called at the beginning of the export process and then :ref:`_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` is called at the beginning of the export process and then :ref:`_export_file` is called for each exported file. -To use ``EditorExportPlugin``, register it using the :ref:`EditorPlugin.add_export_plugin` method first. +To use **EditorExportPlugin**, register it using the :ref:`EditorPlugin.add_export_plugin` method first. + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_begin_customize_resources` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_begin_customize_scenes` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`_customize_resource` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`_customize_scene` **(** :ref:`Node` scene, :ref:`String` path **)** |virtual| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_end_customize_resources` **(** **)** |virtual| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_end_customize_scenes` **(** **)** |virtual| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_export_begin` **(** :ref:`PackedStringArray` features, :ref:`bool` is_debug, :ref:`String` path, :ref:`int` flags **)** |virtual| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_export_end` **(** **)** |virtual| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_export_file` **(** :ref:`String` path, :ref:`String` type, :ref:`PackedStringArray` features **)** |virtual| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_customization_configuration_hash` **(** **)** |virtual| |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_file` **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_ios_bundle_file` **(** :ref:`String` path **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_ios_cpp_code` **(** :ref:`String` code **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_ios_embedded_framework` **(** :ref:`String` path **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_ios_framework` **(** :ref:`String` path **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_ios_linker_flags` **(** :ref:`String` flags **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_ios_plist_content` **(** :ref:`String` plist_content **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_ios_project_static_lib` **(** :ref:`String` path **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_macos_plugin_file` **(** :ref:`String` path **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skip` **(** **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_begin_customize_resources` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_begin_customize_scenes` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`_customize_resource` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`_customize_scene` **(** :ref:`Node` scene, :ref:`String` path **)** |virtual| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_customize_resources` **(** **)** |virtual| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_customize_scenes` **(** **)** |virtual| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_export_begin` **(** :ref:`PackedStringArray` features, :ref:`bool` is_debug, :ref:`String` path, :ref:`int` flags **)** |virtual| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_export_end` **(** **)** |virtual| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_export_file` **(** :ref:`String` path, :ref:`String` type, :ref:`PackedStringArray` features **)** |virtual| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_customization_configuration_hash` **(** **)** |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_file` **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_bundle_file` **(** :ref:`String` path **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_cpp_code` **(** :ref:`String` code **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_embedded_framework` **(** :ref:`String` path **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_framework` **(** :ref:`String` path **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_linker_flags` **(** :ref:`String` flags **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_plist_content` **(** :ref:`String` plist_content **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_project_static_lib` **(** :ref:`String` path **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_macos_plugin_file` **(** :ref:`String` path **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`skip` **(** **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorExportPlugin_method__begin_customize_resources: -- :ref:`bool` **_begin_customize_resources** **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_begin_customize_resources** **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| Return true if this plugin will customize resources based on the platform and features used. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__begin_customize_scenes: -- :ref:`bool` **_begin_customize_scenes** **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_begin_customize_scenes** **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| Return true if this plugin will customize scenes based on the platform and features used. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__customize_resource: -- :ref:`Resource` **_customize_resource** **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| +.. rst-class:: classref-method + +:ref:`Resource` **_customize_resource** **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__customize_scene: -- :ref:`Node` **_customize_scene** **(** :ref:`Node` scene, :ref:`String` path **)** |virtual| +.. rst-class:: classref-method + +:ref:`Node` **_customize_scene** **(** :ref:`Node` scene, :ref:`String` path **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__end_customize_resources: -- void **_end_customize_resources** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_end_customize_resources** **(** **)** |virtual| This is called when the customization process for resources ends. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__end_customize_scenes: -- void **_end_customize_scenes** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_end_customize_scenes** **(** **)** |virtual| This is called when the customization process for scenes ends. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__export_begin: -- void **_export_begin** **(** :ref:`PackedStringArray` features, :ref:`bool` is_debug, :ref:`String` path, :ref:`int` flags **)** |virtual| +.. rst-class:: classref-method + +void **_export_begin** **(** :ref:`PackedStringArray` features, :ref:`bool` is_debug, :ref:`String` path, :ref:`int` flags **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__export_end: -- void **_export_end** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_export_end** **(** **)** |virtual| Virtual method to be overridden by the user. Called when the export is finished. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__export_file: -- void **_export_file** **(** :ref:`String` path, :ref:`String` type, :ref:`PackedStringArray` features **)** |virtual| +.. rst-class:: classref-method + +void **_export_file** **(** :ref:`String` path, :ref:`String` type, :ref:`PackedStringArray` features **)** |virtual| 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` represented by the file (e.g. :ref:`PackedScene`) and ``features`` is the list of features for the export. Calling :ref:`skip` inside this callback will make the file not included in the export. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__get_customization_configuration_hash: -- :ref:`int` **_get_customization_configuration_hash** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_customization_configuration_hash** **(** **)** |virtual| |const| Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method__get_name: -- :ref:`String` **_get_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_name** **(** **)** |virtual| |const| Return the name identifier of this plugin (for future identification by the exporter). +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_file: -- void **add_file** **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** +.. rst-class:: classref-method + +void **add_file** **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** 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. If ``remap`` is ``true``, file will not be exported, but instead remapped to the given ``path``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_ios_bundle_file: -- void **add_ios_bundle_file** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_ios_bundle_file** **(** :ref:`String` path **)** Adds an iOS bundle file from the given ``path`` to the exported project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_ios_cpp_code: -- void **add_ios_cpp_code** **(** :ref:`String` code **)** +.. rst-class:: classref-method + +void **add_ios_cpp_code** **(** :ref:`String` code **)** Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_ios_embedded_framework: -- void **add_ios_embedded_framework** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_ios_embedded_framework** **(** :ref:`String` path **)** Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. @@ -199,53 +270,77 @@ Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode This method should not be used for System libraries as they are already present on the device. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_ios_framework: -- void **add_ios_framework** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_ios_framework** **(** :ref:`String` path **)** Adds a static library (\*.a) or dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_ios_linker_flags: -- void **add_ios_linker_flags** **(** :ref:`String` flags **)** +.. rst-class:: classref-method + +void **add_ios_linker_flags** **(** :ref:`String` flags **)** Adds linker flags for the iOS export. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_ios_plist_content: -- void **add_ios_plist_content** **(** :ref:`String` plist_content **)** +.. rst-class:: classref-method + +void **add_ios_plist_content** **(** :ref:`String` plist_content **)** Adds content for iOS Property List files. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_ios_project_static_lib: -- void **add_ios_project_static_lib** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_ios_project_static_lib** **(** :ref:`String` path **)** Adds a static lib from the given ``path`` to the iOS project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_macos_plugin_file: -- void **add_macos_plugin_file** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_macos_plugin_file** **(** :ref:`String` path **)** Adds file or directory matching ``path`` to ``PlugIns`` directory of macOS app bundle. \ **Note:** This is useful only for macOS exports. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_add_shared_object: -- void **add_shared_object** **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** +.. rst-class:: classref-method + +void **add_shared_object** **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** Adds a shared object or a directory containing only shared objects with the given ``tags`` and destination ``path``. @@ -253,11 +348,15 @@ Adds a shared object or a directory containing only shared objects with the give In case of a directory code-sign will error if you place non code object in directory. +.. rst-class:: classref-item-separator + ---- .. _class_EditorExportPlugin_method_skip: -- void **skip** **(** **)** +.. rst-class:: classref-method + +void **skip** **(** **)** To be called inside :ref:`_export_file`. Skips the current file, so it's not included in the export. diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index 1d3ed28d7..b9fb49261 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -14,6 +14,8 @@ EditorFeatureProfile An editor feature profile which can be used to disable specific features. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,162 +23,259 @@ An editor feature profile can be used to disable specific features of the Godot To manage editor feature profiles visually, use **Editor > Manage Feature Profiles...** at the top of the editor window. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_feature_name` **(** :ref:`Feature` feature **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_class_disabled` **(** :ref:`StringName` class_name **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_class_editor_disabled` **(** :ref:`StringName` class_name **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_class_property_disabled` **(** :ref:`StringName` class_name, :ref:`StringName` property **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_feature_disabled` **(** :ref:`Feature` feature **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_from_file` **(** :ref:`String` path **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_to_file` **(** :ref:`String` path **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_class` **(** :ref:`StringName` class_name, :ref:`bool` disable **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_class_editor` **(** :ref:`StringName` class_name, :ref:`bool` disable **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_class_property` **(** :ref:`StringName` class_name, :ref:`StringName` property, :ref:`bool` disable **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_feature` **(** :ref:`Feature` feature, :ref:`bool` disable **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_feature_name` **(** :ref:`Feature` feature **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class_disabled` **(** :ref:`StringName` class_name **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class_editor_disabled` **(** :ref:`StringName` class_name **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class_property_disabled` **(** :ref:`StringName` class_name, :ref:`StringName` property **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_feature_disabled` **(** :ref:`Feature` feature **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_from_file` **(** :ref:`String` path **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_to_file` **(** :ref:`String` path **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_class` **(** :ref:`StringName` class_name, :ref:`bool` disable **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_class_editor` **(** :ref:`StringName` class_name, :ref:`bool` disable **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_class_property` **(** :ref:`StringName` class_name, :ref:`StringName` property, :ref:`bool` disable **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_feature` **(** :ref:`Feature` feature, :ref:`bool` disable **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_EditorFeatureProfile_Feature: -.. _class_EditorFeatureProfile_constant_FEATURE_3D: - -.. _class_EditorFeatureProfile_constant_FEATURE_SCRIPT: - -.. _class_EditorFeatureProfile_constant_FEATURE_ASSET_LIB: - -.. _class_EditorFeatureProfile_constant_FEATURE_SCENE_TREE: - -.. _class_EditorFeatureProfile_constant_FEATURE_NODE_DOCK: - -.. _class_EditorFeatureProfile_constant_FEATURE_FILESYSTEM_DOCK: - -.. _class_EditorFeatureProfile_constant_FEATURE_IMPORT_DOCK: - -.. _class_EditorFeatureProfile_constant_FEATURE_HISTORY_DOCK: - -.. _class_EditorFeatureProfile_constant_FEATURE_MAX: +.. rst-class:: classref-enumeration enum **Feature**: -- **FEATURE_3D** = **0** --- The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog. +.. _class_EditorFeatureProfile_constant_FEATURE_3D: -- **FEATURE_SCRIPT** = **1** --- The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display. +.. rst-class:: classref-enumeration-constant -- **FEATURE_ASSET_LIB** = **2** --- The AssetLib tab. If this feature is disabled, the AssetLib tab won't display. +:ref:`Feature` **FEATURE_3D** = ``0`` -- **FEATURE_SCENE_TREE** = **3** --- Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only. +The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog. -- **FEATURE_NODE_DOCK** = **4** --- The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor. +.. _class_EditorFeatureProfile_constant_FEATURE_SCRIPT: -- **FEATURE_FILESYSTEM_DOCK** = **5** --- The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible. +.. rst-class:: classref-enumeration-constant -- **FEATURE_IMPORT_DOCK** = **6** --- The Import dock. If this feature is disabled, the Import dock won't be visible. +:ref:`Feature` **FEATURE_SCRIPT** = ``1`` -- **FEATURE_HISTORY_DOCK** = **7** --- The History dock. If this feature is disabled, the History dock won't be visible. +The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display. -- **FEATURE_MAX** = **8** --- Represents the size of the :ref:`Feature` enum. +.. _class_EditorFeatureProfile_constant_FEATURE_ASSET_LIB: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_ASSET_LIB** = ``2`` + +The AssetLib tab. If this feature is disabled, the AssetLib tab won't display. + +.. _class_EditorFeatureProfile_constant_FEATURE_SCENE_TREE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_SCENE_TREE** = ``3`` + +Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only. + +.. _class_EditorFeatureProfile_constant_FEATURE_NODE_DOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NODE_DOCK** = ``4`` + +The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor. + +.. _class_EditorFeatureProfile_constant_FEATURE_FILESYSTEM_DOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_FILESYSTEM_DOCK** = ``5`` + +The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible. + +.. _class_EditorFeatureProfile_constant_FEATURE_IMPORT_DOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_IMPORT_DOCK** = ``6`` + +The Import dock. If this feature is disabled, the Import dock won't be visible. + +.. _class_EditorFeatureProfile_constant_FEATURE_HISTORY_DOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_HISTORY_DOCK** = ``7`` + +The History dock. If this feature is disabled, the History dock won't be visible. + +.. _class_EditorFeatureProfile_constant_FEATURE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_MAX** = ``8`` + +Represents the size of the :ref:`Feature` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorFeatureProfile_method_get_feature_name: -- :ref:`String` **get_feature_name** **(** :ref:`Feature` feature **)** +.. rst-class:: classref-method + +:ref:`String` **get_feature_name** **(** :ref:`Feature` feature **)** Returns the specified ``feature``'s human-readable name. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_is_class_disabled: -- :ref:`bool` **is_class_disabled** **(** :ref:`StringName` class_name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_class_disabled** **(** :ref:`StringName` class_name **)** |const| Returns ``true`` if the class specified by ``class_name`` is disabled. When disabled, the class won't appear in the Create New Node dialog. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_is_class_editor_disabled: -- :ref:`bool` **is_class_editor_disabled** **(** :ref:`StringName` class_name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_class_editor_disabled** **(** :ref:`StringName` class_name **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_is_class_property_disabled: -- :ref:`bool` **is_class_property_disabled** **(** :ref:`StringName` class_name, :ref:`StringName` property **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_class_property_disabled** **(** :ref:`StringName` class_name, :ref:`StringName` property **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_is_feature_disabled: -- :ref:`bool` **is_feature_disabled** **(** :ref:`Feature` feature **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_feature_disabled** **(** :ref:`Feature` feature **)** |const| Returns ``true`` if the ``feature`` is disabled. When a feature is disabled, it will disappear from the editor entirely. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_load_from_file: -- :ref:`Error` **load_from_file** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load_from_file** **(** :ref:`String` path **)** 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` method. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_save_to_file: -- :ref:`Error` **save_to_file** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **save_to_file** **(** :ref:`String` path **)** 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` method. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_set_disable_class: -- void **set_disable_class** **(** :ref:`StringName` class_name, :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **set_disable_class** **(** :ref:`StringName` class_name, :ref:`bool` disable **)** If ``disable`` is ``true``, disables the class specified by ``class_name``. When disabled, the class won't appear in the Create New Node dialog. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_set_disable_class_editor: -- void **set_disable_class_editor** **(** :ref:`StringName` class_name, :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **set_disable_class_editor** **(** :ref:`StringName` class_name, :ref:`bool` disable **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_set_disable_class_property: -- void **set_disable_class_property** **(** :ref:`StringName` class_name, :ref:`StringName` property, :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **set_disable_class_property** **(** :ref:`StringName` class_name, :ref:`StringName` property, :ref:`bool` disable **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFeatureProfile_method_set_disable_feature: -- void **set_disable_feature** **(** :ref:`Feature` feature, :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **set_disable_feature** **(** :ref:`Feature` feature, :ref:`bool` disable **)** If ``disable`` is ``true``, disables the editor feature specified in ``feature``. When a feature is disabled, it will disappear from the editor entirely. diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 7b6d45b44..527c6bd44 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -14,294 +14,416 @@ EditorFileDialog A modified version of :ref:`FileDialog` used by the editor. +.. rst-class:: classref-introduction-group + Description ----------- -``EditorFileDialog`` is an enhanced version of :ref:`FileDialog` available only to editor plugins. Additional features include list of favorited/recent files and ability to see files as thumbnails grid instead of list. +**EditorFileDialog** is an enhanced version of :ref:`FileDialog` available only to editor plugins. Additional features include list of favorited/recent files and ability to see files as thumbnails grid instead of list. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`Access` | :ref:`access` | ``0`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_dir` | | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_file` | | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_path` | | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`disable_overwrite_warning` | ``false`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`DisplayMode` | :ref:`display_mode` | ``0`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`FileMode` | :ref:`file_mode` | ``4`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`show_hidden_files` | ``false`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | title | ``"Save a File"`` (overrides :ref:`Window`) | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Access` | :ref:`access` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`current_dir` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`current_file` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`current_path` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`disable_overwrite_warning` | ``false`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`DisplayMode` | :ref:`display_mode` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`FileMode` | :ref:`file_mode` | ``4`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_hidden_files` | ``false`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | title | ``"Save a File"`` (overrides :ref:`Window`) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_filter` **(** :ref:`String` filter, :ref:`String` description="" **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_filters` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`invalidate` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_filter` **(** :ref:`String` filter, :ref:`String` description="" **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_filters` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`invalidate` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorFileDialog_signal_dir_selected: -- **dir_selected** **(** :ref:`String` dir **)** +.. rst-class:: classref-signal + +**dir_selected** **(** :ref:`String` dir **)** Emitted when a directory is selected. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_signal_file_selected: -- **file_selected** **(** :ref:`String` path **)** +.. rst-class:: classref-signal + +**file_selected** **(** :ref:`String` path **)** Emitted when a file is selected. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_signal_files_selected: -- **files_selected** **(** :ref:`PackedStringArray` paths **)** +.. rst-class:: classref-signal + +**files_selected** **(** :ref:`PackedStringArray` paths **)** Emitted when multiple files are selected. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_EditorFileDialog_FileMode: -.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_FILE: - -.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_FILES: - -.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_DIR: - -.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_ANY: - -.. _class_EditorFileDialog_constant_FILE_MODE_SAVE_FILE: +.. rst-class:: classref-enumeration enum **FileMode**: -- **FILE_MODE_OPEN_FILE** = **0** --- The ``EditorFileDialog`` can select only one file. Accepting the window will open the file. +.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_FILE: -- **FILE_MODE_OPEN_FILES** = **1** --- The ``EditorFileDialog`` can select multiple files. Accepting the window will open all files. +.. rst-class:: classref-enumeration-constant -- **FILE_MODE_OPEN_DIR** = **2** --- The ``EditorFileDialog`` can select only one directory. Accepting the window will open the directory. +:ref:`FileMode` **FILE_MODE_OPEN_FILE** = ``0`` -- **FILE_MODE_OPEN_ANY** = **3** --- The ``EditorFileDialog`` can select a file or directory. Accepting the window will open it. +The **EditorFileDialog** can select only one file. Accepting the window will open the file. -- **FILE_MODE_SAVE_FILE** = **4** --- The ``EditorFileDialog`` can select only one file. Accepting the window will save the file. +.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_FILES: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_OPEN_FILES** = ``1`` + +The **EditorFileDialog** can select multiple files. Accepting the window will open all files. + +.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_DIR: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_OPEN_DIR** = ``2`` + +The **EditorFileDialog** can select only one directory. Accepting the window will open the directory. + +.. _class_EditorFileDialog_constant_FILE_MODE_OPEN_ANY: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_OPEN_ANY** = ``3`` + +The **EditorFileDialog** can select a file or directory. Accepting the window will open it. + +.. _class_EditorFileDialog_constant_FILE_MODE_SAVE_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_SAVE_FILE** = ``4`` + +The **EditorFileDialog** can select only one file. Accepting the window will save the file. + +.. rst-class:: classref-item-separator ---- .. _enum_EditorFileDialog_Access: -.. _class_EditorFileDialog_constant_ACCESS_RESOURCES: - -.. _class_EditorFileDialog_constant_ACCESS_USERDATA: - -.. _class_EditorFileDialog_constant_ACCESS_FILESYSTEM: +.. rst-class:: classref-enumeration enum **Access**: -- **ACCESS_RESOURCES** = **0** --- The ``EditorFileDialog`` can only view ``res://`` directory contents. +.. _class_EditorFileDialog_constant_ACCESS_RESOURCES: -- **ACCESS_USERDATA** = **1** --- The ``EditorFileDialog`` can only view ``user://`` directory contents. +.. rst-class:: classref-enumeration-constant -- **ACCESS_FILESYSTEM** = **2** --- The ``EditorFileDialog`` can view the entire local file system. +:ref:`Access` **ACCESS_RESOURCES** = ``0`` + +The **EditorFileDialog** can only view ``res://`` directory contents. + +.. _class_EditorFileDialog_constant_ACCESS_USERDATA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Access` **ACCESS_USERDATA** = ``1`` + +The **EditorFileDialog** can only view ``user://`` directory contents. + +.. _class_EditorFileDialog_constant_ACCESS_FILESYSTEM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Access` **ACCESS_FILESYSTEM** = ``2`` + +The **EditorFileDialog** can view the entire local file system. + +.. rst-class:: classref-item-separator ---- .. _enum_EditorFileDialog_DisplayMode: -.. _class_EditorFileDialog_constant_DISPLAY_THUMBNAILS: - -.. _class_EditorFileDialog_constant_DISPLAY_LIST: +.. rst-class:: classref-enumeration enum **DisplayMode**: -- **DISPLAY_THUMBNAILS** = **0** --- The ``EditorFileDialog`` displays resources as thumbnails. +.. _class_EditorFileDialog_constant_DISPLAY_THUMBNAILS: -- **DISPLAY_LIST** = **1** --- The ``EditorFileDialog`` displays resources as a list of filenames. +.. rst-class:: classref-enumeration-constant + +:ref:`DisplayMode` **DISPLAY_THUMBNAILS** = ``0`` + +The **EditorFileDialog** displays resources as thumbnails. + +.. _class_EditorFileDialog_constant_DISPLAY_LIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisplayMode` **DISPLAY_LIST** = ``1`` + +The **EditorFileDialog** displays resources as a list of filenames. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_EditorFileDialog_property_access: -- :ref:`Access` **access** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_access(value) | -+-----------+-------------------+ -| *Getter* | get_access() | -+-----------+-------------------+ +:ref:`Access` **access** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_access** **(** :ref:`Access` value **)** +- :ref:`Access` **get_access** **(** **)** The location from which the user may select a file, including ``res://``, ``user://``, and the local file system. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_property_current_dir: -- :ref:`String` **current_dir** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_current_dir(value) | -+----------+------------------------+ -| *Getter* | get_current_dir() | -+----------+------------------------+ +:ref:`String` **current_dir** + +.. rst-class:: classref-property-setget + +- void **set_current_dir** **(** :ref:`String` value **)** +- :ref:`String` **get_current_dir** **(** **)** The currently occupied directory. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_property_current_file: -- :ref:`String` **current_file** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_current_file(value) | -+----------+-------------------------+ -| *Getter* | get_current_file() | -+----------+-------------------------+ +:ref:`String` **current_file** + +.. rst-class:: classref-property-setget + +- void **set_current_file** **(** :ref:`String` value **)** +- :ref:`String` **get_current_file** **(** **)** The currently selected file. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_property_current_path: -- :ref:`String` **current_path** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_current_path(value) | -+----------+-------------------------+ -| *Getter* | get_current_path() | -+----------+-------------------------+ +:ref:`String` **current_path** + +.. rst-class:: classref-property-setget + +- void **set_current_path** **(** :ref:`String` value **)** +- :ref:`String` **get_current_path** **(** **)** The file system path in the address bar. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_property_disable_overwrite_warning: -- :ref:`bool` **disable_overwrite_warning** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------+ -| *Setter* | set_disable_overwrite_warning(value) | -+-----------+--------------------------------------+ -| *Getter* | is_overwrite_warning_disabled() | -+-----------+--------------------------------------+ +:ref:`bool` **disable_overwrite_warning** = ``false`` -If ``true``, the ``EditorFileDialog`` will not warn the user before overwriting files. +.. rst-class:: classref-property-setget + +- void **set_disable_overwrite_warning** **(** :ref:`bool` value **)** +- :ref:`bool` **is_overwrite_warning_disabled** **(** **)** + +If ``true``, the **EditorFileDialog** will not warn the user before overwriting files. + +.. rst-class:: classref-item-separator ---- .. _class_EditorFileDialog_property_display_mode: -- :ref:`DisplayMode` **display_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_display_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_display_mode() | -+-----------+-------------------------+ +:ref:`DisplayMode` **display_mode** = ``0`` -The view format in which the ``EditorFileDialog`` displays resources to the user. +.. rst-class:: classref-property-setget + +- void **set_display_mode** **(** :ref:`DisplayMode` value **)** +- :ref:`DisplayMode` **get_display_mode** **(** **)** + +The view format in which the **EditorFileDialog** displays resources to the user. + +.. rst-class:: classref-item-separator ---- .. _class_EditorFileDialog_property_file_mode: -- :ref:`FileMode` **file_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4`` | -+-----------+----------------------+ -| *Setter* | set_file_mode(value) | -+-----------+----------------------+ -| *Getter* | get_file_mode() | -+-----------+----------------------+ +:ref:`FileMode` **file_mode** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_file_mode** **(** :ref:`FileMode` value **)** +- :ref:`FileMode` **get_file_mode** **(** **)** The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode` +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_property_show_hidden_files: -- :ref:`bool` **show_hidden_files** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_show_hidden_files(value) | -+-----------+------------------------------+ -| *Getter* | is_showing_hidden_files() | -+-----------+------------------------------+ +:ref:`bool` **show_hidden_files** = ``false`` -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`. +.. rst-class:: classref-property-setget + +- void **set_show_hidden_files** **(** :ref:`bool` value **)** +- :ref:`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`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorFileDialog_method_add_filter: -- void **add_filter** **(** :ref:`String` filter, :ref:`String` description="" **)** +.. rst-class:: classref-method -Adds a comma-delimited file name ``filter`` option to the ``EditorFileDialog`` with an optional ``description``, which restricts what files can be picked. +void **add_filter** **(** :ref:`String` filter, :ref:`String` description="" **)** + +Adds a comma-delimited file name ``filter`` option to the **EditorFileDialog** with an optional ``description``, which restricts what files can be picked. A ``filter`` should be of the form ``"filename.extension"``, where filename and extension can be ``*`` to match any string. Filters starting with ``.`` (i.e. empty filenames) are not allowed. For example, a ``filter`` of ``"*.tscn, *.scn"`` and a ``description`` of ``"Scenes"`` results in filter text "Scenes (\*.tscn, \*.scn)". +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_method_clear_filters: -- void **clear_filters** **(** **)** +.. rst-class:: classref-method + +void **clear_filters** **(** **)** Removes all filters except for "All Files (\*)". +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_method_get_vbox: -- :ref:`VBoxContainer` **get_vbox** **(** **)** +.. rst-class:: classref-method + +:ref:`VBoxContainer` **get_vbox** **(** **)** Returns the ``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` property. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileDialog_method_invalidate: -- void **invalidate** **(** **)** +.. rst-class:: classref-method -Notify the ``EditorFileDialog`` that its view of the data is no longer accurate. Updates the view contents on next view update. +void **invalidate** **(** **)** + +Notify the **EditorFileDialog** that its view of the data is no longer accurate. Updates the view contents on next view update. .. |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.)` diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 615413d4f..c769f089e 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -14,6 +14,8 @@ EditorFileSystem Resource filesystem, as the editor sees it. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,110 +23,163 @@ This object holds information of all resources in the filesystem, their types, e \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_filesystem`. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file_type` **(** :ref:`String` path **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem_path` **(** :ref:`String` path **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_scanning_progress` **(** **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_scanning` **(** **)** |const| | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reimport_files` **(** :ref:`PackedStringArray` files **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scan` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scan_sources` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_file` **(** :ref:`String` path **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_script_classes` **(** **)** | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file_type` **(** :ref:`String` path **)** |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem` **(** **)** | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem_path` **(** :ref:`String` path **)** | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_scanning_progress` **(** **)** |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_scanning` **(** **)** |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reimport_files` **(** :ref:`PackedStringArray` files **)** | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scan` **(** **)** | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scan_sources` **(** **)** | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_file` **(** :ref:`String` path **)** | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_script_classes` **(** **)** | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorFileSystem_signal_filesystem_changed: -- **filesystem_changed** **(** **)** +.. rst-class:: classref-signal + +**filesystem_changed** **(** **)** Emitted if the filesystem changed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_signal_resources_reimported: -- **resources_reimported** **(** :ref:`PackedStringArray` resources **)** +.. rst-class:: classref-signal + +**resources_reimported** **(** :ref:`PackedStringArray` resources **)** Emitted if a resource is reimported. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_signal_resources_reload: -- **resources_reload** **(** :ref:`PackedStringArray` resources **)** +.. rst-class:: classref-signal + +**resources_reload** **(** :ref:`PackedStringArray` resources **)** Emitted if at least one resource is reloaded when the filesystem is scanned. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_signal_sources_changed: -- **sources_changed** **(** :ref:`bool` exist **)** +.. rst-class:: classref-signal + +**sources_changed** **(** :ref:`bool` exist **)** Emitted if the source of any imported file changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorFileSystem_method_get_file_type: -- :ref:`String` **get_file_type** **(** :ref:`String` path **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_file_type** **(** :ref:`String` path **)** |const| 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"``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_get_filesystem: -- :ref:`EditorFileSystemDirectory` **get_filesystem** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorFileSystemDirectory` **get_filesystem** **(** **)** Gets the root directory object. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_get_filesystem_path: -- :ref:`EditorFileSystemDirectory` **get_filesystem_path** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`EditorFileSystemDirectory` **get_filesystem_path** **(** :ref:`String` path **)** Returns a view into the filesystem at ``path``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_get_scanning_progress: -- :ref:`float` **get_scanning_progress** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_scanning_progress** **(** **)** |const| Returns the scan progress for 0 to 1 if the FS is being scanned. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_is_scanning: -- :ref:`bool` **is_scanning** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_scanning** **(** **)** |const| Returns ``true`` if the filesystem is being scanned. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_reimport_files: -- void **reimport_files** **(** :ref:`PackedStringArray` files **)** +.. rst-class:: classref-method + +void **reimport_files** **(** :ref:`PackedStringArray` files **)** Reimports a set of files. Call this if these files or their ``.import`` files were directly edited by script or an external program. @@ -132,37 +187,53 @@ If the file type changed or the file was newly created, use :ref:`update_file`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files` or :ref:`scan` while an import is in progress. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_scan: -- void **scan** **(** **)** +.. rst-class:: classref-method + +void **scan** **(** **)** Scan the filesystem for changes. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_scan_sources: -- void **scan_sources** **(** **)** +.. rst-class:: classref-method + +void **scan_sources** **(** **)** Check if the source of any imported resource changed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_update_file: -- void **update_file** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **update_file** **(** :ref:`String` path **)** 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. This will not import the file. To reimport, call :ref:`reimport_files` or :ref:`scan` methods. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystem_method_update_script_classes: -- void **update_script_classes** **(** **)** +.. rst-class:: classref-method + +void **update_script_classes** **(** **)** Scans the script files and updates the list of custom class names. diff --git a/classes/class_editorfilesystemdirectory.rst b/classes/class_editorfilesystemdirectory.rst index cec1f666f..64be50aeb 100644 --- a/classes/class_editorfilesystemdirectory.rst +++ b/classes/class_editorfilesystemdirectory.rst @@ -14,154 +14,221 @@ EditorFileSystemDirectory A directory for the resource filesystem. +.. rst-class:: classref-introduction-group + Description ----------- A more generalized, low-level variation of the directory concept. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_dir_index` **(** :ref:`String` name **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_file_index` **(** :ref:`String` name **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file` **(** :ref:`int` idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_file_count` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_file_import_is_valid` **(** :ref:`int` idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file_path` **(** :ref:`int` idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file_script_class_extends` **(** :ref:`int` idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file_script_class_name` **(** :ref:`int` idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_file_type` **(** :ref:`int` idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorFileSystemDirectory` | :ref:`get_parent` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_path` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorFileSystemDirectory` | :ref:`get_subdir` **(** :ref:`int` idx **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_subdir_count` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_dir_index` **(** :ref:`String` name **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_file_index` **(** :ref:`String` name **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file` **(** :ref:`int` idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_file_count` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_file_import_is_valid` **(** :ref:`int` idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file_path` **(** :ref:`int` idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file_script_class_extends` **(** :ref:`int` idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file_script_class_name` **(** :ref:`int` idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_file_type` **(** :ref:`int` idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_name` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory` | :ref:`get_parent` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_path` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory` | :ref:`get_subdir` **(** :ref:`int` idx **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_subdir_count` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorFileSystemDirectory_method_find_dir_index: -- :ref:`int` **find_dir_index** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find_dir_index** **(** :ref:`String` name **)** |const| Returns the index of the directory with name ``name`` or ``-1`` if not found. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_find_file_index: -- :ref:`int` **find_file_index** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find_file_index** **(** :ref:`String` name **)** |const| Returns the index of the file with name ``name`` or ``-1`` if not found. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_file: -- :ref:`String` **get_file** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_file** **(** :ref:`int` idx **)** |const| Returns the name of the file at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_file_count: -- :ref:`int` **get_file_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_file_count** **(** **)** |const| Returns the number of files in this directory. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_file_import_is_valid: -- :ref:`bool` **get_file_import_is_valid** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_file_import_is_valid** **(** :ref:`int` idx **)** |const| Returns ``true`` if the file at index ``idx`` imported properly. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_file_path: -- :ref:`String` **get_file_path** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_file_path** **(** :ref:`int` idx **)** |const| Returns the path to the file at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_file_script_class_extends: -- :ref:`String` **get_file_script_class_extends** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_file_script_class_extends** **(** :ref:`int` idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_file_script_class_name: -- :ref:`String` **get_file_script_class_name** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_file_script_class_name** **(** :ref:`int` idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_file_type: -- :ref:`StringName` **get_file_type** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_file_type** **(** :ref:`int` idx **)** |const| 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"``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_name: -- :ref:`String` **get_name** **(** **)** +.. rst-class:: classref-method + +:ref:`String` **get_name** **(** **)** Returns the name of this directory. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_parent: -- :ref:`EditorFileSystemDirectory` **get_parent** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorFileSystemDirectory` **get_parent** **(** **)** Returns the parent directory for this directory or ``null`` if called on a directory at ``res://`` or ``user://``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_path: -- :ref:`String` **get_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_path** **(** **)** |const| Returns the path to this directory. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_subdir: -- :ref:`EditorFileSystemDirectory` **get_subdir** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`EditorFileSystemDirectory` **get_subdir** **(** :ref:`int` idx **)** Returns the subdirectory at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemDirectory_method_get_subdir_count: -- :ref:`int` **get_subdir_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_subdir_count** **(** **)** |const| Returns the number of subdirectories in this directory. diff --git a/classes/class_editorfilesystemimportformatsupportquery.rst b/classes/class_editorfilesystemimportformatsupportquery.rst index c3bb897ca..c9e21a1a5 100644 --- a/classes/class_editorfilesystemimportformatsupportquery.rst +++ b/classes/class_editorfilesystemimportformatsupportquery.rst @@ -14,44 +14,67 @@ EditorFileSystemImportFormatSupportQuery Used to query and configure import format support. +.. rst-class:: classref-introduction-group + Description ----------- This class is used to query and configure a certain import format. It is used in conjunction with asset format import plugins. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_file_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_active` **(** **)** |virtual| |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_query` **(** **)** |virtual| |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_file_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_active` **(** **)** |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_query` **(** **)** |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorFileSystemImportFormatSupportQuery_method__get_file_extensions: -- :ref:`PackedStringArray` **_get_file_extensions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_file_extensions** **(** **)** |virtual| |const| Return the file extensions supported. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemImportFormatSupportQuery_method__is_active: -- :ref:`bool` **_is_active** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_active** **(** **)** |virtual| |const| Return whether this importer is active. +.. rst-class:: classref-item-separator + ---- .. _class_EditorFileSystemImportFormatSupportQuery_method__query: -- :ref:`bool` **_query** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_query** **(** **)** |virtual| |const| Query support. Return false if import must not continue. diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 041217277..6f6a98bb4 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -14,10 +14,12 @@ EditorImportPlugin Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type. +.. rst-class:: classref-introduction-group + 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. +**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` and :ref:`_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`). @@ -129,72 +131,99 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr -To use ``EditorImportPlugin``, register it using the :ref:`EditorPlugin.add_import_plugin` method first. +To use **EditorImportPlugin**, register it using the :ref:`EditorPlugin.add_import_plugin` method first. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Import plugins <../tutorials/plugins/editor/import_plugins>` +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_import_options` **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_import_order` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_importer_name` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`StringName` option_name, :ref:`Dictionary` options **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_preset_count` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_preset_name` **(** :ref:`int` preset_index **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_priority` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_resource_type` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_save_extension` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_visible_name` **(** **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_import` **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`String[]` platform_variants, :ref:`String[]` gen_files **)** |virtual| |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_import_options` **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_import_order` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_importer_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`StringName` option_name, :ref:`Dictionary` options **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_preset_count` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_preset_name` **(** :ref:`int` preset_index **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_priority` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_resource_type` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_save_extension` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_visible_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_import` **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`String[]` platform_variants, :ref:`String[]` gen_files **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorImportPlugin_method__get_import_options: -- :ref:`Dictionary[]` **_get_import_options** **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_import_options** **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| 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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_import_order: -- :ref:`int` **_get_import_order** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_import_order** **(** **)** |virtual| |const| 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` for some predefined values. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_importer_name: -- :ref:`String` **_get_importer_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_importer_name** **(** **)** |virtual| |const| Gets the unique name of the importer. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_option_visibility: -- :ref:`bool` **_get_option_visibility** **(** :ref:`String` path, :ref:`StringName` option_name, :ref:`Dictionary` options **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_get_option_visibility** **(** :ref:`String` path, :ref:`StringName` option_name, :ref:`Dictionary` options **)** |virtual| |const| 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: @@ -227,67 +256,99 @@ This method can be overridden to hide specific import options if conditions are Returns ``true`` to make all options always visible. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_preset_count: -- :ref:`int` **_get_preset_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_preset_count** **(** **)** |virtual| |const| Gets the number of initial presets defined by the plugin. Use :ref:`_get_import_options` to get the default options for the preset and :ref:`_get_preset_name` to get the name of the preset. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_preset_name: -- :ref:`String` **_get_preset_name** **(** :ref:`int` preset_index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_preset_name** **(** :ref:`int` preset_index **)** |virtual| |const| Gets the name of the options preset at this index. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_priority: -- :ref:`float` **_get_priority** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_priority** **(** **)** |virtual| |const| Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is ``1.0``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_recognized_extensions: -- :ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| Gets the list of file extensions to associate with this loader (case-insensitive). e.g. ``["obj"]``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_resource_type: -- :ref:`String` **_get_resource_type** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_resource_type** **(** **)** |virtual| |const| Gets the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``"Animation"``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_save_extension: -- :ref:`String` **_get_save_extension** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_save_extension** **(** **)** |virtual| |const| Gets the extension used to save this resource in the ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory`). +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__get_visible_name: -- :ref:`String` **_get_visible_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_visible_name** **(** **)** |virtual| |const| 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". +.. rst-class:: classref-item-separator + ---- .. _class_EditorImportPlugin_method__import: -- :ref:`int` **_import** **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`String[]` platform_variants, :ref:`String[]` gen_files **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_import** **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`String[]` platform_variants, :ref:`String[]` gen_files **)** |virtual| |const| Imports ``source_file`` into ``save_path`` with the import ``options`` specified. The ``platform_variants`` and ``gen_files`` arrays will be modified by this function. diff --git a/classes/class_editorinspector.rst b/classes/class_editorinspector.rst index dcf9d25a5..018fa0d13 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -14,116 +14,176 @@ EditorInspector A control used to edit properties of an object. +.. rst-class:: classref-introduction-group + Description ----------- -This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the ``EditorInspector`` used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector`. +This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the **EditorInspector** used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector`. -\ ``EditorInspector`` will show properties in the same order as the array returned by :ref:`Object.get_property_list`. +\ **EditorInspector** will show properties in the same order as the array returned by :ref:`Object.get_property_list`. -If a property's name is path-like (i.e. if it contains forward slashes), ``EditorInspector`` will create nested sections for "directories" along the path. For example, if a property is named ``highlighting/gdscript/node_path_color``, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. +If a property's name is path-like (i.e. if it contains forward slashes), **EditorInspector** will create nested sections for "directories" along the path. For example, if a property is named ``highlighting/gdscript/node_path_color``, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. -If a property has :ref:`@GlobalScope.PROPERTY_USAGE_GROUP` usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. ``EditorInspector`` will create a top-level section for each group. For example, if a property with group usage is named ``Collide With`` and its hint string is ``collide_with_``, a subsequent ``collide_with_area`` property will be shown as "Area" inside the "Collide With" section. +If a property has :ref:`@GlobalScope.PROPERTY_USAGE_GROUP` usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. **EditorInspector** will create a top-level section for each group. For example, if a property with group usage is named ``Collide With`` and its hint string is ``collide_with_``, a subsequent ``collide_with_area`` property will be shown as "Area" inside the "Collide With" section. There is also a special case: when the hint string contains the name of a property, that property is grouped too. This is mainly to help grouping properties like ``font``, ``font_color`` and ``font_size`` (using the hint string ``font_``). If a property has :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup. -\ **Note:** Unlike sections created from path-like property names, ``EditorInspector`` won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names. +\ **Note:** Unlike sections created from path-like property names, **EditorInspector** won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names. + +.. rst-class:: classref-reftable-group Properties ---------- -+----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`ScrollMode` | horizontal_scroll_mode | ``0`` (overrides :ref:`ScrollContainer`) | -+----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`ScrollMode` | horizontal_scroll_mode | ``0`` (overrides :ref:`ScrollContainer`) | + +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+----------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_selected_path` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_path` **(** **)** |const| | + +-----------------------------+----------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorInspector_signal_edited_object_changed: -- **edited_object_changed** **(** **)** +.. rst-class:: classref-signal + +**edited_object_changed** **(** **)** Emitted when the object being edited by the inspector has changed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_object_id_selected: -- **object_id_selected** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**object_id_selected** **(** :ref:`int` id **)** Emitted when the Edit button of an :ref:`Object` has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_property_deleted: -- **property_deleted** **(** :ref:`String` property **)** +.. rst-class:: classref-signal + +**property_deleted** **(** :ref:`String` property **)** Emitted when a property is removed from the inspector. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_property_edited: -- **property_edited** **(** :ref:`String` property **)** +.. rst-class:: classref-signal + +**property_edited** **(** :ref:`String` property **)** Emitted when a property is edited in the inspector. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_property_keyed: -- **property_keyed** **(** :ref:`String` property, :ref:`Variant` value, :ref:`bool` advance **)** +.. rst-class:: classref-signal + +**property_keyed** **(** :ref:`String` property, :ref:`Variant` value, :ref:`bool` advance **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_property_selected: -- **property_selected** **(** :ref:`String` property **)** +.. rst-class:: classref-signal + +**property_selected** **(** :ref:`String` property **)** Emitted when a property is selected in the inspector. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_property_toggled: -- **property_toggled** **(** :ref:`String` property, :ref:`bool` checked **)** +.. rst-class:: classref-signal + +**property_toggled** **(** :ref:`String` property, :ref:`bool` checked **)** Emitted when a boolean property is toggled in the inspector. \ **Note:** This signal is never emitted if the internal ``autoclear`` property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_resource_selected: -- **resource_selected** **(** :ref:`Resource` resource, :ref:`String` path **)** +.. rst-class:: classref-signal + +**resource_selected** **(** :ref:`Resource` resource, :ref:`String` path **)** Emitted when a resource is selected in the inspector. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspector_signal_restart_requested: -- **restart_requested** **(** **)** +.. rst-class:: classref-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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorInspector_method_get_selected_path: -- :ref:`String` **get_selected_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_selected_path** **(** **)** |const| Gets the path of the currently selected property. diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index d9c3bc6a6..833a072b2 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -14,10 +14,12 @@ EditorInspectorPlugin Plugin for adding custom property editors on the inspector. +.. rst-class:: classref-introduction-group + Description ----------- -``EditorInspectorPlugin`` allows adding custom property editors to :ref:`EditorInspector`. +**EditorInspectorPlugin** allows adding custom property editors to :ref:`EditorInspector`. When an object is edited, the :ref:`_can_handle` function is called and must return ``true`` if the object type is supported. @@ -29,106 +31,153 @@ Finally, :ref:`_parse_end` will b On each of these calls, the "add" functions can be called. -To use ``EditorInspectorPlugin``, register it using the :ref:`EditorPlugin.add_inspector_plugin` method first. +To use **EditorInspectorPlugin**, register it using the :ref:`EditorPlugin.add_inspector_plugin` method first. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Inspector plugins <../tutorials/plugins/editor/inspector_plugins>` +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_can_handle` **(** :ref:`Variant` object **)** |virtual| |const| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_parse_begin` **(** :ref:`Object` object **)** |virtual| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_parse_category` **(** :ref:`Object` object, :ref:`String` category **)** |virtual| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_parse_end` **(** :ref:`Object` object **)** |virtual| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_parse_group` **(** :ref:`Object` object, :ref:`String` group **)** |virtual| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_parse_property` **(** :ref:`Object` object, :ref:`int` type, :ref:`String` name, :ref:`int` hint_type, :ref:`String` hint_string, :ref:`int` usage_flags, :ref:`bool` wide **)** |virtual| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_control` **(** :ref:`Control` control **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_property_editor` **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_property_editor_for_multiple_properties` **(** :ref:`String` label, :ref:`PackedStringArray` properties, :ref:`Control` editor **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_handle` **(** :ref:`Variant` object **)** |virtual| |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_begin` **(** :ref:`Object` object **)** |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_category` **(** :ref:`Object` object, :ref:`String` category **)** |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_end` **(** :ref:`Object` object **)** |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_group` **(** :ref:`Object` object, :ref:`String` group **)** |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_parse_property` **(** :ref:`Object` object, :ref:`int` type, :ref:`String` name, :ref:`int` hint_type, :ref:`String` hint_string, :ref:`int` usage_flags, :ref:`bool` wide **)** |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_custom_control` **(** :ref:`Control` control **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_property_editor` **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_property_editor_for_multiple_properties` **(** :ref:`String` label, :ref:`PackedStringArray` properties, :ref:`Control` editor **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorInspectorPlugin_method__can_handle: -- :ref:`bool` **_can_handle** **(** :ref:`Variant` object **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_handle** **(** :ref:`Variant` object **)** |virtual| |const| Returns ``true`` if this object can be handled by this plugin. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method__parse_begin: -- void **_parse_begin** **(** :ref:`Object` object **)** |virtual| +.. rst-class:: classref-method + +void **_parse_begin** **(** :ref:`Object` object **)** |virtual| Called to allow adding controls at the beginning of the property list for ``object``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method__parse_category: -- void **_parse_category** **(** :ref:`Object` object, :ref:`String` category **)** |virtual| +.. rst-class:: classref-method + +void **_parse_category** **(** :ref:`Object` object, :ref:`String` category **)** |virtual| Called to allow adding controls at the beginning of a category in the property list for ``object``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method__parse_end: -- void **_parse_end** **(** :ref:`Object` object **)** |virtual| +.. rst-class:: classref-method + +void **_parse_end** **(** :ref:`Object` object **)** |virtual| Called to allow adding controls at the end of the property list for ``object``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method__parse_group: -- void **_parse_group** **(** :ref:`Object` object, :ref:`String` group **)** |virtual| +.. rst-class:: classref-method + +void **_parse_group** **(** :ref:`Object` object, :ref:`String` group **)** |virtual| Called to allow adding controls at the beginning of a group or a sub-group in the property list for ``object``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method__parse_property: -- :ref:`bool` **_parse_property** **(** :ref:`Object` object, :ref:`int` type, :ref:`String` name, :ref:`int` hint_type, :ref:`String` hint_string, :ref:`int` usage_flags, :ref:`bool` wide **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_parse_property** **(** :ref:`Object` object, :ref:`int` type, :ref:`String` name, :ref:`int` hint_type, :ref:`String` hint_string, :ref:`int` usage_flags, :ref:`bool` wide **)** |virtual| Called to allow adding property-specific editors to the property list for ``object``. The added editor control must extend :ref:`EditorProperty`. Returning ``true`` removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method_add_custom_control: -- void **add_custom_control** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **add_custom_control** **(** :ref:`Control` control **)** Adds a custom control, which is not necessarily a property editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method_add_property_editor: -- void **add_property_editor** **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** +.. rst-class:: classref-method + +void **add_property_editor** **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** Adds a property editor for an individual property. The ``editor`` control must extend :ref:`EditorProperty`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInspectorPlugin_method_add_property_editor_for_multiple_properties: -- void **add_property_editor_for_multiple_properties** **(** :ref:`String` label, :ref:`PackedStringArray` properties, :ref:`Control` editor **)** +.. rst-class:: classref-method + +void **add_property_editor_for_multiple_properties** **(** :ref:`String` label, :ref:`PackedStringArray` properties, :ref:`Control` editor **)** Adds an editor that allows modifying multiple properties. The ``editor`` control must extend :ref:`EditorProperty`. diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index fb7fcf4c4..60cef634d 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -14,6 +14,8 @@ EditorInterface Godot editor's interface. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,435 +23,612 @@ EditorInterface gives you control over Godot editor's window. It allows customiz \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorPlugin.get_editor_interface`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`distraction_free_mode` | -+-------------------------+------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`distraction_free_mode` | + +-------------------------+------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_node` **(** :ref:`Node` node **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_resource` **(** :ref:`Resource` resource **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_script` **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=true **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`get_base_control` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorCommandPalette` | :ref:`get_command_palette` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_directory` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_path` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_edited_scene_root` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VBoxContainer` | :ref:`get_editor_main_screen` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorPaths` | :ref:`get_editor_paths` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_editor_scale` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FileSystemDock` | :ref:`get_file_system_dock` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_open_scenes` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_playing_scene` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorFileSystem` | :ref:`get_resource_filesystem` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorResourcePreview` | :ref:`get_resource_previewer` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptEditor` | :ref:`get_script_editor` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_selected_paths` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorSelection` | :ref:`get_selection` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`inspect_object` **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_movie_maker_enabled` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_playing_scene` **(** **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D[]` | :ref:`make_mesh_previews` **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play_current_scene` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play_custom_scene` **(** :ref:`String` scene_filepath **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play_main_scene` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`restart_editor` **(** :ref:`bool` save=true **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_scene` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select_file` **(** :ref:`String` file **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_main_screen_editor` **(** :ref:`String` name **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_movie_maker_enabled` **(** :ref:`bool` enabled **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop_playing_scene` **(** **)** | -+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_node` **(** :ref:`Node` node **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_resource` **(** :ref:`Resource` resource **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_script` **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=true **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_base_control` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorCommandPalette` | :ref:`get_command_palette` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_directory` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_path` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_edited_scene_root` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_editor_main_screen` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorPaths` | :ref:`get_editor_paths` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_editor_scale` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileSystemDock` | :ref:`get_file_system_dock` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_open_scenes` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_playing_scene` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditor` | :ref:`get_script_editor` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_selected_paths` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSelection` | :ref:`get_selection` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`inspect_object` **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_movie_maker_enabled` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing_scene` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D[]` | :ref:`make_mesh_previews` **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_current_scene` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_custom_scene` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_main_scene` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`restart_editor` **(** :ref:`bool` save=true **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_scene` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_file` **(** :ref:`String` file **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_main_screen_editor` **(** :ref:`String` name **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_movie_maker_enabled` **(** :ref:`bool` enabled **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop_playing_scene` **(** **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_EditorInterface_property_distraction_free_mode: -- :ref:`bool` **distraction_free_mode** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_distraction_free_mode(value) | -+----------+------------------------------------+ -| *Getter* | is_distraction_free_mode_enabled() | -+----------+------------------------------------+ +:ref:`bool` **distraction_free_mode** + +.. rst-class:: classref-property-setget + +- void **set_distraction_free_mode** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorInterface_method_edit_node: -- void **edit_node** **(** :ref:`Node` node **)** +.. rst-class:: classref-method + +void **edit_node** **(** :ref:`Node` node **)** Edits the given :ref:`Node`. The node will be also selected if it's inside the scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_edit_resource: -- void **edit_resource** **(** :ref:`Resource` resource **)** +.. rst-class:: classref-method + +void **edit_resource** **(** :ref:`Resource` resource **)** Edits the given :ref:`Resource`. If the resource is a :ref:`Script` you can also edit it with :ref:`edit_script` to specify the line and column position. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_edit_script: -- void **edit_script** **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=true **)** +.. rst-class:: classref-method + +void **edit_script** **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=true **)** Edits the given :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_base_control: -- :ref:`Control` **get_base_control** **(** **)** +.. rst-class:: classref-method + +:ref:`Control` **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. \ **Warning:** Removing and freeing this node will render the editor useless and may cause a crash. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_command_palette: -- :ref:`EditorCommandPalette` **get_command_palette** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`EditorCommandPalette` **get_command_palette** **(** **)** |const| Returns the editor's :ref:`EditorCommandPalette` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_current_directory: -- :ref:`String` **get_current_directory** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_current_directory** **(** **)** |const| Returns the current directory being viewed in the :ref:`FileSystemDock`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir` instead. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_current_path: -- :ref:`String` **get_current_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_current_path** **(** **)** |const| Returns the current path being viewed in the :ref:`FileSystemDock`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_edited_scene_root: -- :ref:`Node` **get_edited_scene_root** **(** **)** +.. rst-class:: classref-method + +:ref:`Node` **get_edited_scene_root** **(** **)** Returns the edited (current) scene's root :ref:`Node`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_editor_main_screen: -- :ref:`VBoxContainer` **get_editor_main_screen** **(** **)** +.. rst-class:: classref-method + +:ref:`VBoxContainer` **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`. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_editor_paths: -- :ref:`EditorPaths` **get_editor_paths** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorPaths` **get_editor_paths** **(** **)** Returns the :ref:`EditorPaths` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_editor_scale: -- :ref:`float` **get_editor_scale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_editor_scale** **(** **)** |const| 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. \ **Note:** This value is set via the ``interface/editor/display_scale`` and ``interface/editor/custom_display_scale`` editor settings. Editor must be restarted for changes to be properly applied. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_editor_settings: -- :ref:`EditorSettings` **get_editor_settings** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorSettings` **get_editor_settings** **(** **)** Returns the editor's :ref:`EditorSettings` instance. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_file_system_dock: -- :ref:`FileSystemDock` **get_file_system_dock** **(** **)** +.. rst-class:: classref-method + +:ref:`FileSystemDock` **get_file_system_dock** **(** **)** Returns the editor's :ref:`FileSystemDock` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_inspector: -- :ref:`EditorInspector` **get_inspector** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`EditorInspector` **get_inspector** **(** **)** |const| Returns the editor's :ref:`EditorInspector` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_open_scenes: -- :ref:`PackedStringArray` **get_open_scenes** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_open_scenes** **(** **)** |const| Returns an :ref:`Array` with the file paths of the currently opened scenes. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_playing_scene: -- :ref:`String` **get_playing_scene** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_playing_scene** **(** **)** |const| Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_resource_filesystem: -- :ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** Returns the editor's :ref:`EditorFileSystem` instance. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_resource_previewer: -- :ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** Returns the editor's :ref:`EditorResourcePreview` instance. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_script_editor: -- :ref:`ScriptEditor` **get_script_editor** **(** **)** +.. rst-class:: classref-method + +:ref:`ScriptEditor` **get_script_editor** **(** **)** Returns the editor's :ref:`ScriptEditor` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_selected_paths: -- :ref:`PackedStringArray` **get_selected_paths** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_selected_paths** **(** **)** |const| Returns an array containing the paths of the currently selected files (and directories) in the :ref:`FileSystemDock`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_get_selection: -- :ref:`EditorSelection` **get_selection** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorSelection` **get_selection** **(** **)** Returns the editor's :ref:`EditorSelection` instance. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_inspect_object: -- void **inspect_object** **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** +.. rst-class:: classref-method + +void **inspect_object** **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_is_movie_maker_enabled: -- :ref:`bool` **is_movie_maker_enabled** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_movie_maker_enabled** **(** **)** |const| Returns ``true`` if Movie Maker mode is enabled in the editor. See also :ref:`set_movie_maker_enabled`. See :ref:`MovieWriter` for more information. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_is_playing_scene: -- :ref:`bool` **is_playing_scene** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_playing_scene** **(** **)** |const| Returns ``true`` if a scene is currently being played, ``false`` otherwise. Paused scenes are considered as being played. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_is_plugin_enabled: -- :ref:`bool` **is_plugin_enabled** **(** :ref:`String` plugin **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_plugin_enabled** **(** :ref:`String` plugin **)** |const| Returns ``true`` if the specified ``plugin`` is enabled. The plugin name is the same as its directory name. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_make_mesh_previews: -- :ref:`Texture2D[]` **make_mesh_previews** **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** +.. rst-class:: classref-method + +:ref:`Texture2D[]` **make_mesh_previews** **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** Returns mesh previews rendered at the given size as an :ref:`Array` of :ref:`Texture2D`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_open_scene_from_path: -- void **open_scene_from_path** **(** :ref:`String` scene_filepath **)** +.. rst-class:: classref-method + +void **open_scene_from_path** **(** :ref:`String` scene_filepath **)** Opens the scene at the given path. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_play_current_scene: -- void **play_current_scene** **(** **)** +.. rst-class:: classref-method + +void **play_current_scene** **(** **)** Plays the currently active scene. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_play_custom_scene: -- void **play_custom_scene** **(** :ref:`String` scene_filepath **)** +.. rst-class:: classref-method + +void **play_custom_scene** **(** :ref:`String` scene_filepath **)** Plays the scene specified by its filepath. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_play_main_scene: -- void **play_main_scene** **(** **)** +.. rst-class:: classref-method + +void **play_main_scene** **(** **)** Plays the main scene. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_reload_scene_from_path: -- void **reload_scene_from_path** **(** :ref:`String` scene_filepath **)** +.. rst-class:: classref-method + +void **reload_scene_from_path** **(** :ref:`String` scene_filepath **)** Reloads the scene at the given path. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_restart_editor: -- void **restart_editor** **(** :ref:`bool` save=true **)** +.. rst-class:: classref-method + +void **restart_editor** **(** :ref:`bool` save=true **)** Restarts the editor. This closes the editor and then opens the same project. If ``save`` is ``true``, the project will be saved before restarting. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_save_scene: -- :ref:`Error` **save_scene** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **save_scene** **(** **)** Saves the scene. Returns either :ref:`@GlobalScope.OK` or :ref:`@GlobalScope.ERR_CANT_CREATE`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_save_scene_as: -- void **save_scene_as** **(** :ref:`String` path, :ref:`bool` with_preview=true **)** +.. rst-class:: classref-method + +void **save_scene_as** **(** :ref:`String` path, :ref:`bool` with_preview=true **)** Saves the scene as a file at ``path``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_select_file: -- void **select_file** **(** :ref:`String` file **)** +.. rst-class:: classref-method + +void **select_file** **(** :ref:`String` file **)** Selects the file, with the path provided by ``file``, in the FileSystem dock. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_set_main_screen_editor: -- void **set_main_screen_editor** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_main_screen_editor** **(** :ref:`String` name **)** 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``). +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_set_movie_maker_enabled: -- void **set_movie_maker_enabled** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_movie_maker_enabled** **(** :ref:`bool` enabled **)** Sets whether Movie Maker mode is enabled in the editor. See also :ref:`is_movie_maker_enabled`. See :ref:`MovieWriter` for more information. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_set_plugin_enabled: -- void **set_plugin_enabled** **(** :ref:`String` plugin, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_plugin_enabled** **(** :ref:`String` plugin, :ref:`bool` enabled **)** Sets the enabled status of a plugin. The plugin name is the same as its directory name. +.. rst-class:: classref-item-separator + ---- .. _class_EditorInterface_method_stop_playing_scene: -- void **stop_playing_scene** **(** **)** +.. rst-class:: classref-method + +void **stop_playing_scene** **(** **)** Stops the scene that is currently playing. diff --git a/classes/class_editornode3dgizmo.rst b/classes/class_editornode3dgizmo.rst index efc4be52c..b2f526d95 100644 --- a/classes/class_editornode3dgizmo.rst +++ b/classes/class_editornode3dgizmo.rst @@ -14,70 +14,85 @@ EditorNode3DGizmo Gizmo for editing 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` is usually recommended. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_commit_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_commit_subgizmos` **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_handle_name` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`int` id **)** |virtual| |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_redraw` **(** **)** |virtual| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_subgizmo_transform` **(** :ref:`int` id, :ref:`Transform3D` transform **)** |virtual| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`Camera3D` camera, :ref:`Plane[]` frustum **)** |virtual| |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_segments` **(** :ref:`PackedVector3Array` segments **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_triangles` **(** :ref:`TriangleMesh` triangles **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_handles` **(** :ref:`PackedVector3Array` handles, :ref:`Material` material, :ref:`PackedInt32Array` ids, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_lines` **(** :ref:`PackedVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_mesh` **(** :ref:`Mesh` mesh, :ref:`Material` material=null, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference` skeleton=null **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_unscaled_billboard` **(** :ref:`Material` material, :ref:`float` default_scale=1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node3D` | :ref:`get_node_3d` **(** **)** |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorNode3DGizmoPlugin` | :ref:`get_plugin` **(** **)** |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_subgizmo_selection` **(** **)** |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_subgizmo_selected` **(** :ref:`int` id **)** |const| | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_node_3d` **(** :ref:`Node` node **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit_subgizmos` **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_handle_name` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`int` id **)** |virtual| |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_redraw` **(** **)** |virtual| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_subgizmo_transform` **(** :ref:`int` id, :ref:`Transform3D` transform **)** |virtual| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`Camera3D` camera, :ref:`Plane[]` frustum **)** |virtual| |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_segments` **(** :ref:`PackedVector3Array` segments **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_triangles` **(** :ref:`TriangleMesh` triangles **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_handles` **(** :ref:`PackedVector3Array` handles, :ref:`Material` material, :ref:`PackedInt32Array` ids, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_lines` **(** :ref:`PackedVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_mesh` **(** :ref:`Mesh` mesh, :ref:`Material` material=null, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference` skeleton=null **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_unscaled_billboard` **(** :ref:`Material` material, :ref:`float` default_scale=1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`get_node_3d` **(** **)** |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorNode3DGizmoPlugin` | :ref:`get_plugin` **(** **)** |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_subgizmo_selection` **(** **)** |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_subgizmo_selected` **(** :ref:`int` id **)** |const| | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_node_3d` **(** :ref:`Node` node **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorNode3DGizmo_method__commit_handle: -- void **_commit_handle** **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| +.. rst-class:: classref-method + +void **_commit_handle** **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| Override this method to commit a handle being edited (handles must have been previously added by :ref:`add_handles`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". @@ -85,117 +100,169 @@ If the ``cancel`` argument is ``true``, the ``restore`` value should be directly The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`add_handles` for more information). +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__commit_subgizmos: -- void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| +.. rst-class:: classref-method + +void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`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` action. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__get_handle_name: -- :ref:`String` **_get_handle_name** **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_handle_name** **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| Override this method to return the name of an edited handle (handles must have been previously added by :ref:`add_handles`). Handles can be named for reference to the user when editing. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__get_handle_value: -- :ref:`Variant` **_get_handle_value** **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_handle_value** **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| 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`. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__get_subgizmo_transform: -- :ref:`Transform3D` **_get_subgizmo_transform** **(** :ref:`int` id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **_get_subgizmo_transform** **(** :ref:`int` id **)** |virtual| |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__is_handle_highlighted: -- :ref:`bool` **_is_handle_highlighted** **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_handle_highlighted** **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| Override this method to return ``true`` whenever the given handle should be highlighted in the editor. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__redraw: -- void **_redraw** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_redraw** **(** **)** |virtual| Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`clear` at the beginning of this method and then add visual elements depending on the node's properties. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__set_handle: -- void **_set_handle** **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| +.. rst-class:: classref-method + +void **_set_handle** **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| Override this method to update the node properties when the user drags a gizmo handle (previously added with :ref:`add_handles`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`add_handles` for more information). +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__set_subgizmo_transform: -- void **_set_subgizmo_transform** **(** :ref:`int` id, :ref:`Transform3D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_set_subgizmo_transform** **(** :ref:`int` id, :ref:`Transform3D` transform **)** |virtual| Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). The ``transform`` is given in the Node3D's local coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__subgizmos_intersect_frustum: -- :ref:`PackedInt32Array` **_subgizmos_intersect_frustum** **(** :ref:`Camera3D` camera, :ref:`Plane[]` frustum **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_subgizmos_intersect_frustum** **(** :ref:`Camera3D` camera, :ref:`Plane[]` frustum **)** |virtual| |const| 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` or :ref:`_commit_subgizmos`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method__subgizmos_intersect_ray: -- :ref:`int` **_subgizmos_intersect_ray** **(** :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_subgizmos_intersect_ray** **(** :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| |const| 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` or :ref:`_commit_subgizmos`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_add_collision_segments: -- void **add_collision_segments** **(** :ref:`PackedVector3Array` segments **)** +.. rst-class:: classref-method + +void **add_collision_segments** **(** :ref:`PackedVector3Array` segments **)** Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_add_collision_triangles: -- void **add_collision_triangles** **(** :ref:`TriangleMesh` triangles **)** +.. rst-class:: classref-method + +void **add_collision_triangles** **(** :ref:`TriangleMesh` triangles **)** Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this method during :ref:`_redraw`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_add_handles: -- void **add_handles** **(** :ref:`PackedVector3Array` handles, :ref:`Material` material, :ref:`PackedInt32Array` ids, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** +.. rst-class:: classref-method + +void **add_handles** **(** :ref:`PackedVector3Array` handles, :ref:`Material` material, :ref:`PackedInt32Array` ids, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** 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. @@ -203,83 +270,123 @@ The ``secondary`` argument marks the added handles as secondary, meaning they wi There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_add_lines: -- void **add_lines** **(** :ref:`PackedVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +.. rst-class:: classref-method + +void **add_lines** **(** :ref:`PackedVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_add_mesh: -- void **add_mesh** **(** :ref:`Mesh` mesh, :ref:`Material` material=null, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference` skeleton=null **)** +.. rst-class:: classref-method + +void **add_mesh** **(** :ref:`Mesh` mesh, :ref:`Material` material=null, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference` skeleton=null **)** Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_add_unscaled_billboard: -- void **add_unscaled_billboard** **(** :ref:`Material` material, :ref:`float` default_scale=1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +.. rst-class:: classref-method + +void **add_unscaled_billboard** **(** :ref:`Material` material, :ref:`float` default_scale=1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Removes everything in the gizmo including meshes, collisions and handles. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_get_node_3d: -- :ref:`Node3D` **get_node_3d** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node3D` **get_node_3d** **(** **)** |const| Returns the :ref:`Node3D` node associated with this gizmo. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_get_plugin: -- :ref:`EditorNode3DGizmoPlugin` **get_plugin** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`EditorNode3DGizmoPlugin` **get_plugin** **(** **)** |const| Returns the :ref:`EditorNode3DGizmoPlugin` that owns this gizmo. It's useful to retrieve materials using :ref:`EditorNode3DGizmoPlugin.get_material`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_get_subgizmo_selection: -- :ref:`PackedInt32Array` **get_subgizmo_selection** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_subgizmo_selection** **(** **)** |const| Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_is_subgizmo_selected: -- :ref:`bool` **is_subgizmo_selected** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_subgizmo_selected** **(** :ref:`int` id **)** |const| Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_set_hidden: -- void **set_hidden** **(** :ref:`bool` hidden **)** +.. rst-class:: classref-method + +void **set_hidden** **(** :ref:`bool` hidden **)** Sets the gizmo's hidden state. If ``true``, the gizmo will be hidden. If ``false``, it will be shown. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmo_method_set_node_3d: -- void **set_node_3d** **(** :ref:`Node` node **)** +.. rst-class:: classref-method + +void **set_node_3d** **(** :ref:`Node` node **)** Sets the reference :ref:`Node3D` node for the gizmo. ``node`` must inherit from :ref:`Node3D`. diff --git a/classes/class_editornode3dgizmoplugin.rst b/classes/class_editornode3dgizmoplugin.rst index 46fc9688f..6be2dcdf6 100644 --- a/classes/class_editornode3dgizmoplugin.rst +++ b/classes/class_editornode3dgizmoplugin.rst @@ -14,81 +14,102 @@ EditorNode3DGizmoPlugin Used by the editor to define Node3D gizmo types. +.. rst-class:: classref-introduction-group + Description ----------- -``EditorNode3DGizmoPlugin`` allows you to define a new type of Gizmo. There are two main ways to do so: extending ``EditorNode3DGizmoPlugin`` for the simpler gizmos, or creating a new :ref:`EditorNode3DGizmo` type. See the tutorial in the documentation for more info. +**EditorNode3DGizmoPlugin** allows you to define a new type of Gizmo. There are two main ways to do so: extending **EditorNode3DGizmoPlugin** for the simpler gizmos, or creating a new :ref:`EditorNode3DGizmo` type. See the tutorial in the documentation for more info. -To use ``EditorNode3DGizmoPlugin``, register it using the :ref:`EditorPlugin.add_node_3d_gizmo_plugin` method first. +To use **EditorNode3DGizmoPlugin**, register it using the :ref:`EditorPlugin.add_node_3d_gizmo_plugin` method first. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Node3D gizmo plugins <../tutorials/plugins/editor/3d_gizmos>` +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_can_be_hidden` **(** **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_commit_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_commit_subgizmos` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorNode3DGizmo` | :ref:`_create_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_gizmo_name` **(** **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_handle_name` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_priority` **(** **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_selectable_when_hidden` **(** **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_redraw` **(** :ref:`EditorNode3DGizmo` gizmo **)** |virtual| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id, :ref:`Transform3D` transform **)** |virtual| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_material` **(** :ref:`String` name, :ref:`StandardMaterial3D` material **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_handle_material` **(** :ref:`String` name, :ref:`bool` billboard=false, :ref:`Texture2D` texture=null **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_icon_material` **(** :ref:`String` name, :ref:`Texture2D` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color(1, 1, 1, 1) **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_material` **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StandardMaterial3D` | :ref:`get_material` **(** :ref:`String` name, :ref:`EditorNode3DGizmo` gizmo=null **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_be_hidden` **(** **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit_subgizmos` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorNode3DGizmo` | :ref:`_create_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_gizmo_name` **(** **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_handle_name` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_priority` **(** **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_selectable_when_hidden` **(** **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_redraw` **(** :ref:`EditorNode3DGizmo` gizmo **)** |virtual| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id, :ref:`Transform3D` transform **)** |virtual| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_material` **(** :ref:`String` name, :ref:`StandardMaterial3D` material **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_handle_material` **(** :ref:`String` name, :ref:`bool` billboard=false, :ref:`Texture2D` texture=null **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_icon_material` **(** :ref:`String` name, :ref:`Texture2D` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color(1, 1, 1, 1) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_material` **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StandardMaterial3D` | :ref:`get_material` **(** :ref:`String` name, :ref:`EditorNode3DGizmo` gizmo=null **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorNode3DGizmoPlugin_method__can_be_hidden: -- :ref:`bool` **_can_be_hidden** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_be_hidden** **(** **)** |virtual| |const| Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns ``true`` if not overridden. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__commit_handle: -- void **_commit_handle** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| +.. rst-class:: classref-method + +void **_commit_handle** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles` during :ref:`_redraw`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". @@ -98,45 +119,65 @@ The ``secondary`` argument is ``true`` when the committed handle is secondary (s Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__commit_subgizmos: -- void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| +.. rst-class:: classref-method + +void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`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` 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__create_gizmo: -- :ref:`EditorNode3DGizmo` **_create_gizmo** **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`EditorNode3DGizmo` **_create_gizmo** **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| Override this method to return a custom :ref:`EditorNode3DGizmo` for the spatial nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__get_gizmo_name: -- :ref:`String` **_get_gizmo_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_gizmo_name** **(** **)** |virtual| |const| Override this method to provide the name that will appear in the gizmo visibility menu. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__get_handle_name: -- :ref:`String` **_get_handle_name** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_handle_name** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| 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` for more information). Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__get_handle_value: -- :ref:`Variant` **_get_handle_value** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_handle_value** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| 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`. @@ -144,61 +185,89 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__get_priority: -- :ref:`int` **_get_priority** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_priority** **(** **)** |virtual| |const| Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. All built-in editor gizmos return a priority of ``-1``. If not overridden, this method will return ``0``, which means custom gizmos will automatically get higher priority than built-in gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__get_subgizmo_transform: -- :ref:`Transform3D` **_get_subgizmo_transform** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **_get_subgizmo_transform** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id **)** |virtual| |const| 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`. Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__has_gizmo: -- :ref:`bool` **_has_gizmo** **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_gizmo** **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a :ref:`Node3D` node is added to a scene this method is called, if it returns ``true`` the node gets a generic :ref:`EditorNode3DGizmo` assigned and is added to this plugin's list of active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__is_handle_highlighted: -- :ref:`bool` **_is_handle_highlighted** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_handle_highlighted** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| 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` for more information). Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__is_selectable_when_hidden: -- :ref:`bool` **_is_selectable_when_hidden** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_selectable_when_hidden** **(** **)** |virtual| |const| Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__redraw: -- void **_redraw** **(** :ref:`EditorNode3DGizmo` gizmo **)** |virtual| +.. rst-class:: classref-method + +void **_redraw** **(** :ref:`EditorNode3DGizmo` gizmo **)** |virtual| Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`EditorNode3DGizmo.clear` at the beginning of this method and then add visual elements depending on the node's properties. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__set_handle: -- void **_set_handle** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| +.. rst-class:: classref-method + +void **_set_handle** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. @@ -206,69 +275,101 @@ The ``secondary`` argument is ``true`` when the edited handle is secondary (see Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__set_subgizmo_transform: -- void **_set_subgizmo_transform** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id, :ref:`Transform3D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_set_subgizmo_transform** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id, :ref:`Transform3D` transform **)** |virtual| Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray` and :ref:`_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: -- :ref:`PackedInt32Array` **_subgizmos_intersect_frustum** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_subgizmos_intersect_frustum** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| 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` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_ray: -- :ref:`int` **_subgizmos_intersect_ray** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_subgizmos_intersect_ray** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| 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` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method_add_material: -- void **add_material** **(** :ref:`String` name, :ref:`StandardMaterial3D` material **)** +.. rst-class:: classref-method + +void **add_material** **(** :ref:`String` name, :ref:`StandardMaterial3D` material **)** Adds a new material to the internal material list for the plugin. It can then be accessed with :ref:`get_material`. Should not be overridden. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method_create_handle_material: -- void **create_handle_material** **(** :ref:`String` name, :ref:`bool` billboard=false, :ref:`Texture2D` texture=null **)** +.. rst-class:: classref-method + +void **create_handle_material** **(** :ref:`String` name, :ref:`bool` billboard=false, :ref:`Texture2D` texture=null **)** 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` and used in :ref:`EditorNode3DGizmo.add_handles`. Should not be overridden. You can optionally provide a texture to use instead of the default icon. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method_create_icon_material: -- void **create_icon_material** **(** :ref:`String` name, :ref:`Texture2D` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color(1, 1, 1, 1) **)** +.. rst-class:: classref-method + +void **create_icon_material** **(** :ref:`String` name, :ref:`Texture2D` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color(1, 1, 1, 1) **)** 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` and used in :ref:`EditorNode3DGizmo.add_unscaled_billboard`. Should not be overridden. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method_create_material: -- void **create_material** **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** +.. rst-class:: classref-method + +void **create_material** **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** 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` and used in :ref:`EditorNode3DGizmo.add_mesh` and :ref:`EditorNode3DGizmo.add_lines`. Should not be overridden. +.. rst-class:: classref-item-separator + ---- .. _class_EditorNode3DGizmoPlugin_method_get_material: -- :ref:`StandardMaterial3D` **get_material** **(** :ref:`String` name, :ref:`EditorNode3DGizmo` gizmo=null **)** +.. rst-class:: classref-method + +:ref:`StandardMaterial3D` **get_material** **(** :ref:`String` name, :ref:`EditorNode3DGizmo` gizmo=null **)** Gets material from the internal list of materials. If an :ref:`EditorNode3DGizmo` is provided, it will try to get the corresponding variant (selected and/or editable). diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index fcedff2ba..40a6adbe0 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -14,6 +14,8 @@ EditorPaths Editor-only singleton that returns paths to various OS-specific data folders and files. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,34 +25,49 @@ This editor-only singleton returns OS-specific paths to various data folders and \ **Note:** Godot complies with the `XDG Base Directory Specification `__ on *all* platforms. You can override environment variables following the specification to change the editor and project data paths. +.. rst-class:: classref-introduction-group + Tutorials --------- - `File paths in Godot projects `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_cache_dir` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_config_dir` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_data_dir` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_project_settings_dir` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_self_contained_file` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_self_contained` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_cache_dir` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_config_dir` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_data_dir` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_project_settings_dir` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_self_contained_file` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_self_contained` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorPaths_method_get_cache_dir: -- :ref:`String` **get_cache_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_cache_dir** **(** **)** |const| 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). @@ -62,11 +79,15 @@ Returns the absolute path to the user's cache folder. This folder should be used - macOS: ~/Library/Caches/Godot/ - Linux: ~/.cache/godot/ +.. rst-class:: classref-item-separator + ---- .. _class_EditorPaths_method_get_config_dir: -- :ref:`String` **get_config_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_config_dir** **(** **)** |const| Returns the absolute path to the user's configuration folder. This folder should be used for *persistent* user configuration files. @@ -78,11 +99,15 @@ Returns the absolute path to the user's configuration folder. This folder should - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`) - Linux: ~/.config/godot/ +.. rst-class:: classref-item-separator + ---- .. _class_EditorPaths_method_get_data_dir: -- :ref:`String` **get_data_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_data_dir** **(** **)** |const| 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. @@ -94,27 +119,39 @@ Returns the absolute path to the user's data folder. This folder should be used - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`) - Linux: ~/.local/share/godot/ +.. rst-class:: classref-item-separator + ---- .. _class_EditorPaths_method_get_project_settings_dir: -- :ref:`String` **get_project_settings_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_project_settings_dir** **(** **)** |const| Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPaths_method_get_self_contained_file: -- :ref:`String` **get_self_contained_file** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_self_contained_file** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPaths_method_is_self_contained: -- :ref:`bool` **is_self_contained** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_self_contained** **(** **)** |const| 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. diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 405a0578e..6f174ce21 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -14,363 +14,540 @@ EditorPlugin Used by the editor to extend its functionality. +.. rst-class:: classref-introduction-group + 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` to add functions to the editor. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Editor plugins documentation index <../tutorials/plugins/editor/index>` +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_changes` **(** **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_build` **(** **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_clear` **(** **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_disable_plugin` **(** **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_edit` **(** :ref:`Variant` object **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_enable_plugin` **(** **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_3d_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_3d_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_forward_3d_gui_input` **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_canvas_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_forward_canvas_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_forward_canvas_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_breakpoints` **(** **)** |virtual| |const| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`_get_plugin_icon` **(** **)** |virtual| |const| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_plugin_name` **(** **)** |virtual| |const| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_state` **(** **)** |virtual| |const| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_get_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handles` **(** :ref:`Variant` object **)** |virtual| |const| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_main_screen` **(** **)** |virtual| |const| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_make_visible` **(** :ref:`bool` visible **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_save_external_data` **(** **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_state` **(** :ref:`Dictionary` state **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_autoload_singleton` **(** :ref:`String` name, :ref:`String` path **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Button` | :ref:`add_control_to_bottom_panel` **(** :ref:`Control` control, :ref:`String` title **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_control_to_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_control_to_dock` **(** :ref:`DockSlot` slot, :ref:`Control` control **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_type` **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture2D` icon **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_debugger_plugin` **(** :ref:`EditorDebuggerPlugin` script **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_import_plugin` **(** :ref:`EditorImportPlugin` importer, :ref:`bool` first_priority=false **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_node_3d_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer, :ref:`bool` first_priority=false **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin, :ref:`bool` first_priority=false **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_tool_menu_item` **(** :ref:`String` name, :ref:`Callable` callable **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_tool_submenu_item` **(** :ref:`String` name, :ref:`PopupMenu` submenu **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_export_as_menu` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptCreateDialog` | :ref:`get_script_create_dialog` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorUndoRedoManager` | :ref:`get_undo_redo` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hide_bottom_panel` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_bottom_panel_item_visible` **(** :ref:`Control` item **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_save_layout` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_autoload_singleton` **(** :ref:`String` name **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_control_from_bottom_panel` **(** :ref:`Control` control **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_control_from_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_control_from_docks` **(** :ref:`Control` control **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_type` **(** :ref:`String` type **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_debugger_plugin` **(** :ref:`EditorDebuggerPlugin` script **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_import_plugin` **(** :ref:`EditorImportPlugin` importer **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_node_3d_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_tool_menu_item` **(** :ref:`String` name **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_force_draw_over_forwarding_enabled` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_event_forwarding_always_enabled` **(** **)** | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`update_overlays` **(** **)** |const| | -+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_changes` **(** **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_build` **(** **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_clear` **(** **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_disable_plugin` **(** **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_edit` **(** :ref:`Variant` object **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_enable_plugin` **(** **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_forward_3d_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_forward_3d_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_forward_3d_gui_input` **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_forward_canvas_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_forward_canvas_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_forward_canvas_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_breakpoints` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_get_plugin_icon` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_plugin_name` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_state` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_get_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`Variant` object **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_main_screen` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_make_visible` **(** :ref:`bool` visible **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_save_external_data` **(** **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_state` **(** :ref:`Dictionary` state **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_autoload_singleton` **(** :ref:`String` name, :ref:`String` path **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Button` | :ref:`add_control_to_bottom_panel` **(** :ref:`Control` control, :ref:`String` title **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_control_to_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_control_to_dock` **(** :ref:`DockSlot` slot, :ref:`Control` control **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_custom_type` **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture2D` icon **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_debugger_plugin` **(** :ref:`EditorDebuggerPlugin` script **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_import_plugin` **(** :ref:`EditorImportPlugin` importer, :ref:`bool` first_priority=false **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_node_3d_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer, :ref:`bool` first_priority=false **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin, :ref:`bool` first_priority=false **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_tool_menu_item` **(** :ref:`String` name, :ref:`Callable` callable **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_tool_submenu_item` **(** :ref:`String` name, :ref:`PopupMenu` submenu **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_export_as_menu` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptCreateDialog` | :ref:`get_script_create_dialog` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorUndoRedoManager` | :ref:`get_undo_redo` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hide_bottom_panel` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`make_bottom_panel_item_visible` **(** :ref:`Control` item **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue_save_layout` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_autoload_singleton` **(** :ref:`String` name **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_control_from_bottom_panel` **(** :ref:`Control` control **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_control_from_container` **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_control_from_docks` **(** :ref:`Control` control **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_custom_type` **(** :ref:`String` type **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_debugger_plugin` **(** :ref:`EditorDebuggerPlugin` script **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_import_plugin` **(** :ref:`EditorImportPlugin` importer **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_inspector_plugin` **(** :ref:`EditorInspectorPlugin` plugin **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_node_3d_gizmo_plugin` **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_scene_format_importer_plugin` **(** :ref:`EditorSceneFormatImporter` scene_format_importer **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_scene_post_import_plugin` **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_tool_menu_item` **(** :ref:`String` name **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_translation_parser_plugin` **(** :ref:`EditorTranslationParserPlugin` parser **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_undo_redo_inspector_hook_callback` **(** :ref:`Callable` callable **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_force_draw_over_forwarding_enabled` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_input_event_forwarding_always_enabled` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`update_overlays` **(** **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorPlugin_signal_main_screen_changed: -- **main_screen_changed** **(** :ref:`String` screen_name **)** +.. rst-class:: classref-signal + +**main_screen_changed** **(** :ref:`String` screen_name **)** Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_signal_project_settings_changed: -- **project_settings_changed** **(** **)** +.. rst-class:: classref-signal + +**project_settings_changed** **(** **)** Emitted when any project setting has changed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_signal_resource_saved: -- **resource_saved** **(** :ref:`Resource` resource **)** +.. rst-class:: classref-signal + +**resource_saved** **(** :ref:`Resource` resource **)** Emitted when the given ``resource`` was saved on disc. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_signal_scene_changed: -- **scene_changed** **(** :ref:`Node` scene_root **)** +.. rst-class:: classref-signal + +**scene_changed** **(** :ref:`Node` scene_root **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_signal_scene_closed: -- **scene_closed** **(** :ref:`String` filepath **)** +.. rst-class:: classref-signal + +**scene_closed** **(** :ref:`String` filepath **)** Emitted when user closes a scene. The argument is file path to a closed scene. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_EditorPlugin_CustomControlContainer: -.. _class_EditorPlugin_constant_CONTAINER_TOOLBAR: - -.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_MENU: - -.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_LEFT: - -.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: - -.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_BOTTOM: - -.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_MENU: - -.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_LEFT: - -.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: - -.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_BOTTOM: - -.. _class_EditorPlugin_constant_CONTAINER_INSPECTOR_BOTTOM: - -.. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_LEFT: - -.. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_RIGHT: +.. rst-class:: classref-enumeration enum **CustomControlContainer**: -- **CONTAINER_TOOLBAR** = **0** +.. _class_EditorPlugin_constant_CONTAINER_TOOLBAR: -- **CONTAINER_SPATIAL_EDITOR_MENU** = **1** +.. rst-class:: classref-enumeration-constant -- **CONTAINER_SPATIAL_EDITOR_SIDE_LEFT** = **2** +:ref:`CustomControlContainer` **CONTAINER_TOOLBAR** = ``0`` -- **CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT** = **3** +Main editor toolbar, next to play buttons. -- **CONTAINER_SPATIAL_EDITOR_BOTTOM** = **4** +.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_MENU: -- **CONTAINER_CANVAS_EDITOR_MENU** = **5** +.. rst-class:: classref-enumeration-constant -- **CONTAINER_CANVAS_EDITOR_SIDE_LEFT** = **6** +:ref:`CustomControlContainer` **CONTAINER_SPATIAL_EDITOR_MENU** = ``1`` -- **CONTAINER_CANVAS_EDITOR_SIDE_RIGHT** = **7** +The toolbar that appears when 3D editor is active. -- **CONTAINER_CANVAS_EDITOR_BOTTOM** = **8** +.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_LEFT: -- **CONTAINER_INSPECTOR_BOTTOM** = **9** +.. rst-class:: classref-enumeration-constant -- **CONTAINER_PROJECT_SETTING_TAB_LEFT** = **10** +:ref:`CustomControlContainer` **CONTAINER_SPATIAL_EDITOR_SIDE_LEFT** = ``2`` -- **CONTAINER_PROJECT_SETTING_TAB_RIGHT** = **11** +Left sidebar of the 3D editor. + +.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT** = ``3`` + +Right sidebar of the 3D editor. + +.. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_SPATIAL_EDITOR_BOTTOM** = ``4`` + +Bottom panel of the 3D editor. + +.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_MENU: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_CANVAS_EDITOR_MENU** = ``5`` + +The toolbar that appears when 2D editor is active. + +.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_CANVAS_EDITOR_SIDE_LEFT** = ``6`` + +Left sidebar of the 2D editor. + +.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_CANVAS_EDITOR_SIDE_RIGHT** = ``7`` + +Right sidebar of the 2D editor. + +.. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_CANVAS_EDITOR_BOTTOM** = ``8`` + +Bottom panel of the 2D editor. + +.. _class_EditorPlugin_constant_CONTAINER_INSPECTOR_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_INSPECTOR_BOTTOM** = ``9`` + +Bottom section of the inspector. + +.. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_PROJECT_SETTING_TAB_LEFT** = ``10`` + +Tab of Project Settings dialog, to the left of other tabs. + +.. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomControlContainer` **CONTAINER_PROJECT_SETTING_TAB_RIGHT** = ``11`` + +Tab of Project Settings dialog, to the right of other tabs. + +.. rst-class:: classref-item-separator ---- .. _enum_EditorPlugin_DockSlot: -.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL: - -.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BL: - -.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UR: - -.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BR: - -.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UL: - -.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL: - -.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UR: - -.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR: - -.. _class_EditorPlugin_constant_DOCK_SLOT_MAX: +.. rst-class:: classref-enumeration enum **DockSlot**: -- **DOCK_SLOT_LEFT_UL** = **0** +.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL: -- **DOCK_SLOT_LEFT_BL** = **1** +.. rst-class:: classref-enumeration-constant -- **DOCK_SLOT_LEFT_UR** = **2** +:ref:`DockSlot` **DOCK_SLOT_LEFT_UL** = ``0`` -- **DOCK_SLOT_LEFT_BR** = **3** +Dock slot, left side, upper-left (empty in default layout). -- **DOCK_SLOT_RIGHT_UL** = **4** +.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BL: -- **DOCK_SLOT_RIGHT_BL** = **5** +.. rst-class:: classref-enumeration-constant -- **DOCK_SLOT_RIGHT_UR** = **6** +:ref:`DockSlot` **DOCK_SLOT_LEFT_BL** = ``1`` -- **DOCK_SLOT_RIGHT_BR** = **7** +Dock slot, left side, bottom-left (empty in default layout). -- **DOCK_SLOT_MAX** = **8** --- Represents the size of the :ref:`DockSlot` enum. +.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UR: + +.. rst-class:: classref-enumeration-constant + +:ref:`DockSlot` **DOCK_SLOT_LEFT_UR** = ``2`` + +Dock slot, left side, upper-right (in default layout includes Scene and Import docks). + +.. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BR: + +.. rst-class:: classref-enumeration-constant + +:ref:`DockSlot` **DOCK_SLOT_LEFT_BR** = ``3`` + +Dock slot, left side, bottom-right (in default layout includes FileSystem dock). + +.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DockSlot` **DOCK_SLOT_RIGHT_UL** = ``4`` + +Dock slot, right side, upper-left (empty in default layout). + +.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DockSlot` **DOCK_SLOT_RIGHT_BL** = ``5`` + +Dock slot, right side, bottom-left (empty in default layout). + +.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UR: + +.. rst-class:: classref-enumeration-constant + +:ref:`DockSlot` **DOCK_SLOT_RIGHT_UR** = ``6`` + +Dock slot, right side, upper-right (in default layout includes Inspector, Node and History docks). + +.. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR: + +.. rst-class:: classref-enumeration-constant + +:ref:`DockSlot` **DOCK_SLOT_RIGHT_BR** = ``7`` + +Dock slot, right side, bottom-right (empty in default layout). + +.. _class_EditorPlugin_constant_DOCK_SLOT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DockSlot` **DOCK_SLOT_MAX** = ``8`` + +Represents the size of the :ref:`DockSlot` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_EditorPlugin_AfterGUIInput: -.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS: - -.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_STOP: - -.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_CUSTOM: +.. rst-class:: classref-enumeration enum **AfterGUIInput**: -- **AFTER_GUI_INPUT_PASS** = **0** --- Forwards the :ref:`InputEvent` to other EditorPlugins. +.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS: -- **AFTER_GUI_INPUT_STOP** = **1** --- Prevents the :ref:`InputEvent` from reaching other Editor classes. +.. rst-class:: classref-enumeration-constant -- **AFTER_GUI_INPUT_CUSTOM** = **2** --- Pass the :ref:`InputEvent` to other editor plugins except the main :ref:`Node3D` one. This can be used to prevent node selection changes and work with sub-gizmos instead. +:ref:`AfterGUIInput` **AFTER_GUI_INPUT_PASS** = ``0`` + +Forwards the :ref:`InputEvent` to other EditorPlugins. + +.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_STOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`AfterGUIInput` **AFTER_GUI_INPUT_STOP** = ``1`` + +Prevents the :ref:`InputEvent` from reaching other Editor classes. + +.. _class_EditorPlugin_constant_AFTER_GUI_INPUT_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`AfterGUIInput` **AFTER_GUI_INPUT_CUSTOM** = ``2`` + +Pass the :ref:`InputEvent` to other editor plugins except the main :ref:`Node3D` one. This can be used to prevent node selection changes and work with sub-gizmos instead. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorPlugin_method__apply_changes: -- void **_apply_changes** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_apply_changes** **(** **)** |virtual| 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. This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__build: -- :ref:`bool` **_build** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_build** **(** **)** |virtual| 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` methods from running. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__clear: -- void **_clear** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_clear** **(** **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__disable_plugin: -- void **_disable_plugin** **(** **)** |virtual| +.. rst-class:: classref-method -Called by the engine when the user disables the ``EditorPlugin`` in the Plugin tab of the project settings window. +void **_disable_plugin** **(** **)** |virtual| + +Called by the engine when the user disables the **EditorPlugin** in the Plugin tab of the project settings window. + +.. rst-class:: classref-item-separator ---- .. _class_EditorPlugin_method__edit: -- void **_edit** **(** :ref:`Variant` object **)** |virtual| +.. rst-class:: classref-method + +void **_edit** **(** :ref:`Variant` object **)** |virtual| This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__enable_plugin: -- void **_enable_plugin** **(** **)** |virtual| +.. rst-class:: classref-method -Called by the engine when the user enables the ``EditorPlugin`` in the Plugin tab of the project settings window. +void **_enable_plugin** **(** **)** |virtual| + +Called by the engine when the user enables the **EditorPlugin** in the Plugin tab of the project settings window. + +.. rst-class:: classref-item-separator ---- .. _class_EditorPlugin_method__forward_3d_draw_over_viewport: -- void **_forward_3d_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| +.. rst-class:: classref-method + +void **_forward_3d_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| Called by the engine when the 3D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays`. @@ -410,23 +587,31 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__forward_3d_force_draw_over_viewport: -- void **_forward_3d_force_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| +.. rst-class:: classref-method + +void **_forward_3d_force_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| This method is the same as :ref:`_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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__forward_3d_gui_input: -- :ref:`int` **_forward_3d_gui_input** **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| +.. rst-class:: classref-method -Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent` is consumed or forwarded to other ``EditorPlugin``\ s. See :ref:`AfterGUIInput` for options. +:ref:`int` **_forward_3d_gui_input** **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| + +Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput` for options. \ **Example:**\ @@ -472,11 +657,15 @@ Must ``return EditorPlugin.AFTER_GUI_INPUT_PASS`` in order to forward the :ref:` +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__forward_canvas_draw_over_viewport: -- void **_forward_canvas_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| +.. rst-class:: classref-method + +void **_forward_canvas_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| Called by the engine when the 2D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays`. @@ -516,23 +705,31 @@ Called by the engine when the 2D editor's viewport is updated. Use the ``overlay +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__forward_canvas_force_draw_over_viewport: -- void **_forward_canvas_force_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| +.. rst-class:: classref-method + +void **_forward_canvas_force_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| This method is the same as :ref:`_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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__forward_canvas_gui_input: -- :ref:`bool` **_forward_canvas_gui_input** **(** :ref:`InputEvent` event **)** |virtual| +.. rst-class:: classref-method -Called when there is a root node in the current edited scene, :ref:`_handles` is implemented and an :ref:`InputEvent` happens in the 2D viewport. Intercepts the :ref:`InputEvent`, if ``return true`` ``EditorPlugin`` consumes the ``event``, otherwise forwards ``event`` to other Editor classes. +:ref:`bool` **_forward_canvas_gui_input** **(** :ref:`InputEvent` event **)** |virtual| + +Called when there is a root node in the current edited scene, :ref:`_handles` is implemented and an :ref:`InputEvent` happens in the 2D viewport. Intercepts the :ref:`InputEvent`, if ``return true`` **EditorPlugin** consumes the ``event``, otherwise forwards ``event`` to other Editor classes. \ **Example:**\ @@ -583,19 +780,27 @@ Must ``return false`` in order to forward the :ref:`InputEvent +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__get_breakpoints: -- :ref:`PackedStringArray` **_get_breakpoints** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_breakpoints** **(** **)** |virtual| |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__get_plugin_icon: -- :ref:`Texture2D` **_get_plugin_icon** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **_get_plugin_icon** **(** **)** |virtual| |const| Override this method in your plugin to return a :ref:`Texture2D` in order to give it an icon. @@ -626,21 +831,29 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__get_plugin_name: -- :ref:`String` **_get_plugin_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_plugin_name** **(** **)** |virtual| |const| Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__get_state: -- :ref:`Dictionary` **_get_state** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_state** **(** **)** |virtual| |const| 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` instead. @@ -656,11 +869,15 @@ Use :ref:`_set_state` to restore your save var state = {"zoom": zoom, "preferred_color": my_color} return state +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__get_window_layout: -- void **_get_window_layout** **(** :ref:`ConfigFile` configuration **)** |virtual| +.. rst-class:: classref-method + +void **_get_window_layout** **(** :ref:`ConfigFile` configuration **)** |virtual| 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` 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. @@ -672,19 +889,27 @@ Use :ref:`_set_window_layout` to r configuration.set_value("MyPlugin", "window_position", $Window.position) configuration.set_value("MyPlugin", "icon_color", $Icon.modulate) +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__handles: -- :ref:`bool` **_handles** **(** :ref:`Variant` object **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_handles** **(** :ref:`Variant` object **)** |virtual| |const| 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` and :ref:`_make_visible` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input` and :ref:`_forward_3d_gui_input` these will be called too. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__has_main_screen: -- :ref:`bool` **_has_main_screen** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_main_screen** **(** **)** |virtual| |const| Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). @@ -713,29 +938,41 @@ Use :ref:`_get_plugin_name` and :ref func _get_plugin_icon(): return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons") +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__make_visible: -- void **_make_visible** **(** :ref:`bool` visible **)** |virtual| +.. rst-class:: classref-method + +void **_make_visible** **(** :ref:`bool` visible **)** |virtual| This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. Remember that you have to manage the visibility of all your editor controls manually. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__save_external_data: -- void **_save_external_data** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_save_external_data** **(** **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method__set_state: -- void **_set_state** **(** :ref:`Dictionary` state **)** |virtual| +.. rst-class:: classref-method + +void **_set_state** **(** :ref:`Dictionary` state **)** |virtual| Restore the state saved by :ref:`_get_state`. This method is called when the current scene tab is changed in the editor. @@ -747,11 +984,15 @@ Restore the state saved by :ref:`_get_state` configuration **)** |virtual| +.. rst-class:: classref-method + +void **_set_window_layout** **(** :ref:`ConfigFile` configuration **)** |virtual| Restore the plugin GUI layout and data saved by :ref:`_get_window_layout`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data. @@ -761,27 +1002,39 @@ Restore the plugin GUI layout and data saved by :ref:`_get_window_layout` name, :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_autoload_singleton** **(** :ref:`String` name, :ref:`String` path **)** Adds a script at ``path`` to the Autoload list as ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_control_to_bottom_panel: -- :ref:`Button` **add_control_to_bottom_panel** **(** :ref:`Control` control, :ref:`String` title **)** +.. rst-class:: classref-method + +:ref:`Button` **add_control_to_bottom_panel** **(** :ref:`Control` control, :ref:`String` title **)** 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` and free it with :ref:`Node.queue_free`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_control_to_container: -- void **add_control_to_container** **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** +.. rst-class:: classref-method + +void **add_control_to_container** **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** Adds a custom control to a container (see :ref:`CustomControlContainer`). There are many locations where custom controls can be added in the editor UI. @@ -789,11 +1042,15 @@ Please remember that you have to manage the visibility of your custom controls y When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_container` and free it with :ref:`Node.queue_free`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_control_to_dock: -- void **add_control_to_dock** **(** :ref:`DockSlot` slot, :ref:`Control` control **)** +.. rst-class:: classref-method + +void **add_control_to_dock** **(** :ref:`DockSlot` slot, :ref:`Control` control **)** Adds the control to a specific dock slot (see :ref:`DockSlot` for options). @@ -801,11 +1058,15 @@ 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` and free it with :ref:`Node.queue_free`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_custom_type: -- void **add_custom_type** **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **add_custom_type** **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture2D` icon **)** Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. @@ -817,29 +1078,41 @@ During run-time, this will be a simple object with a script so this function doe \ **Note:** Custom types added this way are not true classes. They are just a helper to create a node with specific script. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_debugger_plugin: -- void **add_debugger_plugin** **(** :ref:`EditorDebuggerPlugin` script **)** +.. rst-class:: classref-method + +void **add_debugger_plugin** **(** :ref:`EditorDebuggerPlugin` script **)** Adds a :ref:`Script` as debugger plugin to the Debugger. The script must extend :ref:`EditorDebuggerPlugin`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_export_plugin: -- void **add_export_plugin** **(** :ref:`EditorExportPlugin` plugin **)** +.. rst-class:: classref-method + +void **add_export_plugin** **(** :ref:`EditorExportPlugin` plugin **)** Registers a new :ref:`EditorExportPlugin`. Export plugins are used to perform tasks when the project is being exported. See :ref:`add_inspector_plugin` for an example of how to register a plugin. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_import_plugin: -- void **add_import_plugin** **(** :ref:`EditorImportPlugin` importer, :ref:`bool` first_priority=false **)** +.. rst-class:: classref-method + +void **add_import_plugin** **(** :ref:`EditorImportPlugin` importer, :ref:`bool` first_priority=false **)** Registers a new :ref:`EditorImportPlugin`. Import plugins are used to import custom and unsupported assets as a custom :ref:`Resource` type. @@ -849,15 +1122,19 @@ If ``first_priority`` is ``true``, the new import plugin is inserted first in th See :ref:`add_inspector_plugin` for an example of how to register a plugin. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_inspector_plugin: -- void **add_inspector_plugin** **(** :ref:`EditorInspectorPlugin` plugin **)** +.. rst-class:: classref-method + +void **add_inspector_plugin** **(** :ref:`EditorInspectorPlugin` plugin **)** Registers a new :ref:`EditorInspectorPlugin`. Inspector plugins are used to extend :ref:`EditorInspector` and provide custom configuration tools for your object's properties. -\ **Note:** Always use :ref:`remove_inspector_plugin` to remove the registered :ref:`EditorInspectorPlugin` when your ``EditorPlugin`` is disabled to prevent leaks and an unexpected behavior. +\ **Note:** Always use :ref:`remove_inspector_plugin` to remove the registered :ref:`EditorInspectorPlugin` when your **EditorPlugin** is disabled to prevent leaks and an unexpected behavior. .. tabs:: @@ -875,91 +1152,131 @@ Registers a new :ref:`EditorInspectorPlugin`. Inspe +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_node_3d_gizmo_plugin: -- void **add_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** +.. rst-class:: classref-method + +void **add_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** Registers a new :ref:`EditorNode3DGizmoPlugin`. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a :ref:`Node3D`. See :ref:`add_inspector_plugin` for an example of how to register a plugin. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_scene_format_importer_plugin: -- void **add_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter` scene_format_importer, :ref:`bool` first_priority=false **)** +.. rst-class:: classref-method + +void **add_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter` scene_format_importer, :ref:`bool` first_priority=false **)** Registers a new :ref:`EditorSceneFormatImporter`. Scene importers are used to import custom 3D asset formats as scenes. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_scene_post_import_plugin: -- void **add_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin, :ref:`bool` first_priority=false **)** +.. rst-class:: classref-method + +void **add_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin, :ref:`bool` first_priority=false **)** Add a :ref:`EditorScenePostImportPlugin`. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_tool_menu_item: -- void **add_tool_menu_item** **(** :ref:`String` name, :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **add_tool_menu_item** **(** :ref:`String` name, :ref:`Callable` callable **)** Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the provided ``callable`` will be called. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_tool_submenu_item: -- void **add_tool_submenu_item** **(** :ref:`String` name, :ref:`PopupMenu` submenu **)** +.. rst-class:: classref-method + +void **add_tool_submenu_item** **(** :ref:`String` name, :ref:`PopupMenu` submenu **)** Adds a custom :ref:`PopupMenu` submenu under **Project > Tools >** ``name``. Use ``remove_tool_menu_item(name)`` on plugin clean up to remove the menu. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_translation_parser_plugin: -- void **add_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin` parser **)** +.. rst-class:: classref-method + +void **add_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin` parser **)** Registers a custom translation parser plugin for extracting translatable strings from custom files. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_add_undo_redo_inspector_hook_callback: -- void **add_undo_redo_inspector_hook_callback** **(** :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **add_undo_redo_inspector_hook_callback** **(** :ref:`Callable` callable **)** 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. The callback should have 4 arguments: :ref:`Object` ``undo_redo``, :ref:`Object` ``modified_object``, :ref:`String` ``property`` and :ref:`Variant` ``new_value``. They are, respectively, the :ref:`UndoRedo` object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_get_editor_interface: -- :ref:`EditorInterface` **get_editor_interface** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorInterface` **get_editor_interface** **(** **)** Returns the :ref:`EditorInterface` object that gives you control over Godot editor's window and its functionalities. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_get_export_as_menu: -- :ref:`PopupMenu` **get_export_as_menu** **(** **)** +.. rst-class:: classref-method + +:ref:`PopupMenu` **get_export_as_menu** **(** **)** Returns the :ref:`PopupMenu` under **Scene > Export As...**. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_get_script_create_dialog: -- :ref:`ScriptCreateDialog` **get_script_create_dialog** **(** **)** +.. rst-class:: classref-method + +:ref:`ScriptCreateDialog` **get_script_create_dialog** **(** **)** Gets the Editor's dialog used for making scripts. @@ -967,179 +1284,267 @@ Gets the Editor's dialog used for making scripts. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_get_undo_redo: -- :ref:`EditorUndoRedoManager` **get_undo_redo** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorUndoRedoManager` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_hide_bottom_panel: -- void **hide_bottom_panel** **(** **)** +.. rst-class:: classref-method + +void **hide_bottom_panel** **(** **)** Minimizes the bottom panel. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_make_bottom_panel_item_visible: -- void **make_bottom_panel_item_visible** **(** :ref:`Control` item **)** +.. rst-class:: classref-method + +void **make_bottom_panel_item_visible** **(** :ref:`Control` item **)** Makes a specific item in the bottom panel visible. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_queue_save_layout: -- void **queue_save_layout** **(** **)** +.. rst-class:: classref-method + +void **queue_save_layout** **(** **)** Queue save the project's editor layout. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_autoload_singleton: -- void **remove_autoload_singleton** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **remove_autoload_singleton** **(** :ref:`String` name **)** Removes an Autoload ``name`` from the list. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_control_from_bottom_panel: -- void **remove_control_from_bottom_panel** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **remove_control_from_bottom_panel** **(** :ref:`Control` control **)** Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free` the control. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_control_from_container: -- void **remove_control_from_container** **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** +.. rst-class:: classref-method + +void **remove_control_from_container** **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** Removes the control from the specified container. You have to manually :ref:`Node.queue_free` the control. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_control_from_docks: -- void **remove_control_from_docks** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **remove_control_from_docks** **(** :ref:`Control` control **)** Removes the control from the dock. You have to manually :ref:`Node.queue_free` the control. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_custom_type: -- void **remove_custom_type** **(** :ref:`String` type **)** +.. rst-class:: classref-method + +void **remove_custom_type** **(** :ref:`String` type **)** Removes a custom type added by :ref:`add_custom_type`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_debugger_plugin: -- void **remove_debugger_plugin** **(** :ref:`EditorDebuggerPlugin` script **)** +.. rst-class:: classref-method + +void **remove_debugger_plugin** **(** :ref:`EditorDebuggerPlugin` script **)** Removes the debugger plugin with given script from the Debugger. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_export_plugin: -- void **remove_export_plugin** **(** :ref:`EditorExportPlugin` plugin **)** +.. rst-class:: classref-method + +void **remove_export_plugin** **(** :ref:`EditorExportPlugin` plugin **)** Removes an export plugin registered by :ref:`add_export_plugin`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_import_plugin: -- void **remove_import_plugin** **(** :ref:`EditorImportPlugin` importer **)** +.. rst-class:: classref-method + +void **remove_import_plugin** **(** :ref:`EditorImportPlugin` importer **)** Removes an import plugin registered by :ref:`add_import_plugin`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_inspector_plugin: -- void **remove_inspector_plugin** **(** :ref:`EditorInspectorPlugin` plugin **)** +.. rst-class:: classref-method + +void **remove_inspector_plugin** **(** :ref:`EditorInspectorPlugin` plugin **)** Removes an inspector plugin registered by :ref:`add_import_plugin` +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_node_3d_gizmo_plugin: -- void **remove_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** +.. rst-class:: classref-method + +void **remove_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin` plugin **)** Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_scene_format_importer_plugin: -- void **remove_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter` scene_format_importer **)** +.. rst-class:: classref-method + +void **remove_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter` scene_format_importer **)** Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_scene_post_import_plugin: -- void **remove_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin **)** +.. rst-class:: classref-method + +void **remove_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin` scene_import_plugin **)** Remove the :ref:`EditorScenePostImportPlugin`, added with :ref:`add_scene_post_import_plugin`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_tool_menu_item: -- void **remove_tool_menu_item** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **remove_tool_menu_item** **(** :ref:`String` name **)** Removes a menu ``name`` from **Project > Tools**. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_translation_parser_plugin: -- void **remove_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin` parser **)** +.. rst-class:: classref-method + +void **remove_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin` parser **)** Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback: -- void **remove_undo_redo_inspector_hook_callback** **(** :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **remove_undo_redo_inspector_hook_callback** **(** :ref:`Callable` callable **)** Removes a callback previsously added by :ref:`add_undo_redo_inspector_hook_callback`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_set_force_draw_over_forwarding_enabled: -- void **set_force_draw_over_forwarding_enabled** **(** **)** +.. rst-class:: classref-method + +void **set_force_draw_over_forwarding_enabled** **(** **)** Enables calling of :ref:`_forward_canvas_force_draw_over_viewport` for the 2D editor and :ref:`_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 + ---- .. _class_EditorPlugin_method_set_input_event_forwarding_always_enabled: -- void **set_input_event_forwarding_always_enabled** **(** **)** +.. rst-class:: classref-method + +void **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`. It might be especially usable if your plugin will want to use raycast in the scene. +.. rst-class:: classref-item-separator + ---- .. _class_EditorPlugin_method_update_overlays: -- :ref:`int` **update_overlays** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **update_overlays** **(** **)** |const| Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport`, :ref:`_forward_canvas_force_draw_over_viewport`, :ref:`_forward_3d_draw_over_viewport` and :ref:`_forward_3d_force_draw_over_viewport` to be called. diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index 625dfabf8..8cb02a9f0 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -14,317 +14,424 @@ EditorProperty Custom control to edit properties for adding into the inspector. +.. rst-class:: classref-introduction-group + Description ----------- This control allows property editing for one or multiple properties into :ref:`EditorInspector`. It is added via :ref:`EditorInspectorPlugin`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`checkable` | ``false`` | -+-----------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`checked` | ``false`` | -+-----------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`deletable` | ``false`` | -+-----------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`draw_warning` | ``false`` | -+-----------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`keying` | ``false`` | -+-----------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`label` | ``""`` | -+-----------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`read_only` | ``false`` | -+-----------------------------+-----------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`checkable` | ``false`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`checked` | ``false`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`deletable` | ``false`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`draw_warning` | ``false`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`keying` | ``false`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`label` | ``""`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`read_only` | ``false`` | + +-----------------------------+-----------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_read_only` **(** :ref:`bool` read_only **)** |virtual| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_update_property` **(** **)** |virtual| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_focusable` **(** :ref:`Control` control **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`emit_changed` **(** :ref:`StringName` property, :ref:`Variant` value, :ref:`StringName` field=&"", :ref:`bool` changing=false **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_edited_object` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_edited_property` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bottom_editor` **(** :ref:`Control` editor **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_property` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_read_only` **(** :ref:`bool` read_only **)** |virtual| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_update_property` **(** **)** |virtual| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_focusable` **(** :ref:`Control` control **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`emit_changed` **(** :ref:`StringName` property, :ref:`Variant` value, :ref:`StringName` field=&"", :ref:`bool` changing=false **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_edited_object` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_edited_property` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bottom_editor` **(** :ref:`Control` editor **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_property` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorProperty_signal_multiple_properties_changed: -- **multiple_properties_changed** **(** :ref:`PackedStringArray` properties, :ref:`Array` value **)** +.. rst-class:: classref-signal + +**multiple_properties_changed** **(** :ref:`PackedStringArray` properties, :ref:`Array` value **)** Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_object_id_selected: -- **object_id_selected** **(** :ref:`StringName` property, :ref:`int` id **)** +.. rst-class:: classref-signal + +**object_id_selected** **(** :ref:`StringName` property, :ref:`int` id **)** Used by sub-inspectors. Emit it if what was selected was an Object ID. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_property_can_revert_changed: -- **property_can_revert_changed** **(** :ref:`StringName` property, :ref:`bool` can_revert **)** +.. rst-class:: classref-signal + +**property_can_revert_changed** **(** :ref:`StringName` property, :ref:`bool` can_revert **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_property_changed: -- **property_changed** **(** :ref:`StringName` property, :ref:`Variant` value, :ref:`StringName` field, :ref:`bool` changing **)** +.. rst-class:: classref-signal + +**property_changed** **(** :ref:`StringName` property, :ref:`Variant` value, :ref:`StringName` field, :ref:`bool` changing **)** Do not emit this manually, use the :ref:`emit_changed` method instead. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_property_checked: -- **property_checked** **(** :ref:`StringName` property, :ref:`bool` checked **)** +.. rst-class:: classref-signal + +**property_checked** **(** :ref:`StringName` property, :ref:`bool` checked **)** Emitted when a property was checked. Used internally. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_property_deleted: -- **property_deleted** **(** :ref:`StringName` property **)** +.. rst-class:: classref-signal + +**property_deleted** **(** :ref:`StringName` property **)** Emitted when a property was deleted. Used internally. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_property_keyed: -- **property_keyed** **(** :ref:`StringName` property **)** +.. rst-class:: classref-signal + +**property_keyed** **(** :ref:`StringName` property **)** Emit it if you want to add this value as an animation key (check for keying being enabled first). +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_property_keyed_with_value: -- **property_keyed_with_value** **(** :ref:`StringName` property, :ref:`Variant` value **)** +.. rst-class:: classref-signal + +**property_keyed_with_value** **(** :ref:`StringName` property, :ref:`Variant` value **)** Emit it if you want to key a property with a single value. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_property_pinned: -- **property_pinned** **(** :ref:`StringName` property, :ref:`bool` pinned **)** +.. rst-class:: classref-signal + +**property_pinned** **(** :ref:`StringName` property, :ref:`bool` 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. The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_resource_selected: -- **resource_selected** **(** :ref:`String` path, :ref:`Resource` resource **)** +.. rst-class:: classref-signal + +**resource_selected** **(** :ref:`String` path, :ref:`Resource` resource **)** If you want a sub-resource to be edited, emit this signal with the resource. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_signal_selected: -- **selected** **(** :ref:`String` path, :ref:`int` focusable_idx **)** +.. rst-class:: classref-signal + +**selected** **(** :ref:`String` path, :ref:`int` focusable_idx **)** Emitted when selected. Used internally. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_EditorProperty_property_checkable: -- :ref:`bool` **checkable** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_checkable(value) | -+-----------+----------------------+ -| *Getter* | is_checkable() | -+-----------+----------------------+ +:ref:`bool` **checkable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_checkable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_checkable** **(** **)** Used by the inspector, set to ``true`` when the property is checkable. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_property_checked: -- :ref:`bool` **checked** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_checked(value) | -+-----------+--------------------+ -| *Getter* | is_checked() | -+-----------+--------------------+ +:ref:`bool` **checked** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_checked** **(** :ref:`bool` value **)** +- :ref:`bool` **is_checked** **(** **)** Used by the inspector, set to ``true`` when the property is checked. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_property_deletable: -- :ref:`bool` **deletable** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_deletable(value) | -+-----------+----------------------+ -| *Getter* | is_deletable() | -+-----------+----------------------+ +:ref:`bool` **deletable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_deletable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_deletable** **(** **)** Used by the inspector, set to ``true`` when the property can be deleted by the user. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_property_draw_warning: -- :ref:`bool` **draw_warning** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_draw_warning(value) | -+-----------+-------------------------+ -| *Getter* | is_draw_warning() | -+-----------+-------------------------+ +:ref:`bool` **draw_warning** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_warning** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_property_keying: -- :ref:`bool` **keying** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_keying(value) | -+-----------+-------------------+ -| *Getter* | is_keying() | -+-----------+-------------------+ +:ref:`bool` **keying** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_keying** **(** :ref:`bool` value **)** +- :ref:`bool` **is_keying** **(** **)** Used by the inspector, set to ``true`` when the property can add keys for animation. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_property_label: -- :ref:`String` **label** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``""`` | -+-----------+------------------+ -| *Setter* | set_label(value) | -+-----------+------------------+ -| *Getter* | get_label() | -+-----------+------------------+ +:ref:`String` **label** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_label** **(** :ref:`String` value **)** +- :ref:`String` **get_label** **(** **)** Set this property to change the label (if you want to show one). +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_property_read_only: -- :ref:`bool` **read_only** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_read_only(value) | -+-----------+----------------------+ -| *Getter* | is_read_only() | -+-----------+----------------------+ +:ref:`bool` **read_only** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_read_only** **(** :ref:`bool` value **)** +- :ref:`bool` **is_read_only** **(** **)** Used by the inspector, set to ``true`` when the property is read-only. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorProperty_method__set_read_only: -- void **_set_read_only** **(** :ref:`bool` read_only **)** |virtual| +.. rst-class:: classref-method + +void **_set_read_only** **(** :ref:`bool` read_only **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_method__update_property: -- void **_update_property** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_update_property** **(** **)** |virtual| When this virtual function is called, you must update your editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_method_add_focusable: -- void **add_focusable** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **add_focusable** **(** :ref:`Control` control **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_method_emit_changed: -- void **emit_changed** **(** :ref:`StringName` property, :ref:`Variant` value, :ref:`StringName` field=&"", :ref:`bool` changing=false **)** +.. rst-class:: classref-method + +void **emit_changed** **(** :ref:`StringName` property, :ref:`Variant` value, :ref:`StringName` field=&"", :ref:`bool` changing=false **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_method_get_edited_object: -- :ref:`Object` **get_edited_object** **(** **)** +.. rst-class:: classref-method + +:ref:`Object` **get_edited_object** **(** **)** Gets the edited object. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_method_get_edited_property: -- :ref:`StringName` **get_edited_property** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_edited_property** **(** **)** |const| Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property`), then this will return the property. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_method_set_bottom_editor: -- void **set_bottom_editor** **(** :ref:`Control` editor **)** +.. rst-class:: classref-method + +void **set_bottom_editor** **(** :ref:`Control` editor **)** Puts the ``editor`` control below the property label. The control must be previously added using :ref:`Node.add_child`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorProperty_method_update_property: -- void **update_property** **(** **)** +.. rst-class:: classref-method + +void **update_property** **(** **)** Forces refresh of the property display. diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index c6e1583cf..ca304d862 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -16,43 +16,64 @@ EditorResourceConversionPlugin There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`_convert` **(** :ref:`Resource` resource **)** |virtual| |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_converts_to` **(** **)** |virtual| |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handles` **(** :ref:`Resource` resource **)** |virtual| |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`_convert` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_converts_to` **(** **)** |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorResourceConversionPlugin_method__convert: -- :ref:`Resource` **_convert** **(** :ref:`Resource` resource **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Resource` **_convert** **(** :ref:`Resource` resource **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourceConversionPlugin_method__converts_to: -- :ref:`String` **_converts_to** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_converts_to** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourceConversionPlugin_method__handles: -- :ref:`bool` **_handles** **(** :ref:`Resource` resource **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_handles** **(** :ref:`Resource` resource **)** |virtual| |const| .. container:: contribute diff --git a/classes/class_editorresourcepicker.rst b/classes/class_editorresourcepicker.rst index e99f915dc..6d3ac953c 100644 --- a/classes/class_editorresourcepicker.rst +++ b/classes/class_editorresourcepicker.rst @@ -16,6 +16,8 @@ EditorResourcePicker Godot editor's control for selecting :ref:`Resource` type properties. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,144 +25,196 @@ This :ref:`Control` node is used in the editor's Inspector dock t \ **Note:** This :ref:`Control` does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`base_type` | ``""`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`editable` | ``true`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`Resource` | :ref:`edited_resource` | | -+---------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`toggle_mode` | ``false`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`base_type` | ``""`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`editable` | ``true`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`Resource` | :ref:`edited_resource` | | + +---------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`toggle_mode` | ``false`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handle_menu_selected` **(** :ref:`int` id **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_create_options` **(** :ref:`Object` menu_node **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_allowed_types` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_toggle_pressed` **(** :ref:`bool` pressed **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handle_menu_selected` **(** :ref:`int` id **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_create_options` **(** :ref:`Object` menu_node **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_allowed_types` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_toggle_pressed` **(** :ref:`bool` pressed **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorResourcePicker_signal_resource_changed: -- **resource_changed** **(** :ref:`Resource` resource **)** +.. rst-class:: classref-signal + +**resource_changed** **(** :ref:`Resource` resource **)** Emitted when the value of the edited resource was changed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePicker_signal_resource_selected: -- **resource_selected** **(** :ref:`Resource` resource, :ref:`bool` inspect **)** +.. rst-class:: classref-signal + +**resource_selected** **(** :ref:`Resource` resource, :ref:`bool` inspect **)** 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_EditorResourcePicker_property_base_type: -- :ref:`String` **base_type** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``""`` | -+-----------+----------------------+ -| *Setter* | set_base_type(value) | -+-----------+----------------------+ -| *Getter* | get_base_type() | -+-----------+----------------------+ +:ref:`String` **base_type** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_base_type** **(** :ref:`String` value **)** +- :ref:`String` **get_base_type** **(** **)** The base type of allowed resource types. Can be a comma-separated list of several options. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePicker_property_editable: -- :ref:`bool` **editable** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_editable(value) | -+-----------+---------------------+ -| *Getter* | is_editable() | -+-----------+---------------------+ +:ref:`bool` **editable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_editable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editable** **(** **)** If ``true``, the value can be selected and edited. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePicker_property_edited_resource: -- :ref:`Resource` **edited_resource** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_edited_resource(value) | -+----------+----------------------------+ -| *Getter* | get_edited_resource() | -+----------+----------------------------+ +:ref:`Resource` **edited_resource** + +.. rst-class:: classref-property-setget + +- void **set_edited_resource** **(** :ref:`Resource` value **)** +- :ref:`Resource` **get_edited_resource** **(** **)** The edited resource value. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePicker_property_toggle_mode: -- :ref:`bool` **toggle_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_toggle_mode(value) | -+-----------+------------------------+ -| *Getter* | is_toggle_mode() | -+-----------+------------------------+ +:ref:`bool` **toggle_mode** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_toggle_mode** **(** :ref:`bool` value **)** +- :ref:`bool` **is_toggle_mode** **(** **)** If ``true``, the main button with the resource preview works in the toggle mode. Use :ref:`set_toggle_pressed` to manually set the state. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorResourcePicker_method__handle_menu_selected: -- :ref:`bool` **_handle_menu_selected** **(** :ref:`int` id **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_handle_menu_selected** **(** :ref:`int` id **)** |virtual| This virtual method can be implemented to handle context menu items not handled by default. See :ref:`_set_create_options`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePicker_method__set_create_options: -- void **_set_create_options** **(** :ref:`Object` menu_node **)** |virtual| +.. rst-class:: classref-method -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` node. +void **_set_create_options** **(** :ref:`Object` menu_node **)** |virtual| + +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` node. \ **Note:** Implement :ref:`_handle_menu_selected` to handle these custom items. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePicker_method_get_allowed_types: -- :ref:`PackedStringArray` **get_allowed_types** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_allowed_types** **(** **)** |const| Returns a list of all allowed types and subtypes corresponding to the :ref:`base_type`. If the :ref:`base_type` is empty, an empty list is returned. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePicker_method_set_toggle_pressed: -- void **set_toggle_pressed** **(** :ref:`bool` pressed **)** +.. rst-class:: classref-method + +void **set_toggle_pressed** **(** :ref:`bool` pressed **)** Sets the toggle mode state for the main button. Works only if :ref:`toggle_mode` is set to ``true``. diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index 636e008cb..249921c4f 100644 --- a/classes/class_editorresourcepreview.rst +++ b/classes/class_editorresourcepreview.rst @@ -14,6 +14,8 @@ EditorResourcePreview Helper to generate previews of resources or files. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,72 +23,109 @@ This object is used to generate previews for resources of files. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer`. +.. rst-class:: classref-reftable-group + Methods ------- -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_preview_generator` **(** :ref:`EditorResourcePreviewGenerator` generator **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`check_for_invalidation` **(** :ref:`String` path **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_edited_resource_preview` **(** :ref:`Resource` resource, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_resource_preview` **(** :ref:`String` path, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_preview_generator` **(** :ref:`EditorResourcePreviewGenerator` generator **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_preview_generator` **(** :ref:`EditorResourcePreviewGenerator` generator **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`check_for_invalidation` **(** :ref:`String` path **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue_edited_resource_preview` **(** :ref:`Resource` resource, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue_resource_preview` **(** :ref:`String` path, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_preview_generator` **(** :ref:`EditorResourcePreviewGenerator` generator **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorResourcePreview_signal_preview_invalidated: -- **preview_invalidated** **(** :ref:`String` path **)** +.. rst-class:: classref-signal + +**preview_invalidated** **(** :ref:`String` path **)** Emitted if a preview was invalidated (changed). ``path`` corresponds to the path of the preview. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorResourcePreview_method_add_preview_generator: -- void **add_preview_generator** **(** :ref:`EditorResourcePreviewGenerator` generator **)** +.. rst-class:: classref-method + +void **add_preview_generator** **(** :ref:`EditorResourcePreviewGenerator` generator **)** Create an own, custom preview generator. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreview_method_check_for_invalidation: -- void **check_for_invalidation** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **check_for_invalidation** **(** :ref:`String` path **)** Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreview_method_queue_edited_resource_preview: -- void **queue_edited_resource_preview** **(** :ref:`Resource` resource, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** +.. rst-class:: classref-method + +void **queue_edited_resource_preview** **(** :ref:`Resource` resource, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** 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` path, :ref:`Texture2D` preview, :ref:`Texture2D` thumbnail_preview, :ref:`Variant` userdata. ``userdata`` can be anything, and will be returned when ``receiver_func`` is called. \ **Note:** If it was not possible to create the preview the ``receiver_func`` will still be called, but the preview will be null. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreview_method_queue_resource_preview: -- void **queue_resource_preview** **(** :ref:`String` path, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** +.. rst-class:: classref-method + +void **queue_resource_preview** **(** :ref:`String` path, :ref:`Object` receiver, :ref:`StringName` receiver_func, :ref:`Variant` userdata **)** 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` path, :ref:`Texture2D` preview, :ref:`Texture2D` thumbnail_preview, :ref:`Variant` userdata. ``userdata`` can be anything, and will be returned when ``receiver_func`` is called. \ **Note:** If it was not possible to create the preview the ``receiver_func`` will still be called, but the preview will be null. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreview_method_remove_preview_generator: -- void **remove_preview_generator** **(** :ref:`EditorResourcePreviewGenerator` generator **)** +.. rst-class:: classref-method + +void **remove_preview_generator** **(** :ref:`EditorResourcePreviewGenerator` generator **)** Removes a custom preview generator. diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index 14ccc0312..2df3b2d8a 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -14,42 +14,61 @@ EditorResourcePreviewGenerator Custom generator of previews. +.. rst-class:: classref-introduction-group + Description ----------- Custom code to generate previews. Please check ``file_dialog/thumbnail_size`` in :ref:`EditorSettings` to find out the right size to do previews at. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_can_generate_small_preview` **(** **)** |virtual| |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`_generate` **(** :ref:`Resource` resource, :ref:`Vector2i` size **)** |virtual| |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`_generate_from_path` **(** :ref:`String` path, :ref:`Vector2i` size **)** |virtual| |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_generate_small_preview_automatically` **(** **)** |virtual| |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_generate_small_preview` **(** **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_generate` **(** :ref:`Resource` resource, :ref:`Vector2i` size **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_generate_from_path` **(** :ref:`String` path, :ref:`Vector2i` size **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_generate_small_preview_automatically` **(** **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorResourcePreviewGenerator_method__can_generate_small_preview: -- :ref:`bool` **_can_generate_small_preview** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_generate_small_preview** **(** **)** |virtual| |const| If this function returns ``true``, the generator will call :ref:`_generate` or :ref:`_generate_from_path` for small previews as well. By default, it returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreviewGenerator_method__generate: -- :ref:`Texture2D` **_generate** **(** :ref:`Resource` resource, :ref:`Vector2i` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **_generate** **(** :ref:`Resource` resource, :ref:`Vector2i` size **)** |virtual| |const| Generate a preview from a given resource with the specified size. This must always be implemented. @@ -57,11 +76,15 @@ 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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreviewGenerator_method__generate_from_path: -- :ref:`Texture2D` **_generate_from_path** **(** :ref:`String` path, :ref:`Vector2i` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **_generate_from_path** **(** :ref:`String` path, :ref:`Vector2i` size **)** |virtual| |const| Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate`. @@ -69,21 +92,29 @@ 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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreviewGenerator_method__generate_small_preview_automatically: -- :ref:`bool` **_generate_small_preview_automatically** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_generate_small_preview_automatically** **(** **)** |virtual| |const| If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`_generate` or :ref:`_generate_from_path`. By default, it returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorResourcePreviewGenerator_method__handles: -- :ref:`bool` **_handles** **(** :ref:`String` type **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_handles** **(** :ref:`String` type **)** |virtual| |const| Returns ``true`` if your generator supports the resource of type ``type``. diff --git a/classes/class_editorsceneformatimporter.rst b/classes/class_editorsceneformatimporter.rst index e964e30b2..452971cc2 100644 --- a/classes/class_editorsceneformatimporter.rst +++ b/classes/class_editorsceneformatimporter.rst @@ -16,101 +16,162 @@ EditorSceneFormatImporter Imports scenes from third-parties' 3D files. +.. rst-class:: classref-introduction-group + Description ----------- -``EditorSceneFormatImporter`` allows to define an importer script for a third-party 3D format. +**EditorSceneFormatImporter** allows to define an importer script for a third-party 3D format. -To use ``EditorSceneFormatImporter``, register it using the :ref:`EditorPlugin.add_scene_format_importer_plugin` method first. +To use **EditorSceneFormatImporter**, register it using the :ref:`EditorPlugin.add_scene_format_importer_plugin` method first. + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_import_flags` **(** **)** |virtual| |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_import_scene` **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options, :ref:`int` bake_fps **)** |virtual| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_import_flags` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_import_scene` **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_EditorSceneFormatImporter_constant_IMPORT_SCENE: +.. rst-class:: classref-constant + +**IMPORT_SCENE** = ``1`` + + + .. _class_EditorSceneFormatImporter_constant_IMPORT_ANIMATION: +.. rst-class:: classref-constant + +**IMPORT_ANIMATION** = ``2`` + + + .. _class_EditorSceneFormatImporter_constant_IMPORT_FAIL_ON_MISSING_DEPENDENCIES: +.. rst-class:: classref-constant + +**IMPORT_FAIL_ON_MISSING_DEPENDENCIES** = ``4`` + + + .. _class_EditorSceneFormatImporter_constant_IMPORT_GENERATE_TANGENT_ARRAYS: +.. rst-class:: classref-constant + +**IMPORT_GENERATE_TANGENT_ARRAYS** = ``8`` + + + .. _class_EditorSceneFormatImporter_constant_IMPORT_USE_NAMED_SKIN_BINDS: +.. rst-class:: classref-constant + +**IMPORT_USE_NAMED_SKIN_BINDS** = ``16`` + + + .. _class_EditorSceneFormatImporter_constant_IMPORT_DISCARD_MESHES_AND_MATERIALS: -- **IMPORT_SCENE** = **1** +.. rst-class:: classref-constant -- **IMPORT_ANIMATION** = **2** +**IMPORT_DISCARD_MESHES_AND_MATERIALS** = ``32`` -- **IMPORT_FAIL_ON_MISSING_DEPENDENCIES** = **4** -- **IMPORT_GENERATE_TANGENT_ARRAYS** = **8** -- **IMPORT_USE_NAMED_SKIN_BINDS** = **16** +.. rst-class:: classref-section-separator -- **IMPORT_DISCARD_MESHES_AND_MATERIALS** = **32** +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorSceneFormatImporter_method__get_extensions: -- :ref:`PackedStringArray` **_get_extensions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_extensions** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_EditorSceneFormatImporter_method__get_import_flags: -- :ref:`int` **_get_import_flags** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_import_flags** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_EditorSceneFormatImporter_method__get_import_options: -- void **_get_import_options** **(** :ref:`String` path **)** |virtual| +.. rst-class:: classref-method + +void **_get_import_options** **(** :ref:`String` path **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_EditorSceneFormatImporter_method__get_option_visibility: -- :ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_EditorSceneFormatImporter_method__import_scene: -- :ref:`Object` **_import_scene** **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options, :ref:`int` bake_fps **)** |virtual| +.. rst-class:: classref-method + +:ref:`Object` **_import_scene** **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options **)** |virtual| .. container:: contribute diff --git a/classes/class_editorsceneformatimporterblend.rst b/classes/class_editorsceneformatimporterblend.rst index 7deacac39..709560d4d 100644 --- a/classes/class_editorsceneformatimporterblend.rst +++ b/classes/class_editorsceneformatimporterblend.rst @@ -14,6 +14,8 @@ EditorSceneFormatImporterBlend Importer for Blender's ``.blend`` scene file format. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_editorsceneformatimporterfbx.rst b/classes/class_editorsceneformatimporterfbx.rst index 062c672de..77d84625c 100644 --- a/classes/class_editorsceneformatimporterfbx.rst +++ b/classes/class_editorsceneformatimporterfbx.rst @@ -14,6 +14,8 @@ EditorSceneFormatImporterFBX Importer for the ``.fbx`` scene file format. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index c5a6d31b8..ed02e2d1f 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -14,6 +14,8 @@ EditorScenePostImport Post-processes scenes after import. +.. rst-class:: classref-introduction-group + Description ----------- @@ -70,34 +72,53 @@ The :ref:`_post_import` callbac +.. rst-class:: classref-introduction-group + Tutorials --------- - `Importing 3D scenes: Custom script <../tutorials/assets_pipeline/importing_scenes.html#custom-script>`__ +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_post_import` **(** :ref:`Node` scene **)** |virtual| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_source_file` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_post_import` **(** :ref:`Node` scene **)** |virtual| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_source_file` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorScenePostImport_method__post_import: -- :ref:`Object` **_post_import** **(** :ref:`Node` scene **)** |virtual| +.. rst-class:: classref-method + +:ref:`Object` **_post_import** **(** :ref:`Node` scene **)** |virtual| Called after the scene was imported. This method must return the modified version of the scene. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImport_method_get_source_file: -- :ref:`String` **get_source_file** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_source_file** **(** **)** |const| Returns the source file path which got imported (e.g. ``res://scene.dae``). diff --git a/classes/class_editorscenepostimportplugin.rst b/classes/class_editorscenepostimportplugin.rst index 27b3dbf64..5d51369f0 100644 --- a/classes/class_editorscenepostimportplugin.rst +++ b/classes/class_editorscenepostimportplugin.rst @@ -14,163 +14,258 @@ EditorScenePostImportPlugin Plugin to control and modifying the process of importing a scene. +.. rst-class:: classref-introduction-group + Description ----------- This plugin type exists to modify the process of importing scenes, allowing to change the content as well as add importer options at every stage of the process. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_get_internal_import_options` **(** :ref:`int` category **)** |virtual| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_internal_option_update_view_required` **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_internal_option_visibility` **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_internal_process` **(** :ref:`int` category, :ref:`Node` base_node, :ref:`Node` node, :ref:`Resource` resource **)** |virtual| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_post_process` **(** :ref:`Node` scene **)** |virtual| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_pre_process` **(** :ref:`Node` scene **)** |virtual| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_import_option` **(** :ref:`String` name, :ref:`Variant` value **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_import_option_advanced` **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`Variant` default_value, :ref:`PropertyHint` hint=0, :ref:`String` hint_string="", :ref:`int` usage_flags=6 **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_option_value` **(** :ref:`StringName` name **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_get_internal_import_options` **(** :ref:`int` category **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_internal_option_update_view_required` **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_internal_option_visibility` **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_internal_process` **(** :ref:`int` category, :ref:`Node` base_node, :ref:`Node` node, :ref:`Resource` resource **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_post_process` **(** :ref:`Node` scene **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pre_process` **(** :ref:`Node` scene **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_import_option` **(** :ref:`String` name, :ref:`Variant` value **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_import_option_advanced` **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`Variant` default_value, :ref:`PropertyHint` hint=0, :ref:`String` hint_string="", :ref:`int` usage_flags=6 **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_option_value` **(** :ref:`StringName` name **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_EditorScenePostImportPlugin_InternalImportCategory: -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_NODE: - -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE: - -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MESH: - -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MATERIAL: - -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_ANIMATION: - -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE: - -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE: - -.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MAX: +.. rst-class:: classref-enumeration enum **InternalImportCategory**: -- **INTERNAL_IMPORT_CATEGORY_NODE** = **0** +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_NODE: -- **INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE** = **1** +.. rst-class:: classref-enumeration-constant -- **INTERNAL_IMPORT_CATEGORY_MESH** = **2** +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_NODE** = ``0`` -- **INTERNAL_IMPORT_CATEGORY_MATERIAL** = **3** -- **INTERNAL_IMPORT_CATEGORY_ANIMATION** = **4** -- **INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE** = **5** +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE: -- **INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE** = **6** +.. rst-class:: classref-enumeration-constant -- **INTERNAL_IMPORT_CATEGORY_MAX** = **7** +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE** = ``1`` + + + +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MESH: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_MESH** = ``2`` + + + +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MATERIAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_MATERIAL** = ``3`` + + + +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_ANIMATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_ANIMATION** = ``4`` + + + +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE** = ``5`` + + + +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE** = ``6`` + + + +.. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalImportCategory` **INTERNAL_IMPORT_CATEGORY_MAX** = ``7`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorScenePostImportPlugin_method__get_import_options: -- void **_get_import_options** **(** :ref:`String` path **)** |virtual| +.. rst-class:: classref-method + +void **_get_import_options** **(** :ref:`String` path **)** |virtual| Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option` and :ref:`add_import_option_advanced`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method__get_internal_import_options: -- void **_get_internal_import_options** **(** :ref:`int` category **)** |virtual| +.. rst-class:: classref-method + +void **_get_internal_import_options** **(** :ref:`int` category **)** |virtual| Override to add internal import options. These will appear in the 3D scene import dialog. Add options via :ref:`add_import_option` and :ref:`add_import_option_advanced`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method__get_internal_option_update_view_required: -- :ref:`Variant` **_get_internal_option_update_view_required** **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_internal_option_update_view_required** **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| Return true whether updating the 3D view of the import dialog needs to be updated if an option has changed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method__get_internal_option_visibility: -- :ref:`Variant` **_get_internal_option_visibility** **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_internal_option_visibility** **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| Return true or false whether a given option should be visible. Return null to ignore. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method__get_option_visibility: -- :ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| Return true or false whether a given option should be visible. Return null to ignore. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method__internal_process: -- void **_internal_process** **(** :ref:`int` category, :ref:`Node` base_node, :ref:`Node` node, :ref:`Resource` resource **)** |virtual| +.. rst-class:: classref-method + +void **_internal_process** **(** :ref:`int` category, :ref:`Node` base_node, :ref:`Node` node, :ref:`Resource` resource **)** |virtual| Process a specific node or resource for a given category. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method__post_process: -- void **_post_process** **(** :ref:`Node` scene **)** |virtual| +.. rst-class:: classref-method + +void **_post_process** **(** :ref:`Node` scene **)** |virtual| Post process the scene. This function is called after the final scene has been configured. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method__pre_process: -- void **_pre_process** **(** :ref:`Node` scene **)** |virtual| +.. rst-class:: classref-method + +void **_pre_process** **(** :ref:`Node` scene **)** |virtual| Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method_add_import_option: -- void **add_import_option** **(** :ref:`String` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **add_import_option** **(** :ref:`String` name, :ref:`Variant` value **)** Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options` and :ref:`_get_internal_import_options`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method_add_import_option_advanced: -- void **add_import_option_advanced** **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`Variant` default_value, :ref:`PropertyHint` hint=0, :ref:`String` hint_string="", :ref:`int` usage_flags=6 **)** +.. rst-class:: classref-method + +void **add_import_option_advanced** **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`Variant` default_value, :ref:`PropertyHint` hint=0, :ref:`String` hint_string="", :ref:`int` usage_flags=6 **)** Add a specific import option. This function can only be called from :ref:`_get_import_options` and :ref:`_get_internal_import_options`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScenePostImportPlugin_method_get_option_value: -- :ref:`Variant` **get_option_value** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_option_value** **(** :ref:`StringName` name **)** |const| Query the value of an option. This function can only be called from those querying visibility, or processing. diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index c8943b393..5a6e9b544 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -14,6 +14,8 @@ EditorScript Base script that can be used to add extension functions to the editor. +.. rst-class:: classref-introduction-group + Description ----------- @@ -54,51 +56,76 @@ Scripts extending this class and implementing its :ref:`_run`, meaning it is destroyed when nothing references it. This can cause errors during asynchronous operations if there are no references to the script. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| void | :ref:`_run` **(** **)** |virtual| | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_root_node` **(** :ref:`Node` node **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_scene` **(** **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | void | :ref:`_run` **(** **)** |virtual| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_root_node` **(** :ref:`Node` node **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_scene` **(** **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorScript_method__run: -- void **_run** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_run** **(** **)** |virtual| This method is executed by the Editor when **File > Run** is used. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScript_method_add_root_node: -- void **add_root_node** **(** :ref:`Node` node **)** +.. rst-class:: classref-method + +void **add_root_node** **(** :ref:`Node` node **)** Adds ``node`` as a child of the root node in the editor context. \ **Warning:** The implementation of this method is currently disabled. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScript_method_get_editor_interface: -- :ref:`EditorInterface` **get_editor_interface** **(** **)** +.. rst-class:: classref-method + +:ref:`EditorInterface` **get_editor_interface** **(** **)** Returns the :ref:`EditorInterface` singleton instance. +.. rst-class:: classref-item-separator + ---- .. _class_EditorScript_method_get_scene: -- :ref:`Node` **get_scene** **(** **)** +.. rst-class:: classref-method + +:ref:`Node` **get_scene** **(** **)** Returns the Editor's currently active scene. diff --git a/classes/class_editorscriptpicker.rst b/classes/class_editorscriptpicker.rst index 877bbadb6..89d1dab03 100644 --- a/classes/class_editorscriptpicker.rst +++ b/classes/class_editorscriptpicker.rst @@ -14,6 +14,8 @@ EditorScriptPicker Godot editor's control for selecting the ``script`` property of a :ref:`Node`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,25 +23,37 @@ Similar to :ref:`EditorResourcePicker` this :ref:`Co \ **Note:** You must set the :ref:`script_owner` for the custom context menu items to work. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+---------------------------------------------------------------------+ -| :ref:`Node` | :ref:`script_owner` | -+-------------------------+---------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------+ + | :ref:`Node` | :ref:`script_owner` | + +-------------------------+---------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_EditorScriptPicker_property_script_owner: -- :ref:`Node` **script_owner** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_script_owner(value) | -+----------+-------------------------+ -| *Getter* | get_script_owner() | -+----------+-------------------------+ +:ref:`Node` **script_owner** + +.. rst-class:: classref-property-setget + +- void **set_script_owner** **(** :ref:`Node` value **)** +- :ref:`Node` **get_script_owner** **(** **)** The owner :ref:`Node` of the script property that holds the edited resource. diff --git a/classes/class_editorselection.rst b/classes/class_editorselection.rst index 446500a65..2c30a8445 100644 --- a/classes/class_editorselection.rst +++ b/classes/class_editorselection.rst @@ -14,6 +14,8 @@ EditorSelection Manages the SceneTree selection in the editor. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,70 +23,107 @@ This object manages the SceneTree selection in the editor. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_node` **(** :ref:`Node` node **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`get_selected_nodes` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`get_transformable_selected_nodes` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_node` **(** :ref:`Node` node **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_node` **(** :ref:`Node` node **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node[]` | :ref:`get_selected_nodes` **(** **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node[]` | :ref:`get_transformable_selected_nodes` **(** **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_node` **(** :ref:`Node` node **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorSelection_signal_selection_changed: -- **selection_changed** **(** **)** +.. rst-class:: classref-signal + +**selection_changed** **(** **)** Emitted when the selection changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorSelection_method_add_node: -- void **add_node** **(** :ref:`Node` node **)** +.. rst-class:: classref-method + +void **add_node** **(** :ref:`Node` node **)** Adds a node to the selection. \ **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use :ref:`EditorInterface.edit_node`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSelection_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clear the selection. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSelection_method_get_selected_nodes: -- :ref:`Node[]` **get_selected_nodes** **(** **)** +.. rst-class:: classref-method + +:ref:`Node[]` **get_selected_nodes** **(** **)** Gets the list of selected nodes. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSelection_method_get_transformable_selected_nodes: -- :ref:`Node[]` **get_transformable_selected_nodes** **(** **)** +.. rst-class:: classref-method + +:ref:`Node[]` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSelection_method_remove_node: -- void **remove_node** **(** :ref:`Node` node **)** +.. rst-class:: classref-method + +void **remove_node** **(** :ref:`Node` node **)** Removes a node from the selection. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 20e677a68..d37239298 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -14,6 +14,8 @@ EditorSettings Object that holds the project-independent editor settings. +.. rst-class:: classref-introduction-group + Description ----------- @@ -48,708 +50,838 @@ Accessing the settings can be done using the following methods, such as: \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debugger/profiler_frame_history_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`docks/filesystem/always_show_folders` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`docks/filesystem/textfile_extensions` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`docks/filesystem/thumbnail_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`docks/property_editor/auto_refresh_interval` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`docks/property_editor/subresource_hue_tint` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`docks/scene_tree/auto_expand_to_selected` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/bone_color1` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/bone_color2` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/bone_ik_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/bone_outline_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/2d/bone_outline_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/bone_selected_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/2d/bone_width` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/2d/constrain_editor_view` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/grid_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/guides_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/smart_snapping_line_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/2d/viewport_border_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/default_fov` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/default_z_far` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/default_z_near` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/freelook/freelook_activation_modifier` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/freelook/freelook_base_speed` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/freelook/freelook_inertia` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/freelook/freelook_navigation_scheme` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/freelook/freelook_sensitivity` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/freelook/freelook_speed_zoom_link` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/grid_division_level_bias` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/grid_division_level_max` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/grid_division_level_min` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/grid_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/grid_xy_plane` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/grid_xz_plane` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/grid_yz_plane` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/navigation/emulate_3_button_mouse` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/navigation/emulate_numpad` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/navigation/invert_x_axis` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/navigation/invert_y_axis` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/navigation/navigation_scheme` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/navigation/orbit_modifier` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/navigation/pan_modifier` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/3d/navigation/warped_mouse_panning` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/navigation/zoom_modifier` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/navigation/zoom_style` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_inertia` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_sensitivity` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/navigation_feel/translation_inertia` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/3d/navigation_feel/zoom_inertia` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/3d/primary_grid_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/3d/primary_grid_steps` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/3d/secondary_grid_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/3d/selection_box_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/shape` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/animation/confirm_insert_track` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/animation/default_create_bezier_tracks` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/animation/default_create_reset_tracks` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/animation/onion_layers_future_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/animation/onion_layers_past_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/grid_map/pick_distance` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/panning/2d_editor_pan_speed` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/panning/2d_editor_panning_scheme` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/panning/animation_editors_panning_scheme` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/panning/simple_panning` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/panning/sub_editors_panning_scheme` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/panning/warped_mouse_panning` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/polygon_editor/point_grab_radius` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/polygon_editor/show_previous_outline` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editors/tiles_editor/display_grid` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`editors/tiles_editor/grid_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/visual_editors/lines_curvature` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editors/visual_editors/minimap_opacity` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editors/visual_editors/visual_shader/port_preview_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`filesystem/directories/autoscan_project_path` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`filesystem/directories/default_project_path` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`filesystem/file_dialog/display_mode` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/file_dialog/show_hidden_files` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`filesystem/file_dialog/thumbnail_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/on_save/compress_binary_resources` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/editor/code_font` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/code_font_contextual_ligatures` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/editor/code_font_custom_opentype_features` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/editor/code_font_custom_variations` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/code_font_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interface/editor/custom_display_scale` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/debug/enable_pseudolocalization` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/display_scale` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/editor/editor_language` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/expand_to_title` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/font_antialiasing` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/font_hinting` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/font_subpixel_positioning` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interface/editor/low_processor_mode_sleep_usec` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/editor/main_font` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/editor/main_font_bold` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/main_font_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/mouse_extra_buttons_navigate_history` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/save_each_scene_on_quit` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/separate_distraction_mode` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/editor/show_internal_errors_in_toast_notifications` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/single_window_mode` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/editor/use_embedded_menu` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/inspector/max_array_dictionary_items_per_page` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/inspector/show_low_level_opentype_features` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/scene_tabs/display_close_button` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/scene_tabs/maximum_width` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/scene_tabs/show_script_button` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interface/scene_tabs/show_thumbnail_on_hover` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`interface/theme/accent_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interface/theme/additional_spacing` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`interface/theme/base_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/theme/border_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interface/theme/contrast` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/theme/corner_radius` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/theme/custom_theme` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`interface/theme/icon_and_font_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interface/theme/icon_saturation` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`interface/theme/preset` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`interface/theme/relationship_line_opacity` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`network/debug/remote_host` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/debug/remote_port` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`network/http_proxy/host` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/http_proxy/port` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`network/tls/editor_tls_certificates` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`project_manager/sorting_order` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`run/auto_save/save_before_running` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`run/output/always_clear_output_on_play` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`run/output/always_close_output_on_stop` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`run/output/always_open_output_on_play` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`run/output/font_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`run/window_placement/rect` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`run/window_placement/screen` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/caret/caret_blink` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`text_editor/appearance/caret/caret_blink_interval` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_all_occurrences` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_current_line` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/appearance/caret/type` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/guidelines/show_line_length_guidelines` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/gutters/highlight_type_safe_lines` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/gutters/show_bookmark_gutter` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/gutters/show_info_gutter` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/gutters/show_line_numbers` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/lines/code_folding` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/appearance/lines/word_wrap` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/appearance/minimap/minimap_width` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/minimap/show_minimap` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_spaces` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_tabs` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/behavior/files/autosave_interval_secs` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/files/convert_indent_on_save` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/files/restore_scripts_on_load` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/indent/auto_indent` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/behavior/indent/size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/behavior/indent/type` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/navigation/scroll_past_end_of_file` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/navigation/smooth_scrolling` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/behavior/navigation/v_scroll_speed` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/completion/add_type_hints` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/completion/auto_brace_complete` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`text_editor/completion/code_complete_delay` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/completion/complete_file_paths` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`text_editor/completion/idle_parse_delay` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/completion/use_single_quotes` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/help/class_reference_examples` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/help/help_font_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/help/help_source_font_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_editor/help/help_title_font_size` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/help/show_help_index` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/script_list/show_members_overview` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`text_editor/script_list/sort_members_outline_alphabetically` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text_editor/theme/color_theme` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/background_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/base_type_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/bookmark_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/brace_mismatch_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/breakpoint_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_background_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/code_folding_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/comment_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_background_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_existing_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_font_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_hovered_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_selected_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/control_flow_keyword_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/current_line_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/engine_type_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/executing_line_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/function_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/keyword_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/line_length_guideline_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/line_number_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/mark_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/member_variable_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/number_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/safe_line_number_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_border_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/selection_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/string_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/symbol_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/text_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/text_selected_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/user_type_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debugger/profiler_frame_history_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/filesystem/always_show_folders` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`docks/filesystem/textfile_extensions` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`docks/filesystem/thumbnail_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`docks/property_editor/auto_refresh_interval` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`docks/property_editor/subresource_hue_tint` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/auto_expand_to_selected` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_color1` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_color2` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_ik_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_outline_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/2d/bone_outline_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/bone_selected_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/2d/bone_width` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/2d/constrain_editor_view` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/grid_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/guides_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/smart_snapping_line_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/2d/viewport_border_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/default_fov` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/default_z_far` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/default_z_near` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/freelook/freelook_activation_modifier` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/freelook/freelook_base_speed` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/freelook/freelook_inertia` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/freelook/freelook_navigation_scheme` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/freelook/freelook_sensitivity` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/freelook/freelook_speed_zoom_link` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/grid_division_level_bias` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/grid_division_level_max` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/grid_division_level_min` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/grid_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/grid_xy_plane` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/grid_xz_plane` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/grid_yz_plane` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/emulate_3_button_mouse` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/emulate_numpad` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/invert_x_axis` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/invert_y_axis` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/navigation_scheme` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/orbit_modifier` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/pan_modifier` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/warped_mouse_panning` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/zoom_modifier` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/zoom_style` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_inertia` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/orbit_sensitivity` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/translation_inertia` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/zoom_inertia` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d/primary_grid_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/primary_grid_steps` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d/secondary_grid_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d/selection_box_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/shape` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/confirm_insert_track` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/default_create_bezier_tracks` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/default_create_reset_tracks` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/animation/onion_layers_future_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/animation/onion_layers_past_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/grid_map/pick_distance` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/2d_editor_pan_speed` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/2d_editor_panning_scheme` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/animation_editors_panning_scheme` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/panning/simple_panning` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/sub_editors_panning_scheme` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/panning/warped_mouse_panning` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/polygon_editor/point_grab_radius` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/polygon_editor/show_previous_outline` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/tiles_editor/display_grid` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/tiles_editor/grid_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/visual_editors/lines_curvature` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/visual_editors/minimap_opacity` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/visual_editors/visual_shader/port_preview_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/directories/autoscan_project_path` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/directories/default_project_path` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filesystem/file_dialog/display_mode` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/file_dialog/show_hidden_files` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filesystem/file_dialog/thumbnail_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/on_save/compress_binary_resources` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/code_font` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/code_font_contextual_ligatures` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/code_font_custom_opentype_features` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/code_font_custom_variations` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/code_font_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/editor/custom_display_scale` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/debug/enable_pseudolocalization` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/display_scale` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/editor_language` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/expand_to_title` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/font_antialiasing` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/font_hinting` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/font_subpixel_positioning` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/editor/low_processor_mode_sleep_usec` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/main_font` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/editor/main_font_bold` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/main_font_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/mouse_extra_buttons_navigate_history` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/save_each_scene_on_quit` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/separate_distraction_mode` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/show_internal_errors_in_toast_notifications` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/single_window_mode` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/use_embedded_menu` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/inspector/max_array_dictionary_items_per_page` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/show_low_level_opentype_features` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/scene_tabs/display_close_button` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/scene_tabs/maximum_width` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/scene_tabs/show_script_button` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/scene_tabs/show_thumbnail_on_hover` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`interface/theme/accent_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/theme/additional_spacing` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`interface/theme/base_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/border_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/theme/contrast` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/corner_radius` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/theme/custom_theme` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/theme/draw_extra_borders` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/theme/icon_and_font_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/theme/icon_saturation` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`interface/theme/preset` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`interface/theme/relationship_line_opacity` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`network/debug/remote_host` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/debug/remote_port` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`network/http_proxy/host` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/http_proxy/port` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`network/tls/editor_tls_certificates` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`project_manager/sorting_order` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/auto_save/save_before_running` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/output/always_clear_output_on_play` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/output/always_close_output_on_stop` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`run/output/always_open_output_on_play` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/output/font_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/window_placement/rect` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/window_placement/screen` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/caret/caret_blink` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`text_editor/appearance/caret/caret_blink_interval` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_all_occurrences` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/caret/highlight_current_line` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/caret/type` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/guidelines/show_line_length_guidelines` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/highlight_type_safe_lines` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_bookmark_gutter` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_info_gutter` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/gutters/show_line_numbers` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/lines/code_folding` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/lines/word_wrap` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/minimap/minimap_width` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/minimap/show_minimap` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_spaces` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/whitespace/draw_tabs` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/files/autosave_interval_secs` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/convert_indent_on_save` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/restore_scripts_on_load` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/indent/auto_indent` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/indent/size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/indent/type` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/scroll_past_end_of_file` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/smooth_scrolling` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/behavior/navigation/v_scroll_speed` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/add_type_hints` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/auto_brace_complete` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`text_editor/completion/code_complete_delay` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/complete_file_paths` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`text_editor/completion/idle_parse_delay` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/use_single_quotes` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/class_reference_examples` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/help_font_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/help_source_font_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/help/help_title_font_size` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/help/show_help_index` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/script_list/show_members_overview` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/script_list/sort_members_outline_alphabetically` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text_editor/theme/color_theme` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/background_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/base_type_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/bookmark_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/brace_mismatch_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/breakpoint_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_background_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/caret_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/code_folding_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/comment_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_background_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_existing_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_font_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_scroll_hovered_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/completion_selected_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/control_flow_keyword_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/current_line_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/engine_type_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/executing_line_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/function_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/keyword_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/line_length_guideline_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/line_number_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/mark_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/member_variable_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/number_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/safe_line_number_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_border_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/search_result_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/selection_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/string_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/symbol_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/text_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/text_selected_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/user_type_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_property_info` **(** :ref:`Dictionary` info **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`check_changed_settings_in_group` **(** :ref:`String` setting_prefix **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase` **(** :ref:`String` property **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_changed_settings` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_favorites` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_project_metadata` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_recent_dirs` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_setting` **(** :ref:`String` name **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mark_setting_changed` **(** :ref:`String` setting **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_builtin_action_override` **(** :ref:`String` name, :ref:`InputEvent[]` actions_list **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_favorites` **(** :ref:`PackedStringArray` dirs **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_initial_value` **(** :ref:`StringName` name, :ref:`Variant` value, :ref:`bool` update_current **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_project_metadata` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` data **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_recent_dirs` **(** :ref:`PackedStringArray` dirs **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_setting` **(** :ref:`String` name, :ref:`Variant` value **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_property_info` **(** :ref:`Dictionary` info **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`check_changed_settings_in_group` **(** :ref:`String` setting_prefix **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase` **(** :ref:`String` property **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_changed_settings` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_favorites` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_project_metadata` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_recent_dirs` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_setting` **(** :ref:`String` name **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mark_setting_changed` **(** :ref:`String` setting **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_builtin_action_override` **(** :ref:`String` name, :ref:`InputEvent[]` actions_list **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_favorites` **(** :ref:`PackedStringArray` dirs **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_initial_value` **(** :ref:`StringName` name, :ref:`Variant` value, :ref:`bool` update_current **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_project_metadata` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` data **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_recent_dirs` **(** :ref:`PackedStringArray` dirs **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_setting` **(** :ref:`String` name, :ref:`Variant` value **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorSettings_signal_settings_changed: -- **settings_changed** **(** **)** +.. rst-class:: classref-signal + +**settings_changed** **(** **)** Emitted after any editor setting has changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constants --------- .. _class_EditorSettings_constant_NOTIFICATION_EDITOR_SETTINGS_CHANGED: -- **NOTIFICATION_EDITOR_SETTINGS_CHANGED** = **10000** --- 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. +.. rst-class:: classref-constant + +**NOTIFICATION_EDITOR_SETTINGS_CHANGED** = ``10000`` + +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. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_EditorSettings_property_debugger/profiler_frame_history_size: -- :ref:`int` **debugger/profiler_frame_history_size** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_docks/filesystem/always_show_folders: -- :ref:`bool` **docks/filesystem/always_show_folders** +.. rst-class:: classref-property + +:ref:`bool` **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. \ **Note:** This setting has no effect when split mode is disabled (which is the default). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_docks/filesystem/textfile_extensions: -- :ref:`String` **docks/filesystem/textfile_extensions** +.. rst-class:: classref-property + +:ref:`String` **docks/filesystem/textfile_extensions** List of file extensions to consider as editable text files in the FileSystem dock (by double-clicking on the files). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_docks/filesystem/thumbnail_size: -- :ref:`int` **docks/filesystem/thumbnail_size** +.. rst-class:: classref-property + +:ref:`int` **docks/filesystem/thumbnail_size** The thumbnail size to use in the FileSystem dock (in pixels). See also :ref:`filesystem/file_dialog/thumbnail_size`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_docks/property_editor/auto_refresh_interval: -- :ref:`float` **docks/property_editor/auto_refresh_interval** +.. rst-class:: classref-property + +:ref:`float` **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 more often, but take up more CPU time. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_docks/property_editor/subresource_hue_tint: -- :ref:`float` **docks/property_editor/subresource_hue_tint** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_docks/scene_tree/auto_expand_to_selected: -- :ref:`bool` **docks/scene_tree/auto_expand_to_selected** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_docks/scene_tree/start_create_dialog_fully_expanded: -- :ref:`bool` **docks/scene_tree/start_create_dialog_fully_expanded** +.. rst-class:: classref-property + +:ref:`bool` **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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/bone_color1: -- :ref:`Color` **editors/2d/bone_color1** +.. rst-class:: classref-property + +:ref:`Color` **editors/2d/bone_color1** The "start" stop of the color gradient to use for bones in the 2D skeleton editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/bone_color2: -- :ref:`Color` **editors/2d/bone_color2** +.. rst-class:: classref-property + +:ref:`Color` **editors/2d/bone_color2** The "end" stop of the color gradient to use for bones in the 2D skeleton editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/bone_ik_color: -- :ref:`Color` **editors/2d/bone_ik_color** +.. rst-class:: classref-property + +:ref:`Color` **editors/2d/bone_ik_color** The color to use for inverse kinematics-enabled bones in the 2D skeleton editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/bone_outline_color: -- :ref:`Color` **editors/2d/bone_outline_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/bone_outline_size: -- :ref:`int` **editors/2d/bone_outline_size** +.. rst-class:: classref-property + +:ref:`int` **editors/2d/bone_outline_size** The outline size in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_width`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/bone_selected_color: -- :ref:`Color` **editors/2d/bone_selected_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/bone_width: -- :ref:`int` **editors/2d/bone_width** +.. rst-class:: classref-property + +:ref:`int` **editors/2d/bone_width** The bone width in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_outline_size`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/constrain_editor_view: -- :ref:`bool` **editors/2d/constrain_editor_view** +.. rst-class:: classref-property + +:ref:`bool` **editors/2d/constrain_editor_view** If ``true``, prevents the 2D editor viewport from leaving the scene. Limits are calculated dynamically based on nodes present in the current scene. If ``false``, the 2D editor viewport will be able to move freely, but you risk getting lost when zooming out too far. You can refocus on the scene by selecting a node then pressing :kbd:`F`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/grid_color: -- :ref:`Color` **editors/2d/grid_color** +.. rst-class:: classref-property + +:ref:`Color` **editors/2d/grid_color** The grid color to use in the 2D editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/guides_color: -- :ref:`Color` **editors/2d/guides_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/smart_snapping_line_color: -- :ref:`Color` **editors/2d/smart_snapping_line_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/2d/viewport_border_color: -- :ref:`Color` **editors/2d/viewport_border_color** +.. rst-class:: classref-property + +:ref:`Color` **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` node is used, or unless the window is resized and the stretch mode is set to ``disabled``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/default_fov: -- :ref:`float` **editors/3d/default_fov** +.. rst-class:: classref-property + +:ref:`float` **editors/3d/default_fov** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/default_z_far: -- :ref:`float` **editors/3d/default_z_far** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/default_z_near: -- :ref:`float` **editors/3d/default_z_near** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/freelook/freelook_activation_modifier: -- :ref:`int` **editors/3d/freelook/freelook_activation_modifier** +.. rst-class:: classref-property + +:ref:`int` **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). @@ -757,27 +889,39 @@ The modifier key to use to enable freelook in the 3D editor (on top of pressing \ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/freelook/freelook_base_speed: -- :ref:`float` **editors/3d/freelook/freelook_base_speed** +.. rst-class:: classref-property + +:ref:`float` **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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/freelook/freelook_inertia: -- :ref:`float` **editors/3d/freelook/freelook_inertia** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/freelook/freelook_navigation_scheme: -- :ref:`int` **editors/3d/freelook/freelook_navigation_scheme** +.. rst-class:: classref-property + +:ref:`int` **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. @@ -789,83 +933,123 @@ The navigation scheme to use when freelook is enabled in the 3D editor. Some of See also :ref:`editors/3d/navigation/navigation_scheme`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/freelook/freelook_sensitivity: -- :ref:`float` **editors/3d/freelook/freelook_sensitivity** +.. rst-class:: classref-property + +:ref:`float` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/freelook/freelook_speed_zoom_link: -- :ref:`bool` **editors/3d/freelook/freelook_speed_zoom_link** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/grid_division_level_bias: -- :ref:`float` **editors/3d/grid_division_level_bias** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/grid_division_level_max: -- :ref:`int` **editors/3d/grid_division_level_max** +.. rst-class:: classref-property + +:ref:`int` **editors/3d/grid_division_level_max** The smallest grid division to use in the 3D editor, specified as a power of 2. The grid will not be able to get larger than ``1 ^ grid_division_level_max`` units. By default, this means grid divisions cannot get smaller than 100 units each, no matter how far away the camera is from the grid. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/grid_division_level_min: -- :ref:`int` **editors/3d/grid_division_level_min** +.. rst-class:: classref-property + +:ref:`int` **editors/3d/grid_division_level_min** The smallest grid division to use in the 3D editor, specified as a power of 2. The grid will not be able to get smaller than ``1 ^ 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/grid_size: -- :ref:`int` **editors/3d/grid_size** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/grid_xy_plane: -- :ref:`bool` **editors/3d/grid_xy_plane** +.. rst-class:: classref-property + +:ref:`bool` **editors/3d/grid_xy_plane** If ``true``, render the grid on an XY plane. This can be useful for 3D side-scrolling games. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/grid_xz_plane: -- :ref:`bool` **editors/3d/grid_xz_plane** +.. rst-class:: classref-property + +:ref:`bool` **editors/3d/grid_xz_plane** If ``true``, render the grid on an XZ plane. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/grid_yz_plane: -- :ref:`bool` **editors/3d/grid_yz_plane** +.. rst-class:: classref-property + +:ref:`bool` **editors/3d/grid_yz_plane** If ``true``, render the grid on an YZ plane. This can be useful for 3D side-scrolling games. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/emulate_3_button_mouse: -- :ref:`bool` **editors/3d/navigation/emulate_3_button_mouse** +.. rst-class:: classref-property + +:ref:`bool` **editors/3d/navigation/emulate_3_button_mouse** If ``true``, enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad. @@ -873,35 +1057,51 @@ When 3-button mouse emulation mode is enabled, the pan, zoom and orbit modifiers \ **Note:** No matter the orbit modifier configured in :ref:`editors/3d/navigation/orbit_modifier`, :kbd:`Alt` will always remain usable for orbiting in this mode to improve usability with graphics tablets. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/emulate_numpad: -- :ref:`bool` **editors/3d/navigation/emulate_numpad** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/invert_x_axis: -- :ref:`bool` **editors/3d/navigation/invert_x_axis** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/invert_y_axis: -- :ref:`bool` **editors/3d/navigation/invert_y_axis** +.. rst-class:: classref-property + +:ref:`bool` **editors/3d/navigation/invert_y_axis** If ``true``, invert the vertical mouse axis when panning, orbiting, or using freelook mode in the 3D editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/navigation_scheme: -- :ref:`int` **editors/3d/navigation/navigation_scheme** +.. rst-class:: classref-property + +:ref:`int` **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. @@ -915,11 +1115,15 @@ See also :ref:`editors/3d/freelook/freelook_navigation_scheme` **editors/3d/navigation/orbit_modifier** +.. rst-class:: classref-property + +:ref:`int` **editors/3d/navigation/orbit_modifier** The modifier key that must be held to orbit in the 3D editor. @@ -927,315 +1131,467 @@ The modifier key that must be held to orbit in the 3D editor. \ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/pan_modifier: -- :ref:`int` **editors/3d/navigation/pan_modifier** +.. rst-class:: classref-property + +:ref:`int` **editors/3d/navigation/pan_modifier** The modifier key that must be held to pan in the 3D editor. \ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/warped_mouse_panning: -- :ref:`bool` **editors/3d/navigation/warped_mouse_panning** +.. rst-class:: classref-property + +:ref:`bool` **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 then mouse the mouse back constantly. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/zoom_modifier: -- :ref:`int` **editors/3d/navigation/zoom_modifier** +.. rst-class:: classref-property + +:ref:`int` **editors/3d/navigation/zoom_modifier** The modifier key that must be held to zoom in the 3D editor. \ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation/zoom_style: -- :ref:`int` **editors/3d/navigation/zoom_style** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation_feel/orbit_inertia: -- :ref:`float` **editors/3d/navigation_feel/orbit_inertia** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation_feel/orbit_sensitivity: -- :ref:`float` **editors/3d/navigation_feel/orbit_sensitivity** +.. rst-class:: classref-property + +:ref:`float` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation_feel/translation_inertia: -- :ref:`float` **editors/3d/navigation_feel/translation_inertia** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/navigation_feel/zoom_inertia: -- :ref:`float` **editors/3d/navigation_feel/zoom_inertia** +.. rst-class:: classref-property + +:ref:`float` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/primary_grid_color: -- :ref:`Color` **editors/3d/primary_grid_color** +.. rst-class:: classref-property + +:ref:`Color` **editors/3d/primary_grid_color** The color to use for the primary 3D grid. The color's alpha channel affects the grid's opacity. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/primary_grid_steps: -- :ref:`int` **editors/3d/primary_grid_steps** +.. rst-class:: classref-property + +:ref:`int` **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` and :ref:`editors/3d/secondary_grid_color`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/secondary_grid_color: -- :ref:`Color` **editors/3d/secondary_grid_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. The color's alpha channel affects the grid's opacity. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d/selection_box_color: -- :ref:`Color` **editors/3d/selection_box_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: -- :ref:`Color` **editors/3d_gizmos/gizmo_colors/instantiated** +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/instantiated** The color override to use for 3D editor gizmos if the :ref:`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/joint: -- :ref:`Color` **editors/3d_gizmos/gizmo_colors/joint** +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/joint** The 3D editor gizmo color for :ref:`Joint3D`\ s and :ref:`PhysicalBone3D`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/shape: -- :ref:`Color` **editors/3d_gizmos/gizmo_colors/shape** +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/shape** The 3D editor gizmo color for :ref:`CollisionShape3D`\ s, :ref:`VehicleWheel3D`\ s, :ref:`RayCast3D`\ s and :ref:`SpringArm3D`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/animation/autorename_animation_tracks: -- :ref:`bool` **editors/animation/autorename_animation_tracks** +.. rst-class:: classref-property + +:ref:`bool` **editors/animation/autorename_animation_tracks** If ``true``, automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/animation/confirm_insert_track: -- :ref:`bool` **editors/animation/confirm_insert_track** +.. rst-class:: classref-property + +:ref:`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: -- :ref:`bool` **editors/animation/default_create_bezier_tracks** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/animation/default_create_reset_tracks: -- :ref:`bool` **editors/animation/default_create_reset_tracks** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/animation/onion_layers_future_color: -- :ref:`Color` **editors/animation/onion_layers_future_color** +.. rst-class:: classref-property + +:ref:`Color` **editors/animation/onion_layers_future_color** The modulate color to use for "future" frames displayed in the animation editor's onion skinning feature. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/animation/onion_layers_past_color: -- :ref:`Color` **editors/animation/onion_layers_past_color** +.. rst-class:: classref-property + +:ref:`Color` **editors/animation/onion_layers_past_color** The modulate color to use for "past" frames displayed in the animation editor's onion skinning feature. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/grid_map/pick_distance: -- :ref:`float` **editors/grid_map/pick_distance** +.. rst-class:: classref-property + +:ref:`float` **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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/panning/2d_editor_pan_speed: -- :ref:`int` **editors/panning/2d_editor_pan_speed** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/panning/2d_editor_panning_scheme: -- :ref:`int` **editors/panning/2d_editor_panning_scheme** +.. rst-class:: classref-property + +:ref:`int` **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` and :ref:`editors/panning/animation_editors_panning_scheme`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/panning/animation_editors_panning_scheme: -- :ref:`int` **editors/panning/animation_editors_panning_scheme** +.. rst-class:: classref-property + +:ref:`int` **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` and :ref:`editors/panning/sub_editors_panning_scheme` (which controls the animation blend tree editor's pan behavior). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/panning/simple_panning: -- :ref:`bool` **editors/panning/simple_panning** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/panning/sub_editors_panning_scheme: -- :ref:`int` **editors/panning/sub_editors_panning_scheme** +.. rst-class:: classref-property + +:ref:`int` **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` editor, tileset editor, texture region editor and visual shader editor. See also :ref:`editors/panning/2d_editor_panning_scheme` and :ref:`editors/panning/animation_editors_panning_scheme`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/panning/warped_mouse_panning: -- :ref:`bool` **editors/panning/warped_mouse_panning** +.. rst-class:: classref-property + +:ref:`bool` **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 then mouse the mouse back constantly. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/polygon_editor/point_grab_radius: -- :ref:`int` **editors/polygon_editor/point_grab_radius** +.. rst-class:: classref-property + +:ref:`int` **editors/polygon_editor/point_grab_radius** The radius in which points can be selected in the :ref:`Polygon2D` and :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/polygon_editor/show_previous_outline: -- :ref:`bool` **editors/polygon_editor/show_previous_outline** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/tiles_editor/display_grid: -- :ref:`bool` **editors/tiles_editor/display_grid** +.. rst-class:: classref-property + +:ref:`bool` **editors/tiles_editor/display_grid** If ``true``, displays a grid while the TileMap editor is active. See also :ref:`editors/tiles_editor/grid_color`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/tiles_editor/grid_color: -- :ref:`Color` **editors/tiles_editor/grid_color** +.. rst-class:: classref-property + +:ref:`Color` **editors/tiles_editor/grid_color** The color to use for the TileMap editor's grid. \ **Note:** Only effective if :ref:`editors/tiles_editor/display_grid` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/visual_editors/lines_curvature: -- :ref:`float` **editors/visual_editors/lines_curvature** +.. rst-class:: classref-property + +:ref:`float` **editors/visual_editors/lines_curvature** 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_editors/visual_editors/minimap_opacity: -- :ref:`float` **editors/visual_editors/minimap_opacity** +.. rst-class:: classref-property + +:ref:`float` **editors/visual_editors/minimap_opacity** The opacity of the minimap displayed in the bottom-right corner of the visual shader editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_editors/visual_editors/visual_shader/port_preview_size: -- :ref:`int` **editors/visual_editors/visual_shader/port_preview_size** +.. rst-class:: classref-property + +:ref:`int` **editors/visual_editors/visual_shader/port_preview_size** 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_filesystem/directories/autoscan_project_path: -- :ref:`String` **filesystem/directories/autoscan_project_path** +.. rst-class:: classref-property + +:ref:`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` for convenience. \ **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_filesystem/directories/default_project_path: -- :ref:`String` **filesystem/directories/default_project_path** +.. rst-class:: classref-property + +:ref:`String` **filesystem/directories/default_project_path** 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` for convenience. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_filesystem/file_dialog/display_mode: -- :ref:`int` **filesystem/file_dialog/display_mode** +.. rst-class:: classref-property + +:ref:`int` **filesystem/file_dialog/display_mode** The display mode to use in the editor's file dialogs. @@ -1243,45 +1599,65 @@ The display mode to use in the editor's file dialogs. - **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_filesystem/file_dialog/show_hidden_files: -- :ref:`bool` **filesystem/file_dialog/show_hidden_files** +.. rst-class:: classref-property + +:ref:`bool` **filesystem/file_dialog/show_hidden_files** 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_filesystem/file_dialog/thumbnail_size: -- :ref:`int` **filesystem/file_dialog/thumbnail_size** +.. rst-class:: classref-property + +:ref:`int` **filesystem/file_dialog/thumbnail_size** The thumbnail size to use in the editor's file dialogs (in pixels). See also :ref:`docks/filesystem/thumbnail_size`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_filesystem/on_save/compress_binary_resources: -- :ref:`bool` **filesystem/on_save/compress_binary_resources** +.. rst-class:: classref-property + +:ref:`bool` **filesystem/on_save/compress_binary_resources** If ``true``, uses lossless compression for binary resources. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_filesystem/on_save/safe_save_on_backup_then_rename: -- :ref:`bool` **filesystem/on_save/safe_save_on_backup_then_rename** +.. rst-class:: classref-property + +:ref:`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). \ **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/accept_dialog_cancel_ok_buttons: -- :ref:`int` **interface/editor/accept_dialog_cancel_ok_buttons** +.. rst-class:: classref-property + +:ref:`int` **interface/editor/accept_dialog_cancel_ok_buttons** How to position the Cancel and OK buttons in the editor's :ref:`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. @@ -1291,85 +1667,121 @@ How to position the Cancel and OK buttons in the editor's :ref:`AcceptDialog` **interface/editor/automatically_open_screenshots** +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/automatically_open_screenshots** 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/editor/code_font: -- :ref:`String` **interface/editor/code_font** +.. rst-class:: classref-property + +:ref:`String` **interface/editor/code_font** The font to use for the script editor. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/code_font_contextual_ligatures: -- :ref:`int` **interface/editor/code_font_contextual_ligatures** +.. rst-class:: classref-property + +:ref:`int` **interface/editor/code_font_contextual_ligatures** 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 `__) has contextual ligatures in its font file. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/code_font_custom_opentype_features: -- :ref:`String` **interface/editor/code_font_custom_opentype_features** +.. rst-class:: classref-property + +:ref:`String` **interface/editor/code_font_custom_opentype_features** 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 `__) has custom OpenType features in its font file, but there is no documented list yet. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/code_font_custom_variations: -- :ref:`String` **interface/editor/code_font_custom_variations** +.. rst-class:: classref-property + +:ref:`String` **interface/editor/code_font_custom_variations** 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 `__) has alternate characters in its font file, but there is no documented list yet. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/code_font_size: -- :ref:`int` **interface/editor/code_font_size** +.. rst-class:: classref-property + +:ref:`int` **interface/editor/code_font_size** 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`). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/custom_display_scale: -- :ref:`float` **interface/editor/custom_display_scale** +.. rst-class:: classref-property + +:ref:`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. \ **Note:** Only effective if :ref:`interface/editor/display_scale` is set to **Custom**. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/debug/enable_pseudolocalization: -- :ref:`bool` **interface/editor/debug/enable_pseudolocalization** +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/debug/enable_pseudolocalization** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/display_scale: -- :ref:`int` **interface/editor/display_scale** +.. rst-class:: classref-property + +:ref:`int` **interface/editor/display_scale** The display scale factor to use for the editor interface. Higher values are more suited to hiDPI/Retina displays. @@ -1377,39 +1789,55 @@ If set to **Auto**, the editor scale is automatically determined based on the sc If set to **Custom**, the scaling value in :ref:`interface/editor/custom_display_scale` will be used. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/editor_language: -- :ref:`String` **interface/editor/editor_language** +.. rst-class:: classref-property + +:ref:`String` **interface/editor/editor_language** The language to use for the editor interface. Translations are provided by the community. If you spot a mistake, `contribute to editor translations on Weblate! `__ +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/expand_to_title: -- :ref:`bool` **interface/editor/expand_to_title** +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/expand_to_title** Expanding main editor window content to the title, if supported by :ref:`DisplayServer`. See :ref:`DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE`. Specific to the macOS platform. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/font_antialiasing: -- :ref:`int` **interface/editor/font_antialiasing** +.. rst-class:: classref-property + +:ref:`int` **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_hinting: -- :ref:`int` **interface/editor/font_hinting** +.. rst-class:: classref-property + +:ref:`int` **interface/editor/font_hinting** The font hinting mode to use for the editor fonts. FreeType supports the following font hinting modes: @@ -1421,215 +1849,331 @@ The font hinting mode to use for the editor fonts. FreeType supports the followi 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: -- :ref:`int` **interface/editor/font_subpixel_positioning** +.. rst-class:: classref-property + +:ref:`int` **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/low_processor_mode_sleep_usec: -- :ref:`float` **interface/editor/low_processor_mode_sleep_usec** +.. rst-class:: classref-property + +:ref:`float` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/main_font: -- :ref:`String` **interface/editor/main_font** +.. rst-class:: classref-property + +:ref:`String` **interface/editor/main_font** The font to use for the editor interface. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/main_font_bold: -- :ref:`String` **interface/editor/main_font_bold** +.. rst-class:: classref-property + +:ref:`String` **interface/editor/main_font_bold** The font to use for bold text in the editor interface. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/main_font_size: -- :ref:`int` **interface/editor/main_font_size** +.. rst-class:: classref-property + +:ref:`int` **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: -- :ref:`bool` **interface/editor/mouse_extra_buttons_navigate_history** +.. rst-class:: classref-property + +:ref:`bool` **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/save_each_scene_on_quit: -- :ref:`bool` **interface/editor/save_each_scene_on_quit** +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/save_each_scene_on_quit** If ``true``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``false``, the editor will ask to save each scene individually. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/separate_distraction_mode: -- :ref:`bool` **interface/editor/separate_distraction_mode** +.. rst-class:: classref-property + +:ref:`bool` **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: -- :ref:`int` **interface/editor/show_internal_errors_in_toast_notifications** +.. rst-class:: classref-property + +:ref:`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. The default **Auto** value will only enable this if the editor was compiled with the ``dev=yes`` option (the default is ``dev=no``). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/single_window_mode: -- :ref:`bool` **interface/editor/single_window_mode** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec: -- :ref:`float` **interface/editor/unfocused_low_processor_mode_sleep_usec** +.. rst-class:: classref-property + +:ref:`float` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/editor/use_embedded_menu: -- :ref:`bool` **interface/editor/use_embedded_menu** +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/use_embedded_menu** If ``true``, editor main menu is using embedded :ref:`MenuBar` instead of system global menu. Specific to the macOS platform. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page: -- :ref:`int` **interface/inspector/max_array_dictionary_items_per_page** +.. rst-class:: classref-property + +:ref:`int` **interface/inspector/max_array_dictionary_items_per_page** The number of :ref:`Array` or :ref:`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/show_low_level_opentype_features: -- :ref:`bool` **interface/inspector/show_low_level_opentype_features** +.. rst-class:: classref-property + +:ref:`bool` **interface/inspector/show_low_level_opentype_features** If ``true``, display OpenType features marked as ``hidden`` by the font file in the :ref:`Font` editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/scene_tabs/display_close_button: -- :ref:`int` **interface/scene_tabs/display_close_button** +.. rst-class:: classref-property + +:ref:`int` **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 + ---- .. _class_EditorSettings_property_interface/scene_tabs/maximum_width: -- :ref:`int` **interface/scene_tabs/maximum_width** +.. rst-class:: classref-property + +:ref:`int` **interface/scene_tabs/maximum_width** The maximum width of each scene tab at the top editor (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/scene_tabs/show_script_button: -- :ref:`bool` **interface/scene_tabs/show_script_button** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/scene_tabs/show_thumbnail_on_hover: -- :ref:`bool` **interface/scene_tabs/show_thumbnail_on_hover** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/accent_color: -- :ref:`Color` **interface/theme/accent_color** +.. rst-class:: classref-property + +:ref:`Color` **interface/theme/accent_color** The color to use for "highlighted" user interface elements in the editor (pressed and hovered items). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/additional_spacing: -- :ref:`float` **interface/theme/additional_spacing** +.. rst-class:: classref-property + +:ref:`float` **interface/theme/additional_spacing** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/base_color: -- :ref:`Color` **interface/theme/base_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/border_size: -- :ref:`int` **interface/theme/border_size** +.. rst-class:: classref-property + +:ref:`int` **interface/theme/border_size** The border size to use for interface elements (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/contrast: -- :ref:`float` **interface/theme/contrast** +.. rst-class:: classref-property + +:ref:`float` **interface/theme/contrast** The contrast factor to use when deriving the editor theme's base color (see :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/corner_radius: -- :ref:`int` **interface/theme/corner_radius** +.. rst-class:: classref-property + +:ref:`int` **interface/theme/corner_radius** The corner radius to use for interface elements (in pixels). ``0`` is square. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/custom_theme: -- :ref:`String` **interface/theme/custom_theme** +.. rst-class:: classref-property + +:ref:`String` **interface/theme/custom_theme** The custom theme resource to use for the editor. Must be a Godot theme resource in ``.tres`` or ``.res`` format. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/theme/draw_extra_borders: + +.. rst-class:: classref-property + +:ref:`bool` **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. + +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/icon_and_font_color: -- :ref:`int` **interface/theme/icon_and_font_color** +.. rst-class:: classref-property + +:ref:`int` **interface/theme/icon_and_font_color** The icon and font color scheme to use in the editor. @@ -1639,545 +2183,809 @@ The icon and font color scheme to use in the editor. - **Light** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following `this set of rules `__. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/icon_saturation: -- :ref:`float` **interface/theme/icon_saturation** +.. rst-class:: classref-property + +:ref:`float` **interface/theme/icon_saturation** The saturation to use for editor icons. Higher values result in more vibrant colors. \ **Note:** The default editor icon saturation was increased by 30% in Godot 4.0 and later. To get Godot 3.x's icon saturation back, set :ref:`interface/theme/icon_saturation` to ``0.77``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/preset: -- :ref:`String` **interface/theme/preset** +.. rst-class:: classref-property + +:ref:`String` **interface/theme/preset** The editor theme preset to use. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_interface/theme/relationship_line_opacity: -- :ref:`float` **interface/theme/relationship_line_opacity** +.. rst-class:: classref-property + +:ref:`float` **interface/theme/relationship_line_opacity** The opacity to use when drawing relationship lines in the editor's :ref:`Tree`-based GUIs (such as the Scene tree dock). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_network/debug/remote_host: -- :ref:`String` **network/debug/remote_host** +.. rst-class:: classref-property + +:ref:`String` **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``). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_network/debug/remote_port: -- :ref:`int` **network/debug/remote_port** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_network/http_proxy/host: -- :ref:`String` **network/http_proxy/host** +.. rst-class:: classref-property + +:ref:`String` **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`. \ **Note:** Godot currently doesn't automatically use system proxy settings, so you have to enter them manually here if needed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_network/http_proxy/port: -- :ref:`int` **network/http_proxy/port** +.. rst-class:: classref-property + +:ref:`int` **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`. \ **Note:** Godot currently doesn't automatically use system proxy settings, so you have to enter them manually here if needed. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_network/tls/editor_tls_certificates: -- :ref:`String` **network/tls/editor_tls_certificates** +.. rst-class:: classref-property + +:ref:`String` **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 `__ will be used. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_project_manager/sorting_order: -- :ref:`int` **project_manager/sorting_order** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/auto_save/save_before_running: -- :ref:`bool` **run/auto_save/save_before_running** +.. rst-class:: classref-property + +:ref:`bool` **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.) +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/output/always_clear_output_on_play: -- :ref:`bool` **run/output/always_clear_output_on_play** +.. rst-class:: classref-property + +:ref:`bool` **run/output/always_clear_output_on_play** If ``true``, the editor will clear the Output panel when running the project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/output/always_close_output_on_stop: -- :ref:`bool` **run/output/always_close_output_on_stop** +.. rst-class:: classref-property + +:ref:`bool` **run/output/always_close_output_on_stop** If ``true``, the editor will collapse the Output panel when stopping the project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/output/always_open_output_on_play: -- :ref:`bool` **run/output/always_open_output_on_play** +.. rst-class:: classref-property + +:ref:`bool` **run/output/always_open_output_on_play** If ``true``, the editor will expand the Output panel when running the project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/output/font_size: -- :ref:`int` **run/output/font_size** +.. rst-class:: classref-property + +:ref:`int` **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`). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/window_placement/rect: -- :ref:`int` **run/window_placement/rect** +.. rst-class:: classref-property + +:ref:`int` **run/window_placement/rect** The window mode to use to display the project when starting the project from the editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/window_placement/rect_custom_position: -- :ref:`Vector2` **run/window_placement/rect_custom_position** +.. rst-class:: classref-property + +:ref:`Vector2` **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` is set to **Custom Position**. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_run/window_placement/screen: -- :ref:`int` **run/window_placement/screen** +.. rst-class:: classref-property + +:ref:`int` **run/window_placement/screen** The monitor to display the project on when starting the project from the editor. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/caret/caret_blink: -- :ref:`bool` **text_editor/appearance/caret/caret_blink** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/caret/caret_blink** If ``true``, makes the caret blink according to :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/caret/caret_blink_interval: -- :ref:`float` **text_editor/appearance/caret/caret_blink_interval** +.. rst-class:: classref-property + +:ref:`float` **text_editor/appearance/caret/caret_blink_interval** The interval at which to blink the caret (in seconds). See also :ref:`text_editor/appearance/caret/caret_blink`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/caret/highlight_all_occurrences: -- :ref:`bool` **text_editor/appearance/caret/highlight_all_occurrences** +.. rst-class:: classref-property + +:ref:`bool` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/caret/highlight_current_line: -- :ref:`bool` **text_editor/appearance/caret/highlight_current_line** +.. rst-class:: classref-property + +:ref:`bool` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/caret/type: -- :ref:`int` **text_editor/appearance/caret/type** +.. rst-class:: classref-property + +:ref:`int` **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 a outline over the current character. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column: -- :ref:`int` **text_editor/appearance/guidelines/line_length_guideline_hard_column** +.. rst-class:: classref-property + +:ref:`int` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column: -- :ref:`int` **text_editor/appearance/guidelines/line_length_guideline_soft_column** +.. rst-class:: classref-property + +:ref:`int` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/guidelines/show_line_length_guidelines: -- :ref:`bool` **text_editor/appearance/guidelines/show_line_length_guidelines** +.. rst-class:: classref-property + +:ref:`bool` **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` and :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/gutters/highlight_type_safe_lines: -- :ref:`bool` **text_editor/appearance/gutters/highlight_type_safe_lines** +.. rst-class:: classref-property + +:ref:`bool` **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` instead of :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/gutters/line_numbers_zero_padded: -- :ref:`bool` **text_editor/appearance/gutters/line_numbers_zero_padded** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/gutters/line_numbers_zero_padded** If ``true``, displays line numbers with zero padding (e.g. ``007`` instead of ``7``). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/gutters/show_bookmark_gutter: -- :ref:`bool` **text_editor/appearance/gutters/show_bookmark_gutter** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/gutters/show_bookmark_gutter** If ``true``, displays icons for bookmarks in a gutter at the left. Bookmarks remain functional when this setting is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/gutters/show_info_gutter: -- :ref:`bool` **text_editor/appearance/gutters/show_info_gutter** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/gutters/show_info_gutter** If ``true``, displays a gutter at the left containing icons for methods with signal connections. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/gutters/show_line_numbers: -- :ref:`bool` **text_editor/appearance/gutters/show_line_numbers** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/gutters/show_line_numbers** If ``true``, displays line numbers in a gutter at the left. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/lines/code_folding: -- :ref:`bool` **text_editor/appearance/lines/code_folding** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/lines/word_wrap: -- :ref:`int` **text_editor/appearance/lines/word_wrap** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/minimap/minimap_width: -- :ref:`int` **text_editor/appearance/minimap/minimap_width** +.. rst-class:: classref-property + +:ref:`int` **text_editor/appearance/minimap/minimap_width** The width of the minimap in the script editor (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/minimap/show_minimap: -- :ref:`bool` **text_editor/appearance/minimap/show_minimap** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/whitespace/draw_spaces: -- :ref:`bool` **text_editor/appearance/whitespace/draw_spaces** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/whitespace/draw_spaces** If ``true``, draws space characters as centered points. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/whitespace/draw_tabs: -- :ref:`bool` **text_editor/appearance/whitespace/draw_tabs** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/whitespace/draw_tabs** If ``true``, draws tab characters as chevrons. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/appearance/whitespace/line_spacing: -- :ref:`int` **text_editor/appearance/whitespace/line_spacing** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/files/auto_reload_scripts_on_external_change: -- :ref:`bool` **text_editor/behavior/files/auto_reload_scripts_on_external_change** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/files/autosave_interval_secs: -- :ref:`int` **text_editor/behavior/files/autosave_interval_secs** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/files/convert_indent_on_save: -- :ref:`bool` **text_editor/behavior/files/convert_indent_on_save** +.. rst-class:: classref-property + +:ref:`bool` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/files/restore_scripts_on_load: -- :ref:`bool` **text_editor/behavior/files/restore_scripts_on_load** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/files/trim_trailing_whitespace_on_save: -- :ref:`bool` **text_editor/behavior/files/trim_trailing_whitespace_on_save** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/indent/auto_indent: -- :ref:`bool` **text_editor/behavior/indent/auto_indent** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/indent/auto_indent** If ``true``, automatically indents code when pressing the :kbd:`Enter` key based on blocks above the new line. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/indent/size: -- :ref:`int` **text_editor/behavior/indent/size** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/indent/type: -- :ref:`int` **text_editor/behavior/indent/type** +.. rst-class:: classref-property + +:ref:`int` **text_editor/behavior/indent/type** The indentation style to use (tabs or spaces). \ **Note:** The `GDScript style guide `__ recommends using tabs for indentation. It is advised to change this setting only if you need to work on a project that currently uses spaces for indentation. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/navigation/drag_and_drop_selection: -- :ref:`bool` **text_editor/behavior/navigation/drag_and_drop_selection** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/navigation/move_caret_on_right_click: -- :ref:`bool` **text_editor/behavior/navigation/move_caret_on_right_click** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/navigation/scroll_past_end_of_file: -- :ref:`bool` **text_editor/behavior/navigation/scroll_past_end_of_file** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/navigation/scroll_past_end_of_file** If ``true``, allows scrolling past the end of the file. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/navigation/smooth_scrolling: -- :ref:`bool` **text_editor/behavior/navigation/smooth_scrolling** +.. rst-class:: classref-property + +:ref:`bool` **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. \ **Note:** :ref:`text_editor/behavior/navigation/smooth_scrolling` currently behaves poorly in projects where :ref:`ProjectSettings.physics/common/physics_ticks_per_second` has been increased significantly from its default value (``60``). In this case, it is recommended to disable this setting. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/navigation/stay_in_script_editor_on_node_selected: -- :ref:`bool` **text_editor/behavior/navigation/stay_in_script_editor_on_node_selected** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/behavior/navigation/v_scroll_speed: -- :ref:`int` **text_editor/behavior/navigation/v_scroll_speed** +.. rst-class:: classref-property + +:ref:`int` **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. \ **Note:** You can hold down :kbd:`Alt` while using the mouse wheel to temporarily scroll 5 times faster. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/completion/add_type_hints: -- :ref:`bool` **text_editor/completion/add_type_hints** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/completion/auto_brace_complete: -- :ref:`bool` **text_editor/completion/auto_brace_complete** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/completion/auto_brace_complete** If ``true``, automatically completes braces when making use of code completion. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/completion/code_complete_delay: -- :ref:`float` **text_editor/completion/code_complete_delay** +.. rst-class:: classref-property + +:ref:`float` **text_editor/completion/code_complete_delay** The delay in seconds after which autocompletion suggestions should be displayed when the user stops typing. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/completion/complete_file_paths: -- :ref:`bool` **text_editor/completion/complete_file_paths** +.. rst-class:: classref-property + +:ref:`bool` **text_editor/completion/complete_file_paths** If ``true``, provides autocompletion suggestions for file paths in methods such as ``load()`` and ``preload()``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/completion/idle_parse_delay: -- :ref:`float` **text_editor/completion/idle_parse_delay** +.. rst-class:: classref-property + +:ref:`float` **text_editor/completion/idle_parse_delay** The delay in seconds after which the script editor should check for errors when the user stops typing. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/completion/put_callhint_tooltip_below_current_line: -- :ref:`bool` **text_editor/completion/put_callhint_tooltip_below_current_line** +.. rst-class:: classref-property + +:ref:`bool` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/completion/use_single_quotes: -- :ref:`bool` **text_editor/completion/use_single_quotes** +.. rst-class:: classref-property + +:ref:`bool` **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 `GDScript style guide `__). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/help/class_reference_examples: -- :ref:`int` **text_editor/help/class_reference_examples** +.. rst-class:: classref-property + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/help/help_font_size: -- :ref:`int` **text_editor/help/help_font_size** +.. rst-class:: classref-property + +:ref:`int` **text_editor/help/help_font_size** The font size to use for the editor help (built-in class reference). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/help/help_source_font_size: -- :ref:`int` **text_editor/help/help_source_font_size** +.. rst-class:: classref-property + +:ref:`int` **text_editor/help/help_source_font_size** The font size to use for code samples in the editor help (built-in class reference). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/help/help_title_font_size: -- :ref:`int` **text_editor/help/help_title_font_size** +.. rst-class:: classref-property + +:ref:`int` **text_editor/help/help_title_font_size** The font size to use for headings in the editor help (built-in class reference). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/help/show_help_index: -- :ref:`bool` **text_editor/help/show_help_index** +.. rst-class:: classref-property + +:ref:`bool` **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). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/script_list/show_members_overview: -- :ref:`bool` **text_editor/script_list/show_members_overview** +.. rst-class:: classref-property + +:ref:`bool` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically: -- :ref:`bool` **text_editor/script_list/sort_members_outline_alphabetically** +.. rst-class:: classref-property + +:ref:`bool` **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. \ **Note:** Only effective if :ref:`text_editor/script_list/show_members_overview` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/color_theme: -- :ref:`String` **text_editor/theme/color_theme** +.. rst-class:: classref-property + +:ref:`String` **text_editor/theme/color_theme** The syntax theme to use in the script editor. @@ -2185,310 +2993,462 @@ You can save your own syntax theme from your current settings by using **File > You can find additional syntax themes to install in the `godot-syntax-themes `__ repository. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/background_color: -- :ref:`Color` **text_editor/theme/highlighting/background_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/base_type_color: -- :ref:`Color` **text_editor/theme/highlighting/base_type_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/base_type_color** The script editor's base type color (used for types like :ref:`Vector2`, :ref:`Vector3`, :ref:`Color`, ...). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/bookmark_color: -- :ref:`Color` **text_editor/theme/highlighting/bookmark_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/bookmark_color** The script editor's bookmark icon color (displayed in the gutter). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/brace_mismatch_color: -- :ref:`Color` **text_editor/theme/highlighting/brace_mismatch_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/breakpoint_color: -- :ref:`Color` **text_editor/theme/highlighting/breakpoint_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/breakpoint_color** The script editor's breakpoint icon color (displayed in the gutter). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/caret_background_color: -- :ref:`Color` **text_editor/theme/highlighting/caret_background_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/caret_background_color** The script editor's caret background color. \ **Note:** This setting has no effect as it's currently unused. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/caret_color: -- :ref:`Color` **text_editor/theme/highlighting/caret_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/caret_color** The script editor's caret color. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/code_folding_color: -- :ref:`Color` **text_editor/theme/highlighting/code_folding_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/code_folding_color** The script editor's color for the code folding icon (displayed in the gutter). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/comment_color: -- :ref:`Color` **text_editor/theme/highlighting/comment_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/comment_color** The script editor's comment color. \ **Note:** In GDScript, unlike Python, multiline strings are not considered to be comments, and will use the string highlighting color instead. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/completion_background_color: -- :ref:`Color` **text_editor/theme/highlighting/completion_background_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/completion_background_color** The script editor's autocompletion box background color. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/completion_existing_color: -- :ref:`Color` **text_editor/theme/highlighting/completion_existing_color** +.. rst-class:: classref-property + +:ref:`Color` **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` can be seen behind. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/completion_font_color: -- :ref:`Color` **text_editor/theme/highlighting/completion_font_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/completion_font_color** The script editor's autocompletion box text color. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_color: -- :ref:`Color` **text_editor/theme/highlighting/completion_scroll_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/completion_scroll_color** The script editor's autocompletion box scroll bar color. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_hovered_color: -- :ref:`Color` **text_editor/theme/highlighting/completion_scroll_hovered_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/completion_scroll_hovered_color** The script editor's autocompletion box scroll bar color when hovered or pressed with the mouse. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/completion_selected_color: -- :ref:`Color` **text_editor/theme/highlighting/completion_selected_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/completion_selected_color** The script editor's autocompletion box background color for the currently selected line. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/control_flow_keyword_color: -- :ref:`Color` **text_editor/theme/highlighting/control_flow_keyword_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/control_flow_keyword_color** The script editor's control flow keyword color (used for keywords like ``if``, ``for``, ``return``, ...). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/current_line_color: -- :ref:`Color` **text_editor/theme/highlighting/current_line_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/engine_type_color: -- :ref:`Color` **text_editor/theme/highlighting/engine_type_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/engine_type_color** The script editor's engine type color (:ref:`Vector2`, :ref:`Vector3`, :ref:`Color`, ...). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/executing_line_color: -- :ref:`Color` **text_editor/theme/highlighting/executing_line_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/executing_line_color** The script editor's color for the debugger's executing line icon (displayed in the gutter). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/function_color: -- :ref:`Color` **text_editor/theme/highlighting/function_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/function_color** The script editor's function call color. \ **Note:** When using the GDScript syntax highlighter, this is replaced by the function definition color configured in the syntax theme for function definitions (e.g. ``func _ready():``). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/keyword_color: -- :ref:`Color` **text_editor/theme/highlighting/keyword_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/keyword_color** The script editor's non-control flow keyword color (used for keywords like ``var``, ``func``, ``extends``, ...). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/line_length_guideline_color: -- :ref:`Color` **text_editor/theme/highlighting/line_length_guideline_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/line_number_color: -- :ref:`Color` **text_editor/theme/highlighting/line_number_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/mark_color: -- :ref:`Color` **text_editor/theme/highlighting/mark_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/member_variable_color: -- :ref:`Color` **text_editor/theme/highlighting/member_variable_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/member_variable_color** The script editor's color for member variables on objects (e.g. ``self.some_property``). \ **Note:** This color is not used for local variable declaration and access. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/number_color: -- :ref:`Color` **text_editor/theme/highlighting/number_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/number_color** The script editor's color for numbers (integer and floating-point). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/safe_line_number_color: -- :ref:`Color` **text_editor/theme/highlighting/safe_line_number_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. \ **Note:** Only displayed if :ref:`text_editor/appearance/gutters/highlight_type_safe_lines` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/search_result_border_color: -- :ref:`Color` **text_editor/theme/highlighting/search_result_border_color** +.. rst-class:: classref-property + +:ref:`Color` **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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/search_result_color: -- :ref:`Color` **text_editor/theme/highlighting/search_result_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/search_result_color** The script editor's background color for search results. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/selection_color: -- :ref:`Color` **text_editor/theme/highlighting/selection_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/selection_color** The script editor's background color for the currently selected text. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/string_color: -- :ref:`Color` **text_editor/theme/highlighting/string_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/string_color** The script editor's color for strings (single-line and multi-line). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/symbol_color: -- :ref:`Color` **text_editor/theme/highlighting/symbol_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/symbol_color** The script editor's color for operators (``( ) [ ] { } + - * /``, ...). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/text_color: -- :ref:`Color` **text_editor/theme/highlighting/text_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/text_color** The script editor's color for text not highlighted by any syntax highlighting rule. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/text_selected_color: -- :ref:`Color` **text_editor/theme/highlighting/text_selected_color** +.. rst-class:: classref-property + +:ref:`Color` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/user_type_color: -- :ref:`Color` **text_editor/theme/highlighting/user_type_color** +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/user_type_color** The script editor's color for user-defined types (using ``class_name``). +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color: -- :ref:`Color` **text_editor/theme/highlighting/word_highlighted_color** +.. rst-class:: classref-property + +:ref:`Color` **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` is ``true``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_EditorSettings_method_add_property_info: -- void **add_property_info** **(** :ref:`Dictionary` info **)** +.. rst-class:: classref-method + +void **add_property_info** **(** :ref:`Dictionary` info **)** Adds a custom property info to a property. The dictionary must contain: @@ -2534,123 +3494,183 @@ Adds a custom property info to a property. The dictionary must contain: +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_check_changed_settings_in_group: -- :ref:`bool` **check_changed_settings_in_group** **(** :ref:`String` setting_prefix **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **check_changed_settings_in_group** **(** :ref:`String` setting_prefix **)** |const| Checks if any settings with the prefix ``setting_prefix`` exist in the set of changed settings. See also :ref:`get_changed_settings`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_erase: -- void **erase** **(** :ref:`String` property **)** +.. rst-class:: classref-method + +void **erase** **(** :ref:`String` property **)** Erases the setting whose name is specified by ``property``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_get_changed_settings: -- :ref:`PackedStringArray` **get_changed_settings** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_changed_settings** **(** **)** |const| 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` +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_get_favorites: -- :ref:`PackedStringArray` **get_favorites** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_favorites** **(** **)** |const| Returns the list of favorite files and directories for this project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_get_project_metadata: -- :ref:`Variant` **get_project_metadata** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_project_metadata** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_get_recent_dirs: -- :ref:`PackedStringArray` **get_recent_dirs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_recent_dirs** **(** **)** |const| Returns the list of recently visited folders in the file dialog for this project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_get_setting: -- :ref:`Variant` **get_setting** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_setting** **(** :ref:`String` name **)** |const| Returns the value of the setting specified by ``name``. This is equivalent to using :ref:`Object.get` on the EditorSettings instance. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_has_setting: -- :ref:`bool` **has_setting** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_setting** **(** :ref:`String` name **)** |const| Returns ``true`` if the setting specified by ``name`` exists, ``false`` otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_mark_setting_changed: -- void **mark_setting_changed** **(** :ref:`String` setting **)** +.. rst-class:: classref-method + +void **mark_setting_changed** **(** :ref:`String` setting **)** Marks the passed editor setting as being changed, see :ref:`get_changed_settings`. Only settings which exist (see :ref:`has_setting`) will be accepted. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_set_builtin_action_override: -- void **set_builtin_action_override** **(** :ref:`String` name, :ref:`InputEvent[]` actions_list **)** +.. rst-class:: classref-method + +void **set_builtin_action_override** **(** :ref:`String` name, :ref:`InputEvent[]` actions_list **)** Overrides the built-in editor action ``name`` with the input actions defined in ``actions_list``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_set_favorites: -- void **set_favorites** **(** :ref:`PackedStringArray` dirs **)** +.. rst-class:: classref-method + +void **set_favorites** **(** :ref:`PackedStringArray` dirs **)** Sets the list of favorite files and directories for this project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_set_initial_value: -- void **set_initial_value** **(** :ref:`StringName` name, :ref:`Variant` value, :ref:`bool` update_current **)** +.. rst-class:: classref-method + +void **set_initial_value** **(** :ref:`StringName` name, :ref:`Variant` value, :ref:`bool` update_current **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_set_project_metadata: -- void **set_project_metadata** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` data **)** +.. rst-class:: classref-method + +void **set_project_metadata** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` data **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_set_recent_dirs: -- void **set_recent_dirs** **(** :ref:`PackedStringArray` dirs **)** +.. rst-class:: classref-method + +void **set_recent_dirs** **(** :ref:`PackedStringArray` dirs **)** Sets the list of recently visited folders in the file dialog for this project. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSettings_method_set_setting: -- void **set_setting** **(** :ref:`String` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_setting** **(** :ref:`String` name, :ref:`Variant` value **)** Sets the ``value`` of the setting specified by ``name``. This is equivalent to using :ref:`Object.set` on the EditorSettings instance. diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 9205e7dc3..1e56d39b3 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -14,110 +14,126 @@ EditorSpinSlider Godot editor's control for editing numeric values. +.. rst-class:: classref-introduction-group + Description ----------- This :ref:`Control` node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with :ref:`EditorInspectorPlugin` to recreate the same behavior. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`flat` | ``false`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hide_slider` | ``false`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`label` | ``""`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`read_only` | ``false`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`suffix` | ``""`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`flat` | ``false`` | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`hide_slider` | ``false`` | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`label` | ``""`` | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`read_only` | ``false`` | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`suffix` | ``""`` | + +------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_EditorSpinSlider_property_flat: -- :ref:`bool` **flat** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flat(value) | -+-----------+-----------------+ -| *Getter* | is_flat() | -+-----------+-----------------+ +:ref:`bool` **flat** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flat** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flat** **(** **)** If ``true``, the slider will not draw background. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSpinSlider_property_hide_slider: -- :ref:`bool` **hide_slider** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_hide_slider(value) | -+-----------+------------------------+ -| *Getter* | is_hiding_slider() | -+-----------+------------------------+ +:ref:`bool` **hide_slider** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_hide_slider** **(** :ref:`bool` value **)** +- :ref:`bool` **is_hiding_slider** **(** **)** If ``true``, the slider is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSpinSlider_property_label: -- :ref:`String` **label** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``""`` | -+-----------+------------------+ -| *Setter* | set_label(value) | -+-----------+------------------+ -| *Getter* | get_label() | -+-----------+------------------+ +:ref:`String` **label** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_label** **(** :ref:`String` value **)** +- :ref:`String` **get_label** **(** **)** The text that displays to the left of the value. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSpinSlider_property_read_only: -- :ref:`bool` **read_only** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_read_only(value) | -+-----------+----------------------+ -| *Getter* | is_read_only() | -+-----------+----------------------+ +:ref:`bool` **read_only** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_read_only** **(** :ref:`bool` value **)** +- :ref:`bool` **is_read_only** **(** **)** If ``true``, the slider can't be interacted with. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSpinSlider_property_suffix: -- :ref:`String` **suffix** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``""`` | -+-----------+-------------------+ -| *Setter* | set_suffix(value) | -+-----------+-------------------+ -| *Getter* | get_suffix() | -+-----------+-------------------+ +:ref:`String` **suffix** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_suffix** **(** :ref:`String` value **)** +- :ref:`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. diff --git a/classes/class_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index 3021513ac..17b9f482c 100644 --- a/classes/class_editorsyntaxhighlighter.rst +++ b/classes/class_editorsyntaxhighlighter.rst @@ -14,6 +14,8 @@ EditorSyntaxHighlighter Base Syntax highlighter resource for the :ref:`ScriptEditor`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,29 +23,46 @@ Base syntax highlighter resource all editor syntax highlighters extend from, it Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter` +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_supported_languages` **(** **)** |virtual| |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_languages` **(** **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorSyntaxHighlighter_method__get_name: -- :ref:`String` **_get_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_name** **(** **)** |virtual| |const| Virtual method which can be overridden to return the syntax highlighter name. +.. rst-class:: classref-item-separator + ---- .. _class_EditorSyntaxHighlighter_method__get_supported_languages: -- :ref:`PackedStringArray` **_get_supported_languages** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_supported_languages** **(** **)** |virtual| |const| Virtual method which can be overridden to return the supported language names. diff --git a/classes/class_editortranslationparserplugin.rst b/classes/class_editortranslationparserplugin.rst index 9002104d6..d1dae643e 100644 --- a/classes/class_editortranslationparserplugin.rst +++ b/classes/class_editortranslationparserplugin.rst @@ -14,10 +14,12 @@ EditorTranslationParserPlugin Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.). +.. rst-class:: classref-introduction-group + 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` 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` method in script. Add the extracted strings to argument ``msgids`` or ``msgids_context_plural`` if context or plural is used. @@ -134,31 +136,48 @@ For example: -To use ``EditorTranslationParserPlugin``, register it using the :ref:`EditorPlugin.add_translation_parser_plugin` method first. +To use **EditorTranslationParserPlugin**, register it using the :ref:`EditorPlugin.add_translation_parser_plugin` method first. + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_parse_file` **(** :ref:`String` path, :ref:`String[]` msgids, :ref:`Array[]` msgids_context_plural **)** |virtual| | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_file` **(** :ref:`String` path, :ref:`String[]` msgids, :ref:`Array[]` msgids_context_plural **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorTranslationParserPlugin_method__get_recognized_extensions: -- :ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| Gets the list of file extensions to associate with this parser, e.g. ``["csv"]``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorTranslationParserPlugin_method__parse_file: -- void **_parse_file** **(** :ref:`String` path, :ref:`String[]` msgids, :ref:`Array[]` msgids_context_plural **)** |virtual| +.. rst-class:: classref-method + +void **_parse_file** **(** :ref:`String` path, :ref:`String[]` msgids, :ref:`Array[]` msgids_context_plural **)** |virtual| Override this method to define a custom parsing logic to extract the translatable strings. diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst index d6d2e4bfb..1f8544361 100644 --- a/classes/class_editorundoredomanager.rst +++ b/classes/class_editorundoredomanager.rst @@ -14,10 +14,12 @@ EditorUndoRedoManager Manages undo history of scenes opened in the editor. +.. rst-class:: classref-introduction-group + Description ----------- -``EditorUndoRedoManager`` is a manager for :ref:`UndoRedo` objects associated with edited scenes. Each scene has its own undo history and ``EditorUndoRedoManager`` ensures that each action performed in the editor gets associated with a proper scene. For actions not related to scenes (:ref:`ProjectSettings` edits, external resources, etc.), a separate global history is used. +**EditorUndoRedoManager** is a manager for :ref:`UndoRedo` objects associated with edited scenes. Each scene has its own undo history and **EditorUndoRedoManager** ensures that each action performed in the editor gets associated with a proper scene. For actions not related to scenes (:ref:`ProjectSettings` edits, external resources, etc.), a separate global history is used. The usage is mostly the same as :ref:`UndoRedo`. You create and commit actions and the manager automatically decides under-the-hood what scenes it belongs to. The scene is deduced based on the first operation in an action, using the object from the operation. The rules are as follows: @@ -29,135 +31,204 @@ The usage is mostly the same as :ref:`UndoRedo`. You create and This guessing can sometimes yield false results, so you can provide a custom context object when creating an action. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_method` **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_method` **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`commit_action` **(** :ref:`bool` execute=true **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_action` **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0, :ref:`Object` custom_context=null **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`UndoRedo` | :ref:`get_history_undo_redo` **(** :ref:`int` id **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_object_history_id` **(** :ref:`Object` object **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_committing_action` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_do_method` **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_undo_method` **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`commit_action` **(** :ref:`bool` execute=true **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_action` **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0, :ref:`Object` custom_context=null **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UndoRedo` | :ref:`get_history_undo_redo` **(** :ref:`int` id **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_object_history_id` **(** :ref:`Object` object **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_committing_action` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorUndoRedoManager_signal_history_changed: -- **history_changed** **(** **)** +.. rst-class:: classref-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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_signal_version_changed: -- **version_changed** **(** **)** +.. rst-class:: classref-signal + +**version_changed** **(** **)** Emitted when the version of any history has changed as a result of undo or redo call. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_EditorUndoRedoManager_SpecialHistory: -.. _class_EditorUndoRedoManager_constant_GLOBAL_HISTORY: - -.. _class_EditorUndoRedoManager_constant_INVALID_HISTORY: +.. rst-class:: classref-enumeration enum **SpecialHistory**: -- **GLOBAL_HISTORY** = **0** --- Global history not associated with any scene, but with external resources etc. +.. _class_EditorUndoRedoManager_constant_GLOBAL_HISTORY: -- **INVALID_HISTORY** = **-99** --- Invalid "null" history. It's a special value, not associated with any object. +.. rst-class:: classref-enumeration-constant + +:ref:`SpecialHistory` **GLOBAL_HISTORY** = ``0`` + +Global history not associated with any scene, but with external resources etc. + +.. _class_EditorUndoRedoManager_constant_INVALID_HISTORY: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpecialHistory` **INVALID_HISTORY** = ``-99`` + +Invalid "null" history. It's a special value, not associated with any object. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorUndoRedoManager_method_add_do_method: -- void **add_do_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method + +void **add_do_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| Register a method that will be called when the action is committed (i.e. the "do" action). If this is the first operation, the ``object`` will be used to deduce target undo history. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_add_do_property: -- void **add_do_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **add_do_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** Register a property value change for "do". If this is the first operation, the ``object`` will be used to deduce target undo history. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_add_do_reference: -- void **add_do_reference** **(** :ref:`Object` object **)** +.. rst-class:: classref-method + +void **add_do_reference** **(** :ref:`Object` object **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_add_undo_method: -- void **add_undo_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method + +void **add_undo_method** **(** :ref:`Object` object, :ref:`StringName` method, ... **)** |vararg| Register a method that will be called when the action is undone (i.e. the "undo" action). If this is the first operation, the ``object`` will be used to deduce target undo history. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_add_undo_property: -- void **add_undo_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **add_undo_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** Register a property value change for "undo". If this is the first operation, the ``object`` will be used to deduce target undo history. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_add_undo_reference: -- void **add_undo_reference** **(** :ref:`Object` object **)** +.. rst-class:: classref-method + +void **add_undo_reference** **(** :ref:`Object` object **)** 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!). +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_commit_action: -- void **commit_action** **(** :ref:`bool` execute=true **)** +.. rst-class:: classref-method + +void **commit_action** **(** :ref:`bool` execute=true **)** Commit the action. If ``execute`` is true (default), all "do" methods/properties are called/set when this function is called. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_create_action: -- void **create_action** **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0, :ref:`Object` custom_context=null **)** +.. rst-class:: classref-method + +void **create_action** **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0, :ref:`Object` custom_context=null **)** Create a new action. After this is called, do all your calls to :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, and :ref:`add_undo_property`, then commit the action with :ref:`commit_action`. @@ -165,11 +236,15 @@ The way actions are merged is dictated by the ``merge_mode`` argument. See :ref: If ``custom_context`` object is provided, it will be used for deducing target history (instead of using the first operation). +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_get_history_undo_redo: -- :ref:`UndoRedo` **get_history_undo_redo** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`UndoRedo` **get_history_undo_redo** **(** :ref:`int` id **)** |const| Returns the :ref:`UndoRedo` object associated with the given history ``id``. @@ -177,21 +252,29 @@ Returns the :ref:`UndoRedo` object associated with the given his Best used with :ref:`get_object_history_id`. This method is only provided in case you need some more advanced methods of :ref:`UndoRedo` (but keep in mind that directly operating on the :ref:`UndoRedo` object might affect editor's stability). +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_get_object_history_id: -- :ref:`int` **get_object_history_id** **(** :ref:`Object` object **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_object_history_id** **(** :ref:`Object` object **)** |const| Returns the history ID deduced from the given ``object``. It can be used with :ref:`get_history_undo_redo`. +.. rst-class:: classref-item-separator + ---- .. _class_EditorUndoRedoManager_method_is_committing_action: -- :ref:`bool` **is_committing_action** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``EditorUndoRedoManager`` is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). +:ref:`bool` **is_committing_action** **(** **)** |const| + +Returns ``true`` if the **EditorUndoRedoManager** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). .. |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.)` diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index 49395ce91..53ad286bf 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -14,373 +14,556 @@ EditorVCSInterface Version Control System (VCS) interface, which reads and writes to the local VCS in use. +.. rst-class:: classref-introduction-group + 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. +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-reftable-group Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_checkout_branch` **(** :ref:`String` branch_name **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_commit` **(** :ref:`String` msg **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_create_branch` **(** :ref:`String` branch_name **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_create_remote` **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_discard_file` **(** :ref:`String` file_path **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_fetch` **(** :ref:`String` remote **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_branch_list` **(** **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_current_branch_name` **(** **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_diff` **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_line_diff` **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_modified_files_data` **(** **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_previous_commits` **(** :ref:`int` max_commits **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_remotes` **(** **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_vcs_name` **(** **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_initialize` **(** :ref:`String` project_path **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_pull` **(** :ref:`String` remote **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_push` **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_remove_branch` **(** :ref:`String` branch_name **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_remove_remote` **(** :ref:`String` remote_name **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_credentials` **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shut_down` **(** **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_stage_file` **(** :ref:`String` file_path **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_unstage_file` **(** :ref:`String` file_path **)** |virtual| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`add_diff_hunks_into_diff_file` **(** :ref:`Dictionary` diff_file, :ref:`Dictionary[]` diff_hunks **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`add_line_diffs_into_diff_hunk` **(** :ref:`Dictionary` diff_hunk, :ref:`Dictionary[]` line_diffs **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`create_commit` **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`create_diff_file` **(** :ref:`String` new_file, :ref:`String` old_file **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`create_diff_hunk` **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`create_diff_line` **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`create_status_file` **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_error` **(** :ref:`String` msg **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_checkout_branch` **(** :ref:`String` branch_name **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit` **(** :ref:`String` msg **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_create_branch` **(** :ref:`String` branch_name **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_create_remote` **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_discard_file` **(** :ref:`String` file_path **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_fetch` **(** :ref:`String` remote **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_branch_list` **(** **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_current_branch_name` **(** **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_diff` **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_line_diff` **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_modified_files_data` **(** **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_previous_commits` **(** :ref:`int` max_commits **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_remotes` **(** **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_vcs_name` **(** **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_initialize` **(** :ref:`String` project_path **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pull` **(** :ref:`String` remote **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_push` **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_remove_branch` **(** :ref:`String` branch_name **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_remove_remote` **(** :ref:`String` remote_name **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_credentials` **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shut_down` **(** **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_stage_file` **(** :ref:`String` file_path **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_unstage_file` **(** :ref:`String` file_path **)** |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`add_diff_hunks_into_diff_file` **(** :ref:`Dictionary` diff_file, :ref:`Dictionary[]` diff_hunks **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`add_line_diffs_into_diff_hunk` **(** :ref:`Dictionary` diff_hunk, :ref:`Dictionary[]` line_diffs **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_commit` **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_diff_file` **(** :ref:`String` new_file, :ref:`String` old_file **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_diff_hunk` **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_diff_line` **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_status_file` **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_error` **(** :ref:`String` msg **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_EditorVCSInterface_ChangeType: -.. _class_EditorVCSInterface_constant_CHANGE_TYPE_NEW: - -.. _class_EditorVCSInterface_constant_CHANGE_TYPE_MODIFIED: - -.. _class_EditorVCSInterface_constant_CHANGE_TYPE_RENAMED: - -.. _class_EditorVCSInterface_constant_CHANGE_TYPE_DELETED: - -.. _class_EditorVCSInterface_constant_CHANGE_TYPE_TYPECHANGE: - -.. _class_EditorVCSInterface_constant_CHANGE_TYPE_UNMERGED: +.. rst-class:: classref-enumeration enum **ChangeType**: -- **CHANGE_TYPE_NEW** = **0** --- A new file has been added. +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_NEW: -- **CHANGE_TYPE_MODIFIED** = **1** --- An earlier added file has been modified. +.. rst-class:: classref-enumeration-constant -- **CHANGE_TYPE_RENAMED** = **2** --- An earlier added file has been renamed. +:ref:`ChangeType` **CHANGE_TYPE_NEW** = ``0`` -- **CHANGE_TYPE_DELETED** = **3** --- An earlier added file has been deleted. +A new file has been added. -- **CHANGE_TYPE_TYPECHANGE** = **4** --- An earlier added file has been typechanged. +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_MODIFIED: -- **CHANGE_TYPE_UNMERGED** = **5** --- A file is left unmerged. +.. rst-class:: classref-enumeration-constant + +:ref:`ChangeType` **CHANGE_TYPE_MODIFIED** = ``1`` + +An earlier added file has been modified. + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_RENAMED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ChangeType` **CHANGE_TYPE_RENAMED** = ``2`` + +An earlier added file has been renamed. + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_DELETED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ChangeType` **CHANGE_TYPE_DELETED** = ``3`` + +An earlier added file has been deleted. + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_TYPECHANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ChangeType` **CHANGE_TYPE_TYPECHANGE** = ``4`` + +An earlier added file has been typechanged. + +.. _class_EditorVCSInterface_constant_CHANGE_TYPE_UNMERGED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ChangeType` **CHANGE_TYPE_UNMERGED** = ``5`` + +A file is left unmerged. + +.. rst-class:: classref-item-separator ---- .. _enum_EditorVCSInterface_TreeArea: -.. _class_EditorVCSInterface_constant_TREE_AREA_COMMIT: - -.. _class_EditorVCSInterface_constant_TREE_AREA_STAGED: - -.. _class_EditorVCSInterface_constant_TREE_AREA_UNSTAGED: +.. rst-class:: classref-enumeration enum **TreeArea**: -- **TREE_AREA_COMMIT** = **0** --- A commit is encountered from the commit area. +.. _class_EditorVCSInterface_constant_TREE_AREA_COMMIT: -- **TREE_AREA_STAGED** = **1** --- A file is encountered from the staged area. +.. rst-class:: classref-enumeration-constant -- **TREE_AREA_UNSTAGED** = **2** --- A file is encountered from the unstaged area. +:ref:`TreeArea` **TREE_AREA_COMMIT** = ``0`` + +A commit is encountered from the commit area. + +.. _class_EditorVCSInterface_constant_TREE_AREA_STAGED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TreeArea` **TREE_AREA_STAGED** = ``1`` + +A file is encountered from the staged area. + +.. _class_EditorVCSInterface_constant_TREE_AREA_UNSTAGED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TreeArea` **TREE_AREA_UNSTAGED** = ``2`` + +A file is encountered from the unstaged area. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorVCSInterface_method__checkout_branch: -- :ref:`bool` **_checkout_branch** **(** :ref:`String` branch_name **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_checkout_branch** **(** :ref:`String` branch_name **)** |virtual| Checks out a ``branch_name`` in the VCS. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__commit: -- void **_commit** **(** :ref:`String` msg **)** |virtual| +.. rst-class:: classref-method + +void **_commit** **(** :ref:`String` msg **)** |virtual| Commits the currently staged changes and applies the commit ``msg`` to the resulting commit. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__create_branch: -- void **_create_branch** **(** :ref:`String` branch_name **)** |virtual| +.. rst-class:: classref-method + +void **_create_branch** **(** :ref:`String` branch_name **)** |virtual| Creates a new branch named ``branch_name`` in the VCS. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__create_remote: -- void **_create_remote** **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| +.. rst-class:: classref-method + +void **_create_remote** **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__discard_file: -- void **_discard_file** **(** :ref:`String` file_path **)** |virtual| +.. rst-class:: classref-method + +void **_discard_file** **(** :ref:`String` file_path **)** |virtual| Discards the changes made in a file present at ``file_path``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__fetch: -- void **_fetch** **(** :ref:`String` remote **)** |virtual| +.. rst-class:: classref-method + +void **_fetch** **(** :ref:`String` remote **)** |virtual| Fetches new changes from the remote, but doesn't write changes to the current working directory. Equivalent to ``git fetch``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_branch_list: -- :ref:`Dictionary[]` **_get_branch_list** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_branch_list** **(** **)** |virtual| Gets an instance of an :ref:`Array` of :ref:`String`\ s containing available branch names in the VCS. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_current_branch_name: -- :ref:`String` **_get_current_branch_name** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`String` **_get_current_branch_name** **(** **)** |virtual| Gets the current branch name defined in the VCS. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_diff: -- :ref:`Dictionary[]` **_get_diff** **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_diff** **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| Returns an array of :ref:`Dictionary` items (see :ref:`create_diff_file`, :ref:`create_diff_hunk`, :ref:`create_diff_line`, :ref:`add_line_diffs_into_diff_hunk` and :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_line_diff: -- :ref:`Dictionary[]` **_get_line_diff** **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_line_diff** **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_diff_hunk`), each containing a line diff between a file at ``file_path`` and the ``text`` which is passed in. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_modified_files_data: -- :ref:`Dictionary[]` **_get_modified_files_data** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_modified_files_data** **(** **)** |virtual| Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_status_file`), each containing the status data of every modified file in the project folder. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_previous_commits: -- :ref:`Dictionary[]` **_get_previous_commits** **(** :ref:`int` max_commits **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_previous_commits** **(** :ref:`int` max_commits **)** |virtual| Returns an :ref:`Array` of :ref:`Dictionary` items (see :ref:`create_commit`), each containing the data for a past commit. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_remotes: -- :ref:`Dictionary[]` **_get_remotes** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_remotes** **(** **)** |virtual| Returns an :ref:`Array` of :ref:`String`\ s, each containing the name of a remote configured in the VCS. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__get_vcs_name: -- :ref:`String` **_get_vcs_name** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`String` **_get_vcs_name** **(** **)** |virtual| Returns the name of the underlying VCS provider. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__initialize: -- :ref:`bool` **_initialize** **(** :ref:`String` project_path **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_initialize** **(** :ref:`String` project_path **)** |virtual| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__pull: -- void **_pull** **(** :ref:`String` remote **)** |virtual| +.. rst-class:: classref-method + +void **_pull** **(** :ref:`String` remote **)** |virtual| Pulls changes from the remote. This can give rise to merge conflicts. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__push: -- void **_push** **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| +.. rst-class:: classref-method + +void **_push** **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| Pushes changes to the ``remote``. Optionally, if ``force`` is set to true, a force push will override the change history already present on the remote. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__remove_branch: -- void **_remove_branch** **(** :ref:`String` branch_name **)** |virtual| +.. rst-class:: classref-method + +void **_remove_branch** **(** :ref:`String` branch_name **)** |virtual| Remove a branch from the local VCS. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__remove_remote: -- void **_remove_remote** **(** :ref:`String` remote_name **)** |virtual| +.. rst-class:: classref-method + +void **_remove_remote** **(** :ref:`String` remote_name **)** |virtual| Remove a remote from the local VCS. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__set_credentials: -- void **_set_credentials** **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| +.. rst-class:: classref-method + +void **_set_credentials** **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__shut_down: -- :ref:`bool` **_shut_down** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shut_down** **(** **)** |virtual| Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__stage_file: -- void **_stage_file** **(** :ref:`String` file_path **)** |virtual| +.. rst-class:: classref-method + +void **_stage_file** **(** :ref:`String` file_path **)** |virtual| Stages the file present at ``file_path`` to the staged area. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method__unstage_file: -- void **_unstage_file** **(** :ref:`String` file_path **)** |virtual| +.. rst-class:: classref-method + +void **_unstage_file** **(** :ref:`String` file_path **)** |virtual| Unstages the file present at ``file_path`` from the staged area to the unstaged area. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_add_diff_hunks_into_diff_file: -- :ref:`Dictionary` **add_diff_hunks_into_diff_file** **(** :ref:`Dictionary` diff_file, :ref:`Dictionary[]` diff_hunks **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **add_diff_hunks_into_diff_file** **(** :ref:`Dictionary` diff_file, :ref:`Dictionary[]` diff_hunks **)** Helper function to add an array of ``diff_hunks`` into a ``diff_file``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk: -- :ref:`Dictionary` **add_line_diffs_into_diff_hunk** **(** :ref:`Dictionary` diff_hunk, :ref:`Dictionary[]` line_diffs **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **add_line_diffs_into_diff_hunk** **(** :ref:`Dictionary` diff_hunk, :ref:`Dictionary[]` line_diffs **)** Helper function to add an array of ``line_diffs`` into a ``diff_hunk``. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_create_commit: -- :ref:`Dictionary` **create_commit** **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **create_commit** **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** Helper function to create a commit :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_create_diff_file: -- :ref:`Dictionary` **create_diff_file** **(** :ref:`String` new_file, :ref:`String` old_file **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **create_diff_file** **(** :ref:`String` new_file, :ref:`String` old_file **)** Helper function to create a ``Dictionary`` for storing old and new diff file paths. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_create_diff_hunk: -- :ref:`Dictionary` **create_diff_hunk** **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **create_diff_hunk** **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** Helper function to create a ``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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_create_diff_line: -- :ref:`Dictionary` **create_diff_line** **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **create_diff_line** **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** Helper function to create a ``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. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_create_status_file: -- :ref:`Dictionary` **create_status_file** **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **create_status_file** **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** Helper function to create a ``Dictionary`` used by editor to read the status of a file. +.. rst-class:: classref-item-separator + ---- .. _class_EditorVCSInterface_method_popup_error: -- void **popup_error** **(** :ref:`String` msg **)** +.. rst-class:: classref-method + +void **popup_error** **(** :ref:`String` msg **)** 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. diff --git a/classes/class_encodedobjectasid.rst b/classes/class_encodedobjectasid.rst index e069f2d26..b9299ec07 100644 --- a/classes/class_encodedobjectasid.rst +++ b/classes/class_encodedobjectasid.rst @@ -14,6 +14,8 @@ EncodedObjectAsID Holds a reference to an :ref:`Object`'s instance ID. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,29 +23,39 @@ Utility class which holds a reference to the internal identifier of an :ref:`Obj This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+--------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`object_id` | ``0`` | -+-----------------------+--------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`object_id` | ``0`` | + +-----------------------+--------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_EncodedObjectAsID_property_object_id: -- :ref:`int` **object_id** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_object_id(value) | -+-----------+----------------------+ -| *Getter* | get_object_id() | -+-----------+----------------------+ +:ref:`int` **object_id** = ``0`` -The :ref:`Object` identifier stored in this ``EncodedObjectAsID`` instance. The object instance can be retrieved with :ref:`@GlobalScope.instance_from_id`. +.. rst-class:: classref-property-setget + +- void **set_object_id** **(** :ref:`int` value **)** +- :ref:`int` **get_object_id** **(** **)** + +The :ref:`Object` identifier stored in this **EncodedObjectAsID** instance. The object instance can be retrieved with :ref:`@GlobalScope.instance_from_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.)` diff --git a/classes/class_enetconnection.rst b/classes/class_enetconnection.rst index 2fc4c0911..2b9c0b6e8 100644 --- a/classes/class_enetconnection.rst +++ b/classes/class_enetconnection.rst @@ -14,160 +14,261 @@ ENetConnection A wrapper class for an `ENetHost `__. +.. rst-class:: classref-introduction-group + Description ----------- ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol). +.. rst-class:: classref-introduction-group + Tutorials --------- - `API documentation on the ENet website `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bandwidth_limit` **(** :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`broadcast` **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`channel_limit` **(** :ref:`int` limit **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compress` **(** :ref:`CompressionMode` mode **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ENetPacketPeer` | :ref:`connect_to_host` **(** :ref:`String` address, :ref:`int` port, :ref:`int` channels=0, :ref:`int` data=0 **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_host` **(** :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_host_bound` **(** :ref:`String` bind_address, :ref:`int` bind_port, :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`destroy` **(** **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`dtls_client_setup` **(** :ref:`X509Certificate` certificate, :ref:`String` hostname, :ref:`bool` verify=true **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`dtls_server_setup` **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`flush` **(** **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_local_port` **(** **)** |const| | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_channels` **(** **)** |const| | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ENetPacketPeer[]` | :ref:`get_peers` **(** **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pop_statistic` **(** :ref:`HostStatistic` statistic **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`refuse_new_connections` **(** :ref:`bool` refuse **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`service` **(** :ref:`int` timeout=0 **)** | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bandwidth_limit` **(** :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`broadcast` **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`channel_limit` **(** :ref:`int` limit **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`compress` **(** :ref:`CompressionMode` mode **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ENetPacketPeer` | :ref:`connect_to_host` **(** :ref:`String` address, :ref:`int` port, :ref:`int` channels=0, :ref:`int` data=0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_host` **(** :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_host_bound` **(** :ref:`String` bind_address, :ref:`int` bind_port, :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`destroy` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`dtls_client_setup` **(** :ref:`X509Certificate` certificate, :ref:`String` hostname, :ref:`bool` verify=true **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`dtls_server_setup` **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flush` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_local_port` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_max_channels` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ENetPacketPeer[]` | :ref:`get_peers` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`pop_statistic` **(** :ref:`HostStatistic` statistic **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`refuse_new_connections` **(** :ref:`bool` refuse **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`service` **(** :ref:`int` timeout=0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ENetConnection_CompressionMode: -.. _class_ENetConnection_constant_COMPRESS_NONE: - -.. _class_ENetConnection_constant_COMPRESS_RANGE_CODER: - -.. _class_ENetConnection_constant_COMPRESS_FASTLZ: - -.. _class_ENetConnection_constant_COMPRESS_ZLIB: - -.. _class_ENetConnection_constant_COMPRESS_ZSTD: +.. rst-class:: classref-enumeration enum **CompressionMode**: -- **COMPRESS_NONE** = **0** --- No compression. This uses the most bandwidth, but has the upside of requiring the fewest CPU resources. This option may also be used to make network debugging using tools like Wireshark easier. +.. _class_ENetConnection_constant_COMPRESS_NONE: -- **COMPRESS_RANGE_CODER** = **1** --- ENet's built-in range encoding. Works well on small packets, but is not the most efficient algorithm on packets larger than 4 KB. +.. rst-class:: classref-enumeration-constant -- **COMPRESS_FASTLZ** = **2** --- `FastLZ `__ compression. This option uses less CPU resources compared to :ref:`COMPRESS_ZLIB`, at the expense of using more bandwidth. +:ref:`CompressionMode` **COMPRESS_NONE** = ``0`` -- **COMPRESS_ZLIB** = **3** --- `Zlib `__ compression. This option uses less bandwidth compared to :ref:`COMPRESS_FASTLZ`, at the expense of using more CPU resources. +No compression. This uses the most bandwidth, but has the upside of requiring the fewest CPU resources. This option may also be used to make network debugging using tools like Wireshark easier. -- **COMPRESS_ZSTD** = **4** --- `Zstandard `__ compression. Note that this algorithm is not very efficient on packets smaller than 4 KB. Therefore, it's recommended to use other compression algorithms in most cases. +.. _class_ENetConnection_constant_COMPRESS_RANGE_CODER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESS_RANGE_CODER** = ``1`` + +ENet's built-in range encoding. Works well on small packets, but is not the most efficient algorithm on packets larger than 4 KB. + +.. _class_ENetConnection_constant_COMPRESS_FASTLZ: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESS_FASTLZ** = ``2`` + +`FastLZ `__ compression. This option uses less CPU resources compared to :ref:`COMPRESS_ZLIB`, at the expense of using more bandwidth. + +.. _class_ENetConnection_constant_COMPRESS_ZLIB: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESS_ZLIB** = ``3`` + +`Zlib `__ compression. This option uses less bandwidth compared to :ref:`COMPRESS_FASTLZ`, at the expense of using more CPU resources. + +.. _class_ENetConnection_constant_COMPRESS_ZSTD: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESS_ZSTD** = ``4`` + +`Zstandard `__ compression. Note that this algorithm is not very efficient on packets smaller than 4 KB. Therefore, it's recommended to use other compression algorithms in most cases. + +.. rst-class:: classref-item-separator ---- .. _enum_ENetConnection_EventType: -.. _class_ENetConnection_constant_EVENT_ERROR: - -.. _class_ENetConnection_constant_EVENT_NONE: - -.. _class_ENetConnection_constant_EVENT_CONNECT: - -.. _class_ENetConnection_constant_EVENT_DISCONNECT: - -.. _class_ENetConnection_constant_EVENT_RECEIVE: +.. rst-class:: classref-enumeration enum **EventType**: -- **EVENT_ERROR** = **-1** --- An error occurred during :ref:`service`. You will likely need to :ref:`destroy` the host and recreate it. +.. _class_ENetConnection_constant_EVENT_ERROR: -- **EVENT_NONE** = **0** --- No event occurred within the specified time limit. +.. rst-class:: classref-enumeration-constant -- **EVENT_CONNECT** = **1** --- A connection request initiated by enet_host_connect has completed. The array will contain the peer which successfully connected. +:ref:`EventType` **EVENT_ERROR** = ``-1`` -- **EVENT_DISCONNECT** = **2** --- A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by :ref:`ENetPacketPeer.peer_disconnect`, if a peer has timed out, or if a connection request initialized by :ref:`connect_to_host` has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. +An error occurred during :ref:`service`. You will likely need to :ref:`destroy` the host and recreate it. -- **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. +.. _class_ENetConnection_constant_EVENT_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EventType` **EVENT_NONE** = ``0`` + +No event occurred within the specified time limit. + +.. _class_ENetConnection_constant_EVENT_CONNECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EventType` **EVENT_CONNECT** = ``1`` + +A connection request initiated by enet_host_connect has completed. The array will contain the peer which successfully connected. + +.. _class_ENetConnection_constant_EVENT_DISCONNECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EventType` **EVENT_DISCONNECT** = ``2`` + +A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by :ref:`ENetPacketPeer.peer_disconnect`, if a peer has timed out, or if a connection request initialized by :ref:`connect_to_host` has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. + +.. _class_ENetConnection_constant_EVENT_RECEIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. rst-class:: classref-item-separator ---- .. _enum_ENetConnection_HostStatistic: -.. _class_ENetConnection_constant_HOST_TOTAL_SENT_DATA: - -.. _class_ENetConnection_constant_HOST_TOTAL_SENT_PACKETS: - -.. _class_ENetConnection_constant_HOST_TOTAL_RECEIVED_DATA: - -.. _class_ENetConnection_constant_HOST_TOTAL_RECEIVED_PACKETS: +.. rst-class:: classref-enumeration enum **HostStatistic**: -- **HOST_TOTAL_SENT_DATA** = **0** --- Total data sent. +.. _class_ENetConnection_constant_HOST_TOTAL_SENT_DATA: -- **HOST_TOTAL_SENT_PACKETS** = **1** --- Total UDP packets sent. +.. rst-class:: classref-enumeration-constant -- **HOST_TOTAL_RECEIVED_DATA** = **2** --- Total data received. +:ref:`HostStatistic` **HOST_TOTAL_SENT_DATA** = ``0`` -- **HOST_TOTAL_RECEIVED_PACKETS** = **3** --- Total UDP packets received. +Total data sent. + +.. _class_ENetConnection_constant_HOST_TOTAL_SENT_PACKETS: + +.. rst-class:: classref-enumeration-constant + +:ref:`HostStatistic` **HOST_TOTAL_SENT_PACKETS** = ``1`` + +Total UDP packets sent. + +.. _class_ENetConnection_constant_HOST_TOTAL_RECEIVED_DATA: + +.. rst-class:: classref-enumeration-constant + +:ref:`HostStatistic` **HOST_TOTAL_RECEIVED_DATA** = ``2`` + +Total data received. + +.. _class_ENetConnection_constant_HOST_TOTAL_RECEIVED_PACKETS: + +.. rst-class:: classref-enumeration-constant + +:ref:`HostStatistic` **HOST_TOTAL_RECEIVED_PACKETS** = ``3`` + +Total UDP packets received. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ENetConnection_method_bandwidth_limit: -- void **bandwidth_limit** **(** :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** +.. rst-class:: classref-method + +void **bandwidth_limit** **(** :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** Adjusts the bandwidth limits of a host. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_broadcast: -- void **broadcast** **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** +.. rst-class:: classref-method + +void **broadcast** **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** Queues a ``packet`` to be sent to all peers associated with the host over the specified ``channel``. See :ref:`ENetPacketPeer` ``FLAG_*`` constants for available packet flags. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_channel_limit: -- void **channel_limit** **(** :ref:`int` limit **)** +.. rst-class:: classref-method + +void **channel_limit** **(** :ref:`int` limit **)** Limits the maximum allowed channels of future incoming connections. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_compress: -- void **compress** **(** :ref:`CompressionMode` mode **)** +.. rst-class:: classref-method + +void **compress** **(** :ref:`CompressionMode` mode **)** 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. @@ -175,113 +276,165 @@ Sets the compression method used for network packets. These have different trade \ **Note:** The compression mode must be set to the same value on both the server and all its clients. Clients will fail to connect if the compression mode set on the client differs from the one set on the server. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_connect_to_host: -- :ref:`ENetPacketPeer` **connect_to_host** **(** :ref:`String` address, :ref:`int` port, :ref:`int` channels=0, :ref:`int` data=0 **)** +.. rst-class:: classref-method + +:ref:`ENetPacketPeer` **connect_to_host** **(** :ref:`String` address, :ref:`int` port, :ref:`int` channels=0, :ref:`int` data=0 **)** 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. \ **Note:** You must call either :ref:`create_host` or :ref:`create_host_bound` before calling this method. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_create_host: -- :ref:`Error` **create_host** **(** :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** +.. rst-class:: classref-method + +:ref:`Error` **create_host** **(** :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_create_host_bound: -- :ref:`Error` **create_host_bound** **(** :ref:`String` bind_address, :ref:`int` bind_port, :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** +.. rst-class:: classref-method + +:ref:`Error` **create_host_bound** **(** :ref:`String` bind_address, :ref:`int` bind_port, :ref:`int` max_peers=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** Create an ENetHost like :ref:`create_host` which is also bound to the given ``bind_address`` and ``bind_port``. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_destroy: -- void **destroy** **(** **)** +.. rst-class:: classref-method + +void **destroy** **(** **)** Destroys the host and all resources associated with it. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_dtls_client_setup: -- :ref:`Error` **dtls_client_setup** **(** :ref:`X509Certificate` certificate, :ref:`String` hostname, :ref:`bool` verify=true **)** +.. rst-class:: classref-method + +:ref:`Error` **dtls_client_setup** **(** :ref:`X509Certificate` certificate, :ref:`String` hostname, :ref:`bool` verify=true **)** Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before :ref:`connect_to_host` to have ENet connect using DTLS with ``certificate`` and ``hostname`` verification. Verification can be optionally turned off via the ``verify`` parameter. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_dtls_server_setup: -- :ref:`Error` **dtls_server_setup** **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate **)** +.. rst-class:: classref-method + +:ref:`Error` **dtls_server_setup** **(** :ref:`CryptoKey` key, :ref:`X509Certificate` certificate **)** Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after :ref:`create_host_bound` to have ENet expect peers to connect using DTLS. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_flush: -- void **flush** **(** **)** +.. rst-class:: classref-method + +void **flush** **(** **)** Sends any queued packets on the host specified to its designated peers. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_get_local_port: -- :ref:`int` **get_local_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_local_port** **(** **)** |const| Returns the local port to which this peer is bound. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_get_max_channels: -- :ref:`int` **get_max_channels** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_max_channels** **(** **)** |const| Returns the maximum number of channels allowed for connected peers. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_get_peers: -- :ref:`ENetPacketPeer[]` **get_peers** **(** **)** +.. rst-class:: classref-method + +:ref:`ENetPacketPeer[]` **get_peers** **(** **)** Returns the list of peers associated with this host. \ **Note:** This list might include some peers that are not fully connected or are still being disconnected. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_pop_statistic: -- :ref:`float` **pop_statistic** **(** :ref:`HostStatistic` statistic **)** +.. rst-class:: classref-method + +:ref:`float` **pop_statistic** **(** :ref:`HostStatistic` statistic **)** Returns and resets host statistics. See :ref:`HostStatistic` for more info. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_refuse_new_connections: -- void **refuse_new_connections** **(** :ref:`bool` refuse **)** +.. rst-class:: classref-method + +void **refuse_new_connections** **(** :ref:`bool` refuse **)** Configures the DTLS server to automatically drop new connections. \ **Note:** This method is only relevant after calling :ref:`dtls_server_setup`. +.. rst-class:: classref-item-separator + ---- .. _class_ENetConnection_method_service: -- :ref:`Array` **service** **(** :ref:`int` timeout=0 **)** +.. rst-class:: classref-method + +:ref:`Array` **service** **(** :ref:`int` timeout=0 **)** Waits for events on the host specified and shuttles packets between the host and its peers. The returned :ref:`Array` will have 4 elements. An :ref:`EventType`, the :ref:`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`, the received packet will be queued to the associated :ref:`ENetPacketPeer`. diff --git a/classes/class_enetmultiplayerpeer.rst b/classes/class_enetmultiplayerpeer.rst index 7597346f4..d6078d8f8 100644 --- a/classes/class_enetmultiplayerpeer.rst +++ b/classes/class_enetmultiplayerpeer.rst @@ -14,6 +14,8 @@ ENetMultiplayerPeer A MultiplayerPeer implementation using the `ENet `__ library. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ A MultiplayerPeer implementation that should be passed to :ref:`MultiplayerAPI.m \ **Note:** ENet only uses UDP, not TCP. When forwarding the server port to make your server accessible on the public Internet, you only need to forward the server port in UDP. You can use the :ref:`UPNP` class to try to forward the server port automatically when starting the server. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,91 +32,137 @@ Tutorials - `API documentation on the ENet website `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------+------------------------------------------------------+ -| :ref:`ENetConnection` | :ref:`host` | -+---------------------------------------------+------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+------------------------------------------------------+ + | :ref:`ENetConnection` | :ref:`host` | + +---------------------------------------------+------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`add_mesh_peer` **(** :ref:`int` peer_id, :ref:`ENetConnection` host **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_client` **(** :ref:`String` address, :ref:`int` port, :ref:`int` channel_count=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0, :ref:`int` local_port=0 **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_mesh` **(** :ref:`int` unique_id **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_server` **(** :ref:`int` port, :ref:`int` max_clients=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ENetPacketPeer` | :ref:`get_peer` **(** :ref:`int` id **)** |const| | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bind_ip` **(** :ref:`String` ip **)** | -+---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_mesh_peer` **(** :ref:`int` peer_id, :ref:`ENetConnection` host **)** | + +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_client` **(** :ref:`String` address, :ref:`int` port, :ref:`int` channel_count=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0, :ref:`int` local_port=0 **)** | + +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_mesh` **(** :ref:`int` unique_id **)** | + +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_server` **(** :ref:`int` port, :ref:`int` max_clients=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** | + +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ENetPacketPeer` | :ref:`get_peer` **(** :ref:`int` id **)** |const| | + +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bind_ip` **(** :ref:`String` ip **)** | + +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ENetMultiplayerPeer_property_host: -- :ref:`ENetConnection` **host** +.. rst-class:: classref-property -+----------+------------+ -| *Getter* | get_host() | -+----------+------------+ +:ref:`ENetConnection` **host** + +.. rst-class:: classref-property-setget + +- :ref:`ENetConnection` **get_host** **(** **)** The underlying :ref:`ENetConnection` created after :ref:`create_client` and :ref:`create_server`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ENetMultiplayerPeer_method_add_mesh_peer: -- :ref:`Error` **add_mesh_peer** **(** :ref:`int` peer_id, :ref:`ENetConnection` host **)** +.. rst-class:: classref-method + +:ref:`Error` **add_mesh_peer** **(** :ref:`int` peer_id, :ref:`ENetConnection` host **)** Add a new remote peer with the given ``peer_id`` connected to the given ``host``. \ **Note:** The ``host`` must have exactly one peer in the :ref:`ENetPacketPeer.STATE_CONNECTED` state. +.. rst-class:: classref-item-separator + ---- .. _class_ENetMultiplayerPeer_method_create_client: -- :ref:`Error` **create_client** **(** :ref:`String` address, :ref:`int` port, :ref:`int` channel_count=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0, :ref:`int` local_port=0 **)** +.. rst-class:: classref-method + +:ref:`Error` **create_client** **(** :ref:`String` address, :ref:`int` port, :ref:`int` channel_count=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0, :ref:`int` local_port=0 **)** 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` if a client was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close` first) or :ref:`@GlobalScope.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. +.. rst-class:: classref-item-separator + ---- .. _class_ENetMultiplayerPeer_method_create_mesh: -- :ref:`Error` **create_mesh** **(** :ref:`int` unique_id **)** +.. rst-class:: classref-method + +:ref:`Error` **create_mesh** **(** :ref:`int` unique_id **)** Initialize this :ref:`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`. In the mesh configuration you will need to set up each new peer manually using :ref:`ENetConnection` before calling :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_ENetMultiplayerPeer_method_create_server: -- :ref:`Error` **create_server** **(** :ref:`int` port, :ref:`int` max_clients=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** +.. rst-class:: classref-method + +:ref:`Error` **create_server** **(** :ref:`int` port, :ref:`int` max_clients=32, :ref:`int` max_channels=0, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0 **)** 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`. 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`. Returns :ref:`@GlobalScope.OK` if a server was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close` first) or :ref:`@GlobalScope.ERR_CANT_CREATE` if the server could not be created. +.. rst-class:: classref-item-separator + ---- .. _class_ENetMultiplayerPeer_method_get_peer: -- :ref:`ENetPacketPeer` **get_peer** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`ENetPacketPeer` **get_peer** **(** :ref:`int` id **)** |const| Returns the :ref:`ENetPacketPeer` associated to the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_ENetMultiplayerPeer_method_set_bind_ip: -- void **set_bind_ip** **(** :ref:`String` ip **)** +.. rst-class:: classref-method + +void **set_bind_ip** **(** :ref:`String` 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"``. diff --git a/classes/class_enetpacketpeer.rst b/classes/class_enetpacketpeer.rst index ee43b13b9..7ec0f53f9 100644 --- a/classes/class_enetpacketpeer.rst +++ b/classes/class_enetpacketpeer.rst @@ -14,6 +14,8 @@ ENetPacketPeer A wrapper class for an `ENetPeer `__. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,298 +25,503 @@ This class cannot be instantiated directly but can be retrieved during :ref:`ENe \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-introduction-group + Tutorials --------- - `API documentation on the ENet website `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_channels` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_remote_address` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_remote_port` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PeerState` | :ref:`get_state` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_statistic` **(** :ref:`PeerStatistic` statistic **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_active` **(** **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`peer_disconnect` **(** :ref:`int` data=0 **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`peer_disconnect_later` **(** :ref:`int` data=0 **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`peer_disconnect_now` **(** :ref:`int` data=0 **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ping` **(** **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ping_interval` **(** :ref:`int` ping_interval **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reset` **(** **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`send` **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_timeout` **(** :ref:`int` timeout, :ref:`int` timeout_min, :ref:`int` timeout_max **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`throttle_configure` **(** :ref:`int` interval, :ref:`int` acceleration, :ref:`int` deceleration **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_channels` **(** **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_remote_address` **(** **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_remote_port` **(** **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PeerState` | :ref:`get_state` **(** **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_statistic` **(** :ref:`PeerStatistic` statistic **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_active` **(** **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`peer_disconnect` **(** :ref:`int` data=0 **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`peer_disconnect_later` **(** :ref:`int` data=0 **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`peer_disconnect_now` **(** :ref:`int` data=0 **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ping` **(** **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ping_interval` **(** :ref:`int` ping_interval **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reset` **(** **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`send` **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_timeout` **(** :ref:`int` timeout, :ref:`int` timeout_min, :ref:`int` timeout_max **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`throttle_configure` **(** :ref:`int` interval, :ref:`int` acceleration, :ref:`int` deceleration **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ENetPacketPeer_PeerState: -.. _class_ENetPacketPeer_constant_STATE_DISCONNECTED: - -.. _class_ENetPacketPeer_constant_STATE_CONNECTING: - -.. _class_ENetPacketPeer_constant_STATE_ACKNOWLEDGING_CONNECT: - -.. _class_ENetPacketPeer_constant_STATE_CONNECTION_PENDING: - -.. _class_ENetPacketPeer_constant_STATE_CONNECTION_SUCCEEDED: - -.. _class_ENetPacketPeer_constant_STATE_CONNECTED: - -.. _class_ENetPacketPeer_constant_STATE_DISCONNECT_LATER: - -.. _class_ENetPacketPeer_constant_STATE_DISCONNECTING: - -.. _class_ENetPacketPeer_constant_STATE_ACKNOWLEDGING_DISCONNECT: - -.. _class_ENetPacketPeer_constant_STATE_ZOMBIE: +.. rst-class:: classref-enumeration enum **PeerState**: -- **STATE_DISCONNECTED** = **0** --- The peer is disconnected. +.. _class_ENetPacketPeer_constant_STATE_DISCONNECTED: -- **STATE_CONNECTING** = **1** --- The peer is currently attempting to connect. +.. rst-class:: classref-enumeration-constant -- **STATE_ACKNOWLEDGING_CONNECT** = **2** --- The peer has acknowledged the connection request. +:ref:`PeerState` **STATE_DISCONNECTED** = ``0`` -- **STATE_CONNECTION_PENDING** = **3** --- The peer is currently connecting. +The peer is disconnected. -- **STATE_CONNECTION_SUCCEEDED** = **4** --- The peer has successfully connected, but is not ready to communicate with yet (:ref:`STATE_CONNECTED`). +.. _class_ENetPacketPeer_constant_STATE_CONNECTING: -- **STATE_CONNECTED** = **5** --- The peer is currently connected and ready to communicate with. +.. rst-class:: classref-enumeration-constant -- **STATE_DISCONNECT_LATER** = **6** --- The peer is slated to disconnect after it has no more outgoing packets to send. +:ref:`PeerState` **STATE_CONNECTING** = ``1`` -- **STATE_DISCONNECTING** = **7** --- The peer is currently disconnecting. +The peer is currently attempting to connect. -- **STATE_ACKNOWLEDGING_DISCONNECT** = **8** --- The peer has acknowledged the disconnection request. +.. _class_ENetPacketPeer_constant_STATE_ACKNOWLEDGING_CONNECT: -- **STATE_ZOMBIE** = **9** --- The peer has lost connection, but is not considered truly disconnected (as the peer didn't acknowledge the disconnection request). +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_ACKNOWLEDGING_CONNECT** = ``2`` + +The peer has acknowledged the connection request. + +.. _class_ENetPacketPeer_constant_STATE_CONNECTION_PENDING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_CONNECTION_PENDING** = ``3`` + +The peer is currently connecting. + +.. _class_ENetPacketPeer_constant_STATE_CONNECTION_SUCCEEDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_CONNECTION_SUCCEEDED** = ``4`` + +The peer has successfully connected, but is not ready to communicate with yet (:ref:`STATE_CONNECTED`). + +.. _class_ENetPacketPeer_constant_STATE_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_CONNECTED** = ``5`` + +The peer is currently connected and ready to communicate with. + +.. _class_ENetPacketPeer_constant_STATE_DISCONNECT_LATER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_DISCONNECT_LATER** = ``6`` + +The peer is slated to disconnect after it has no more outgoing packets to send. + +.. _class_ENetPacketPeer_constant_STATE_DISCONNECTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_DISCONNECTING** = ``7`` + +The peer is currently disconnecting. + +.. _class_ENetPacketPeer_constant_STATE_ACKNOWLEDGING_DISCONNECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_ACKNOWLEDGING_DISCONNECT** = ``8`` + +The peer has acknowledged the disconnection request. + +.. _class_ENetPacketPeer_constant_STATE_ZOMBIE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerState` **STATE_ZOMBIE** = ``9`` + +The peer has lost connection, but is not considered truly disconnected (as the peer didn't acknowledge the disconnection request). + +.. rst-class:: classref-item-separator ---- .. _enum_ENetPacketPeer_PeerStatistic: -.. _class_ENetPacketPeer_constant_PEER_PACKET_LOSS: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_LOSS_VARIANCE: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_LOSS_EPOCH: - -.. _class_ENetPacketPeer_constant_PEER_ROUND_TRIP_TIME: - -.. _class_ENetPacketPeer_constant_PEER_ROUND_TRIP_TIME_VARIANCE: - -.. _class_ENetPacketPeer_constant_PEER_LAST_ROUND_TRIP_TIME: - -.. _class_ENetPacketPeer_constant_PEER_LAST_ROUND_TRIP_TIME_VARIANCE: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_LIMIT: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_COUNTER: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_EPOCH: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_ACCELERATION: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_DECELERATION: - -.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_INTERVAL: +.. rst-class:: classref-enumeration enum **PeerStatistic**: -- **PEER_PACKET_LOSS** = **0** --- Mean packet loss of reliable packets as a ratio with respect to the :ref:`PACKET_LOSS_SCALE`. +.. _class_ENetPacketPeer_constant_PEER_PACKET_LOSS: -- **PEER_PACKET_LOSS_VARIANCE** = **1** --- Packet loss variance. +.. rst-class:: classref-enumeration-constant -- **PEER_PACKET_LOSS_EPOCH** = **2** --- The time at which packet loss statistics were last updated (in milliseconds since the connection started). The interval for packet loss statistics updates is 10 seconds, and at least one packet must have been sent since the last statistics update. +:ref:`PeerStatistic` **PEER_PACKET_LOSS** = ``0`` -- **PEER_ROUND_TRIP_TIME** = **3** --- Mean packet round trip time for reliable packets. +Mean packet loss of reliable packets as a ratio with respect to the :ref:`PACKET_LOSS_SCALE`. -- **PEER_ROUND_TRIP_TIME_VARIANCE** = **4** --- Variance of the mean round trip time. +.. _class_ENetPacketPeer_constant_PEER_PACKET_LOSS_VARIANCE: -- **PEER_LAST_ROUND_TRIP_TIME** = **5** --- Last recorded round trip time for a reliable packet. +.. rst-class:: classref-enumeration-constant -- **PEER_LAST_ROUND_TRIP_TIME_VARIANCE** = **6** --- Variance of the last trip time recorded. +:ref:`PeerStatistic` **PEER_PACKET_LOSS_VARIANCE** = ``1`` -- **PEER_PACKET_THROTTLE** = **7** --- The peer's current throttle status. +Packet loss variance. -- **PEER_PACKET_THROTTLE_LIMIT** = **8** --- The maximum number of unreliable packets that should not be dropped. This value is always greater than or equal to ``1``. The initial value is equal to :ref:`PACKET_THROTTLE_SCALE`. +.. _class_ENetPacketPeer_constant_PEER_PACKET_LOSS_EPOCH: -- **PEER_PACKET_THROTTLE_COUNTER** = **9** --- Internal value used to increment the packet throttle counter. The value is hardcoded to ``7`` and cannot be changed. You probably want to look at :ref:`PEER_PACKET_THROTTLE_ACCELERATION` instead. +.. rst-class:: classref-enumeration-constant -- **PEER_PACKET_THROTTLE_EPOCH** = **10** --- The time at which throttle statistics were last updated (in milliseconds since the connection started). The interval for throttle statistics updates is :ref:`PEER_PACKET_THROTTLE_INTERVAL`. +:ref:`PeerStatistic` **PEER_PACKET_LOSS_EPOCH** = ``2`` -- **PEER_PACKET_THROTTLE_ACCELERATION** = **11** --- The throttle's acceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent *more* often. The default value is ``2``. +The time at which packet loss statistics were last updated (in milliseconds since the connection started). The interval for packet loss statistics updates is 10 seconds, and at least one packet must have been sent since the last statistics update. -- **PEER_PACKET_THROTTLE_DECELERATION** = **12** --- The throttle's deceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent *less* often. The default value is ``2``. +.. _class_ENetPacketPeer_constant_PEER_ROUND_TRIP_TIME: -- **PEER_PACKET_THROTTLE_INTERVAL** = **13** --- The interval over which the lowest mean round trip time should be measured for use by the throttle mechanism (in milliseconds). The default value is ``5000``. +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_ROUND_TRIP_TIME** = ``3`` + +Mean packet round trip time for reliable packets. + +.. _class_ENetPacketPeer_constant_PEER_ROUND_TRIP_TIME_VARIANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_ROUND_TRIP_TIME_VARIANCE** = ``4`` + +Variance of the mean round trip time. + +.. _class_ENetPacketPeer_constant_PEER_LAST_ROUND_TRIP_TIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_LAST_ROUND_TRIP_TIME** = ``5`` + +Last recorded round trip time for a reliable packet. + +.. _class_ENetPacketPeer_constant_PEER_LAST_ROUND_TRIP_TIME_VARIANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_LAST_ROUND_TRIP_TIME_VARIANCE** = ``6`` + +Variance of the last trip time recorded. + +.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_PACKET_THROTTLE** = ``7`` + +The peer's current throttle status. + +.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_PACKET_THROTTLE_LIMIT** = ``8`` + +The maximum number of unreliable packets that should not be dropped. This value is always greater than or equal to ``1``. The initial value is equal to :ref:`PACKET_THROTTLE_SCALE`. + +.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_COUNTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_PACKET_THROTTLE_COUNTER** = ``9`` + +Internal value used to increment the packet throttle counter. The value is hardcoded to ``7`` and cannot be changed. You probably want to look at :ref:`PEER_PACKET_THROTTLE_ACCELERATION` instead. + +.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_EPOCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_PACKET_THROTTLE_EPOCH** = ``10`` + +The time at which throttle statistics were last updated (in milliseconds since the connection started). The interval for throttle statistics updates is :ref:`PEER_PACKET_THROTTLE_INTERVAL`. + +.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_ACCELERATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_PACKET_THROTTLE_ACCELERATION** = ``11`` + +The throttle's acceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent *more* often. The default value is ``2``. + +.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_DECELERATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_PACKET_THROTTLE_DECELERATION** = ``12`` + +The throttle's deceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent *less* often. The default value is ``2``. + +.. _class_ENetPacketPeer_constant_PEER_PACKET_THROTTLE_INTERVAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PeerStatistic` **PEER_PACKET_THROTTLE_INTERVAL** = ``13`` + +The interval over which the lowest mean round trip time should be measured for use by the throttle mechanism (in milliseconds). The default value is ``5000``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_ENetPacketPeer_constant_PACKET_LOSS_SCALE: +.. rst-class:: classref-constant + +**PACKET_LOSS_SCALE** = ``65536`` + +The reference scale for packet loss. See :ref:`get_statistic` and :ref:`PEER_PACKET_LOSS`. + .. _class_ENetPacketPeer_constant_PACKET_THROTTLE_SCALE: +.. rst-class:: classref-constant + +**PACKET_THROTTLE_SCALE** = ``32`` + +The reference value for throttle configuration. The default value is ``32``. See :ref:`throttle_configure`. + .. _class_ENetPacketPeer_constant_FLAG_RELIABLE: +.. rst-class:: classref-constant + +**FLAG_RELIABLE** = ``1`` + +Mark the packet to be sent as reliable. + .. _class_ENetPacketPeer_constant_FLAG_UNSEQUENCED: +.. rst-class:: classref-constant + +**FLAG_UNSEQUENCED** = ``2`` + +Mark the packet to be sent unsequenced (unreliable). + .. _class_ENetPacketPeer_constant_FLAG_UNRELIABLE_FRAGMENT: -- **PACKET_LOSS_SCALE** = **65536** --- The reference scale for packet loss. See :ref:`get_statistic` and :ref:`PEER_PACKET_LOSS`. +.. rst-class:: classref-constant -- **PACKET_THROTTLE_SCALE** = **32** --- The reference value for throttle configuration. The default value is ``32``. See :ref:`throttle_configure`. +**FLAG_UNRELIABLE_FRAGMENT** = ``8`` -- **FLAG_RELIABLE** = **1** --- Mark the packet to be sent as reliable. +Mark the packet to be sent unreliable even if the packet is too big and needs fragmentation (increasing the chance of it being dropped). -- **FLAG_UNSEQUENCED** = **2** --- Mark the packet to be sent unsequenced (unreliable). +.. rst-class:: classref-section-separator -- **FLAG_UNRELIABLE_FRAGMENT** = **8** --- Mark the packet to be sent unreliable even if the packet is too big and needs fragmentation (increasing the chance of it being dropped). +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ENetPacketPeer_method_get_channels: -- :ref:`int` **get_channels** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_channels** **(** **)** |const| Returns the number of channels allocated for communication with peer. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_get_remote_address: -- :ref:`String` **get_remote_address** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_remote_address** **(** **)** |const| Returns the IP address of this peer. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_get_remote_port: -- :ref:`int` **get_remote_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_remote_port** **(** **)** |const| Returns the remote port of this peer. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_get_state: -- :ref:`PeerState` **get_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PeerState` **get_state** **(** **)** |const| Returns the current peer state. See :ref:`PeerState`. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_get_statistic: -- :ref:`float` **get_statistic** **(** :ref:`PeerStatistic` statistic **)** +.. rst-class:: classref-method + +:ref:`float` **get_statistic** **(** :ref:`PeerStatistic` statistic **)** Returns the requested ``statistic`` for this peer. See :ref:`PeerStatistic`. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_is_active: -- :ref:`bool` **is_active** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_active** **(** **)** |const| Returns ``true`` if the peer is currently active (i.e. the associated :ref:`ENetConnection` is still valid). +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_peer_disconnect: -- void **peer_disconnect** **(** :ref:`int` data=0 **)** +.. rst-class:: classref-method + +void **peer_disconnect** **(** :ref:`int` data=0 **)** Request a disconnection from a peer. An :ref:`ENetConnection.EVENT_DISCONNECT` will be generated during :ref:`ENetConnection.service` once the disconnection is complete. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_peer_disconnect_later: -- void **peer_disconnect_later** **(** :ref:`int` data=0 **)** +.. rst-class:: classref-method + +void **peer_disconnect_later** **(** :ref:`int` data=0 **)** Request a disconnection from a peer, but only after all queued outgoing packets are sent. An :ref:`ENetConnection.EVENT_DISCONNECT` will be generated during :ref:`ENetConnection.service` once the disconnection is complete. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_peer_disconnect_now: -- void **peer_disconnect_now** **(** :ref:`int` data=0 **)** +.. rst-class:: classref-method + +void **peer_disconnect_now** **(** :ref:`int` data=0 **)** Force an immediate disconnection from a peer. No :ref:`ENetConnection.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. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_ping: -- void **ping** **(** **)** +.. rst-class:: classref-method + +void **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. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_ping_interval: -- void **ping_interval** **(** :ref:`int` ping_interval **)** +.. rst-class:: classref-method + +void **ping_interval** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_reset: -- void **reset** **(** **)** +.. rst-class:: classref-method + +void **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. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_send: -- :ref:`Error` **send** **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** +.. rst-class:: classref-method + +:ref:`Error` **send** **(** :ref:`int` channel, :ref:`PackedByteArray` packet, :ref:`int` flags **)** Queues a ``packet`` to be sent over the specified ``channel``. See ``FLAG_*`` constants for available packet flags. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_set_timeout: -- void **set_timeout** **(** :ref:`int` timeout, :ref:`int` timeout_min, :ref:`int` timeout_max **)** +.. rst-class:: classref-method + +void **set_timeout** **(** :ref:`int` timeout, :ref:`int` timeout_min, :ref:`int` timeout_max **)** 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. The ``timeout_limit`` is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached ``timeout_min``. The ``timeout_max`` parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped. +.. rst-class:: classref-item-separator + ---- .. _class_ENetPacketPeer_method_throttle_configure: -- void **throttle_configure** **(** :ref:`int` interval, :ref:`int` acceleration, :ref:`int` deceleration **)** +.. rst-class:: classref-method + +void **throttle_configure** **(** :ref:`int` interval, :ref:`int` acceleration, :ref:`int` deceleration **)** Configures throttle parameter for a peer. diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 18998ec59..aeeb2d579 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -14,95 +14,112 @@ Engine Access to engine properties. +.. rst-class:: classref-introduction-group + 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. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+---------------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`max_fps` | ``0`` | -+---------------------------+---------------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`max_physics_steps_per_frame` | ``8`` | -+---------------------------+---------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`physics_jitter_fix` | ``0.5`` | -+---------------------------+---------------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`physics_ticks_per_second` | ``60`` | -+---------------------------+---------------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`print_error_messages` | ``true`` | -+---------------------------+---------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`time_scale` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`max_fps` | ``0`` | + +---------------------------+---------------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`max_physics_steps_per_frame` | ``8`` | + +---------------------------+---------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`physics_jitter_fix` | ``0.5`` | + +---------------------------+---------------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`physics_ticks_per_second` | ``60`` | + +---------------------------+---------------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`print_error_messages` | ``true`` | + +---------------------------+---------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`time_scale` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_architecture_name` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_author_info` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_copyright_info` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_donor_info` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_frames_drawn` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_frames_per_second` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_license_info` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_license_text` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MainLoop` | :ref:`get_main_loop` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_physics_frames` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_physics_interpolation_fraction` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_process_frames` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptLanguage` | :ref:`get_script_language` **(** :ref:`int` index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_script_language_count` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_singleton` **(** :ref:`StringName` name **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_singleton_list` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_version_info` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_write_movie_path` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_singleton` **(** :ref:`StringName` name **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_editor_hint` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_in_physics_frame` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_script_language` **(** :ref:`ScriptLanguage` language **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_singleton` **(** :ref:`StringName` name, :ref:`Object` instance **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unregister_singleton` **(** :ref:`StringName` name **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_architecture_name` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_author_info` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_copyright_info` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_donor_info` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frames_drawn` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_frames_per_second` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_license_info` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_license_text` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MainLoop` | :ref:`get_main_loop` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_physics_frames` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_physics_interpolation_fraction` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_process_frames` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptLanguage` | :ref:`get_script_language` **(** :ref:`int` index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_script_language_count` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_singleton` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_singleton_list` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_version_info` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_write_movie_path` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_singleton` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_editor_hint` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_physics_frame` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_script_language` **(** :ref:`ScriptLanguage` language **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_singleton` **(** :ref:`StringName` name, :ref:`Object` instance **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unregister_singleton` **(** :ref:`StringName` name **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Engine_property_max_fps: -- :ref:`int` **max_fps** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_max_fps(value) | -+-----------+--------------------+ -| *Getter* | get_max_fps() | -+-----------+--------------------+ +:ref:`int` **max_fps** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_max_fps** **(** :ref:`int` value **)** +- :ref:`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. @@ -116,71 +133,75 @@ If :ref:`ProjectSettings.display/window/vsync/vsync_mode` and :ref:`ProjectSettings.application/run/max_fps`. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_property_max_physics_steps_per_frame: -- :ref:`int` **max_physics_steps_per_frame** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``8`` | -+-----------+----------------------------------------+ -| *Setter* | set_max_physics_steps_per_frame(value) | -+-----------+----------------------------------------+ -| *Getter* | get_max_physics_steps_per_frame() | -+-----------+----------------------------------------+ +:ref:`int` **max_physics_steps_per_frame** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_max_physics_steps_per_frame** **(** :ref:`int` value **)** +- :ref:`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`. This occurs even if ``delta`` is consistently used in physics calculations. To avoid this, increase :ref:`max_physics_steps_per_frame` if you have increased :ref:`physics_ticks_per_second` significantly above its default value. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_property_physics_jitter_fix: -- :ref:`float` **physics_jitter_fix** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------------------+ -| *Setter* | set_physics_jitter_fix(value) | -+-----------+-------------------------------+ -| *Getter* | get_physics_jitter_fix() | -+-----------+-------------------------------+ +:ref:`float` **physics_jitter_fix** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_physics_jitter_fix** **(** :ref:`float` value **)** +- :ref:`float` **get_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 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:** For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting :ref:`physics_jitter_fix` to ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_property_physics_ticks_per_second: -- :ref:`int` **physics_ticks_per_second** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``60`` | -+-----------+-------------------------------------+ -| *Setter* | set_physics_ticks_per_second(value) | -+-----------+-------------------------------------+ -| *Getter* | get_physics_ticks_per_second() | -+-----------+-------------------------------------+ +:ref:`int` **physics_ticks_per_second** = ``60`` + +.. rst-class:: classref-property-setget + +- void **set_physics_ticks_per_second** **(** :ref:`int` value **)** +- :ref:`int` **get_physics_ticks_per_second** **(** **)** The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._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` and :ref:`ProjectSettings.physics/common/physics_ticks_per_second`. \ **Note:** Only :ref:`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` if increasing :ref:`physics_ticks_per_second` significantly above its default value. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_property_print_error_messages: -- :ref:`bool` **print_error_messages** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_print_error_messages(value) | -+-----------+---------------------------------+ -| *Getter* | is_printing_error_messages() | -+-----------+---------------------------------+ +:ref:`bool` **print_error_messages** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_print_error_messages** **(** :ref:`bool` value **)** +- :ref:`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` project setting. @@ -188,28 +209,37 @@ If ``false``, stops printing error and warning messages to the console and edito \ **Note:** This property does not impact the editor's Errors tab when running a project from the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_property_time_scale: -- :ref:`float` **time_scale** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_time_scale(value) | -+-----------+-----------------------+ -| *Getter* | get_time_scale() | -+-----------+-----------------------+ +:ref:`float` **time_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_time_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_time_scale** **(** **)** 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Engine_method_get_architecture_name: -- :ref:`String` **get_architecture_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_architecture_name** **(** **)** |const| Returns the name of the CPU architecture the Godot binary was built for. Possible return values are ``x86_64``, ``x86_32``, ``arm64``, ``armv7``, ``rv64``, ``riscv``, ``ppc64``, ``ppc``, ``wasm64`` and ``wasm32``. @@ -236,11 +266,15 @@ To detect whether the current CPU architecture is 64-bit, you can use the fact t \ **Note:** :ref:`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``. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_author_info: -- :ref:`Dictionary` **get_author_info** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_author_info** **(** **)** |const| Returns engine author information in a Dictionary. @@ -252,11 +286,15 @@ Returns engine author information in a Dictionary. \ ``developers`` - Array of Strings, developer names +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_copyright_info: -- :ref:`Dictionary[]` **get_copyright_info** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_copyright_info** **(** **)** |const| Returns an Array of copyright information Dictionaries. @@ -264,61 +302,89 @@ Returns an Array of copyright information Dictionaries. \ ``parts`` - Array of Dictionaries {``files``, ``copyright``, ``license``} describing subsections of the component +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_donor_info: -- :ref:`Dictionary` **get_donor_info** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_donor_info** **(** **)** |const| Returns a Dictionary of Arrays of donor names. {``platinum_sponsors``, ``gold_sponsors``, ``silver_sponsors``, ``bronze_sponsors``, ``mini_sponsors``, ``gold_donors``, ``silver_donors``, ``bronze_donors``} +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_frames_drawn: -- :ref:`int` **get_frames_drawn** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **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` always returns ``0``. See :ref:`get_process_frames`. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_frames_per_second: -- :ref:`float` **get_frames_per_second** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_frames_per_second** **(** **)** |const| Returns the frames per second of the running game. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_license_info: -- :ref:`Dictionary` **get_license_info** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_license_info** **(** **)** |const| Returns Dictionary of licenses used by Godot and included third party components. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_license_text: -- :ref:`String` **get_license_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_license_text** **(** **)** |const| Returns Godot license text. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_main_loop: -- :ref:`MainLoop` **get_main_loop** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`MainLoop` **get_main_loop** **(** **)** |const| Returns the main loop object (see :ref:`MainLoop` and :ref:`SceneTree`). +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_physics_frames: -- :ref:`int` **get_physics_frames** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_physics_frames** **(** **)** |const| Returns the total number of frames passed since engine initialization which is advanced on each **physics frame**. See also :ref:`get_process_frames`. @@ -347,19 +413,27 @@ Returns the total number of frames passed since engine initialization which is a +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_physics_interpolation_fraction: -- :ref:`float` **get_physics_interpolation_fraction** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_physics_interpolation_fraction** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_process_frames: -- :ref:`int` **get_process_frames** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_process_frames** **(** **)** |const| 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` and :ref:`get_physics_frames`. @@ -388,43 +462,63 @@ Returns the total number of frames passed since engine initialization which is a +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_script_language: -- :ref:`ScriptLanguage` **get_script_language** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`ScriptLanguage` **get_script_language** **(** :ref:`int` index **)** |const| Returns an instance of a :ref:`ScriptLanguage` with the given index. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_script_language_count: -- :ref:`int` **get_script_language_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_script_language_count** **(** **)** Returns the number of available script languages. Use with :ref:`get_script_language`. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_singleton: -- :ref:`Object` **get_singleton** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_singleton** **(** :ref:`StringName` name **)** |const| Returns a global singleton with given ``name``. Often used for plugins, e.g. GodotPayments. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_singleton_list: -- :ref:`PackedStringArray` **get_singleton_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_singleton_list** **(** **)** |const| Returns a list of available global singletons. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_version_info: -- :ref:`Dictionary` **get_version_info** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_version_info** **(** **)** |const| Returns the current engine version information in a Dictionary. @@ -471,27 +565,39 @@ The ``hex`` value is encoded as follows, from left to right: one byte for the ma +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_get_write_movie_path: -- :ref:`String` **get_write_movie_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_write_movie_path** **(** **)** |const| Returns the path to the :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_has_singleton: -- :ref:`bool` **has_singleton** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_singleton** **(** :ref:`StringName` name **)** |const| Returns ``true`` if a singleton with given ``name`` exists in global scope. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_is_editor_hint: -- :ref:`bool` **is_editor_hint** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_editor_hint** **(** **)** |const| 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: @@ -518,35 +624,51 @@ See :doc:`Running code in the editor <../tutorials/plugins/running_code_in_the_e \ **Note:** To detect whether the script is run from an editor *build* (e.g. when pressing :kbd:`F5`), use :ref:`OS.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. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_is_in_physics_frame: -- :ref:`bool` **is_in_physics_frame** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_in_physics_frame** **(** **)** |const| Returns ``true`` if the game is inside the fixed process and physics phase of the game loop. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_register_script_language: -- void **register_script_language** **(** :ref:`ScriptLanguage` language **)** +.. rst-class:: classref-method + +void **register_script_language** **(** :ref:`ScriptLanguage` language **)** Registers a :ref:`ScriptLanguage` instance to be available with ``ScriptServer``. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_register_singleton: -- void **register_singleton** **(** :ref:`StringName` name, :ref:`Object` instance **)** +.. rst-class:: classref-method + +void **register_singleton** **(** :ref:`StringName` name, :ref:`Object` instance **)** Registers the given object as a singleton, globally available under ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_Engine_method_unregister_singleton: -- void **unregister_singleton** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **unregister_singleton** **(** :ref:`StringName` name **)** Unregisters the singleton registered under ``name``. The singleton object is not freed. Only works with user-defined singletons created with :ref:`register_singleton`. diff --git a/classes/class_enginedebugger.rst b/classes/class_enginedebugger.rst index 6e6d5f2d7..04d10c3af 100644 --- a/classes/class_enginedebugger.rst +++ b/classes/class_enginedebugger.rst @@ -14,126 +14,181 @@ EngineDebugger Exposes the internal debugger. +.. rst-class:: classref-introduction-group + Description ----------- -``EngineDebugger`` handles the communication between the editor and the running game. It is active in the running game. Messages can be sent/received through it. It also manages the profilers. +**EngineDebugger** handles the communication between the editor and the running game. It is active in the running game. Messages can be sent/received through it. It also manages the profilers. + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_capture` **(** :ref:`StringName` name **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_profiler` **(** :ref:`StringName` name **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_active` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_profiling` **(** :ref:`StringName` name **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`profiler_add_frame_data` **(** :ref:`StringName` name, :ref:`Array` data **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`profiler_enable` **(** :ref:`StringName` name, :ref:`bool` enable, :ref:`Array` arguments=[] **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_message_capture` **(** :ref:`StringName` name, :ref:`Callable` callable **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_profiler` **(** :ref:`StringName` name, :ref:`EngineProfiler` profiler **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`send_message` **(** :ref:`String` message, :ref:`Array` data **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unregister_message_capture` **(** :ref:`StringName` name **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unregister_profiler` **(** :ref:`StringName` name **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_capture` **(** :ref:`StringName` name **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_profiler` **(** :ref:`StringName` name **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_active` **(** **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_profiling` **(** :ref:`StringName` name **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`profiler_add_frame_data` **(** :ref:`StringName` name, :ref:`Array` data **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`profiler_enable` **(** :ref:`StringName` name, :ref:`bool` enable, :ref:`Array` arguments=[] **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_message_capture` **(** :ref:`StringName` name, :ref:`Callable` callable **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_profiler` **(** :ref:`StringName` name, :ref:`EngineProfiler` profiler **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`send_message` **(** :ref:`String` message, :ref:`Array` data **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unregister_message_capture` **(** :ref:`StringName` name **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unregister_profiler` **(** :ref:`StringName` name **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EngineDebugger_method_has_capture: -- :ref:`bool` **has_capture** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +:ref:`bool` **has_capture** **(** :ref:`StringName` name **)** Returns ``true`` if a capture with the given name is present otherwise ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_has_profiler: -- :ref:`bool` **has_profiler** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +:ref:`bool` **has_profiler** **(** :ref:`StringName` name **)** Returns ``true`` if a profiler with the given name is present otherwise ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_is_active: -- :ref:`bool` **is_active** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_active** **(** **)** Returns ``true`` if the debugger is active otherwise ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_is_profiling: -- :ref:`bool` **is_profiling** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +:ref:`bool` **is_profiling** **(** :ref:`StringName` name **)** Returns ``true`` if a profiler with the given name is present and active otherwise ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_profiler_add_frame_data: -- void **profiler_add_frame_data** **(** :ref:`StringName` name, :ref:`Array` data **)** +.. rst-class:: classref-method + +void **profiler_add_frame_data** **(** :ref:`StringName` name, :ref:`Array` data **)** Calls the ``add`` callable of the profiler with given ``name`` and ``data``. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_profiler_enable: -- void **profiler_enable** **(** :ref:`StringName` name, :ref:`bool` enable, :ref:`Array` arguments=[] **)** +.. rst-class:: classref-method + +void **profiler_enable** **(** :ref:`StringName` name, :ref:`bool` enable, :ref:`Array` arguments=[] **)** Calls the ``toggle`` callable of the profiler with given ``name`` and ``arguments``. Enables/Disables the same profiler depending on ``enable`` argument. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_register_message_capture: -- void **register_message_capture** **(** :ref:`StringName` name, :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **register_message_capture** **(** :ref:`StringName` name, :ref:`Callable` callable **)** 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. Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return ``true`` otherwise ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_register_profiler: -- void **register_profiler** **(** :ref:`StringName` name, :ref:`EngineProfiler` profiler **)** +.. rst-class:: classref-method + +void **register_profiler** **(** :ref:`StringName` name, :ref:`EngineProfiler` profiler **)** Registers a profiler with the given ``name``. See :ref:`EngineProfiler` for more information. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_send_message: -- void **send_message** **(** :ref:`String` message, :ref:`Array` data **)** +.. rst-class:: classref-method + +void **send_message** **(** :ref:`String` message, :ref:`Array` data **)** Sends a message with given ``message`` and ``data`` array. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_unregister_message_capture: -- void **unregister_message_capture** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **unregister_message_capture** **(** :ref:`StringName` name **)** Unregisters the message capture with given ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_EngineDebugger_method_unregister_profiler: -- void **unregister_profiler** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **unregister_profiler** **(** :ref:`StringName` name **)** Unregisters a profiler with given ``name``. diff --git a/classes/class_engineprofiler.rst b/classes/class_engineprofiler.rst index 25ca923a5..e78193d3d 100644 --- a/classes/class_engineprofiler.rst +++ b/classes/class_engineprofiler.rst @@ -14,6 +14,8 @@ EngineProfiler Base class for creating custom profilers. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,39 +23,60 @@ This class can be used to implement custom profilers that are able to interact w See :ref:`EngineDebugger` and :ref:`EditorDebuggerPlugin` for more information. +.. rst-class:: classref-reftable-group + Methods ------- -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_frame` **(** :ref:`Array` data **)** |virtual| | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_tick` **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_toggle` **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_frame` **(** :ref:`Array` data **)** |virtual| | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_tick` **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_toggle` **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EngineProfiler_method__add_frame: -- void **_add_frame** **(** :ref:`Array` data **)** |virtual| +.. rst-class:: classref-method + +void **_add_frame** **(** :ref:`Array` data **)** |virtual| Called when data is added to profiler using :ref:`EngineDebugger.profiler_add_frame_data`. +.. rst-class:: classref-item-separator + ---- .. _class_EngineProfiler_method__tick: -- void **_tick** **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| +.. rst-class:: classref-method + +void **_tick** **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_EngineProfiler_method__toggle: -- void **_toggle** **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| +.. rst-class:: classref-method + +void **_toggle** **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| Called when the profiler is enabled/disabled, along with a set of ``options``. diff --git a/classes/class_environment.rst b/classes/class_environment.rst index ae67f2c73..625bdcb1e 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -14,6 +14,8 @@ Environment Resource for environment nodes (like :ref:`WorldEnvironment`) that define multiple rendering options. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,6 +29,8 @@ Resource for environment nodes (like :ref:`WorldEnvironment`__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`adjustment_brightness` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture` | :ref:`adjustment_color_correction` | | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`adjustment_contrast` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`adjustment_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`adjustment_saturation` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`ambient_light_color` | ``Color(0, 0, 0, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ambient_light_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ambient_light_sky_contribution` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`AmbientSource` | :ref:`ambient_light_source` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`background_camera_feed_id` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`background_canvas_max_layer` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`background_energy_multiplier` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`background_intensity` | ``30000.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`BGMode` | :ref:`background_mode` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`fog_aerial_perspective` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`fog_density` | ``0.01`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`fog_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`fog_height` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`fog_height_density` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`fog_light_color` | ``Color(0.518, 0.553, 0.608, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`fog_light_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`fog_sky_affect` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`fog_sun_scatter` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`GlowBlendMode` | :ref:`glow_blend_mode` | ``2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_bloom` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`glow_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_hdr_luminance_cap` | ``12.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_hdr_scale` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_hdr_threshold` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_intensity` | ``0.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_levels/1` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_levels/2` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_levels/3` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_levels/4` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_levels/5` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_levels/6` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_levels/7` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture` | :ref:`glow_map` | | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_map_strength` | ``0.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_mix` | ``0.05`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`glow_normalized` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`glow_strength` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`ReflectionSource` | :ref:`reflected_light_source` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sdfgi_bounce_feedback` | ``0.5`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sdfgi_cascade0_distance` | ``12.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`sdfgi_cascades` | ``4`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`sdfgi_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sdfgi_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sdfgi_max_distance` | ``204.8`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sdfgi_min_cell_size` | ``0.2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sdfgi_normal_bias` | ``1.1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sdfgi_probe_bias` | ``1.1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`sdfgi_read_sky_light` | ``true`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`sdfgi_use_occlusion` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`SDFGIYScale` | :ref:`sdfgi_y_scale` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Sky` | :ref:`sky` | | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`sky_custom_fov` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector3` | :ref:`sky_rotation` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_ao_channel_affect` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_detail` | ``0.5`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`ssao_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_horizon` | ``0.06`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_intensity` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_light_affect` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_power` | ``1.5`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_radius` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssao_sharpness` | ``0.98`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`ssil_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssil_intensity` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssil_normal_rejection` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssil_radius` | ``5.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssil_sharpness` | ``0.98`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssr_depth_tolerance` | ``0.2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`ssr_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssr_fade_in` | ``0.15`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`ssr_fade_out` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`ssr_max_steps` | ``64`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`tonemap_exposure` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`ToneMapper` | :ref:`tonemap_mode` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`tonemap_white` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`volumetric_fog_albedo` | ``Color(1, 1, 1, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_ambient_inject` | ``0.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_anisotropy` | ``0.2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_density` | ``0.05`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_detail_spread` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`volumetric_fog_emission` | ``Color(0, 0, 0, 1)`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_emission_energy` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`volumetric_fog_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_gi_inject` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_length` | ``64.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_sky_affect` | ``1.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`volumetric_fog_temporal_reprojection_amount` | ``0.9`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`volumetric_fog_temporal_reprojection_enabled` | ``true`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`adjustment_brightness` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture` | :ref:`adjustment_color_correction` | | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`adjustment_contrast` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`adjustment_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`adjustment_saturation` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`ambient_light_color` | ``Color(0, 0, 0, 1)`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ambient_light_energy` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ambient_light_sky_contribution` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`AmbientSource` | :ref:`ambient_light_source` | ``0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`background_camera_feed_id` | ``1`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`background_canvas_max_layer` | ``0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 1)`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`background_energy_multiplier` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`background_intensity` | ``30000.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`BGMode` | :ref:`background_mode` | ``0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`fog_aerial_perspective` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`fog_density` | ``0.01`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`fog_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`fog_height` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`fog_height_density` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`fog_light_color` | ``Color(0.518, 0.553, 0.608, 1)`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`fog_light_energy` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`fog_sky_affect` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`fog_sun_scatter` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`GlowBlendMode` | :ref:`glow_blend_mode` | ``2`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_bloom` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`glow_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_hdr_luminance_cap` | ``12.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_hdr_scale` | ``2.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_hdr_threshold` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_intensity` | ``0.8`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_levels/1` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_levels/2` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_levels/3` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_levels/4` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_levels/5` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_levels/6` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_levels/7` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture` | :ref:`glow_map` | | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_map_strength` | ``0.8`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_mix` | ``0.05`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`glow_normalized` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`glow_strength` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`ReflectionSource` | :ref:`reflected_light_source` | ``0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sdfgi_bounce_feedback` | ``0.5`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sdfgi_cascade0_distance` | ``12.8`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`sdfgi_cascades` | ``4`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`sdfgi_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sdfgi_energy` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sdfgi_max_distance` | ``204.8`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sdfgi_min_cell_size` | ``0.2`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sdfgi_normal_bias` | ``1.1`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sdfgi_probe_bias` | ``1.1`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`sdfgi_read_sky_light` | ``true`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`sdfgi_use_occlusion` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`SDFGIYScale` | :ref:`sdfgi_y_scale` | ``1`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Sky` | :ref:`sky` | | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`sky_custom_fov` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector3` | :ref:`sky_rotation` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_ao_channel_affect` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_detail` | ``0.5`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`ssao_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_horizon` | ``0.06`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_intensity` | ``2.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_light_affect` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_power` | ``1.5`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_radius` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssao_sharpness` | ``0.98`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`ssil_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssil_intensity` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssil_normal_rejection` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssil_radius` | ``5.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssil_sharpness` | ``0.98`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssr_depth_tolerance` | ``0.2`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`ssr_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssr_fade_in` | ``0.15`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`ssr_fade_out` | ``2.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`ssr_max_steps` | ``64`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`tonemap_exposure` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`ToneMapper` | :ref:`tonemap_mode` | ``0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`tonemap_white` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`volumetric_fog_albedo` | ``Color(1, 1, 1, 1)`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_ambient_inject` | ``0.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_anisotropy` | ``0.2`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_density` | ``0.05`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_detail_spread` | ``2.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`volumetric_fog_emission` | ``Color(0, 0, 0, 1)`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_emission_energy` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`volumetric_fog_enabled` | ``false`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_gi_inject` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_length` | ``64.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_sky_affect` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`volumetric_fog_temporal_reprojection_amount` | ``0.9`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`volumetric_fog_temporal_reprojection_enabled` | ``true`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_glow_level` **(** :ref:`int` idx **)** |const| | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_glow_level` **(** :ref:`int` idx, :ref:`float` intensity **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_glow_level` **(** :ref:`int` idx **)** |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_glow_level` **(** :ref:`int` idx, :ref:`float` intensity **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Environment_BGMode: -.. _class_Environment_constant_BG_CLEAR_COLOR: - -.. _class_Environment_constant_BG_COLOR: - -.. _class_Environment_constant_BG_SKY: - -.. _class_Environment_constant_BG_CANVAS: - -.. _class_Environment_constant_BG_KEEP: - -.. _class_Environment_constant_BG_CAMERA_FEED: - -.. _class_Environment_constant_BG_MAX: +.. rst-class:: classref-enumeration enum **BGMode**: -- **BG_CLEAR_COLOR** = **0** --- Clears the background using the clear color defined in :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color`. +.. _class_Environment_constant_BG_CLEAR_COLOR: -- **BG_COLOR** = **1** --- Clears the background using a custom clear color. +.. rst-class:: classref-enumeration-constant -- **BG_SKY** = **2** --- Displays a user-defined sky in the background. +:ref:`BGMode` **BG_CLEAR_COLOR** = ``0`` -- **BG_CANVAS** = **3** --- Displays a :ref:`CanvasLayer` in the background. +Clears the background using the clear color defined in :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color`. -- **BG_KEEP** = **4** --- Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. +.. _class_Environment_constant_BG_COLOR: -- **BG_CAMERA_FEED** = **5** --- Displays a camera feed in the background. +.. rst-class:: classref-enumeration-constant -- **BG_MAX** = **6** --- Represents the size of the :ref:`BGMode` enum. +:ref:`BGMode` **BG_COLOR** = ``1`` + +Clears the background using a custom clear color. + +.. _class_Environment_constant_BG_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BGMode` **BG_SKY** = ``2`` + +Displays a user-defined sky in the background. + +.. _class_Environment_constant_BG_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BGMode` **BG_CANVAS** = ``3`` + +Displays a :ref:`CanvasLayer` in the background. + +.. _class_Environment_constant_BG_KEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BGMode` **BG_KEEP** = ``4`` + +Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. + +.. _class_Environment_constant_BG_CAMERA_FEED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BGMode` **BG_CAMERA_FEED** = ``5`` + +Displays a camera feed in the background. + +.. _class_Environment_constant_BG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BGMode` **BG_MAX** = ``6`` + +Represents the size of the :ref:`BGMode` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Environment_AmbientSource: -.. _class_Environment_constant_AMBIENT_SOURCE_BG: - -.. _class_Environment_constant_AMBIENT_SOURCE_DISABLED: - -.. _class_Environment_constant_AMBIENT_SOURCE_COLOR: - -.. _class_Environment_constant_AMBIENT_SOURCE_SKY: +.. rst-class:: classref-enumeration enum **AmbientSource**: -- **AMBIENT_SOURCE_BG** = **0** --- Gather ambient light from whichever source is specified as the background. +.. _class_Environment_constant_AMBIENT_SOURCE_BG: -- **AMBIENT_SOURCE_DISABLED** = **1** --- Disable ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY`. +.. rst-class:: classref-enumeration-constant -- **AMBIENT_SOURCE_COLOR** = **2** --- Specify a specific :ref:`Color` for ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY`. +:ref:`AmbientSource` **AMBIENT_SOURCE_BG** = ``0`` -- **AMBIENT_SOURCE_SKY** = **3** --- Gather ambient light from the :ref:`Sky` regardless of what the background is. +Gather ambient light from whichever source is specified as the background. + +.. _class_Environment_constant_AMBIENT_SOURCE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AmbientSource` **AMBIENT_SOURCE_DISABLED** = ``1`` + +Disable ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY`. + +.. _class_Environment_constant_AMBIENT_SOURCE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`AmbientSource` **AMBIENT_SOURCE_COLOR** = ``2`` + +Specify a specific :ref:`Color` for ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY`. + +.. _class_Environment_constant_AMBIENT_SOURCE_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`AmbientSource` **AMBIENT_SOURCE_SKY** = ``3`` + +Gather ambient light from the :ref:`Sky` regardless of what the background is. + +.. rst-class:: classref-item-separator ---- .. _enum_Environment_ReflectionSource: -.. _class_Environment_constant_REFLECTION_SOURCE_BG: - -.. _class_Environment_constant_REFLECTION_SOURCE_DISABLED: - -.. _class_Environment_constant_REFLECTION_SOURCE_SKY: +.. rst-class:: classref-enumeration enum **ReflectionSource**: -- **REFLECTION_SOURCE_BG** = **0** --- Use the background for reflections. +.. _class_Environment_constant_REFLECTION_SOURCE_BG: -- **REFLECTION_SOURCE_DISABLED** = **1** --- Disable reflections. This provides a slight performance boost over other options. +.. rst-class:: classref-enumeration-constant -- **REFLECTION_SOURCE_SKY** = **2** --- Use the :ref:`Sky` for reflections regardless of what the background is. +:ref:`ReflectionSource` **REFLECTION_SOURCE_BG** = ``0`` + +Use the background for reflections. + +.. _class_Environment_constant_REFLECTION_SOURCE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReflectionSource` **REFLECTION_SOURCE_DISABLED** = ``1`` + +Disable reflections. This provides a slight performance boost over other options. + +.. _class_Environment_constant_REFLECTION_SOURCE_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReflectionSource` **REFLECTION_SOURCE_SKY** = ``2`` + +Use the :ref:`Sky` for reflections regardless of what the background is. + +.. rst-class:: classref-item-separator ---- .. _enum_Environment_ToneMapper: -.. _class_Environment_constant_TONE_MAPPER_LINEAR: - -.. _class_Environment_constant_TONE_MAPPER_REINHARDT: - -.. _class_Environment_constant_TONE_MAPPER_FILMIC: - -.. _class_Environment_constant_TONE_MAPPER_ACES: +.. rst-class:: classref-enumeration enum **ToneMapper**: -- **TONE_MAPPER_LINEAR** = **0** --- Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. +.. _class_Environment_constant_TONE_MAPPER_LINEAR: -- **TONE_MAPPER_REINHARDT** = **1** --- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. +.. rst-class:: classref-enumeration-constant -- **TONE_MAPPER_FILMIC** = **2** --- Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`TONE_MAPPER_REINHARDT`. +:ref:`ToneMapper` **TONE_MAPPER_LINEAR** = ``0`` -- **TONE_MAPPER_ACES** = **3** --- Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`TONE_MAPPER_REINHARDT` and :ref:`TONE_MAPPER_FILMIC`. +Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. + +.. _class_Environment_constant_TONE_MAPPER_REINHARDT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ToneMapper` **TONE_MAPPER_REINHARDT** = ``1`` + +Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. + +.. _class_Environment_constant_TONE_MAPPER_FILMIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`ToneMapper` **TONE_MAPPER_FILMIC** = ``2`` + +Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`TONE_MAPPER_REINHARDT`. + +.. _class_Environment_constant_TONE_MAPPER_ACES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ToneMapper` **TONE_MAPPER_ACES** = ``3`` + +Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`TONE_MAPPER_REINHARDT` and :ref:`TONE_MAPPER_FILMIC`. \ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. +.. rst-class:: classref-item-separator + ---- .. _enum_Environment_GlowBlendMode: -.. _class_Environment_constant_GLOW_BLEND_MODE_ADDITIVE: - -.. _class_Environment_constant_GLOW_BLEND_MODE_SCREEN: - -.. _class_Environment_constant_GLOW_BLEND_MODE_SOFTLIGHT: - -.. _class_Environment_constant_GLOW_BLEND_MODE_REPLACE: - -.. _class_Environment_constant_GLOW_BLEND_MODE_MIX: +.. rst-class:: classref-enumeration enum **GlowBlendMode**: -- **GLOW_BLEND_MODE_ADDITIVE** = **0** --- Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. +.. _class_Environment_constant_GLOW_BLEND_MODE_ADDITIVE: -- **GLOW_BLEND_MODE_SCREEN** = **1** --- Screen glow blending mode. Increases brightness, used frequently with bloom. +.. rst-class:: classref-enumeration-constant -- **GLOW_BLEND_MODE_SOFTLIGHT** = **2** --- Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). +:ref:`GlowBlendMode` **GLOW_BLEND_MODE_ADDITIVE** = ``0`` -- **GLOW_BLEND_MODE_REPLACE** = **3** --- Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. +Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. -- **GLOW_BLEND_MODE_MIX** = **4** --- Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. +.. _class_Environment_constant_GLOW_BLEND_MODE_SCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlowBlendMode` **GLOW_BLEND_MODE_SCREEN** = ``1`` + +Screen glow blending mode. Increases brightness, used frequently with bloom. + +.. _class_Environment_constant_GLOW_BLEND_MODE_SOFTLIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlowBlendMode` **GLOW_BLEND_MODE_SOFTLIGHT** = ``2`` + +Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). + +.. _class_Environment_constant_GLOW_BLEND_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlowBlendMode` **GLOW_BLEND_MODE_REPLACE** = ``3`` + +Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. + +.. _class_Environment_constant_GLOW_BLEND_MODE_MIX: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlowBlendMode` **GLOW_BLEND_MODE_MIX** = ``4`` + +Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. + +.. rst-class:: classref-item-separator ---- .. _enum_Environment_SDFGIYScale: -.. _class_Environment_constant_SDFGI_Y_SCALE_50_PERCENT: - -.. _class_Environment_constant_SDFGI_Y_SCALE_75_PERCENT: - -.. _class_Environment_constant_SDFGI_Y_SCALE_100_PERCENT: +.. rst-class:: classref-enumeration enum **SDFGIYScale**: -- **SDFGI_Y_SCALE_50_PERCENT** = **0** --- Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. +.. _class_Environment_constant_SDFGI_Y_SCALE_50_PERCENT: -- **SDFGI_Y_SCALE_75_PERCENT** = **1** --- Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. +.. rst-class:: classref-enumeration-constant -- **SDFGI_Y_SCALE_100_PERCENT** = **2** --- Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. +:ref:`SDFGIYScale` **SDFGI_Y_SCALE_50_PERCENT** = ``0`` + +Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. + +.. _class_Environment_constant_SDFGI_Y_SCALE_75_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFGIYScale` **SDFGI_Y_SCALE_75_PERCENT** = ``1`` + +Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. + +.. _class_Environment_constant_SDFGI_Y_SCALE_100_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFGIYScale` **SDFGI_Y_SCALE_100_PERCENT** = ``2`` + +Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Environment_property_adjustment_brightness: -- :ref:`float` **adjustment_brightness** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------------+ -| *Setter* | set_adjustment_brightness(value) | -+-----------+----------------------------------+ -| *Getter* | get_adjustment_brightness() | -+-----------+----------------------------------+ +:ref:`float` **adjustment_brightness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_adjustment_brightness** **(** :ref:`float` value **)** +- :ref:`float` **get_adjustment_brightness** **(** **)** The global brightness value of the rendered scene. Effective only if ``adjustment_enabled`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_adjustment_color_correction: -- :ref:`Texture` **adjustment_color_correction** +.. rst-class:: classref-property -+----------+----------------------------------------+ -| *Setter* | set_adjustment_color_correction(value) | -+----------+----------------------------------------+ -| *Getter* | get_adjustment_color_correction() | -+----------+----------------------------------------+ +:ref:`Texture` **adjustment_color_correction** + +.. rst-class:: classref-property-setget + +- void **set_adjustment_color_correction** **(** :ref:`Texture` value **)** +- :ref:`Texture` **get_adjustment_color_correction** **(** **)** The :ref:`Texture2D` or :ref:`Texture3D` lookup table (LUT) to use for the built-in post-process color grading. Can use a :ref:`GradientTexture1D` for a 1-dimensional LUT, or a :ref:`Texture3D` for a more complex LUT. Effective only if ``adjustment_enabled`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_adjustment_contrast: -- :ref:`float` **adjustment_contrast** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------------+ -| *Setter* | set_adjustment_contrast(value) | -+-----------+--------------------------------+ -| *Getter* | get_adjustment_contrast() | -+-----------+--------------------------------+ +:ref:`float` **adjustment_contrast** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_adjustment_contrast** **(** :ref:`float` value **)** +- :ref:`float` **get_adjustment_contrast** **(** **)** The global contrast value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_adjustment_enabled: -- :ref:`bool` **adjustment_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_adjustment_enabled(value) | -+-----------+-------------------------------+ -| *Getter* | is_adjustment_enabled() | -+-----------+-------------------------------+ +:ref:`bool` **adjustment_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_adjustment_enabled** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_adjustment_saturation: -- :ref:`float` **adjustment_saturation** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------------+ -| *Setter* | set_adjustment_saturation(value) | -+-----------+----------------------------------+ -| *Getter* | get_adjustment_saturation() | -+-----------+----------------------------------+ +:ref:`float` **adjustment_saturation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_adjustment_saturation** **(** :ref:`float` value **)** +- :ref:`float` **get_adjustment_saturation** **(** **)** The global color saturation value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ambient_light_color: -- :ref:`Color` **ambient_light_color** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+--------------------------------+ -| *Setter* | set_ambient_light_color(value) | -+-----------+--------------------------------+ -| *Getter* | get_ambient_light_color() | -+-----------+--------------------------------+ +:ref:`Color` **ambient_light_color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_ambient_light_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_ambient_light_color** **(** **)** The ambient light's :ref:`Color`. Only effective if :ref:`ambient_light_sky_contribution` is lower than ``1.0`` (exclusive). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ambient_light_energy: -- :ref:`float` **ambient_light_energy** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------------+ -| *Setter* | set_ambient_light_energy(value) | -+-----------+---------------------------------+ -| *Getter* | get_ambient_light_energy() | -+-----------+---------------------------------+ +:ref:`float` **ambient_light_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_ambient_light_energy** **(** :ref:`float` value **)** +- :ref:`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` is lower than ``1.0`` (exclusive). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ambient_light_sky_contribution: -- :ref:`float` **ambient_light_sky_contribution** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------------+ -| *Setter* | set_ambient_light_sky_contribution(value) | -+-----------+-------------------------------------------+ -| *Getter* | get_ambient_light_sky_contribution() | -+-----------+-------------------------------------------+ +:ref:`float` **ambient_light_sky_contribution** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_ambient_light_sky_contribution** **(** :ref:`float` value **)** +- :ref:`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. \ **Note:** :ref:`ambient_light_sky_contribution` is internally clamped between ``0.0`` and ``1.0`` (inclusive). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ambient_light_source: -- :ref:`AmbientSource` **ambient_light_source** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_ambient_source(value) | -+-----------+---------------------------+ -| *Getter* | get_ambient_source() | -+-----------+---------------------------+ +:ref:`AmbientSource` **ambient_light_source** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_ambient_source** **(** :ref:`AmbientSource` value **)** +- :ref:`AmbientSource` **get_ambient_source** **(** **)** The ambient light source to use for rendering materials and global illumination. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_background_camera_feed_id: -- :ref:`int` **background_camera_feed_id** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_camera_feed_id(value) | -+-----------+---------------------------+ -| *Getter* | get_camera_feed_id() | -+-----------+---------------------------+ +:ref:`int` **background_camera_feed_id** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_camera_feed_id** **(** :ref:`int` value **)** +- :ref:`int` **get_camera_feed_id** **(** **)** The ID of the camera feed to show in the background. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_background_canvas_max_layer: -- :ref:`int` **background_canvas_max_layer** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_canvas_max_layer(value) | -+-----------+-----------------------------+ -| *Getter* | get_canvas_max_layer() | -+-----------+-----------------------------+ +:ref:`int` **background_canvas_max_layer** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_canvas_max_layer** **(** :ref:`int` value **)** +- :ref:`int` **get_canvas_max_layer** **(** **)** The maximum layer ID to display. Only effective when using the :ref:`BG_CANVAS` background mode. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_background_color: -- :ref:`Color` **background_color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_bg_color(value) | -+-----------+-----------------------+ -| *Getter* | get_bg_color() | -+-----------+-----------------------+ +:ref:`Color` **background_color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_bg_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_bg_color** **(** **)** The :ref:`Color` displayed for clear areas of the scene. Only effective when using the :ref:`BG_COLOR` background mode. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_background_energy_multiplier: -- :ref:`float` **background_energy_multiplier** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------------+ -| *Setter* | set_bg_energy_multiplier(value) | -+-----------+---------------------------------+ -| *Getter* | get_bg_energy_multiplier() | -+-----------+---------------------------------+ +:ref:`float` **background_energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_bg_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_bg_energy_multiplier** **(** **)** Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_background_intensity: -- :ref:`float` **background_intensity** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``30000.0`` | -+-----------+-------------------------+ -| *Setter* | set_bg_intensity(value) | -+-----------+-------------------------+ -| *Getter* | get_bg_intensity() | -+-----------+-------------------------+ +:ref:`float` **background_intensity** = ``30000.0`` + +.. rst-class:: classref-property-setget + +- void **set_bg_intensity** **(** :ref:`float` value **)** +- :ref:`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` is enabled. The default value is roughly equivalent to the sky at midday. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_background_mode: -- :ref:`BGMode` **background_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_background(value) | -+-----------+-----------------------+ -| *Getter* | get_background() | -+-----------+-----------------------+ +:ref:`BGMode` **background_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_background** **(** :ref:`BGMode` value **)** +- :ref:`BGMode` **get_background** **(** **)** The background mode. See :ref:`BGMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_aerial_perspective: -- :ref:`float` **fog_aerial_perspective** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_fog_aerial_perspective(value) | -+-----------+-----------------------------------+ -| *Getter* | get_fog_aerial_perspective() | -+-----------+-----------------------------------+ +:ref:`float` **fog_aerial_perspective** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_fog_aerial_perspective** **(** :ref:`float` value **)** +- :ref:`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`. This has a small performance cost when set above ``0.0``. Must have :ref:`background_mode` set to :ref:`BG_SKY`. This is useful to simulate `aerial perspective `__ in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to ``1.0``, the fog color comes completely from the :ref:`Sky`. If set to ``0.0``, aerial perspective is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_density: -- :ref:`float` **fog_density** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.01`` | -+-----------+------------------------+ -| *Setter* | set_fog_density(value) | -+-----------+------------------------+ -| *Getter* | get_fog_density() | -+-----------+------------------------+ +:ref:`float` **fog_density** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_fog_density** **(** :ref:`float` value **)** +- :ref:`float` **get_fog_density** **(** **)** The *exponential* fog density to use. Higher values result in a more dense fog. Fog rendering is exponential as in real life. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_enabled: -- :ref:`bool` **fog_enabled** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_fog_enabled(value) | -+-----------+------------------------+ -| *Getter* | is_fog_enabled() | -+-----------+------------------------+ +:ref:`bool` **fog_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_fog_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_fog_enabled** **(** **)** If ``true``, fog effects are enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_height: -- :ref:`float` **fog_height** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_fog_height(value) | -+-----------+-----------------------+ -| *Getter* | get_fog_height() | -+-----------+-----------------------+ +:ref:`float` **fog_height** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_fog_height** **(** :ref:`float` value **)** +- :ref:`float` **get_fog_height** **(** **)** The height at which the height fog effect begins. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_height_density: -- :ref:`float` **fog_height_density** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_fog_height_density(value) | -+-----------+-------------------------------+ -| *Getter* | get_fog_height_density() | -+-----------+-------------------------------+ +:ref:`float` **fog_height_density** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_fog_height_density** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_light_color: -- :ref:`Color` **fog_light_color** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``Color(0.518, 0.553, 0.608, 1)`` | -+-----------+-----------------------------------+ -| *Setter* | set_fog_light_color(value) | -+-----------+-----------------------------------+ -| *Getter* | get_fog_light_color() | -+-----------+-----------------------------------+ +:ref:`Color` **fog_light_color** = ``Color(0.518, 0.553, 0.608, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_fog_light_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_fog_light_color** **(** **)** The fog's color. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_light_energy: -- :ref:`float` **fog_light_energy** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------------+ -| *Setter* | set_fog_light_energy(value) | -+-----------+-----------------------------+ -| *Getter* | get_fog_light_energy() | -+-----------+-----------------------------+ +:ref:`float` **fog_light_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_fog_light_energy** **(** :ref:`float` value **)** +- :ref:`float` **get_fog_light_energy** **(** **)** The fog's brightness. Higher values result in brighter fog. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_sky_affect: -- :ref:`float` **fog_sky_affect** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------+ -| *Setter* | set_fog_sky_affect(value) | -+-----------+---------------------------+ -| *Getter* | get_fog_sky_affect() | -+-----------+---------------------------+ +:ref:`float` **fog_sky_affect** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_fog_sky_affect** **(** :ref:`float` value **)** +- :ref:`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. \ **Note:** :ref:`fog_sky_affect` has no visual effect if :ref:`fog_aerial_perspective` is ``1.0``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_fog_sun_scatter: -- :ref:`float` **fog_sun_scatter** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_fog_sun_scatter(value) | -+-----------+----------------------------+ -| *Getter* | get_fog_sun_scatter() | -+-----------+----------------------------+ +:ref:`float` **fog_sun_scatter** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_fog_sun_scatter** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_blend_mode: -- :ref:`GlowBlendMode` **glow_blend_mode** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``2`` | -+-----------+----------------------------+ -| *Setter* | set_glow_blend_mode(value) | -+-----------+----------------------------+ -| *Getter* | get_glow_blend_mode() | -+-----------+----------------------------+ +:ref:`GlowBlendMode` **glow_blend_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_glow_blend_mode** **(** :ref:`GlowBlendMode` value **)** +- :ref:`GlowBlendMode` **get_glow_blend_mode** **(** **)** The glow blending mode. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_bloom: -- :ref:`float` **glow_bloom** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_bloom(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_bloom() | -+-----------+-----------------------+ +:ref:`float` **glow_bloom** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_bloom** **(** :ref:`float` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_enabled: -- :ref:`bool` **glow_enabled** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_glow_enabled(value) | -+-----------+-------------------------+ -| *Getter* | is_glow_enabled() | -+-----------+-------------------------+ +:ref:`bool` **glow_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_glow_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_glow_enabled** **(** **)** If ``true``, the glow effect is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_hdr_luminance_cap: -- :ref:`float` **glow_hdr_luminance_cap** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``12.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_glow_hdr_luminance_cap(value) | -+-----------+-----------------------------------+ -| *Getter* | get_glow_hdr_luminance_cap() | -+-----------+-----------------------------------+ +:ref:`float` **glow_hdr_luminance_cap** = ``12.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_hdr_luminance_cap** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_hdr_scale: -- :ref:`float` **glow_hdr_scale** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``2.0`` | -+-----------+---------------------------------+ -| *Setter* | set_glow_hdr_bleed_scale(value) | -+-----------+---------------------------------+ -| *Getter* | get_glow_hdr_bleed_scale() | -+-----------+---------------------------------+ +:ref:`float` **glow_hdr_scale** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_hdr_bleed_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_glow_hdr_bleed_scale** **(** **)** The bleed scale of the HDR glow. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_hdr_threshold: -- :ref:`float` **glow_hdr_threshold** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_glow_hdr_bleed_threshold(value) | -+-----------+-------------------------------------+ -| *Getter* | get_glow_hdr_bleed_threshold() | -+-----------+-------------------------------------+ +:ref:`float` **glow_hdr_threshold** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_hdr_bleed_threshold** **(** :ref:`float` value **)** +- :ref:`float` **get_glow_hdr_bleed_threshold** **(** **)** The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below ``1.0`` for glow to be visible. A value of ``0.9`` works well in this case. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_intensity: -- :ref:`float` **glow_intensity** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.8`` | -+-----------+---------------------------+ -| *Setter* | set_glow_intensity(value) | -+-----------+---------------------------+ -| *Getter* | get_glow_intensity() | -+-----------+---------------------------+ +:ref:`float` **glow_intensity** = ``0.8`` + +.. rst-class:: classref-property-setget + +- void **set_glow_intensity** **(** :ref:`float` value **)** +- :ref:`float` **get_glow_intensity** **(** **)** The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to ``1.5`` to compensate for the lack of HDR rendering. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_levels/1: -- :ref:`float` **glow_levels/1** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_level(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_level() | -+-----------+-----------------------+ +:ref:`float` **glow_levels/1** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| The intensity of the 1st level of glow. This is the most "local" level (least blurry). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_levels/2: -- :ref:`float` **glow_levels/2** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_level(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_level() | -+-----------+-----------------------+ +:ref:`float` **glow_levels/2** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| The intensity of the 2nd level of glow. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_levels/3: -- :ref:`float` **glow_levels/3** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_level(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_level() | -+-----------+-----------------------+ +:ref:`float` **glow_levels/3** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| The intensity of the 3rd level of glow. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_levels/4: -- :ref:`float` **glow_levels/4** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_level(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_level() | -+-----------+-----------------------+ +:ref:`float` **glow_levels/4** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| The intensity of the 4th level of glow. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_levels/5: -- :ref:`float` **glow_levels/5** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_level(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_level() | -+-----------+-----------------------+ +:ref:`float` **glow_levels/5** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| The intensity of the 5th level of glow. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_levels/6: -- :ref:`float` **glow_levels/6** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_level(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_level() | -+-----------+-----------------------+ +:ref:`float` **glow_levels/6** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| The intensity of the 6th level of glow. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_levels/7: -- :ref:`float` **glow_levels/7** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_glow_level(value) | -+-----------+-----------------------+ -| *Getter* | get_glow_level() | -+-----------+-----------------------+ +:ref:`float` **glow_levels/7** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| The intensity of the 7th level of glow. This is the most "global" level (blurriest). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_map: -- :ref:`Texture` **glow_map** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_glow_map(value) | -+----------+---------------------+ -| *Getter* | get_glow_map() | -+----------+---------------------+ +:ref:`Texture` **glow_map** + +.. rst-class:: classref-property-setget + +- void **set_glow_map** **(** :ref:`Texture` value **)** +- :ref:`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`. 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). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_map_strength: -- :ref:`float` **glow_map_strength** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0.8`` | -+-----------+------------------------------+ -| *Setter* | set_glow_map_strength(value) | -+-----------+------------------------------+ -| *Getter* | get_glow_map_strength() | -+-----------+------------------------------+ +:ref:`float` **glow_map_strength** = ``0.8`` + +.. rst-class:: classref-property-setget + +- void **set_glow_map_strength** **(** :ref:`float` value **)** +- :ref:`float` **get_glow_map_strength** **(** **)** How strong of an impact the :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_mix: -- :ref:`float` **glow_mix** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.05`` | -+-----------+---------------------+ -| *Setter* | set_glow_mix(value) | -+-----------+---------------------+ -| *Getter* | get_glow_mix() | -+-----------+---------------------+ +:ref:`float` **glow_mix** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_glow_mix** **(** :ref:`float` value **)** +- :ref:`float` **get_glow_mix** **(** **)** When using the :ref:`GLOW_BLEND_MODE_MIX` :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_normalized: -- :ref:`bool` **glow_normalized** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_glow_normalized(value) | -+-----------+----------------------------+ -| *Getter* | is_glow_normalized() | -+-----------+----------------------------+ +:ref:`bool` **glow_normalized** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_glow_normalized** **(** :ref:`bool` value **)** +- :ref:`bool` **is_glow_normalized** **(** **)** If ``true``, glow levels will be normalized so that summed together their intensities equal ``1.0``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_glow_strength: -- :ref:`float` **glow_strength** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_glow_strength(value) | -+-----------+--------------------------+ -| *Getter* | get_glow_strength() | -+-----------+--------------------------+ +:ref:`float` **glow_strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_glow_strength** **(** :ref:`float` value **)** +- :ref:`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 OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_reflected_light_source: -- :ref:`ReflectionSource` **reflected_light_source** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_reflection_source(value) | -+-----------+------------------------------+ -| *Getter* | get_reflection_source() | -+-----------+------------------------------+ +:ref:`ReflectionSource` **reflected_light_source** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_reflection_source** **(** :ref:`ReflectionSource` value **)** +- :ref:`ReflectionSource` **get_reflection_source** **(** **)** The reflected (specular) light source. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_bounce_feedback: -- :ref:`float` **sdfgi_bounce_feedback** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0.5`` | -+-----------+----------------------------------+ -| *Setter* | set_sdfgi_bounce_feedback(value) | -+-----------+----------------------------------+ -| *Getter* | get_sdfgi_bounce_feedback() | -+-----------+----------------------------------+ +:ref:`float` **sdfgi_bounce_feedback** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_bounce_feedback** **(** :ref:`float` value **)** +- :ref:`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` generally has no performance impact. See also :ref:`sdfgi_energy`. @@ -1114,51 +1313,54 @@ The energy multiplier applied to light every time it bounces from a surface when \ **Note:** If :ref:`sdfgi_bounce_feedback` is ``0.0``, indirect lighting will not be represented in reflections as light will only bounce one time. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_cascade0_distance: -- :ref:`float` **sdfgi_cascade0_distance** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``12.8`` | -+-----------+------------------------------------+ -| *Setter* | set_sdfgi_cascade0_distance(value) | -+-----------+------------------------------------+ -| *Getter* | get_sdfgi_cascade0_distance() | -+-----------+------------------------------------+ +:ref:`float` **sdfgi_cascade0_distance** = ``12.8`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_cascade0_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_sdfgi_cascade0_distance** **(** **)** **Note:** This property is linked to :ref:`sdfgi_min_cell_size` and :ref:`sdfgi_max_distance`. Changing its value will automatically change those properties as well. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_cascades: -- :ref:`int` **sdfgi_cascades** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4`` | -+-----------+---------------------------+ -| *Setter* | set_sdfgi_cascades(value) | -+-----------+---------------------------+ -| *Getter* | get_sdfgi_cascades() | -+-----------+---------------------------+ +:ref:`int` **sdfgi_cascades** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_cascades** **(** :ref:`int` value **)** +- :ref:`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` can often be decreased between ``1`` and ``4`` to improve performance. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_enabled: -- :ref:`bool` **sdfgi_enabled** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_sdfgi_enabled(value) | -+-----------+--------------------------+ -| *Getter* | is_sdfgi_enabled() | -+-----------+--------------------------+ +:ref:`bool` **sdfgi_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_sdfgi_enabled** **(** **)** If ``true``, enables signed distance field global illumination for meshes that have their :ref:`GeometryInstance3D.gi_mode` set to :ref:`GeometryInstance3D.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. @@ -1166,599 +1368,638 @@ If ``true``, enables signed distance field global illumination for meshes that h \ **Note:** Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_energy: -- :ref:`float` **sdfgi_energy** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_sdfgi_energy(value) | -+-----------+-------------------------+ -| *Getter* | get_sdfgi_energy() | -+-----------+-------------------------+ +:ref:`float` **sdfgi_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_energy** **(** :ref:`float` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_max_distance: -- :ref:`float` **sdfgi_max_distance** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``204.8`` | -+-----------+-------------------------------+ -| *Setter* | set_sdfgi_max_distance(value) | -+-----------+-------------------------------+ -| *Getter* | get_sdfgi_max_distance() | -+-----------+-------------------------------+ +:ref:`float` **sdfgi_max_distance** = ``204.8`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_max_distance** **(** :ref:`float` value **)** +- :ref:`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` will be used as a fallback. \ **Note:** This property is linked to :ref:`sdfgi_min_cell_size` and :ref:`sdfgi_cascade0_distance`. Changing its value will automatically change those properties as well. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_min_cell_size: -- :ref:`float` **sdfgi_min_cell_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.2`` | -+-----------+--------------------------------+ -| *Setter* | set_sdfgi_min_cell_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_sdfgi_min_cell_size() | -+-----------+--------------------------------+ +:ref:`float` **sdfgi_min_cell_size** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_min_cell_size** **(** :ref:`float` value **)** +- :ref:`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. \ **Note:** This property is linked to :ref:`sdfgi_max_distance` and :ref:`sdfgi_cascade0_distance`. Changing its value will automatically change those properties as well. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_normal_bias: -- :ref:`float` **sdfgi_normal_bias** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1.1`` | -+-----------+------------------------------+ -| *Setter* | set_sdfgi_normal_bias(value) | -+-----------+------------------------------+ -| *Getter* | get_sdfgi_normal_bias() | -+-----------+------------------------------+ +:ref:`float` **sdfgi_normal_bias** = ``1.1`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_normal_bias** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_probe_bias: -- :ref:`float` **sdfgi_probe_bias** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1.1`` | -+-----------+-----------------------------+ -| *Setter* | set_sdfgi_probe_bias(value) | -+-----------+-----------------------------+ -| *Getter* | get_sdfgi_probe_bias() | -+-----------+-----------------------------+ +:ref:`float` **sdfgi_probe_bias** = ``1.1`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_probe_bias** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_read_sky_light: -- :ref:`bool` **sdfgi_read_sky_light** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_sdfgi_read_sky_light(value) | -+-----------+---------------------------------+ -| *Getter* | is_sdfgi_reading_sky_light() | -+-----------+---------------------------------+ +:ref:`bool` **sdfgi_read_sky_light** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_read_sky_light** **(** :ref:`bool` value **)** +- :ref:`bool` **is_sdfgi_reading_sky_light** **(** **)** If ``true``, SDFGI takes the environment lighting into account. This should be set to ``false`` for interior scenes. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_use_occlusion: -- :ref:`bool` **sdfgi_use_occlusion** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_sdfgi_use_occlusion(value) | -+-----------+--------------------------------+ -| *Getter* | is_sdfgi_using_occlusion() | -+-----------+--------------------------------+ +:ref:`bool` **sdfgi_use_occlusion** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_use_occlusion** **(** :ref:`bool` value **)** +- :ref:`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` has a performance impact and should only be enabled when needed. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sdfgi_y_scale: -- :ref:`SDFGIYScale` **sdfgi_y_scale** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------+ -| *Setter* | set_sdfgi_y_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_sdfgi_y_scale() | -+-----------+--------------------------+ +:ref:`SDFGIYScale` **sdfgi_y_scale** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_sdfgi_y_scale** **(** :ref:`SDFGIYScale` value **)** +- :ref:`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` should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sky: -- :ref:`Sky` **sky** +.. rst-class:: classref-property -+----------+----------------+ -| *Setter* | set_sky(value) | -+----------+----------------+ -| *Getter* | get_sky() | -+----------+----------------+ +:ref:`Sky` **sky** -The :ref:`Sky` resource used for this ``Environment``. +.. rst-class:: classref-property-setget + +- void **set_sky** **(** :ref:`Sky` value **)** +- :ref:`Sky` **get_sky** **(** **)** + +The :ref:`Sky` resource used for this **Environment**. + +.. rst-class:: classref-item-separator ---- .. _class_Environment_property_sky_custom_fov: -- :ref:`float` **sky_custom_fov** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------+ -| *Setter* | set_sky_custom_fov(value) | -+-----------+---------------------------+ -| *Getter* | get_sky_custom_fov() | -+-----------+---------------------------+ +:ref:`float` **sky_custom_fov** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_sky_custom_fov** **(** :ref:`float` value **)** +- :ref:`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` is used for sky rendering. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_sky_rotation: -- :ref:`Vector3` **sky_rotation** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_sky_rotation(value) | -+-----------+-------------------------+ -| *Getter* | get_sky_rotation() | -+-----------+-------------------------+ +:ref:`Vector3` **sky_rotation** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_sky_rotation** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_sky_rotation** **(** **)** The rotation to use for sky rendering. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_ao_channel_affect: -- :ref:`float` **ssao_ao_channel_affect** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_ssao_ao_channel_affect(value) | -+-----------+-----------------------------------+ -| *Getter* | get_ssao_ao_channel_affect() | -+-----------+-----------------------------------+ +:ref:`float` **ssao_ao_channel_affect** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_ao_channel_affect** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_detail: -- :ref:`float` **ssao_detail** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.5`` | -+-----------+------------------------+ -| *Setter* | set_ssao_detail(value) | -+-----------+------------------------+ -| *Getter* | get_ssao_detail() | -+-----------+------------------------+ +:ref:`float` **ssao_detail** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_detail** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_enabled: -- :ref:`bool` **ssao_enabled** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_ssao_enabled(value) | -+-----------+-------------------------+ -| *Getter* | is_ssao_enabled() | -+-----------+-------------------------+ +:ref:`bool` **ssao_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_enabled** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_horizon: -- :ref:`float` **ssao_horizon** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.06`` | -+-----------+-------------------------+ -| *Setter* | set_ssao_horizon(value) | -+-----------+-------------------------+ -| *Getter* | get_ssao_horizon() | -+-----------+-------------------------+ +:ref:`float` **ssao_horizon** = ``0.06`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_horizon** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_intensity: -- :ref:`float` **ssao_intensity** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``2.0`` | -+-----------+---------------------------+ -| *Setter* | set_ssao_intensity(value) | -+-----------+---------------------------+ -| *Getter* | get_ssao_intensity() | -+-----------+---------------------------+ +:ref:`float` **ssao_intensity** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_intensity** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_light_affect: -- :ref:`float` **ssao_light_affect** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_ssao_direct_light_affect(value) | -+-----------+-------------------------------------+ -| *Getter* | get_ssao_direct_light_affect() | -+-----------+-------------------------------------+ +:ref:`float` **ssao_light_affect** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_direct_light_affect** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_power: -- :ref:`float` **ssao_power** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.5`` | -+-----------+-----------------------+ -| *Setter* | set_ssao_power(value) | -+-----------+-----------------------+ -| *Getter* | get_ssao_power() | -+-----------+-----------------------+ +:ref:`float` **ssao_power** = ``1.5`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_power** **(** :ref:`float` value **)** +- :ref:`float` **get_ssao_power** **(** **)** The distribution of occlusion. A higher value results in darker occlusion, similar to :ref:`ssao_intensity`, but with a sharper falloff. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_radius: -- :ref:`float` **ssao_radius** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_ssao_radius(value) | -+-----------+------------------------+ -| *Getter* | get_ssao_radius() | -+-----------+------------------------+ +:ref:`float` **ssao_radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_radius** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssao_sharpness: -- :ref:`float` **ssao_sharpness** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.98`` | -+-----------+---------------------------+ -| *Setter* | set_ssao_sharpness(value) | -+-----------+---------------------------+ -| *Getter* | get_ssao_sharpness() | -+-----------+---------------------------+ +:ref:`float` **ssao_sharpness** = ``0.98`` + +.. rst-class:: classref-property-setget + +- void **set_ssao_sharpness** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssil_enabled: -- :ref:`bool` **ssil_enabled** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_ssil_enabled(value) | -+-----------+-------------------------+ -| *Getter* | is_ssil_enabled() | -+-----------+-------------------------+ +:ref:`bool` **ssil_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_ssil_enabled** **(** :ref:`bool` value **)** +- :ref:`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`. Screen-space indirect lighting is not affected by individual light's :ref:`Light3D.light_indirect_energy`. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssil_intensity: -- :ref:`float` **ssil_intensity** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------+ -| *Setter* | set_ssil_intensity(value) | -+-----------+---------------------------+ -| *Getter* | get_ssil_intensity() | -+-----------+---------------------------+ +:ref:`float` **ssil_intensity** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssil_intensity** **(** :ref:`float` value **)** +- :ref:`float` **get_ssil_intensity** **(** **)** The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssil_normal_rejection: -- :ref:`float` **ssil_normal_rejection** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------------+ -| *Setter* | set_ssil_normal_rejection(value) | -+-----------+----------------------------------+ -| *Getter* | get_ssil_normal_rejection() | -+-----------+----------------------------------+ +:ref:`float` **ssil_normal_rejection** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssil_normal_rejection** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssil_radius: -- :ref:`float` **ssil_radius** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``5.0`` | -+-----------+------------------------+ -| *Setter* | set_ssil_radius(value) | -+-----------+------------------------+ -| *Getter* | get_ssil_radius() | -+-----------+------------------------+ +:ref:`float` **ssil_radius** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssil_radius** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssil_sharpness: -- :ref:`float` **ssil_sharpness** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.98`` | -+-----------+---------------------------+ -| *Setter* | set_ssil_sharpness(value) | -+-----------+---------------------------+ -| *Getter* | get_ssil_sharpness() | -+-----------+---------------------------+ +:ref:`float` **ssil_sharpness** = ``0.98`` + +.. rst-class:: classref-property-setget + +- void **set_ssil_sharpness** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssr_depth_tolerance: -- :ref:`float` **ssr_depth_tolerance** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.2`` | -+-----------+--------------------------------+ -| *Setter* | set_ssr_depth_tolerance(value) | -+-----------+--------------------------------+ -| *Getter* | get_ssr_depth_tolerance() | -+-----------+--------------------------------+ +:ref:`float` **ssr_depth_tolerance** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_ssr_depth_tolerance** **(** :ref:`float` value **)** +- :ref:`float` **get_ssr_depth_tolerance** **(** **)** The depth tolerance for screen-space reflections. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssr_enabled: -- :ref:`bool` **ssr_enabled** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_ssr_enabled(value) | -+-----------+------------------------+ -| *Getter* | is_ssr_enabled() | -+-----------+------------------------+ +:ref:`bool` **ssr_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_ssr_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_ssr_enabled** **(** **)** If ``true``, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from :ref:`VoxelGI`\ s or :ref:`ReflectionProbe`\ s, but are slower and can't reflect surfaces occluded by others. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssr_fade_in: -- :ref:`float` **ssr_fade_in** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.15`` | -+-----------+------------------------+ -| *Setter* | set_ssr_fade_in(value) | -+-----------+------------------------+ -| *Getter* | get_ssr_fade_in() | -+-----------+------------------------+ +:ref:`float` **ssr_fade_in** = ``0.15`` + +.. rst-class:: classref-property-setget + +- void **set_ssr_fade_in** **(** :ref:`float` value **)** +- :ref:`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``). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssr_fade_out: -- :ref:`float` **ssr_fade_out** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------------+ -| *Setter* | set_ssr_fade_out(value) | -+-----------+-------------------------+ -| *Getter* | get_ssr_fade_out() | -+-----------+-------------------------+ +:ref:`float` **ssr_fade_out** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_ssr_fade_out** **(** :ref:`float` value **)** +- :ref:`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``). +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_ssr_max_steps: -- :ref:`int` **ssr_max_steps** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``64`` | -+-----------+--------------------------+ -| *Setter* | set_ssr_max_steps(value) | -+-----------+--------------------------+ -| *Getter* | get_ssr_max_steps() | -+-----------+--------------------------+ +:ref:`int` **ssr_max_steps** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_ssr_max_steps** **(** :ref:`int` value **)** +- :ref:`int` **get_ssr_max_steps** **(** **)** The maximum number of steps for screen-space reflections. Higher values are slower. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_tonemap_exposure: -- :ref:`float` **tonemap_exposure** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------------+ -| *Setter* | set_tonemap_exposure(value) | -+-----------+-----------------------------+ -| *Getter* | get_tonemap_exposure() | -+-----------+-----------------------------+ +:ref:`float` **tonemap_exposure** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_tonemap_exposure** **(** :ref:`float` value **)** +- :ref:`float` **get_tonemap_exposure** **(** **)** The default exposure used for tonemapping. Higher values result in a brighter image. See also :ref:`tonemap_white`. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_tonemap_mode: -- :ref:`ToneMapper` **tonemap_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_tonemapper(value) | -+-----------+-----------------------+ -| *Getter* | get_tonemapper() | -+-----------+-----------------------+ +:ref:`ToneMapper` **tonemap_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tonemapper** **(** :ref:`ToneMapper` value **)** +- :ref:`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.) +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_tonemap_white: -- :ref:`float` **tonemap_white** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_tonemap_white(value) | -+-----------+--------------------------+ -| *Getter* | get_tonemap_white() | -+-----------+--------------------------+ +:ref:`float` **tonemap_white** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_tonemap_white** **(** :ref:`float` value **)** +- :ref:`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` isn't set to :ref:`TONE_MAPPER_LINEAR`. See also :ref:`tonemap_exposure`. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_albedo: -- :ref:`Color` **volumetric_fog_albedo** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+----------------------------------+ -| *Setter* | set_volumetric_fog_albedo(value) | -+-----------+----------------------------------+ -| *Getter* | get_volumetric_fog_albedo() | -+-----------+----------------------------------+ +:ref:`Color` **volumetric_fog_albedo** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_albedo** **(** :ref:`Color` value **)** +- :ref:`Color` **get_volumetric_fog_albedo** **(** **)** The :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_ambient_inject: -- :ref:`float` **volumetric_fog_ambient_inject** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_volumetric_fog_ambient_inject(value) | -+-----------+------------------------------------------+ -| *Getter* | get_volumetric_fog_ambient_inject() | -+-----------+------------------------------------------+ +:ref:`float` **volumetric_fog_ambient_inject** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_ambient_inject** **(** :ref:`float` value **)** +- :ref:`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` has a small performance cost when set above ``0.0``. \ **Note:** This has no visible effect if :ref:`volumetric_fog_density` is ``0.0`` or if :ref:`volumetric_fog_albedo` is a fully black color. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_anisotropy: -- :ref:`float` **volumetric_fog_anisotropy** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``0.2`` | -+-----------+--------------------------------------+ -| *Setter* | set_volumetric_fog_anisotropy(value) | -+-----------+--------------------------------------+ -| *Getter* | get_volumetric_fog_anisotropy() | -+-----------+--------------------------------------+ +:ref:`float` **volumetric_fog_anisotropy** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_anisotropy** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_density: -- :ref:`float` **volumetric_fog_density** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0.05`` | -+-----------+-----------------------------------+ -| *Setter* | set_volumetric_fog_density(value) | -+-----------+-----------------------------------+ -| *Getter* | get_volumetric_fog_density() | -+-----------+-----------------------------------+ +:ref:`float` **volumetric_fog_density** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_density** **(** :ref:`float` value **)** +- :ref:`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`\ s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life. @@ -1766,85 +2007,90 @@ A value of ``0.0`` disables global volumetric fog while allowing :ref:`FogVolume To make volumetric fog work as a volumetric *lighting* solution, set :ref:`volumetric_fog_density` to the lowest non-zero value (``0.0001``) then increase lights' :ref:`Light3D.light_volumetric_fog_energy` to values between ``10000`` and ``100000`` to compensate for the very low density. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_detail_spread: -- :ref:`float` **volumetric_fog_detail_spread** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``2.0`` | -+-----------+-----------------------------------------+ -| *Setter* | set_volumetric_fog_detail_spread(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_volumetric_fog_detail_spread() | -+-----------+-----------------------------------------+ +:ref:`float` **volumetric_fog_detail_spread** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_detail_spread** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_emission: -- :ref:`Color` **volumetric_fog_emission** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+------------------------------------+ -| *Setter* | set_volumetric_fog_emission(value) | -+-----------+------------------------------------+ -| *Getter* | get_volumetric_fog_emission() | -+-----------+------------------------------------+ +:ref:`Color` **volumetric_fog_emission** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_emission** **(** :ref:`Color` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_emission_energy: -- :ref:`float` **volumetric_fog_emission_energy** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------------+ -| *Setter* | set_volumetric_fog_emission_energy(value) | -+-----------+-------------------------------------------+ -| *Getter* | get_volumetric_fog_emission_energy() | -+-----------+-------------------------------------------+ +:ref:`float` **volumetric_fog_emission_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_emission_energy** **(** :ref:`float` value **)** +- :ref:`float` **get_volumetric_fog_emission_energy** **(** **)** The brightness of the emitted light from the volumetric fog. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_enabled: -- :ref:`bool` **volumetric_fog_enabled** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_volumetric_fog_enabled(value) | -+-----------+-----------------------------------+ -| *Getter* | is_volumetric_fog_enabled() | -+-----------+-----------------------------------+ +:ref:`bool` **volumetric_fog_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_enabled** **(** :ref:`bool` value **)** +- :ref:`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`\ 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. \ **Note:** Volumetric fog is only available in the forward plus renderer. It is not available in the mobile renderer or the compatibility renderer. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_gi_inject: -- :ref:`float` **volumetric_fog_gi_inject** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_volumetric_fog_gi_inject(value) | -+-----------+-------------------------------------+ -| *Getter* | get_volumetric_fog_gi_inject() | -+-----------+-------------------------------------+ +:ref:`float` **volumetric_fog_gi_inject** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_gi_inject** **(** :ref:`float` value **)** +- :ref:`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` has a small performance cost when set above ``0.0``. @@ -1852,86 +2098,102 @@ Scales the strength of Global Illumination used in the volumetric fog's albedo c \ **Note:** Only :ref:`VoxelGI` and SDFGI (:ref:`sdfgi_enabled`) are taken into account when using :ref:`volumetric_fog_gi_inject`. Global illumination from :ref:`LightmapGI`, :ref:`ReflectionProbe` and SSIL (see :ref:`ssil_enabled`) will be ignored by volumetric fog. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_length: -- :ref:`float` **volumetric_fog_length** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``64.0`` | -+-----------+----------------------------------+ -| *Setter* | set_volumetric_fog_length(value) | -+-----------+----------------------------------+ -| *Getter* | get_volumetric_fog_length() | -+-----------+----------------------------------+ +:ref:`float` **volumetric_fog_length** = ``64.0`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_length** **(** :ref:`float` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_sky_affect: -- :ref:`float` **volumetric_fog_sky_affect** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------------------+ -| *Setter* | set_volumetric_fog_sky_affect(value) | -+-----------+--------------------------------------+ -| *Getter* | get_volumetric_fog_sky_affect() | -+-----------+--------------------------------------+ +:ref:`float` **volumetric_fog_sky_affect** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_sky_affect** **(** :ref:`float` value **)** +- :ref:`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. \ **Note:** :ref:`volumetric_fog_sky_affect` also affects :ref:`FogVolume`\ s, even if :ref:`volumetric_fog_density` is ``0.0``. If you notice :ref:`FogVolume`\ s are disappearing when looking towards the sky, set :ref:`volumetric_fog_sky_affect` to ``1.0``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_temporal_reprojection_amount: -- :ref:`float` **volumetric_fog_temporal_reprojection_amount** +.. rst-class:: classref-property -+-----------+--------------------------------------------------------+ -| *Default* | ``0.9`` | -+-----------+--------------------------------------------------------+ -| *Setter* | set_volumetric_fog_temporal_reprojection_amount(value) | -+-----------+--------------------------------------------------------+ -| *Getter* | get_volumetric_fog_temporal_reprojection_amount() | -+-----------+--------------------------------------------------------+ +:ref:`float` **volumetric_fog_temporal_reprojection_amount** = ``0.9`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_temporal_reprojection_amount** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_property_volumetric_fog_temporal_reprojection_enabled: -- :ref:`bool` **volumetric_fog_temporal_reprojection_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------------------------------+ -| *Setter* | set_volumetric_fog_temporal_reprojection_enabled(value) | -+-----------+---------------------------------------------------------+ -| *Getter* | is_volumetric_fog_temporal_reprojection_enabled() | -+-----------+---------------------------------------------------------+ +:ref:`bool` **volumetric_fog_temporal_reprojection_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_volumetric_fog_temporal_reprojection_enabled** **(** :ref:`bool` value **)** +- :ref:`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`\ s and :ref:`Light3D`\ s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving :ref:`FogVolume`\ s or :ref:`Light3D`\ s too fast. Short-lived dynamic lighting effects should have :ref:`Light3D.light_volumetric_fog_energy` set to ``0.0`` to avoid ghosting. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Environment_method_get_glow_level: -- :ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_glow_level** **(** :ref:`int` idx **)** |const| Returns the intensity of the glow level ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Environment_method_set_glow_level: -- void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** +.. rst-class:: classref-method + +void **set_glow_level** **(** :ref:`int` idx, :ref:`float` intensity **)** 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. diff --git a/classes/class_expression.rst b/classes/class_expression.rst index d835b692a..a780bbd40 100644 --- a/classes/class_expression.rst +++ b/classes/class_expression.rst @@ -14,6 +14,8 @@ Expression A class that stores an expression you can execute. +.. rst-class:: classref-introduction-group + Description ----------- @@ -68,51 +70,76 @@ In the following example we use a :ref:`LineEdit` node to write +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`execute` **(** :ref:`Array` inputs=[], :ref:`Object` base_instance=null, :ref:`bool` show_error=true, :ref:`bool` const_calls_only=false **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_error_text` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_execute_failed` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`parse` **(** :ref:`String` expression, :ref:`PackedStringArray` input_names=PackedStringArray() **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`execute` **(** :ref:`Array` inputs=[], :ref:`Object` base_instance=null, :ref:`bool` show_error=true, :ref:`bool` const_calls_only=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_error_text` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_execute_failed` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`parse` **(** :ref:`String` expression, :ref:`PackedStringArray` input_names=PackedStringArray() **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Expression_method_execute: -- :ref:`Variant` **execute** **(** :ref:`Array` inputs=[], :ref:`Object` base_instance=null, :ref:`bool` show_error=true, :ref:`bool` const_calls_only=false **)** +.. rst-class:: classref-method + +:ref:`Variant` **execute** **(** :ref:`Array` inputs=[], :ref:`Object` base_instance=null, :ref:`bool` show_error=true, :ref:`bool` const_calls_only=false **)** Executes the expression that was previously parsed by :ref:`parse` and returns the result. Before you use the returned object, you should check if the method failed by calling :ref:`has_execute_failed`. If you defined input variables in :ref:`parse`, you can specify their values in the inputs array, in the same order. +.. rst-class:: classref-item-separator + ---- .. _class_Expression_method_get_error_text: -- :ref:`String` **get_error_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_error_text** **(** **)** |const| Returns the error text if :ref:`parse` has failed. +.. rst-class:: classref-item-separator + ---- .. _class_Expression_method_has_execute_failed: -- :ref:`bool` **has_execute_failed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_execute_failed** **(** **)** |const| Returns ``true`` if :ref:`execute` has failed. +.. rst-class:: classref-item-separator + ---- .. _class_Expression_method_parse: -- :ref:`Error` **parse** **(** :ref:`String` expression, :ref:`PackedStringArray` input_names=PackedStringArray() **)** +.. rst-class:: classref-method + +:ref:`Error` **parse** **(** :ref:`String` expression, :ref:`PackedStringArray` input_names=PackedStringArray() **)** Parses the expression and returns an :ref:`Error` code. diff --git a/classes/class_fastnoiselite.rst b/classes/class_fastnoiselite.rst index 95c9a11f4..d6855d0bb 100644 --- a/classes/class_fastnoiselite.rst +++ b/classes/class_fastnoiselite.rst @@ -14,6 +14,8 @@ FastNoiseLite Generates noise using the FastNoiseLite library. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,538 +23,704 @@ This class generates noise using the FastNoiseLite library, which is a collectio Most generated noise values are in the range of ``[-1,1]``, however not always. Some of the cellular noise algorithms return results above ``1``. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`CellularDistanceFunction` | :ref:`cellular_distance_function` | ``0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`cellular_jitter` | ``0.45`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`CellularReturnType` | :ref:`cellular_return_type` | ``1`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`domain_warp_amplitude` | ``30.0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`domain_warp_enabled` | ``false`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`domain_warp_fractal_gain` | ``0.5`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`domain_warp_fractal_lacunarity` | ``6.0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`domain_warp_fractal_octaves` | ``5`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`DomainWarpFractalType` | :ref:`domain_warp_fractal_type` | ``1`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`domain_warp_frequency` | ``0.05`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`DomainWarpType` | :ref:`domain_warp_type` | ``0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`fractal_gain` | ``0.5`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`fractal_lacunarity` | ``2.0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`fractal_octaves` | ``5`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`fractal_ping_pong_strength` | ``2.0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`FractalType` | :ref:`fractal_type` | ``1`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`fractal_weighted_strength` | ``0.0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`frequency` | ``0.01`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`NoiseType` | :ref:`noise_type` | ``1`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`offset` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`seed` | ``0`` | -+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`CellularDistanceFunction` | :ref:`cellular_distance_function` | ``0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`cellular_jitter` | ``0.45`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`CellularReturnType` | :ref:`cellular_return_type` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`domain_warp_amplitude` | ``30.0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`domain_warp_enabled` | ``false`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`domain_warp_fractal_gain` | ``0.5`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`domain_warp_fractal_lacunarity` | ``6.0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`domain_warp_fractal_octaves` | ``5`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`DomainWarpFractalType` | :ref:`domain_warp_fractal_type` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`domain_warp_frequency` | ``0.05`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`DomainWarpType` | :ref:`domain_warp_type` | ``0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`fractal_gain` | ``0.5`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`fractal_lacunarity` | ``2.0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`fractal_octaves` | ``5`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`fractal_ping_pong_strength` | ``2.0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`FractalType` | :ref:`fractal_type` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`fractal_weighted_strength` | ``0.0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`frequency` | ``0.01`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`NoiseType` | :ref:`noise_type` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`offset` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`seed` | ``0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_FastNoiseLite_NoiseType: -.. _class_FastNoiseLite_constant_TYPE_VALUE: - -.. _class_FastNoiseLite_constant_TYPE_VALUE_CUBIC: - -.. _class_FastNoiseLite_constant_TYPE_PERLIN: - -.. _class_FastNoiseLite_constant_TYPE_CELLULAR: - -.. _class_FastNoiseLite_constant_TYPE_SIMPLEX: - -.. _class_FastNoiseLite_constant_TYPE_SIMPLEX_SMOOTH: +.. rst-class:: classref-enumeration enum **NoiseType**: -- **TYPE_VALUE** = **5** --- A lattice of points are assigned random values then interpolated based on neighboring values. +.. _class_FastNoiseLite_constant_TYPE_VALUE: -- **TYPE_VALUE_CUBIC** = **4** --- Similar to Value noise, but slower. Has more variance in peaks and valleys. +.. rst-class:: classref-enumeration-constant + +:ref:`NoiseType` **TYPE_VALUE** = ``5`` + +A lattice of points are assigned random values then interpolated based on neighboring values. + +.. _class_FastNoiseLite_constant_TYPE_VALUE_CUBIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`NoiseType` **TYPE_VALUE_CUBIC** = ``4`` + +Similar to Value noise, but slower. Has more variance in peaks and valleys. Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap. -- **TYPE_PERLIN** = **3** --- A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. +.. _class_FastNoiseLite_constant_TYPE_PERLIN: -- **TYPE_CELLULAR** = **2** --- Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. +.. rst-class:: classref-enumeration-constant -- **TYPE_SIMPLEX** = **0** --- As opposed to :ref:`TYPE_PERLIN`, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. +:ref:`NoiseType` **TYPE_PERLIN** = ``3`` -- **TYPE_SIMPLEX_SMOOTH** = **1** --- Modified, higher quality version of :ref:`TYPE_SIMPLEX`, but slower. +A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. + +.. _class_FastNoiseLite_constant_TYPE_CELLULAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`NoiseType` **TYPE_CELLULAR** = ``2`` + +Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. + +.. _class_FastNoiseLite_constant_TYPE_SIMPLEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`NoiseType` **TYPE_SIMPLEX** = ``0`` + +As opposed to :ref:`TYPE_PERLIN`, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. + +.. _class_FastNoiseLite_constant_TYPE_SIMPLEX_SMOOTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`NoiseType` **TYPE_SIMPLEX_SMOOTH** = ``1`` + +Modified, higher quality version of :ref:`TYPE_SIMPLEX`, but slower. + +.. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_FractalType: -.. _class_FastNoiseLite_constant_FRACTAL_NONE: - -.. _class_FastNoiseLite_constant_FRACTAL_FBM: - -.. _class_FastNoiseLite_constant_FRACTAL_RIDGED: - -.. _class_FastNoiseLite_constant_FRACTAL_PING_PONG: +.. rst-class:: classref-enumeration enum **FractalType**: -- **FRACTAL_NONE** = **0** --- No fractal noise. +.. _class_FastNoiseLite_constant_FRACTAL_NONE: -- **FRACTAL_FBM** = **1** --- Method using Fractional Brownian Motion to combine octaves into a fractal. +.. rst-class:: classref-enumeration-constant -- **FRACTAL_RIDGED** = **2** --- Method of combining octaves into a fractal resulting in a "ridged" look. +:ref:`FractalType` **FRACTAL_NONE** = ``0`` -- **FRACTAL_PING_PONG** = **3** --- Method of combining octaves into a fractal with a ping pong effect. +No fractal noise. + +.. _class_FastNoiseLite_constant_FRACTAL_FBM: + +.. rst-class:: classref-enumeration-constant + +:ref:`FractalType` **FRACTAL_FBM** = ``1`` + +Method using Fractional Brownian Motion to combine octaves into a fractal. + +.. _class_FastNoiseLite_constant_FRACTAL_RIDGED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FractalType` **FRACTAL_RIDGED** = ``2`` + +Method of combining octaves into a fractal resulting in a "ridged" look. + +.. _class_FastNoiseLite_constant_FRACTAL_PING_PONG: + +.. rst-class:: classref-enumeration-constant + +:ref:`FractalType` **FRACTAL_PING_PONG** = ``3`` + +Method of combining octaves into a fractal with a ping pong effect. + +.. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_CellularDistanceFunction: -.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN: - -.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN_SQUARED: - -.. _class_FastNoiseLite_constant_DISTANCE_MANHATTAN: - -.. _class_FastNoiseLite_constant_DISTANCE_HYBRID: +.. rst-class:: classref-enumeration enum **CellularDistanceFunction**: -- **DISTANCE_EUCLIDEAN** = **0** --- Euclidean distance to the nearest point. +.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN: -- **DISTANCE_EUCLIDEAN_SQUARED** = **1** --- Squared Euclidean distance to the nearest point. +.. rst-class:: classref-enumeration-constant -- **DISTANCE_MANHATTAN** = **2** --- Manhattan distance (taxicab metric) to the nearest point. +:ref:`CellularDistanceFunction` **DISTANCE_EUCLIDEAN** = ``0`` -- **DISTANCE_HYBRID** = **3** --- Blend of :ref:`DISTANCE_EUCLIDEAN` and :ref:`DISTANCE_MANHATTAN` to give curved cell boundaries +Euclidean distance to the nearest point. + +.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN_SQUARED: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularDistanceFunction` **DISTANCE_EUCLIDEAN_SQUARED** = ``1`` + +Squared Euclidean distance to the nearest point. + +.. _class_FastNoiseLite_constant_DISTANCE_MANHATTAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularDistanceFunction` **DISTANCE_MANHATTAN** = ``2`` + +Manhattan distance (taxicab metric) to the nearest point. + +.. _class_FastNoiseLite_constant_DISTANCE_HYBRID: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularDistanceFunction` **DISTANCE_HYBRID** = ``3`` + +Blend of :ref:`DISTANCE_EUCLIDEAN` and :ref:`DISTANCE_MANHATTAN` to give curved cell boundaries + +.. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_CellularReturnType: -.. _class_FastNoiseLite_constant_RETURN_CELL_VALUE: - -.. _class_FastNoiseLite_constant_RETURN_DISTANCE: - -.. _class_FastNoiseLite_constant_RETURN_DISTANCE2: - -.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_ADD: - -.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_SUB: - -.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_MUL: - -.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_DIV: +.. rst-class:: classref-enumeration enum **CellularReturnType**: -- **RETURN_CELL_VALUE** = **0** --- The cellular distance function will return the same value for all points within a cell. +.. _class_FastNoiseLite_constant_RETURN_CELL_VALUE: -- **RETURN_DISTANCE** = **1** --- The cellular distance function will return a value determined by the distance to the nearest point. +.. rst-class:: classref-enumeration-constant -- **RETURN_DISTANCE2** = **2** --- The cellular distance function returns the distance to the second-nearest point. +:ref:`CellularReturnType` **RETURN_CELL_VALUE** = ``0`` -- **RETURN_DISTANCE2_ADD** = **3** --- The distance to the nearest point is added to the distance to the second-nearest point. +The cellular distance function will return the same value for all points within a cell. -- **RETURN_DISTANCE2_SUB** = **4** --- The distance to the nearest point is subtracted from the distance to the second-nearest point. +.. _class_FastNoiseLite_constant_RETURN_DISTANCE: -- **RETURN_DISTANCE2_MUL** = **5** --- The distance to the nearest point is multiplied with the distance to the second-nearest point. +.. rst-class:: classref-enumeration-constant -- **RETURN_DISTANCE2_DIV** = **6** --- The distance to the nearest point is divided by the distance to the second-nearest point. +:ref:`CellularReturnType` **RETURN_DISTANCE** = ``1`` + +The cellular distance function will return a value determined by the distance to the nearest point. + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularReturnType` **RETURN_DISTANCE2** = ``2`` + +The cellular distance function returns the distance to the second-nearest point. + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_ADD: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularReturnType` **RETURN_DISTANCE2_ADD** = ``3`` + +The distance to the nearest point is added to the distance to the second-nearest point. + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_SUB: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularReturnType` **RETURN_DISTANCE2_SUB** = ``4`` + +The distance to the nearest point is subtracted from the distance to the second-nearest point. + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_MUL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularReturnType` **RETURN_DISTANCE2_MUL** = ``5`` + +The distance to the nearest point is multiplied with the distance to the second-nearest point. + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_DIV: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellularReturnType` **RETURN_DISTANCE2_DIV** = ``6`` + +The distance to the nearest point is divided by the distance to the second-nearest point. + +.. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_DomainWarpType: -.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX: - -.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX_REDUCED: - -.. _class_FastNoiseLite_constant_DOMAIN_WARP_BASIC_GRID: +.. rst-class:: classref-enumeration enum **DomainWarpType**: -- **DOMAIN_WARP_SIMPLEX** = **0** --- The domain is warped using the simplex noise algorithm. +.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX: -- **DOMAIN_WARP_SIMPLEX_REDUCED** = **1** --- The domain is warped using a simplified version of the simplex noise algorithm. +.. rst-class:: classref-enumeration-constant -- **DOMAIN_WARP_BASIC_GRID** = **2** --- The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). +:ref:`DomainWarpType` **DOMAIN_WARP_SIMPLEX** = ``0`` + +The domain is warped using the simplex noise algorithm. + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX_REDUCED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DomainWarpType` **DOMAIN_WARP_SIMPLEX_REDUCED** = ``1`` + +The domain is warped using a simplified version of the simplex noise algorithm. + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_BASIC_GRID: + +.. rst-class:: classref-enumeration-constant + +:ref:`DomainWarpType` **DOMAIN_WARP_BASIC_GRID** = ``2`` + +The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). + +.. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_DomainWarpFractalType: -.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_NONE: - -.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_PROGRESSIVE: - -.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_INDEPENDENT: +.. rst-class:: classref-enumeration enum **DomainWarpFractalType**: -- **DOMAIN_WARP_FRACTAL_NONE** = **0** --- No fractal noise for warping the space. +.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_NONE: -- **DOMAIN_WARP_FRACTAL_PROGRESSIVE** = **1** --- Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. +.. rst-class:: classref-enumeration-constant -- **DOMAIN_WARP_FRACTAL_INDEPENDENT** = **2** --- Warping the space independently for each octave, resulting in a more chaotic distortion. +:ref:`DomainWarpFractalType` **DOMAIN_WARP_FRACTAL_NONE** = ``0`` + +No fractal noise for warping the space. + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_PROGRESSIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DomainWarpFractalType` **DOMAIN_WARP_FRACTAL_PROGRESSIVE** = ``1`` + +Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_INDEPENDENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DomainWarpFractalType` **DOMAIN_WARP_FRACTAL_INDEPENDENT** = ``2`` + +Warping the space independently for each octave, resulting in a more chaotic distortion. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FastNoiseLite_property_cellular_distance_function: -- :ref:`CellularDistanceFunction` **cellular_distance_function** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_cellular_distance_function(value) | -+-----------+---------------------------------------+ -| *Getter* | get_cellular_distance_function() | -+-----------+---------------------------------------+ +:ref:`CellularDistanceFunction` **cellular_distance_function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_cellular_distance_function** **(** :ref:`CellularDistanceFunction` value **)** +- :ref:`CellularDistanceFunction` **get_cellular_distance_function** **(** **)** Determines how the distance to the nearest/second-nearest point is computed. See :ref:`CellularDistanceFunction` for options. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_cellular_jitter: -- :ref:`float` **cellular_jitter** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.45`` | -+-----------+----------------------------+ -| *Setter* | set_cellular_jitter(value) | -+-----------+----------------------------+ -| *Getter* | get_cellular_jitter() | -+-----------+----------------------------+ +:ref:`float` **cellular_jitter** = ``0.45`` + +.. rst-class:: classref-property-setget + +- void **set_cellular_jitter** **(** :ref:`float` value **)** +- :ref:`float` **get_cellular_jitter** **(** **)** Maximum distance a point can move off of its grid position. Set to ``0`` for an even grid. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_cellular_return_type: -- :ref:`CellularReturnType` **cellular_return_type** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_cellular_return_type(value) | -+-----------+---------------------------------+ -| *Getter* | get_cellular_return_type() | -+-----------+---------------------------------+ +:ref:`CellularReturnType` **cellular_return_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_cellular_return_type** **(** :ref:`CellularReturnType` value **)** +- :ref:`CellularReturnType` **get_cellular_return_type** **(** **)** Return type from cellular noise calculations. See :ref:`CellularReturnType`. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_amplitude: -- :ref:`float` **domain_warp_amplitude** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``30.0`` | -+-----------+----------------------------------+ -| *Setter* | set_domain_warp_amplitude(value) | -+-----------+----------------------------------+ -| *Getter* | get_domain_warp_amplitude() | -+-----------+----------------------------------+ +:ref:`float` **domain_warp_amplitude** = ``30.0`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_amplitude** **(** :ref:`float` value **)** +- :ref:`float` **get_domain_warp_amplitude** **(** **)** Sets the maximum warp distance from the origin. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_enabled: -- :ref:`bool` **domain_warp_enabled** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_domain_warp_enabled(value) | -+-----------+--------------------------------+ -| *Getter* | is_domain_warp_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **domain_warp_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_domain_warp_enabled** **(** **)** If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_fractal_gain: -- :ref:`float` **domain_warp_fractal_gain** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------------------------+ -| *Setter* | set_domain_warp_fractal_gain(value) | -+-----------+-------------------------------------+ -| *Getter* | get_domain_warp_fractal_gain() | -+-----------+-------------------------------------+ +:ref:`float` **domain_warp_fractal_gain** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_fractal_gain** **(** :ref:`float` value **)** +- :ref:`float` **get_domain_warp_fractal_gain** **(** **)** Determines the strength of each subsequent layer of the noise which is used to warp the space. A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_fractal_lacunarity: -- :ref:`float` **domain_warp_fractal_lacunarity** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``6.0`` | -+-----------+-------------------------------------------+ -| *Setter* | set_domain_warp_fractal_lacunarity(value) | -+-----------+-------------------------------------------+ -| *Getter* | get_domain_warp_fractal_lacunarity() | -+-----------+-------------------------------------------+ +:ref:`float` **domain_warp_fractal_lacunarity** = ``6.0`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_fractal_lacunarity** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_fractal_octaves: -- :ref:`int` **domain_warp_fractal_octaves** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``5`` | -+-----------+----------------------------------------+ -| *Setter* | set_domain_warp_fractal_octaves(value) | -+-----------+----------------------------------------+ -| *Getter* | get_domain_warp_fractal_octaves() | -+-----------+----------------------------------------+ +:ref:`int` **domain_warp_fractal_octaves** = ``5`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_fractal_octaves** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_fractal_type: -- :ref:`DomainWarpFractalType` **domain_warp_fractal_type** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------------------+ -| *Setter* | set_domain_warp_fractal_type(value) | -+-----------+-------------------------------------+ -| *Getter* | get_domain_warp_fractal_type() | -+-----------+-------------------------------------+ +:ref:`DomainWarpFractalType` **domain_warp_fractal_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_fractal_type** **(** :ref:`DomainWarpFractalType` value **)** +- :ref:`DomainWarpFractalType` **get_domain_warp_fractal_type** **(** **)** The method for combining octaves into a fractal which is used to warp the space. See :ref:`DomainWarpFractalType`. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_frequency: -- :ref:`float` **domain_warp_frequency** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0.05`` | -+-----------+----------------------------------+ -| *Setter* | set_domain_warp_frequency(value) | -+-----------+----------------------------------+ -| *Getter* | get_domain_warp_frequency() | -+-----------+----------------------------------+ +:ref:`float` **domain_warp_frequency** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_frequency** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_domain_warp_type: -- :ref:`DomainWarpType` **domain_warp_type** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_domain_warp_type(value) | -+-----------+-----------------------------+ -| *Getter* | get_domain_warp_type() | -+-----------+-----------------------------+ +:ref:`DomainWarpType` **domain_warp_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_domain_warp_type** **(** :ref:`DomainWarpType` value **)** +- :ref:`DomainWarpType` **get_domain_warp_type** **(** **)** Sets the warp algorithm. See :ref:`DomainWarpType`. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_fractal_gain: -- :ref:`float` **fractal_gain** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------------+ -| *Setter* | set_fractal_gain(value) | -+-----------+-------------------------+ -| *Getter* | get_fractal_gain() | -+-----------+-------------------------+ +:ref:`float` **fractal_gain** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_fractal_gain** **(** :ref:`float` value **)** +- :ref:`float` **get_fractal_gain** **(** **)** Determines the strength of each subsequent layer of noise in fractal noise. A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_fractal_lacunarity: -- :ref:`float` **fractal_lacunarity** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------------------+ -| *Setter* | set_fractal_lacunarity(value) | -+-----------+-------------------------------+ -| *Getter* | get_fractal_lacunarity() | -+-----------+-------------------------------+ +:ref:`float` **fractal_lacunarity** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_fractal_lacunarity** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_fractal_octaves: -- :ref:`int` **fractal_octaves** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``5`` | -+-----------+----------------------------+ -| *Setter* | set_fractal_octaves(value) | -+-----------+----------------------------+ -| *Getter* | get_fractal_octaves() | -+-----------+----------------------------+ +:ref:`int` **fractal_octaves** = ``5`` + +.. rst-class:: classref-property-setget + +- void **set_fractal_octaves** **(** :ref:`int` value **)** +- :ref:`int` **get_fractal_octaves** **(** **)** The number of noise layers that are sampled to get the final value for fractal noise types. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_fractal_ping_pong_strength: -- :ref:`float` **fractal_ping_pong_strength** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``2.0`` | -+-----------+---------------------------------------+ -| *Setter* | set_fractal_ping_pong_strength(value) | -+-----------+---------------------------------------+ -| *Getter* | get_fractal_ping_pong_strength() | -+-----------+---------------------------------------+ +:ref:`float` **fractal_ping_pong_strength** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_fractal_ping_pong_strength** **(** :ref:`float` value **)** +- :ref:`float` **get_fractal_ping_pong_strength** **(** **)** Sets the strength of the fractal ping pong type. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_fractal_type: -- :ref:`FractalType` **fractal_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_fractal_type(value) | -+-----------+-------------------------+ -| *Getter* | get_fractal_type() | -+-----------+-------------------------+ +:ref:`FractalType` **fractal_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_fractal_type** **(** :ref:`FractalType` value **)** +- :ref:`FractalType` **get_fractal_type** **(** **)** The method for combining octaves into a fractal. See :ref:`FractalType`. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_fractal_weighted_strength: -- :ref:`float` **fractal_weighted_strength** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------------+ -| *Setter* | set_fractal_weighted_strength(value) | -+-----------+--------------------------------------+ -| *Getter* | get_fractal_weighted_strength() | -+-----------+--------------------------------------+ +:ref:`float` **fractal_weighted_strength** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_fractal_weighted_strength** **(** :ref:`float` value **)** +- :ref:`float` **get_fractal_weighted_strength** **(** **)** Higher weighting means higher octaves have less impact if lower octaves have a large impact. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_frequency: -- :ref:`float` **frequency** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.01`` | -+-----------+----------------------+ -| *Setter* | set_frequency(value) | -+-----------+----------------------+ -| *Getter* | get_frequency() | -+-----------+----------------------+ +:ref:`float` **frequency** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_frequency** **(** :ref:`float` value **)** +- :ref:`float` **get_frequency** **(** **)** The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_noise_type: -- :ref:`NoiseType` **noise_type** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1`` | -+-----------+-----------------------+ -| *Setter* | set_noise_type(value) | -+-----------+-----------------------+ -| *Getter* | get_noise_type() | -+-----------+-----------------------+ +:ref:`NoiseType` **noise_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_noise_type** **(** :ref:`NoiseType` value **)** +- :ref:`NoiseType` **get_noise_type** **(** **)** The noise algorithm used. See :ref:`NoiseType`. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_offset: -- :ref:`Vector3` **offset** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_offset(value) | -+-----------+----------------------+ -| *Getter* | get_offset() | -+-----------+----------------------+ +:ref:`Vector3` **offset** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_offset** **(** **)** Translate the noise input coordinates by the given :ref:`Vector3`. +.. rst-class:: classref-item-separator + ---- .. _class_FastNoiseLite_property_seed: -- :ref:`int` **seed** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_seed(value) | -+-----------+-----------------+ -| *Getter* | get_seed() | -+-----------+-----------------+ +:ref:`int` **seed** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_seed** **(** :ref:`int` value **)** +- :ref:`int` **get_seed** **(** **)** The random number seed for all noise types. diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index de043ad72..bde167047 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -14,6 +14,8 @@ FileAccess Type to handle file reading and writing operations. +.. rst-class:: classref-introduction-group + Description ----------- @@ -54,7 +56,7 @@ Here's a sample on how to write and read from a file: In the example above, the file will be saved in the user data folder as specified in the :doc:`Data paths <../tutorials/io/data_paths>` documentation. -There is no method to close a file in order to free it from use. Instead, ``FileAccess`` will close when it's freed, which happens when it goes out of scope or when it gets assigned with ``null``. In C# the reference must be disposed after we are done using it, this can be done with the ``using`` statement or calling the ``Dispose`` method directly. +There is no method to close a file in order to free it from use. Instead, **FileAccess** will close when it's freed, which happens when it goes out of scope or when it gets assigned with ``null``. In C# the reference must be disposed after we are done using it, this can be done with the ``using`` statement or calling the ``Dispose`` method directly. .. tabs:: @@ -71,10 +73,12 @@ There is no method to close a file in order to free it from use. Instead, ``File -\ **Note:** To access project resources once exported, it is recommended to use :ref:`ResourceLoader` instead of the ``FileAccess`` API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. +\ **Note:** To access project resources once exported, it is recommended to use :ref:`ResourceLoader` instead of the **FileAccess** API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. \ **Note:** Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing **Alt + F4**). If you stop the project execution by pressing **F8** while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling :ref:`flush` at regular intervals. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -82,165 +86,230 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+---------------------------------------------------------+ -| :ref:`bool` | :ref:`big_endian` | -+-------------------------+---------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------+ + | :ref:`bool` | :ref:`big_endian` | + +-------------------------+---------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`eof_reached` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`flush` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_16` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_32` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_64` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_8` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_as_text` **(** :ref:`bool` skip_cr=false **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`get_buffer` **(** :ref:`int` length **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_csv_line` **(** :ref:`String` delim="," **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_double` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`get_error` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_float` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_length` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_line` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_md5` **(** :ref:`String` path **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_modified_time` **(** :ref:`String` file **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`get_open_error` **(** **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_pascal_string` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_path` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_path_absolute` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_position` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_real` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_sha256` **(** :ref:`String` path **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_open` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FileAccess` | :ref:`open` **(** :ref:`String` path, :ref:`ModeFlags` flags **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FileAccess` | :ref:`open_compressed` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`CompressionMode` compression_mode=0 **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FileAccess` | :ref:`open_encrypted` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`PackedByteArray` key **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FileAccess` | :ref:`open_encrypted_with_pass` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`String` pass **)** |static| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`seek` **(** :ref:`int` position **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`seek_end` **(** :ref:`int` position=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_16` **(** :ref:`int` value **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_32` **(** :ref:`int` value **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_64` **(** :ref:`int` value **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_8` **(** :ref:`int` value **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_buffer` **(** :ref:`PackedByteArray` buffer **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_csv_line` **(** :ref:`PackedStringArray` values, :ref:`String` delim="," **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_double` **(** :ref:`float` value **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_float` **(** :ref:`float` value **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_line` **(** :ref:`String` line **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_pascal_string` **(** :ref:`String` string **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_real` **(** :ref:`float` value **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_string` **(** :ref:`String` string **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`eof_reached` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flush` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_16` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_32` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_64` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_8` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_as_text` **(** :ref:`bool` skip_cr=false **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_buffer` **(** :ref:`int` length **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_csv_line` **(** :ref:`String` delim="," **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_double` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`get_error` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_file_as_bytes` **(** :ref:`String` path **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file_as_string` **(** :ref:`String` path **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_float` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_length` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_line` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_md5` **(** :ref:`String` path **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_modified_time` **(** :ref:`String` file **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`get_open_error` **(** **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_pascal_string` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_path` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_path_absolute` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_position` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_real` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_sha256` **(** :ref:`String` path **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_open` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open` **(** :ref:`String` path, :ref:`ModeFlags` flags **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open_compressed` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`CompressionMode` compression_mode=0 **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open_encrypted` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`PackedByteArray` key **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open_encrypted_with_pass` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`String` pass **)** |static| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek` **(** :ref:`int` position **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek_end` **(** :ref:`int` position=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_16` **(** :ref:`int` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_32` **(** :ref:`int` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_64` **(** :ref:`int` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_8` **(** :ref:`int` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_csv_line` **(** :ref:`PackedStringArray` values, :ref:`String` delim="," **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_double` **(** :ref:`float` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_float` **(** :ref:`float` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_line` **(** :ref:`String` line **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_pascal_string` **(** :ref:`String` string **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_real` **(** :ref:`float` value **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_string` **(** :ref:`String` string **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_FileAccess_ModeFlags: -.. _class_FileAccess_constant_READ: - -.. _class_FileAccess_constant_WRITE: - -.. _class_FileAccess_constant_READ_WRITE: - -.. _class_FileAccess_constant_WRITE_READ: +.. rst-class:: classref-enumeration enum **ModeFlags**: -- **READ** = **1** --- Opens the file for read operations. The cursor is positioned at the beginning of the file. +.. _class_FileAccess_constant_READ: -- **WRITE** = **2** --- Opens the file for write operations. The file is created if it does not exist, and truncated if it does. +.. rst-class:: classref-enumeration-constant -- **READ_WRITE** = **3** --- Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file. +:ref:`ModeFlags` **READ** = ``1`` -- **WRITE_READ** = **7** --- 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. +Opens the file for read operations. The cursor is positioned at the beginning of the file. + +.. _class_FileAccess_constant_WRITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ModeFlags` **WRITE** = ``2`` + +Opens the file for write operations. The file is created if it does not exist, and truncated if it does. + +.. _class_FileAccess_constant_READ_WRITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ModeFlags` **READ_WRITE** = ``3`` + +Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file. + +.. _class_FileAccess_constant_WRITE_READ: + +.. rst-class:: classref-enumeration-constant + +:ref:`ModeFlags` **WRITE_READ** = ``7`` + +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. + +.. rst-class:: classref-item-separator ---- .. _enum_FileAccess_CompressionMode: -.. _class_FileAccess_constant_COMPRESSION_FASTLZ: - -.. _class_FileAccess_constant_COMPRESSION_DEFLATE: - -.. _class_FileAccess_constant_COMPRESSION_ZSTD: - -.. _class_FileAccess_constant_COMPRESSION_GZIP: +.. rst-class:: classref-enumeration enum **CompressionMode**: -- **COMPRESSION_FASTLZ** = **0** --- Uses the `FastLZ `__ compression method. +.. _class_FileAccess_constant_COMPRESSION_FASTLZ: -- **COMPRESSION_DEFLATE** = **1** --- Uses the `DEFLATE `__ compression method. +.. rst-class:: classref-enumeration-constant -- **COMPRESSION_ZSTD** = **2** --- Uses the `Zstandard `__ compression method. +:ref:`CompressionMode` **COMPRESSION_FASTLZ** = ``0`` -- **COMPRESSION_GZIP** = **3** --- Uses the `gzip `__ compression method. +Uses the `FastLZ `__ compression method. + +.. _class_FileAccess_constant_COMPRESSION_DEFLATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_DEFLATE** = ``1`` + +Uses the `DEFLATE `__ compression method. + +.. _class_FileAccess_constant_COMPRESSION_ZSTD: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_ZSTD** = ``2`` + +Uses the `Zstandard `__ compression method. + +.. _class_FileAccess_constant_COMPRESSION_GZIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_GZIP** = ``3`` + +Uses the `gzip `__ compression method. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FileAccess_property_big_endian: -- :ref:`bool` **big_endian** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_big_endian(value) | -+----------+-----------------------+ -| *Getter* | is_big_endian() | -+----------+-----------------------+ +:ref:`bool` **big_endian** + +.. rst-class:: classref-property-setget + +- void **set_big_endian** **(** :ref:`bool` value **)** +- :ref:`bool` **is_big_endian** **(** **)** If ``true``, the file is read with big-endian `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. @@ -248,12 +317,20 @@ If ``true``, the file is read with big-endian `endianness ` *after* opening the file, not before. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_FileAccess_method_eof_reached: -- :ref:`bool` **eof_reached** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **eof_reached** **(** **)** |const| Returns ``true`` if the file cursor has already read past the end of the file. @@ -276,11 +353,15 @@ Returns ``true`` if the file cursor has already read past the end of the file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_file_exists: -- :ref:`bool` **file_exists** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`bool` **file_exists** **(** :ref:`String` path **)** |static| Returns ``true`` if the file exists in the given path. @@ -288,71 +369,103 @@ Returns ``true`` if the file exists in the given path. For a non-static, relative equivalent, use :ref:`DirAccess.file_exists`. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_flush: -- void **flush** **(** **)** +.. rst-class:: classref-method + +void **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` manually before closing a file. Still, calling :ref:`flush` can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. \ **Note:** Only call :ref:`flush` when you actually need it. Otherwise, it will decrease performance due to constant disk writes. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_16: -- :ref:`int` **get_16** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_16** **(** **)** |const| Returns the next 16 bits from the file as an integer. See :ref:`store_16` for details on what values can be stored and retrieved this way. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_32: -- :ref:`int` **get_32** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_32** **(** **)** |const| Returns the next 32 bits from the file as an integer. See :ref:`store_32` for details on what values can be stored and retrieved this way. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_64: -- :ref:`int` **get_64** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_64** **(** **)** |const| Returns the next 64 bits from the file as an integer. See :ref:`store_64` for details on what values can be stored and retrieved this way. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_8: -- :ref:`int` **get_8** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_8** **(** **)** |const| Returns the next 8 bits from the file as an integer. See :ref:`store_8` for details on what values can be stored and retrieved this way. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_as_text: -- :ref:`String` **get_as_text** **(** :ref:`bool` skip_cr=false **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_as_text** **(** :ref:`bool` skip_cr=false **)** |const| Returns the whole file as a :ref:`String`. Text is interpreted as being UTF-8 encoded. If ``skip_cr`` is ``true``, carriage return characters (``\r``, CR) will be ignored when parsing the UTF-8, so that only line feed characters (``\n``, LF) represent a new line (Unix convention). +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_buffer: -- :ref:`PackedByteArray` **get_buffer** **(** :ref:`int` length **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_buffer** **(** :ref:`int` length **)** |const| Returns next ``length`` bytes of the file as a :ref:`PackedByteArray`. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_csv_line: -- :ref:`PackedStringArray` **get_csv_line** **(** :ref:`String` delim="," **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_csv_line** **(** :ref:`String` delim="," **)** |const| 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. @@ -368,207 +481,323 @@ For example, the following CSV lines are valid and will be properly parsed as tw Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it *could* very well use quotes, it was only written without for demonstration purposes. The third line must use ``""`` for each quotation mark that needs to be interpreted as such instead of the end of a text value. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_double: -- :ref:`float` **get_double** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_double** **(** **)** |const| Returns the next 64 bits from the file as a floating-point number. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_error: -- :ref:`Error` **get_error** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **get_error** **(** **)** |const| Returns the last error that happened when trying to perform operations. Compare with the ``ERR_FILE_*`` constants from :ref:`Error`. +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_get_file_as_bytes: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_file_as_bytes** **(** :ref:`String` path **)** |static| + +Returns the whole ``path`` file contents as a :ref:`PackedByteArray` without any decoding. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_get_file_as_string: + +.. rst-class:: classref-method + +:ref:`String` **get_file_as_string** **(** :ref:`String` path **)** |static| + +Returns the whole ``path`` file contents as a :ref:`String`. Text is interpreted as being UTF-8 encoded. + +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_float: -- :ref:`float` **get_float** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_float** **(** **)** |const| Returns the next 32 bits from the file as a floating-point number. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_length: -- :ref:`int` **get_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_length** **(** **)** |const| Returns the size of the file in bytes. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_line: -- :ref:`String` **get_line** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_line** **(** **)** |const| Returns the next line of the file as a :ref:`String`. Text is interpreted as being UTF-8 encoded. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_md5: -- :ref:`String` **get_md5** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`String` **get_md5** **(** :ref:`String` path **)** |static| Returns an MD5 String representing the file at the given path or an empty :ref:`String` on failure. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_modified_time: -- :ref:`int` **get_modified_time** **(** :ref:`String` file **)** |static| +.. rst-class:: classref-method + +:ref:`int` **get_modified_time** **(** :ref:`String` file **)** |static| Returns the last time the ``file`` was modified in Unix timestamp format or returns a :ref:`String` "ERROR IN ``file``". This Unix timestamp can be converted to another format using the :ref:`Time` singleton. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_open_error: -- :ref:`Error` **get_open_error** **(** **)** |static| +.. rst-class:: classref-method + +:ref:`Error` **get_open_error** **(** **)** |static| Returns the result of the last :ref:`open` call in the current thread. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_pascal_string: -- :ref:`String` **get_pascal_string** **(** **)** +.. rst-class:: classref-method + +:ref:`String` **get_pascal_string** **(** **)** Returns a :ref:`String` saved in Pascal format from the file. Text is interpreted as being UTF-8 encoded. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_path: -- :ref:`String` **get_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_path** **(** **)** |const| Returns the path as a :ref:`String` for the current open file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_path_absolute: -- :ref:`String` **get_path_absolute** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_path_absolute** **(** **)** |const| Returns the absolute path as a :ref:`String` for the current open file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_position: -- :ref:`int` **get_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_position** **(** **)** |const| Returns the file cursor's position. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_real: -- :ref:`float` **get_real** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_real** **(** **)** |const| Returns the next bits from the file as a floating-point number. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_sha256: -- :ref:`String` **get_sha256** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method + +:ref:`String` **get_sha256** **(** :ref:`String` path **)** |static| Returns a SHA-256 :ref:`String` representing the file at the given path or an empty :ref:`String` on failure. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_get_var: -- :ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** |const| Returns the next :ref:`Variant` value from the file. If ``allow_objects`` is ``true``, decoding objects is allowed. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_is_open: -- :ref:`bool` **is_open** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_open** **(** **)** |const| Returns ``true`` if the file is currently opened. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_open: -- :ref:`FileAccess` **open** **(** :ref:`String` path, :ref:`ModeFlags` flags **)** |static| +.. rst-class:: classref-method -Creates a new ``FileAccess`` object and opens the file for writing or reading, depending on the flags. +:ref:`FileAccess` **open** **(** :ref:`String` path, :ref:`ModeFlags` flags **)** |static| + +Creates a new **FileAccess** object and opens the file for writing or reading, depending on the flags. Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_open_compressed: -- :ref:`FileAccess` **open_compressed** **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`CompressionMode` compression_mode=0 **)** |static| +.. rst-class:: classref-method -Creates a new ``FileAccess`` object and opens a compressed file for reading or writing. +:ref:`FileAccess` **open_compressed** **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`CompressionMode` compression_mode=0 **)** |static| + +Creates a new **FileAccess** object and opens a compressed file for reading or writing. \ **Note:** :ref:`open_compressed` can only read files that were saved by Godot, not third-party compression formats. See `GitHub issue #28999 `__ for a workaround. Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_open_encrypted: -- :ref:`FileAccess` **open_encrypted** **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`PackedByteArray` key **)** |static| +.. rst-class:: classref-method -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. +:ref:`FileAccess` **open_encrypted** **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`PackedByteArray` key **)** |static| + +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. \ **Note:** The provided key must be 32 bytes long. Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_open_encrypted_with_pass: -- :ref:`FileAccess` **open_encrypted_with_pass** **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`String` pass **)** |static| +.. rst-class:: classref-method -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. +:ref:`FileAccess` **open_encrypted_with_pass** **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`String` pass **)** |static| + +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. Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_seek: -- void **seek** **(** :ref:`int` position **)** +.. rst-class:: classref-method + +void **seek** **(** :ref:`int` position **)** Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_seek_end: -- void **seek_end** **(** :ref:`int` position=0 **)** +.. rst-class:: classref-method + +void **seek_end** **(** :ref:`int` position=0 **)** Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). \ **Note:** This is an offset, so you should use negative numbers or the cursor will be at the end of the file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_16: -- void **store_16** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **store_16** **(** :ref:`int` value **)** Stores an integer as 16 bits in the file. @@ -613,11 +842,15 @@ To store a signed integer, use :ref:`store_64` +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_32: -- void **store_32** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **store_32** **(** :ref:`int` value **)** Stores an integer as 32 bits in the file. @@ -625,21 +858,29 @@ Stores an integer as 32 bits in the file. To store a signed integer, use :ref:`store_64`, or convert it manually (see :ref:`store_16` for an example). +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_64: -- void **store_64** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **store_64** **(** :ref:`int` value **)** Stores an integer as 64 bits in the file. \ **Note:** The ``value`` must lie in the interval ``[-2^63, 2^63 - 1]`` (i.e. be a valid :ref:`int` value). +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_8: -- void **store_8** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **store_8** **(** :ref:`int` value **)** Stores an integer as 8 bits in the file. @@ -647,81 +888,117 @@ Stores an integer as 8 bits in the file. To store a signed integer, use :ref:`store_64`, or convert it manually (see :ref:`store_16` for an example). +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_buffer: -- void **store_buffer** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +void **store_buffer** **(** :ref:`PackedByteArray` buffer **)** Stores the given array of bytes in the file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_csv_line: -- void **store_csv_line** **(** :ref:`PackedStringArray` values, :ref:`String` delim="," **)** +.. rst-class:: classref-method + +void **store_csv_line** **(** :ref:`PackedStringArray` values, :ref:`String` delim="," **)** Store the given :ref:`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. Text will be encoded as UTF-8. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_double: -- void **store_double** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +void **store_double** **(** :ref:`float` value **)** Stores a floating-point number as 64 bits in the file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_float: -- void **store_float** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +void **store_float** **(** :ref:`float` value **)** Stores a floating-point number as 32 bits in the file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_line: -- void **store_line** **(** :ref:`String` line **)** +.. rst-class:: classref-method + +void **store_line** **(** :ref:`String` line **)** Appends ``line`` to the file followed by a line return character (``\n``), encoding the text as UTF-8. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_pascal_string: -- void **store_pascal_string** **(** :ref:`String` string **)** +.. rst-class:: classref-method + +void **store_pascal_string** **(** :ref:`String` string **)** Stores the given :ref:`String` as a line in the file in Pascal format (i.e. also store the length of the string). Text will be encoded as UTF-8. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_real: -- void **store_real** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +void **store_real** **(** :ref:`float` value **)** Stores a floating-point number in the file. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_string: -- void **store_string** **(** :ref:`String` string **)** +.. rst-class:: classref-method + +void **store_string** **(** :ref:`String` string **)** Appends ``string`` to the file without a line return, encoding the text as UTF-8. \ **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using :ref:`store_pascal_string` instead. For retrieving strings from a text file, you can use ``get_buffer(length).get_string_from_utf8()`` (if you know the length) or :ref:`get_as_text`. +.. rst-class:: classref-item-separator + ---- .. _class_FileAccess_method_store_var: -- void **store_var** **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** +.. rst-class:: classref-method + +void **store_var** **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** Stores any Variant value in the file. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 9cd70504d..eeb04d811 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -14,438 +14,594 @@ FileDialog Dialog for selecting files or directories in the filesystem. +.. rst-class:: classref-introduction-group + Description ----------- FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. The FileDialog automatically sets its window title according to the :ref:`file_mode`. If you want to use a custom title, disable this by setting :ref:`mode_overrides_title` to ``false``. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`Access` | :ref:`access` | ``0`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_dir` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_file` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_path` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`FileMode` | :ref:`file_mode` | ``4`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`filters` | ``PackedStringArray()`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`mode_overrides_title` | ``true`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`root_subfolder` | ``""`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`show_hidden_files` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | title | ``"Save a File"`` (overrides :ref:`Window`) | -+---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Access` | :ref:`access` | ``0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`current_dir` | | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`current_file` | | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`current_path` | | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`FileMode` | :ref:`file_mode` | ``4`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`filters` | ``PackedStringArray()`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`mode_overrides_title` | ``true`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`root_subfolder` | ``""`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_hidden_files` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | title | ``"Save a File"`` (overrides :ref:`Window`) | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_filter` **(** :ref:`String` filter, :ref:`String` description="" **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_filters` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect_all` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`LineEdit` | :ref:`get_line_edit` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`invalidate` **(** **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_filter` **(** :ref:`String` filter, :ref:`String` description="" **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_filters` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect_all` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LineEdit` | :ref:`get_line_edit` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`invalidate` **(** **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`file_disabled_color` | ``Color(1, 1, 1, 0.25)`` | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`file_icon_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`folder_icon_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`back_folder` | | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`file` | | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`folder` | | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`forward_folder` | | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`parent_folder` | | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`reload` | | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`toggle_hidden` | | -+-----------------------------------+------------------------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`file_disabled_color` | ``Color(1, 1, 1, 0.25)`` | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`file_icon_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`folder_icon_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`back_folder` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`file` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`folder` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`forward_folder` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`parent_folder` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`reload` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`toggle_hidden` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_FileDialog_signal_dir_selected: -- **dir_selected** **(** :ref:`String` dir **)** +.. rst-class:: classref-signal + +**dir_selected** **(** :ref:`String` dir **)** Emitted when the user selects a directory. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_signal_file_selected: -- **file_selected** **(** :ref:`String` path **)** +.. rst-class:: classref-signal + +**file_selected** **(** :ref:`String` path **)** Emitted when the user selects a file by double-clicking it or pressing the **OK** button. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_signal_files_selected: -- **files_selected** **(** :ref:`PackedStringArray` paths **)** +.. rst-class:: classref-signal + +**files_selected** **(** :ref:`PackedStringArray` paths **)** Emitted when the user selects multiple files. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_FileDialog_FileMode: -.. _class_FileDialog_constant_FILE_MODE_OPEN_FILE: - -.. _class_FileDialog_constant_FILE_MODE_OPEN_FILES: - -.. _class_FileDialog_constant_FILE_MODE_OPEN_DIR: - -.. _class_FileDialog_constant_FILE_MODE_OPEN_ANY: - -.. _class_FileDialog_constant_FILE_MODE_SAVE_FILE: +.. rst-class:: classref-enumeration enum **FileMode**: -- **FILE_MODE_OPEN_FILE** = **0** --- The dialog allows selecting one, and only one file. +.. _class_FileDialog_constant_FILE_MODE_OPEN_FILE: -- **FILE_MODE_OPEN_FILES** = **1** --- The dialog allows selecting multiple files. +.. rst-class:: classref-enumeration-constant -- **FILE_MODE_OPEN_DIR** = **2** --- The dialog only allows selecting a directory, disallowing the selection of any file. +:ref:`FileMode` **FILE_MODE_OPEN_FILE** = ``0`` -- **FILE_MODE_OPEN_ANY** = **3** --- The dialog allows selecting one file or directory. +The dialog allows selecting one, and only one file. -- **FILE_MODE_SAVE_FILE** = **4** --- The dialog will warn when a file exists. +.. _class_FileDialog_constant_FILE_MODE_OPEN_FILES: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_OPEN_FILES** = ``1`` + +The dialog allows selecting multiple files. + +.. _class_FileDialog_constant_FILE_MODE_OPEN_DIR: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_OPEN_DIR** = ``2`` + +The dialog only allows selecting a directory, disallowing the selection of any file. + +.. _class_FileDialog_constant_FILE_MODE_OPEN_ANY: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_OPEN_ANY** = ``3`` + +The dialog allows selecting one file or directory. + +.. _class_FileDialog_constant_FILE_MODE_SAVE_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileMode` **FILE_MODE_SAVE_FILE** = ``4`` + +The dialog will warn when a file exists. + +.. rst-class:: classref-item-separator ---- .. _enum_FileDialog_Access: -.. _class_FileDialog_constant_ACCESS_RESOURCES: - -.. _class_FileDialog_constant_ACCESS_USERDATA: - -.. _class_FileDialog_constant_ACCESS_FILESYSTEM: +.. rst-class:: classref-enumeration enum **Access**: -- **ACCESS_RESOURCES** = **0** --- The dialog only allows accessing files under the :ref:`Resource` path (``res://``). +.. _class_FileDialog_constant_ACCESS_RESOURCES: -- **ACCESS_USERDATA** = **1** --- The dialog only allows accessing files under user data path (``user://``). +.. rst-class:: classref-enumeration-constant -- **ACCESS_FILESYSTEM** = **2** --- The dialog allows accessing files on the whole file system. +:ref:`Access` **ACCESS_RESOURCES** = ``0`` + +The dialog only allows accessing files under the :ref:`Resource` path (``res://``). + +.. _class_FileDialog_constant_ACCESS_USERDATA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Access` **ACCESS_USERDATA** = ``1`` + +The dialog only allows accessing files under user data path (``user://``). + +.. _class_FileDialog_constant_ACCESS_FILESYSTEM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Access` **ACCESS_FILESYSTEM** = ``2`` + +The dialog allows accessing files on the whole file system. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FileDialog_property_access: -- :ref:`Access` **access** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_access(value) | -+-----------+-------------------+ -| *Getter* | get_access() | -+-----------+-------------------+ +:ref:`Access` **access** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_access** **(** :ref:`Access` value **)** +- :ref:`Access` **get_access** **(** **)** The file system access scope. See enum ``Access`` constants. \ **Warning:** Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See `godot-proposals#1123 `__. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_property_current_dir: -- :ref:`String` **current_dir** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_current_dir(value) | -+----------+------------------------+ -| *Getter* | get_current_dir() | -+----------+------------------------+ +:ref:`String` **current_dir** + +.. rst-class:: classref-property-setget + +- void **set_current_dir** **(** :ref:`String` value **)** +- :ref:`String` **get_current_dir** **(** **)** The current working directory of the file dialog. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_property_current_file: -- :ref:`String` **current_file** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_current_file(value) | -+----------+-------------------------+ -| *Getter* | get_current_file() | -+----------+-------------------------+ +:ref:`String` **current_file** + +.. rst-class:: classref-property-setget + +- void **set_current_file** **(** :ref:`String` value **)** +- :ref:`String` **get_current_file** **(** **)** The currently selected file of the file dialog. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_property_current_path: -- :ref:`String` **current_path** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_current_path(value) | -+----------+-------------------------+ -| *Getter* | get_current_path() | -+----------+-------------------------+ +:ref:`String` **current_path** + +.. rst-class:: classref-property-setget + +- void **set_current_path** **(** :ref:`String` value **)** +- :ref:`String` **get_current_path** **(** **)** The currently selected file path of the file dialog. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_property_file_mode: -- :ref:`FileMode` **file_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4`` | -+-----------+----------------------+ -| *Setter* | set_file_mode(value) | -+-----------+----------------------+ -| *Getter* | get_file_mode() | -+-----------+----------------------+ +:ref:`FileMode` **file_mode** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_file_mode** **(** :ref:`FileMode` value **)** +- :ref:`FileMode` **get_file_mode** **(** **)** The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode`. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_property_filters: -- :ref:`PackedStringArray` **filters** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+-------------------------+ -| *Setter* | set_filters(value) | -+-----------+-------------------------+ -| *Getter* | get_filters() | -+-----------+-------------------------+ +:ref:`PackedStringArray` **filters** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_filters** **(** :ref:`PackedStringArray` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_property_mode_overrides_title: -- :ref:`bool` **mode_overrides_title** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_mode_overrides_title(value) | -+-----------+---------------------------------+ -| *Getter* | is_mode_overriding_title() | -+-----------+---------------------------------+ +:ref:`bool` **mode_overrides_title** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_mode_overrides_title** **(** :ref:`bool` value **)** +- :ref:`bool` **is_mode_overriding_title** **(** **)** If ``true``, changing the ``Mode`` property will set the window title accordingly (e.g. setting mode to :ref:`FILE_MODE_OPEN_FILE` will change the window title to "Open a File"). +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_property_root_subfolder: -- :ref:`String` **root_subfolder** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``""`` | -+-----------+---------------------------+ -| *Setter* | set_root_subfolder(value) | -+-----------+---------------------------+ -| *Getter* | get_root_subfolder() | -+-----------+---------------------------+ +:ref:`String` **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. +.. rst-class:: classref-property-setget + +- void **set_root_subfolder** **(** :ref:`String` value **)** +- :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_FileDialog_property_show_hidden_files: -- :ref:`bool` **show_hidden_files** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_show_hidden_files(value) | -+-----------+------------------------------+ -| *Getter* | is_showing_hidden_files() | -+-----------+------------------------------+ +:ref:`bool` **show_hidden_files** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_show_hidden_files** **(** :ref:`bool` value **)** +- :ref:`bool` **is_showing_hidden_files** **(** **)** If ``true``, the dialog will show hidden files. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_FileDialog_method_add_filter: -- void **add_filter** **(** :ref:`String` filter, :ref:`String` description="" **)** +.. rst-class:: classref-method -Adds a comma-delimited file name ``filter`` option to the ``FileDialog`` with an optional ``description``, which restricts what files can be picked. +void **add_filter** **(** :ref:`String` filter, :ref:`String` description="" **)** + +Adds a comma-delimited file name ``filter`` option to the **FileDialog** with an optional ``description``, which restricts what files can be picked. A ``filter`` should be of the form ``"filename.extension"``, where filename and extension can be ``*`` to match any string. Filters starting with ``.`` (i.e. empty filenames) are not allowed. For example, a ``filter`` of ``"*.png, *.jpg"`` and a ``description`` of ``"Images"`` results in filter text "Images (\*.png, \*.jpg)". +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_method_clear_filters: -- void **clear_filters** **(** **)** +.. rst-class:: classref-method + +void **clear_filters** **(** **)** Clear all the added filters in the dialog. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_method_deselect_all: -- void **deselect_all** **(** **)** +.. rst-class:: classref-method + +void **deselect_all** **(** **)** Clear all currently selected items in the dialog. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_method_get_line_edit: -- :ref:`LineEdit` **get_line_edit** **(** **)** +.. rst-class:: classref-method + +:ref:`LineEdit` **get_line_edit** **(** **)** Returns the LineEdit for the selected file. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_method_get_vbox: -- :ref:`VBoxContainer` **get_vbox** **(** **)** +.. rst-class:: classref-method + +:ref:`VBoxContainer` **get_vbox** **(** **)** Returns the vertical box container of the dialog, custom controls can be added to it. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_method_invalidate: -- void **invalidate** **(** **)** +.. rst-class:: classref-method + +void **invalidate** **(** **)** Invalidate and update the current dialog content list. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_FileDialog_theme_color_file_disabled_color: -- :ref:`Color` **file_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 0.25)`` | -+-----------+--------------------------+ +:ref:`Color` **file_disabled_color** = ``Color(1, 1, 1, 0.25)`` -The color tint for disabled files (when the ``FileDialog`` is used in open folder mode). +The color tint for disabled files (when the **FileDialog** is used in open folder mode). + +.. rst-class:: classref-item-separator ---- .. _class_FileDialog_theme_color_file_icon_color: -- :ref:`Color` **file_icon_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **file_icon_color** = ``Color(1, 1, 1, 1)`` The color modulation applied to the file icon. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_color_folder_icon_color: -- :ref:`Color` **folder_icon_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **folder_icon_color** = ``Color(1, 1, 1, 1)`` The color modulation applied to the folder icon. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_icon_back_folder: -- :ref:`Texture2D` **back_folder** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **back_folder** Custom icon for the back arrow. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_icon_file: -- :ref:`Texture2D` **file** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **file** Custom icon for files. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_icon_folder: -- :ref:`Texture2D` **folder** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **folder** Custom icon for folders. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_icon_forward_folder: -- :ref:`Texture2D` **forward_folder** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **forward_folder** Custom icon for the forward arrow. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_icon_parent_folder: -- :ref:`Texture2D` **parent_folder** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **parent_folder** Custom icon for the parent folder arrow. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_icon_reload: -- :ref:`Texture2D` **reload** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **reload** Custom icon for the reload button. +.. rst-class:: classref-item-separator + ---- .. _class_FileDialog_theme_icon_toggle_hidden: -- :ref:`Texture2D` **toggle_hidden** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **toggle_hidden** Custom icon for the toggle hidden button. diff --git a/classes/class_filesystemdock.rst b/classes/class_filesystemdock.rst index a6edc581e..56dc78343 100644 --- a/classes/class_filesystemdock.rst +++ b/classes/class_filesystemdock.rst @@ -16,62 +16,135 @@ FileSystemDock There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`navigate_to_path` **(** :ref:`String` path **)** | -+------+--------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`navigate_to_path` **(** :ref:`String` path **)** | + +------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_FileSystemDock_signal_display_mode_changed: -- **display_mode_changed** **(** **)** +.. rst-class:: classref-signal + +**display_mode_changed** **(** **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_FileSystemDock_signal_file_removed: -- **file_removed** **(** :ref:`String` file **)** +.. rst-class:: classref-signal + +**file_removed** **(** :ref:`String` file **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_FileSystemDock_signal_files_moved: -- **files_moved** **(** :ref:`String` old_file, :ref:`String` new_file **)** +.. rst-class:: classref-signal + +**files_moved** **(** :ref:`String` old_file, :ref:`String` new_file **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_FileSystemDock_signal_folder_moved: -- **folder_moved** **(** :ref:`String` old_folder, :ref:`String` new_folder **)** +.. rst-class:: classref-signal + +**folder_moved** **(** :ref:`String` old_folder, :ref:`String` new_folder **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_FileSystemDock_signal_folder_removed: -- **folder_removed** **(** :ref:`String` folder **)** +.. rst-class:: classref-signal + +**folder_removed** **(** :ref:`String` folder **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_FileSystemDock_signal_inherit: -- **inherit** **(** :ref:`String` file **)** +.. rst-class:: classref-signal + +**inherit** **(** :ref:`String` file **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_FileSystemDock_signal_instantiate: -- **instantiate** **(** :ref:`PackedStringArray` files **)** +.. rst-class:: classref-signal + +**instantiate** **(** :ref:`PackedStringArray` files **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_FileSystemDock_method_navigate_to_path: -- void **navigate_to_path** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **navigate_to_path** **(** :ref:`String` path **)** .. container:: contribute diff --git a/classes/class_float.rst b/classes/class_float.rst index d6a2581c0..cc4290581 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -12,14 +12,18 @@ float Float built-in type. +.. rst-class:: classref-introduction-group + Description ----------- -The ``float`` built-in type is a 64-bit double-precision floating-point number, equivalent to ``double`` in C++. This type has 14 reliable decimal digits of precision. The ``float`` type can be stored in :ref:`Variant`, which is the generic type used by the engine. The maximum value of ``float`` is approximately ``1.79769e308``, and the minimum is approximately ``-1.79769e308``. +The **float** built-in type is a 64-bit double-precision floating-point number, equivalent to ``double`` in C++. This type has 14 reliable decimal digits of precision. The **float** type can be stored in :ref:`Variant`, which is the generic type used by the engine. The maximum value of **float** is approximately ``1.79769e308``, and the minimum is approximately ``-1.79769e308``. Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to ``float`` in C++, which have 6 reliable decimal digits of precision. For data structures such as :ref:`Vector2` and :ref:`Vector3`, Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the ``float=64`` option. -Math done using the ``float`` type is not guaranteed to be exact or deterministic, and will often result in small errors. You should usually use the :ref:`@GlobalScope.is_equal_approx` and :ref:`@GlobalScope.is_zero_approx` methods instead of ``==`` to compare ``float`` values for equality. +Math done using the **float** type is not guaranteed to be exact or deterministic, and will often result in small errors. You should usually use the :ref:`@GlobalScope.is_equal_approx` and :ref:`@GlobalScope.is_zero_approx` methods instead of ``==`` to compare **float** values for equality. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -28,371 +32,575 @@ Tutorials - `Wikipedia: Single-precision floating-point format `__ +.. rst-class:: classref-reftable-group + Constructors ------------ -+---------------------------+------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`float` **(** **)** | -+---------------------------+------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`float` **(** :ref:`float` from **)** | -+---------------------------+------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`float` **(** :ref:`String` from **)** | -+---------------------------+------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`float` **(** :ref:`bool` from **)** | -+---------------------------+------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`float` **(** :ref:`int` from **)** | -+---------------------------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`float` **(** **)** | + +---------------------------+------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`float` **(** :ref:`float` from **)** | + +---------------------------+------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`float` **(** :ref:`String` from **)** | + +---------------------------+------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`float` **(** :ref:`bool` from **)** | + +---------------------------+------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`float` **(** :ref:`int` from **)** | + +---------------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`operator *` **(** :ref:`Color` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2i` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3i` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4i` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator *` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator *` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator **` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator **` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator +` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator +` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator -` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator -` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator /` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator /` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`float` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`int` right **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator unary+` **(** **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator unary-` **(** **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator *` **(** :ref:`Color` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2i` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3i` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4i` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator *` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator *` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator **` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator **` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator +` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator +` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator -` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator -` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator /` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator /` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator unary+` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator unary-` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_float_constructor_float: -- :ref:`float` **float** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``float`` set to ``0.0``. +:ref:`float` **float** **(** **)** + +Constructs a default-initialized **float** set to ``0.0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`float` **float** **(** :ref:`float` from **)** +.. rst-class:: classref-constructor -Constructs a ``float`` as a copy of the given ``float``. +:ref:`float` **float** **(** :ref:`float` from **)** + +Constructs a **float** as a copy of the given **float**. + +.. rst-class:: classref-item-separator ---- -- :ref:`float` **float** **(** :ref:`String` from **)** +.. rst-class:: classref-constructor -Converts a :ref:`String` to a ``float``, following the same rules as :ref:`String.to_float`. +:ref:`float` **float** **(** :ref:`String` from **)** + +Converts a :ref:`String` to a **float**, following the same rules as :ref:`String.to_float`. + +.. rst-class:: classref-item-separator ---- -- :ref:`float` **float** **(** :ref:`bool` from **)** +.. rst-class:: classref-constructor + +:ref:`float` **float** **(** :ref:`bool` from **)** Cast a :ref:`bool` value to a floating-point value, ``float(true)`` will be equal to 1.0 and ``float(false)`` will be equal to 0.0. +.. rst-class:: classref-item-separator + ---- -- :ref:`float` **float** **(** :ref:`int` from **)** +.. rst-class:: classref-constructor + +:ref:`float` **float** **(** :ref:`int` from **)** Cast an :ref:`int` value to a floating-point value, ``float(1)`` will be equal to ``1.0``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_float_operator_neq_bool: +.. _class_float_operator_neq_float: -- :ref:`bool` **operator !=** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`float` right **)** Returns ``true`` if two floats are different from each other. +.. rst-class:: classref-item-separator + ---- -- :ref:`bool` **operator !=** **(** :ref:`int` right **)** +.. _class_float_operator_neq_int: + +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`int` right **)** Returns ``true`` if the integer has different value than the float. +.. rst-class:: classref-item-separator + ---- .. _class_float_operator_mul_Color: -- :ref:`Color` **operator *** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator -Multiplies each component of the :ref:`Color` by the given ``float``. +:ref:`Color` **operator *** **(** :ref:`Color` right **)** + +Multiplies each component of the :ref:`Color` by the given **float**. :: print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75) ----- - -- :ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** - -Multiplies each component of the :ref:`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. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** +.. _class_float_operator_mul_Quaternion: -Multiplies each component of the :ref:`Vector2` by the given ``float``. +.. rst-class:: classref-operator + +:ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** + +Multiplies each component of the :ref:`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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_mul_Vector2: + +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** + +Multiplies each component of the :ref:`Vector2` by the given **float**. :: print(2.5 * Vector2(1, 3)) # Prints "(2.5, 7.5)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector2` **operator *** **(** :ref:`Vector2i` right **)** +.. _class_float_operator_mul_Vector2i: -Multiplies each component of the :ref:`Vector2i` by the given ``float``. Returns a :ref:`Vector2`. +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`Vector2i` right **)** + +Multiplies each component of the :ref:`Vector2i` by the given **float**. Returns a :ref:`Vector2`. :: print(0.9 * Vector2i(10, 15)) # Prints "(9, 13.5)" ----- - -- :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** - -Multiplies each component of the :ref:`Vector3` by the given ``float``. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3` **operator *** **(** :ref:`Vector3i` right **)** +.. _class_float_operator_mul_Vector3: -Multiplies each component of the :ref:`Vector3i` by the given ``float``. Returns a :ref:`Vector3`. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** + +Multiplies each component of the :ref:`Vector3` by the given **float**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_mul_Vector3i: + +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Vector3i` right **)** + +Multiplies each component of the :ref:`Vector3i` by the given **float**. Returns a :ref:`Vector3`. :: print(0.9 * Vector3i(10, 15, 20)) # Prints "(9, 13.5, 18)" ----- - -- :ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** - -Multiplies each component of the :ref:`Vector4` by the given ``float``. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4` **operator *** **(** :ref:`Vector4i` right **)** +.. _class_float_operator_mul_Vector4: -Multiplies each component of the :ref:`Vector4i` by the given ``float``. Returns a :ref:`Vector4`. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** + +Multiplies each component of the :ref:`Vector4` by the given **float**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_mul_Vector4i: + +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`Vector4i` right **)** + +Multiplies each component of the :ref:`Vector4i` by the given **float**. Returns a :ref:`Vector4`. :: print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)" ----- - -- :ref:`float` **operator *** **(** :ref:`float` right **)** - -Multiplies two ``float``\ s. +.. rst-class:: classref-item-separator ---- -- :ref:`float` **operator *** **(** :ref:`int` right **)** +.. _class_float_operator_mul_float: -Multiplies a ``float`` and an :ref:`int`. The result is a ``float``. +.. rst-class:: classref-operator + +:ref:`float` **operator *** **(** :ref:`float` right **)** + +Multiplies two **float**\ s. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_mul_int: + +.. rst-class:: classref-operator + +:ref:`float` **operator *** **(** :ref:`int` right **)** + +Multiplies a **float** and an :ref:`int`. The result is a **float**. + +.. rst-class:: classref-item-separator ---- .. _class_float_operator_pow_float: -- :ref:`float` **operator **** **(** :ref:`float` right **)** +.. rst-class:: classref-operator -Raises a ``float`` to a power of a ``float``. +:ref:`float` **operator **** **(** :ref:`float` right **)** + +Raises a **float** to a power of a **float**. :: print(39.0625**0.25) # 2.5 +.. rst-class:: classref-item-separator + ---- -- :ref:`float` **operator **** **(** :ref:`int` right **)** +.. _class_float_operator_pow_int: -Raises a ``float`` to a power of an :ref:`int`. The result is a ``float``. +.. rst-class:: classref-operator + +:ref:`float` **operator **** **(** :ref:`int` right **)** + +Raises a **float** to a power of an :ref:`int`. The result is a **float**. :: print(0.9**3) # 0.729 +.. rst-class:: classref-item-separator + ---- .. _class_float_operator_sum_float: -- :ref:`float` **operator +** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`float` **operator +** **(** :ref:`float` right **)** Adds two floats. +.. rst-class:: classref-item-separator + ---- -- :ref:`float` **operator +** **(** :ref:`int` right **)** +.. _class_float_operator_sum_int: -Adds a ``float`` and an :ref:`int`. The result is a ``float``. +.. rst-class:: classref-operator + +:ref:`float` **operator +** **(** :ref:`int` right **)** + +Adds a **float** and an :ref:`int`. The result is a **float**. + +.. rst-class:: classref-item-separator ---- .. _class_float_operator_dif_float: -- :ref:`float` **operator -** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`float` **operator -** **(** :ref:`float` right **)** Subtracts a float from a float. +.. rst-class:: classref-item-separator + ---- -- :ref:`float` **operator -** **(** :ref:`int` right **)** +.. _class_float_operator_dif_int: -Subtracts an :ref:`int` from a ``float``. The result is a ``float``. +.. rst-class:: classref-operator + +:ref:`float` **operator -** **(** :ref:`int` right **)** + +Subtracts an :ref:`int` from a **float**. The result is a **float**. + +.. rst-class:: classref-item-separator ---- .. _class_float_operator_div_float: -- :ref:`float` **operator /** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`float` **operator /** **(** :ref:`float` right **)** Divides two floats. ----- - -- :ref:`float` **operator /** **(** :ref:`int` right **)** - -Divides a ``float`` by an :ref:`int`. The result is a ``float``. +.. rst-class:: classref-item-separator ---- -.. _class_float_operator_lt_bool: +.. _class_float_operator_div_int: -- :ref:`bool` **operator <** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`float` **operator /** **(** :ref:`int` right **)** + +Divides a **float** by an :ref:`int`. The result is a **float**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_lt_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator <** **(** :ref:`float` right **)** Returns ``true`` if the left float is less than the right one. ----- - -- :ref:`bool` **operator <** **(** :ref:`int` right **)** - -Returns ``true`` if this ``float`` is less than the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_float_operator_lte_bool: +.. _class_float_operator_lt_int: -- :ref:`bool` **operator <=** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <** **(** :ref:`int` right **)** + +Returns ``true`` if this **float** is less than the given :ref:`int`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_lte_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`float` right **)** Returns ``true`` if the left float is less than or equal to the right one. ----- - -- :ref:`bool` **operator <=** **(** :ref:`int` right **)** - -Returns ``true`` if this ``float`` is less than or equal to the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_float_operator_eq_bool: +.. _class_float_operator_lte_int: -- :ref:`bool` **operator ==** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`int` right **)** + +Returns ``true`` if this **float** is less than or equal to the given :ref:`int`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_eq_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`float` right **)** Returns ``true`` if both floats are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`@GlobalScope.is_equal_approx` or :ref:`@GlobalScope.is_zero_approx` instead, which are more reliable. ----- - -- :ref:`bool` **operator ==** **(** :ref:`int` right **)** - -Returns ``true`` if the ``float`` and the given :ref:`int` are equal. +.. rst-class:: classref-item-separator ---- -.. _class_float_operator_gt_bool: +.. _class_float_operator_eq_int: -- :ref:`bool` **operator >** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`int` right **)** + +Returns ``true`` if the **float** and the given :ref:`int` are equal. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_gt_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >** **(** :ref:`float` right **)** Returns ``true`` if the left float is greater than the right one. ----- - -- :ref:`bool` **operator >** **(** :ref:`int` right **)** - -Returns ``true`` if this ``float`` is greater than the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_float_operator_gte_bool: +.. _class_float_operator_gt_int: -- :ref:`bool` **operator >=** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator >** **(** :ref:`int` right **)** + +Returns ``true`` if this **float** is greater than the given :ref:`int`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_gte_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`float` right **)** Returns ``true`` if the left float is greater than or equal to the right one. ----- - -- :ref:`bool` **operator >=** **(** :ref:`int` right **)** - -Returns ``true`` if this ``float`` is greater than or equal to the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_float_operator_unplus_float: +.. _class_float_operator_gte_int: -- :ref:`float` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`int` right **)** + +Returns ``true`` if this **float** is greater than or equal to the given :ref:`int`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_float_operator_unplus: + +.. rst-class:: classref-operator + +:ref:`float` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_float_operator_unminus_float: +.. _class_float_operator_unminus: -- :ref:`float` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`float` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_flowcontainer.rst b/classes/class_flowcontainer.rst index a26dc9690..943a33194 100644 --- a/classes/class_flowcontainer.rst +++ b/classes/class_flowcontainer.rst @@ -16,6 +16,8 @@ FlowContainer Base class for flow containers. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,116 +25,169 @@ Arranges child :ref:`Control` nodes vertically or horizontally in A line is filled with :ref:`Control` nodes until no more fit on the same line, similar to text in an autowrapped label. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+----------------------------------------------------------+-----------+ -| :ref:`AlignmentMode` | :ref:`alignment` | ``0`` | -+--------------------------------------------------------+----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`vertical` | ``false`` | -+--------------------------------------------------------+----------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+----------------------------------------------------------+-----------+ + | :ref:`AlignmentMode` | :ref:`alignment` | ``0`` | + +--------------------------------------------------------+----------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`vertical` | ``false`` | + +--------------------------------------------------------+----------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+--------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_count` **(** **)** |const| | -+-----------------------+--------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +-----------------------+--------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------+----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+-----------------------+----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`v_separation` | ``4`` | -+-----------------------+----------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------+----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +-----------------------+----------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_FlowContainer_AlignmentMode: -.. _class_FlowContainer_constant_ALIGNMENT_BEGIN: - -.. _class_FlowContainer_constant_ALIGNMENT_CENTER: - -.. _class_FlowContainer_constant_ALIGNMENT_END: +.. rst-class:: classref-enumeration enum **AlignmentMode**: -- **ALIGNMENT_BEGIN** = **0** --- The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). +.. _class_FlowContainer_constant_ALIGNMENT_BEGIN: -- **ALIGNMENT_CENTER** = **1** --- The child controls will be centered in the container. +.. rst-class:: classref-enumeration-constant -- **ALIGNMENT_END** = **2** --- 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). +:ref:`AlignmentMode` **ALIGNMENT_BEGIN** = ``0`` + +The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). + +.. _class_FlowContainer_constant_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_CENTER** = ``1`` + +The child controls will be centered in the container. + +.. _class_FlowContainer_constant_ALIGNMENT_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_END** = ``2`` + +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-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FlowContainer_property_alignment: -- :ref:`AlignmentMode` **alignment** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_alignment(value) | -+-----------+----------------------+ -| *Getter* | get_alignment() | -+-----------+----------------------+ +:ref:`AlignmentMode` **alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_alignment** **(** :ref:`AlignmentMode` value **)** +- :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`). +.. rst-class:: classref-item-separator + ---- .. _class_FlowContainer_property_vertical: -- :ref:`bool` **vertical** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_vertical(value) | -+-----------+---------------------+ -| *Getter* | is_vertical() | -+-----------+---------------------+ +:ref:`bool` **vertical** = ``false`` -If ``true``, the ``FlowContainer`` will arrange its children vertically, rather than horizontally. +.. rst-class:: classref-property-setget + +- void **set_vertical** **(** :ref:`bool` value **)** +- :ref:`bool` **is_vertical** **(** **)** + +If ``true``, the **FlowContainer** will arrange its children vertically, rather than horizontally. Can't be changed when using :ref:`HFlowContainer` and :ref:`VFlowContainer`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_FlowContainer_method_get_line_count: -- :ref:`int` **get_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_count** **(** **)** |const| Returns the current line count. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_FlowContainer_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal separation of children nodes. +.. rst-class:: classref-item-separator + ---- .. _class_FlowContainer_theme_constant_v_separation: -- :ref:`int` **v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **v_separation** = ``4`` The vertical separation of children nodes. diff --git a/classes/class_fogmaterial.rst b/classes/class_fogmaterial.rst index 7cd9c8d45..7d3cd5544 100644 --- a/classes/class_fogmaterial.rst +++ b/classes/class_fogmaterial.rst @@ -14,6 +14,8 @@ FogMaterial :ref:`Material` used with a :ref:`FogVolume` to draw things with the volumetric fog effect. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,117 +23,134 @@ A :ref:`Material` resource that can be used by :ref:`FogVolume`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`albedo` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`density` | ``1.0`` | -+-----------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`Texture3D` | :ref:`density_texture` | | -+-----------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`edge_fade` | ``0.1`` | -+-----------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`emission` | ``Color(0, 0, 0, 1)`` | -+-----------------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`height_falloff` | ``0.0`` | -+-----------------------------------+--------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`albedo` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`density` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`Texture3D` | :ref:`density_texture` | | + +-----------------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`edge_fade` | ``0.1`` | + +-----------------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`emission` | ``Color(0, 0, 0, 1)`` | + +-----------------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`height_falloff` | ``0.0`` | + +-----------------------------------+--------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FogMaterial_property_albedo: -- :ref:`Color` **albedo** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_albedo(value) | -+-----------+-----------------------+ -| *Getter* | get_albedo() | -+-----------+-----------------------+ +:ref:`Color` **albedo** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_albedo** **(** :ref:`Color` value **)** +- :ref:`Color` **get_albedo** **(** **)** The single-scattering :ref:`Color` of the :ref:`FogVolume`. Internally, :ref:`albedo` is converted into single-scattering, which is additively blended with other :ref:`FogVolume`\ s and the :ref:`Environment.volumetric_fog_albedo`. +.. rst-class:: classref-item-separator + ---- .. _class_FogMaterial_property_density: -- :ref:`float` **density** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_density(value) | -+-----------+--------------------+ -| *Getter* | get_density() | -+-----------+--------------------+ +:ref:`float` **density** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_density** **(** :ref:`float` value **)** +- :ref:`float` **get_density** **(** **)** The density of the :ref:`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`\ s or global volumetric fog. \ **Note:** Due to limited precision, :ref:`density` values between ``-0.001`` and ``0.001`` (exclusive) act like ``0.0``. This does not apply to :ref:`Environment.volumetric_fog_density`. +.. rst-class:: classref-item-separator + ---- .. _class_FogMaterial_property_density_texture: -- :ref:`Texture3D` **density_texture** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_density_texture(value) | -+----------+----------------------------+ -| *Getter* | get_density_texture() | -+----------+----------------------------+ +:ref:`Texture3D` **density_texture** + +.. rst-class:: classref-property-setget + +- void **set_density_texture** **(** :ref:`Texture3D` value **)** +- :ref:`Texture3D` **get_density_texture** **(** **)** The 3D texture that is used to scale the :ref:`density` of the :ref:`FogVolume`. This can be used to vary fog density within the :ref:`FogVolume` with any kind of static pattern. For animated effects, consider using a custom :doc:`fog shader <../tutorials/shaders/shader_reference/fog_shader>`. +.. rst-class:: classref-item-separator + ---- .. _class_FogMaterial_property_edge_fade: -- :ref:`float` **edge_fade** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.1`` | -+-----------+----------------------+ -| *Setter* | set_edge_fade(value) | -+-----------+----------------------+ -| *Getter* | get_edge_fade() | -+-----------+----------------------+ +:ref:`float` **edge_fade** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_edge_fade** **(** :ref:`float` value **)** +- :ref:`float` **get_edge_fade** **(** **)** The hardness of the edges of the :ref:`FogVolume`. A higher value will result in softer edges, while a lower value will result in harder edges. +.. rst-class:: classref-item-separator + ---- .. _class_FogMaterial_property_emission: -- :ref:`Color` **emission** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_emission(value) | -+-----------+-----------------------+ -| *Getter* | get_emission() | -+-----------+-----------------------+ +:ref:`Color` **emission** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_emission** **(** :ref:`Color` value **)** +- :ref:`Color` **get_emission** **(** **)** The :ref:`Color` of the light emitted by the :ref:`FogVolume`. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the :ref:`Color` of the :ref:`FogVolume` independently from light sources. +.. rst-class:: classref-item-separator + ---- .. _class_FogMaterial_property_height_falloff: -- :ref:`float` **height_falloff** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------+ -| *Setter* | set_height_falloff(value) | -+-----------+---------------------------+ -| *Getter* | get_height_falloff() | -+-----------+---------------------------+ +:ref:`float` **height_falloff** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_height_falloff** **(** :ref:`float` value **)** +- :ref:`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`. diff --git a/classes/class_fogvolume.rst b/classes/class_fogvolume.rst index 5709d1868..a4e314bde 100644 --- a/classes/class_fogvolume.rst +++ b/classes/class_fogvolume.rst @@ -14,76 +14,92 @@ FogVolume A node used to add local fog with the volumetric fog effect. +.. rst-class:: classref-introduction-group + Description ----------- -``FogVolume``\ s are used to add localized fog into the global volumetric fog effect. ``FogVolume``\ s can also remove volumetric fog from specific areas if using a :ref:`FogMaterial` with a negative :ref:`FogMaterial.density`. +**FogVolume**\ s are used to add localized fog into the global volumetric fog effect. **FogVolume**\ s can also remove volumetric fog from specific areas if using a :ref:`FogMaterial` with a negative :ref:`FogMaterial.density`. -Performance of ``FogVolume``\ s is directly related to their relative size on the screen and the complexity of their attached :ref:`FogMaterial`. It is best to keep ``FogVolume``\ s relatively small and simple where possible. +Performance of **FogVolume**\ s is directly related to their relative size on the screen and the complexity of their attached :ref:`FogMaterial`. It is best to keep **FogVolume**\ s relatively small and simple where possible. -\ **Note:** ``FogVolume``\ s only have a visible effect if :ref:`Environment.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` to ``0.0``. +\ **Note:** **FogVolume**\ s only have a visible effect if :ref:`Environment.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` to ``0.0``. + +.. rst-class:: classref-reftable-group Properties ---------- -+------------------------------------------------------------+----------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+------------------------------------------------------------+----------------------------------------------------+----------------------+ -| :ref:`Material` | :ref:`material` | | -+------------------------------------------------------------+----------------------------------------------------+----------------------+ -| :ref:`FogVolumeShape` | :ref:`shape` | ``3`` | -+------------------------------------------------------------+----------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+----------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | + +------------------------------------------------------------+----------------------------------------------------+----------------------+ + | :ref:`Material` | :ref:`material` | | + +------------------------------------------------------------+----------------------------------------------------+----------------------+ + | :ref:`FogVolumeShape` | :ref:`shape` | ``3`` | + +------------------------------------------------------------+----------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FogVolume_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_extents(value) | -+-----------+----------------------+ -| *Getter* | get_extents() | -+-----------+----------------------+ +:ref:`Vector3` **extents** = ``Vector3(1, 1, 1)`` -The size of the ``FogVolume`` when :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX`. +.. rst-class:: classref-property-setget -\ **Note:** Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth` (at a performance cost) or by decreasing :ref:`Environment.volumetric_fog_length` (at no performance cost, but at the cost of lower fog range). Alternatively, the ``FogVolume`` can be made thicker and use a lower density in the :ref:`material`. +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** -\ **Note:** If :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER`, the cone/cylinder will be adjusted to fit within the extents. Non-uniform scaling of cone/cylinder shapes via the :ref:`extents` property is not supported, but you can scale the ``FogVolume`` node instead. +The size of the **FogVolume** when :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX`. + +\ **Note:** Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth` (at a performance cost) or by decreasing :ref:`Environment.volumetric_fog_length` (at no performance cost, but at the cost of lower fog range). Alternatively, the **FogVolume** can be made thicker and use a lower density in the :ref:`material`. + +\ **Note:** If :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER`, the cone/cylinder will be adjusted to fit within the extents. Non-uniform scaling of cone/cylinder shapes via the :ref:`extents` property is not supported, but you can scale the **FogVolume** node instead. + +.. rst-class:: classref-item-separator ---- .. _class_FogVolume_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** -The :ref:`Material` used by the ``FogVolume``. Can be either a built-in :ref:`FogMaterial` or a custom :ref:`ShaderMaterial`. +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** + +The :ref:`Material` used by the **FogVolume**. Can be either a built-in :ref:`FogMaterial` or a custom :ref:`ShaderMaterial`. + +.. rst-class:: classref-item-separator ---- .. _class_FogVolume_property_shape: -- :ref:`FogVolumeShape` **shape** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``3`` | -+-----------+------------------+ -| *Setter* | set_shape(value) | -+-----------+------------------+ -| *Getter* | get_shape() | -+-----------+------------------+ +:ref:`FogVolumeShape` **shape** = ``3`` -The shape of the ``FogVolume``. This can be set to either :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_WORLD`. +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`FogVolumeShape` value **)** +- :ref:`FogVolumeShape` **get_shape** **(** **)** + +The shape of the **FogVolume**. This can be set to either :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_WORLD`. .. |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.)` diff --git a/classes/class_font.rst b/classes/class_font.rst index 18547e9e4..73003242d 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -16,266 +16,389 @@ Font Base class for fonts and font variations. +.. rst-class:: classref-introduction-group + Description ----------- Font is the abstract base class for font, so it shouldn't be used directly. Other types of fonts inherit from it. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`draw_char` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`draw_char_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_multiline_string` **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_multiline_string_outline` **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_string` **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_string_outline` **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`find_variation` **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_ascent` **(** :ref:`int` font_size=16 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` font_size **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_descent` **(** :ref:`int` font_size=16 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_face_count` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Font[]` | :ref:`get_fallbacks` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_font_name` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FontStyle` | :ref:`get_font_style` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_font_style_name` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_height` **(** :ref:`int` font_size=16 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_multiline_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_opentype_features` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`get_rids` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_spacing` **(** :ref:`SpacingType` spacing **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_supported_chars` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_supported_feature_list` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_supported_variation_list` **(** **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_underline_position` **(** :ref:`int` font_size=16 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_underline_thickness` **(** :ref:`int` font_size=16 **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_char` **(** :ref:`int` char **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_language_supported` **(** :ref:`String` language **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_script_supported` **(** :ref:`String` script **)** |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cache_capacity` **(** :ref:`int` single_line, :ref:`int` multi_line **)** | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fallbacks` **(** :ref:`Font[]` fallbacks **)** | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`draw_char` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`draw_char_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string` **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string_outline` **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string` **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string_outline` **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`find_variation` **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_ascent` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` font_size **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_descent` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_face_count` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font[]` | :ref:`get_fallbacks` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_font_name` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_font_stretch` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontStyle` | :ref:`get_font_style` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_font_style_name` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_font_weight` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_height` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_multiline_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_opentype_features` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`get_rids` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_spacing` **(** :ref:`SpacingType` spacing **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_supported_chars` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_supported_feature_list` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_supported_variation_list` **(** **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_underline_position` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_underline_thickness` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_char` **(** :ref:`int` char **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_language_supported` **(** :ref:`String` language **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_script_supported` **(** :ref:`String` script **)** |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_capacity` **(** :ref:`int` single_line, :ref:`int` multi_line **)** | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fallbacks` **(** :ref:`Font[]` fallbacks **)** | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Font_method_draw_char: -- :ref:`float` **draw_char** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +:ref:`float` **draw_char** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| 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. \ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string` or :ref:`TextLine` instead. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_draw_char_outline: -- :ref:`float` **draw_char_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +:ref:`float` **draw_char_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| 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. \ **Note:** Do not use this function to draw strings character by character, use :ref:`draw_string` or :ref:`TextLine` instead. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_draw_multiline_string: -- void **draw_multiline_string** **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. rst-class:: classref-method + +void **draw_multiline_string** **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. See also :ref:`CanvasItem.draw_multiline_string`. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_draw_multiline_string_outline: -- void **draw_multiline_string_outline** **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. rst-class:: classref-method + +void **draw_multiline_string_outline** **(** :ref:`RID` canvas_item, :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), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. See also :ref:`CanvasItem.draw_multiline_string_outline`. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_draw_string: -- void **draw_string** **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. rst-class:: classref-method + +void **draw_string** **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. See also :ref:`CanvasItem.draw_string`. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_draw_string_outline: -- void **draw_string_outline** **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. rst-class:: classref-method + +void **draw_string_outline** **(** :ref:`RID` canvas_item, :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), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. See also :ref:`CanvasItem.draw_string_outline`. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_find_variation: -- :ref:`RID` **find_variation** **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **find_variation** **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| Returns :ref:`TextServer` RID of the font cache for specific variation. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_ascent: -- :ref:`float` **get_ascent** **(** :ref:`int` font_size=16 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_ascent** **(** :ref:`int` font_size=16 **)** |const| Returns the average font ascent (number of pixels above the baseline). \ **Note:** Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line). +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_char_size: -- :ref:`Vector2` **get_char_size** **(** :ref:`int` char, :ref:`int` font_size **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_char_size** **(** :ref:`int` char, :ref:`int` font_size **)** |const| Returns the size of a character, optionally taking kerning into account if the next character is provided. \ **Note:** Do not use this function to calculate width of the string character by character, use :ref:`get_string_size` or :ref:`TextLine` instead. The height returned is the font height (see also :ref:`get_height`) and has no relation to the glyph height. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_descent: -- :ref:`float` **get_descent** **(** :ref:`int` font_size=16 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_descent** **(** :ref:`int` font_size=16 **)** |const| Returns the average font descent (number of pixels below the baseline). \ **Note:** Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line). +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_face_count: -- :ref:`int` **get_face_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_face_count** **(** **)** |const| Returns number of faces in the TrueType / OpenType collection. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_fallbacks: -- :ref:`Font[]` **get_fallbacks** **(** **)** |const| +.. rst-class:: classref-method -Returns array of fallback ``Font``\ s. +:ref:`Font[]` **get_fallbacks** **(** **)** |const| + +Returns array of fallback **Font**\ s. + +.. rst-class:: classref-item-separator ---- .. _class_Font_method_get_font_name: -- :ref:`String` **get_font_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_font_name** **(** **)** |const| Returns font family name. +.. rst-class:: classref-item-separator + +---- + +.. _class_Font_method_get_font_stretch: + +.. rst-class:: classref-method + +:ref:`int` **get_font_stretch** **(** **)** |const| + +Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. + +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_font_style: -- :ref:`FontStyle` **get_font_style** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`FontStyle` **get_font_style** **(** **)** |const| Returns font style flags, see :ref:`FontStyle`. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_font_style_name: -- :ref:`String` **get_font_style_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_font_style_name** **(** **)** |const| Returns font style name. +.. rst-class:: classref-item-separator + +---- + +.. _class_Font_method_get_font_weight: + +.. rst-class:: classref-method + +:ref:`int` **get_font_weight** **(** **)** |const| + +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_Font_method_get_height: -- :ref:`float` **get_height** **(** :ref:`int` font_size=16 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_height** **(** :ref:`int` font_size=16 **)** |const| Returns the total average font height (ascent plus descent) in pixels. \ **Note:** Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line). +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_multiline_string_size: -- :ref:`Vector2` **get_multiline_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_multiline_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. See also :ref:`draw_multiline_string`. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_opentype_features: -- :ref:`Dictionary` **get_opentype_features** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_opentype_features** **(** **)** |const| Returns a set of OpenType feature tags. More info: `OpenType feature tags `__. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_rids: -- :ref:`RID[]` **get_rids** **(** **)** |const| +.. rst-class:: classref-method -Returns :ref:`Array` of valid ``Font`` :ref:`RID`\ s, which can be passed to the :ref:`TextServer` methods. +:ref:`RID[]` **get_rids** **(** **)** |const| + +Returns :ref:`Array` of valid **Font** :ref:`RID`\ s, which can be passed to the :ref:`TextServer` methods. + +.. rst-class:: classref-item-separator ---- .. _class_Font_method_get_spacing: -- :ref:`int` **get_spacing** **(** :ref:`SpacingType` spacing **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_spacing** **(** :ref:`SpacingType` spacing **)** |const| Returns the spacing for the given ``type`` (see :ref:`SpacingType`). +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_string_size: -- :ref:`Vector2` **get_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Returns the size of a bounding box of a single-line string, taking kerning and advance into account. See also :ref:`get_multiline_string_size` and :ref:`draw_string`. @@ -297,93 +420,133 @@ For example, to get the string size as displayed by a single-line Label, use: \ **Note:** Real height of the string is context-dependent and can be significantly different from the value returned by :ref:`get_height`. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_supported_chars: -- :ref:`String` **get_supported_chars** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_supported_chars** **(** **)** |const| Returns a string containing all the characters available in the font. If a given character is included in more than one font data source, it appears only once in the returned string. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_supported_feature_list: -- :ref:`Dictionary` **get_supported_feature_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_supported_feature_list** **(** **)** |const| Returns list of OpenType features supported by font. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_supported_variation_list: -- :ref:`Dictionary` **get_supported_variation_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_supported_variation_list** **(** **)** |const| Returns list of supported `variation coordinates `__, each coordinate is returned as ``tag: Vector3i(min_value,max_value,default_value)``. Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_underline_position: -- :ref:`float` **get_underline_position** **(** :ref:`int` font_size=16 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_underline_position** **(** :ref:`int` font_size=16 **)** |const| Returns average pixel offset of the underline below the baseline. \ **Note:** Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_get_underline_thickness: -- :ref:`float` **get_underline_thickness** **(** :ref:`int` font_size=16 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_underline_thickness** **(** :ref:`int` font_size=16 **)** |const| Returns average thickness of the underline. \ **Note:** Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_has_char: -- :ref:`bool` **has_char** **(** :ref:`int` char **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_char** **(** :ref:`int` char **)** |const| Returns ``true`` if a Unicode ``char`` is available in the font. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_is_language_supported: -- :ref:`bool` **is_language_supported** **(** :ref:`String` language **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_language_supported** **(** :ref:`String` language **)** |const| Returns ``true``, if font supports given language (`ISO 639 `__ code). +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_is_script_supported: -- :ref:`bool` **is_script_supported** **(** :ref:`String` script **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_script_supported** **(** :ref:`String` script **)** |const| Returns ``true``, if font supports given script (`ISO 15924 `__ code). +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_set_cache_capacity: -- void **set_cache_capacity** **(** :ref:`int` single_line, :ref:`int` multi_line **)** +.. rst-class:: classref-method + +void **set_cache_capacity** **(** :ref:`int` single_line, :ref:`int` multi_line **)** Sets LRU cache capacity for ``draw_*`` methods. +.. rst-class:: classref-item-separator + ---- .. _class_Font_method_set_fallbacks: -- void **set_fallbacks** **(** :ref:`Font[]` fallbacks **)** +.. rst-class:: classref-method -Sets array of fallback ``Font``\ s. +void **set_fallbacks** **(** :ref:`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.)` diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index 8efa88e49..6312b506f 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -14,10 +14,12 @@ FontFile Font source data and prerendered glyph cache, imported from dynamic or bitmap font. +.. rst-class:: classref-introduction-group + Description ----------- -``FontFile`` contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback :ref:`Font`\ s to use. +**FontFile** contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback :ref:`Font`\ s to use. Use :ref:`FontVariation` to access specific OpenType variation of the font, create simulated bold / slanted version, and draw lines of text. @@ -54,957 +56,1296 @@ Supported font formats: +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`fixed_size` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`font_name` | ``""`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`FontStyle` | :ref:`font_style` | ``0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`force_autohinter` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Hinting` | :ref:`hinting` | ``1`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`msdf_pixel_range` | ``16`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`msdf_size` | ``48`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`multichannel_signed_distance_field` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Dictionary` | :ref:`opentype_feature_overrides` | ``{}`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`oversampling` | ``0.0`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`style_name` | ``""`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`allow_system_fallback` | ``true`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`fixed_size` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`font_name` | ``""`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`font_stretch` | ``100`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`FontStyle` | :ref:`font_style` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`font_weight` | ``400`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`force_autohinter` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Hinting` | :ref:`hinting` | ``1`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`msdf_pixel_range` | ``16`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`msdf_size` | ``48`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`multichannel_signed_distance_field` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Dictionary` | :ref:`opentype_feature_overrides` | ``{}`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`oversampling` | ``0.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`style_name` | ``""`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_cache` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_glyphs` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_kerning_map` **(** :ref:`int` cache_index, :ref:`int` size **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_size_cache` **(** :ref:`int` cache_index **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_textures` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_cache_ascent` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cache_count` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_cache_descent` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_cache_scale` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_cache_underline_position` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_cache_underline_thickness` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_embolden` **(** :ref:`int` cache_index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_face_index` **(** :ref:`int` cache_index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_glyph_advance` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_glyph_index` **(** :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_glyph_list` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_glyph_offset` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_glyph_size` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_glyph_texture_idx` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_glyph_uv_rect` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_kerning` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`get_kerning_list` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_language_support_override` **(** :ref:`String` language **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_language_support_overrides` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_script_support_override` **(** :ref:`String` script **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_script_support_overrides` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`get_size_cache_list` **(** :ref:`int` cache_index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_texture_count` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_texture_image` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_texture_offsets` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`get_transform` **(** :ref:`int` cache_index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_variation_coordinates` **(** :ref:`int` cache_index **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_bitmap_font` **(** :ref:`String` path **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_dynamic_font` **(** :ref:`String` path **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_cache` **(** :ref:`int` cache_index **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_glyph` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_kerning` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_language_support_override` **(** :ref:`String` language **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_script_support_override` **(** :ref:`String` script **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_size_cache` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_texture` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`render_glyph` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` index **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`render_range` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cache_ascent` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` ascent **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cache_descent` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` descent **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cache_scale` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` scale **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cache_underline_position` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_position **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cache_underline_thickness` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_thickness **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_embolden` **(** :ref:`int` cache_index, :ref:`float` strength **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_face_index` **(** :ref:`int` cache_index, :ref:`int` face_index **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_glyph_advance` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_glyph_offset` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_glyph_size` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_glyph_texture_idx` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_glyph_uv_rect` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_kerning` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_language_support_override` **(** :ref:`String` language, :ref:`bool` supported **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_script_support_override` **(** :ref:`String` script, :ref:`bool` supported **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture_image` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture_offsets` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_transform` **(** :ref:`int` cache_index, :ref:`Transform2D` transform **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_variation_coordinates` **(** :ref:`int` cache_index, :ref:`Dictionary` variation_coordinates **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_cache` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_glyphs` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_kerning_map` **(** :ref:`int` cache_index, :ref:`int` size **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_size_cache` **(** :ref:`int` cache_index **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_textures` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_cache_ascent` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cache_count` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_cache_descent` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_cache_scale` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_cache_underline_position` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_cache_underline_thickness` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_embolden` **(** :ref:`int` cache_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_face_index` **(** :ref:`int` cache_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_glyph_advance` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_glyph_index` **(** :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_glyph_list` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_glyph_offset` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_glyph_size` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_glyph_texture_idx` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_glyph_uv_rect` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_kerning` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`get_kerning_list` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_language_support_override` **(** :ref:`String` language **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_language_support_overrides` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_script_support_override` **(** :ref:`String` script **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_script_support_overrides` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`get_size_cache_list` **(** :ref:`int` cache_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_texture_count` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_texture_image` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_texture_offsets` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_transform` **(** :ref:`int` cache_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_variation_coordinates` **(** :ref:`int` cache_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_bitmap_font` **(** :ref:`String` path **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_dynamic_font` **(** :ref:`String` path **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_cache` **(** :ref:`int` cache_index **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_glyph` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_kerning` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_language_support_override` **(** :ref:`String` language **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_script_support_override` **(** :ref:`String` script **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_size_cache` **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_texture` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`render_glyph` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` index **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`render_range` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_ascent` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` ascent **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_descent` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` descent **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_scale` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` scale **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_underline_position` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_position **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_underline_thickness` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_thickness **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_embolden` **(** :ref:`int` cache_index, :ref:`float` strength **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_face_index` **(** :ref:`int` cache_index, :ref:`int` face_index **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_glyph_advance` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_glyph_offset` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_glyph_size` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_glyph_texture_idx` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_glyph_uv_rect` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_kerning` **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_language_support_override` **(** :ref:`String` language, :ref:`bool` supported **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_script_support_override` **(** :ref:`String` script, :ref:`bool` supported **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_texture_image` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_texture_offsets` **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_transform` **(** :ref:`int` cache_index, :ref:`Transform2D` transform **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_variation_coordinates` **(** :ref:`int` cache_index, :ref:`Dictionary` variation_coordinates **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- +.. _class_FontFile_property_allow_system_fallback: + +.. rst-class:: classref-property + +:ref:`bool` **allow_system_fallback** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_allow_system_fallback** **(** :ref:`bool` value **)** +- :ref:`bool` **is_allow_system_fallback** **(** **)** + +If set to ``true``, system fonts can be automatically used as fallbacks. + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_property_antialiasing: -- :ref:`FontAntialiasing` **antialiasing** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_antialiasing(value) | -+-----------+-------------------------+ -| *Getter* | get_antialiasing() | -+-----------+-------------------------+ +:ref:`FontAntialiasing` **antialiasing** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_antialiasing** **(** :ref:`FontAntialiasing` value **)** +- :ref:`FontAntialiasing` **get_antialiasing** **(** **)** Font anti-aliasing mode. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_data: -- :ref:`PackedByteArray` **data** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+-----------------------+ -| *Setter* | set_data(value) | -+-----------+-----------------------+ -| *Getter* | get_data() | -+-----------+-----------------------+ +:ref:`PackedByteArray` **data** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_data** **(** :ref:`PackedByteArray` value **)** +- :ref:`PackedByteArray` **get_data** **(** **)** Contents of the dynamic font source file. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_fallbacks: -- :ref:`Font[]` **fallbacks** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``[]`` | -+-----------+----------------------+ -| *Setter* | set_fallbacks(value) | -+-----------+----------------------+ -| *Getter* | get_fallbacks() | -+-----------+----------------------+ +:ref:`Font[]` **fallbacks** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_fallbacks** **(** :ref:`Font[]` value **)** +- :ref:`Font[]` **get_fallbacks** **(** **)** Array of fallback :ref:`Font`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_fixed_size: -- :ref:`int` **fixed_size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_fixed_size(value) | -+-----------+-----------------------+ -| *Getter* | get_fixed_size() | -+-----------+-----------------------+ +:ref:`int` **fixed_size** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_size** **(** :ref:`int` value **)** +- :ref:`int` **get_fixed_size** **(** **)** Font size, used only for the bitmap fonts. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_font_name: -- :ref:`String` **font_name** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``""`` | -+-----------+----------------------+ -| *Setter* | set_font_name(value) | -+-----------+----------------------+ -| *Getter* | get_font_name() | -+-----------+----------------------+ +:ref:`String` **font_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_font_name** **(** :ref:`String` value **)** +- :ref:`String` **get_font_name** **(** **)** Font family name. +.. rst-class:: classref-item-separator + +---- + +.. _class_FontFile_property_font_stretch: + +.. rst-class:: classref-property + +:ref:`int` **font_stretch** = ``100`` + +.. rst-class:: classref-property-setget + +- void **set_font_stretch** **(** :ref:`int` value **)** +- :ref:`int` **get_font_stretch** **(** **)** + +Font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. + +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_font_style: -- :ref:`FontStyle` **font_style** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_font_style(value) | -+-----------+-----------------------+ -| *Getter* | get_font_style() | -+-----------+-----------------------+ +:ref:`FontStyle` **font_style** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_font_style** **(** :ref:`FontStyle` value **)** +- :ref:`FontStyle` **get_font_style** **(** **)** Font style flags, see :ref:`FontStyle`. +.. rst-class:: classref-item-separator + +---- + +.. _class_FontFile_property_font_weight: + +.. rst-class:: classref-property + +:ref:`int` **font_weight** = ``400`` + +.. rst-class:: classref-property-setget + +- void **set_font_weight** **(** :ref:`int` value **)** +- :ref:`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``. + +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_force_autohinter: -- :ref:`bool` **force_autohinter** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_force_autohinter(value) | -+-----------+-----------------------------+ -| *Getter* | is_force_autohinter() | -+-----------+-----------------------------+ +:ref:`bool` **force_autohinter** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_force_autohinter** **(** :ref:`bool` value **)** +- :ref:`bool` **is_force_autohinter** **(** **)** If set to ``true``, auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_generate_mipmaps: -- :ref:`bool` **generate_mipmaps** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_generate_mipmaps(value) | -+-----------+-----------------------------+ -| *Getter* | get_generate_mipmaps() | -+-----------+-----------------------------+ +:ref:`bool` **generate_mipmaps** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_generate_mipmaps** **(** :ref:`bool` value **)** +- :ref:`bool` **get_generate_mipmaps** **(** **)** If set to ``true``, generate mipmaps for the font textures. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_hinting: -- :ref:`Hinting` **hinting** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_hinting(value) | -+-----------+--------------------+ -| *Getter* | get_hinting() | -+-----------+--------------------+ +:ref:`Hinting` **hinting** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_hinting** **(** :ref:`Hinting` value **)** +- :ref:`Hinting` **get_hinting** **(** **)** Font hinting mode. Used by dynamic fonts only. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_msdf_pixel_range: -- :ref:`int` **msdf_pixel_range** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``16`` | -+-----------+-----------------------------+ -| *Setter* | set_msdf_pixel_range(value) | -+-----------+-----------------------------+ -| *Getter* | get_msdf_pixel_range() | -+-----------+-----------------------------+ +:ref:`int` **msdf_pixel_range** = ``16`` + +.. rst-class:: classref-property-setget + +- void **set_msdf_pixel_range** **(** :ref:`int` value **)** +- :ref:`int` **get_msdf_pixel_range** **(** **)** The width of the range around the shape between the minimum and maximum representable signed distance. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_msdf_size: -- :ref:`int` **msdf_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``48`` | -+-----------+----------------------+ -| *Setter* | set_msdf_size(value) | -+-----------+----------------------+ -| *Getter* | get_msdf_size() | -+-----------+----------------------+ +:ref:`int` **msdf_size** = ``48`` + +.. rst-class:: classref-property-setget + +- void **set_msdf_size** **(** :ref:`int` value **)** +- :ref:`int` **get_msdf_size** **(** **)** Source font size used to generate MSDF textures. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_multichannel_signed_distance_field: -- :ref:`bool` **multichannel_signed_distance_field** +.. rst-class:: classref-property -+-----------+-----------------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------------+ -| *Setter* | set_multichannel_signed_distance_field(value) | -+-----------+-----------------------------------------------+ -| *Getter* | is_multichannel_signed_distance_field() | -+-----------+-----------------------------------------------+ +:ref:`bool` **multichannel_signed_distance_field** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_multichannel_signed_distance_field** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_opentype_feature_overrides: -- :ref:`Dictionary` **opentype_feature_overrides** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``{}`` | -+-----------+---------------------------------------+ -| *Setter* | set_opentype_feature_overrides(value) | -+-----------+---------------------------------------+ -| *Getter* | get_opentype_feature_overrides() | -+-----------+---------------------------------------+ +:ref:`Dictionary` **opentype_feature_overrides** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_opentype_feature_overrides** **(** :ref:`Dictionary` value **)** +- :ref:`Dictionary` **get_opentype_feature_overrides** **(** **)** Font OpenType feature set override. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_oversampling: -- :ref:`float` **oversampling** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_oversampling(value) | -+-----------+-------------------------+ -| *Getter* | get_oversampling() | -+-----------+-------------------------+ +:ref:`float` **oversampling** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_oversampling** **(** :ref:`float` value **)** +- :ref:`float` **get_oversampling** **(** **)** 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_FontFile_property_style_name: -- :ref:`String` **style_name** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``""`` | -+-----------+----------------------------+ -| *Setter* | set_font_style_name(value) | -+-----------+----------------------------+ -| *Getter* | get_font_style_name() | -+-----------+----------------------------+ +:ref:`String` **style_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_font_style_name** **(** :ref:`String` value **)** +- :ref:`String` **get_font_style_name** **(** **)** Font style name. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_property_subpixel_positioning: -- :ref:`SubpixelPositioning` **subpixel_positioning** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_subpixel_positioning(value) | -+-----------+---------------------------------+ -| *Getter* | get_subpixel_positioning() | -+-----------+---------------------------------+ +:ref:`SubpixelPositioning` **subpixel_positioning** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_subpixel_positioning** **(** :ref:`SubpixelPositioning` value **)** +- :ref:`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` to automatically enable it based on the font size. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_FontFile_method_clear_cache: -- void **clear_cache** **(** **)** +.. rst-class:: classref-method + +void **clear_cache** **(** **)** Removes all font cache entries. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_clear_glyphs: -- void **clear_glyphs** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **clear_glyphs** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** Removes all rendered glyphs information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture` to remove them manually. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_clear_kerning_map: -- void **clear_kerning_map** **(** :ref:`int` cache_index, :ref:`int` size **)** +.. rst-class:: classref-method + +void **clear_kerning_map** **(** :ref:`int` cache_index, :ref:`int` size **)** Removes all kerning overrides. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_clear_size_cache: -- void **clear_size_cache** **(** :ref:`int` cache_index **)** +.. rst-class:: classref-method + +void **clear_size_cache** **(** :ref:`int` cache_index **)** Removes all font sizes from the cache entry +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_clear_textures: -- void **clear_textures** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **clear_textures** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** Removes all textures from font cache entry. \ **Note:** This function will not remove glyphs associated with the texture, use :ref:`remove_glyph` to remove them manually. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_cache_ascent: -- :ref:`float` **get_cache_ascent** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_cache_ascent** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| Returns the font ascent (number of pixels above the baseline). +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_cache_count: -- :ref:`int` **get_cache_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_cache_count** **(** **)** |const| Returns number of the font cache entries. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_cache_descent: -- :ref:`float` **get_cache_descent** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_cache_descent** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_cache_scale: -- :ref:`float` **get_cache_scale** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_cache_scale** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_cache_underline_position: -- :ref:`float` **get_cache_underline_position** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_cache_underline_position** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_cache_underline_thickness: -- :ref:`float` **get_cache_underline_thickness** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_cache_underline_thickness** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_embolden: -- :ref:`float` **get_embolden** **(** :ref:`int` cache_index **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_embolden** **(** :ref:`int` cache_index **)** |const| Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_face_index: -- :ref:`int` **get_face_index** **(** :ref:`int` cache_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_face_index** **(** :ref:`int` cache_index **)** |const| Recturns an active face index in the TrueType / OpenType collection. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_glyph_advance: -- :ref:`Vector2` **get_glyph_advance** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_glyph_advance** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph **)** |const| Returns glyph advance (offset of the next glyph). \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_glyph_index: -- :ref:`int` **get_glyph_index** **(** :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_glyph_index** **(** :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_glyph_list: -- :ref:`PackedInt32Array` **get_glyph_list** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_glyph_list** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| Returns list of rendered glyphs in the cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_glyph_offset: -- :ref:`Vector2` **get_glyph_offset** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_glyph_offset** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns glyph offset from the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_glyph_size: -- :ref:`Vector2` **get_glyph_size** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_glyph_size** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns glyph size. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_glyph_texture_idx: -- :ref:`int` **get_glyph_texture_idx** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_glyph_texture_idx** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns index of the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_glyph_uv_rect: -- :ref:`Rect2` **get_glyph_uv_rect** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_glyph_uv_rect** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns rectangle in the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_kerning: -- :ref:`Vector2` **get_kerning** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_kerning** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| Returns kerning for the pair of glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_kerning_list: -- :ref:`Vector2i[]` **get_kerning_list** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **get_kerning_list** **(** :ref:`int` cache_index, :ref:`int` size **)** |const| Returns list of the kerning overrides. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_language_support_override: -- :ref:`bool` **get_language_support_override** **(** :ref:`String` language **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_language_support_override** **(** :ref:`String` language **)** |const| Returns ``true`` if support override is enabled for the ``language``. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_language_support_overrides: -- :ref:`PackedStringArray` **get_language_support_overrides** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_language_support_overrides** **(** **)** |const| Returns list of language support overrides. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_script_support_override: -- :ref:`bool` **get_script_support_override** **(** :ref:`String` script **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_script_support_override** **(** :ref:`String` script **)** |const| Returns ``true`` if support override is enabled for the ``script``. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_script_support_overrides: -- :ref:`PackedStringArray` **get_script_support_overrides** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_script_support_overrides** **(** **)** |const| Returns list of script support overrides. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_size_cache_list: -- :ref:`Vector2i[]` **get_size_cache_list** **(** :ref:`int` cache_index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **get_size_cache_list** **(** :ref:`int` cache_index **)** |const| Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_texture_count: -- :ref:`int` **get_texture_count** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_texture_count** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** |const| Returns number of textures used by font cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_texture_image: -- :ref:`Image` **get_texture_image** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **get_texture_image** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| Returns a copy of the font cache texture image. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_texture_offsets: -- :ref:`PackedInt32Array` **get_texture_offsets** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_texture_offsets** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| Returns a copy of the array containing glyph packing data. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_transform: -- :ref:`Transform2D` **get_transform** **(** :ref:`int` cache_index **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_transform** **(** :ref:`int` cache_index **)** |const| Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_get_variation_coordinates: -- :ref:`Dictionary` **get_variation_coordinates** **(** :ref:`int` cache_index **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_variation_coordinates** **(** :ref:`int` cache_index **)** |const| Returns variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list` for more info. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_load_bitmap_font: -- :ref:`Error` **load_bitmap_font** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load_bitmap_font** **(** :ref:`String` path **)** Loads an AngelCode BMFont (.fnt, .font) bitmap font from file ``path``. \ **Warning:** This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the ``user://`` directory. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_load_dynamic_font: -- :ref:`Error` **load_dynamic_font** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load_dynamic_font** **(** :ref:`String` path **)** Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file ``path``. \ **Warning:** This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the ``user://`` directory. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_remove_cache: -- void **remove_cache** **(** :ref:`int` cache_index **)** +.. rst-class:: classref-method + +void **remove_cache** **(** :ref:`int` cache_index **)** Removes specified font cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_remove_glyph: -- void **remove_glyph** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** +.. rst-class:: classref-method + +void **remove_glyph** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph **)** Removes specified rendered glyph information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture` to remove them manually. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_remove_kerning: -- void **remove_kerning** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** +.. rst-class:: classref-method + +void **remove_kerning** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** Removes kerning override for the pair of glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_remove_language_support_override: -- void **remove_language_support_override** **(** :ref:`String` language **)** +.. rst-class:: classref-method + +void **remove_language_support_override** **(** :ref:`String` language **)** Remove language support override. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_remove_script_support_override: -- void **remove_script_support_override** **(** :ref:`String` script **)** +.. rst-class:: classref-method + +void **remove_script_support_override** **(** :ref:`String` script **)** Removes script support override. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_remove_size_cache: -- void **remove_size_cache** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **remove_size_cache** **(** :ref:`int` cache_index, :ref:`Vector2i` size **)** Removes specified font size from the cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_remove_texture: -- void **remove_texture** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** +.. rst-class:: classref-method + +void **remove_texture** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index **)** Removes specified texture from the cache entry. \ **Note:** This function will not remove glyphs associated with the texture. Remove them manually using :ref:`remove_glyph`. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_render_glyph: -- void **render_glyph** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` index **)** +.. rst-class:: classref-method + +void **render_glyph** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` index **)** Renders specified glyph to the font cache texture. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_render_range: -- void **render_range** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** +.. rst-class:: classref-method + +void **render_range** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** Renders the range of characters to the font cache texture. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_cache_ascent: -- void **set_cache_ascent** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` ascent **)** +.. rst-class:: classref-method + +void **set_cache_ascent** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` ascent **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_cache_descent: -- void **set_cache_descent** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` descent **)** +.. rst-class:: classref-method + +void **set_cache_descent** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` descent **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_cache_scale: -- void **set_cache_scale** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` scale **)** +.. rst-class:: classref-method + +void **set_cache_scale** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` scale **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_cache_underline_position: -- void **set_cache_underline_position** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_position **)** +.. rst-class:: classref-method + +void **set_cache_underline_position** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_position **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_cache_underline_thickness: -- void **set_cache_underline_thickness** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_thickness **)** +.. rst-class:: classref-method + +void **set_cache_underline_thickness** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`float` underline_thickness **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_embolden: -- void **set_embolden** **(** :ref:`int` cache_index, :ref:`float` strength **)** +.. rst-class:: classref-method + +void **set_embolden** **(** :ref:`int` cache_index, :ref:`float` strength **)** Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_face_index: -- void **set_face_index** **(** :ref:`int` cache_index, :ref:`int` face_index **)** +.. rst-class:: classref-method + +void **set_face_index** **(** :ref:`int` cache_index, :ref:`int` face_index **)** Sets an active face index in the TrueType / OpenType collection. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_glyph_advance: -- void **set_glyph_advance** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** +.. rst-class:: classref-method + +void **set_glyph_advance** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** Sets glyph advance (offset of the next glyph). \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_glyph_offset: -- void **set_glyph_offset** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** +.. rst-class:: classref-method + +void **set_glyph_offset** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** Sets glyph offset from the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_glyph_size: -- void **set_glyph_size** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** +.. rst-class:: classref-method + +void **set_glyph_size** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** Sets glyph size. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_glyph_texture_idx: -- void **set_glyph_texture_idx** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** +.. rst-class:: classref-method + +void **set_glyph_texture_idx** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** Sets index of the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_glyph_uv_rect: -- void **set_glyph_uv_rect** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** +.. rst-class:: classref-method + +void **set_glyph_uv_rect** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** Sets rectangle in the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_kerning: -- void **set_kerning** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** +.. rst-class:: classref-method + +void **set_kerning** **(** :ref:`int` cache_index, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** Sets kerning for the pair of glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_language_support_override: -- void **set_language_support_override** **(** :ref:`String` language, :ref:`bool` supported **)** +.. rst-class:: classref-method + +void **set_language_support_override** **(** :ref:`String` language, :ref:`bool` supported **)** Adds override for :ref:`Font.is_language_supported`. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_script_support_override: -- void **set_script_support_override** **(** :ref:`String` script, :ref:`bool` supported **)** +.. rst-class:: classref-method + +void **set_script_support_override** **(** :ref:`String` script, :ref:`bool` supported **)** Adds override for :ref:`Font.is_script_supported`. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_texture_image: -- void **set_texture_image** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** +.. rst-class:: classref-method + +void **set_texture_image** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** Sets font cache texture image. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_texture_offsets: -- void **set_texture_offsets** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** +.. rst-class:: classref-method + +void **set_texture_offsets** **(** :ref:`int` cache_index, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** Sets array containing glyph packing data. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_transform: -- void **set_transform** **(** :ref:`int` cache_index, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **set_transform** **(** :ref:`int` cache_index, :ref:`Transform2D` transform **)** Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_FontFile_method_set_variation_coordinates: -- void **set_variation_coordinates** **(** :ref:`int` cache_index, :ref:`Dictionary` variation_coordinates **)** +.. rst-class:: classref-method + +void **set_variation_coordinates** **(** :ref:`int` cache_index, :ref:`Dictionary` variation_coordinates **)** Sets variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list` for more info. diff --git a/classes/class_fontvariation.rst b/classes/class_fontvariation.rst index 957ee54fd..10b6ddc7c 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -14,6 +14,8 @@ FontVariation Variation of the :ref:`Font`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -42,225 +44,260 @@ To use simulated bold font variant: +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`base_font` | | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Dictionary` | :ref:`opentype_features` | ``{}`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`spacing_bottom` | ``0`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`spacing_glyph` | ``0`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`spacing_space` | ``0`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`spacing_top` | ``0`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`variation_embolden` | ``0.0`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`variation_face_index` | ``0`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Dictionary` | :ref:`variation_opentype` | ``{}`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Transform2D` | :ref:`variation_transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`base_font` | | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Dictionary` | :ref:`opentype_features` | ``{}`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_bottom` | ``0`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_glyph` | ``0`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_space` | ``0`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_top` | ``0`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`variation_embolden` | ``0.0`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`variation_face_index` | ``0`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Dictionary` | :ref:`variation_opentype` | ``{}`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`variation_transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_spacing` **(** :ref:`SpacingType` spacing, :ref:`int` value **)** | -+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_spacing` **(** :ref:`SpacingType` spacing, :ref:`int` value **)** | + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FontVariation_property_base_font: -- :ref:`Font` **base_font** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_base_font(value) | -+----------+----------------------+ -| *Getter* | get_base_font() | -+----------+----------------------+ +:ref:`Font` **base_font** + +.. rst-class:: classref-property-setget + +- void **set_base_font** **(** :ref:`Font` value **)** +- :ref:`Font` **get_base_font** **(** **)** Base font used to create a variation. If not set, default :ref:`Theme` font is used. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_fallbacks: -- :ref:`Font[]` **fallbacks** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``[]`` | -+-----------+----------------------+ -| *Setter* | set_fallbacks(value) | -+-----------+----------------------+ -| *Getter* | get_fallbacks() | -+-----------+----------------------+ +:ref:`Font[]` **fallbacks** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_fallbacks** **(** :ref:`Font[]` value **)** +- :ref:`Font[]` **get_fallbacks** **(** **)** Array of fallback :ref:`Font`\ s. If not set :ref:`base_font` fallback are ussed. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_opentype_features: -- :ref:`Dictionary` **opentype_features** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``{}`` | -+-----------+------------------------------+ -| *Setter* | set_opentype_features(value) | -+-----------+------------------------------+ -| *Getter* | get_opentype_features() | -+-----------+------------------------------+ +:ref:`Dictionary` **opentype_features** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_opentype_features** **(** :ref:`Dictionary` value **)** +- :ref:`Dictionary` **get_opentype_features** **(** **)** A set of OpenType feature tags. More info: `OpenType feature tags `__. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_spacing_bottom: -- :ref:`int` **spacing_bottom** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_spacing(value) | -+-----------+--------------------+ -| *Getter* | get_spacing() | -+-----------+--------------------+ +:ref:`int` **spacing_bottom** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_spacing** **(** :ref:`SpacingType` spacing, :ref:`int` value **)** +- :ref:`int` **get_spacing** **(** **)** Extra spacing at the bottom of the line in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_spacing_glyph: -- :ref:`int` **spacing_glyph** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_spacing(value) | -+-----------+--------------------+ -| *Getter* | get_spacing() | -+-----------+--------------------+ +:ref:`int` **spacing_glyph** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_spacing** **(** :ref:`SpacingType` spacing, :ref:`int` value **)** +- :ref:`int` **get_spacing** **(** **)** Extra spacing between graphical glyphs +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_spacing_space: -- :ref:`int` **spacing_space** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_spacing(value) | -+-----------+--------------------+ -| *Getter* | get_spacing() | -+-----------+--------------------+ +:ref:`int` **spacing_space** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_spacing** **(** :ref:`SpacingType` spacing, :ref:`int` value **)** +- :ref:`int` **get_spacing** **(** **)** Extra width of the space glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_spacing_top: -- :ref:`int` **spacing_top** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_spacing(value) | -+-----------+--------------------+ -| *Getter* | get_spacing() | -+-----------+--------------------+ +:ref:`int` **spacing_top** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_spacing** **(** :ref:`SpacingType` spacing, :ref:`int` value **)** +- :ref:`int` **get_spacing** **(** **)** Extra spacing at the top of the line in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_variation_embolden: -- :ref:`float` **variation_embolden** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_variation_embolden(value) | -+-----------+-------------------------------+ -| *Getter* | get_variation_embolden() | -+-----------+-------------------------------+ +:ref:`float` **variation_embolden** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_variation_embolden** **(** :ref:`float` value **)** +- :ref:`float` **get_variation_embolden** **(** **)** If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. \ **Note:** Emboldened fonts might have self-intersecting outlines, which will prevent MSDF fonts and :ref:`TextMesh` from working correctly. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_variation_face_index: -- :ref:`int` **variation_face_index** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_variation_face_index(value) | -+-----------+---------------------------------+ -| *Getter* | get_variation_face_index() | -+-----------+---------------------------------+ +:ref:`int` **variation_face_index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_variation_face_index** **(** :ref:`int` value **)** +- :ref:`int` **get_variation_face_index** **(** **)** Active face index in the TrueType / OpenType collection file. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_variation_opentype: -- :ref:`Dictionary` **variation_opentype** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``{}`` | -+-----------+-------------------------------+ -| *Setter* | set_variation_opentype(value) | -+-----------+-------------------------------+ -| *Getter* | get_variation_opentype() | -+-----------+-------------------------------+ +:ref:`Dictionary` **variation_opentype** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_variation_opentype** **(** :ref:`Dictionary` value **)** +- :ref:`Dictionary` **get_variation_opentype** **(** **)** Font OpenType variation coordinates. More info: `OpenType variation tags `__. +.. rst-class:: classref-item-separator + ---- .. _class_FontVariation_property_variation_transform: -- :ref:`Transform2D` **variation_transform** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+-----------+-----------------------------------+ -| *Setter* | set_variation_transform(value) | -+-----------+-----------------------------------+ -| *Getter* | get_variation_transform() | -+-----------+-----------------------------------+ +:ref:`Transform2D` **variation_transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_variation_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_variation_transform** **(** **)** 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)``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_FontVariation_method_set_spacing: -- void **set_spacing** **(** :ref:`SpacingType` spacing, :ref:`int` value **)** +.. rst-class:: classref-method + +void **set_spacing** **(** :ref:`SpacingType` spacing, :ref:`int` value **)** Sets the spacing for ``type`` (see :ref:`SpacingType`) to ``value`` in pixels (not relative to the font size). diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst index 03bfb5ad1..19645a695 100644 --- a/classes/class_gdscript.rst +++ b/classes/class_gdscript.rst @@ -14,6 +14,8 @@ GDScript A script implemented in the GDScript programming language. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,34 +23,53 @@ A script implemented in the GDScript programming language. The script extends th \ :ref:`new` creates a new instance of the script. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GDScript documentation index <../tutorials/scripting/gdscript/index>` +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`get_as_byte_code` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`new` **(** ... **)** |vararg| | -+-----------------------------------------------+-------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_as_byte_code` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`new` **(** ... **)** |vararg| | + +-----------------------------------------------+-------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GDScript_method_get_as_byte_code: -- :ref:`PackedByteArray` **get_as_byte_code** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_as_byte_code** **(** **)** |const| Returns byte code for the script source code. +.. rst-class:: classref-item-separator + ---- .. _class_GDScript_method_new: -- :ref:`Variant` **new** **(** ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Variant` **new** **(** ... **)** |vararg| Returns a new instance of the script. diff --git a/classes/class_generic6dofjoint3d.rst b/classes/class_generic6dofjoint3d.rst index 98c565bc9..a3db14862 100644 --- a/classes/class_generic6dofjoint3d.rst +++ b/classes/class_generic6dofjoint3d.rst @@ -14,1857 +14,2141 @@ Generic6DOFJoint3D The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. +.. rst-class:: classref-introduction-group + Description ----------- The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_x/damping` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_limit_x/enabled` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_x/erp` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_x/force_limit` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_x/lower_angle` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_x/restitution` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_x/softness` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_x/upper_angle` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_y/damping` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_limit_y/enabled` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_y/erp` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_y/force_limit` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_y/lower_angle` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_y/restitution` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_y/softness` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_y/upper_angle` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_z/damping` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_limit_z/enabled` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_z/erp` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_z/force_limit` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_z/lower_angle` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_z/restitution` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_z/softness` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_limit_z/upper_angle` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_motor_x/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_motor_x/force_limit` | ``300.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_motor_x/target_velocity` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_motor_y/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_motor_y/force_limit` | ``300.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_motor_y/target_velocity` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_motor_z/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_motor_z/force_limit` | ``300.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_motor_z/target_velocity` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_x/damping` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_spring_x/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_x/equilibrium_point` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_x/stiffness` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_y/damping` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_spring_y/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_y/equilibrium_point` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_y/stiffness` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_z/damping` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`angular_spring_z/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_z/equilibrium_point` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`angular_spring_z/stiffness` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_x/damping` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_limit_x/enabled` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_x/lower_distance` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_x/restitution` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_x/softness` | ``0.7`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_x/upper_distance` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_y/damping` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_limit_y/enabled` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_y/lower_distance` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_y/restitution` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_y/softness` | ``0.7`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_y/upper_distance` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_z/damping` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_limit_z/enabled` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_z/lower_distance` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_z/restitution` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_z/softness` | ``0.7`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_limit_z/upper_distance` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_motor_x/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_motor_x/force_limit` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_motor_x/target_velocity` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_motor_y/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_motor_y/force_limit` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_motor_y/target_velocity` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_motor_z/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_motor_z/force_limit` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_motor_z/target_velocity` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_x/damping` | ``0.01`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_spring_x/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_x/equilibrium_point` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_x/stiffness` | ``0.01`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_y/damping` | ``0.01`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_spring_y/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_y/equilibrium_point` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_y/stiffness` | ``0.01`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_z/damping` | ``0.01`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`linear_spring_z/enabled` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_z/equilibrium_point` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`linear_spring_z/stiffness` | ``0.01`` | -+---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_x/damping` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_limit_x/enabled` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_x/erp` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_x/force_limit` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_x/lower_angle` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_x/restitution` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_x/softness` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_x/upper_angle` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_y/damping` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_limit_y/enabled` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_y/erp` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_y/force_limit` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_y/lower_angle` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_y/restitution` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_y/softness` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_y/upper_angle` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_z/damping` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_limit_z/enabled` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_z/erp` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_z/force_limit` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_z/lower_angle` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_z/restitution` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_z/softness` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_z/upper_angle` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_motor_x/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_motor_x/force_limit` | ``300.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_motor_x/target_velocity` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_motor_y/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_motor_y/force_limit` | ``300.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_motor_y/target_velocity` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_motor_z/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_motor_z/force_limit` | ``300.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_motor_z/target_velocity` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_x/damping` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_spring_x/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_x/equilibrium_point` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_x/stiffness` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_y/damping` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_spring_y/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_y/equilibrium_point` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_y/stiffness` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_z/damping` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_spring_z/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_z/equilibrium_point` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_spring_z/stiffness` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_x/damping` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_limit_x/enabled` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_x/lower_distance` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_x/restitution` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_x/softness` | ``0.7`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_x/upper_distance` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_y/damping` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_limit_y/enabled` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_y/lower_distance` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_y/restitution` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_y/softness` | ``0.7`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_y/upper_distance` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_z/damping` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_limit_z/enabled` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_z/lower_distance` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_z/restitution` | ``0.5`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_z/softness` | ``0.7`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_limit_z/upper_distance` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_motor_x/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_motor_x/force_limit` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_motor_x/target_velocity` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_motor_y/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_motor_y/force_limit` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_motor_y/target_velocity` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_motor_z/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_motor_z/force_limit` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_motor_z/target_velocity` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_x/damping` | ``0.01`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_spring_x/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_x/equilibrium_point` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_x/stiffness` | ``0.01`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_y/damping` | ``0.01`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_spring_y/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_y/equilibrium_point` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_y/stiffness` | ``0.01`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_z/damping` | ``0.01`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`linear_spring_z/enabled` | ``false`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_z/equilibrium_point` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`linear_spring_z/stiffness` | ``0.01`` | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_flag_x` **(** :ref:`Flag` flag **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_flag_y` **(** :ref:`Flag` flag **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_flag_z` **(** :ref:`Flag` flag **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param_x` **(** :ref:`Param` param **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param_y` **(** :ref:`Param` param **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param_z` **(** :ref:`Param` param **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_flag_x` **(** :ref:`Flag` flag, :ref:`bool` value **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_flag_y` **(** :ref:`Flag` flag, :ref:`bool` value **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_flag_z` **(** :ref:`Flag` flag, :ref:`bool` value **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param_x` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param_y` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param_z` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag_x` **(** :ref:`Flag` flag **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag_y` **(** :ref:`Flag` flag **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag_z` **(** :ref:`Flag` flag **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_x` **(** :ref:`Param` param **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_y` **(** :ref:`Param` param **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_z` **(** :ref:`Param` param **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_flag_x` **(** :ref:`Flag` flag, :ref:`bool` value **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_flag_y` **(** :ref:`Flag` flag, :ref:`bool` value **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_flag_z` **(** :ref:`Flag` flag, :ref:`bool` value **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param_x` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param_y` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param_z` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Generic6DOFJoint3D_Param: -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_LOWER_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_UPPER_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_LIMIT_SOFTNESS: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_RESTITUTION: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_DAMPING: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_MOTOR_TARGET_VELOCITY: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_MOTOR_FORCE_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_STIFFNESS: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_DAMPING: - -.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_LOWER_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_UPPER_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_LIMIT_SOFTNESS: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_DAMPING: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_RESTITUTION: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_FORCE_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_ERP: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_MOTOR_TARGET_VELOCITY: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_MOTOR_FORCE_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_STIFFNESS: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_DAMPING: - -.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT: - -.. _class_Generic6DOFJoint3D_constant_PARAM_MAX: +.. rst-class:: classref-enumeration enum **Param**: -- **PARAM_LINEAR_LOWER_LIMIT** = **0** --- The minimum difference between the pivot points' axes. +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_LOWER_LIMIT: -- **PARAM_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes. +.. rst-class:: classref-enumeration-constant -- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the axes. The lower, the slower the movement. +:ref:`Param` **PARAM_LINEAR_LOWER_LIMIT** = ``0`` -- **PARAM_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes' movement. The lower, the more momentum gets lost. +The minimum difference between the pivot points' axes. -- **PARAM_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_UPPER_LIMIT: -- **PARAM_LINEAR_MOTOR_TARGET_VELOCITY** = **5** --- The velocity the linear motor will try to reach. +.. rst-class:: classref-enumeration-constant -- **PARAM_LINEAR_MOTOR_FORCE_LIMIT** = **6** --- The maximum force the linear motor will apply while trying to reach the velocity target. +:ref:`Param` **PARAM_LINEAR_UPPER_LIMIT** = ``1`` -- **PARAM_LINEAR_SPRING_STIFFNESS** = **7** +The maximum difference between the pivot points' axes. -- **PARAM_LINEAR_SPRING_DAMPING** = **8** +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_LIMIT_SOFTNESS: -- **PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT** = **9** +.. rst-class:: classref-enumeration-constant -- **PARAM_ANGULAR_LOWER_LIMIT** = **10** --- The minimum rotation in negative direction to break loose and rotate around the axes. +:ref:`Param` **PARAM_LINEAR_LIMIT_SOFTNESS** = ``2`` -- **PARAM_ANGULAR_UPPER_LIMIT** = **11** --- The minimum rotation in positive direction to break loose and rotate around the axes. +A factor applied to the movement across the axes. The lower, the slower the movement. -- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **12** --- The speed of all rotations across the axes. +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_RESTITUTION: -- **PARAM_ANGULAR_DAMPING** = **13** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. +.. rst-class:: classref-enumeration-constant -- **PARAM_ANGULAR_RESTITUTION** = **14** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. +:ref:`Param` **PARAM_LINEAR_RESTITUTION** = ``3`` -- **PARAM_ANGULAR_FORCE_LIMIT** = **15** --- The maximum amount of force that can occur, when rotating around the axes. +The amount of restitution on the axes' movement. The lower, the more momentum gets lost. -- **PARAM_ANGULAR_ERP** = **16** --- When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_DAMPING: -- **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **17** --- Target speed for the motor at the axes. +.. rst-class:: classref-enumeration-constant -- **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **18** --- Maximum acceleration for the motor at the axes. +:ref:`Param` **PARAM_LINEAR_DAMPING** = ``4`` -- **PARAM_ANGULAR_SPRING_STIFFNESS** = **19** +The amount of damping that happens at the linear motion across the axes. -- **PARAM_ANGULAR_SPRING_DAMPING** = **20** +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_MOTOR_TARGET_VELOCITY: -- **PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT** = **21** +.. rst-class:: classref-enumeration-constant -- **PARAM_MAX** = **22** --- Represents the size of the :ref:`Param` enum. +:ref:`Param` **PARAM_LINEAR_MOTOR_TARGET_VELOCITY** = ``5`` + +The velocity the linear motor will try to reach. + +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_MOTOR_FORCE_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_MOTOR_FORCE_LIMIT** = ``6`` + +The maximum force the linear motor will apply while trying to reach the velocity target. + +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_STIFFNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_SPRING_STIFFNESS** = ``7`` + + + +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_SPRING_DAMPING** = ``8`` + + + +.. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT** = ``9`` + + + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_LOWER_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_LOWER_LIMIT** = ``10`` + +The minimum rotation in negative direction to break loose and rotate around the axes. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_UPPER_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_UPPER_LIMIT** = ``11`` + +The minimum rotation in positive direction to break loose and rotate around the axes. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_LIMIT_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_LIMIT_SOFTNESS** = ``12`` + +The speed of all rotations across the axes. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_DAMPING** = ``13`` + +The amount of rotational damping across the axes. The lower, the more dampening occurs. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_RESTITUTION** = ``14`` + +The amount of rotational restitution across the axes. The lower, the more restitution occurs. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_FORCE_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_FORCE_LIMIT** = ``15`` + +The maximum amount of force that can occur, when rotating around the axes. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_ERP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_ERP** = ``16`` + +When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_MOTOR_TARGET_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = ``17`` + +Target speed for the motor at the axes. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_MOTOR_FORCE_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = ``18`` + +Maximum acceleration for the motor at the axes. + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_STIFFNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_SPRING_STIFFNESS** = ``19`` + + + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_SPRING_DAMPING** = ``20`` + + + +.. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT** = ``21`` + + + +.. _class_Generic6DOFJoint3D_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_MAX** = ``22`` + +Represents the size of the :ref:`Param` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Generic6DOFJoint3D_Flag: -.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_LINEAR_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_ANGULAR_LIMIT: - -.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_LINEAR_SPRING: - -.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_ANGULAR_SPRING: - -.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_MOTOR: - -.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_LINEAR_MOTOR: - -.. _class_Generic6DOFJoint3D_constant_FLAG_MAX: +.. rst-class:: classref-enumeration enum **Flag**: -- **FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If enabled, linear motion is possible within the given limits. +.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_LINEAR_LIMIT: -- **FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If enabled, rotational motion is possible within the given limits. +.. rst-class:: classref-enumeration-constant -- **FLAG_ENABLE_LINEAR_SPRING** = **3** +:ref:`Flag` **FLAG_ENABLE_LINEAR_LIMIT** = ``0`` -- **FLAG_ENABLE_ANGULAR_SPRING** = **2** +If enabled, linear motion is possible within the given limits. -- **FLAG_ENABLE_MOTOR** = **4** --- If enabled, there is a rotational motor across these axes. +.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_ANGULAR_LIMIT: -- **FLAG_ENABLE_LINEAR_MOTOR** = **5** --- If enabled, there is a linear motor across these axes. +.. rst-class:: classref-enumeration-constant -- **FLAG_MAX** = **6** --- Represents the size of the :ref:`Flag` enum. +:ref:`Flag` **FLAG_ENABLE_ANGULAR_LIMIT** = ``1`` + +If enabled, rotational motion is possible within the given limits. + +.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_LINEAR_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flag` **FLAG_ENABLE_LINEAR_SPRING** = ``3`` + + + +.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_ANGULAR_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flag` **FLAG_ENABLE_ANGULAR_SPRING** = ``2`` + + + +.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_MOTOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flag` **FLAG_ENABLE_MOTOR** = ``4`` + +If enabled, there is a rotational motor across these axes. + +.. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_LINEAR_MOTOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flag` **FLAG_ENABLE_LINEAR_MOTOR** = ``5`` + +If enabled, there is a linear motor across these axes. + +.. _class_Generic6DOFJoint3D_constant_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flag` **FLAG_MAX** = ``6`` + +Represents the size of the :ref:`Flag` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Generic6DOFJoint3D_property_angular_limit_x/damping: -- :ref:`float` **angular_limit_x/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_limit_x/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The amount of rotational damping across the X axis. The lower, the longer an impulse from one side takes to travel to the other side. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_x/enabled: -- :ref:`bool` **angular_limit_x/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_flag_x(value) | -+-----------+-------------------+ -| *Getter* | get_flag_x() | -+-----------+-------------------+ +:ref:`bool` **angular_limit_x/enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_x** **(** :ref:`Flag` flag **)** |const| If ``true``, rotation across the X axis is limited. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_x/erp: -- :ref:`float` **angular_limit_x/erp** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_limit_x/erp** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_x/force_limit: -- :ref:`float` **angular_limit_x/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_limit_x/force_limit** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The maximum amount of force that can occur, when rotating around the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_x/lower_angle: -- :ref:`float` **angular_limit_x/lower_angle** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_limit_x/lower_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The minimum rotation in negative direction to break loose and rotate around the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_x/restitution: -- :ref:`float` **angular_limit_x/restitution** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_limit_x/restitution** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The amount of rotational restitution across the X axis. The lower, the more restitution occurs. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_x/softness: -- :ref:`float` **angular_limit_x/softness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_limit_x/softness** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The speed of all rotations across the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_x/upper_angle: -- :ref:`float` **angular_limit_x/upper_angle** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_limit_x/upper_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The minimum rotation in positive direction to break loose and rotate around the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/damping: -- :ref:`float` **angular_limit_y/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_limit_y/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The amount of rotational damping across the Y axis. The lower, the more dampening occurs. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/enabled: -- :ref:`bool` **angular_limit_y/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_flag_y(value) | -+-----------+-------------------+ -| *Getter* | get_flag_y() | -+-----------+-------------------+ +:ref:`bool` **angular_limit_y/enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_y** **(** :ref:`Flag` flag **)** |const| If ``true``, rotation across the Y axis is limited. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/erp: -- :ref:`float` **angular_limit_y/erp** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_limit_y/erp** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/force_limit: -- :ref:`float` **angular_limit_y/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_limit_y/force_limit** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The maximum amount of force that can occur, when rotating around the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/lower_angle: -- :ref:`float` **angular_limit_y/lower_angle** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_limit_y/lower_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The minimum rotation in negative direction to break loose and rotate around the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/restitution: -- :ref:`float` **angular_limit_y/restitution** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_limit_y/restitution** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/softness: -- :ref:`float` **angular_limit_y/softness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_limit_y/softness** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The speed of all rotations across the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_y/upper_angle: -- :ref:`float` **angular_limit_y/upper_angle** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_limit_y/upper_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The minimum rotation in positive direction to break loose and rotate around the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/damping: -- :ref:`float` **angular_limit_z/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_limit_z/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The amount of rotational damping across the Z axis. The lower, the more dampening occurs. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/enabled: -- :ref:`bool` **angular_limit_z/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_flag_z(value) | -+-----------+-------------------+ -| *Getter* | get_flag_z() | -+-----------+-------------------+ +:ref:`bool` **angular_limit_z/enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_z** **(** :ref:`Flag` flag **)** |const| If ``true``, rotation across the Z axis is limited. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/erp: -- :ref:`float` **angular_limit_z/erp** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_limit_z/erp** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/force_limit: -- :ref:`float` **angular_limit_z/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_limit_z/force_limit** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The maximum amount of force that can occur, when rotating around the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/lower_angle: -- :ref:`float` **angular_limit_z/lower_angle** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_limit_z/lower_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The minimum rotation in negative direction to break loose and rotate around the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/restitution: -- :ref:`float` **angular_limit_z/restitution** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_limit_z/restitution** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/softness: -- :ref:`float` **angular_limit_z/softness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_limit_z/softness** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The speed of all rotations across the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_limit_z/upper_angle: -- :ref:`float` **angular_limit_z/upper_angle** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_limit_z/upper_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The minimum rotation in positive direction to break loose and rotate around the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_x/enabled: -- :ref:`bool` **angular_motor_x/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_x(value) | -+-----------+-------------------+ -| *Getter* | get_flag_x() | -+-----------+-------------------+ +:ref:`bool` **angular_motor_x/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_x** **(** :ref:`Flag` flag **)** |const| If ``true``, a rotating motor at the X axis is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_x/force_limit: -- :ref:`float` **angular_motor_x/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``300.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_motor_x/force_limit** = ``300.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| Maximum acceleration for the motor at the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_x/target_velocity: -- :ref:`float` **angular_motor_x/target_velocity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_motor_x/target_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| Target speed for the motor at the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_y/enabled: -- :ref:`bool` **angular_motor_y/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_y(value) | -+-----------+-------------------+ -| *Getter* | get_flag_y() | -+-----------+-------------------+ +:ref:`bool` **angular_motor_y/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_y** **(** :ref:`Flag` flag **)** |const| If ``true``, a rotating motor at the Y axis is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_y/force_limit: -- :ref:`float` **angular_motor_y/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``300.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_motor_y/force_limit** = ``300.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| Maximum acceleration for the motor at the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_y/target_velocity: -- :ref:`float` **angular_motor_y/target_velocity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_motor_y/target_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| Target speed for the motor at the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_z/enabled: -- :ref:`bool` **angular_motor_z/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_z(value) | -+-----------+-------------------+ -| *Getter* | get_flag_z() | -+-----------+-------------------+ +:ref:`bool` **angular_motor_z/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_z** **(** :ref:`Flag` flag **)** |const| If ``true``, a rotating motor at the Z axis is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_z/force_limit: -- :ref:`float` **angular_motor_z/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``300.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_motor_z/force_limit** = ``300.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| Maximum acceleration for the motor at the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_motor_z/target_velocity: -- :ref:`float` **angular_motor_z/target_velocity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_motor_z/target_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| Target speed for the motor at the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_x/damping: -- :ref:`float` **angular_spring_x/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_spring_x/damping** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_x/enabled: -- :ref:`bool` **angular_spring_x/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_x(value) | -+-----------+-------------------+ -| *Getter* | get_flag_x() | -+-----------+-------------------+ +:ref:`bool` **angular_spring_x/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_x** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_x/equilibrium_point: -- :ref:`float` **angular_spring_x/equilibrium_point** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_spring_x/equilibrium_point** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_x/stiffness: -- :ref:`float` **angular_spring_x/stiffness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **angular_spring_x/stiffness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_y/damping: -- :ref:`float` **angular_spring_y/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_spring_y/damping** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_y/enabled: -- :ref:`bool` **angular_spring_y/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_y(value) | -+-----------+-------------------+ -| *Getter* | get_flag_y() | -+-----------+-------------------+ +:ref:`bool` **angular_spring_y/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_y** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_y/equilibrium_point: -- :ref:`float` **angular_spring_y/equilibrium_point** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_spring_y/equilibrium_point** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_y/stiffness: -- :ref:`float` **angular_spring_y/stiffness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **angular_spring_y/stiffness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_z/damping: -- :ref:`float` **angular_spring_z/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_spring_z/damping** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_z/enabled: -- :ref:`bool` **angular_spring_z/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_z(value) | -+-----------+-------------------+ -| *Getter* | get_flag_z() | -+-----------+-------------------+ +:ref:`bool` **angular_spring_z/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_z** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_z/equilibrium_point: -- :ref:`float` **angular_spring_z/equilibrium_point** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_spring_z/equilibrium_point** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_angular_spring_z/stiffness: -- :ref:`float` **angular_spring_z/stiffness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **angular_spring_z/stiffness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_x/damping: -- :ref:`float` **linear_limit_x/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_limit_x/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The amount of damping that happens at the X motion. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_x/enabled: -- :ref:`bool` **linear_limit_x/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_flag_x(value) | -+-----------+-------------------+ -| *Getter* | get_flag_x() | -+-----------+-------------------+ +:ref:`bool` **linear_limit_x/enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_x** **(** :ref:`Flag` flag **)** |const| If ``true``, the linear motion across the X axis is limited. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_x/lower_distance: -- :ref:`float` **linear_limit_x/lower_distance** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_limit_x/lower_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The minimum difference between the pivot points' X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_x/restitution: -- :ref:`float` **linear_limit_x/restitution** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_limit_x/restitution** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The amount of restitution on the X axis movement. The lower, the more momentum gets lost. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_x/softness: -- :ref:`float` **linear_limit_x/softness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.7`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_limit_x/softness** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| A factor applied to the movement across the X axis. The lower, the slower the movement. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_x/upper_distance: -- :ref:`float` **linear_limit_x/upper_distance** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_limit_x/upper_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The maximum difference between the pivot points' X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_y/damping: -- :ref:`float` **linear_limit_y/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_limit_y/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The amount of damping that happens at the Y motion. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_y/enabled: -- :ref:`bool` **linear_limit_y/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_flag_y(value) | -+-----------+-------------------+ -| *Getter* | get_flag_y() | -+-----------+-------------------+ +:ref:`bool` **linear_limit_y/enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_y** **(** :ref:`Flag` flag **)** |const| If ``true``, the linear motion across the Y axis is limited. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_y/lower_distance: -- :ref:`float` **linear_limit_y/lower_distance** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_limit_y/lower_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The minimum difference between the pivot points' Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_y/restitution: -- :ref:`float` **linear_limit_y/restitution** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_limit_y/restitution** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_y/softness: -- :ref:`float` **linear_limit_y/softness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.7`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_limit_y/softness** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| A factor applied to the movement across the Y axis. The lower, the slower the movement. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_y/upper_distance: -- :ref:`float` **linear_limit_y/upper_distance** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_limit_y/upper_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The maximum difference between the pivot points' Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_z/damping: -- :ref:`float` **linear_limit_z/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_limit_z/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The amount of damping that happens at the Z motion. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_z/enabled: -- :ref:`bool` **linear_limit_z/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_flag_z(value) | -+-----------+-------------------+ -| *Getter* | get_flag_z() | -+-----------+-------------------+ +:ref:`bool` **linear_limit_z/enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_z** **(** :ref:`Flag` flag **)** |const| If ``true``, the linear motion across the Z axis is limited. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_z/lower_distance: -- :ref:`float` **linear_limit_z/lower_distance** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_limit_z/lower_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The minimum difference between the pivot points' Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_z/restitution: -- :ref:`float` **linear_limit_z/restitution** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_limit_z/restitution** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_z/softness: -- :ref:`float` **linear_limit_z/softness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.7`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_limit_z/softness** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| A factor applied to the movement across the Z axis. The lower, the slower the movement. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_limit_z/upper_distance: -- :ref:`float` **linear_limit_z/upper_distance** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_limit_z/upper_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The maximum difference between the pivot points' Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_x/enabled: -- :ref:`bool` **linear_motor_x/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_x(value) | -+-----------+-------------------+ -| *Getter* | get_flag_x() | -+-----------+-------------------+ +:ref:`bool` **linear_motor_x/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_x** **(** :ref:`Flag` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_x/force_limit: -- :ref:`float` **linear_motor_x/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_motor_x/force_limit** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The maximum force the linear motor can apply on the X axis while trying to reach the target velocity. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_x/target_velocity: -- :ref:`float` **linear_motor_x/target_velocity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_motor_x/target_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| The speed that the linear motor will attempt to reach on the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_y/enabled: -- :ref:`bool` **linear_motor_y/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_y(value) | -+-----------+-------------------+ -| *Getter* | get_flag_y() | -+-----------+-------------------+ +:ref:`bool` **linear_motor_y/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_y** **(** :ref:`Flag` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_y/force_limit: -- :ref:`float` **linear_motor_y/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_motor_y/force_limit** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_y/target_velocity: -- :ref:`float` **linear_motor_y/target_velocity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_motor_y/target_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| The speed that the linear motor will attempt to reach on the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_z/enabled: -- :ref:`bool` **linear_motor_z/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_z(value) | -+-----------+-------------------+ -| *Getter* | get_flag_z() | -+-----------+-------------------+ +:ref:`bool` **linear_motor_z/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_z** **(** :ref:`Flag` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_z/force_limit: -- :ref:`float` **linear_motor_z/force_limit** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_motor_z/force_limit** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_motor_z/target_velocity: -- :ref:`float` **linear_motor_z/target_velocity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_motor_z/target_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| The speed that the linear motor will attempt to reach on the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_x/damping: -- :ref:`float` **linear_spring_x/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_spring_x/damping** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_x/enabled: -- :ref:`bool` **linear_spring_x/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_x(value) | -+-----------+-------------------+ -| *Getter* | get_flag_x() | -+-----------+-------------------+ +:ref:`bool` **linear_spring_x/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_x** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_x/equilibrium_point: -- :ref:`float` **linear_spring_x/equilibrium_point** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_spring_x/equilibrium_point** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_x/stiffness: -- :ref:`float` **linear_spring_x/stiffness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------+ -| *Setter* | set_param_x(value) | -+-----------+--------------------+ -| *Getter* | get_param_x() | -+-----------+--------------------+ +:ref:`float` **linear_spring_x/stiffness** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_y/damping: -- :ref:`float` **linear_spring_y/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_spring_y/damping** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_y/enabled: -- :ref:`bool` **linear_spring_y/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_y(value) | -+-----------+-------------------+ -| *Getter* | get_flag_y() | -+-----------+-------------------+ +:ref:`bool` **linear_spring_y/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_y** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_y/equilibrium_point: -- :ref:`float` **linear_spring_y/equilibrium_point** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_spring_y/equilibrium_point** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_y/stiffness: -- :ref:`float` **linear_spring_y/stiffness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------+ -| *Setter* | set_param_y(value) | -+-----------+--------------------+ -| *Getter* | get_param_y() | -+-----------+--------------------+ +:ref:`float` **linear_spring_y/stiffness** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_z/damping: -- :ref:`float` **linear_spring_z/damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_spring_z/damping** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_z/enabled: -- :ref:`bool` **linear_spring_z/enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flag_z(value) | -+-----------+-------------------+ -| *Getter* | get_flag_z() | -+-----------+-------------------+ +:ref:`bool` **linear_spring_z/enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** +- :ref:`bool` **get_flag_z** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_z/equilibrium_point: -- :ref:`float` **linear_spring_z/equilibrium_point** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_spring_z/equilibrium_point** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_property_linear_spring_z/stiffness: -- :ref:`float` **linear_spring_z/stiffness** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------+ -| *Setter* | set_param_z(value) | -+-----------+--------------------+ -| *Getter* | get_param_z() | -+-----------+--------------------+ +:ref:`float` **linear_spring_z/stiffness** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| .. 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 ------------------- .. _class_Generic6DOFJoint3D_method_get_flag_x: -- :ref:`bool` **get_flag_x** **(** :ref:`Flag` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_flag_x** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_get_flag_y: -- :ref:`bool` **get_flag_y** **(** :ref:`Flag` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_flag_y** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_get_flag_z: -- :ref:`bool` **get_flag_z** **(** :ref:`Flag` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_flag_z** **(** :ref:`Flag` flag **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_get_param_x: -- :ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_x** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_get_param_y: -- :ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_y** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_get_param_z: -- :ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_z** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_set_flag_x: -- void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_flag_x** **(** :ref:`Flag` flag, :ref:`bool` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_set_flag_y: -- void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_flag_y** **(** :ref:`Flag` flag, :ref:`bool` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_set_flag_z: -- void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_flag_z** **(** :ref:`Flag` flag, :ref:`bool` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_set_param_x: -- void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_x** **(** :ref:`Param` param, :ref:`float` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_set_param_y: -- void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_y** **(** :ref:`Param` param, :ref:`float` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Generic6DOFJoint3D_method_set_param_z: -- void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_z** **(** :ref:`Param` param, :ref:`float` value **)** .. container:: contribute diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index 740b3a729..aec1d898d 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -14,273 +14,416 @@ Geometry2D Helper node to calculate generic geometry operations in 2D space. +.. rst-class:: classref-introduction-group + Description ----------- Geometry2D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`clip_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`clip_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`convex_hull` **(** :ref:`PackedVector2Array` points **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`decompose_polygon_in_convex` **(** :ref:`PackedVector2Array` polygon **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`exclude_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_closest_point_to_segment_uncapped` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`intersect_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`intersect_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_in_circle` **(** :ref:`Vector2` point, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_in_polygon` **(** :ref:`Vector2` point, :ref:`PackedVector2Array` polygon **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_polygon_clockwise` **(** :ref:`PackedVector2Array` polygon **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`line_intersects_line` **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`make_atlas` **(** :ref:`PackedVector2Array` sizes **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`merge_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`offset_polygon` **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`offset_polyline` **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`point_is_inside_triangle` **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** |const| | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`segment_intersects_circle` **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`segment_intersects_segment` **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`triangulate_delaunay` **(** :ref:`PackedVector2Array` points **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`triangulate_polygon` **(** :ref:`PackedVector2Array` polygon **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`clip_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`clip_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`convex_hull` **(** :ref:`PackedVector2Array` points **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`decompose_polygon_in_convex` **(** :ref:`PackedVector2Array` polygon **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`exclude_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_closest_point_to_segment_uncapped` **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`intersect_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`intersect_polyline_with_polygon` **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_in_circle` **(** :ref:`Vector2` point, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_in_polygon` **(** :ref:`Vector2` point, :ref:`PackedVector2Array` polygon **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_polygon_clockwise` **(** :ref:`PackedVector2Array` polygon **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`line_intersects_line` **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`make_atlas` **(** :ref:`PackedVector2Array` sizes **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`merge_polygons` **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`offset_polygon` **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`offset_polyline` **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`point_is_inside_triangle` **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`segment_intersects_circle` **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`segment_intersects_segment` **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`triangulate_delaunay` **(** :ref:`PackedVector2Array` points **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`triangulate_polygon` **(** :ref:`PackedVector2Array` polygon **)** | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Geometry2D_PolyBooleanOperation: -.. _class_Geometry2D_constant_OPERATION_UNION: - -.. _class_Geometry2D_constant_OPERATION_DIFFERENCE: - -.. _class_Geometry2D_constant_OPERATION_INTERSECTION: - -.. _class_Geometry2D_constant_OPERATION_XOR: +.. rst-class:: classref-enumeration enum **PolyBooleanOperation**: -- **OPERATION_UNION** = **0** --- Create regions where either subject or clip polygons (or both) are filled. +.. _class_Geometry2D_constant_OPERATION_UNION: -- **OPERATION_DIFFERENCE** = **1** --- Create regions where subject polygons are filled except where clip polygons are filled. +.. rst-class:: classref-enumeration-constant -- **OPERATION_INTERSECTION** = **2** --- Create regions where both subject and clip polygons are filled. +:ref:`PolyBooleanOperation` **OPERATION_UNION** = ``0`` -- **OPERATION_XOR** = **3** --- Create regions where either subject or clip polygons are filled but not where both are filled. +Create regions where either subject or clip polygons (or both) are filled. + +.. _class_Geometry2D_constant_OPERATION_DIFFERENCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyBooleanOperation` **OPERATION_DIFFERENCE** = ``1`` + +Create regions where subject polygons are filled except where clip polygons are filled. + +.. _class_Geometry2D_constant_OPERATION_INTERSECTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyBooleanOperation` **OPERATION_INTERSECTION** = ``2`` + +Create regions where both subject and clip polygons are filled. + +.. _class_Geometry2D_constant_OPERATION_XOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyBooleanOperation` **OPERATION_XOR** = ``3`` + +Create regions where either subject or clip polygons are filled but not where both are filled. + +.. rst-class:: classref-item-separator ---- .. _enum_Geometry2D_PolyJoinType: -.. _class_Geometry2D_constant_JOIN_SQUARE: - -.. _class_Geometry2D_constant_JOIN_ROUND: - -.. _class_Geometry2D_constant_JOIN_MITER: +.. rst-class:: classref-enumeration enum **PolyJoinType**: -- **JOIN_SQUARE** = **0** --- Squaring is applied uniformally at all convex edge joins at ``1 * delta``. +.. _class_Geometry2D_constant_JOIN_SQUARE: -- **JOIN_ROUND** = **1** --- While flattened paths can never perfectly trace an arc, they are approximated by a series of arc chords. +.. rst-class:: classref-enumeration-constant -- **JOIN_MITER** = **2** --- There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow "spikes". For any given edge join, when miter offsetting would exceed that maximum distance, "square" joining is applied. +:ref:`PolyJoinType` **JOIN_SQUARE** = ``0`` + +Squaring is applied uniformally at all convex edge joins at ``1 * delta``. + +.. _class_Geometry2D_constant_JOIN_ROUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyJoinType` **JOIN_ROUND** = ``1`` + +While flattened paths can never perfectly trace an arc, they are approximated by a series of arc chords. + +.. _class_Geometry2D_constant_JOIN_MITER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyJoinType` **JOIN_MITER** = ``2`` + +There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow "spikes". For any given edge join, when miter offsetting would exceed that maximum distance, "square" joining is applied. + +.. rst-class:: classref-item-separator ---- .. _enum_Geometry2D_PolyEndType: -.. _class_Geometry2D_constant_END_POLYGON: - -.. _class_Geometry2D_constant_END_JOINED: - -.. _class_Geometry2D_constant_END_BUTT: - -.. _class_Geometry2D_constant_END_SQUARE: - -.. _class_Geometry2D_constant_END_ROUND: +.. rst-class:: classref-enumeration enum **PolyEndType**: -- **END_POLYGON** = **0** --- Endpoints are joined using the :ref:`PolyJoinType` value and the path filled as a polygon. +.. _class_Geometry2D_constant_END_POLYGON: -- **END_JOINED** = **1** --- Endpoints are joined using the :ref:`PolyJoinType` value and the path filled as a polyline. +.. rst-class:: classref-enumeration-constant -- **END_BUTT** = **2** --- Endpoints are squared off with no extension. +:ref:`PolyEndType` **END_POLYGON** = ``0`` -- **END_SQUARE** = **3** --- Endpoints are squared off and extended by ``delta`` units. +Endpoints are joined using the :ref:`PolyJoinType` value and the path filled as a polygon. -- **END_ROUND** = **4** --- Endpoints are rounded off and extended by ``delta`` units. +.. _class_Geometry2D_constant_END_JOINED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyEndType` **END_JOINED** = ``1`` + +Endpoints are joined using the :ref:`PolyJoinType` value and the path filled as a polyline. + +.. _class_Geometry2D_constant_END_BUTT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyEndType` **END_BUTT** = ``2`` + +Endpoints are squared off with no extension. + +.. _class_Geometry2D_constant_END_SQUARE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyEndType` **END_SQUARE** = ``3`` + +Endpoints are squared off and extended by ``delta`` units. + +.. _class_Geometry2D_constant_END_ROUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolyEndType` **END_ROUND** = ``4`` + +Endpoints are rounded off and extended by ``delta`` units. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Geometry2D_method_clip_polygons: -- :ref:`PackedVector2Array[]` **clip_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **clip_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Clips ``polygon_a`` against ``polygon_b`` and returns an array of clipped polygons. This performs :ref:`OPERATION_DIFFERENCE` between polygons. Returns an empty array if ``polygon_b`` completely overlaps ``polygon_a``. If ``polygon_b`` is enclosed by ``polygon_a``, returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling :ref:`is_polygon_clockwise`. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_clip_polyline_with_polygon: -- :ref:`PackedVector2Array[]` **clip_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **clip_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** Clips ``polyline`` against ``polygon`` and returns an array of clipped polylines. This performs :ref:`OPERATION_DIFFERENCE` between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_convex_hull: -- :ref:`PackedVector2Array` **convex_hull** **(** :ref:`PackedVector2Array` points **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **convex_hull** **(** :ref:`PackedVector2Array` points **)** Given an array of :ref:`Vector2`\ s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_decompose_polygon_in_convex: -- :ref:`PackedVector2Array[]` **decompose_polygon_in_convex** **(** :ref:`PackedVector2Array` polygon **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **decompose_polygon_in_convex** **(** :ref:`PackedVector2Array` polygon **)** Decomposes the ``polygon`` into multiple convex hulls and returns an array of :ref:`PackedVector2Array`. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_exclude_polygons: -- :ref:`PackedVector2Array[]` **exclude_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **exclude_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Mutually excludes common area defined by intersection of ``polygon_a`` and ``polygon_b`` (see :ref:`intersect_polygons`) and returns an array of excluded polygons. This performs :ref:`OPERATION_XOR` between polygons. In other words, returns all but common area between polygons. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_get_closest_point_to_segment: -- :ref:`Vector2` **get_closest_point_to_segment** **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_closest_point_to_segment** **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_get_closest_point_to_segment_uncapped: -- :ref:`Vector2` **get_closest_point_to_segment_uncapped** **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_closest_point_to_segment_uncapped** **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_get_closest_points_between_segments: -- :ref:`PackedVector2Array` **get_closest_points_between_segments** **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_closest_points_between_segments** **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** 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` that contains this point on (``p1``, ``q1``) as well the accompanying point on (``p2``, ``q2``). +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_intersect_polygons: -- :ref:`PackedVector2Array[]` **intersect_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **intersect_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Intersects ``polygon_a`` with ``polygon_b`` and returns an array of intersected polygons. This performs :ref:`OPERATION_INTERSECTION` between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_intersect_polyline_with_polygon: -- :ref:`PackedVector2Array[]` **intersect_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **intersect_polyline_with_polygon** **(** :ref:`PackedVector2Array` polyline, :ref:`PackedVector2Array` polygon **)** Intersects ``polyline`` with ``polygon`` and returns an array of intersected polylines. This performs :ref:`OPERATION_INTERSECTION` between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_is_point_in_circle: -- :ref:`bool` **is_point_in_circle** **(** :ref:`Vector2` point, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** +.. rst-class:: classref-method + +:ref:`bool` **is_point_in_circle** **(** :ref:`Vector2` point, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** Returns ``true`` if ``point`` is inside the circle or if it's located exactly *on* the circle's boundary, otherwise returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_is_point_in_polygon: -- :ref:`bool` **is_point_in_polygon** **(** :ref:`Vector2` point, :ref:`PackedVector2Array` polygon **)** +.. rst-class:: classref-method + +:ref:`bool` **is_point_in_polygon** **(** :ref:`Vector2` point, :ref:`PackedVector2Array` polygon **)** Returns ``true`` if ``point`` is inside ``polygon`` or if it's located exactly *on* polygon's boundary, otherwise returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_is_polygon_clockwise: -- :ref:`bool` **is_polygon_clockwise** **(** :ref:`PackedVector2Array` polygon **)** +.. rst-class:: classref-method + +:ref:`bool` **is_polygon_clockwise** **(** :ref:`PackedVector2Array` polygon **)** Returns ``true`` if ``polygon``'s vertices are ordered in clockwise order, otherwise returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_line_intersects_line: -- :ref:`Variant` **line_intersects_line** **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** +.. rst-class:: classref-method + +:ref:`Variant` **line_intersects_line** **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** 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`. If no intersection takes place, returns ``null``. \ **Note:** The lines are specified using direction vectors, not end points. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_make_atlas: -- :ref:`Dictionary` **make_atlas** **(** :ref:`PackedVector2Array` sizes **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **make_atlas** **(** :ref:`PackedVector2Array` sizes **)** Given an array of :ref:`Vector2`\ s representing tiles, builds an atlas. The returned dictionary has two keys: ``points`` is a :ref:`PackedVector2Array` that specifies the positions of each tile, ``size`` contains the overall size of the whole atlas as :ref:`Vector2i`. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_merge_polygons: -- :ref:`PackedVector2Array[]` **merge_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **merge_polygons** **(** :ref:`PackedVector2Array` polygon_a, :ref:`PackedVector2Array` polygon_b **)** Merges (combines) ``polygon_a`` and ``polygon_b`` and returns an array of merged polygons. This performs :ref:`OPERATION_UNION` between polygons. The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_offset_polygon: -- :ref:`PackedVector2Array[]` **offset_polygon** **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **offset_polygon** **(** :ref:`PackedVector2Array` polygon, :ref:`float` delta, :ref:`PolyJoinType` join_type=0 **)** 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. @@ -310,11 +453,15 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_offset_polyline: -- :ref:`PackedVector2Array[]` **offset_polyline** **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **offset_polyline** **(** :ref:`PackedVector2Array` polyline, :ref:`float` delta, :ref:`PolyJoinType` join_type=0, :ref:`PolyEndType` end_type=3 **)** 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. @@ -324,43 +471,63 @@ Each polygon's endpoints will be rounded as determined by ``end_type``, see :ref The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling :ref:`is_polygon_clockwise`. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_point_is_inside_triangle: -- :ref:`bool` **point_is_inside_triangle** **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **point_is_inside_triangle** **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** |const| Returns if ``point`` is inside the triangle specified by ``a``, ``b`` and ``c``. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_segment_intersects_circle: -- :ref:`float` **segment_intersects_circle** **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** +.. rst-class:: classref-method + +:ref:`float` **segment_intersects_circle** **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_segment_intersects_segment: -- :ref:`Variant` **segment_intersects_segment** **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** +.. rst-class:: classref-method + +:ref:`Variant` **segment_intersects_segment** **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** 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`. If no intersection takes place, returns ``null``. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_triangulate_delaunay: -- :ref:`PackedInt32Array` **triangulate_delaunay** **(** :ref:`PackedVector2Array` points **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **triangulate_delaunay** **(** :ref:`PackedVector2Array` points **)** 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` 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` is returned. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry2D_method_triangulate_polygon: -- :ref:`PackedInt32Array` **triangulate_polygon** **(** :ref:`PackedVector2Array` polygon **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **triangulate_polygon** **(** :ref:`PackedVector2Array` polygon **)** Triangulates the polygon specified by the points in ``polygon``. Returns a :ref:`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` is returned. diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index 22c08c866..3208ed56d 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -14,134 +14,193 @@ Geometry3D Helper node to calculate generic geometry operations in 3D space. +.. rst-class:: classref-introduction-group + Description ----------- Geometry3D provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane[]` | :ref:`build_box_planes` **(** :ref:`Vector3` extents **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane[]` | :ref:`build_capsule_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane[]` | :ref:`build_cylinder_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`clip_polygon` **(** :ref:`PackedVector3Array` points, :ref:`Plane` plane **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_closest_point_to_segment_uncapped` **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`ray_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`segment_intersects_convex` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`segment_intersects_cylinder` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`segment_intersects_sphere` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` sphere_position, :ref:`float` sphere_radius **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`segment_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane[]` | :ref:`build_box_planes` **(** :ref:`Vector3` extents **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane[]` | :ref:`build_capsule_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane[]` | :ref:`build_cylinder_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`clip_polygon` **(** :ref:`PackedVector3Array` points, :ref:`Plane` plane **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_closest_point_to_segment_uncapped` **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`ray_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`segment_intersects_convex` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`segment_intersects_cylinder` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`segment_intersects_sphere` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` sphere_position, :ref:`float` sphere_radius **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`segment_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Geometry3D_method_build_box_planes: -- :ref:`Plane[]` **build_box_planes** **(** :ref:`Vector3` extents **)** +.. rst-class:: classref-method + +:ref:`Plane[]` **build_box_planes** **(** :ref:`Vector3` extents **)** Returns an array with 6 :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_build_capsule_planes: -- :ref:`Plane[]` **build_capsule_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** +.. rst-class:: classref-method + +:ref:`Plane[]` **build_capsule_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, Vector3.Axis axis=2 **)** Returns an array of :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_build_cylinder_planes: -- :ref:`Plane[]` **build_cylinder_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** +.. rst-class:: classref-method + +:ref:`Plane[]` **build_cylinder_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, Vector3.Axis axis=2 **)** Returns an array of :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_clip_polygon: -- :ref:`PackedVector3Array` **clip_polygon** **(** :ref:`PackedVector3Array` points, :ref:`Plane` plane **)** +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **clip_polygon** **(** :ref:`PackedVector3Array` points, :ref:`Plane` plane **)** Clips the polygon defined by the points in ``points`` against the ``plane`` and returns the points of the clipped polygon. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_get_closest_point_to_segment: -- :ref:`Vector3` **get_closest_point_to_segment** **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** +.. rst-class:: classref-method + +:ref:`Vector3` **get_closest_point_to_segment** **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_get_closest_point_to_segment_uncapped: -- :ref:`Vector3` **get_closest_point_to_segment_uncapped** **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** +.. rst-class:: classref-method + +:ref:`Vector3` **get_closest_point_to_segment_uncapped** **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_get_closest_points_between_segments: -- :ref:`PackedVector3Array` **get_closest_points_between_segments** **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_closest_points_between_segments** **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** 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` that contains this point on (``p1``, ``p2``) as well the accompanying point on (``q1``, ``q2``). +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_ray_intersects_triangle: -- :ref:`Variant` **ray_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** +.. rst-class:: classref-method + +:ref:`Variant` **ray_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** 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`. If no intersection takes place, returns ``null``. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_segment_intersects_convex: -- :ref:`PackedVector3Array` **segment_intersects_convex** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **segment_intersects_convex** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** Given a convex hull defined though the :ref:`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` containing the point the intersection and the hull's normal. Otherwise, returns an empty array. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_segment_intersects_cylinder: -- :ref:`PackedVector3Array` **segment_intersects_cylinder** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **segment_intersects_cylinder** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** 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`. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_segment_intersects_sphere: -- :ref:`PackedVector3Array` **segment_intersects_sphere** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` sphere_position, :ref:`float` sphere_radius **)** +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **segment_intersects_sphere** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` sphere_position, :ref:`float` sphere_radius **)** 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`. If yes, returns a :ref:`PackedVector3Array` containing the point of intersection and the sphere's normal at the point of intersection. +.. rst-class:: classref-item-separator + ---- .. _class_Geometry3D_method_segment_intersects_triangle: -- :ref:`Variant` **segment_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** +.. rst-class:: classref-method + +:ref:`Variant` **segment_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** Tests if the segment (``from``, ``to``) intersects the triangle ``a``, ``b``, ``c``. If yes, returns the point of intersection as :ref:`Vector3`. If no intersection takes place, returns ``null``. diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index f6cef7f1c..255f3da2e 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -16,292 +16,401 @@ GeometryInstance3D Base node for geometry-based visual instances. +.. rst-class:: classref-introduction-group + Description ----------- Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`ShadowCastingSetting` | :ref:`cast_shadow` | ``1`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`extra_cull_margin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`LightmapScale` | :ref:`gi_lightmap_scale` | ``0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`GIMode` | :ref:`gi_mode` | ``1`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`ignore_occlusion_culling` | ``false`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`lod_bias` | ``1.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Material` | :ref:`material_overlay` | | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Material` | :ref:`material_override` | | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`transparency` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_begin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_begin_margin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_end` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_end_margin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`VisibilityRangeFadeMode` | :ref:`visibility_range_fade_mode` | ``0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`ShadowCastingSetting` | :ref:`cast_shadow` | ``1`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`extra_cull_margin` | ``0.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`LightmapScale` | :ref:`gi_lightmap_scale` | ``0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`GIMode` | :ref:`gi_mode` | ``1`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`ignore_occlusion_culling` | ``false`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`lod_bias` | ``1.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Material` | :ref:`material_overlay` | | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Material` | :ref:`material_override` | | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`transparency` | ``0.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`visibility_range_begin` | ``0.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`visibility_range_begin_margin` | ``0.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`visibility_range_end` | ``0.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`visibility_range_end_margin` | ``0.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`VisibilityRangeFadeMode` | :ref:`visibility_range_fade_mode` | ``0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_instance_shader_parameter` **(** :ref:`StringName` name **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_aabb` **(** :ref:`AABB` aabb **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_shader_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_instance_shader_parameter` **(** :ref:`StringName` name **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_aabb` **(** :ref:`AABB` aabb **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_instance_shader_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GeometryInstance3D_ShadowCastingSetting: -.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_OFF: - -.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_ON: - -.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED: - -.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY: +.. rst-class:: classref-enumeration enum **ShadowCastingSetting**: -- **SHADOW_CASTING_SETTING_OFF** = **0** --- Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris). +.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_OFF: -- **SHADOW_CASTING_SETTING_ON** = **1** --- Will cast shadows from all visible faces in the GeometryInstance3D. +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_OFF** = ``0`` + +Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris). + +.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_ON: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_ON** = ``1`` + +Will cast shadows from all visible faces in the GeometryInstance3D. Will take culling into account, so faces not being rendered will not be taken into account when shadow casting. -- **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = **2** --- Will cast shadows from all visible faces in the GeometryInstance3D. +.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = ``2`` + +Will cast shadows from all visible faces in the GeometryInstance3D. Will not take culling into account, so all faces will be taken into account when shadow casting. -- **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = **3** --- Will only show the shadows casted from this object. +.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = ``3`` + +Will only show the shadows casted from this object. In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be. +.. rst-class:: classref-item-separator + ---- .. _enum_GeometryInstance3D_GIMode: -.. _class_GeometryInstance3D_constant_GI_MODE_DISABLED: - -.. _class_GeometryInstance3D_constant_GI_MODE_STATIC: - -.. _class_GeometryInstance3D_constant_GI_MODE_DYNAMIC: +.. rst-class:: classref-enumeration enum **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` and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking. When using :ref:`LightmapGI`, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. +.. _class_GeometryInstance3D_constant_GI_MODE_DISABLED: -- **GI_MODE_STATIC** = **1** --- Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using :ref:`VoxelGI`, SDFGI and :ref:`LightmapGI`. +.. rst-class:: classref-enumeration-constant -- **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`, but it has a higher performance impact than :ref:`GI_MODE_STATIC`. When using other GI methods, this will act the same as :ref:`GI_MODE_DISABLED`. +:ref:`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` and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking. When using :ref:`LightmapGI`, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. + +.. _class_GeometryInstance3D_constant_GI_MODE_STATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`GIMode` **GI_MODE_STATIC** = ``1`` + +Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using :ref:`VoxelGI`, SDFGI and :ref:`LightmapGI`. + +.. _class_GeometryInstance3D_constant_GI_MODE_DYNAMIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`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`, but it has a higher performance impact than :ref:`GI_MODE_STATIC`. When using other GI methods, this will act the same as :ref:`GI_MODE_DISABLED`. + +.. rst-class:: classref-item-separator ---- .. _enum_GeometryInstance3D_LightmapScale: -.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_1X: - -.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_2X: - -.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_4X: - -.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_8X: - -.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_MAX: +.. rst-class:: classref-enumeration enum **LightmapScale**: -- **LIGHTMAP_SCALE_1X** = **0** --- The standard texel density for lightmapping with :ref:`LightmapGI`. +.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_1X: -- **LIGHTMAP_SCALE_2X** = **1** --- Multiplies texel density by 2× for lightmapping with :ref:`LightmapGI`. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0. +.. rst-class:: classref-enumeration-constant -- **LIGHTMAP_SCALE_4X** = **2** --- Multiplies texel density by 4× for lightmapping with :ref:`LightmapGI`. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0. +:ref:`LightmapScale` **LIGHTMAP_SCALE_1X** = ``0`` -- **LIGHTMAP_SCALE_8X** = **3** --- Multiplies texel density by 8× for lightmapping with :ref:`LightmapGI`. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0. +The standard texel density for lightmapping with :ref:`LightmapGI`. -- **LIGHTMAP_SCALE_MAX** = **4** --- Represents the size of the :ref:`LightmapScale` enum. +.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_2X: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightmapScale` **LIGHTMAP_SCALE_2X** = ``1`` + +Multiplies texel density by 2× for lightmapping with :ref:`LightmapGI`. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0. + +.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_4X: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightmapScale` **LIGHTMAP_SCALE_4X** = ``2`` + +Multiplies texel density by 4× for lightmapping with :ref:`LightmapGI`. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0. + +.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_8X: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightmapScale` **LIGHTMAP_SCALE_8X** = ``3`` + +Multiplies texel density by 8× for lightmapping with :ref:`LightmapGI`. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0. + +.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightmapScale` **LIGHTMAP_SCALE_MAX** = ``4`` + +Represents the size of the :ref:`LightmapScale` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_GeometryInstance3D_VisibilityRangeFadeMode: -.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED: - -.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_SELF: - -.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES: +.. rst-class:: classref-enumeration enum **VisibilityRangeFadeMode**: -- **VISIBILITY_RANGE_FADE_DISABLED** = **0** --- Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See :ref:`visibility_range_begin` and :ref:`Node3D.visibility_parent` for more information. +.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED: -- **VISIBILITY_RANGE_FADE_SELF** = **1** --- Will fade-out itself when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin` and :ref:`visibility_range_end_margin`. +.. rst-class:: classref-enumeration-constant -- **VISIBILITY_RANGE_FADE_DEPENDENCIES** = **2** --- Will fade-in its visibility dependencies (see :ref:`Node3D.visibility_parent`) when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin` and :ref:`visibility_range_end_margin`. +:ref:`VisibilityRangeFadeMode` **VISIBILITY_RANGE_FADE_DISABLED** = ``0`` + +Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See :ref:`visibility_range_begin` and :ref:`Node3D.visibility_parent` for more information. + +.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_SELF: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityRangeFadeMode` **VISIBILITY_RANGE_FADE_SELF** = ``1`` + +Will fade-out itself when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin` and :ref:`visibility_range_end_margin`. + +.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityRangeFadeMode` **VISIBILITY_RANGE_FADE_DEPENDENCIES** = ``2`` + +Will fade-in its visibility dependencies (see :ref:`Node3D.visibility_parent`) when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin` and :ref:`visibility_range_end_margin`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GeometryInstance3D_property_cast_shadow: -- :ref:`ShadowCastingSetting` **cast_shadow** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_cast_shadows_setting(value) | -+-----------+---------------------------------+ -| *Getter* | get_cast_shadows_setting() | -+-----------+---------------------------------+ +:ref:`ShadowCastingSetting` **cast_shadow** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_cast_shadows_setting** **(** :ref:`ShadowCastingSetting` value **)** +- :ref:`ShadowCastingSetting` **get_cast_shadows_setting** **(** **)** The selected shadow casting flag. See :ref:`ShadowCastingSetting` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_extra_cull_margin: -- :ref:`float` **extra_cull_margin** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------+ -| *Setter* | set_extra_cull_margin(value) | -+-----------+------------------------------+ -| *Getter* | get_extra_cull_margin() | -+-----------+------------------------------+ +:ref:`float` **extra_cull_margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_extra_cull_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_extra_cull_margin** **(** **)** The extra distance added to the GeometryInstance3D's bounding box (:ref:`AABB`) to increase its cull box. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_gi_lightmap_scale: -- :ref:`LightmapScale` **gi_lightmap_scale** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_lightmap_scale(value) | -+-----------+---------------------------+ -| *Getter* | get_lightmap_scale() | -+-----------+---------------------------+ +:ref:`LightmapScale` **gi_lightmap_scale** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_lightmap_scale** **(** :ref:`LightmapScale` value **)** +- :ref:`LightmapScale` **get_lightmap_scale** **(** **)** The texel density to use for lightmapping in :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_gi_mode: -- :ref:`GIMode` **gi_mode** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_gi_mode(value) | -+-----------+--------------------+ -| *Getter* | get_gi_mode() | -+-----------+--------------------+ +:ref:`GIMode` **gi_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_gi_mode** **(** :ref:`GIMode` value **)** +- :ref:`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). \ **Note:** Lights' bake mode will also affect the global illumination rendering. See :ref:`Light3D.light_bake_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_ignore_occlusion_culling: -- :ref:`bool` **ignore_occlusion_culling** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------+ -| *Setter* | set_ignore_occlusion_culling(value) | -+-----------+-------------------------------------+ -| *Getter* | is_ignoring_occlusion_culling() | -+-----------+-------------------------------------+ +:ref:`bool` **ignore_occlusion_culling** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_ignore_occlusion_culling** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_lod_bias: -- :ref:`float` **lod_bias** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_lod_bias(value) | -+-----------+---------------------+ -| *Getter* | get_lod_bias() | -+-----------+---------------------+ +:ref:`float` **lod_bias** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_lod_bias** **(** :ref:`float` value **)** +- :ref:`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. Useful for testing level of detail transitions in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_material_overlay: -- :ref:`Material` **material_overlay** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_material_overlay(value) | -+----------+-----------------------------+ -| *Getter* | get_material_overlay() | -+----------+-----------------------------+ +:ref:`Material` **material_overlay** + +.. rst-class:: classref-property-setget + +- void **set_material_overlay** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material_overlay** **(** **)** The material overlay for the whole geometry. If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_material_override: -- :ref:`Material` **material_override** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_material_override(value) | -+----------+------------------------------+ -| *Getter* | get_material_override() | -+----------+------------------------------+ +:ref:`Material` **material_override** + +.. rst-class:: classref-property-setget + +- void **set_material_override** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material_override** **(** **)** The material override for the whole geometry. If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_transparency: -- :ref:`float` **transparency** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_transparency(value) | -+-----------+-------------------------+ -| *Getter* | get_transparency() | -+-----------+-------------------------+ +:ref:`float` **transparency** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_transparency** **(** :ref:`float` value **)** +- :ref:`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` to a value greater than ``0.0`` (exclusive) will *not* disable shadow rendering. @@ -309,112 +418,133 @@ In spatial shaders, ``1.0 - transparency`` is set as the default value of the `` \ **Note:** :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_visibility_range_begin: -- :ref:`float` **visibility_range_begin** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_visibility_range_begin(value) | -+-----------+-----------------------------------+ -| *Getter* | get_visibility_range_begin() | -+-----------+-----------------------------------+ +:ref:`float` **visibility_range_begin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_begin** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_begin** **(** **)** Starting distance from which the GeometryInstance3D will be visible, taking :ref:`visibility_range_begin_margin` into account as well. The default value of 0 is used to disable the range check. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_visibility_range_begin_margin: -- :ref:`float` **visibility_range_begin_margin** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_visibility_range_begin_margin(value) | -+-----------+------------------------------------------+ -| *Getter* | get_visibility_range_begin_margin() | -+-----------+------------------------------------------+ +:ref:`float` **visibility_range_begin_margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_begin_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_begin_margin** **(** **)** Margin for the :ref:`visibility_range_begin` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_begin` threshold by this amount. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_DISABLED`, this acts as an hysteresis distance. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_SELF` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_visibility_range_end: -- :ref:`float` **visibility_range_end** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_visibility_range_end(value) | -+-----------+---------------------------------+ -| *Getter* | get_visibility_range_end() | -+-----------+---------------------------------+ +:ref:`float` **visibility_range_end** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_end** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_end** **(** **)** Distance from which the GeometryInstance3D will be hidden, taking :ref:`visibility_range_end_margin` into account as well. The default value of 0 is used to disable the range check. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_visibility_range_end_margin: -- :ref:`float` **visibility_range_end_margin** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------------------+ -| *Setter* | set_visibility_range_end_margin(value) | -+-----------+----------------------------------------+ -| *Getter* | get_visibility_range_end_margin() | -+-----------+----------------------------------------+ +:ref:`float` **visibility_range_end_margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_end_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_end_margin** **(** **)** Margin for the :ref:`visibility_range_end` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_end` threshold by this amount. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_DISABLED`, this acts as an hysteresis distance. If :ref:`visibility_range_fade_mode` is :ref:`VISIBILITY_RANGE_FADE_SELF` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_property_visibility_range_fade_mode: -- :ref:`VisibilityRangeFadeMode` **visibility_range_fade_mode** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_visibility_range_fade_mode(value) | -+-----------+---------------------------------------+ -| *Getter* | get_visibility_range_fade_mode() | -+-----------+---------------------------------------+ +:ref:`VisibilityRangeFadeMode` **visibility_range_fade_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_fade_mode** **(** :ref:`VisibilityRangeFadeMode` value **)** +- :ref:`VisibilityRangeFadeMode` **get_visibility_range_fade_mode** **(** **)** Controls which instances will be faded when approaching the limits of the visibility range. See :ref:`VisibilityRangeFadeMode` for possible values. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_GeometryInstance3D_method_get_instance_shader_parameter: -- :ref:`Variant` **get_instance_shader_parameter** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_instance_shader_parameter** **(** :ref:`StringName` name **)** |const| Get the value of a shader parameter as set on this instance. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_method_set_custom_aabb: -- void **set_custom_aabb** **(** :ref:`AABB` aabb **)** +.. rst-class:: classref-method + +void **set_custom_aabb** **(** :ref:`AABB` aabb **)** Overrides the bounding box of this node with a custom one. To remove it, set an :ref:`AABB` with all fields set to zero. +.. rst-class:: classref-item-separator + ---- .. _class_GeometryInstance3D_method_set_instance_shader_parameter: -- void **set_instance_shader_parameter** **(** :ref:`StringName` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_instance_shader_parameter** **(** :ref:`StringName` name, :ref:`Variant` value **)** Set the value of a shader parameter for this instance only. diff --git a/classes/class_gltfaccessor.rst b/classes/class_gltfaccessor.rst index b4fcb769a..94d66d9e1 100644 --- a/classes/class_gltfaccessor.rst +++ b/classes/class_gltfaccessor.rst @@ -16,287 +16,310 @@ GLTFAccessor There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`buffer_view` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`byte_offset` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`component_type` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`count` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedFloat64Array` | :ref:`max` | ``PackedFloat64Array()`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedFloat64Array` | :ref:`min` | ``PackedFloat64Array()`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`normalized` | ``false`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`sparse_count` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`sparse_indices_buffer_view` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`sparse_indices_byte_offset` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`sparse_indices_component_type` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`sparse_values_buffer_view` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`sparse_values_byte_offset` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`type` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`buffer_view` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`byte_offset` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`component_type` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`count` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedFloat64Array` | :ref:`max` | ``PackedFloat64Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedFloat64Array` | :ref:`min` | ``PackedFloat64Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`normalized` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_count` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_indices_buffer_view` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_indices_byte_offset` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_indices_component_type` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_values_buffer_view` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_values_byte_offset` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`type` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFAccessor_property_buffer_view: -- :ref:`int` **buffer_view** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_buffer_view(value) | -+-----------+------------------------+ -| *Getter* | get_buffer_view() | -+-----------+------------------------+ +:ref:`int` **buffer_view** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_buffer_view** **(** :ref:`int` value **)** +- :ref:`int` **get_buffer_view** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_byte_offset: -- :ref:`int` **byte_offset** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_byte_offset(value) | -+-----------+------------------------+ -| *Getter* | get_byte_offset() | -+-----------+------------------------+ +:ref:`int` **byte_offset** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_byte_offset** **(** :ref:`int` value **)** +- :ref:`int` **get_byte_offset** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_component_type: -- :ref:`int` **component_type** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_component_type(value) | -+-----------+---------------------------+ -| *Getter* | get_component_type() | -+-----------+---------------------------+ +:ref:`int` **component_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_component_type** **(** :ref:`int` value **)** +- :ref:`int` **get_component_type** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_count: -- :ref:`int` **count** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_count(value) | -+-----------+------------------+ -| *Getter* | get_count() | -+-----------+------------------+ +:ref:`int` **count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_count** **(** :ref:`int` value **)** +- :ref:`int` **get_count** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_max: -- :ref:`PackedFloat64Array` **max** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedFloat64Array()`` | -+-----------+--------------------------+ -| *Setter* | set_max(value) | -+-----------+--------------------------+ -| *Getter* | get_max() | -+-----------+--------------------------+ +:ref:`PackedFloat64Array` **max** = ``PackedFloat64Array()`` + +.. rst-class:: classref-property-setget + +- void **set_max** **(** :ref:`PackedFloat64Array` value **)** +- :ref:`PackedFloat64Array` **get_max** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_min: -- :ref:`PackedFloat64Array` **min** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedFloat64Array()`` | -+-----------+--------------------------+ -| *Setter* | set_min(value) | -+-----------+--------------------------+ -| *Getter* | get_min() | -+-----------+--------------------------+ +:ref:`PackedFloat64Array` **min** = ``PackedFloat64Array()`` + +.. rst-class:: classref-property-setget + +- void **set_min** **(** :ref:`PackedFloat64Array` value **)** +- :ref:`PackedFloat64Array` **get_min** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_normalized: -- :ref:`bool` **normalized** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_normalized(value) | -+-----------+-----------------------+ -| *Getter* | get_normalized() | -+-----------+-----------------------+ +:ref:`bool` **normalized** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_normalized** **(** :ref:`bool` value **)** +- :ref:`bool` **get_normalized** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_sparse_count: -- :ref:`int` **sparse_count** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_sparse_count(value) | -+-----------+-------------------------+ -| *Getter* | get_sparse_count() | -+-----------+-------------------------+ +:ref:`int` **sparse_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sparse_count** **(** :ref:`int` value **)** +- :ref:`int` **get_sparse_count** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_sparse_indices_buffer_view: -- :ref:`int` **sparse_indices_buffer_view** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_sparse_indices_buffer_view(value) | -+-----------+---------------------------------------+ -| *Getter* | get_sparse_indices_buffer_view() | -+-----------+---------------------------------------+ +:ref:`int` **sparse_indices_buffer_view** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sparse_indices_buffer_view** **(** :ref:`int` value **)** +- :ref:`int` **get_sparse_indices_buffer_view** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_sparse_indices_byte_offset: -- :ref:`int` **sparse_indices_byte_offset** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_sparse_indices_byte_offset(value) | -+-----------+---------------------------------------+ -| *Getter* | get_sparse_indices_byte_offset() | -+-----------+---------------------------------------+ +:ref:`int` **sparse_indices_byte_offset** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sparse_indices_byte_offset** **(** :ref:`int` value **)** +- :ref:`int` **get_sparse_indices_byte_offset** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_sparse_indices_component_type: -- :ref:`int` **sparse_indices_component_type** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_sparse_indices_component_type(value) | -+-----------+------------------------------------------+ -| *Getter* | get_sparse_indices_component_type() | -+-----------+------------------------------------------+ +:ref:`int` **sparse_indices_component_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sparse_indices_component_type** **(** :ref:`int` value **)** +- :ref:`int` **get_sparse_indices_component_type** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_sparse_values_buffer_view: -- :ref:`int` **sparse_values_buffer_view** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------------+ -| *Setter* | set_sparse_values_buffer_view(value) | -+-----------+--------------------------------------+ -| *Getter* | get_sparse_values_buffer_view() | -+-----------+--------------------------------------+ +:ref:`int` **sparse_values_buffer_view** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sparse_values_buffer_view** **(** :ref:`int` value **)** +- :ref:`int` **get_sparse_values_buffer_view** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_sparse_values_byte_offset: -- :ref:`int` **sparse_values_byte_offset** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------------+ -| *Setter* | set_sparse_values_byte_offset(value) | -+-----------+--------------------------------------+ -| *Getter* | get_sparse_values_byte_offset() | -+-----------+--------------------------------------+ +:ref:`int` **sparse_values_byte_offset** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sparse_values_byte_offset** **(** :ref:`int` value **)** +- :ref:`int` **get_sparse_values_byte_offset** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFAccessor_property_type: -- :ref:`int` **type** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_type(value) | -+-----------+-----------------+ -| *Getter* | get_type() | -+-----------+-----------------+ +:ref:`int` **type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_type** **(** :ref:`int` value **)** +- :ref:`int` **get_type** **(** **)** .. container:: contribute diff --git a/classes/class_gltfanimation.rst b/classes/class_gltfanimation.rst index aadd38125..310cc12a2 100644 --- a/classes/class_gltfanimation.rst +++ b/classes/class_gltfanimation.rst @@ -16,27 +16,37 @@ GLTFAnimation There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`loop` | ``false`` | -+-------------------------+------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`loop` | ``false`` | + +-------------------------+------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFAnimation_property_loop: -- :ref:`bool` **loop** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_loop(value) | -+-----------+-----------------+ -| *Getter* | get_loop() | -+-----------+-----------------+ +:ref:`bool` **loop** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_loop** **(** :ref:`bool` value **)** +- :ref:`bool` **get_loop** **(** **)** .. container:: contribute diff --git a/classes/class_gltfbufferview.rst b/classes/class_gltfbufferview.rst index 3cc5d246f..6c01c9d46 100644 --- a/classes/class_gltfbufferview.rst +++ b/classes/class_gltfbufferview.rst @@ -16,107 +16,121 @@ GLTFBufferView There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+---------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`buffer` | ``-1`` | -+-------------------------+---------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`byte_length` | ``0`` | -+-------------------------+---------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`byte_offset` | ``0`` | -+-------------------------+---------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`byte_stride` | ``-1`` | -+-------------------------+---------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`indices` | ``false`` | -+-------------------------+---------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`buffer` | ``-1`` | + +-------------------------+---------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`byte_length` | ``0`` | + +-------------------------+---------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`byte_offset` | ``0`` | + +-------------------------+---------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`byte_stride` | ``-1`` | + +-------------------------+---------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`indices` | ``false`` | + +-------------------------+---------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFBufferView_property_buffer: -- :ref:`int` **buffer** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``-1`` | -+-----------+-------------------+ -| *Setter* | set_buffer(value) | -+-----------+-------------------+ -| *Getter* | get_buffer() | -+-----------+-------------------+ +:ref:`int` **buffer** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_buffer** **(** :ref:`int` value **)** +- :ref:`int` **get_buffer** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFBufferView_property_byte_length: -- :ref:`int` **byte_length** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_byte_length(value) | -+-----------+------------------------+ -| *Getter* | get_byte_length() | -+-----------+------------------------+ +:ref:`int` **byte_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_byte_length** **(** :ref:`int` value **)** +- :ref:`int` **get_byte_length** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFBufferView_property_byte_offset: -- :ref:`int` **byte_offset** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_byte_offset(value) | -+-----------+------------------------+ -| *Getter* | get_byte_offset() | -+-----------+------------------------+ +:ref:`int` **byte_offset** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_byte_offset** **(** :ref:`int` value **)** +- :ref:`int` **get_byte_offset** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFBufferView_property_byte_stride: -- :ref:`int` **byte_stride** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------+ -| *Setter* | set_byte_stride(value) | -+-----------+------------------------+ -| *Getter* | get_byte_stride() | -+-----------+------------------------+ +:ref:`int` **byte_stride** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_byte_stride** **(** :ref:`int` value **)** +- :ref:`int` **get_byte_stride** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFBufferView_property_indices: -- :ref:`bool` **indices** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_indices(value) | -+-----------+--------------------+ -| *Getter* | get_indices() | -+-----------+--------------------+ +:ref:`bool` **indices** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_indices** **(** :ref:`bool` value **)** +- :ref:`bool` **get_indices** **(** **)** .. container:: contribute diff --git a/classes/class_gltfcamera.rst b/classes/class_gltfcamera.rst index 6db6644b2..ff7f292f7 100644 --- a/classes/class_gltfcamera.rst +++ b/classes/class_gltfcamera.rst @@ -14,11 +14,15 @@ GLTFCamera Represents a GLTF camera. +.. rst-class:: classref-introduction-group + Description ----------- Represents a camera as defined by the base GLTF spec. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,145 +30,184 @@ Tutorials - `GLTF camera spec and example file `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------+------------+ -| :ref:`float` | :ref:`depth_far` | ``4000.0`` | -+---------------------------+-----------------------------------------------------------+------------+ -| :ref:`float` | :ref:`depth_near` | ``0.05`` | -+---------------------------+-----------------------------------------------------------+------------+ -| :ref:`float` | :ref:`fov` | ``1.309`` | -+---------------------------+-----------------------------------------------------------+------------+ -| :ref:`bool` | :ref:`perspective` | ``true`` | -+---------------------------+-----------------------------------------------------------+------------+ -| :ref:`float` | :ref:`size_mag` | ``0.5`` | -+---------------------------+-----------------------------------------------------------+------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------+------------+ + | :ref:`float` | :ref:`depth_far` | ``4000.0`` | + +---------------------------+-----------------------------------------------------------+------------+ + | :ref:`float` | :ref:`depth_near` | ``0.05`` | + +---------------------------+-----------------------------------------------------------+------------+ + | :ref:`float` | :ref:`fov` | ``1.309`` | + +---------------------------+-----------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`perspective` | ``true`` | + +---------------------------+-----------------------------------------------------------+------------+ + | :ref:`float` | :ref:`size_mag` | ``0.5`` | + +---------------------------+-----------------------------------------------------------+------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFCamera` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFCamera` | :ref:`from_node` **(** :ref:`Camera3D` camera_node **)** |static| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Camera3D` | :ref:`to_node` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFCamera` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFCamera` | :ref:`from_node` **(** :ref:`Camera3D` camera_node **)** |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Camera3D` | :ref:`to_node` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFCamera_property_depth_far: -- :ref:`float` **depth_far** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4000.0`` | -+-----------+----------------------+ -| *Setter* | set_depth_far(value) | -+-----------+----------------------+ -| *Getter* | get_depth_far() | -+-----------+----------------------+ +:ref:`float` **depth_far** = ``4000.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth_far** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFCamera_property_depth_near: -- :ref:`float` **depth_near** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.05`` | -+-----------+-----------------------+ -| *Setter* | set_depth_near(value) | -+-----------+-----------------------+ -| *Getter* | get_depth_near() | -+-----------+-----------------------+ +:ref:`float` **depth_near** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_depth_near** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFCamera_property_fov: -- :ref:`float` **fov** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``1.309`` | -+-----------+----------------+ -| *Setter* | set_fov(value) | -+-----------+----------------+ -| *Getter* | get_fov() | -+-----------+----------------+ +:ref:`float` **fov** = ``1.309`` + +.. rst-class:: classref-property-setget + +- void **set_fov** **(** :ref:`float` value **)** +- :ref:`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` is true. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFCamera_property_perspective: -- :ref:`bool` **perspective** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_perspective(value) | -+-----------+------------------------+ -| *Getter* | get_perspective() | -+-----------+------------------------+ +:ref:`bool` **perspective** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_perspective** **(** :ref:`bool` value **)** +- :ref:`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` and the GLTF spec for more information. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFCamera_property_size_mag: -- :ref:`float` **size_mag** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.5`` | -+-----------+---------------------+ -| *Setter* | set_size_mag(value) | -+-----------+---------------------+ -| *Getter* | get_size_mag() | -+-----------+---------------------+ +:ref:`float` **size_mag** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_size_mag** **(** :ref:`float` value **)** +- :ref:`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` is false. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_GLTFCamera_method_from_dictionary: -- :ref:`GLTFCamera` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| +.. rst-class:: classref-method + +:ref:`GLTFCamera` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| Creates a new GLTFCamera instance by parsing the given :ref:`Dictionary`. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFCamera_method_from_node: -- :ref:`GLTFCamera` **from_node** **(** :ref:`Camera3D` camera_node **)** |static| +.. rst-class:: classref-method + +:ref:`GLTFCamera` **from_node** **(** :ref:`Camera3D` camera_node **)** |static| Create a new GLTFCamera instance from the given Godot :ref:`Camera3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFCamera_method_to_dictionary: -- :ref:`Dictionary` **to_dictionary** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **to_dictionary** **(** **)** |const| Serializes this GLTFCamera instance into a :ref:`Dictionary`. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFCamera_method_to_node: -- :ref:`Camera3D` **to_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Camera3D` **to_node** **(** **)** |const| Converts this GLTFCamera instance into a Godot :ref:`Camera3D` node. diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index 22df1c771..b55df0c03 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -12,114 +12,147 @@ GLTFDocument **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +.. 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. -Properties ----------- - -+-------------------------------------------------------------+-----------------------------------------------------------+--------+ -| :ref:`GLTFDocumentExtension[]` | :ref:`extensions` | ``[]`` | -+-------------------------------------------------------------+-----------------------------------------------------------+--------+ +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`append_from_buffer` **(** :ref:`PackedByteArray` bytes, :ref:`String` base_path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`append_from_file` **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30, :ref:`String` base_path="" **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`append_from_scene` **(** :ref:`Node` node, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`generate_buffer` **(** :ref:`GLTFState` state **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`generate_scene` **(** :ref:`GLTFState` state, :ref:`int` bake_fps=30 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`write_to_filesystem` **(** :ref:`GLTFState` state, :ref:`String` path **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto -Property Descriptions ---------------------- + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_buffer` **(** :ref:`PackedByteArray` bytes, :ref:`String` base_path, :ref:`GLTFState` state, :ref:`int` flags=0 **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_file` **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`String` base_path="" **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_scene` **(** :ref:`Node` node, :ref:`GLTFState` state, :ref:`int` flags=0 **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`generate_buffer` **(** :ref:`GLTFState` state **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`generate_scene` **(** :ref:`GLTFState` state, :ref:`float` bake_fps=30, :ref:`bool` trimming=false **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_gltf_document_extension` **(** :ref:`GLTFDocumentExtension` extension, :ref:`bool` first_priority=false **)** |static| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unregister_gltf_document_extension` **(** :ref:`GLTFDocumentExtension` extension **)** |static| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`write_to_filesystem` **(** :ref:`GLTFState` state, :ref:`String` path **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -.. _class_GLTFDocument_property_extensions: +.. rst-class:: classref-section-separator -- :ref:`GLTFDocumentExtension[]` **extensions** +---- -+-----------+-----------------------+ -| *Default* | ``[]`` | -+-----------+-----------------------+ -| *Setter* | set_extensions(value) | -+-----------+-----------------------+ -| *Getter* | get_extensions() | -+-----------+-----------------------+ - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GLTFDocument_method_append_from_buffer: -- :ref:`Error` **append_from_buffer** **(** :ref:`PackedByteArray` bytes, :ref:`String` base_path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** +.. rst-class:: classref-method -.. container:: contribute +:ref:`Error` **append_from_buffer** **(** :ref:`PackedByteArray` bytes, :ref:`String` base_path, :ref:`GLTFState` state, :ref:`int` flags=0 **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Takes a :ref:`PackedByteArray` defining a gLTF and returns a :ref:`GLTFState` object through the ``state`` parameter. + +\ **Note:** The ``base_path`` tells :ref:`append_from_buffer` where to find dependencies and can be empty. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocument_method_append_from_file: -- :ref:`Error` **append_from_file** **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30, :ref:`String` base_path="" **)** +.. rst-class:: classref-method -.. container:: contribute +:ref:`Error` **append_from_file** **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`String` base_path="" **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Takes a path to a gLTF file and returns a :ref:`GLTFState` object through the ``state`` parameter. + +\ **Note:** The ``base_path`` tells :ref:`append_from_file` where to find dependencies and can be empty. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocument_method_append_from_scene: -- :ref:`Error` **append_from_scene** **(** :ref:`Node` node, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** +.. rst-class:: classref-method -.. container:: contribute +:ref:`Error` **append_from_scene** **(** :ref:`Node` node, :ref:`GLTFState` state, :ref:`int` flags=0 **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Takes a Godot Engine scene node and returns a :ref:`GLTFState` object through the ``state`` parameter. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocument_method_generate_buffer: -- :ref:`PackedByteArray` **generate_buffer** **(** :ref:`GLTFState` state **)** +.. rst-class:: classref-method -.. container:: contribute +:ref:`PackedByteArray` **generate_buffer** **(** :ref:`GLTFState` state **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Takes a :ref:`GLTFState` object through the ``state`` parameter and returns a gLTF :ref:`PackedByteArray`. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocument_method_generate_scene: -- :ref:`Node` **generate_scene** **(** :ref:`GLTFState` state, :ref:`int` bake_fps=30 **)** +.. rst-class:: classref-method -.. container:: contribute +:ref:`Node` **generate_scene** **(** :ref:`GLTFState` state, :ref:`float` bake_fps=30, :ref:`bool` trimming=false **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Takes a :ref:`GLTFState` object through the ``state`` parameter and returns a Godot Engine scene node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocument_method_register_gltf_document_extension: + +.. rst-class:: classref-method + +void **register_gltf_document_extension** **(** :ref:`GLTFDocumentExtension` extension, :ref:`bool` first_priority=false **)** |static| + +Registers the given :ref:`GLTFDocumentExtension` instance with GLTFDocument. If ``first_priority`` is true, this extension will be run first. Otherwise, it will be run last. + +\ **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` or :ref:`GLTFNode`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocument_method_unregister_gltf_document_extension: + +.. rst-class:: classref-method + +void **unregister_gltf_document_extension** **(** :ref:`GLTFDocumentExtension` extension **)** |static| + +Unregisters the given :ref:`GLTFDocumentExtension` instance. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocument_method_write_to_filesystem: -- :ref:`Error` **write_to_filesystem** **(** :ref:`GLTFState` state, :ref:`String` path **)** +.. rst-class:: classref-method -.. container:: contribute +:ref:`Error` **write_to_filesystem** **(** :ref:`GLTFState` state, :ref:`String` path **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Takes a :ref:`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. .. |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.)` diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 80c2c3596..61cf8109c 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -16,110 +16,207 @@ GLTFDocumentExtension :ref:`GLTFDocument` extension class. +.. rst-class:: classref-introduction-group + Description ----------- Extends the functionality of the :ref:`GLTFDocument` class by allowing you to run arbitrary code at various stages of GLTF import or export. +To use, make a new class extending GLTFDocumentExtension, override any methods you need, make an instance of your class, and register it using :ref:`GLTFDocument.register_gltf_document_extension`. + +\ **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` or :ref:`GLTFNode`. + +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_export_preflight` **(** :ref:`Node` root **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_import_preflight` **(** :ref:`GLTFState` state **)** |virtual| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_convert_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_export_preflight` **(** :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_import_preflight` **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_parse_node_extensions` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- +.. _class_GLTFDocumentExtension_method__convert_scene_node: + +.. rst-class:: classref-method + +void **_convert_scene_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| + +Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_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`. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_method__export_node: -- :ref:`int` **_export_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **_export_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_post`. + +This method can be used to modify the final JSON of each node. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocumentExtension_method__export_post: -- :ref:`int` **_export_post** **(** :ref:`GLTFState` state **)** |virtual| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **_export_post** **(** :ref:`GLTFState` state **)** |virtual| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Part of the export process. This method is run last, after all other parts of the export process. + +This method can be used to modify the final JSON of the generated GLTF file. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocumentExtension_method__export_preflight: -- :ref:`int` **_export_preflight** **(** :ref:`Node` root **)** |virtual| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **_export_preflight** **(** :ref:`Node` root **)** |virtual| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Part of the export process. This method is run first, before all other parts of the export process. + +The return value is used to determine if this GLTFDocumentExtension class should be used for exporting a given GLTF file. If :ref:`@GlobalScope.OK`, the export will use this GLTFDocumentExtension class. If not overridden, :ref:`@GlobalScope.OK` is returned. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_method__generate_scene_node: + +.. rst-class:: classref-method + +:ref:`Node3D` **_generate_scene_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| + +Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_import_post_parse`. + +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. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocumentExtension_method__get_supported_extensions: -- :ref:`PackedStringArray` **_get_supported_extensions** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_supported_extensions** **(** **)** |virtual| + +Part of the import process. This method is run after :ref:`_import_preflight` and before :ref:`_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. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFDocumentExtension_method__import_node: -- :ref:`int` **_import_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **_import_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Part of the import process. This method is run after :ref:`_import_post_parse` and before :ref:`_import_post`. + +This method can be used to make modifications to each of the generated Godot scene nodes. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocumentExtension_method__import_post: -- :ref:`int` **_import_post** **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **_import_post** **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Part of the import process. This method is run last, after all other parts of the import process. + +This method can be used to modify the final Godot scene generated by the import process. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocumentExtension_method__import_post_parse: -- :ref:`int` **_import_post_parse** **(** :ref:`GLTFState` state **)** |virtual| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **_import_post_parse** **(** :ref:`GLTFState` state **)** |virtual| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Part of the import process. This method is run after :ref:`_generate_scene_node` and before :ref:`_import_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. + +.. rst-class:: classref-item-separator ---- .. _class_GLTFDocumentExtension_method__import_preflight: -- :ref:`int` **_import_preflight** **(** :ref:`GLTFState` state **)** |virtual| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **_import_preflight** **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Part of the import process. This method is run first, before all other parts of the import process. + +The return value is used to determine if this GLTFDocumentExtension class should be used for importing a given GLTF file. If :ref:`@GlobalScope.OK`, the import will use this GLTFDocumentExtension class. If not overridden, :ref:`@GlobalScope.OK` is returned. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_method__parse_node_extensions: + +.. rst-class:: classref-method + +:ref:`int` **_parse_node_extensions** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| + +Part of the import process. This method is run after :ref:`_get_supported_extensions` and before :ref:`_generate_scene_node`. + +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`. .. |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.)` diff --git a/classes/class_gltflight.rst b/classes/class_gltflight.rst index 5da2d1270..ce8e36d71 100644 --- a/classes/class_gltflight.rst +++ b/classes/class_gltflight.rst @@ -14,177 +14,221 @@ GLTFLight Represents a GLTF light. +.. rst-class:: classref-introduction-group + Description ----------- Represents a light as defined by the ``KHR_lights_punctual`` GLTF extension. +.. rst-class:: classref-introduction-group + Tutorials --------- - `KHR_lights_punctual GLTF extension spec `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`inner_cone_angle` | ``0.0`` | -+-----------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`intensity` | ``1.0`` | -+-----------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`light_type` | ``""`` | -+-----------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`outer_cone_angle` | ``0.785398`` | -+-----------------------------+--------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`range` | ``inf`` | -+-----------------------------+--------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`inner_cone_angle` | ``0.0`` | + +-----------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`intensity` | ``1.0`` | + +-----------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`light_type` | ``""`` | + +-----------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`outer_cone_angle` | ``0.785398`` | + +-----------------------------+--------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`range` | ``inf`` | + +-----------------------------+--------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFLight` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFLight` | :ref:`from_node` **(** :ref:`Light3D` light_node **)** |static| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Light3D` | :ref:`to_node` **(** **)** |const| | -+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFLight` | :ref:`from_dictionary` **(** :ref:`Dictionary` dictionary **)** |static| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFLight` | :ref:`from_node` **(** :ref:`Light3D` light_node **)** |static| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`to_dictionary` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Light3D` | :ref:`to_node` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFLight_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** The :ref:`Color` of the light. Defaults to white. A black color causes the light to have no effect. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_property_inner_cone_angle: -- :ref:`float` **inner_cone_angle** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_inner_cone_angle(value) | -+-----------+-----------------------------+ -| *Getter* | get_inner_cone_angle() | -+-----------+-----------------------------+ +:ref:`float` **inner_cone_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_inner_cone_angle** **(** :ref:`float` value **)** +- :ref:`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. Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot :ref:`SpotLight3D`, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_property_intensity: -- :ref:`float` **intensity** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_intensity(value) | -+-----------+----------------------+ -| *Getter* | get_intensity() | -+-----------+----------------------+ +:ref:`float` **intensity** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_intensity** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_property_light_type: -- :ref:`String` **light_type** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``""`` | -+-----------+-----------------------+ -| *Setter* | set_light_type(value) | -+-----------+-----------------------+ -| *Getter* | get_light_type() | -+-----------+-----------------------+ +:ref:`String` **light_type** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_light_type** **(** :ref:`String` value **)** +- :ref:`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`, :ref:`SpotLight3D`, and :ref:`DirectionalLight3D` respectively. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_property_outer_cone_angle: -- :ref:`float` **outer_cone_angle** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.785398`` | -+-----------+-----------------------------+ -| *Setter* | set_outer_cone_angle(value) | -+-----------+-----------------------------+ -| *Getter* | get_outer_cone_angle() | -+-----------+-----------------------------+ +:ref:`float` **outer_cone_angle** = ``0.785398`` + +.. rst-class:: classref-property-setget + +- void **set_outer_cone_angle** **(** :ref:`float` value **)** +- :ref:`float` **get_outer_cone_angle** **(** **)** The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle. At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot :ref:`SpotLight3D`, the outer cone angle is used as the angle of the spotlight. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_property_range: -- :ref:`float` **range** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``inf`` | -+-----------+------------------+ -| *Setter* | set_range(value) | -+-----------+------------------+ -| *Getter* | get_range() | -+-----------+------------------+ +:ref:`float` **range** = ``inf`` + +.. rst-class:: classref-property-setget + +- void **set_range** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_GLTFLight_method_from_dictionary: -- :ref:`GLTFLight` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| +.. rst-class:: classref-method + +:ref:`GLTFLight` **from_dictionary** **(** :ref:`Dictionary` dictionary **)** |static| Creates a new GLTFLight instance by parsing the given :ref:`Dictionary`. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_method_from_node: -- :ref:`GLTFLight` **from_node** **(** :ref:`Light3D` light_node **)** |static| +.. rst-class:: classref-method + +:ref:`GLTFLight` **from_node** **(** :ref:`Light3D` light_node **)** |static| Create a new GLTFLight instance from the given Godot :ref:`Light3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_method_to_dictionary: -- :ref:`Dictionary` **to_dictionary** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **to_dictionary** **(** **)** |const| Serializes this GLTFLight instance into a :ref:`Dictionary`. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFLight_method_to_node: -- :ref:`Light3D` **to_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Light3D` **to_node** **(** **)** |const| Converts this GLTFLight instance into a Godot :ref:`Light3D` node. diff --git a/classes/class_gltfmesh.rst b/classes/class_gltfmesh.rst index f09a545e1..a27a730eb 100644 --- a/classes/class_gltfmesh.rst +++ b/classes/class_gltfmesh.rst @@ -16,65 +16,79 @@ GLTFMesh There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ -| :ref:`PackedFloat32Array` | :ref:`blend_weights` | ``PackedFloat32Array()`` | -+-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ -| :ref:`Material[]` | :ref:`instance_materials` | ``[]`` | -+-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ -| :ref:`ImporterMesh` | :ref:`mesh` | | -+-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + | :ref:`PackedFloat32Array` | :ref:`blend_weights` | ``PackedFloat32Array()`` | + +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + | :ref:`Material[]` | :ref:`instance_materials` | ``[]`` | + +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + | :ref:`ImporterMesh` | :ref:`mesh` | | + +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFMesh_property_blend_weights: -- :ref:`PackedFloat32Array` **blend_weights** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedFloat32Array()`` | -+-----------+--------------------------+ -| *Setter* | set_blend_weights(value) | -+-----------+--------------------------+ -| *Getter* | get_blend_weights() | -+-----------+--------------------------+ +:ref:`PackedFloat32Array` **blend_weights** = ``PackedFloat32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_blend_weights** **(** :ref:`PackedFloat32Array` value **)** +- :ref:`PackedFloat32Array` **get_blend_weights** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFMesh_property_instance_materials: -- :ref:`Material[]` **instance_materials** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``[]`` | -+-----------+-------------------------------+ -| *Setter* | set_instance_materials(value) | -+-----------+-------------------------------+ -| *Getter* | get_instance_materials() | -+-----------+-------------------------------+ +:ref:`Material[]` **instance_materials** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_instance_materials** **(** :ref:`Material[]` value **)** +- :ref:`Material[]` **get_instance_materials** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFMesh_property_mesh: -- :ref:`ImporterMesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`ImporterMesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`ImporterMesh` value **)** +- :ref:`ImporterMesh` **get_mesh** **(** **)** .. container:: contribute diff --git a/classes/class_gltfnode.rst b/classes/class_gltfnode.rst index 54a1e29ec..51407b36f 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -14,309 +14,352 @@ GLTFNode GLTF node class. +.. rst-class:: classref-introduction-group + Description ----------- Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes). +.. rst-class:: classref-introduction-group + Tutorials --------- - `GLTF scene and node spec `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`camera` | ``-1`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`children` | ``PackedInt32Array()`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`height` | ``-1`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`joint` | ``false`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`light` | ``-1`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`mesh` | ``-1`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`parent` | ``-1`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`Quaternion` | :ref:`rotation` | ``Quaternion(0, 0, 0, 1)`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`scale` | ``Vector3(1, 1, 1)`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`skeleton` | ``-1`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`skin` | ``-1`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`xform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`camera` | ``-1`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`children` | ``PackedInt32Array()`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`height` | ``-1`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`joint` | ``false`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`light` | ``-1`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`mesh` | ``-1`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`parent` | ``-1`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`Quaternion` | :ref:`rotation` | ``Quaternion(0, 0, 0, 1)`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`scale` | ``Vector3(1, 1, 1)`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`skeleton` | ``-1`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`skin` | ``-1`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`xform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_additional_data` **(** :ref:`StringName` extension_name **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_additional_data` **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_additional_data` **(** :ref:`StringName` extension_name **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_additional_data` **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFNode_property_camera: -- :ref:`int` **camera** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``-1`` | -+-----------+-------------------+ -| *Setter* | set_camera(value) | -+-----------+-------------------+ -| *Getter* | get_camera() | -+-----------+-------------------+ +:ref:`int` **camera** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_camera** **(** :ref:`int` value **)** +- :ref:`int` **get_camera** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_children: -- :ref:`PackedInt32Array` **children** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_children(value) | -+-----------+------------------------+ -| *Getter* | get_children() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **children** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_children** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_children** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_height: -- :ref:`int` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``-1`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`int` **height** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`int` value **)** +- :ref:`int` **get_height** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_joint: -- :ref:`bool` **joint** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``false`` | -+-----------+------------------+ -| *Setter* | set_joint(value) | -+-----------+------------------+ -| *Getter* | get_joint() | -+-----------+------------------+ +:ref:`bool` **joint** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_joint** **(** :ref:`bool` value **)** +- :ref:`bool` **get_joint** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_light: -- :ref:`int` **light** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``-1`` | -+-----------+------------------+ -| *Setter* | set_light(value) | -+-----------+------------------+ -| *Getter* | get_light() | -+-----------+------------------+ +:ref:`int` **light** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_light** **(** :ref:`int` value **)** +- :ref:`int` **get_light** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_mesh: -- :ref:`int` **mesh** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``-1`` | -+-----------+-----------------+ -| *Setter* | set_mesh(value) | -+-----------+-----------------+ -| *Getter* | get_mesh() | -+-----------+-----------------+ +:ref:`int` **mesh** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`int` value **)** +- :ref:`int` **get_mesh** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_parent: -- :ref:`int` **parent** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``-1`` | -+-----------+-------------------+ -| *Setter* | set_parent(value) | -+-----------+-------------------+ -| *Getter* | get_parent() | -+-----------+-------------------+ +:ref:`int` **parent** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_parent** **(** :ref:`int` value **)** +- :ref:`int` **get_parent** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_position: -- :ref:`Vector3` **position** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_position(value) | -+-----------+----------------------+ -| *Getter* | get_position() | -+-----------+----------------------+ +:ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_position** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_rotation: -- :ref:`Quaternion` **rotation** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Quaternion(0, 0, 0, 1)`` | -+-----------+----------------------------+ -| *Setter* | set_rotation(value) | -+-----------+----------------------------+ -| *Getter* | get_rotation() | -+-----------+----------------------------+ +:ref:`Quaternion` **rotation** = ``Quaternion(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_rotation** **(** :ref:`Quaternion` value **)** +- :ref:`Quaternion` **get_rotation** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_scale: -- :ref:`Vector3` **scale** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_scale(value) | -+-----------+----------------------+ -| *Getter* | get_scale() | -+-----------+----------------------+ +:ref:`Vector3` **scale** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_scale** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_scale** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_skeleton: -- :ref:`int` **skeleton** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``-1`` | -+-----------+---------------------+ -| *Setter* | set_skeleton(value) | -+-----------+---------------------+ -| *Getter* | get_skeleton() | -+-----------+---------------------+ +:ref:`int` **skeleton** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_skeleton** **(** :ref:`int` value **)** +- :ref:`int` **get_skeleton** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_skin: -- :ref:`int` **skin** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``-1`` | -+-----------+-----------------+ -| *Setter* | set_skin(value) | -+-----------+-----------------+ -| *Getter* | get_skin() | -+-----------+-----------------+ +:ref:`int` **skin** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_skin** **(** :ref:`int` value **)** +- :ref:`int` **get_skin** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFNode_property_xform: -- :ref:`Transform3D` **xform** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_xform(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_xform() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **xform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_xform** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_xform** **(** **)** .. 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 ------------------- .. _class_GLTFNode_method_get_additional_data: -- :ref:`Variant` **get_additional_data** **(** :ref:`StringName` extension_name **)** +.. rst-class:: classref-method -Gets additional arbitrary data in this ``GLTFNode`` instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. +:ref:`Variant` **get_additional_data** **(** :ref:`StringName` extension_name **)** + +Gets additional arbitrary data in this **GLTFNode** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. The argument should be the :ref:`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_GLTFNode_method_set_additional_data: -- void **set_additional_data** **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** +.. rst-class:: classref-method -Sets additional arbitrary data in this ``GLTFNode`` instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. +void **set_additional_data** **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** + +Sets additional arbitrary data in this **GLTFNode** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. diff --git a/classes/class_gltfskeleton.rst b/classes/class_gltfskeleton.rst index 55c714c6c..7bd01c242 100644 --- a/classes/class_gltfskeleton.rst +++ b/classes/class_gltfskeleton.rst @@ -16,137 +16,185 @@ GLTFSkeleton There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+---------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`joints` | ``PackedInt32Array()`` | -+-------------------------------------------------+---------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`roots` | ``PackedInt32Array()`` | -+-------------------------------------------------+---------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`joints` | ``PackedInt32Array()`` | + +-------------------------------------------------+---------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`roots` | ``PackedInt32Array()`` | + +-------------------------------------------------+---------------------------------------------------+------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BoneAttachment3D` | :ref:`get_bone_attachment` **(** :ref:`int` idx **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bone_attachment_count` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_godot_bone_node` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Skeleton3D` | :ref:`get_godot_skeleton` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String[]` | :ref:`get_unique_names` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_godot_bone_node` **(** :ref:`Dictionary` godot_bone_node **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_unique_names` **(** :ref:`String[]` unique_names **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneAttachment3D` | :ref:`get_bone_attachment` **(** :ref:`int` idx **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_attachment_count` **(** **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_godot_bone_node` **(** **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton3D` | :ref:`get_godot_skeleton` **(** **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String[]` | :ref:`get_unique_names` **(** **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_godot_bone_node` **(** :ref:`Dictionary` godot_bone_node **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_unique_names` **(** :ref:`String[]` unique_names **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFSkeleton_property_joints: -- :ref:`PackedInt32Array` **joints** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_joints(value) | -+-----------+------------------------+ -| *Getter* | get_joints() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **joints** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_joints** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_joints** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkeleton_property_roots: -- :ref:`PackedInt32Array` **roots** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_roots(value) | -+-----------+------------------------+ -| *Getter* | get_roots() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **roots** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_roots** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_roots** **(** **)** .. 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 ------------------- .. _class_GLTFSkeleton_method_get_bone_attachment: -- :ref:`BoneAttachment3D` **get_bone_attachment** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`BoneAttachment3D` **get_bone_attachment** **(** :ref:`int` idx **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkeleton_method_get_bone_attachment_count: -- :ref:`int` **get_bone_attachment_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_bone_attachment_count** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkeleton_method_get_godot_bone_node: -- :ref:`Dictionary` **get_godot_bone_node** **(** **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_godot_bone_node** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkeleton_method_get_godot_skeleton: -- :ref:`Skeleton3D` **get_godot_skeleton** **(** **)** +.. rst-class:: classref-method + +:ref:`Skeleton3D` **get_godot_skeleton** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkeleton_method_get_unique_names: -- :ref:`String[]` **get_unique_names** **(** **)** +.. rst-class:: classref-method + +:ref:`String[]` **get_unique_names** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkeleton_method_set_godot_bone_node: -- void **set_godot_bone_node** **(** :ref:`Dictionary` godot_bone_node **)** +.. rst-class:: classref-method + +void **set_godot_bone_node** **(** :ref:`Dictionary` godot_bone_node **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkeleton_method_set_unique_names: -- void **set_unique_names** **(** :ref:`String[]` unique_names **)** +.. rst-class:: classref-method + +void **set_unique_names** **(** :ref:`String[]` unique_names **)** .. container:: contribute diff --git a/classes/class_gltfskin.rst b/classes/class_gltfskin.rst index b91d2dbc3..940d8c8f4 100644 --- a/classes/class_gltfskin.rst +++ b/classes/class_gltfskin.rst @@ -16,223 +16,274 @@ GLTFSkin There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ -| :ref:`Skin` | :ref:`godot_skin` | | -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`joints` | ``PackedInt32Array()`` | -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`joints_original` | ``PackedInt32Array()`` | -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`non_joints` | ``PackedInt32Array()`` | -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`roots` | ``PackedInt32Array()`` | -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ -| :ref:`int` | :ref:`skeleton` | ``-1`` | -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ -| :ref:`int` | :ref:`skin_root` | ``-1`` | -+-------------------------------------------------+-----------------------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + | :ref:`Skin` | :ref:`godot_skin` | | + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`joints` | ``PackedInt32Array()`` | + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`joints_original` | ``PackedInt32Array()`` | + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`non_joints` | ``PackedInt32Array()`` | + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`roots` | ``PackedInt32Array()`` | + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + | :ref:`int` | :ref:`skeleton` | ``-1`` | + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + | :ref:`int` | :ref:`skin_root` | ``-1`` | + +-------------------------------------------------+-----------------------------------------------------------------+------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D[]` | :ref:`get_inverse_binds` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_joint_i_to_bone_i` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_joint_i_to_name` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_inverse_binds` **(** :ref:`Transform3D[]` inverse_binds **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_i_to_bone_i` **(** :ref:`Dictionary` joint_i_to_bone_i **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_i_to_name` **(** :ref:`Dictionary` joint_i_to_name **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D[]` | :ref:`get_inverse_binds` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_joint_i_to_bone_i` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_joint_i_to_name` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_inverse_binds` **(** :ref:`Transform3D[]` inverse_binds **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_i_to_bone_i` **(** :ref:`Dictionary` joint_i_to_bone_i **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_i_to_name` **(** :ref:`Dictionary` joint_i_to_name **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFSkin_property_godot_skin: -- :ref:`Skin` **godot_skin** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_godot_skin(value) | -+----------+-----------------------+ -| *Getter* | get_godot_skin() | -+----------+-----------------------+ +:ref:`Skin` **godot_skin** + +.. rst-class:: classref-property-setget + +- void **set_godot_skin** **(** :ref:`Skin` value **)** +- :ref:`Skin` **get_godot_skin** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_property_joints: -- :ref:`PackedInt32Array` **joints** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_joints(value) | -+-----------+------------------------+ -| *Getter* | get_joints() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **joints** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_joints** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_joints** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_property_joints_original: -- :ref:`PackedInt32Array` **joints_original** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+----------------------------+ -| *Setter* | set_joints_original(value) | -+-----------+----------------------------+ -| *Getter* | get_joints_original() | -+-----------+----------------------------+ +:ref:`PackedInt32Array` **joints_original** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_joints_original** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_joints_original** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_property_non_joints: -- :ref:`PackedInt32Array` **non_joints** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_non_joints(value) | -+-----------+------------------------+ -| *Getter* | get_non_joints() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **non_joints** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_non_joints** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_non_joints** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_property_roots: -- :ref:`PackedInt32Array` **roots** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_roots(value) | -+-----------+------------------------+ -| *Getter* | get_roots() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **roots** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_roots** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_roots** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_property_skeleton: -- :ref:`int` **skeleton** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``-1`` | -+-----------+---------------------+ -| *Setter* | set_skeleton(value) | -+-----------+---------------------+ -| *Getter* | get_skeleton() | -+-----------+---------------------+ +:ref:`int` **skeleton** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_skeleton** **(** :ref:`int` value **)** +- :ref:`int` **get_skeleton** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_property_skin_root: -- :ref:`int` **skin_root** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``-1`` | -+-----------+----------------------+ -| *Setter* | set_skin_root(value) | -+-----------+----------------------+ -| *Getter* | get_skin_root() | -+-----------+----------------------+ +:ref:`int` **skin_root** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_skin_root** **(** :ref:`int` value **)** +- :ref:`int` **get_skin_root** **(** **)** .. 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 ------------------- .. _class_GLTFSkin_method_get_inverse_binds: -- :ref:`Transform3D[]` **get_inverse_binds** **(** **)** +.. rst-class:: classref-method + +:ref:`Transform3D[]` **get_inverse_binds** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_method_get_joint_i_to_bone_i: -- :ref:`Dictionary` **get_joint_i_to_bone_i** **(** **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_joint_i_to_bone_i** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_method_get_joint_i_to_name: -- :ref:`Dictionary` **get_joint_i_to_name** **(** **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_joint_i_to_name** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_method_set_inverse_binds: -- void **set_inverse_binds** **(** :ref:`Transform3D[]` inverse_binds **)** +.. rst-class:: classref-method + +void **set_inverse_binds** **(** :ref:`Transform3D[]` inverse_binds **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_method_set_joint_i_to_bone_i: -- void **set_joint_i_to_bone_i** **(** :ref:`Dictionary` joint_i_to_bone_i **)** +.. rst-class:: classref-method + +void **set_joint_i_to_bone_i** **(** :ref:`Dictionary` joint_i_to_bone_i **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSkin_method_set_joint_i_to_name: -- void **set_joint_i_to_name** **(** :ref:`Dictionary` joint_i_to_name **)** +.. rst-class:: classref-method + +void **set_joint_i_to_name** **(** :ref:`Dictionary` joint_i_to_name **)** .. container:: contribute diff --git a/classes/class_gltfspecgloss.rst b/classes/class_gltfspecgloss.rst index 650dbda03..7fed042b3 100644 --- a/classes/class_gltfspecgloss.rst +++ b/classes/class_gltfspecgloss.rst @@ -14,105 +14,127 @@ GLTFSpecGloss Archived GLTF extension for specular/glossy materials. +.. rst-class:: classref-introduction-group + Description ----------- KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files. +.. rst-class:: classref-introduction-group + Tutorials --------- - `KHR_materials_pbrSpecularGlossiness GLTF extension spec `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`diffuse_factor` | ``Color(1, 1, 1, 1)`` | -+---------------------------+----------------------------------------------------------------------+-----------------------+ -| :ref:`Image` | :ref:`diffuse_img` | | -+---------------------------+----------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`gloss_factor` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------+-----------------------+ -| :ref:`Image` | :ref:`spec_gloss_img` | | -+---------------------------+----------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`specular_factor` | ``Color(1, 1, 1, 1)`` | -+---------------------------+----------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`diffuse_factor` | ``Color(1, 1, 1, 1)`` | + +---------------------------+----------------------------------------------------------------------+-----------------------+ + | :ref:`Image` | :ref:`diffuse_img` | | + +---------------------------+----------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`gloss_factor` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------+-----------------------+ + | :ref:`Image` | :ref:`spec_gloss_img` | | + +---------------------------+----------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`specular_factor` | ``Color(1, 1, 1, 1)`` | + +---------------------------+----------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFSpecGloss_property_diffuse_factor: -- :ref:`Color` **diffuse_factor** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+---------------------------+ -| *Setter* | set_diffuse_factor(value) | -+-----------+---------------------------+ -| *Getter* | get_diffuse_factor() | -+-----------+---------------------------+ +:ref:`Color` **diffuse_factor** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_diffuse_factor** **(** :ref:`Color` value **)** +- :ref:`Color` **get_diffuse_factor** **(** **)** The reflected diffuse factor of the material. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSpecGloss_property_diffuse_img: -- :ref:`Image` **diffuse_img** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_diffuse_img(value) | -+----------+------------------------+ -| *Getter* | get_diffuse_img() | -+----------+------------------------+ +:ref:`Image` **diffuse_img** + +.. rst-class:: classref-property-setget + +- void **set_diffuse_img** **(** :ref:`Image` value **)** +- :ref:`Image` **get_diffuse_img** **(** **)** The diffuse texture. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSpecGloss_property_gloss_factor: -- :ref:`float` **gloss_factor** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_gloss_factor(value) | -+-----------+-------------------------+ -| *Getter* | get_gloss_factor() | -+-----------+-------------------------+ +:ref:`float` **gloss_factor** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_gloss_factor** **(** :ref:`float` value **)** +- :ref:`float` **get_gloss_factor** **(** **)** The glossiness or smoothness of the material. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSpecGloss_property_spec_gloss_img: -- :ref:`Image` **spec_gloss_img** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_spec_gloss_img(value) | -+----------+---------------------------+ -| *Getter* | get_spec_gloss_img() | -+----------+---------------------------+ +:ref:`Image` **spec_gloss_img** + +.. rst-class:: classref-property-setget + +- void **set_spec_gloss_img** **(** :ref:`Image` value **)** +- :ref:`Image` **get_spec_gloss_img** **(** **)** The specular-glossiness texture. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFSpecGloss_property_specular_factor: -- :ref:`Color` **specular_factor** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+----------------------------+ -| *Setter* | set_specular_factor(value) | -+-----------+----------------------------+ -| *Getter* | get_specular_factor() | -+-----------+----------------------------+ +:ref:`Color` **specular_factor** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_specular_factor** **(** :ref:`Color` value **)** +- :ref:`Color` **get_specular_factor** **(** **)** The specular RGB color of the material. The alpha channel is unused. diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index 28abca523..1aedb08d2 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -16,663 +16,843 @@ GLTFState There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`String` | :ref:`base_path` | ``""`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`PackedByteArray[]` | :ref:`buffers` | ``[]`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`create_animations` | ``true`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`PackedByteArray` | :ref:`glb_data` | ``PackedByteArray()`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`Dictionary` | :ref:`json` | ``{}`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`int` | :ref:`major_version` | ``0`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`int` | :ref:`minor_version` | ``0`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`root_nodes` | ``PackedInt32Array()`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`String` | :ref:`scene_name` | ``""`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`use_named_skin_binds` | ``false`` | -+-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`String` | :ref:`base_path` | ``""`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`PackedByteArray[]` | :ref:`buffers` | ``[]`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`create_animations` | ``true`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`PackedByteArray` | :ref:`glb_data` | ``PackedByteArray()`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`Dictionary` | :ref:`json` | ``{}`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`int` | :ref:`major_version` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`int` | :ref:`minor_version` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`root_nodes` | ``PackedInt32Array()`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`String` | :ref:`scene_name` | ``""`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`use_named_skin_binds` | ``false`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_used_extension` **(** :ref:`String` extension_name, :ref:`bool` required **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFAccessor[]` | :ref:`get_accessors` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_additional_data` **(** :ref:`StringName` extension_name **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AnimationPlayer` | :ref:`get_animation_player` **(** :ref:`int` idx **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_animation_players_count` **(** :ref:`int` idx **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFAnimation[]` | :ref:`get_animations` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFBufferView[]` | :ref:`get_buffer_views` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFCamera[]` | :ref:`get_cameras` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D[]` | :ref:`get_images` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFLight[]` | :ref:`get_lights` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BaseMaterial3D[]` | :ref:`get_materials` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFMesh[]` | :ref:`get_meshes` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFNode[]` | :ref:`get_nodes` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_scene_node` **(** :ref:`int` idx **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_skeleton_to_node` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFSkeleton[]` | :ref:`get_skeletons` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFSkin[]` | :ref:`get_skins` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFTextureSampler[]` | :ref:`get_texture_samplers` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GLTFTexture[]` | :ref:`get_textures` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String[]` | :ref:`get_unique_animation_names` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String[]` | :ref:`get_unique_names` **(** **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_accessors` **(** :ref:`GLTFAccessor[]` accessors **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_additional_data` **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_animations` **(** :ref:`GLTFAnimation[]` animations **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_buffer_views` **(** :ref:`GLTFBufferView[]` buffer_views **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cameras` **(** :ref:`GLTFCamera[]` cameras **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_images` **(** :ref:`Texture2D[]` images **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_lights` **(** :ref:`GLTFLight[]` lights **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_materials` **(** :ref:`BaseMaterial3D[]` materials **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_meshes` **(** :ref:`GLTFMesh[]` meshes **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_nodes` **(** :ref:`GLTFNode[]` nodes **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skeleton_to_node` **(** :ref:`Dictionary` skeleton_to_node **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skeletons` **(** :ref:`GLTFSkeleton[]` skeletons **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skins` **(** :ref:`GLTFSkin[]` skins **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture_samplers` **(** :ref:`GLTFTextureSampler[]` texture_samplers **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_textures` **(** :ref:`GLTFTexture[]` textures **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_unique_animation_names` **(** :ref:`String[]` unique_animation_names **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_unique_names` **(** :ref:`String[]` unique_names **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_used_extension` **(** :ref:`String` extension_name, :ref:`bool` required **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFAccessor[]` | :ref:`get_accessors` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_additional_data` **(** :ref:`StringName` extension_name **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationPlayer` | :ref:`get_animation_player` **(** :ref:`int` idx **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_animation_players_count` **(** :ref:`int` idx **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFAnimation[]` | :ref:`get_animations` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFBufferView[]` | :ref:`get_buffer_views` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFCamera[]` | :ref:`get_cameras` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D[]` | :ref:`get_images` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFLight[]` | :ref:`get_lights` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material[]` | :ref:`get_materials` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFMesh[]` | :ref:`get_meshes` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFNode[]` | :ref:`get_nodes` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_scene_node` **(** :ref:`int` idx **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_skeleton_to_node` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFSkeleton[]` | :ref:`get_skeletons` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFSkin[]` | :ref:`get_skins` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFTextureSampler[]` | :ref:`get_texture_samplers` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFTexture[]` | :ref:`get_textures` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String[]` | :ref:`get_unique_animation_names` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String[]` | :ref:`get_unique_names` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_accessors` **(** :ref:`GLTFAccessor[]` accessors **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_additional_data` **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_animations` **(** :ref:`GLTFAnimation[]` animations **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_buffer_views` **(** :ref:`GLTFBufferView[]` buffer_views **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cameras` **(** :ref:`GLTFCamera[]` cameras **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_images` **(** :ref:`Texture2D[]` images **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_lights` **(** :ref:`GLTFLight[]` lights **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_materials` **(** :ref:`Material[]` materials **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_meshes` **(** :ref:`GLTFMesh[]` meshes **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_nodes` **(** :ref:`GLTFNode[]` nodes **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_skeleton_to_node` **(** :ref:`Dictionary` skeleton_to_node **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_skeletons` **(** :ref:`GLTFSkeleton[]` skeletons **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_skins` **(** :ref:`GLTFSkin[]` skins **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_texture_samplers` **(** :ref:`GLTFTextureSampler[]` texture_samplers **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_textures` **(** :ref:`GLTFTexture[]` textures **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_unique_animation_names` **(** :ref:`String[]` unique_animation_names **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_unique_names` **(** :ref:`String[]` unique_names **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFState_property_base_path: -- :ref:`String` **base_path** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``""`` | -+-----------+----------------------+ -| *Setter* | set_base_path(value) | -+-----------+----------------------+ -| *Getter* | get_base_path() | -+-----------+----------------------+ +:ref:`String` **base_path** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_base_path** **(** :ref:`String` value **)** +- :ref:`String` **get_base_path** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_buffers: -- :ref:`PackedByteArray[]` **buffers** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_buffers(value) | -+-----------+--------------------+ -| *Getter* | get_buffers() | -+-----------+--------------------+ +:ref:`PackedByteArray[]` **buffers** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_buffers** **(** :ref:`PackedByteArray[]` value **)** +- :ref:`PackedByteArray[]` **get_buffers** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_create_animations: -- :ref:`bool` **create_animations** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_create_animations(value) | -+-----------+------------------------------+ -| *Getter* | get_create_animations() | -+-----------+------------------------------+ +:ref:`bool` **create_animations** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_create_animations** **(** :ref:`bool` value **)** +- :ref:`bool` **get_create_animations** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_glb_data: -- :ref:`PackedByteArray` **glb_data** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+-----------------------+ -| *Setter* | set_glb_data(value) | -+-----------+-----------------------+ -| *Getter* | get_glb_data() | -+-----------+-----------------------+ +:ref:`PackedByteArray` **glb_data** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_glb_data** **(** :ref:`PackedByteArray` value **)** +- :ref:`PackedByteArray` **get_glb_data** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_json: -- :ref:`Dictionary` **json** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``{}`` | -+-----------+-----------------+ -| *Setter* | set_json(value) | -+-----------+-----------------+ -| *Getter* | get_json() | -+-----------+-----------------+ +:ref:`Dictionary` **json** = ``{}`` + +.. rst-class:: classref-property-setget + +- void **set_json** **(** :ref:`Dictionary` value **)** +- :ref:`Dictionary` **get_json** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_major_version: -- :ref:`int` **major_version** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_major_version(value) | -+-----------+--------------------------+ -| *Getter* | get_major_version() | -+-----------+--------------------------+ +:ref:`int` **major_version** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_major_version** **(** :ref:`int` value **)** +- :ref:`int` **get_major_version** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_minor_version: -- :ref:`int` **minor_version** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_minor_version(value) | -+-----------+--------------------------+ -| *Getter* | get_minor_version() | -+-----------+--------------------------+ +:ref:`int` **minor_version** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_minor_version** **(** :ref:`int` value **)** +- :ref:`int` **get_minor_version** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_root_nodes: -- :ref:`PackedInt32Array` **root_nodes** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------+ -| *Setter* | set_root_nodes(value) | -+-----------+------------------------+ -| *Getter* | get_root_nodes() | -+-----------+------------------------+ +:ref:`PackedInt32Array` **root_nodes** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_root_nodes** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_root_nodes** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_scene_name: -- :ref:`String` **scene_name** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``""`` | -+-----------+-----------------------+ -| *Setter* | set_scene_name(value) | -+-----------+-----------------------+ -| *Getter* | get_scene_name() | -+-----------+-----------------------+ +:ref:`String` **scene_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_scene_name** **(** :ref:`String` value **)** +- :ref:`String` **get_scene_name** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_property_use_named_skin_binds: -- :ref:`bool` **use_named_skin_binds** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_use_named_skin_binds(value) | -+-----------+---------------------------------+ -| *Getter* | get_use_named_skin_binds() | -+-----------+---------------------------------+ +:ref:`bool` **use_named_skin_binds** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_named_skin_binds** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_named_skin_binds** **(** **)** .. 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 ------------------- .. _class_GLTFState_method_add_used_extension: -- void **add_used_extension** **(** :ref:`String` extension_name, :ref:`bool` required **)** +.. rst-class:: classref-method + +void **add_used_extension** **(** :ref:`String` extension_name, :ref:`bool` required **)** 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`, as that stage is too late to add extensions. The final list is sorted alphabetically. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_accessors: -- :ref:`GLTFAccessor[]` **get_accessors** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFAccessor[]` **get_accessors** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_additional_data: -- :ref:`Variant` **get_additional_data** **(** :ref:`StringName` extension_name **)** +.. rst-class:: classref-method -Gets additional arbitrary data in this ``GLTFState`` instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. +:ref:`Variant` **get_additional_data** **(** :ref:`StringName` extension_name **)** + +Gets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. The argument should be the :ref:`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_GLTFState_method_get_animation_player: -- :ref:`AnimationPlayer` **get_animation_player** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`AnimationPlayer` **get_animation_player** **(** :ref:`int` idx **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_animation_players_count: -- :ref:`int` **get_animation_players_count** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`int` **get_animation_players_count** **(** :ref:`int` idx **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_animations: -- :ref:`GLTFAnimation[]` **get_animations** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFAnimation[]` **get_animations** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_buffer_views: -- :ref:`GLTFBufferView[]` **get_buffer_views** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFBufferView[]` **get_buffer_views** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_cameras: -- :ref:`GLTFCamera[]` **get_cameras** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFCamera[]` **get_cameras** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_images: -- :ref:`Texture2D[]` **get_images** **(** **)** +.. rst-class:: classref-method + +:ref:`Texture2D[]` **get_images** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_lights: -- :ref:`GLTFLight[]` **get_lights** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFLight[]` **get_lights** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_materials: -- :ref:`BaseMaterial3D[]` **get_materials** **(** **)** +.. rst-class:: classref-method + +:ref:`Material[]` **get_materials** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_meshes: -- :ref:`GLTFMesh[]` **get_meshes** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFMesh[]` **get_meshes** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_nodes: -- :ref:`GLTFNode[]` **get_nodes** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFNode[]` **get_nodes** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_scene_node: -- :ref:`Node` **get_scene_node** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`Node` **get_scene_node** **(** :ref:`int` idx **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_skeleton_to_node: -- :ref:`Dictionary` **get_skeleton_to_node** **(** **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_skeleton_to_node** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_skeletons: -- :ref:`GLTFSkeleton[]` **get_skeletons** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFSkeleton[]` **get_skeletons** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_skins: -- :ref:`GLTFSkin[]` **get_skins** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFSkin[]` **get_skins** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_texture_samplers: -- :ref:`GLTFTextureSampler[]` **get_texture_samplers** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFTextureSampler[]` **get_texture_samplers** **(** **)** Retrieves the array of texture samplers that are used by the textures contained in the GLTF. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_textures: -- :ref:`GLTFTexture[]` **get_textures** **(** **)** +.. rst-class:: classref-method + +:ref:`GLTFTexture[]` **get_textures** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_unique_animation_names: -- :ref:`String[]` **get_unique_animation_names** **(** **)** +.. rst-class:: classref-method + +:ref:`String[]` **get_unique_animation_names** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_get_unique_names: -- :ref:`String[]` **get_unique_names** **(** **)** +.. rst-class:: classref-method + +:ref:`String[]` **get_unique_names** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_accessors: -- void **set_accessors** **(** :ref:`GLTFAccessor[]` accessors **)** +.. rst-class:: classref-method + +void **set_accessors** **(** :ref:`GLTFAccessor[]` accessors **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_additional_data: -- void **set_additional_data** **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** +.. rst-class:: classref-method -Sets additional arbitrary data in this ``GLTFState`` instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. +void **set_additional_data** **(** :ref:`StringName` extension_name, :ref:`Variant` additional_data **)** + +Sets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_animations: -- void **set_animations** **(** :ref:`GLTFAnimation[]` animations **)** +.. rst-class:: classref-method + +void **set_animations** **(** :ref:`GLTFAnimation[]` animations **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_buffer_views: -- void **set_buffer_views** **(** :ref:`GLTFBufferView[]` buffer_views **)** +.. rst-class:: classref-method + +void **set_buffer_views** **(** :ref:`GLTFBufferView[]` buffer_views **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_cameras: -- void **set_cameras** **(** :ref:`GLTFCamera[]` cameras **)** +.. rst-class:: classref-method + +void **set_cameras** **(** :ref:`GLTFCamera[]` cameras **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_images: -- void **set_images** **(** :ref:`Texture2D[]` images **)** +.. rst-class:: classref-method + +void **set_images** **(** :ref:`Texture2D[]` images **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_lights: -- void **set_lights** **(** :ref:`GLTFLight[]` lights **)** +.. rst-class:: classref-method + +void **set_lights** **(** :ref:`GLTFLight[]` lights **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_materials: -- void **set_materials** **(** :ref:`BaseMaterial3D[]` materials **)** +.. rst-class:: classref-method + +void **set_materials** **(** :ref:`Material[]` materials **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_meshes: -- void **set_meshes** **(** :ref:`GLTFMesh[]` meshes **)** +.. rst-class:: classref-method + +void **set_meshes** **(** :ref:`GLTFMesh[]` meshes **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_nodes: -- void **set_nodes** **(** :ref:`GLTFNode[]` nodes **)** +.. rst-class:: classref-method + +void **set_nodes** **(** :ref:`GLTFNode[]` nodes **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_skeleton_to_node: -- void **set_skeleton_to_node** **(** :ref:`Dictionary` skeleton_to_node **)** +.. rst-class:: classref-method + +void **set_skeleton_to_node** **(** :ref:`Dictionary` skeleton_to_node **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_skeletons: -- void **set_skeletons** **(** :ref:`GLTFSkeleton[]` skeletons **)** +.. rst-class:: classref-method + +void **set_skeletons** **(** :ref:`GLTFSkeleton[]` skeletons **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_skins: -- void **set_skins** **(** :ref:`GLTFSkin[]` skins **)** +.. rst-class:: classref-method + +void **set_skins** **(** :ref:`GLTFSkin[]` skins **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_texture_samplers: -- void **set_texture_samplers** **(** :ref:`GLTFTextureSampler[]` texture_samplers **)** +.. rst-class:: classref-method + +void **set_texture_samplers** **(** :ref:`GLTFTextureSampler[]` texture_samplers **)** Sets the array of texture samplers that are used by the textures contained in the GLTF. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_textures: -- void **set_textures** **(** :ref:`GLTFTexture[]` textures **)** +.. rst-class:: classref-method + +void **set_textures** **(** :ref:`GLTFTexture[]` textures **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_unique_animation_names: -- void **set_unique_animation_names** **(** :ref:`String[]` unique_animation_names **)** +.. rst-class:: classref-method + +void **set_unique_animation_names** **(** :ref:`String[]` unique_animation_names **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GLTFState_method_set_unique_names: -- void **set_unique_names** **(** :ref:`String[]` unique_names **)** +.. rst-class:: classref-method + +void **set_unique_names** **(** :ref:`String[]` unique_names **)** .. container:: contribute diff --git a/classes/class_gltftexture.rst b/classes/class_gltftexture.rst index 42ba658c7..934b03614 100644 --- a/classes/class_gltftexture.rst +++ b/classes/class_gltftexture.rst @@ -16,45 +16,56 @@ GLTFTexture There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+--------------------------------------------------------+--------+ -| :ref:`int` | :ref:`sampler` | ``-1`` | -+-----------------------+--------------------------------------------------------+--------+ -| :ref:`int` | :ref:`src_image` | ``0`` | -+-----------------------+--------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------+--------+ + | :ref:`int` | :ref:`sampler` | ``-1`` | + +-----------------------+--------------------------------------------------------+--------+ + | :ref:`int` | :ref:`src_image` | ``0`` | + +-----------------------+--------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFTexture_property_sampler: -- :ref:`int` **sampler** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``-1`` | -+-----------+--------------------+ -| *Setter* | set_sampler(value) | -+-----------+--------------------+ -| *Getter* | get_sampler() | -+-----------+--------------------+ +:ref:`int` **sampler** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_sampler** **(** :ref:`int` value **)** +- :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_GLTFTexture_property_src_image: -- :ref:`int` **src_image** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_src_image(value) | -+-----------+----------------------+ -| *Getter* | get_src_image() | -+-----------+----------------------+ +:ref:`int` **src_image** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_src_image** **(** :ref:`int` value **)** +- :ref:`int` **get_src_image** **(** **)** .. container:: contribute diff --git a/classes/class_gltftexturesampler.rst b/classes/class_gltftexturesampler.rst index b8ed42ce2..b3174fe07 100644 --- a/classes/class_gltftexturesampler.rst +++ b/classes/class_gltftexturesampler.rst @@ -14,86 +14,101 @@ GLTFTextureSampler Represents a GLTF texture sampler +.. rst-class:: classref-introduction-group + 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-reftable-group + Properties ---------- -+-----------------------+-----------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`mag_filter` | ``9729`` | -+-----------------------+-----------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`min_filter` | ``9987`` | -+-----------------------+-----------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`wrap_s` | ``10497`` | -+-----------------------+-----------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`wrap_t` | ``10497`` | -+-----------------------+-----------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`mag_filter` | ``9729`` | + +-----------------------+-----------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`min_filter` | ``9987`` | + +-----------------------+-----------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`wrap_s` | ``10497`` | + +-----------------------+-----------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`wrap_t` | ``10497`` | + +-----------------------+-----------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GLTFTextureSampler_property_mag_filter: -- :ref:`int` **mag_filter** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``9729`` | -+-----------+-----------------------+ -| *Setter* | set_mag_filter(value) | -+-----------+-----------------------+ -| *Getter* | get_mag_filter() | -+-----------+-----------------------+ +:ref:`int` **mag_filter** = ``9729`` + +.. rst-class:: classref-property-setget + +- void **set_mag_filter** **(** :ref:`int` value **)** +- :ref:`int` **get_mag_filter** **(** **)** Texture's magnification filter, used when texture appears larger on screen than the source image. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFTextureSampler_property_min_filter: -- :ref:`int` **min_filter** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``9987`` | -+-----------+-----------------------+ -| *Setter* | set_min_filter(value) | -+-----------+-----------------------+ -| *Getter* | get_min_filter() | -+-----------+-----------------------+ +:ref:`int` **min_filter** = ``9987`` + +.. rst-class:: classref-property-setget + +- void **set_min_filter** **(** :ref:`int` value **)** +- :ref:`int` **get_min_filter** **(** **)** Texture's minification filter, used when the texture appears smaller on screen than the source image. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFTextureSampler_property_wrap_s: -- :ref:`int` **wrap_s** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``10497`` | -+-----------+-------------------+ -| *Setter* | set_wrap_s(value) | -+-----------+-------------------+ -| *Getter* | get_wrap_s() | -+-----------+-------------------+ +:ref:`int` **wrap_s** = ``10497`` + +.. rst-class:: classref-property-setget + +- void **set_wrap_s** **(** :ref:`int` value **)** +- :ref:`int` **get_wrap_s** **(** **)** Wrapping mode to use for S-axis (horizontal) texture coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_GLTFTextureSampler_property_wrap_t: -- :ref:`int` **wrap_t** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``10497`` | -+-----------+-------------------+ -| *Setter* | set_wrap_t(value) | -+-----------+-------------------+ -| *Getter* | get_wrap_t() | -+-----------+-------------------+ +:ref:`int` **wrap_t** = ``10497`` + +.. rst-class:: classref-property-setget + +- void **set_wrap_t** **(** :ref:`int` value **)** +- :ref:`int` **get_wrap_t** **(** **)** Wrapping mode to use for T-axis (vertical) texture coordinates. diff --git a/classes/class_godotsharp.rst b/classes/class_godotsharp.rst index 7b0b30853..97c11cb54 100644 --- a/classes/class_godotsharp.rst +++ b/classes/class_godotsharp.rst @@ -14,6 +14,8 @@ GodotSharp Bridge between Godot and the Mono runtime (Mono-enabled builds only). +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,19 +23,32 @@ This class is a bridge between Godot and the Mono runtime. It exposes several lo See also :ref:`CSharpScript`. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_runtime_initialized` **(** **)** | -+-------------------------+-------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_runtime_initialized` **(** **)** | + +-------------------------+-------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GodotSharp_method_is_runtime_initialized: -- :ref:`bool` **is_runtime_initialized** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_runtime_initialized** **(** **)** Returns ``true`` if the .NET runtime is initialized, ``false`` otherwise. diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index 2a91dec3a..89f726558 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -14,13 +14,17 @@ GPUParticles2D 2D particle emitter. +.. rst-class:: classref-introduction-group + Description ----------- -2D particle node used to create a variety of particle systems and effects. ``GPUParticles2D`` features an emitter that generates some number of particles at a given rate. +2D particle node used to create a variety of particle systems and effects. **GPUParticles2D** features an emitter that generates some number of particles at a given rate. Use the ``process_material`` property to add a :ref:`ParticleProcessMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,488 +34,588 @@ Tutorials - `2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player) `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`int` | :ref:`amount` | ``8`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`float` | :ref:`collision_base_size` | ``1.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`DrawOrder` | :ref:`draw_order` | ``1`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`bool` | :ref:`emitting` | ``true`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`float` | :ref:`explosiveness` | ``0.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`int` | :ref:`fixed_fps` | ``30`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`bool` | :ref:`fract_delta` | ``true`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`bool` | :ref:`interpolate` | ``true`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`float` | :ref:`lifetime` | ``1.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`bool` | :ref:`local_coords` | ``false`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`bool` | :ref:`one_shot` | ``false`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`float` | :ref:`preprocess` | ``0.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`Material` | :ref:`process_material` | | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`float` | :ref:`randomness` | ``0.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`float` | :ref:`speed_scale` | ``1.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`NodePath` | :ref:`sub_emitter` | ``NodePath("")`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`bool` | :ref:`trail_enabled` | ``false`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`float` | :ref:`trail_lifetime` | ``0.3`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`int` | :ref:`trail_section_subdivisions` | ``4`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`int` | :ref:`trail_sections` | ``8`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ -| :ref:`Rect2` | :ref:`visibility_rect` | ``Rect2(-100, -100, 200, 200)`` | -+-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`int` | :ref:`amount` | ``8`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`collision_base_size` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`DrawOrder` | :ref:`draw_order` | ``1`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`bool` | :ref:`emitting` | ``true`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`explosiveness` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`int` | :ref:`fixed_fps` | ``30`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`bool` | :ref:`fract_delta` | ``true`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`bool` | :ref:`interpolate` | ``true`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`lifetime` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`bool` | :ref:`local_coords` | ``false`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`bool` | :ref:`one_shot` | ``false`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`preprocess` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`Material` | :ref:`process_material` | | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`randomness` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`NodePath` | :ref:`sub_emitter` | ``NodePath("")`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`bool` | :ref:`trail_enabled` | ``false`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`trail_lifetime` | ``0.3`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`int` | :ref:`trail_section_subdivisions` | ``4`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`int` | :ref:`trail_sections` | ``8`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`Rect2` | :ref:`visibility_rect` | ``Rect2(-100, -100, 200, 200)`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`capture_rect` **(** **)** |const| | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`emit_particle` **(** :ref:`Transform2D` xform, :ref:`Vector2` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`restart` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`capture_rect` **(** **)** |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`emit_particle` **(** :ref:`Transform2D` xform, :ref:`Vector2` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`restart` **(** **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GPUParticles2D_DrawOrder: -.. _class_GPUParticles2D_constant_DRAW_ORDER_INDEX: - -.. _class_GPUParticles2D_constant_DRAW_ORDER_LIFETIME: - -.. _class_GPUParticles2D_constant_DRAW_ORDER_REVERSE_LIFETIME: +.. rst-class:: classref-enumeration enum **DrawOrder**: -- **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted. +.. _class_GPUParticles2D_constant_DRAW_ORDER_INDEX: -- **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime. +.. rst-class:: classref-enumeration-constant -- **DRAW_ORDER_REVERSE_LIFETIME** = **2** +:ref:`DrawOrder` **DRAW_ORDER_INDEX** = ``0`` + +Particles are drawn in the order emitted. + +.. _class_GPUParticles2D_constant_DRAW_ORDER_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` + +Particles are drawn in order of remaining lifetime. + +.. _class_GPUParticles2D_constant_DRAW_ORDER_REVERSE_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_REVERSE_LIFETIME** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_GPUParticles2D_EmitFlags: -.. _class_GPUParticles2D_constant_EMIT_FLAG_POSITION: - -.. _class_GPUParticles2D_constant_EMIT_FLAG_ROTATION_SCALE: - -.. _class_GPUParticles2D_constant_EMIT_FLAG_VELOCITY: - -.. _class_GPUParticles2D_constant_EMIT_FLAG_COLOR: - -.. _class_GPUParticles2D_constant_EMIT_FLAG_CUSTOM: +.. rst-class:: classref-enumeration enum **EmitFlags**: -- **EMIT_FLAG_POSITION** = **1** --- Particle starts at the specified position. +.. _class_GPUParticles2D_constant_EMIT_FLAG_POSITION: -- **EMIT_FLAG_ROTATION_SCALE** = **2** --- Particle starts with specified rotation and scale. +.. rst-class:: classref-enumeration-constant -- **EMIT_FLAG_VELOCITY** = **4** --- Particle starts with the specified velocity vector, which defines the emission direction and speed. +:ref:`EmitFlags` **EMIT_FLAG_POSITION** = ``1`` -- **EMIT_FLAG_COLOR** = **8** --- Particle starts with specified color. +Particle starts at the specified position. -- **EMIT_FLAG_CUSTOM** = **16** --- Particle starts with specified ``CUSTOM`` data. +.. _class_GPUParticles2D_constant_EMIT_FLAG_ROTATION_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_ROTATION_SCALE** = ``2`` + +Particle starts with specified rotation and scale. + +.. _class_GPUParticles2D_constant_EMIT_FLAG_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_VELOCITY** = ``4`` + +Particle starts with the specified velocity vector, which defines the emission direction and speed. + +.. _class_GPUParticles2D_constant_EMIT_FLAG_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_COLOR** = ``8`` + +Particle starts with specified color. + +.. _class_GPUParticles2D_constant_EMIT_FLAG_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_CUSTOM** = ``16`` + +Particle starts with specified ``CUSTOM`` data. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticles2D_property_amount: -- :ref:`int` **amount** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``8`` | -+-----------+-------------------+ -| *Setter* | set_amount(value) | -+-----------+-------------------+ -| *Getter* | get_amount() | -+-----------+-------------------+ +:ref:`int` **amount** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_amount** **(** :ref:`int` value **)** +- :ref:`int` **get_amount** **(** **)** Number of particles emitted in one emission cycle. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_collision_base_size: -- :ref:`float` **collision_base_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------------+ -| *Setter* | set_collision_base_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_collision_base_size() | -+-----------+--------------------------------+ +:ref:`float` **collision_base_size** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_collision_base_size** **(** :ref:`float` value **)** +- :ref:`float` **get_collision_base_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_draw_order: -- :ref:`DrawOrder` **draw_order** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1`` | -+-----------+-----------------------+ -| *Setter* | set_draw_order(value) | -+-----------+-----------------------+ -| *Getter* | get_draw_order() | -+-----------+-----------------------+ +:ref:`DrawOrder` **draw_order** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_draw_order** **(** :ref:`DrawOrder` value **)** +- :ref:`DrawOrder` **get_draw_order** **(** **)** Particle draw order. Uses :ref:`DrawOrder` values. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_emitting: -- :ref:`bool` **emitting** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_emitting(value) | -+-----------+---------------------+ -| *Getter* | is_emitting() | -+-----------+---------------------+ +:ref:`bool` **emitting** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_emitting** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emitting** **(** **)** If ``true``, particles are being emitted. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_explosiveness: -- :ref:`float` **explosiveness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_explosiveness_ratio(value) | -+-----------+--------------------------------+ -| *Getter* | get_explosiveness_ratio() | -+-----------+--------------------------------+ +:ref:`float` **explosiveness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_explosiveness_ratio** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_fixed_fps: -- :ref:`int` **fixed_fps** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``30`` | -+-----------+----------------------+ -| *Setter* | set_fixed_fps(value) | -+-----------+----------------------+ -| *Getter* | get_fixed_fps() | -+-----------+----------------------+ +:ref:`int` **fixed_fps** = ``30`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_fps** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_fract_delta: -- :ref:`bool` **fract_delta** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_fractional_delta(value) | -+-----------+-----------------------------+ -| *Getter* | get_fractional_delta() | -+-----------+-----------------------------+ +:ref:`bool` **fract_delta** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_fractional_delta** **(** :ref:`bool` value **)** +- :ref:`bool` **get_fractional_delta** **(** **)** If ``true``, results in fractional delta calculation which has a smoother particles display effect. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_interpolate: -- :ref:`bool` **interpolate** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_interpolate(value) | -+-----------+------------------------+ -| *Getter* | get_interpolate() | -+-----------+------------------------+ +:ref:`bool` **interpolate** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_interpolate** **(** :ref:`bool` value **)** +- :ref:`bool` **get_interpolate** **(** **)** Enables particle interpolation, which makes the particle movement smoother when their :ref:`fixed_fps` is lower than the screen refresh rate. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_lifetime: -- :ref:`float` **lifetime** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_lifetime(value) | -+-----------+---------------------+ -| *Getter* | get_lifetime() | -+-----------+---------------------+ +:ref:`float` **lifetime** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_lifetime** **(** :ref:`float` value **)** +- :ref:`float` **get_lifetime** **(** **)** Amount of time each particle will exist. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_local_coords: -- :ref:`bool` **local_coords** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_local_coordinates(value) | -+-----------+----------------------------------+ -| *Getter* | get_use_local_coordinates() | -+-----------+----------------------------------+ +:ref:`bool` **local_coords** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_use_local_coordinates** **(** :ref:`bool` value **)** +- :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 **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. + +.. rst-class:: classref-item-separator ---- .. _class_GPUParticles2D_property_one_shot: -- :ref:`bool` **one_shot** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_one_shot(value) | -+-----------+---------------------+ -| *Getter* | get_one_shot() | -+-----------+---------------------+ +:ref:`bool` **one_shot** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_one_shot** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_preprocess: -- :ref:`float` **preprocess** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_pre_process_time(value) | -+-----------+-----------------------------+ -| *Getter* | get_pre_process_time() | -+-----------+-----------------------------+ +:ref:`float` **preprocess** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pre_process_time** **(** :ref:`float` value **)** +- :ref:`float` **get_pre_process_time** **(** **)** Particle system starts as if it had already run for this many seconds. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_process_material: -- :ref:`Material` **process_material** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_process_material(value) | -+----------+-----------------------------+ -| *Getter* | get_process_material() | -+----------+-----------------------------+ +:ref:`Material` **process_material** + +.. rst-class:: classref-property-setget + +- void **set_process_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_process_material** **(** **)** :ref:`Material` for processing particles. Can be a :ref:`ParticleProcessMaterial` or a :ref:`ShaderMaterial`. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_randomness: -- :ref:`float` **randomness** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_randomness_ratio(value) | -+-----------+-----------------------------+ -| *Getter* | get_randomness_ratio() | -+-----------+-----------------------------+ +:ref:`float` **randomness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_randomness_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_randomness_ratio** **(** **)** Emission lifetime randomness ratio. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_speed_scale: -- :ref:`float` **speed_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_speed_scale** **(** **)** Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_sub_emitter: -- :ref:`NodePath` **sub_emitter** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_sub_emitter(value) | -+-----------+------------------------+ -| *Getter* | get_sub_emitter() | -+-----------+------------------------+ +:ref:`NodePath` **sub_emitter** = ``NodePath("")`` -The :ref:`NodePath` to the ``GPUParticles2D`` used for sub-emissions. +.. rst-class:: classref-property-setget + +- void **set_sub_emitter** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_sub_emitter** **(** **)** + +The :ref:`NodePath` to the **GPUParticles2D** used for sub-emissions. + +.. rst-class:: classref-item-separator ---- .. _class_GPUParticles2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** Particle texture. If ``null``, particles will be squares. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_trail_enabled: -- :ref:`bool` **trail_enabled** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_trail_enabled(value) | -+-----------+--------------------------+ -| *Getter* | is_trail_enabled() | -+-----------+--------------------------+ +:ref:`bool` **trail_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_trail_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_trail_enabled** **(** **)** If ``true``, enables particle trails using a mesh skinning system. \ **Note:** Unlike :ref:`GPUParticles3D`, the number of trail sections and subdivisions is set with the :ref:`trail_sections` and :ref:`trail_section_subdivisions` properties. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_trail_lifetime: -- :ref:`float` **trail_lifetime** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.3`` | -+-----------+---------------------------+ -| *Setter* | set_trail_lifetime(value) | -+-----------+---------------------------+ -| *Getter* | get_trail_lifetime() | -+-----------+---------------------------+ +:ref:`float` **trail_lifetime** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_trail_lifetime** **(** :ref:`float` value **)** +- :ref:`float` **get_trail_lifetime** **(** **)** The amount of time the particle's trail should represent (in seconds). Only effective if :ref:`trail_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_trail_section_subdivisions: -- :ref:`int` **trail_section_subdivisions** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``4`` | -+-----------+---------------------------------------+ -| *Setter* | set_trail_section_subdivisions(value) | -+-----------+---------------------------------------+ -| *Getter* | get_trail_section_subdivisions() | -+-----------+---------------------------------------+ +:ref:`int` **trail_section_subdivisions** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_trail_section_subdivisions** **(** :ref:`int` value **)** +- :ref:`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`. Only effective if :ref:`trail_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_trail_sections: -- :ref:`int` **trail_sections** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``8`` | -+-----------+---------------------------+ -| *Setter* | set_trail_sections(value) | -+-----------+---------------------------+ -| *Getter* | get_trail_sections() | -+-----------+---------------------------+ +:ref:`int` **trail_sections** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_trail_sections** **(** :ref:`int` value **)** +- :ref:`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`. Only effective if :ref:`trail_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_property_visibility_rect: -- :ref:`Rect2` **visibility_rect** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``Rect2(-100, -100, 200, 200)`` | -+-----------+---------------------------------+ -| *Setter* | set_visibility_rect(value) | -+-----------+---------------------------------+ -| *Getter* | get_visibility_rect() | -+-----------+---------------------------------+ +:ref:`Rect2` **visibility_rect** = ``Rect2(-100, -100, 200, 200)`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_rect** **(** :ref:`Rect2` value **)** +- :ref:`Rect2` **get_visibility_rect** **(** **)** The :ref:`Rect2` that determines the node's region which needs to be visible on screen for the particle system to be active. Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The :ref:`Rect2` can be grown via code or with the **Particles → Generate Visibility Rect** editor tool. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_GPUParticles2D_method_capture_rect: -- :ref:`Rect2` **capture_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **capture_rect** **(** **)** |const| Returns a rectangle containing the positions of all existing particles. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_method_emit_particle: -- void **emit_particle** **(** :ref:`Transform2D` xform, :ref:`Vector2` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** +.. rst-class:: classref-method + +void **emit_particle** **(** :ref:`Transform2D` xform, :ref:`Vector2` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags`. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles2D_method_restart: -- void **restart** **(** **)** +.. rst-class:: classref-method + +void **restart** **(** **)** Restarts all the existing particles. diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index e36e8d1ed..237610732 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -14,13 +14,17 @@ GPUParticles3D 3D particle emitter. +.. rst-class:: classref-introduction-group + 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. +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` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,516 +32,643 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`int` | :ref:`amount` | ``8`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`float` | :ref:`collision_base_size` | ``0.01`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`Mesh` | :ref:`draw_pass_1` | | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`Mesh` | :ref:`draw_pass_2` | | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`Mesh` | :ref:`draw_pass_3` | | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`Mesh` | :ref:`draw_pass_4` | | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`int` | :ref:`draw_passes` | ``1`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`Skin` | :ref:`draw_skin` | | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`bool` | :ref:`emitting` | ``true`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`float` | :ref:`explosiveness` | ``0.0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`int` | :ref:`fixed_fps` | ``30`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`bool` | :ref:`fract_delta` | ``true`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`bool` | :ref:`interpolate` | ``true`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`float` | :ref:`lifetime` | ``1.0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`bool` | :ref:`local_coords` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`bool` | :ref:`one_shot` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`float` | :ref:`preprocess` | ``0.0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`Material` | :ref:`process_material` | | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`float` | :ref:`randomness` | ``0.0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`float` | :ref:`speed_scale` | ``1.0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`NodePath` | :ref:`sub_emitter` | ``NodePath("")`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`bool` | :ref:`trail_enabled` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`float` | :ref:`trail_lifetime` | ``0.3`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`TransformAlign` | :ref:`transform_align` | ``0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ -| :ref:`AABB` | :ref:`visibility_aabb` | ``AABB(-4, -4, -4, 8, 8, 8)`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`int` | :ref:`amount` | ``8`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`collision_base_size` | ``0.01`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Mesh` | :ref:`draw_pass_1` | | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Mesh` | :ref:`draw_pass_2` | | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Mesh` | :ref:`draw_pass_3` | | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Mesh` | :ref:`draw_pass_4` | | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`int` | :ref:`draw_passes` | ``1`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Skin` | :ref:`draw_skin` | | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`bool` | :ref:`emitting` | ``true`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`explosiveness` | ``0.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`int` | :ref:`fixed_fps` | ``30`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`bool` | :ref:`fract_delta` | ``true`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`bool` | :ref:`interpolate` | ``true`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`lifetime` | ``1.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`bool` | :ref:`local_coords` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`bool` | :ref:`one_shot` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`preprocess` | ``0.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Material` | :ref:`process_material` | | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`randomness` | ``0.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`NodePath` | :ref:`sub_emitter` | ``NodePath("")`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`bool` | :ref:`trail_enabled` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`trail_lifetime` | ``0.3`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`TransformAlign` | :ref:`transform_align` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`AABB` | :ref:`visibility_aabb` | ``AABB(-4, -4, -4, 8, 8, 8)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`capture_aabb` **(** **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`emit_particle` **(** :ref:`Transform3D` xform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`get_draw_pass_mesh` **(** :ref:`int` pass **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`restart` **(** **)** | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_draw_pass_mesh` **(** :ref:`int` pass, :ref:`Mesh` mesh **)** | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`capture_aabb` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`emit_particle` **(** :ref:`Transform3D` xform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`get_draw_pass_mesh` **(** :ref:`int` pass **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`restart` **(** **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_draw_pass_mesh` **(** :ref:`int` pass, :ref:`Mesh` mesh **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GPUParticles3D_DrawOrder: -.. _class_GPUParticles3D_constant_DRAW_ORDER_INDEX: - -.. _class_GPUParticles3D_constant_DRAW_ORDER_LIFETIME: - -.. _class_GPUParticles3D_constant_DRAW_ORDER_REVERSE_LIFETIME: - -.. _class_GPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: +.. rst-class:: classref-enumeration enum **DrawOrder**: -- **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted. +.. _class_GPUParticles3D_constant_DRAW_ORDER_INDEX: -- **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime. +.. rst-class:: classref-enumeration-constant -- **DRAW_ORDER_REVERSE_LIFETIME** = **2** +:ref:`DrawOrder` **DRAW_ORDER_INDEX** = ``0`` -- **DRAW_ORDER_VIEW_DEPTH** = **3** --- Particles are drawn in order of depth. +Particles are drawn in the order emitted. + +.. _class_GPUParticles3D_constant_DRAW_ORDER_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` + +Particles are drawn in order of remaining lifetime. + +.. _class_GPUParticles3D_constant_DRAW_ORDER_REVERSE_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_REVERSE_LIFETIME** = ``2`` + + + +.. _class_GPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawOrder` **DRAW_ORDER_VIEW_DEPTH** = ``3`` + +Particles are drawn in order of depth. + +.. rst-class:: classref-item-separator ---- .. _enum_GPUParticles3D_EmitFlags: -.. _class_GPUParticles3D_constant_EMIT_FLAG_POSITION: - -.. _class_GPUParticles3D_constant_EMIT_FLAG_ROTATION_SCALE: - -.. _class_GPUParticles3D_constant_EMIT_FLAG_VELOCITY: - -.. _class_GPUParticles3D_constant_EMIT_FLAG_COLOR: - -.. _class_GPUParticles3D_constant_EMIT_FLAG_CUSTOM: +.. rst-class:: classref-enumeration enum **EmitFlags**: -- **EMIT_FLAG_POSITION** = **1** --- Particle starts at the specified position. +.. _class_GPUParticles3D_constant_EMIT_FLAG_POSITION: -- **EMIT_FLAG_ROTATION_SCALE** = **2** --- Particle starts with specified rotation and scale. +.. rst-class:: classref-enumeration-constant -- **EMIT_FLAG_VELOCITY** = **4** --- Particle starts with the specified velocity vector, which defines the emission direction and speed. +:ref:`EmitFlags` **EMIT_FLAG_POSITION** = ``1`` -- **EMIT_FLAG_COLOR** = **8** --- Particle starts with specified color. +Particle starts at the specified position. -- **EMIT_FLAG_CUSTOM** = **16** --- Particle starts with specified ``CUSTOM`` data. +.. _class_GPUParticles3D_constant_EMIT_FLAG_ROTATION_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_ROTATION_SCALE** = ``2`` + +Particle starts with specified rotation and scale. + +.. _class_GPUParticles3D_constant_EMIT_FLAG_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_VELOCITY** = ``4`` + +Particle starts with the specified velocity vector, which defines the emission direction and speed. + +.. _class_GPUParticles3D_constant_EMIT_FLAG_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_COLOR** = ``8`` + +Particle starts with specified color. + +.. _class_GPUParticles3D_constant_EMIT_FLAG_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_CUSTOM** = ``16`` + +Particle starts with specified ``CUSTOM`` data. + +.. rst-class:: classref-item-separator ---- .. _enum_GPUParticles3D_TransformAlign: -.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_DISABLED: - -.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD: - -.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Y_TO_VELOCITY: - -.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: +.. rst-class:: classref-enumeration enum **TransformAlign**: -- **TRANSFORM_ALIGN_DISABLED** = **0** +.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_DISABLED: -- **TRANSFORM_ALIGN_Z_BILLBOARD** = **1** +.. rst-class:: classref-enumeration-constant -- **TRANSFORM_ALIGN_Y_TO_VELOCITY** = **2** +:ref:`TransformAlign` **TRANSFORM_ALIGN_DISABLED** = ``0`` -- **TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY** = **3** + + +.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformAlign` **TRANSFORM_ALIGN_Z_BILLBOARD** = ``1`` + + + +.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Y_TO_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformAlign` **TRANSFORM_ALIGN_Y_TO_VELOCITY** = ``2`` + + + +.. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformAlign` **TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY** = ``3`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_GPUParticles3D_constant_MAX_DRAW_PASSES: -- **MAX_DRAW_PASSES** = **4** --- Maximum number of draw passes supported. +.. rst-class:: classref-constant + +**MAX_DRAW_PASSES** = ``4`` + +Maximum number of draw passes supported. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticles3D_property_amount: -- :ref:`int` **amount** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``8`` | -+-----------+-------------------+ -| *Setter* | set_amount(value) | -+-----------+-------------------+ -| *Getter* | get_amount() | -+-----------+-------------------+ +:ref:`int` **amount** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_amount** **(** :ref:`int` value **)** +- :ref:`int` **get_amount** **(** **)** Number of particles to emit. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_collision_base_size: -- :ref:`float` **collision_base_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------------------+ -| *Setter* | set_collision_base_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_collision_base_size() | -+-----------+--------------------------------+ +:ref:`float` **collision_base_size** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_collision_base_size** **(** :ref:`float` value **)** +- :ref:`float` **get_collision_base_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_draw_order: -- :ref:`DrawOrder` **draw_order** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_draw_order(value) | -+-----------+-----------------------+ -| *Getter* | get_draw_order() | -+-----------+-----------------------+ +:ref:`DrawOrder` **draw_order** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_draw_order** **(** :ref:`DrawOrder` value **)** +- :ref:`DrawOrder` **get_draw_order** **(** **)** Particle draw order. Uses :ref:`DrawOrder` values. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_draw_pass_1: -- :ref:`Mesh` **draw_pass_1** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_draw_pass_mesh(value) | -+----------+---------------------------+ -| *Getter* | get_draw_pass_mesh() | -+----------+---------------------------+ +:ref:`Mesh` **draw_pass_1** + +.. rst-class:: classref-property-setget + +- void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` mesh **)** +- :ref:`Mesh` **get_draw_pass_mesh** **(** :ref:`int` pass **)** |const| :ref:`Mesh` that is drawn for the first draw pass. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_draw_pass_2: -- :ref:`Mesh` **draw_pass_2** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_draw_pass_mesh(value) | -+----------+---------------------------+ -| *Getter* | get_draw_pass_mesh() | -+----------+---------------------------+ +:ref:`Mesh` **draw_pass_2** + +.. rst-class:: classref-property-setget + +- void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` mesh **)** +- :ref:`Mesh` **get_draw_pass_mesh** **(** :ref:`int` pass **)** |const| :ref:`Mesh` that is drawn for the second draw pass. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_draw_pass_3: -- :ref:`Mesh` **draw_pass_3** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_draw_pass_mesh(value) | -+----------+---------------------------+ -| *Getter* | get_draw_pass_mesh() | -+----------+---------------------------+ +:ref:`Mesh` **draw_pass_3** + +.. rst-class:: classref-property-setget + +- void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` mesh **)** +- :ref:`Mesh` **get_draw_pass_mesh** **(** :ref:`int` pass **)** |const| :ref:`Mesh` that is drawn for the third draw pass. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_draw_pass_4: -- :ref:`Mesh` **draw_pass_4** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_draw_pass_mesh(value) | -+----------+---------------------------+ -| *Getter* | get_draw_pass_mesh() | -+----------+---------------------------+ +:ref:`Mesh` **draw_pass_4** + +.. rst-class:: classref-property-setget + +- void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` mesh **)** +- :ref:`Mesh` **get_draw_pass_mesh** **(** :ref:`int` pass **)** |const| :ref:`Mesh` that is drawn for the fourth draw pass. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_draw_passes: -- :ref:`int` **draw_passes** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_draw_passes(value) | -+-----------+------------------------+ -| *Getter* | get_draw_passes() | -+-----------+------------------------+ +:ref:`int` **draw_passes** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_draw_passes** **(** :ref:`int` value **)** +- :ref:`int` **get_draw_passes** **(** **)** The number of draw passes when rendering particles. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_draw_skin: -- :ref:`Skin` **draw_skin** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_skin(value) | -+----------+-----------------+ -| *Getter* | get_skin() | -+----------+-----------------+ +:ref:`Skin` **draw_skin** + +.. rst-class:: classref-property-setget + +- void **set_skin** **(** :ref:`Skin` value **)** +- :ref:`Skin` **get_skin** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_emitting: -- :ref:`bool` **emitting** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_emitting(value) | -+-----------+---------------------+ -| *Getter* | is_emitting() | -+-----------+---------------------+ +:ref:`bool` **emitting** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_emitting** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emitting** **(** **)** If ``true``, particles are being emitted. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_explosiveness: -- :ref:`float` **explosiveness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_explosiveness_ratio(value) | -+-----------+--------------------------------+ -| *Getter* | get_explosiveness_ratio() | -+-----------+--------------------------------+ +:ref:`float` **explosiveness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_explosiveness_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_explosiveness_ratio** **(** **)** Time ratio between each emission. If ``0``, particles are emitted continuously. If ``1``, all particles are emitted simultaneously. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_fixed_fps: -- :ref:`int` **fixed_fps** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``30`` | -+-----------+----------------------+ -| *Setter* | set_fixed_fps(value) | -+-----------+----------------------+ -| *Getter* | get_fixed_fps() | -+-----------+----------------------+ +:ref:`int` **fixed_fps** = ``30`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_fps** **(** :ref:`int` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_fract_delta: -- :ref:`bool` **fract_delta** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_fractional_delta(value) | -+-----------+-----------------------------+ -| *Getter* | get_fractional_delta() | -+-----------+-----------------------------+ +:ref:`bool` **fract_delta** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_fractional_delta** **(** :ref:`bool` value **)** +- :ref:`bool` **get_fractional_delta** **(** **)** If ``true``, results in fractional delta calculation which has a smoother particles display effect. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_interpolate: -- :ref:`bool` **interpolate** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_interpolate(value) | -+-----------+------------------------+ -| *Getter* | get_interpolate() | -+-----------+------------------------+ +:ref:`bool` **interpolate** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_interpolate** **(** :ref:`bool` value **)** +- :ref:`bool` **get_interpolate** **(** **)** Enables particle interpolation, which makes the particle movement smoother when their :ref:`fixed_fps` is lower than the screen refresh rate. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_lifetime: -- :ref:`float` **lifetime** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_lifetime(value) | -+-----------+---------------------+ -| *Getter* | get_lifetime() | -+-----------+---------------------+ +:ref:`float` **lifetime** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_lifetime** **(** :ref:`float` value **)** +- :ref:`float` **get_lifetime** **(** **)** Amount of time each particle will exist. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_local_coords: -- :ref:`bool` **local_coords** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_local_coordinates(value) | -+-----------+----------------------------------+ -| *Getter* | get_use_local_coordinates() | -+-----------+----------------------------------+ +:ref:`bool` **local_coords** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_use_local_coordinates** **(** :ref:`bool` value **)** +- :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 **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. + +.. rst-class:: classref-item-separator ---- .. _class_GPUParticles3D_property_one_shot: -- :ref:`bool` **one_shot** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_one_shot(value) | -+-----------+---------------------+ -| *Getter* | get_one_shot() | -+-----------+---------------------+ +:ref:`bool` **one_shot** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_one_shot** **(** :ref:`bool` value **)** +- :ref:`bool` **get_one_shot** **(** **)** If ``true``, only ``amount`` particles will be emitted. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_preprocess: -- :ref:`float` **preprocess** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_pre_process_time(value) | -+-----------+-----------------------------+ -| *Getter* | get_pre_process_time() | -+-----------+-----------------------------+ +:ref:`float` **preprocess** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pre_process_time** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_process_material: -- :ref:`Material` **process_material** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_process_material(value) | -+----------+-----------------------------+ -| *Getter* | get_process_material() | -+----------+-----------------------------+ +:ref:`Material` **process_material** + +.. rst-class:: classref-property-setget + +- void **set_process_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_process_material** **(** **)** :ref:`Material` for processing particles. Can be a :ref:`ParticleProcessMaterial` or a :ref:`ShaderMaterial`. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_randomness: -- :ref:`float` **randomness** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_randomness_ratio(value) | -+-----------+-----------------------------+ -| *Getter* | get_randomness_ratio() | -+-----------+-----------------------------+ +:ref:`float` **randomness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_randomness_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_randomness_ratio** **(** **)** Emission randomness ratio. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_speed_scale: -- :ref:`float` **speed_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_speed_scale(value) | -+-----------+------------------------+ -| *Getter* | get_speed_scale() | -+-----------+------------------------+ +:ref:`float` **speed_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_speed_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_speed_scale** **(** **)** Speed scaling ratio. A value of ``0`` can be used to pause the particles. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_sub_emitter: -- :ref:`NodePath` **sub_emitter** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_sub_emitter(value) | -+-----------+------------------------+ -| *Getter* | get_sub_emitter() | -+-----------+------------------------+ +:ref:`NodePath` **sub_emitter** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_sub_emitter** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_sub_emitter** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_trail_enabled: -- :ref:`bool` **trail_enabled** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_trail_enabled(value) | -+-----------+--------------------------+ -| *Getter* | is_trail_enabled() | -+-----------+--------------------------+ +:ref:`bool` **trail_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_trail_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_trail_enabled** **(** **)** If ``true``, enables particle trails using a mesh skinning system. Designed to work with :ref:`RibbonTrailMesh` and :ref:`TubeTrailMesh`. @@ -545,96 +676,123 @@ If ``true``, enables particle trails using a mesh skinning system. Designed to w \ **Note:** Unlike :ref:`GPUParticles2D`, the number of trail sections and subdivisions is set in the :ref:`RibbonTrailMesh` or the :ref:`TubeTrailMesh`'s properties. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_trail_lifetime: -- :ref:`float` **trail_lifetime** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.3`` | -+-----------+---------------------------+ -| *Setter* | set_trail_lifetime(value) | -+-----------+---------------------------+ -| *Getter* | get_trail_lifetime() | -+-----------+---------------------------+ +:ref:`float` **trail_lifetime** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_trail_lifetime** **(** :ref:`float` value **)** +- :ref:`float` **get_trail_lifetime** **(** **)** The amount of time the particle's trail should represent (in seconds). Only effective if :ref:`trail_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_transform_align: -- :ref:`TransformAlign` **transform_align** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_transform_align(value) | -+-----------+----------------------------+ -| *Getter* | get_transform_align() | -+-----------+----------------------------+ +:ref:`TransformAlign` **transform_align** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_transform_align** **(** :ref:`TransformAlign` value **)** +- :ref:`TransformAlign` **get_transform_align** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_property_visibility_aabb: -- :ref:`AABB` **visibility_aabb** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``AABB(-4, -4, -4, 8, 8, 8)`` | -+-----------+-------------------------------+ -| *Setter* | set_visibility_aabb(value) | -+-----------+-------------------------------+ -| *Getter* | get_visibility_aabb() | -+-----------+-------------------------------+ +:ref:`AABB` **visibility_aabb** = ``AABB(-4, -4, -4, 8, 8, 8)`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_aabb** **(** :ref:`AABB` value **)** +- :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 + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_GPUParticles3D_method_capture_aabb: -- :ref:`AABB` **capture_aabb** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **capture_aabb** **(** **)** |const| Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_method_emit_particle: -- void **emit_particle** **(** :ref:`Transform3D` xform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** +.. rst-class:: classref-method + +void **emit_particle** **(** :ref:`Transform3D` xform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` flags **)** Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags`. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_method_get_draw_pass_mesh: -- :ref:`Mesh` **get_draw_pass_mesh** **(** :ref:`int` pass **)** |const| +.. rst-class:: classref-method + +:ref:`Mesh` **get_draw_pass_mesh** **(** :ref:`int` pass **)** |const| Returns the :ref:`Mesh` that is drawn at index ``pass``. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_method_restart: -- void **restart** **(** **)** +.. rst-class:: classref-method + +void **restart** **(** **)** Restarts the particle emission, clearing existing particles. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticles3D_method_set_draw_pass_mesh: -- void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` mesh **)** +.. rst-class:: classref-method + +void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` mesh **)** Sets the :ref:`Mesh` that is drawn at index ``pass``. diff --git a/classes/class_gpuparticlesattractor3d.rst b/classes/class_gpuparticlesattractor3d.rst index c66b6349a..b6e7014ad 100644 --- a/classes/class_gpuparticlesattractor3d.rst +++ b/classes/class_gpuparticlesattractor3d.rst @@ -16,6 +16,8 @@ GPUParticlesAttractor3D Abstract class for 3D particle attractors affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,49 +29,60 @@ Attractors can be temporarily disabled by hiding them, or by setting their :ref: \ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`attenuation` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------+----------------+ -| :ref:`int` | :ref:`cull_mask` | ``4294967295`` | -+---------------------------+------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`directionality` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`strength` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------+----------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`attenuation` | ``1.0`` | + +---------------------------+------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`cull_mask` | ``4294967295`` | + +---------------------------+------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`directionality` | ``0.0`` | + +---------------------------+------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`strength` | ``1.0`` | + +---------------------------+------------------------------------------------------------------------------+----------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesAttractor3D_property_attenuation: -- :ref:`float` **attenuation** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_attenuation(value) | -+-----------+------------------------+ -| *Getter* | get_attenuation() | -+-----------+------------------------+ +:ref:`float` **attenuation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_attenuation** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesAttractor3D_property_cull_mask: -- :ref:`int` **cull_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4294967295`` | -+-----------+----------------------+ -| *Setter* | set_cull_mask(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mask() | -+-----------+----------------------+ +:ref:`int` **cull_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_cull_mask** **(** **)** The particle rendering layers (:ref:`VisualInstance3D.layers`) that will be affected by the attractor. By default, all particles are affected by an attractor. @@ -77,37 +90,39 @@ After configuring particle nodes accordingly, specific layers can be unchecked t Particle attraction can also be disabled on a per-process material basis by setting :ref:`ParticleProcessMaterial.attractor_interaction_enabled` on the :ref:`GPUParticles3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesAttractor3D_property_directionality: -- :ref:`float` **directionality** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------+ -| *Setter* | set_directionality(value) | -+-----------+---------------------------+ -| *Getter* | get_directionality() | -+-----------+---------------------------+ +:ref:`float` **directionality** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_directionality** **(** :ref:`float` value **)** +- :ref:`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` is negative). -\ **Note:** If :ref:`directionality` is greater than ``0.0``, the direction in which particles are pushed can be changed by rotating the ``GPUParticlesAttractor3D`` node. +\ **Note:** If :ref:`directionality` is greater than ``0.0``, the direction in which particles are pushed can be changed by rotating the **GPUParticlesAttractor3D** node. + +.. rst-class:: classref-item-separator ---- .. _class_GPUParticlesAttractor3D_property_strength: -- :ref:`float` **strength** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_strength(value) | -+-----------+---------------------+ -| *Getter* | get_strength() | -+-----------+---------------------+ +:ref:`float` **strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_strength** **(** :ref:`float` value **)** +- :ref:`float` **get_strength** **(** **)** If :ref:`strength` is negative, particles will be pushed in the reverse direction. Particles will be pushed *away* from the attractor's origin if :ref:`directionality` is ``0.0``, or towards local +Z if :ref:`directionality` is greater than ``0.0``. diff --git a/classes/class_gpuparticlesattractorbox3d.rst b/classes/class_gpuparticlesattractorbox3d.rst index 97e31bfde..56b8ec6de 100644 --- a/classes/class_gpuparticlesattractorbox3d.rst +++ b/classes/class_gpuparticlesattractorbox3d.rst @@ -14,6 +14,8 @@ GPUParticlesAttractorBox3D Box-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,27 +23,37 @@ Box-shaped 3D particle attractor affecting :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+-------------------------------+-------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | + +-------------------------------+-------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesAttractorBox3D_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_extents(value) | -+-----------+----------------------+ -| *Getter* | get_extents() | -+-----------+----------------------+ +:ref:`Vector3` **extents** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** The attractor box's extents in 3D units. diff --git a/classes/class_gpuparticlesattractorsphere3d.rst b/classes/class_gpuparticlesattractorsphere3d.rst index 1a8743a52..04eb7cfbd 100644 --- a/classes/class_gpuparticlesattractorsphere3d.rst +++ b/classes/class_gpuparticlesattractorsphere3d.rst @@ -14,6 +14,8 @@ GPUParticlesAttractorSphere3D Ellipse-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,31 +23,41 @@ Ellipse-shaped 3D particle attractor affecting :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | -+---------------------------+--------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +---------------------------+--------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesAttractorSphere3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The attractor sphere's radius in 3D units. -\ **Note:** Stretched ellipses can be obtained by using non-uniform scaling on the ``GPUParticlesAttractorSphere3D`` node. +\ **Note:** Stretched ellipses can be obtained by using non-uniform scaling on the **GPUParticlesAttractorSphere3D** 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.)` diff --git a/classes/class_gpuparticlesattractorvectorfield3d.rst b/classes/class_gpuparticlesattractorvectorfield3d.rst index 12313cf1e..2d9d0b50f 100644 --- a/classes/class_gpuparticlesattractorvectorfield3d.rst +++ b/classes/class_gpuparticlesattractorvectorfield3d.rst @@ -14,52 +14,67 @@ GPUParticlesAttractorVectorField3D Box-shaped 3D particle attractor with strength varying within the box, affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- Box-shaped 3D particle attractor with strength varying within the box, affecting :ref:`GPUParticles3D` nodes. -Unlike :ref:`GPUParticlesAttractorBox3D`, ``GPUParticlesAttractorVectorField3D`` uses a :ref:`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. +Unlike :ref:`GPUParticlesAttractorBox3D`, **GPUParticlesAttractorVectorField3D** uses a :ref:`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. \ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+---------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+-----------------------------------+---------------------------------------------------------------------------+----------------------+ -| :ref:`Texture3D` | :ref:`texture` | | -+-----------------------------------+---------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | + +-----------------------------------+---------------------------------------------------------------------------+----------------------+ + | :ref:`Texture3D` | :ref:`texture` | | + +-----------------------------------+---------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesAttractorVectorField3D_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_extents(value) | -+-----------+----------------------+ -| *Getter* | get_extents() | -+-----------+----------------------+ +:ref:`Vector3` **extents** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** The extents of the vector field box in 3D units. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesAttractorVectorField3D_property_texture: -- :ref:`Texture3D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture3D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture3D` value **)** +- :ref:`Texture3D` **get_texture** **(** **)** The 3D texture to be used. Values are linearly interpolated between the texture's pixels. diff --git a/classes/class_gpuparticlescollision3d.rst b/classes/class_gpuparticlescollision3d.rst index 7fd95081b..feaf8a6c2 100644 --- a/classes/class_gpuparticlescollision3d.rst +++ b/classes/class_gpuparticlescollision3d.rst @@ -16,6 +16,8 @@ GPUParticlesCollision3D Abstract class for 3D particle collision shapes affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -31,27 +33,37 @@ Particle collision shapes can be temporarily disabled by hiding them. \ **Note:** Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting :ref:`GPUParticles3D.fixed_fps` to ``0`` or a value that matches or exceeds the target framerate. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+--------------------------------------------------------------------+----------------+ -| :ref:`int` | :ref:`cull_mask` | ``4294967295`` | -+-----------------------+--------------------------------------------------------------------+----------------+ +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`cull_mask` | ``4294967295`` | + +-----------------------+--------------------------------------------------------------------+----------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesCollision3D_property_cull_mask: -- :ref:`int` **cull_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4294967295`` | -+-----------+----------------------+ -| *Setter* | set_cull_mask(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mask() | -+-----------+----------------------+ +:ref:`int` **cull_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_cull_mask** **(** **)** The particle rendering layers (:ref:`VisualInstance3D.layers`) that will be affected by the collision shape. By default, all particles that have :ref:`ParticleProcessMaterial.collision_mode` set to :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` will be affected by a collision shape. diff --git a/classes/class_gpuparticlescollisionbox3d.rst b/classes/class_gpuparticlescollisionbox3d.rst index e1df23ed1..f5edad27b 100644 --- a/classes/class_gpuparticlescollisionbox3d.rst +++ b/classes/class_gpuparticlescollisionbox3d.rst @@ -14,6 +14,8 @@ GPUParticlesCollisionBox3D Box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,27 +25,37 @@ Box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+-------------------------------+-------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | + +-------------------------------+-------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesCollisionBox3D_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_extents(value) | -+-----------+----------------------+ -| *Getter* | get_extents() | -+-----------+----------------------+ +:ref:`Vector3` **extents** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** The collision box's extents in 3D units. diff --git a/classes/class_gpuparticlescollisionheightfield3d.rst b/classes/class_gpuparticlescollisionheightfield3d.rst index a4d315b84..05b3ad8ce 100644 --- a/classes/class_gpuparticlescollisionheightfield3d.rst +++ b/classes/class_gpuparticlescollisionheightfield3d.rst @@ -14,6 +14,8 @@ GPUParticlesCollisionHeightField3D Real-time heightmap-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,138 +23,199 @@ Real-time heightmap-shaped 3D particle attractor affecting :ref:`GPUParticles3D< 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`, 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, since heightmaps cannot represent overhangs, **GPUParticlesCollisionHeightField3D** is not suited for indoor particle collision. \ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. \ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`follow_camera_enabled` | ``false`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Resolution` | :ref:`resolution` | ``2`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`UpdateMode` | :ref:`update_mode` | ``0`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`follow_camera_enabled` | ``false`` | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Resolution` | :ref:`resolution` | ``2`` | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`UpdateMode` | :ref:`update_mode` | ``0`` | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GPUParticlesCollisionHeightField3D_Resolution: -.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_256: - -.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_512: - -.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_1024: - -.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_2048: - -.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_4096: - -.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_8192: - -.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_MAX: +.. rst-class:: classref-enumeration enum **Resolution**: -- **RESOLUTION_256** = **0** --- Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. +.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_256: -- **RESOLUTION_512** = **1** --- Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. +.. rst-class:: classref-enumeration-constant -- **RESOLUTION_1024** = **2** --- Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. +:ref:`Resolution` **RESOLUTION_256** = ``0`` -- **RESOLUTION_2048** = **3** --- Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. +Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. -- **RESOLUTION_4096** = **4** --- Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. +.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_512: -- **RESOLUTION_8192** = **5** --- Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. +.. rst-class:: classref-enumeration-constant -- **RESOLUTION_MAX** = **6** --- Represents the size of the :ref:`Resolution` enum. +:ref:`Resolution` **RESOLUTION_512** = ``1`` + +Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. + +.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_1024: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_1024** = ``2`` + +Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. + +.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_2048: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_2048** = ``3`` + +Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. + +.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_4096: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_4096** = ``4`` + +Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. + +.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_8192: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_8192** = ``5`` + +Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. + +.. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_MAX** = ``6`` + +Represents the size of the :ref:`Resolution` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_GPUParticlesCollisionHeightField3D_UpdateMode: -.. _class_GPUParticlesCollisionHeightField3D_constant_UPDATE_MODE_WHEN_MOVED: - -.. _class_GPUParticlesCollisionHeightField3D_constant_UPDATE_MODE_ALWAYS: +.. rst-class:: classref-enumeration enum **UpdateMode**: -- **UPDATE_MODE_WHEN_MOVED** = **0** --- Only update the heightmap when the ``GPUParticlesCollisionHeightField3D`` node is moved, or when the camera moves if :ref:`follow_camera_enabled` is ``true``. An update can be forced by slightly moving the ``GPUParticlesCollisionHeightField3D`` in any direction. +.. _class_GPUParticlesCollisionHeightField3D_constant_UPDATE_MODE_WHEN_MOVED: -- **UPDATE_MODE_ALWAYS** = **1** --- Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_MODE_WHEN_MOVED** = ``0`` + +Only update the heightmap when the **GPUParticlesCollisionHeightField3D** node is moved, or when the camera moves if :ref:`follow_camera_enabled` is ``true``. An update can be forced by slightly moving the **GPUParticlesCollisionHeightField3D** in any direction. + +.. _class_GPUParticlesCollisionHeightField3D_constant_UPDATE_MODE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_MODE_ALWAYS** = ``1`` + +Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesCollisionHeightField3D_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_extents(value) | -+-----------+----------------------+ -| *Getter* | get_extents() | -+-----------+----------------------+ +:ref:`Vector3` **extents** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** The collision heightmap's extents in 3D units. To improve heightmap quality, :ref:`extents` should be set as small as possible while covering the parts of the scene you need. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionHeightField3D_property_follow_camera_enabled: -- :ref:`bool` **follow_camera_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_follow_camera_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_follow_camera_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **follow_camera_enabled** = ``false`` -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` node for this to work. +.. rst-class:: classref-property-setget + +- void **set_follow_camera_enabled** **(** :ref:`bool` value **)** +- :ref:`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` node for this to work. Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering :ref:`resolution` to improve performance if :ref:`follow_camera_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionHeightField3D_property_resolution: -- :ref:`Resolution` **resolution** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``2`` | -+-----------+-----------------------+ -| *Setter* | set_resolution(value) | -+-----------+-----------------------+ -| *Getter* | get_resolution() | -+-----------+-----------------------+ +:ref:`Resolution` **resolution** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_resolution** **(** :ref:`Resolution` value **)** +- :ref:`Resolution` **get_resolution** **(** **)** Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If :ref:`update_mode` is :ref:`UPDATE_MODE_ALWAYS`, consider using the lowest resolution possible. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionHeightField3D_property_update_mode: -- :ref:`UpdateMode` **update_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_update_mode(value) | -+-----------+------------------------+ -| *Getter* | get_update_mode() | -+-----------+------------------------+ +:ref:`UpdateMode` **update_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_update_mode** **(** :ref:`UpdateMode` value **)** +- :ref:`UpdateMode` **get_update_mode** **(** **)** The update policy to use for the generated heightmap. diff --git a/classes/class_gpuparticlescollisionsdf3d.rst b/classes/class_gpuparticlescollisionsdf3d.rst index d618934bf..83ec31f0e 100644 --- a/classes/class_gpuparticlescollisionsdf3d.rst +++ b/classes/class_gpuparticlescollisionsdf3d.rst @@ -14,6 +14,8 @@ GPUParticlesCollisionSDF3D Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,166 +23,235 @@ Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D 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`, but it requires a baking step. -\ **Baking:** The signed distance field texture can be baked by selecting the ``GPUParticlesCollisionSDF3D`` node in the editor, then clicking **Bake SDF** at the top of the 3D viewport. Any *visible* :ref:`MeshInstance3D`\ s touching the :ref:`extents` will be taken into account for baking, regardless of their :ref:`GeometryInstance3D.gi_mode`. +\ **Baking:** The signed distance field texture can be baked by selecting the **GPUParticlesCollisionSDF3D** node in the editor, then clicking **Bake SDF** at the top of the 3D viewport. Any *visible* :ref:`MeshInstance3D`\ s touching the :ref:`extents` will be taken into account for baking, regardless of their :ref:`GeometryInstance3D.gi_mode`. -\ **Note:** Baking a ``GPUParticlesCollisionSDF3D``'s :ref:`texture` is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked :ref:`Texture3D`\ s into its :ref:`texture` property in an exported project. +\ **Note:** Baking a **GPUParticlesCollisionSDF3D**'s :ref:`texture` is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked :ref:`Texture3D`\ s into its :ref:`texture` property in an exported project. \ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. \ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`bake_mask` | ``4294967295`` | -+---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ -| :ref:`Resolution` | :ref:`resolution` | ``2`` | -+---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ -| :ref:`Texture3D` | :ref:`texture` | | -+---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`thickness` | ``1.0`` | -+---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`bake_mask` | ``4294967295`` | + +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | + +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ + | :ref:`Resolution` | :ref:`resolution` | ``2`` | + +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ + | :ref:`Texture3D` | :ref:`texture` | | + +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`thickness` | ``1.0`` | + +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_bake_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bake_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_bake_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bake_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GPUParticlesCollisionSDF3D_Resolution: -.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_16: - -.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_32: - -.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_64: - -.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_128: - -.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_256: - -.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_512: - -.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_MAX: +.. rst-class:: classref-enumeration enum **Resolution**: -- **RESOLUTION_16** = **0** --- Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. +.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_16: -- **RESOLUTION_32** = **1** --- Bake a 32×32×32 signed distance field. +.. rst-class:: classref-enumeration-constant -- **RESOLUTION_64** = **2** --- Bake a 64×64×64 signed distance field. +:ref:`Resolution` **RESOLUTION_16** = ``0`` -- **RESOLUTION_128** = **3** --- Bake a 128×128×128 signed distance field. +Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. -- **RESOLUTION_256** = **4** --- Bake a 256×256×256 signed distance field. +.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_32: -- **RESOLUTION_512** = **5** --- Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. +.. rst-class:: classref-enumeration-constant -- **RESOLUTION_MAX** = **6** --- Represents the size of the :ref:`Resolution` enum. +:ref:`Resolution` **RESOLUTION_32** = ``1`` + +Bake a 32×32×32 signed distance field. + +.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_64: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_64** = ``2`` + +Bake a 64×64×64 signed distance field. + +.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_128: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_128** = ``3`` + +Bake a 128×128×128 signed distance field. + +.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_256: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_256** = ``4`` + +Bake a 256×256×256 signed distance field. + +.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_512: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_512** = ``5`` + +Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. + +.. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Resolution` **RESOLUTION_MAX** = ``6`` + +Represents the size of the :ref:`Resolution` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesCollisionSDF3D_property_bake_mask: -- :ref:`int` **bake_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4294967295`` | -+-----------+----------------------+ -| *Setter* | set_bake_mask(value) | -+-----------+----------------------+ -| *Getter* | get_bake_mask() | -+-----------+----------------------+ +:ref:`int` **bake_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_bake_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_bake_mask** **(** **)** The visual layers to account for when baking the particle collision SDF. Only :ref:`MeshInstance3D`\ s whose :ref:`VisualInstance3D.layers` match with this :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionSDF3D_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_extents(value) | -+-----------+----------------------+ -| *Getter* | get_extents() | -+-----------+----------------------+ +:ref:`Vector3` **extents** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** The collision SDF's extents in 3D units. To improve SDF quality, the :ref:`extents` should be set as small as possible while covering the parts of the scene you need. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionSDF3D_property_resolution: -- :ref:`Resolution` **resolution** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``2`` | -+-----------+-----------------------+ -| *Setter* | set_resolution(value) | -+-----------+-----------------------+ -| *Getter* | get_resolution() | -+-----------+-----------------------+ +:ref:`Resolution` **resolution** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_resolution** **(** :ref:`Resolution` value **)** +- :ref:`Resolution` **get_resolution** **(** **)** The bake resolution to use for the signed distance field :ref:`texture`. The texture must be baked again for changes to the :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionSDF3D_property_texture: -- :ref:`Texture3D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture3D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture3D` value **)** +- :ref:`Texture3D` **get_texture** **(** **)** The 3D texture representing the signed distance field. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionSDF3D_property_thickness: -- :ref:`float` **thickness** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_thickness(value) | -+-----------+----------------------+ -| *Getter* | get_thickness() | -+-----------+----------------------+ +:ref:`float` **thickness** = ``1.0`` -The collision shape's thickness. Unlike other particle colliders, ``GPUParticlesCollisionSDF3D`` is actually hollow on the inside. :ref:`thickness` can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the ``GPUParticlesCollisionSDF3D`` is moved. +.. rst-class:: classref-property-setget + +- void **set_thickness** **(** :ref:`float` value **)** +- :ref:`float` **get_thickness** **(** **)** + +The collision shape's thickness. Unlike other particle colliders, **GPUParticlesCollisionSDF3D** is actually hollow on the inside. :ref:`thickness` can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the **GPUParticlesCollisionSDF3D** is moved. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GPUParticlesCollisionSDF3D_method_get_bake_mask_value: -- :ref:`bool` **get_bake_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_bake_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`bake_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_GPUParticlesCollisionSDF3D_method_set_bake_mask_value: -- void **set_bake_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_bake_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`bake_mask`, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_gpuparticlescollisionsphere3d.rst b/classes/class_gpuparticlescollisionsphere3d.rst index 2d3cb2811..4c8c9423b 100644 --- a/classes/class_gpuparticlescollisionsphere3d.rst +++ b/classes/class_gpuparticlescollisionsphere3d.rst @@ -14,6 +14,8 @@ GPUParticlesCollisionSphere3D Sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,27 +25,37 @@ Sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | -+---------------------------+--------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +---------------------------+--------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GPUParticlesCollisionSphere3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The collision sphere's radius in 3D units. diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index 18267650d..41059a37f 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -14,6 +14,8 @@ Gradient A color interpolator resource which can be used to generate colors between user-defined color points. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,178 +23,255 @@ Given a set of colors, this resource will interpolate them in order. This means See also :ref:`Curve` which supports more complex easing methods, but does not support colors. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`colors` | ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ -| :ref:`InterpolationMode` | :ref:`interpolation_mode` | ``0`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`offsets` | ``PackedFloat32Array(0, 1)`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`colors` | ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ + | :ref:`InterpolationMode` | :ref:`interpolation_mode` | ``0`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`offsets` | ``PackedFloat32Array(0, 1)`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+----------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`float` offset, :ref:`Color` color **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_color` **(** :ref:`int` point **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_offset` **(** :ref:`int` point **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` point **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`sample` **(** :ref:`float` offset **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_color` **(** :ref:`int` point, :ref:`Color` color **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_offset` **(** :ref:`int` point, :ref:`float` offset **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_point` **(** :ref:`float` offset, :ref:`Color` color **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_color` **(** :ref:`int` point **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_offset` **(** :ref:`int` point **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_point_count` **(** **)** |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_point` **(** :ref:`int` point **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`sample` **(** :ref:`float` offset **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_color` **(** :ref:`int` point, :ref:`Color` color **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_offset` **(** :ref:`int` point, :ref:`float` offset **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Gradient_InterpolationMode: -.. _class_Gradient_constant_GRADIENT_INTERPOLATE_LINEAR: - -.. _class_Gradient_constant_GRADIENT_INTERPOLATE_CONSTANT: - -.. _class_Gradient_constant_GRADIENT_INTERPOLATE_CUBIC: +.. rst-class:: classref-enumeration enum **InterpolationMode**: -- **GRADIENT_INTERPOLATE_LINEAR** = **0** --- Linear interpolation. +.. _class_Gradient_constant_GRADIENT_INTERPOLATE_LINEAR: -- **GRADIENT_INTERPOLATE_CONSTANT** = **1** --- Constant interpolation, color changes abruptly at each point and stays uniform between. This might cause visible aliasing when used for a gradient texture in some cases. +.. rst-class:: classref-enumeration-constant -- **GRADIENT_INTERPOLATE_CUBIC** = **2** --- Cubic interpolation. +:ref:`InterpolationMode` **GRADIENT_INTERPOLATE_LINEAR** = ``0`` + +Linear interpolation. + +.. _class_Gradient_constant_GRADIENT_INTERPOLATE_CONSTANT: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationMode` **GRADIENT_INTERPOLATE_CONSTANT** = ``1`` + +Constant interpolation, color changes abruptly at each point and stays uniform between. This might cause visible aliasing when used for a gradient texture in some cases. + +.. _class_Gradient_constant_GRADIENT_INTERPOLATE_CUBIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationMode` **GRADIENT_INTERPOLATE_CUBIC** = ``2`` + +Cubic interpolation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Gradient_property_colors: -- :ref:`PackedColorArray` **colors** +.. rst-class:: classref-property -+-----------+----------------------------------------------+ -| *Default* | ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` | -+-----------+----------------------------------------------+ -| *Setter* | set_colors(value) | -+-----------+----------------------------------------------+ -| *Getter* | get_colors() | -+-----------+----------------------------------------------+ +:ref:`PackedColorArray` **colors** = ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_colors** **(** :ref:`PackedColorArray` value **)** +- :ref:`PackedColorArray` **get_colors** **(** **)** Gradient's colors returned as a :ref:`PackedColorArray`. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_property_interpolation_mode: -- :ref:`InterpolationMode` **interpolation_mode** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_interpolation_mode(value) | -+-----------+-------------------------------+ -| *Getter* | get_interpolation_mode() | -+-----------+-------------------------------+ +:ref:`InterpolationMode` **interpolation_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_interpolation_mode** **(** :ref:`InterpolationMode` value **)** +- :ref:`InterpolationMode` **get_interpolation_mode** **(** **)** Defines how the colors between points of the gradient are interpolated. See :ref:`InterpolationMode` for available modes. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_property_offsets: -- :ref:`PackedFloat32Array` **offsets** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``PackedFloat32Array(0, 1)`` | -+-----------+------------------------------+ -| *Setter* | set_offsets(value) | -+-----------+------------------------------+ -| *Getter* | get_offsets() | -+-----------+------------------------------+ +:ref:`PackedFloat32Array` **offsets** = ``PackedFloat32Array(0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_offsets** **(** :ref:`PackedFloat32Array` value **)** +- :ref:`PackedFloat32Array` **get_offsets** **(** **)** Gradient's offsets returned as a :ref:`PackedFloat32Array`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Gradient_method_add_point: -- void **add_point** **(** :ref:`float` offset, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **add_point** **(** :ref:`float` offset, :ref:`Color` color **)** Adds the specified color to the end of the gradient, with the specified offset. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_get_color: -- :ref:`Color` **get_color** **(** :ref:`int` point **)** +.. rst-class:: classref-method + +:ref:`Color` **get_color** **(** :ref:`int` point **)** Returns the color of the gradient color at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_get_offset: -- :ref:`float` **get_offset** **(** :ref:`int` point **)** +.. rst-class:: classref-method + +:ref:`float` **get_offset** **(** :ref:`int` point **)** Returns the offset of the gradient color at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_get_point_count: -- :ref:`int` **get_point_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_point_count** **(** **)** |const| Returns the number of colors in the gradient. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_remove_point: -- void **remove_point** **(** :ref:`int` point **)** +.. rst-class:: classref-method + +void **remove_point** **(** :ref:`int` point **)** Removes the color at the index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses/mirrors the gradient. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_sample: -- :ref:`Color` **sample** **(** :ref:`float` offset **)** +.. rst-class:: classref-method + +:ref:`Color` **sample** **(** :ref:`float` offset **)** Returns the interpolated color specified by ``offset``. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_set_color: -- void **set_color** **(** :ref:`int` point, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_color** **(** :ref:`int` point, :ref:`Color` color **)** Sets the color of the gradient color at index ``point``. +.. rst-class:: classref-item-separator + ---- .. _class_Gradient_method_set_offset: -- void **set_offset** **(** :ref:`int` point, :ref:`float` offset **)** +.. rst-class:: classref-method + +void **set_offset** **(** :ref:`int` point, :ref:`float` offset **)** Sets the offset for the gradient color at index ``point``. diff --git a/classes/class_gradienttexture1d.rst b/classes/class_gradienttexture1d.rst index 5d397f1c0..46202d9ff 100644 --- a/classes/class_gradienttexture1d.rst +++ b/classes/class_gradienttexture1d.rst @@ -14,68 +14,84 @@ GradientTexture1D Gradient-filled texture. +.. rst-class:: classref-introduction-group + Description ----------- GradientTexture1D uses a :ref:`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`). See also :ref:`GradientTexture2D`, :ref:`CurveTexture` and :ref:`CurveXYZTexture`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Gradient` | :ref:`gradient` | | -+---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`use_hdr` | ``false`` | -+---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`width` | ``256`` | -+---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Gradient` | :ref:`gradient` | | + +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_hdr` | ``false`` | + +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`width` | ``256`` | + +---------------------------------+------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GradientTexture1D_property_gradient: -- :ref:`Gradient` **gradient** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_gradient(value) | -+----------+---------------------+ -| *Getter* | get_gradient() | -+----------+---------------------+ +:ref:`Gradient` **gradient** + +.. rst-class:: classref-property-setget + +- void **set_gradient** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_gradient** **(** **)** The :ref:`Gradient` that will be used to fill the texture. +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture1D_property_use_hdr: -- :ref:`bool` **use_hdr** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_use_hdr(value) | -+-----------+--------------------+ -| *Getter* | is_using_hdr() | -+-----------+--------------------+ +:ref:`bool` **use_hdr** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_hdr** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_hdr** **(** **)** If ``true``, the generated texture will support high dynamic range (:ref:`Image.FORMAT_RGBAF` format). This allows for glow effects to work if :ref:`Environment.glow_enabled` is ``true``. If ``false``, the generated texture will use low dynamic range; overbright colors will be clamped (:ref:`Image.FORMAT_RGBA8` format). +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture1D_property_width: -- :ref:`int` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``256`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`int` **width** = ``256`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`int` value **)** +- :ref:`int` **get_width** **(** **)** The number of color samples that will be obtained from the :ref:`Gradient`. diff --git a/classes/class_gradienttexture2d.rst b/classes/class_gradienttexture2d.rst index 4410e29a9..d9913c3af 100644 --- a/classes/class_gradienttexture2d.rst +++ b/classes/class_gradienttexture2d.rst @@ -14,191 +14,244 @@ GradientTexture2D Gradient-filled 2D texture. +.. rst-class:: classref-introduction-group + Description ----------- The texture uses a :ref:`Gradient` to fill the texture data in 2D space. The gradient is filled according to the specified :ref:`fill` and :ref:`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` and :ref:`height`). See also :ref:`GradientTexture1D`, :ref:`CurveTexture` and :ref:`CurveXYZTexture`. +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Fill` | :ref:`fill` | ``0`` | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`fill_from` | ``Vector2(0, 0)`` | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`fill_to` | ``Vector2(1, 0)`` | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Gradient` | :ref:`gradient` | | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`height` | ``64`` | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Repeat` | :ref:`repeat` | ``0`` | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`use_hdr` | ``false`` | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`width` | ``64`` | -+----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Fill` | :ref:`fill` | ``0`` | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`fill_from` | ``Vector2(0, 0)`` | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`fill_to` | ``Vector2(1, 0)`` | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Gradient` | :ref:`gradient` | | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`height` | ``64`` | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Repeat` | :ref:`repeat` | ``0`` | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_hdr` | ``false`` | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`width` | ``64`` | + +----------------------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GradientTexture2D_Fill: -.. _class_GradientTexture2D_constant_FILL_LINEAR: - -.. _class_GradientTexture2D_constant_FILL_RADIAL: +.. rst-class:: classref-enumeration enum **Fill**: -- **FILL_LINEAR** = **0** --- The colors are linearly interpolated in a straight line. +.. _class_GradientTexture2D_constant_FILL_LINEAR: -- **FILL_RADIAL** = **1** --- The colors are linearly interpolated in a circular pattern. +.. rst-class:: classref-enumeration-constant + +:ref:`Fill` **FILL_LINEAR** = ``0`` + +The colors are linearly interpolated in a straight line. + +.. _class_GradientTexture2D_constant_FILL_RADIAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Fill` **FILL_RADIAL** = ``1`` + +The colors are linearly interpolated in a circular pattern. + +.. rst-class:: classref-item-separator ---- .. _enum_GradientTexture2D_Repeat: -.. _class_GradientTexture2D_constant_REPEAT_NONE: - -.. _class_GradientTexture2D_constant_REPEAT: - -.. _class_GradientTexture2D_constant_REPEAT_MIRROR: +.. rst-class:: classref-enumeration enum **Repeat**: -- **REPEAT_NONE** = **0** --- The gradient fill is restricted to the range defined by :ref:`fill_from` to :ref:`fill_to` offsets. +.. _class_GradientTexture2D_constant_REPEAT_NONE: -- **REPEAT** = **1** --- The texture is filled starting from :ref:`fill_from` to :ref:`fill_to` offsets, repeating the same pattern in both directions. +.. rst-class:: classref-enumeration-constant -- **REPEAT_MIRROR** = **2** --- The texture is filled starting from :ref:`fill_from` to :ref:`fill_to` offsets, mirroring the pattern in both directions. +:ref:`Repeat` **REPEAT_NONE** = ``0`` + +The gradient fill is restricted to the range defined by :ref:`fill_from` to :ref:`fill_to` offsets. + +.. _class_GradientTexture2D_constant_REPEAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Repeat` **REPEAT** = ``1`` + +The texture is filled starting from :ref:`fill_from` to :ref:`fill_to` offsets, repeating the same pattern in both directions. + +.. _class_GradientTexture2D_constant_REPEAT_MIRROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Repeat` **REPEAT_MIRROR** = ``2`` + +The texture is filled starting from :ref:`fill_from` to :ref:`fill_to` offsets, mirroring the pattern in both directions. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GradientTexture2D_property_fill: -- :ref:`Fill` **fill** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_fill(value) | -+-----------+-----------------+ -| *Getter* | get_fill() | -+-----------+-----------------+ +:ref:`Fill` **fill** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fill** **(** :ref:`Fill` value **)** +- :ref:`Fill` **get_fill** **(** **)** The gradient fill type, one of the :ref:`Fill` values. The texture is filled by interpolating colors starting from :ref:`fill_from` to :ref:`fill_to` offsets. +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture2D_property_fill_from: -- :ref:`Vector2` **fill_from** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_fill_from(value) | -+-----------+----------------------+ -| *Getter* | get_fill_from() | -+-----------+----------------------+ +:ref:`Vector2` **fill_from** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_fill_from** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_fill_from** **(** **)** The initial offset used to fill the texture specified in UV coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture2D_property_fill_to: -- :ref:`Vector2` **fill_to** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2(1, 0)`` | -+-----------+--------------------+ -| *Setter* | set_fill_to(value) | -+-----------+--------------------+ -| *Getter* | get_fill_to() | -+-----------+--------------------+ +:ref:`Vector2` **fill_to** = ``Vector2(1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_fill_to** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_fill_to** **(** **)** The final offset used to fill the texture specified in UV coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture2D_property_gradient: -- :ref:`Gradient` **gradient** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_gradient(value) | -+----------+---------------------+ -| *Getter* | get_gradient() | -+----------+---------------------+ +:ref:`Gradient` **gradient** + +.. rst-class:: classref-property-setget + +- void **set_gradient** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_gradient** **(** **)** The :ref:`Gradient` used to fill the texture. +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture2D_property_height: -- :ref:`int` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``64`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`int` **height** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`int` value **)** +- :ref:`int` **get_height** **(** **)** The number of vertical color samples that will be obtained from the :ref:`Gradient`, which also represents the texture's height. +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture2D_property_repeat: -- :ref:`Repeat` **repeat** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_repeat(value) | -+-----------+-------------------+ -| *Getter* | get_repeat() | -+-----------+-------------------+ +:ref:`Repeat` **repeat** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_repeat** **(** :ref:`Repeat` value **)** +- :ref:`Repeat` **get_repeat** **(** **)** The gradient repeat type, one of the :ref:`Repeat` values. The texture is filled starting from :ref:`fill_from` to :ref:`fill_to` offsets by default, but the gradient fill can be repeated to cover the entire texture. +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture2D_property_use_hdr: -- :ref:`bool` **use_hdr** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_use_hdr(value) | -+-----------+--------------------+ -| *Getter* | is_using_hdr() | -+-----------+--------------------+ +:ref:`bool` **use_hdr** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_hdr** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_hdr** **(** **)** If ``true``, the generated texture will support high dynamic range (:ref:`Image.FORMAT_RGBAF` format). This allows for glow effects to work if :ref:`Environment.glow_enabled` is ``true``. If ``false``, the generated texture will use low dynamic range; overbright colors will be clamped (:ref:`Image.FORMAT_RGBA8` format). +.. rst-class:: classref-item-separator + ---- .. _class_GradientTexture2D_property_width: -- :ref:`int` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``64`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`int` **width** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`int` value **)** +- :ref:`int` **get_width** **(** **)** The number of horizontal color samples that will be obtained from the :ref:`Gradient`, which also represents the texture's width. diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index baebdddd3..782ecdeb8 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -14,6 +14,8 @@ GraphEdit GraphEdit is a control responsible for displaying and manipulating graph-like data using :ref:`GraphNode`\ s. It provides access to creation, removal, connection, and disconnection of nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,560 +25,696 @@ GraphEdit by itself is only an empty container, representing an infinite grid wh \ **Performance:** It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`arrange_nodes_button_hidden` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`connection_lines_antialiased` | ``true`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`connection_lines_curvature` | ``0.5`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`connection_lines_thickness` | ``2.0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`minimap_enabled` | ``true`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`minimap_opacity` | ``0.65`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`minimap_size` | ``Vector2(240, 160)`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`PanningScheme` | :ref:`panning_scheme` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`right_disconnects` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`show_zoom_label` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`snap_distance` | ``20`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`use_snap` | ``true`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom` | ``1.0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom_max` | ``2.0736`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom_min` | ``0.232568`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`zoom_step` | ``1.2`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`arrange_nodes_button_hidden` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`connection_lines_antialiased` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`connection_lines_curvature` | ``0.5`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`connection_lines_thickness` | ``2.0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`minimap_enabled` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`minimap_opacity` | ``0.65`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`minimap_size` | ``Vector2(240, 160)`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`PanningScheme` | :ref:`panning_scheme` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`right_disconnects` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_zoom_label` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`snap_distance` | ``20`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_snap` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom` | ``1.0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom_max` | ``2.0736`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom_min` | ``0.232568`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom_step` | ``1.2`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`_get_connection_line` **(** :ref:`Vector2` from_position, :ref:`Vector2` to_position **)** |virtual| |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_in_input_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_in_output_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_node_hover_valid` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** |virtual| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_valid_left_disconnect_type` **(** :ref:`int` type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_valid_right_disconnect_type` **(** :ref:`int` type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`arrange_nodes` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_connections` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_node` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_node` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_connection_drag_end` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_connection_line` **(** :ref:`Vector2` from_node, :ref:`Vector2` to_node **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_connection_list` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`HBoxContainer` | :ref:`get_zoom_hbox` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_node_connected` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_valid_left_disconnect_type` **(** :ref:`int` type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_valid_right_disconnect_type` **(** :ref:`int` type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_connection_activity` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port, :ref:`float` amount **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_selected` **(** :ref:`Node` node **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`_get_connection_line` **(** :ref:`Vector2` from_position, :ref:`Vector2` to_position **)** |virtual| |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_in_input_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_in_output_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_node_hover_valid` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** |virtual| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_valid_left_disconnect_type` **(** :ref:`int` type **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_valid_right_disconnect_type` **(** :ref:`int` type **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`arrange_nodes` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_connections` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_node` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect_node` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_connection_drag_end` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_connection_line` **(** :ref:`Vector2` from_node, :ref:`Vector2` to_node **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_connection_list` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HBoxContainer` | :ref:`get_zoom_hbox` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_node_connected` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_valid_left_disconnect_type` **(** :ref:`int` type **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_valid_right_disconnect_type` **(** :ref:`int` type **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_connection_activity` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port, :ref:`float` amount **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_selected` **(** :ref:`Node` node **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`activity` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`grid_major` | ``Color(1, 1, 1, 0.2)`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`grid_minor` | ``Color(1, 1, 1, 0.05)`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`selection_fill` | ``Color(1, 1, 1, 0.3)`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`selection_stroke` | ``Color(1, 1, 1, 0.8)`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`port_hotzone_inner_extent` | ``22`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`port_hotzone_outer_extent` | ``26`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`layout` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`minimap` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`minus` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`more` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`reset` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`snap` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`StyleBox` | :ref:`bg` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`activity` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`grid_major` | ``Color(1, 1, 1, 0.2)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`grid_minor` | ``Color(1, 1, 1, 0.05)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`selection_fill` | ``Color(1, 1, 1, 0.3)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`selection_stroke` | ``Color(1, 1, 1, 0.8)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`port_hotzone_inner_extent` | ``22`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`port_hotzone_outer_extent` | ``26`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`layout` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`minimap` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`minus` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`more` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`reset` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`snap` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`StyleBox` | :ref:`bg` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_GraphEdit_signal_begin_node_move: -- **begin_node_move** **(** **)** +.. rst-class:: classref-signal + +**begin_node_move** **(** **)** Emitted at the beginning of a GraphNode movement. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_connection_drag_ended: -- **connection_drag_ended** **(** **)** +.. rst-class:: classref-signal + +**connection_drag_ended** **(** **)** Emitted at the end of a connection drag. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_connection_drag_started: -- **connection_drag_started** **(** :ref:`String` from_node, :ref:`int` from_port, :ref:`bool` is_output **)** +.. rst-class:: classref-signal + +**connection_drag_started** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`bool` is_output **)** Emitted at the beginning of a connection drag. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_connection_from_empty: -- **connection_from_empty** **(** :ref:`StringName` to_node, :ref:`int` to_port, :ref:`Vector2` release_position **)** +.. rst-class:: classref-signal + +**connection_from_empty** **(** :ref:`StringName` to_node, :ref:`int` to_port, :ref:`Vector2` release_position **)** Emitted when user drags a connection from an input port into the empty space of the graph. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_connection_request: -- **connection_request** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-signal + +**connection_request** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** Emitted to the GraphEdit when the connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode` and the ``to_port`` of the ``to_node`` :ref:`GraphNode` is attempted to be created. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_connection_to_empty: -- **connection_to_empty** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`Vector2` release_position **)** +.. rst-class:: classref-signal + +**connection_to_empty** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`Vector2` release_position **)** Emitted when user drags a connection from an output port into the empty space of the graph. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_copy_nodes_request: -- **copy_nodes_request** **(** **)** +.. rst-class:: classref-signal + +**copy_nodes_request** **(** **)** Emitted when the user presses :kbd:`Ctrl + C`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_delete_nodes_request: -- **delete_nodes_request** **(** :ref:`StringName[]` nodes **)** +.. rst-class:: classref-signal + +**delete_nodes_request** **(** :ref:`StringName[]` nodes **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_disconnection_request: -- **disconnection_request** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-signal + +**disconnection_request** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** Emitted to the GraphEdit when the connection between ``from_port`` of ``from_node`` :ref:`GraphNode` and ``to_port`` of ``to_node`` :ref:`GraphNode` is attempted to be removed. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_duplicate_nodes_request: -- **duplicate_nodes_request** **(** **)** +.. rst-class:: classref-signal + +**duplicate_nodes_request** **(** **)** Emitted when a GraphNode is attempted to be duplicated in the GraphEdit. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_end_node_move: -- **end_node_move** **(** **)** +.. rst-class:: classref-signal + +**end_node_move** **(** **)** Emitted at the end of a GraphNode movement. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_node_deselected: -- **node_deselected** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**node_deselected** **(** :ref:`Node` node **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_GraphEdit_signal_node_selected: -- **node_selected** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**node_selected** **(** :ref:`Node` node **)** Emitted when a GraphNode is selected. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_paste_nodes_request: -- **paste_nodes_request** **(** **)** +.. rst-class:: classref-signal + +**paste_nodes_request** **(** **)** Emitted when the user presses :kbd:`Ctrl + V`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_popup_request: -- **popup_request** **(** :ref:`Vector2` position **)** +.. rst-class:: classref-signal + +**popup_request** **(** :ref:`Vector2` position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_signal_scroll_offset_changed: -- **scroll_offset_changed** **(** :ref:`Vector2` offset **)** +.. rst-class:: classref-signal + +**scroll_offset_changed** **(** :ref:`Vector2` offset **)** Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_GraphEdit_PanningScheme: -.. _class_GraphEdit_constant_SCROLL_ZOOMS: - -.. _class_GraphEdit_constant_SCROLL_PANS: +.. rst-class:: classref-enumeration enum **PanningScheme**: -- **SCROLL_ZOOMS** = **0** --- :kbd:`Mouse Wheel` will zoom, :kbd:`Ctrl + Mouse Wheel` will move the view. +.. _class_GraphEdit_constant_SCROLL_ZOOMS: -- **SCROLL_PANS** = **1** --- :kbd:`Mouse Wheel` will move the view, :kbd:`Ctrl + Mouse Wheel` will zoom. +.. rst-class:: classref-enumeration-constant + +:ref:`PanningScheme` **SCROLL_ZOOMS** = ``0`` + +:kbd:`Mouse Wheel` will zoom, :kbd:`Ctrl + Mouse Wheel` will move the view. + +.. _class_GraphEdit_constant_SCROLL_PANS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PanningScheme` **SCROLL_PANS** = ``1`` + +:kbd:`Mouse Wheel` will move the view, :kbd:`Ctrl + Mouse Wheel` will zoom. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GraphEdit_property_arrange_nodes_button_hidden: -- :ref:`bool` **arrange_nodes_button_hidden** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------------+ -| *Setter* | set_arrange_nodes_button_hidden(value) | -+-----------+----------------------------------------+ -| *Getter* | is_arrange_nodes_button_hidden() | -+-----------+----------------------------------------+ +:ref:`bool` **arrange_nodes_button_hidden** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_arrange_nodes_button_hidden** **(** :ref:`bool` value **)** +- :ref:`bool` **is_arrange_nodes_button_hidden** **(** **)** If ``true``, the Arrange Nodes button is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_connection_lines_antialiased: -- :ref:`bool` **connection_lines_antialiased** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------------+ -| *Setter* | set_connection_lines_antialiased(value) | -+-----------+-----------------------------------------+ -| *Getter* | is_connection_lines_antialiased() | -+-----------+-----------------------------------------+ +:ref:`bool` **connection_lines_antialiased** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_connection_lines_antialiased** **(** :ref:`bool` value **)** +- :ref:`bool` **is_connection_lines_antialiased** **(** **)** If ``true``, the lines between nodes will use antialiasing. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_connection_lines_curvature: -- :ref:`float` **connection_lines_curvature** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0.5`` | -+-----------+---------------------------------------+ -| *Setter* | set_connection_lines_curvature(value) | -+-----------+---------------------------------------+ -| *Getter* | get_connection_lines_curvature() | -+-----------+---------------------------------------+ +:ref:`float` **connection_lines_curvature** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_connection_lines_curvature** **(** :ref:`float` value **)** +- :ref:`float` **get_connection_lines_curvature** **(** **)** The curvature of the lines between the nodes. 0 results in straight lines. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_connection_lines_thickness: -- :ref:`float` **connection_lines_thickness** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``2.0`` | -+-----------+---------------------------------------+ -| *Setter* | set_connection_lines_thickness(value) | -+-----------+---------------------------------------+ -| *Getter* | get_connection_lines_thickness() | -+-----------+---------------------------------------+ +:ref:`float` **connection_lines_thickness** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_connection_lines_thickness** **(** :ref:`float` value **)** +- :ref:`float` **get_connection_lines_thickness** **(** **)** The thickness of the lines between the nodes. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_minimap_enabled: -- :ref:`bool` **minimap_enabled** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_minimap_enabled(value) | -+-----------+----------------------------+ -| *Getter* | is_minimap_enabled() | -+-----------+----------------------------+ +:ref:`bool` **minimap_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_minimap_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_minimap_enabled** **(** **)** If ``true``, the minimap is visible. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_minimap_opacity: -- :ref:`float` **minimap_opacity** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.65`` | -+-----------+----------------------------+ -| *Setter* | set_minimap_opacity(value) | -+-----------+----------------------------+ -| *Getter* | get_minimap_opacity() | -+-----------+----------------------------+ +:ref:`float` **minimap_opacity** = ``0.65`` + +.. rst-class:: classref-property-setget + +- void **set_minimap_opacity** **(** :ref:`float` value **)** +- :ref:`float` **get_minimap_opacity** **(** **)** The opacity of the minimap rectangle. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_minimap_size: -- :ref:`Vector2` **minimap_size** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2(240, 160)`` | -+-----------+-------------------------+ -| *Setter* | set_minimap_size(value) | -+-----------+-------------------------+ -| *Getter* | get_minimap_size() | -+-----------+-------------------------+ +:ref:`Vector2` **minimap_size** = ``Vector2(240, 160)`` + +.. rst-class:: classref-property-setget + +- void **set_minimap_size** **(** :ref:`Vector2` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_panning_scheme: -- :ref:`PanningScheme` **panning_scheme** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_panning_scheme(value) | -+-----------+---------------------------+ -| *Getter* | get_panning_scheme() | -+-----------+---------------------------+ +:ref:`PanningScheme` **panning_scheme** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_panning_scheme** **(** :ref:`PanningScheme` value **)** +- :ref:`PanningScheme` **get_panning_scheme** **(** **)** Defines the control scheme for panning with mouse wheel. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_right_disconnects: -- :ref:`bool` **right_disconnects** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_right_disconnects(value) | -+-----------+--------------------------------+ -| *Getter* | is_right_disconnects_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **right_disconnects** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_right_disconnects** **(** :ref:`bool` value **)** +- :ref:`bool` **is_right_disconnects_enabled** **(** **)** If ``true``, enables disconnection of existing connections in the GraphEdit by dragging the right end. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_scroll_offset: -- :ref:`Vector2` **scroll_offset** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_scroll_ofs(value) | -+-----------+-----------------------+ -| *Getter* | get_scroll_ofs() | -+-----------+-----------------------+ +:ref:`Vector2` **scroll_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_ofs** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_scroll_ofs** **(** **)** The scroll offset. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_show_zoom_label: -- :ref:`bool` **show_zoom_label** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_show_zoom_label(value) | -+-----------+----------------------------+ -| *Getter* | is_showing_zoom_label() | -+-----------+----------------------------+ +:ref:`bool` **show_zoom_label** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_show_zoom_label** **(** :ref:`bool` value **)** +- :ref:`bool` **is_showing_zoom_label** **(** **)** If ``true``, makes a label with the current zoom level visible. The zoom value is displayed in percents. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_snap_distance: -- :ref:`int` **snap_distance** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``20`` | -+-----------+-----------------+ -| *Setter* | set_snap(value) | -+-----------+-----------------+ -| *Getter* | get_snap() | -+-----------+-----------------+ +:ref:`int` **snap_distance** = ``20`` + +.. rst-class:: classref-property-setget + +- void **set_snap** **(** :ref:`int` value **)** +- :ref:`int` **get_snap** **(** **)** The snapping distance in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_use_snap: -- :ref:`bool` **use_snap** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_use_snap(value) | -+-----------+---------------------+ -| *Getter* | is_using_snap() | -+-----------+---------------------+ +:ref:`bool` **use_snap** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_snap** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_snap** **(** **)** If ``true``, enables snapping. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_zoom: -- :ref:`float` **zoom** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_zoom(value) | -+-----------+-----------------+ -| *Getter* | get_zoom() | -+-----------+-----------------+ +:ref:`float` **zoom** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_zoom** **(** :ref:`float` value **)** +- :ref:`float` **get_zoom** **(** **)** The current zoom value. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_zoom_max: -- :ref:`float` **zoom_max** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``2.0736`` | -+-----------+---------------------+ -| *Setter* | set_zoom_max(value) | -+-----------+---------------------+ -| *Getter* | get_zoom_max() | -+-----------+---------------------+ +:ref:`float` **zoom_max** = ``2.0736`` + +.. rst-class:: classref-property-setget + +- void **set_zoom_max** **(** :ref:`float` value **)** +- :ref:`float` **get_zoom_max** **(** **)** The upper zoom limit. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_zoom_min: -- :ref:`float` **zoom_min** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.232568`` | -+-----------+---------------------+ -| *Setter* | set_zoom_min(value) | -+-----------+---------------------+ -| *Getter* | get_zoom_min() | -+-----------+---------------------+ +:ref:`float` **zoom_min** = ``0.232568`` + +.. rst-class:: classref-property-setget + +- void **set_zoom_min** **(** :ref:`float` value **)** +- :ref:`float` **get_zoom_min** **(** **)** The lower zoom limit. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_property_zoom_step: -- :ref:`float` **zoom_step** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.2`` | -+-----------+----------------------+ -| *Setter* | set_zoom_step(value) | -+-----------+----------------------+ -| *Getter* | get_zoom_step() | -+-----------+----------------------+ +:ref:`float` **zoom_step** = ``1.2`` + +.. rst-class:: classref-property-setget + +- void **set_zoom_step** **(** :ref:`float` value **)** +- :ref:`float` **get_zoom_step** **(** **)** The step of each zoom level. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_GraphEdit_method__get_connection_line: -- :ref:`PackedVector2Array` **_get_connection_line** **(** :ref:`Vector2` from_position, :ref:`Vector2` to_position **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **_get_connection_line** **(** :ref:`Vector2` from_position, :ref:`Vector2` to_position **)** |virtual| |const| Virtual method which can be overridden to customize how connections are drawn. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method__is_in_input_hotzone: -- :ref:`bool` **_is_in_input_hotzone** **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_is_in_input_hotzone** **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| Returns whether the ``mouse_position`` is in the input hot zone. @@ -593,11 +731,15 @@ Below is a sample code to help get started: return rect.has_point(mouse_position) +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method__is_in_output_hotzone: -- :ref:`bool` **_is_in_output_hotzone** **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_is_in_output_hotzone** **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| Returns whether the ``mouse_position`` is in the output hot zone. For more information on hot zones, see :ref:`_is_in_input_hotzone`. @@ -612,11 +754,15 @@ Below is a sample code to help get started: return rect.has_point(mouse_position) +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method__is_node_hover_valid: -- :ref:`bool` **_is_node_hover_valid** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_is_node_hover_valid** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** |virtual| This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port. @@ -640,69 +786,101 @@ In this example a connection to same node is suppressed: +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_add_valid_connection_type: -- void **add_valid_connection_type** **(** :ref:`int` from_type, :ref:`int` to_type **)** +.. rst-class:: classref-method + +void **add_valid_connection_type** **(** :ref:`int` from_type, :ref:`int` to_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` method. See also :ref:`is_valid_connection_type` and :ref:`remove_valid_connection_type`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_add_valid_left_disconnect_type: -- void **add_valid_left_disconnect_type** **(** :ref:`int` type **)** +.. rst-class:: classref-method + +void **add_valid_left_disconnect_type** **(** :ref:`int` type **)** Allows to disconnect nodes when dragging from the left port of the :ref:`GraphNode`'s slot if it has the specified type. See also :ref:`remove_valid_left_disconnect_type`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_add_valid_right_disconnect_type: -- void **add_valid_right_disconnect_type** **(** :ref:`int` type **)** +.. rst-class:: classref-method + +void **add_valid_right_disconnect_type** **(** :ref:`int` type **)** Allows to disconnect nodes when dragging from the right port of the :ref:`GraphNode`'s slot if it has the specified type. See also :ref:`remove_valid_right_disconnect_type`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_arrange_nodes: -- void **arrange_nodes** **(** **)** +.. rst-class:: classref-method + +void **arrange_nodes** **(** **)** Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_clear_connections: -- void **clear_connections** **(** **)** +.. rst-class:: classref-method + +void **clear_connections** **(** **)** Removes all connections between nodes. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_connect_node: -- :ref:`Error` **connect_node** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-method + +:ref:`Error` **connect_node** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** Create a connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode` and the ``to_port`` of the ``to_node`` :ref:`GraphNode`. If the connection already exists, no connection is created. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_disconnect_node: -- void **disconnect_node** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-method + +void **disconnect_node** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** Removes the connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode` and the ``to_port`` of the ``to_node`` :ref:`GraphNode`. If the connection does not exist, no connection is removed. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_force_connection_drag_end: -- void **force_connection_drag_end** **(** **)** +.. rst-class:: classref-method + +void **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. @@ -710,236 +888,308 @@ This is best used together with :ref:`connection_drag_started`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_get_connection_line: -- :ref:`PackedVector2Array` **get_connection_line** **(** :ref:`Vector2` from_node, :ref:`Vector2` to_node **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_connection_line** **(** :ref:`Vector2` from_node, :ref:`Vector2` to_node **)** Returns the points which would make up a connection between ``from_node`` and ``to_node``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_get_connection_list: -- :ref:`Dictionary[]` **get_connection_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_connection_list** **(** **)** |const| 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" }``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_get_zoom_hbox: -- :ref:`HBoxContainer` **get_zoom_hbox** **(** **)** +.. rst-class:: classref-method + +:ref:`HBoxContainer` **get_zoom_hbox** **(** **)** Gets the :ref:`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. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_is_node_connected: -- :ref:`bool` **is_node_connected** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-method + +:ref:`bool` **is_node_connected** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** Returns ``true`` if the ``from_port`` of the ``from_node`` :ref:`GraphNode` is connected to the ``to_port`` of the ``to_node`` :ref:`GraphNode`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_is_valid_connection_type: -- :ref:`bool` **is_valid_connection_type** **(** :ref:`int` from_type, :ref:`int` to_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_connection_type** **(** :ref:`int` from_type, :ref:`int` to_type **)** |const| 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` method. See also :ref:`add_valid_connection_type` and :ref:`remove_valid_connection_type`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_remove_valid_connection_type: -- void **remove_valid_connection_type** **(** :ref:`int` from_type, :ref:`int` to_type **)** +.. rst-class:: classref-method + +void **remove_valid_connection_type** **(** :ref:`int` from_type, :ref:`int` to_type **)** Disallows the connection between two different port types previously allowed by :ref:`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` method. See also :ref:`is_valid_connection_type`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_remove_valid_left_disconnect_type: -- void **remove_valid_left_disconnect_type** **(** :ref:`int` type **)** +.. rst-class:: classref-method + +void **remove_valid_left_disconnect_type** **(** :ref:`int` type **)** Disallows to disconnect nodes when dragging from the left port of the :ref:`GraphNode`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_left_disconnect_type`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_remove_valid_right_disconnect_type: -- void **remove_valid_right_disconnect_type** **(** :ref:`int` type **)** +.. rst-class:: classref-method + +void **remove_valid_right_disconnect_type** **(** :ref:`int` type **)** Disallows to disconnect nodes when dragging from the right port of the :ref:`GraphNode`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_right_disconnect_type`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_set_connection_activity: -- void **set_connection_activity** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port, :ref:`float` amount **)** +.. rst-class:: classref-method + +void **set_connection_activity** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port, :ref:`float` amount **)** 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` theme property. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_method_set_selected: -- void **set_selected** **(** :ref:`Node` node **)** +.. rst-class:: classref-method + +void **set_selected** **(** :ref:`Node` node **)** Sets the specified ``node`` as the one selected. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_GraphEdit_theme_color_activity: -- :ref:`Color` **activity** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **activity** = ``Color(1, 1, 1, 1)`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_color_grid_major: -- :ref:`Color` **grid_major** +.. rst-class:: classref-themeproperty -+-----------+-------------------------+ -| *Default* | ``Color(1, 1, 1, 0.2)`` | -+-----------+-------------------------+ +:ref:`Color` **grid_major** = ``Color(1, 1, 1, 0.2)`` Color of major grid lines. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_color_grid_minor: -- :ref:`Color` **grid_minor** +.. rst-class:: classref-themeproperty -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 0.05)`` | -+-----------+--------------------------+ +:ref:`Color` **grid_minor** = ``Color(1, 1, 1, 0.05)`` Color of minor grid lines. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_color_selection_fill: -- :ref:`Color` **selection_fill** +.. rst-class:: classref-themeproperty -+-----------+-------------------------+ -| *Default* | ``Color(1, 1, 1, 0.3)`` | -+-----------+-------------------------+ +:ref:`Color` **selection_fill** = ``Color(1, 1, 1, 0.3)`` The fill color of the selection rectangle. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_color_selection_stroke: -- :ref:`Color` **selection_stroke** +.. rst-class:: classref-themeproperty -+-----------+-------------------------+ -| *Default* | ``Color(1, 1, 1, 0.8)`` | -+-----------+-------------------------+ +:ref:`Color` **selection_stroke** = ``Color(1, 1, 1, 0.8)`` The outline color of the selection rectangle. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_constant_port_hotzone_inner_extent: -- :ref:`int` **port_hotzone_inner_extent** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``22`` | -+-----------+--------+ +:ref:`int` **port_hotzone_inner_extent** = ``22`` The horizontal range within which a port can be grabbed (inner side). +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_constant_port_hotzone_outer_extent: -- :ref:`int` **port_hotzone_outer_extent** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``26`` | -+-----------+--------+ +:ref:`int` **port_hotzone_outer_extent** = ``26`` The horizontal range within which a port can be grabbed (outer side). +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_icon_layout: -- :ref:`Texture2D` **layout** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **layout** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_icon_minimap: -- :ref:`Texture2D` **minimap** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **minimap** .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_icon_minus: -- :ref:`Texture2D` **minus** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **minus** The icon for the zoom out button. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_icon_more: -- :ref:`Texture2D` **more** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **more** The icon for the zoom in button. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_icon_reset: -- :ref:`Texture2D` **reset** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **reset** The icon for the zoom reset button. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_icon_snap: -- :ref:`Texture2D` **snap** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **snap** The icon for the snap toggle button. +.. rst-class:: classref-item-separator + ---- .. _class_GraphEdit_theme_style_bg: -- :ref:`StyleBox` **bg** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **bg** The background drawn under the grid. diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index b076d0f10..b200fd80b 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -14,6 +14,8 @@ GraphNode GraphNode is a :ref:`Container` control that represents a single data unit in a :ref:`GraphEdit` graph. You can customize the number, type, and color of left- and right-side connection ports. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,584 +27,762 @@ Slots can be configured in the Inspector dock once you add at least one child :r \ **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` uses port's index and not slot's index. You can use :ref:`get_connection_input_slot` and :ref:`get_connection_output_slot` to get the slot index from the port index. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`comment` | ``false`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draggable` | ``true`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Overlay` | :ref:`overlay` | ``0`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`position_offset` | ``Vector2(0, 0)`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`resizable` | ``false`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`selectable` | ``true`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`selected` | ``false`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`show_close` | ``false`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`String` | :ref:`title` | ``""`` | -+--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`comment` | ``false`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draggable` | ``true`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`Overlay` | :ref:`overlay` | ``0`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`position_offset` | ``Vector2(0, 0)`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`resizable` | ``false`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selectable` | ``true`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selected` | ``false`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_close` | ``false`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`String` | :ref:`title` | ``""`` | + +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_all_slots` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_slot` **(** :ref:`int` slot_index **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_connection_input_color` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_input_count` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_input_height` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_connection_input_position` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_input_slot` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_input_type` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_connection_output_color` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_output_count` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_output_height` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_connection_output_position` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_output_slot` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_output_type` **(** :ref:`int` port **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_slot_color_left` **(** :ref:`int` slot_index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_slot_color_right` **(** :ref:`int` slot_index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_slot_type_left` **(** :ref:`int` slot_index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_slot_type_right` **(** :ref:`int` slot_index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_slot_draw_stylebox` **(** :ref:`int` slot_index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_slot_enabled_left` **(** :ref:`int` slot_index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_slot_enabled_right` **(** :ref:`int` slot_index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot` **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_color_left` **(** :ref:`int` slot_index, :ref:`Color` color **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_color_right` **(** :ref:`int` slot_index, :ref:`Color` color **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_draw_stylebox` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_enabled_left` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_enabled_right` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_type_left` **(** :ref:`int` slot_index, :ref:`int` type **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_type_right` **(** :ref:`int` slot_index, :ref:`int` type **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_all_slots` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_slot` **(** :ref:`int` slot_index **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_connection_input_color` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_input_count` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_input_height` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_connection_input_position` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_input_slot` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_input_type` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_connection_output_color` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_output_count` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_output_height` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_connection_output_position` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_output_slot` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_output_type` **(** :ref:`int` port **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_slot_color_left` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_slot_color_right` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_slot_type_left` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_slot_type_right` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_slot_draw_stylebox` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_slot_enabled_left` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_slot_enabled_right` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot` **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_color_left` **(** :ref:`int` slot_index, :ref:`Color` color **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_color_right` **(** :ref:`int` slot_index, :ref:`Color` color **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_draw_stylebox` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_enabled_left` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_enabled_right` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_type_left` **(** :ref:`int` slot_index, :ref:`int` type **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_type_right` **(** :ref:`int` slot_index, :ref:`int` type **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`close_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`resizer_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`close_h_offset` | ``22`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`close_offset` | ``22`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`port_offset` | ``0`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`separation` | ``2`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`title_h_offset` | ``0`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`title_offset` | ``26`` | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`title_font` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`close` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`port` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`resizer` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`breakpoint` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`comment` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`comment_focus` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`frame` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`position` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`selected_frame` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`slot` | | -+-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`close_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`resizer_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`close_h_offset` | ``22`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`close_offset` | ``22`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`port_offset` | ``0`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`separation` | ``2`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`title_h_offset` | ``0`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`title_offset` | ``26`` | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`title_font` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`close` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`port` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`resizer` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`breakpoint` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`comment` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`comment_focus` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`frame` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`position` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`selected_frame` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`slot` | | + +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_GraphNode_signal_close_request: -- **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`). +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_signal_deselected: -- **deselected** **(** **)** +.. rst-class:: classref-signal + +**deselected** **(** **)** Emitted when the GraphNode is deselected. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_signal_dragged: -- **dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** +.. rst-class:: classref-signal + +**dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** Emitted when the GraphNode is dragged. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_signal_position_offset_changed: -- **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: -- **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: -- **resize_request** **(** :ref:`Vector2` new_minsize **)** +.. rst-class:: classref-signal + +**resize_request** **(** :ref:`Vector2` new_minsize **)** Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see :ref:`resizable`). +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_signal_selected: -- **selected** **(** **)** +.. rst-class:: classref-signal + +**selected** **(** **)** Emitted when the GraphNode is selected. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_signal_slot_updated: -- **slot_updated** **(** :ref:`int` idx **)** +.. rst-class:: classref-signal + +**slot_updated** **(** :ref:`int` idx **)** Emitted when any GraphNode's slot is updated. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_GraphNode_Overlay: -.. _class_GraphNode_constant_OVERLAY_DISABLED: - -.. _class_GraphNode_constant_OVERLAY_BREAKPOINT: - -.. _class_GraphNode_constant_OVERLAY_POSITION: +.. rst-class:: classref-enumeration enum **Overlay**: -- **OVERLAY_DISABLED** = **0** --- No overlay is shown. +.. _class_GraphNode_constant_OVERLAY_DISABLED: -- **OVERLAY_BREAKPOINT** = **1** --- Show overlay set in the :ref:`breakpoint` theme property. +.. rst-class:: classref-enumeration-constant -- **OVERLAY_POSITION** = **2** --- Show overlay set in the :ref:`position` theme property. +:ref:`Overlay` **OVERLAY_DISABLED** = ``0`` + +No overlay is shown. + +.. _class_GraphNode_constant_OVERLAY_BREAKPOINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Overlay` **OVERLAY_BREAKPOINT** = ``1`` + +Show overlay set in the :ref:`breakpoint` theme property. + +.. _class_GraphNode_constant_OVERLAY_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Overlay` **OVERLAY_POSITION** = ``2`` + +Show overlay set in the :ref:`position` theme property. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GraphNode_property_comment: -- :ref:`bool` **comment** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_comment(value) | -+-----------+--------------------+ -| *Getter* | is_comment() | -+-----------+--------------------+ +:ref:`bool` **comment** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_comment** **(** :ref:`bool` value **)** +- :ref:`bool` **is_comment** **(** **)** If ``true``, the GraphNode is a comment node. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_draggable: -- :ref:`bool` **draggable** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_draggable(value) | -+-----------+----------------------+ -| *Getter* | is_draggable() | -+-----------+----------------------+ +:ref:`bool` **draggable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draggable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_draggable** **(** **)** If ``true``, the user can drag the GraphNode. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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: -- :ref:`Overlay` **overlay** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_overlay(value) | -+-----------+--------------------+ -| *Getter* | get_overlay() | -+-----------+--------------------+ +:ref:`Overlay` **overlay** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_overlay** **(** :ref:`Overlay` value **)** +- :ref:`Overlay` **get_overlay** **(** **)** Sets the overlay shown above the GraphNode. See :ref:`Overlay`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_position_offset: -- :ref:`Vector2` **position_offset** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_position_offset(value) | -+-----------+----------------------------+ -| *Getter* | get_position_offset() | -+-----------+----------------------------+ +:ref:`Vector2` **position_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position_offset** **(** **)** The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdit`. \ **Note:** You cannot use position offset directly, as :ref:`GraphEdit` is a :ref:`Container`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_resizable: -- :ref:`bool` **resizable** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_resizable(value) | -+-----------+----------------------+ -| *Getter* | is_resizable() | -+-----------+----------------------+ +:ref:`bool` **resizable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_resizable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_resizable** **(** **)** If ``true``, the user can resize the GraphNode. \ **Note:** Dragging the handle will only emit the :ref:`resize_request` signal, the GraphNode needs to be resized manually. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_selectable: -- :ref:`bool` **selectable** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_selectable(value) | -+-----------+-----------------------+ -| *Getter* | is_selectable() | -+-----------+-----------------------+ +:ref:`bool` **selectable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_selectable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_selectable** **(** **)** If ``true``, the user can select the GraphNode. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_selected: -- :ref:`bool` **selected** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_selected(value) | -+-----------+---------------------+ -| *Getter* | is_selected() | -+-----------+---------------------+ +:ref:`bool` **selected** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_selected** **(** :ref:`bool` value **)** +- :ref:`bool` **is_selected** **(** **)** If ``true``, the GraphNode is selected. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_show_close: -- :ref:`bool` **show_close** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_show_close_button(value) | -+-----------+------------------------------+ -| *Getter* | is_close_button_visible() | -+-----------+------------------------------+ +:ref:`bool` **show_close** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_show_close_button** **(** :ref:`bool` value **)** +- :ref:`bool` **is_close_button_visible** **(** **)** If ``true``, the close button will be visible. \ **Note:** Pressing it will only emit the :ref:`close_request` signal, the GraphNode needs to be removed manually. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_property_title: -- :ref:`String` **title** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``""`` | -+-----------+------------------+ -| *Setter* | set_title(value) | -+-----------+------------------+ -| *Getter* | get_title() | -+-----------+------------------+ +:ref:`String` **title** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_title** **(** :ref:`String` value **)** +- :ref:`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: -- void **clear_all_slots** **(** **)** +.. rst-class:: classref-method + +void **clear_all_slots** **(** **)** Disables all input and output slots of the GraphNode. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_clear_slot: -- void **clear_slot** **(** :ref:`int` slot_index **)** +.. rst-class:: classref-method + +void **clear_slot** **(** :ref:`int` slot_index **)** Disables input and output slot whose index is ``slot_index``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_input_color: -- :ref:`Color` **get_connection_input_color** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`Color` **get_connection_input_color** **(** :ref:`int` port **)** Returns the :ref:`Color` of the input connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_input_count: -- :ref:`int` **get_connection_input_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_input_count** **(** **)** Returns the number of enabled input slots (connections) to the GraphNode. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_input_height: -- :ref:`int` **get_connection_input_height** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_input_height** **(** :ref:`int` port **)** Returns the height of the input connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_input_position: -- :ref:`Vector2` **get_connection_input_position** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_connection_input_position** **(** :ref:`int` port **)** Returns the position of the input connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_input_slot: -- :ref:`int` **get_connection_input_slot** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_input_slot** **(** :ref:`int` port **)** Returns the corresponding slot index of the input connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_input_type: -- :ref:`int` **get_connection_input_type** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_input_type** **(** :ref:`int` port **)** Returns the type of the input connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_output_color: -- :ref:`Color` **get_connection_output_color** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`Color` **get_connection_output_color** **(** :ref:`int` port **)** Returns the :ref:`Color` of the output connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_output_count: -- :ref:`int` **get_connection_output_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_output_count** **(** **)** Returns the number of enabled output slots (connections) of the GraphNode. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_output_height: -- :ref:`int` **get_connection_output_height** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_output_height** **(** :ref:`int` port **)** Returns the height of the output connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_output_position: -- :ref:`Vector2` **get_connection_output_position** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_connection_output_position** **(** :ref:`int` port **)** Returns the position of the output connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_output_slot: -- :ref:`int` **get_connection_output_slot** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_output_slot** **(** :ref:`int` port **)** Returns the corresponding slot index of the output connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_connection_output_type: -- :ref:`int` **get_connection_output_type** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`int` **get_connection_output_type** **(** :ref:`int` port **)** Returns the type of the output connection ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_slot_color_left: -- :ref:`Color` **get_slot_color_left** **(** :ref:`int` slot_index **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_slot_color_left** **(** :ref:`int` slot_index **)** |const| Returns the left (input) :ref:`Color` of the slot ``slot_index``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_slot_color_right: -- :ref:`Color` **get_slot_color_right** **(** :ref:`int` slot_index **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_slot_color_right** **(** :ref:`int` slot_index **)** |const| Returns the right (output) :ref:`Color` of the slot ``slot_index``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_slot_type_left: -- :ref:`int` **get_slot_type_left** **(** :ref:`int` slot_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_slot_type_left** **(** :ref:`int` slot_index **)** |const| Returns the left (input) type of the slot ``slot_index``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_get_slot_type_right: -- :ref:`int` **get_slot_type_right** **(** :ref:`int` slot_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_slot_type_right** **(** :ref:`int` slot_index **)** |const| Returns the right (output) type of the slot ``slot_index``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_is_slot_draw_stylebox: -- :ref:`bool` **is_slot_draw_stylebox** **(** :ref:`int` slot_index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_slot_draw_stylebox** **(** :ref:`int` slot_index **)** |const| Returns true if the background :ref:`StyleBox` of the slot ``slot_index`` is drawn. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_is_slot_enabled_left: -- :ref:`bool` **is_slot_enabled_left** **(** :ref:`int` slot_index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_slot_enabled_left** **(** :ref:`int` slot_index **)** |const| Returns ``true`` if left (input) side of the slot ``slot_index`` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_is_slot_enabled_right: -- :ref:`bool` **is_slot_enabled_right** **(** :ref:`int` slot_index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_slot_enabled_right** **(** :ref:`int` slot_index **)** |const| Returns ``true`` if right (output) side of the slot ``slot_index`` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot: -- void **set_slot** **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** +.. rst-class:: classref-method + +void **set_slot** **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** Sets properties of the slot with the ``slot_index`` index. @@ -618,260 +798,336 @@ Individual properties can also be set using one of the ``set_slot_*`` methods. \ **Note:** This method only sets properties of the slot. To create the slot itself, add a :ref:`Control`-derived child to the GraphNode. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot_color_left: -- void **set_slot_color_left** **(** :ref:`int` slot_index, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_slot_color_left** **(** :ref:`int` slot_index, :ref:`Color` color **)** Sets the :ref:`Color` of the left (input) side of the slot ``slot_index`` to ``color``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot_color_right: -- void **set_slot_color_right** **(** :ref:`int` slot_index, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_slot_color_right** **(** :ref:`int` slot_index, :ref:`Color` color **)** Sets the :ref:`Color` of the right (output) side of the slot ``slot_index`` to ``color``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot_draw_stylebox: -- void **set_slot_draw_stylebox** **(** :ref:`int` slot_index, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_slot_draw_stylebox** **(** :ref:`int` slot_index, :ref:`bool` enable **)** Toggles the background :ref:`StyleBox` of the slot ``slot_index``. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot_enabled_left: -- void **set_slot_enabled_left** **(** :ref:`int` slot_index, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_slot_enabled_left** **(** :ref:`int` slot_index, :ref:`bool` enable **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot_enabled_right: -- void **set_slot_enabled_right** **(** :ref:`int` slot_index, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_slot_enabled_right** **(** :ref:`int` slot_index, :ref:`bool` enable **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot_type_left: -- void **set_slot_type_left** **(** :ref:`int` slot_index, :ref:`int` type **)** +.. rst-class:: classref-method + +void **set_slot_type_left** **(** :ref:`int` slot_index, :ref:`int` type **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_method_set_slot_type_right: -- void **set_slot_type_right** **(** :ref:`int` slot_index, :ref:`int` type **)** +.. rst-class:: classref-method + +void **set_slot_type_right** **(** :ref:`int` slot_index, :ref:`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: -- :ref:`Color` **close_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **close_color** = ``Color(0.875, 0.875, 0.875, 1)`` The color modulation applied to the close button icon. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_color_resizer_color: -- :ref:`Color` **resizer_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **resizer_color** = ``Color(0.875, 0.875, 0.875, 1)`` The color modulation applied to the resizer icon. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_color_title_color: -- :ref:`Color` **title_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` Color of the title text. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_constant_close_h_offset: -- :ref:`int` **close_h_offset** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``22`` | -+-----------+--------+ +:ref:`int` **close_h_offset** = ``22`` .. container:: contribute There is currently no description for this theme property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_constant_close_offset: -- :ref:`int` **close_offset** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``22`` | -+-----------+--------+ +:ref:`int` **close_offset** = ``22`` The vertical offset of the close button. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_constant_port_offset: -- :ref:`int` **port_offset** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **port_offset** = ``0`` Horizontal offset for the ports. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_constant_separation: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **separation** = ``2`` The vertical distance between ports. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_constant_title_h_offset: -- :ref:`int` **title_h_offset** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **title_h_offset** = ``0`` Horizontal offset of the title text. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_constant_title_offset: -- :ref:`int` **title_offset** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``26`` | -+-----------+--------+ +:ref:`int` **title_offset** = ``26`` Vertical offset of the title text. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_font_title_font: -- :ref:`Font` **title_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **title_font** Font used for the title text. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_icon_close: -- :ref:`Texture2D` **close** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **close** The icon for the close button, visible when :ref:`show_close` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_icon_port: -- :ref:`Texture2D` **port** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **port** The icon used for representing ports. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_icon_resizer: -- :ref:`Texture2D` **resizer** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **resizer** The icon used for resizer, visible when :ref:`resizable` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_style_breakpoint: -- :ref:`StyleBox` **breakpoint** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **breakpoint** The background used when :ref:`overlay` is set to :ref:`OVERLAY_BREAKPOINT`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_style_comment: -- :ref:`StyleBox` **comment** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **comment** The :ref:`StyleBox` used when :ref:`comment` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_style_comment_focus: -- :ref:`StyleBox` **comment_focus** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` used when :ref:`comment` is enabled and the ``GraphNode`` is focused. +:ref:`StyleBox` **comment_focus** + +The :ref:`StyleBox` used when :ref:`comment` is enabled and the **GraphNode** is focused. + +.. rst-class:: classref-item-separator ---- .. _class_GraphNode_theme_style_frame: -- :ref:`StyleBox` **frame** +.. rst-class:: classref-themeproperty -The default background for ``GraphNode``. +:ref:`StyleBox` **frame** + +The default background for **GraphNode**. + +.. rst-class:: classref-item-separator ---- .. _class_GraphNode_theme_style_position: -- :ref:`StyleBox` **position** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **position** The background used when :ref:`overlay` is set to :ref:`OVERLAY_POSITION`. +.. rst-class:: classref-item-separator + ---- .. _class_GraphNode_theme_style_selected_frame: -- :ref:`StyleBox` **selected_frame** +.. rst-class:: classref-themeproperty -The background used when the ``GraphNode`` is selected. +:ref:`StyleBox` **selected_frame** + +The background used when the **GraphNode** is selected. + +.. rst-class:: classref-item-separator ---- .. _class_GraphNode_theme_style_slot: -- :ref:`StyleBox` **slot** +.. rst-class:: classref-themeproperty -The :ref:`StyleBox` used for each slot of the ``GraphNode``. +:ref:`StyleBox` **slot** + +The :ref:`StyleBox` used for each slot of the **GraphNode**. .. |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.)` diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 0f25c6ab0..00019f445 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -14,6 +14,8 @@ GridContainer Grid container used to arrange Control-derived children in a grid like layout. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ Notice that grid layout will preserve the columns and rows for every size of the \ **Note:** GridContainer only works with child nodes inheriting from Control. It won't rearrange child nodes inheriting from Node2D. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,61 +34,80 @@ Tutorials - `OS Test Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+------------------------------------------------------+-------+ -| :ref:`int` | :ref:`columns` | ``1`` | -+-----------------------+------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------+-------+ + | :ref:`int` | :ref:`columns` | ``1`` | + +-----------------------+------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------+----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+-----------------------+----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`v_separation` | ``4`` | -+-----------------------+----------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------+----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +-----------------------+----------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GridContainer_property_columns: -- :ref:`int` **columns** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_columns(value) | -+-----------+--------------------+ -| *Getter* | get_columns() | -+-----------+--------------------+ +:ref:`int` **columns** = ``1`` -The number of columns in the ``GridContainer``. If modified, ``GridContainer`` reorders its Control-derived children to accommodate the new layout. +.. rst-class:: classref-property-setget + +- void **set_columns** **(** :ref:`int` value **)** +- :ref:`int` **get_columns** **(** **)** + +The number of columns in the **GridContainer**. If modified, **GridContainer** reorders its Control-derived children to accommodate the new layout. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_GridContainer_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal separation of children nodes. +.. rst-class:: classref-item-separator + ---- .. _class_GridContainer_theme_constant_v_separation: -- :ref:`int` **v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **v_separation** = ``4`` The vertical separation of children nodes. diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 177632af3..55dc1c968 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -14,6 +14,8 @@ GridMap Node for 3D tile-based maps. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,6 +29,8 @@ Internally, a GridMap is split into a sparse collection of octants for efficient \ **Note:** GridMap doesn't extend :ref:`VisualInstance3D` and therefore can't be hidden or cull masked based on :ref:`VisualInstance3D.layers`. If you make a light not affect the first layer, the whole GridMap won't be lit by the light in question. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,477 +40,605 @@ Tutorials - `3D Kinematic Character Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`bake_navigation` | ``false`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`cell_center_x` | ``true`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`cell_center_y` | ``true`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`cell_center_z` | ``true`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`cell_octant_size` | ``8`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`cell_scale` | ``1.0`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`cell_size` | ``Vector3(2, 2, 2)`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`collision_layer` | ``1`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`MeshLibrary` | :ref:`mesh_library` | | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`PhysicsMaterial` | :ref:`physics_material` | | -+-----------------------------------------------+--------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`bake_navigation` | ``false`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`cell_center_x` | ``true`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`cell_center_y` | ``true`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`cell_center_z` | ``true`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`cell_octant_size` | ``8`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`cell_scale` | ``1.0`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`cell_size` | ``Vector3(2, 2, 2)`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`collision_layer` | ``1`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`MeshLibrary` | :ref:`mesh_library` | | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material` | | + +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_baked_meshes` **(** **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_bake_mesh_instance` **(** :ref:`int` idx **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_bake_meshes` **(** **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`get_basis_with_orthogonal_index` **(** :ref:`int` index **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_item` **(** :ref:`Vector3i` position **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`get_cell_item_basis` **(** :ref:`Vector3i` position **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_item_orientation` **(** :ref:`Vector3i` position **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_orthogonal_index_from_basis` **(** :ref:`Basis` basis **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i[]` | :ref:`get_used_cells` **(** **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i[]` | :ref:`get_used_cells_by_item` **(** :ref:`int` item **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`local_to_map` **(** :ref:`Vector3` local_position **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_baked_meshes` **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`map_to_local` **(** :ref:`Vector3i` map_position **)** |const| | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_item` **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_baked_meshes` **(** **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_bake_mesh_instance` **(** :ref:`int` idx **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_bake_meshes` **(** **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`get_basis_with_orthogonal_index` **(** :ref:`int` index **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_item` **(** :ref:`Vector3i` position **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`get_cell_item_basis` **(** :ref:`Vector3i` position **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_item_orientation` **(** :ref:`Vector3i` position **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_orthogonal_index_from_basis` **(** :ref:`Basis` basis **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i[]` | :ref:`get_used_cells` **(** **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i[]` | :ref:`get_used_cells_by_item` **(** :ref:`int` item **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`local_to_map` **(** :ref:`Vector3` local_position **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`make_baked_meshes` **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`map_to_local` **(** :ref:`Vector3i` map_position **)** |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_item` **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_GridMap_signal_cell_size_changed: -- **cell_size_changed** **(** :ref:`Vector3` cell_size **)** +.. rst-class:: classref-signal + +**cell_size_changed** **(** :ref:`Vector3` cell_size **)** Emitted when :ref:`cell_size` changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constants --------- .. _class_GridMap_constant_INVALID_CELL_ITEM: -- **INVALID_CELL_ITEM** = **-1** --- Invalid cell item that can be used in :ref:`set_cell_item` to clear cells (or represent an empty cell in :ref:`get_cell_item`). +.. rst-class:: classref-constant + +**INVALID_CELL_ITEM** = ``-1`` + +Invalid cell item that can be used in :ref:`set_cell_item` to clear cells (or represent an empty cell in :ref:`get_cell_item`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GridMap_property_bake_navigation: -- :ref:`bool` **bake_navigation** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_bake_navigation(value) | -+-----------+----------------------------+ -| *Getter* | is_baking_navigation() | -+-----------+----------------------------+ +:ref:`bool` **bake_navigation** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_bake_navigation** **(** :ref:`bool` value **)** +- :ref:`bool` **is_baking_navigation** **(** **)** If ``true``, this GridMap bakes a navigation region. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_cell_center_x: -- :ref:`bool` **cell_center_x** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_center_x(value) | -+-----------+---------------------+ -| *Getter* | get_center_x() | -+-----------+---------------------+ +:ref:`bool` **cell_center_x** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_center_x** **(** :ref:`bool` value **)** +- :ref:`bool` **get_center_x** **(** **)** If ``true``, grid items are centered on the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_cell_center_y: -- :ref:`bool` **cell_center_y** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_center_y(value) | -+-----------+---------------------+ -| *Getter* | get_center_y() | -+-----------+---------------------+ +:ref:`bool` **cell_center_y** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_center_y** **(** :ref:`bool` value **)** +- :ref:`bool` **get_center_y** **(** **)** If ``true``, grid items are centered on the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_cell_center_z: -- :ref:`bool` **cell_center_z** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_center_z(value) | -+-----------+---------------------+ -| *Getter* | get_center_z() | -+-----------+---------------------+ +:ref:`bool` **cell_center_z** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_center_z** **(** :ref:`bool` value **)** +- :ref:`bool` **get_center_z** **(** **)** If ``true``, grid items are centered on the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_cell_octant_size: -- :ref:`int` **cell_octant_size** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``8`` | -+-----------+------------------------+ -| *Setter* | set_octant_size(value) | -+-----------+------------------------+ -| *Getter* | get_octant_size() | -+-----------+------------------------+ +:ref:`int` **cell_octant_size** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_octant_size** **(** :ref:`int` value **)** +- :ref:`int` **get_octant_size** **(** **)** The size of each octant measured in number of cells. This applies to all three axis. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_cell_scale: -- :ref:`float` **cell_scale** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_cell_scale(value) | -+-----------+-----------------------+ -| *Getter* | get_cell_scale() | -+-----------+-----------------------+ +:ref:`float` **cell_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_cell_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_cell_scale** **(** **)** The scale of the cell items. This does not affect the size of the grid cells themselves, only the items in them. This can be used to make cell items overlap their neighbors. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_cell_size: -- :ref:`Vector3` **cell_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(2, 2, 2)`` | -+-----------+----------------------+ -| *Setter* | set_cell_size(value) | -+-----------+----------------------+ -| *Getter* | get_cell_size() | -+-----------+----------------------+ +:ref:`Vector3` **cell_size** = ``Vector3(2, 2, 2)`` + +.. rst-class:: classref-property-setget + +- void **set_cell_size** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_cell_size** **(** **)** The dimensions of the grid's cells. This does not affect the size of the meshes. See :ref:`cell_scale`. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_collision_layer: -- :ref:`int` **collision_layer** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``1`` | -+-----------+----------------------------+ -| *Setter* | set_collision_layer(value) | -+-----------+----------------------------+ -| *Getter* | get_collision_layer() | -+-----------+----------------------------+ +:ref:`int` **collision_layer** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_layer** **(** :ref:`int` value **)** +- :ref:`int` **get_collision_layer** **(** **)** The physics layers this GridMap is in. GridMaps act as static bodies, meaning they aren't affected by gravity or other forces. They only affect other physics bodies that collide with them. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_mesh_library: -- :ref:`MeshLibrary` **mesh_library** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_mesh_library(value) | -+----------+-------------------------+ -| *Getter* | get_mesh_library() | -+----------+-------------------------+ +:ref:`MeshLibrary` **mesh_library** + +.. rst-class:: classref-property-setget + +- void **set_mesh_library** **(** :ref:`MeshLibrary` value **)** +- :ref:`MeshLibrary` **get_mesh_library** **(** **)** The assigned :ref:`MeshLibrary`. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_navigation_layers** **(** **)** A bitmask determining all navigation layers the GridMap generated navigation regions belong to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer3D.map_get_path`. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_property_physics_material: -- :ref:`PhysicsMaterial` **physics_material** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_physics_material(value) | -+----------+-----------------------------+ -| *Getter* | get_physics_material() | -+----------+-----------------------------+ +:ref:`PhysicsMaterial` **physics_material** -Overrides the default friction and bounce physics properties for the whole ``GridMap``. +.. rst-class:: classref-property-setget + +- void **set_physics_material** **(** :ref:`PhysicsMaterial` value **)** +- :ref:`PhysicsMaterial` **get_physics_material** **(** **)** + +Overrides the default friction and bounce physics properties for the whole **GridMap**. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GridMap_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clear all cells. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_clear_baked_meshes: -- void **clear_baked_meshes** **(** **)** +.. rst-class:: classref-method -.. container:: contribute +void **clear_baked_meshes** **(** **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Clears all baked meshes. See :ref:`make_baked_meshes`. + +.. rst-class:: classref-item-separator ---- .. _class_GridMap_method_get_bake_mesh_instance: -- :ref:`RID` **get_bake_mesh_instance** **(** :ref:`int` idx **)** +.. rst-class:: classref-method -.. container:: contribute +:ref:`RID` **get_bake_mesh_instance** **(** :ref:`int` idx **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns :ref:`RID` of a baked mesh with the given ``idx``. + +.. rst-class:: classref-item-separator ---- .. _class_GridMap_method_get_bake_meshes: -- :ref:`Array` **get_bake_meshes** **(** **)** +.. rst-class:: classref-method + +:ref:`Array` **get_bake_meshes** **(** **)** Returns an array of :ref:`ArrayMesh`\ es and :ref:`Transform3D` references of all bake meshes that exist within the current GridMap. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_basis_with_orthogonal_index: -- :ref:`Basis` **get_basis_with_orthogonal_index** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **get_basis_with_orthogonal_index** **(** :ref:`int` index **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_cell_item: -- :ref:`int` **get_cell_item** **(** :ref:`Vector3i` position **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_cell_item** **(** :ref:`Vector3i` position **)** |const| The :ref:`MeshLibrary` item index located at the given grid coordinates. If the cell is empty, :ref:`INVALID_CELL_ITEM` will be returned. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_cell_item_basis: -- :ref:`Basis` **get_cell_item_basis** **(** :ref:`Vector3i` position **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **get_cell_item_basis** **(** :ref:`Vector3i` position **)** |const| Returns the basis that gives the specified cell its orientation. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_cell_item_orientation: -- :ref:`int` **get_cell_item_orientation** **(** :ref:`Vector3i` position **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_cell_item_orientation** **(** :ref:`Vector3i` position **)** |const| The orientation of the cell at the given grid coordinates. ``-1`` is returned if the cell is empty. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_collision_layer_value: -- :ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_meshes: -- :ref:`Array` **get_meshes** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_meshes** **(** **)** |const| Returns an array of :ref:`Transform3D` and :ref:`Mesh` references corresponding to the non-empty cells in the grid. The transforms are specified in local space. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_navigation_layer_value: -- :ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_navigation_map: -- :ref:`RID` **get_navigation_map** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_navigation_map** **(** **)** |const| Returns the :ref:`RID` of the navigation map this GridMap node uses for its cell baked navigation meshes. This function returns always the map set on the GridMap node and not the map on the NavigationServer. If the map is changed directly with the NavigationServer API the GridMap node will not be aware of the map change. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_orthogonal_index_from_basis: -- :ref:`int` **get_orthogonal_index_from_basis** **(** :ref:`Basis` basis **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_orthogonal_index_from_basis** **(** :ref:`Basis` basis **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_used_cells: -- :ref:`Vector3i[]` **get_used_cells** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3i[]` **get_used_cells** **(** **)** |const| Returns an array of :ref:`Vector3` with the non-empty cell coordinates in the grid map. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_get_used_cells_by_item: -- :ref:`Vector3i[]` **get_used_cells_by_item** **(** :ref:`int` item **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3i[]` **get_used_cells_by_item** **(** :ref:`int` item **)** |const| Returns an array of all cells with the given item index specified in ``item``. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_local_to_map: -- :ref:`Vector3i` **local_to_map** **(** :ref:`Vector3` local_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3i` **local_to_map** **(** :ref:`Vector3` local_position **)** |const| 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` before passing it to this method. See also :ref:`map_to_local`. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_make_baked_meshes: -- void **make_baked_meshes** **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** +.. rst-class:: classref-method -.. container:: contribute +void **make_baked_meshes** **(** :ref:`bool` gen_lightmap_uv=false, :ref:`float` lightmap_uv_texel_size=0.1 **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Bakes lightmap data for all meshes in the assigned :ref:`MeshLibrary`. + +.. rst-class:: classref-item-separator ---- .. _class_GridMap_method_map_to_local: -- :ref:`Vector3` **map_to_local** **(** :ref:`Vector3i` map_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **map_to_local** **(** :ref:`Vector3i` map_position **)** |const| 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`. See also :ref:`map_to_local`. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_resource_changed: -- void **resource_changed** **(** :ref:`Resource` resource **)** +.. rst-class:: classref-method -.. container:: contribute +void **resource_changed** **(** :ref:`Resource` resource **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Notifies the **GridMap** about changed resource and recreates octant data. + +.. rst-class:: classref-item-separator ---- .. _class_GridMap_method_set_cell_item: -- void **set_cell_item** **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** +.. rst-class:: classref-method + +void **set_cell_item** **(** :ref:`Vector3i` position, :ref:`int` item, :ref:`int` orientation=0 **)** Sets the mesh index for the cell referenced by its grid coordinates. @@ -514,35 +646,51 @@ A negative item index such as :ref:`INVALID_CELL_ITEM`. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_set_collision_layer_value: -- void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_set_navigation_layer_value: -- void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_GridMap_method_set_navigation_map: -- void **set_navigation_map** **(** :ref:`RID` navigation_map **)** +.. rst-class:: classref-method + +void **set_navigation_map** **(** :ref:`RID` navigation_map **)** Sets the :ref:`RID` of the navigation map this GridMap node should use for its cell baked navigation meshes. diff --git a/classes/class_groovejoint2d.rst b/classes/class_groovejoint2d.rst index c7cb33846..f150e0a0a 100644 --- a/classes/class_groovejoint2d.rst +++ b/classes/class_groovejoint2d.rst @@ -14,50 +14,63 @@ GrooveJoint2D Groove constraint for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`initial_offset` | ``25.0`` | -+---------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`length` | ``50.0`` | -+---------------------------+--------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`initial_offset` | ``25.0`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`length` | ``50.0`` | + +---------------------------+--------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GrooveJoint2D_property_initial_offset: -- :ref:`float` **initial_offset** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``25.0`` | -+-----------+---------------------------+ -| *Setter* | set_initial_offset(value) | -+-----------+---------------------------+ -| *Getter* | get_initial_offset() | -+-----------+---------------------------+ +:ref:`float` **initial_offset** = ``25.0`` + +.. rst-class:: classref-property-setget + +- void **set_initial_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_initial_offset** **(** **)** The body B's initial anchor position defined by the joint's origin and a local offset :ref:`initial_offset` along the joint's Y axis (along the groove). +.. rst-class:: classref-item-separator + ---- .. _class_GrooveJoint2D_property_length: -- :ref:`float` **length** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``50.0`` | -+-----------+-------------------+ -| *Setter* | set_length(value) | -+-----------+-------------------+ -| *Getter* | get_length() | -+-----------+-------------------+ +:ref:`float` **length** = ``50.0`` + +.. rst-class:: classref-property-setget + +- void **set_length** **(** :ref:`float` value **)** +- :ref:`float` **get_length** **(** **)** The groove's length. The groove is from the joint's origin towards :ref:`length` along the joint's local Y axis. diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index 83e90c80a..146230d23 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -14,6 +14,8 @@ HashingContext Context to compute cryptographic hashes over multiple iterations. +.. rst-class:: classref-introduction-group + Description ----------- @@ -77,58 +79,99 @@ The :ref:`HashType` enum shows the supported hashi +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`finish` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`start` **(** :ref:`HashType` type **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`update` **(** :ref:`PackedByteArray` chunk **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`finish` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`start` **(** :ref:`HashType` type **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`update` **(** :ref:`PackedByteArray` chunk **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_HashingContext_HashType: -.. _class_HashingContext_constant_HASH_MD5: - -.. _class_HashingContext_constant_HASH_SHA1: - -.. _class_HashingContext_constant_HASH_SHA256: +.. rst-class:: classref-enumeration enum **HashType**: -- **HASH_MD5** = **0** --- Hashing algorithm: MD5. +.. _class_HashingContext_constant_HASH_MD5: -- **HASH_SHA1** = **1** --- Hashing algorithm: SHA-1. +.. rst-class:: classref-enumeration-constant -- **HASH_SHA256** = **2** --- Hashing algorithm: SHA-256. +:ref:`HashType` **HASH_MD5** = ``0`` + +Hashing algorithm: MD5. + +.. _class_HashingContext_constant_HASH_SHA1: + +.. rst-class:: classref-enumeration-constant + +:ref:`HashType` **HASH_SHA1** = ``1`` + +Hashing algorithm: SHA-1. + +.. _class_HashingContext_constant_HASH_SHA256: + +.. rst-class:: classref-enumeration-constant + +:ref:`HashType` **HASH_SHA256** = ``2`` + +Hashing algorithm: SHA-256. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_HashingContext_method_finish: -- :ref:`PackedByteArray` **finish** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **finish** **(** **)** Closes the current context, and return the computed hash. +.. rst-class:: classref-item-separator + ---- .. _class_HashingContext_method_start: -- :ref:`Error` **start** **(** :ref:`HashType` type **)** +.. rst-class:: classref-method + +:ref:`Error` **start** **(** :ref:`HashType` type **)** Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256` to start computation of a SHA-256). +.. rst-class:: classref-item-separator + ---- .. _class_HashingContext_method_update: -- :ref:`Error` **update** **(** :ref:`PackedByteArray` chunk **)** +.. rst-class:: classref-method + +:ref:`Error` **update** **(** :ref:`PackedByteArray` chunk **)** Updates the computation with the given ``chunk`` of data. diff --git a/classes/class_hboxcontainer.rst b/classes/class_hboxcontainer.rst index fb857a2d3..33859f18c 100644 --- a/classes/class_hboxcontainer.rst +++ b/classes/class_hboxcontainer.rst @@ -16,35 +16,48 @@ HBoxContainer Horizontal box container. +.. rst-class:: classref-introduction-group + Description ----------- Horizontal box container. See :ref:`BoxContainer`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`separation` | ``4`` | -+-----------------------+------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`separation` | ``4`` | + +-----------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_HBoxContainer_theme_constant_separation: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **separation** = ``4`` -The horizontal space between the ``HBoxContainer``'s elements. +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.)` diff --git a/classes/class_heightmapshape3d.rst b/classes/class_heightmapshape3d.rst index 71c73d956..9e04683fc 100644 --- a/classes/class_heightmapshape3d.rst +++ b/classes/class_heightmapshape3d.rst @@ -14,70 +14,84 @@ HeightMapShape3D Height map shape resource for 3D physics. +.. rst-class:: classref-introduction-group + Description ----------- -Height map shape resource, which can be added to a :ref:`PhysicsBody3D` or :ref:`Area3D`. Heightmap collision is typically used for colliding with terrains. However, since heightmaps cannot store overhangs, collisions with other structures (such as buildings) must be done with other collision shapes such as :ref:`ConcavePolygonShape3D`. If needed, "holes" can be created in an ``HeightMapShape3D`` by assigning very low points (like ``-100000``) in the desired area. +Height map shape resource, which can be added to a :ref:`PhysicsBody3D` or :ref:`Area3D`. Heightmap collision is typically used for colliding with terrains. However, since heightmaps cannot store overhangs, collisions with other structures (such as buildings) must be done with other collision shapes such as :ref:`ConcavePolygonShape3D`. If needed, "holes" can be created in an **HeightMapShape3D** by assigning very low points (like ``-100000``) in the desired area. -\ **Performance:** ``HeightMapShape3D`` is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. +\ **Performance:** **HeightMapShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`map_data` | ``PackedFloat32Array(0, 0, 0, 0)`` | -+-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ -| :ref:`int` | :ref:`map_depth` | ``2`` | -+-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ -| :ref:`int` | :ref:`map_width` | ``2`` | -+-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`map_data` | ``PackedFloat32Array(0, 0, 0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ + | :ref:`int` | :ref:`map_depth` | ``2`` | + +-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ + | :ref:`int` | :ref:`map_width` | ``2`` | + +-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_HeightMapShape3D_property_map_data: -- :ref:`PackedFloat32Array` **map_data** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``PackedFloat32Array(0, 0, 0, 0)`` | -+-----------+------------------------------------+ -| *Setter* | set_map_data(value) | -+-----------+------------------------------------+ -| *Getter* | get_map_data() | -+-----------+------------------------------------+ +:ref:`PackedFloat32Array` **map_data** = ``PackedFloat32Array(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_map_data** **(** :ref:`PackedFloat32Array` value **)** +- :ref:`PackedFloat32Array` **get_map_data** **(** **)** Height map data, pool array must be of :ref:`map_width` \* :ref:`map_depth` size. +.. rst-class:: classref-item-separator + ---- .. _class_HeightMapShape3D_property_map_depth: -- :ref:`int` **map_depth** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``2`` | -+-----------+----------------------+ -| *Setter* | set_map_depth(value) | -+-----------+----------------------+ -| *Getter* | get_map_depth() | -+-----------+----------------------+ +:ref:`int` **map_depth** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_map_depth** **(** :ref:`int` value **)** +- :ref:`int` **get_map_depth** **(** **)** Depth of the height map data. Changing this will resize the :ref:`map_data`. +.. rst-class:: classref-item-separator + ---- .. _class_HeightMapShape3D_property_map_width: -- :ref:`int` **map_width** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``2`` | -+-----------+----------------------+ -| *Setter* | set_map_width(value) | -+-----------+----------------------+ -| *Getter* | get_map_width() | -+-----------+----------------------+ +:ref:`int` **map_width** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_map_width** **(** :ref:`int` value **)** +- :ref:`int` **get_map_width** **(** **)** Width of the height map data. Changing this will resize the :ref:`map_data`. diff --git a/classes/class_hflowcontainer.rst b/classes/class_hflowcontainer.rst index efdd9bc0d..580a1fe89 100644 --- a/classes/class_hflowcontainer.rst +++ b/classes/class_hflowcontainer.rst @@ -14,42 +14,53 @@ HFlowContainer Horizontal flow container. +.. rst-class:: classref-introduction-group + Description ----------- Horizontal version of :ref:`FlowContainer`. +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------+-----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+-----------------------+-----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`v_separation` | ``4`` | -+-----------------------+-----------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------+-----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +-----------------------+-----------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_HFlowContainer_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal separation of children nodes. +.. rst-class:: classref-item-separator + ---- .. _class_HFlowContainer_theme_constant_v_separation: -- :ref:`int` **v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **v_separation** = ``4`` The vertical separation of children nodes. diff --git a/classes/class_hingejoint3d.rst b/classes/class_hingejoint3d.rst index 09b8fe1b8..1c852c337 100644 --- a/classes/class_hingejoint3d.rst +++ b/classes/class_hingejoint3d.rst @@ -14,303 +14,409 @@ HingeJoint3D A hinge between two 3D PhysicsBodies. +.. rst-class:: classref-introduction-group + Description ----------- A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. See also :ref:`Generic6DOFJoint3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`angular_limit/bias` | ``0.3`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`angular_limit/enable` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`angular_limit/lower` | ``-1.5708`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`angular_limit/relaxation` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`angular_limit/softness` | ``0.9`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`angular_limit/upper` | ``1.5708`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`bool` | :ref:`motor/enable` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`motor/max_impulse` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`motor/target_velocity` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ -| :ref:`float` | :ref:`params/bias` | ``0.3`` | -+---------------------------+---------------------------------------------------------------------------------------+-------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`angular_limit/bias` | ``0.3`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`bool` | :ref:`angular_limit/enable` | ``false`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`angular_limit/lower` | ``-1.5708`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`angular_limit/relaxation` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`angular_limit/softness` | ``0.9`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`angular_limit/upper` | ``1.5708`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`bool` | :ref:`motor/enable` | ``false`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`motor/max_impulse` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`motor/target_velocity` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`params/bias` | ``0.3`` | + +---------------------------+---------------------------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_flag` **(** :ref:`Flag` flag **)** |const| | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_flag` **(** :ref:`Flag` flag, :ref:`bool` enabled **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag` **(** :ref:`Flag` flag **)** |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_flag` **(** :ref:`Flag` flag, :ref:`bool` enabled **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_HingeJoint3D_Param: -.. _class_HingeJoint3D_constant_PARAM_BIAS: - -.. _class_HingeJoint3D_constant_PARAM_LIMIT_UPPER: - -.. _class_HingeJoint3D_constant_PARAM_LIMIT_LOWER: - -.. _class_HingeJoint3D_constant_PARAM_LIMIT_BIAS: - -.. _class_HingeJoint3D_constant_PARAM_LIMIT_SOFTNESS: - -.. _class_HingeJoint3D_constant_PARAM_LIMIT_RELAXATION: - -.. _class_HingeJoint3D_constant_PARAM_MOTOR_TARGET_VELOCITY: - -.. _class_HingeJoint3D_constant_PARAM_MOTOR_MAX_IMPULSE: - -.. _class_HingeJoint3D_constant_PARAM_MAX: +.. rst-class:: classref-enumeration enum **Param**: -- **PARAM_BIAS** = **0** --- The speed with which the two bodies get pulled together when they move in different directions. +.. _class_HingeJoint3D_constant_PARAM_BIAS: -- **PARAM_LIMIT_UPPER** = **1** --- The maximum rotation. Only active if :ref:`angular_limit/enable` is ``true``. +.. rst-class:: classref-enumeration-constant -- **PARAM_LIMIT_LOWER** = **2** --- The minimum rotation. Only active if :ref:`angular_limit/enable` is ``true``. +:ref:`Param` **PARAM_BIAS** = ``0`` -- **PARAM_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected. +The speed with which the two bodies get pulled together when they move in different directions. -- **PARAM_LIMIT_SOFTNESS** = **4** +.. _class_HingeJoint3D_constant_PARAM_LIMIT_UPPER: -- **PARAM_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down. +.. rst-class:: classref-enumeration-constant -- **PARAM_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor. +:ref:`Param` **PARAM_LIMIT_UPPER** = ``1`` -- **PARAM_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor. +The maximum rotation. Only active if :ref:`angular_limit/enable` is ``true``. -- **PARAM_MAX** = **8** --- Represents the size of the :ref:`Param` enum. +.. _class_HingeJoint3D_constant_PARAM_LIMIT_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LIMIT_LOWER** = ``2`` + +The minimum rotation. Only active if :ref:`angular_limit/enable` is ``true``. + +.. _class_HingeJoint3D_constant_PARAM_LIMIT_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LIMIT_BIAS** = ``3`` + +The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + +.. _class_HingeJoint3D_constant_PARAM_LIMIT_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LIMIT_SOFTNESS** = ``4`` + + + +.. _class_HingeJoint3D_constant_PARAM_LIMIT_RELAXATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LIMIT_RELAXATION** = ``5`` + +The lower this value, the more the rotation gets slowed down. + +.. _class_HingeJoint3D_constant_PARAM_MOTOR_TARGET_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_MOTOR_TARGET_VELOCITY** = ``6`` + +Target speed for the motor. + +.. _class_HingeJoint3D_constant_PARAM_MOTOR_MAX_IMPULSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_MOTOR_MAX_IMPULSE** = ``7`` + +Maximum acceleration for the motor. + +.. _class_HingeJoint3D_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_MAX** = ``8`` + +Represents the size of the :ref:`Param` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_HingeJoint3D_Flag: -.. _class_HingeJoint3D_constant_FLAG_USE_LIMIT: - -.. _class_HingeJoint3D_constant_FLAG_ENABLE_MOTOR: - -.. _class_HingeJoint3D_constant_FLAG_MAX: +.. rst-class:: classref-enumeration enum **Flag**: -- **FLAG_USE_LIMIT** = **0** --- If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower` and :ref:`angular_limit/upper` has effects. +.. _class_HingeJoint3D_constant_FLAG_USE_LIMIT: -- **FLAG_ENABLE_MOTOR** = **1** --- When activated, a motor turns the hinge. +.. rst-class:: classref-enumeration-constant -- **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flag` enum. +:ref:`Flag` **FLAG_USE_LIMIT** = ``0`` + +If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower` and :ref:`angular_limit/upper` has effects. + +.. _class_HingeJoint3D_constant_FLAG_ENABLE_MOTOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flag` **FLAG_ENABLE_MOTOR** = ``1`` + +When activated, a motor turns the hinge. + +.. _class_HingeJoint3D_constant_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flag` **FLAG_MAX** = ``2`` + +Represents the size of the :ref:`Flag` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_HingeJoint3D_property_angular_limit/bias: -- :ref:`float` **angular_limit/bias** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.3`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/bias** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The speed with which the rotation across the axis perpendicular to the hinge gets corrected. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_angular_limit/enable: -- :ref:`bool` **angular_limit/enable** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **angular_limit/enable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flag` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flag` flag **)** |const| If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower` and :ref:`angular_limit/upper` has effects. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_angular_limit/lower: -- :ref:`float` **angular_limit/lower** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``-1.5708`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/lower** = ``-1.5708`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The minimum rotation. Only active if :ref:`angular_limit/enable` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_angular_limit/relaxation: -- :ref:`float` **angular_limit/relaxation** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/relaxation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The lower this value, the more the rotation gets slowed down. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_angular_limit/softness: -- :ref:`float` **angular_limit/softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.9`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/softness** = ``0.9`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_angular_limit/upper: -- :ref:`float` **angular_limit/upper** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.5708`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/upper** = ``1.5708`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The maximum rotation. Only active if :ref:`angular_limit/enable` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_motor/enable: -- :ref:`bool` **motor/enable** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **motor/enable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flag` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flag` flag **)** |const| When activated, a motor turns the hinge. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_motor/max_impulse: -- :ref:`float` **motor/max_impulse** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **motor/max_impulse** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Maximum acceleration for the motor. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_motor/target_velocity: -- :ref:`float` **motor/target_velocity** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **motor/target_velocity** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Target speed for the motor. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_property_params/bias: -- :ref:`float` **params/bias** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.3`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **params/bias** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The speed with which the two bodies get pulled together when they move in different directions. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_HingeJoint3D_method_get_flag: -- :ref:`bool` **get_flag** **(** :ref:`Flag` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_flag** **(** :ref:`Flag` flag **)** |const| Returns the value of the specified flag. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_method_get_param: -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Returns the value of the specified parameter. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_method_set_flag: -- void **set_flag** **(** :ref:`Flag` flag, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_flag** **(** :ref:`Flag` flag, :ref:`bool` enabled **)** If ``true``, enables the specified flag. +.. rst-class:: classref-item-separator + ---- .. _class_HingeJoint3D_method_set_param: -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** Sets the value of the specified parameter. diff --git a/classes/class_hmaccontext.rst b/classes/class_hmaccontext.rst index e2e654fe4..5ef11a7b1 100644 --- a/classes/class_hmaccontext.rst +++ b/classes/class_hmaccontext.rst @@ -14,6 +14,8 @@ HMACContext Used to create an HMAC for a message using a key. +.. rst-class:: classref-introduction-group + Description ----------- @@ -69,39 +71,60 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming t +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`finish` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`start` **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`update` **(** :ref:`PackedByteArray` data **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`finish` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`start` **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`update` **(** :ref:`PackedByteArray` data **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_HMACContext_method_finish: -- :ref:`PackedByteArray` **finish** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **finish** **(** **)** Returns the resulting HMAC. If the HMAC failed, an empty :ref:`PackedByteArray` is returned. +.. rst-class:: classref-item-separator + ---- .. _class_HMACContext_method_start: -- :ref:`Error` **start** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key **)** +.. rst-class:: classref-method + +:ref:`Error` **start** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key **)** Initializes the HMACContext. This method cannot be called again on the same HMACContext until :ref:`finish` has been called. +.. rst-class:: classref-item-separator + ---- .. _class_HMACContext_method_update: -- :ref:`Error` **update** **(** :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +:ref:`Error` **update** **(** :ref:`PackedByteArray` data **)** Updates the message to be HMACed. This can be called multiple times before :ref:`finish` is called to append ``data`` to the message, but cannot be called until :ref:`start` has been called. diff --git a/classes/class_hscrollbar.rst b/classes/class_hscrollbar.rst index 9a39d7304..fc55875a1 100644 --- a/classes/class_hscrollbar.rst +++ b/classes/class_hscrollbar.rst @@ -14,124 +14,179 @@ HScrollBar Horizontal scroll bar. +.. rst-class:: classref-introduction-group + Description ----------- Horizontal version of :ref:`ScrollBar`, which goes from left (min) to right (max). +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement_highlight` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement_pressed` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`increment` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`increment_highlight` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`increment_pressed` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`grabber` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`grabber_highlight` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`grabber_pressed` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`scroll` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`scroll_focus` | -+-----------------------------------+-----------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_highlight` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_pressed` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_highlight` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_pressed` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber_highlight` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber_pressed` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`scroll` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`scroll_focus` | + +-----------------------------------+-----------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_HScrollBar_theme_icon_decrement: -- :ref:`Texture2D` **decrement** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement** Icon used as a button to scroll the :ref:`ScrollBar` left. Supports custom step using the :ref:`ScrollBar.custom_step` property. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_icon_decrement_highlight: -- :ref:`Texture2D` **decrement_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement_highlight** Displayed when the mouse cursor hovers over the decrement button. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_icon_decrement_pressed: -- :ref:`Texture2D` **decrement_pressed** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement_pressed** Displayed when the decrement button is being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_icon_increment: -- :ref:`Texture2D` **increment** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment** Icon used as a button to scroll the :ref:`ScrollBar` right. Supports custom step using the :ref:`ScrollBar.custom_step` property. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_icon_increment_highlight: -- :ref:`Texture2D` **increment_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment_highlight** Displayed when the mouse cursor hovers over the increment button. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_icon_increment_pressed: -- :ref:`Texture2D` **increment_pressed** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment_pressed** Displayed when the increment button is being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_style_grabber: -- :ref:`StyleBox` **grabber** +.. rst-class:: classref-themeproperty + +:ref:`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: -- :ref:`StyleBox` **grabber_highlight** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_highlight** Used when the mouse hovers over the grabber. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_style_grabber_pressed: -- :ref:`StyleBox` **grabber_pressed** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_pressed** Used when the grabber is being dragged. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_style_scroll: -- :ref:`StyleBox` **scroll** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **scroll** Used as background of this :ref:`ScrollBar`. +.. rst-class:: classref-item-separator + ---- .. _class_HScrollBar_theme_style_scroll_focus: -- :ref:`StyleBox` **scroll_focus** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **scroll_focus** Used as background when the :ref:`ScrollBar` has the GUI focus. diff --git a/classes/class_hseparator.rst b/classes/class_hseparator.rst index 7ff99fa44..06f01ed7e 100644 --- a/classes/class_hseparator.rst +++ b/classes/class_hseparator.rst @@ -14,38 +14,53 @@ HSeparator Horizontal separator. +.. rst-class:: classref-introduction-group + Description ----------- Horizontal separator. See :ref:`Separator`. Even though it looks horizontal, it is used to separate objects vertically. +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+---------------------------------+---------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`separation` | ``4`` | -+---------------------------------+---------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`separator` | | -+---------------------------------+---------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`separation` | ``4`` | + +---------------------------------+---------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`separator` | | + +---------------------------------+---------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_HSeparator_theme_constant_separation: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`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: -- :ref:`StyleBox` **separator** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **separator** The style for the separator line. Works best with :ref:`StyleBoxLine`. diff --git a/classes/class_hslider.rst b/classes/class_hslider.rst index ef5096e0a..b1aa0be02 100644 --- a/classes/class_hslider.rst +++ b/classes/class_hslider.rst @@ -14,6 +14,8 @@ HSlider Horizontal slider. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,95 +23,130 @@ Horizontal slider. See :ref:`Slider`. This one goes from left (min \ **Note:** The :ref:`Range.changed` and :ref:`Range.value_changed` signals are part of the :ref:`Range` class which this class inherits from. +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`grabber_offset` | ``0`` | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`grabber` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`grabber_disabled` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`grabber_highlight` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`tick` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`grabber_area` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`grabber_area_highlight` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`slider` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`grabber_offset` | ``0`` | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber_disabled` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber_highlight` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`tick` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`grabber_area` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`grabber_area_highlight` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`slider` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_HSlider_theme_constant_grabber_offset: -- :ref:`int` **grabber_offset** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **grabber_offset** = ``0`` Vertical offset of the grabber. +.. rst-class:: classref-item-separator + ---- .. _class_HSlider_theme_icon_grabber: -- :ref:`Texture2D` **grabber** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber** The texture for the grabber (the draggable element). +.. rst-class:: classref-item-separator + ---- .. _class_HSlider_theme_icon_grabber_disabled: -- :ref:`Texture2D` **grabber_disabled** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber_disabled** The texture for the grabber when it's disabled. +.. rst-class:: classref-item-separator + ---- .. _class_HSlider_theme_icon_grabber_highlight: -- :ref:`Texture2D` **grabber_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber_highlight** The texture for the grabber when it's focused. +.. rst-class:: classref-item-separator + ---- .. _class_HSlider_theme_icon_tick: -- :ref:`Texture2D` **tick** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **tick** The texture for the ticks, visible when :ref:`Slider.tick_count` is greater than 0. +.. rst-class:: classref-item-separator + ---- .. _class_HSlider_theme_style_grabber_area: -- :ref:`StyleBox` **grabber_area** +.. rst-class:: classref-themeproperty + +:ref:`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: -- :ref:`StyleBox` **grabber_area_highlight** +.. rst-class:: classref-themeproperty -.. container:: contribute +:ref:`StyleBox` **grabber_area_highlight** - There is currently no description for this theme property. Please help us by :ref:`contributing one `! +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: -- :ref:`StyleBox` **slider** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **slider** The background for the whole slider. Determines the height of the ``grabber_area``. diff --git a/classes/class_hsplitcontainer.rst b/classes/class_hsplitcontainer.rst index 7173ab372..0f1dc3bd8 100644 --- a/classes/class_hsplitcontainer.rst +++ b/classes/class_hsplitcontainer.rst @@ -14,71 +14,88 @@ HSplitContainer Horizontal split container. +.. rst-class:: classref-introduction-group + Description ----------- Horizontal split container. See :ref:`SplitContainer`. This goes from left to right. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`autohide` | ``1`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`separation` | ``12`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`Texture2D` | :ref:`grabber` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`autohide` | ``1`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`separation` | ``12`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`Texture2D` | :ref:`grabber` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_HSplitContainer_theme_constant_autohide: -- :ref:`int` **autohide** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`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: -- :ref:`int` **minimum_grab_thickness** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``6`` | -+-----------+-------+ +:ref:`int` **minimum_grab_thickness** = ``6`` The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation` or :ref:`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: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``12`` | -+-----------+--------+ +:ref:`int` **separation** = ``12`` The space between sides of the container. +.. rst-class:: classref-item-separator + ---- .. _class_HSplitContainer_theme_icon_grabber: -- :ref:`Texture2D` **grabber** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber** The icon used for the grabber drawn in the middle area. diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index c873b3bc9..4fabdb795 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -14,6 +14,8 @@ HTTPClient Low-level hyper-text transfer protocol client. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,7 +25,7 @@ See the :ref:`HTTPRequest` node for a higher-level alternativ \ **Note:** This client only needs to connect to a host once (see :ref:`connect_to_host`) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See :ref:`request` for a full example and to get started. -A ``HTTPClient`` should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports Transport Layer Security (TLS), including server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. +A **HTTPClient** should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports Transport Layer Security (TLS), including server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). @@ -37,6 +39,8 @@ For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/H \ **Warning:** TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -44,458 +48,829 @@ Tutorials - :doc:`TLS certificates <../tutorials/networking/ssl_certificates>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`blocking_mode_enabled` | ``false`` | -+-------------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`StreamPeer` | :ref:`connection` | | -+-------------------------------------+-------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`read_chunk_size` | ``65536`` | -+-------------------------------------+-------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`blocking_mode_enabled` | ``false`` | + +-------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`StreamPeer` | :ref:`connection` | | + +-------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`read_chunk_size` | ``65536`` | + +-------------------------------------+-------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_to_host` **(** :ref:`String` host, :ref:`int` port=-1, :ref:`bool` use_tls=false, :ref:`bool` verify_host=true **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_response_body_length` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_response_code` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_response_headers` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_response_headers_as_dictionary` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Status` | :ref:`get_status` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_response` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_response_chunked` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`poll` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`query_string_from_dict` **(** :ref:`Dictionary` fields **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`read_response_body_chunk` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`request` **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`String` body="" **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`request_raw` **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`PackedByteArray` body **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_http_proxy` **(** :ref:`String` host, :ref:`int` port **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_https_proxy` **(** :ref:`String` host, :ref:`int` port **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_to_host` **(** :ref:`String` host, :ref:`int` port=-1, :ref:`bool` use_tls=false, :ref:`bool` verify_host=true **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_response_body_length` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_response_code` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_response_headers` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_response_headers_as_dictionary` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`get_status` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_response` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_response_chunked` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`poll` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`query_string_from_dict` **(** :ref:`Dictionary` fields **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`read_response_body_chunk` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`request` **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`String` body="" **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`request_raw` **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`PackedByteArray` body **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_http_proxy` **(** :ref:`String` host, :ref:`int` port **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_https_proxy` **(** :ref:`String` host, :ref:`int` port **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_HTTPClient_Method: -.. _class_HTTPClient_constant_METHOD_GET: - -.. _class_HTTPClient_constant_METHOD_HEAD: - -.. _class_HTTPClient_constant_METHOD_POST: - -.. _class_HTTPClient_constant_METHOD_PUT: - -.. _class_HTTPClient_constant_METHOD_DELETE: - -.. _class_HTTPClient_constant_METHOD_OPTIONS: - -.. _class_HTTPClient_constant_METHOD_TRACE: - -.. _class_HTTPClient_constant_METHOD_CONNECT: - -.. _class_HTTPClient_constant_METHOD_PATCH: - -.. _class_HTTPClient_constant_METHOD_MAX: +.. rst-class:: classref-enumeration enum **Method**: -- **METHOD_GET** = **0** --- HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. +.. _class_HTTPClient_constant_METHOD_GET: -- **METHOD_HEAD** = **1** --- HTTP HEAD method. The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful to request metadata like HTTP headers or to check if a resource exists. +.. rst-class:: classref-enumeration-constant -- **METHOD_POST** = **2** --- HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files. +:ref:`Method` **METHOD_GET** = ``0`` -- **METHOD_PUT** = **3** --- HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of POST as "create or update" and PUT as "update", although many services tend to not make a clear distinction or change their meaning). +HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. -- **METHOD_DELETE** = **4** --- HTTP DELETE method. The DELETE method requests to delete the specified resource. +.. _class_HTTPClient_constant_METHOD_HEAD: -- **METHOD_OPTIONS** = **5** --- HTTP OPTIONS method. The OPTIONS method asks for a description of the communication options for the target resource. Rarely used. +.. rst-class:: classref-enumeration-constant -- **METHOD_TRACE** = **6** --- HTTP TRACE method. The TRACE method performs a message loop-back test along the path to the target resource. Returns the entire HTTP request received in the response body. Rarely used. +:ref:`Method` **METHOD_HEAD** = ``1`` -- **METHOD_CONNECT** = **7** --- HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used. +HTTP HEAD method. The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful to request metadata like HTTP headers or to check if a resource exists. -- **METHOD_PATCH** = **8** --- HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource. +.. _class_HTTPClient_constant_METHOD_POST: -- **METHOD_MAX** = **9** --- Represents the size of the :ref:`Method` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_POST** = ``2`` + +HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files. + +.. _class_HTTPClient_constant_METHOD_PUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_PUT** = ``3`` + +HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of POST as "create or update" and PUT as "update", although many services tend to not make a clear distinction or change their meaning). + +.. _class_HTTPClient_constant_METHOD_DELETE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_DELETE** = ``4`` + +HTTP DELETE method. The DELETE method requests to delete the specified resource. + +.. _class_HTTPClient_constant_METHOD_OPTIONS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_OPTIONS** = ``5`` + +HTTP OPTIONS method. The OPTIONS method asks for a description of the communication options for the target resource. Rarely used. + +.. _class_HTTPClient_constant_METHOD_TRACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_TRACE** = ``6`` + +HTTP TRACE method. The TRACE method performs a message loop-back test along the path to the target resource. Returns the entire HTTP request received in the response body. Rarely used. + +.. _class_HTTPClient_constant_METHOD_CONNECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_CONNECT** = ``7`` + +HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used. + +.. _class_HTTPClient_constant_METHOD_PATCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_PATCH** = ``8`` + +HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource. + +.. _class_HTTPClient_constant_METHOD_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Method` **METHOD_MAX** = ``9`` + +Represents the size of the :ref:`Method` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_HTTPClient_Status: -.. _class_HTTPClient_constant_STATUS_DISCONNECTED: - -.. _class_HTTPClient_constant_STATUS_RESOLVING: - -.. _class_HTTPClient_constant_STATUS_CANT_RESOLVE: - -.. _class_HTTPClient_constant_STATUS_CONNECTING: - -.. _class_HTTPClient_constant_STATUS_CANT_CONNECT: - -.. _class_HTTPClient_constant_STATUS_CONNECTED: - -.. _class_HTTPClient_constant_STATUS_REQUESTING: - -.. _class_HTTPClient_constant_STATUS_BODY: - -.. _class_HTTPClient_constant_STATUS_CONNECTION_ERROR: - -.. _class_HTTPClient_constant_STATUS_TLS_HANDSHAKE_ERROR: +.. rst-class:: classref-enumeration enum **Status**: -- **STATUS_DISCONNECTED** = **0** --- Status: Disconnected from the server. +.. _class_HTTPClient_constant_STATUS_DISCONNECTED: -- **STATUS_RESOLVING** = **1** --- Status: Currently resolving the hostname for the given URL into an IP. +.. rst-class:: classref-enumeration-constant -- **STATUS_CANT_RESOLVE** = **2** --- Status: DNS failure: Can't resolve the hostname for the given URL. +:ref:`Status` **STATUS_DISCONNECTED** = ``0`` -- **STATUS_CONNECTING** = **3** --- Status: Currently connecting to server. +Status: Disconnected from the server. -- **STATUS_CANT_CONNECT** = **4** --- Status: Can't connect to the server. +.. _class_HTTPClient_constant_STATUS_RESOLVING: -- **STATUS_CONNECTED** = **5** --- Status: Connection established. +.. rst-class:: classref-enumeration-constant -- **STATUS_REQUESTING** = **6** --- Status: Currently sending request. +:ref:`Status` **STATUS_RESOLVING** = ``1`` -- **STATUS_BODY** = **7** --- Status: HTTP body received. +Status: Currently resolving the hostname for the given URL into an IP. -- **STATUS_CONNECTION_ERROR** = **8** --- Status: Error in HTTP connection. +.. _class_HTTPClient_constant_STATUS_CANT_RESOLVE: -- **STATUS_TLS_HANDSHAKE_ERROR** = **9** --- Status: Error in TLS handshake. +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CANT_RESOLVE** = ``2`` + +Status: DNS failure: Can't resolve the hostname for the given URL. + +.. _class_HTTPClient_constant_STATUS_CONNECTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CONNECTING** = ``3`` + +Status: Currently connecting to server. + +.. _class_HTTPClient_constant_STATUS_CANT_CONNECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CANT_CONNECT** = ``4`` + +Status: Can't connect to the server. + +.. _class_HTTPClient_constant_STATUS_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CONNECTED** = ``5`` + +Status: Connection established. + +.. _class_HTTPClient_constant_STATUS_REQUESTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_REQUESTING** = ``6`` + +Status: Currently sending request. + +.. _class_HTTPClient_constant_STATUS_BODY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_BODY** = ``7`` + +Status: HTTP body received. + +.. _class_HTTPClient_constant_STATUS_CONNECTION_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CONNECTION_ERROR** = ``8`` + +Status: Error in HTTP connection. + +.. _class_HTTPClient_constant_STATUS_TLS_HANDSHAKE_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_TLS_HANDSHAKE_ERROR** = ``9`` + +Status: Error in TLS handshake. + +.. rst-class:: classref-item-separator ---- .. _enum_HTTPClient_ResponseCode: -.. _class_HTTPClient_constant_RESPONSE_CONTINUE: - -.. _class_HTTPClient_constant_RESPONSE_SWITCHING_PROTOCOLS: - -.. _class_HTTPClient_constant_RESPONSE_PROCESSING: - -.. _class_HTTPClient_constant_RESPONSE_OK: - -.. _class_HTTPClient_constant_RESPONSE_CREATED: - -.. _class_HTTPClient_constant_RESPONSE_ACCEPTED: - -.. _class_HTTPClient_constant_RESPONSE_NON_AUTHORITATIVE_INFORMATION: - -.. _class_HTTPClient_constant_RESPONSE_NO_CONTENT: - -.. _class_HTTPClient_constant_RESPONSE_RESET_CONTENT: - -.. _class_HTTPClient_constant_RESPONSE_PARTIAL_CONTENT: - -.. _class_HTTPClient_constant_RESPONSE_MULTI_STATUS: - -.. _class_HTTPClient_constant_RESPONSE_ALREADY_REPORTED: - -.. _class_HTTPClient_constant_RESPONSE_IM_USED: - -.. _class_HTTPClient_constant_RESPONSE_MULTIPLE_CHOICES: - -.. _class_HTTPClient_constant_RESPONSE_MOVED_PERMANENTLY: - -.. _class_HTTPClient_constant_RESPONSE_FOUND: - -.. _class_HTTPClient_constant_RESPONSE_SEE_OTHER: - -.. _class_HTTPClient_constant_RESPONSE_NOT_MODIFIED: - -.. _class_HTTPClient_constant_RESPONSE_USE_PROXY: - -.. _class_HTTPClient_constant_RESPONSE_SWITCH_PROXY: - -.. _class_HTTPClient_constant_RESPONSE_TEMPORARY_REDIRECT: - -.. _class_HTTPClient_constant_RESPONSE_PERMANENT_REDIRECT: - -.. _class_HTTPClient_constant_RESPONSE_BAD_REQUEST: - -.. _class_HTTPClient_constant_RESPONSE_UNAUTHORIZED: - -.. _class_HTTPClient_constant_RESPONSE_PAYMENT_REQUIRED: - -.. _class_HTTPClient_constant_RESPONSE_FORBIDDEN: - -.. _class_HTTPClient_constant_RESPONSE_NOT_FOUND: - -.. _class_HTTPClient_constant_RESPONSE_METHOD_NOT_ALLOWED: - -.. _class_HTTPClient_constant_RESPONSE_NOT_ACCEPTABLE: - -.. _class_HTTPClient_constant_RESPONSE_PROXY_AUTHENTICATION_REQUIRED: - -.. _class_HTTPClient_constant_RESPONSE_REQUEST_TIMEOUT: - -.. _class_HTTPClient_constant_RESPONSE_CONFLICT: - -.. _class_HTTPClient_constant_RESPONSE_GONE: - -.. _class_HTTPClient_constant_RESPONSE_LENGTH_REQUIRED: - -.. _class_HTTPClient_constant_RESPONSE_PRECONDITION_FAILED: - -.. _class_HTTPClient_constant_RESPONSE_REQUEST_ENTITY_TOO_LARGE: - -.. _class_HTTPClient_constant_RESPONSE_REQUEST_URI_TOO_LONG: - -.. _class_HTTPClient_constant_RESPONSE_UNSUPPORTED_MEDIA_TYPE: - -.. _class_HTTPClient_constant_RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE: - -.. _class_HTTPClient_constant_RESPONSE_EXPECTATION_FAILED: - -.. _class_HTTPClient_constant_RESPONSE_IM_A_TEAPOT: - -.. _class_HTTPClient_constant_RESPONSE_MISDIRECTED_REQUEST: - -.. _class_HTTPClient_constant_RESPONSE_UNPROCESSABLE_ENTITY: - -.. _class_HTTPClient_constant_RESPONSE_LOCKED: - -.. _class_HTTPClient_constant_RESPONSE_FAILED_DEPENDENCY: - -.. _class_HTTPClient_constant_RESPONSE_UPGRADE_REQUIRED: - -.. _class_HTTPClient_constant_RESPONSE_PRECONDITION_REQUIRED: - -.. _class_HTTPClient_constant_RESPONSE_TOO_MANY_REQUESTS: - -.. _class_HTTPClient_constant_RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE: - -.. _class_HTTPClient_constant_RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS: - -.. _class_HTTPClient_constant_RESPONSE_INTERNAL_SERVER_ERROR: - -.. _class_HTTPClient_constant_RESPONSE_NOT_IMPLEMENTED: - -.. _class_HTTPClient_constant_RESPONSE_BAD_GATEWAY: - -.. _class_HTTPClient_constant_RESPONSE_SERVICE_UNAVAILABLE: - -.. _class_HTTPClient_constant_RESPONSE_GATEWAY_TIMEOUT: - -.. _class_HTTPClient_constant_RESPONSE_HTTP_VERSION_NOT_SUPPORTED: - -.. _class_HTTPClient_constant_RESPONSE_VARIANT_ALSO_NEGOTIATES: - -.. _class_HTTPClient_constant_RESPONSE_INSUFFICIENT_STORAGE: - -.. _class_HTTPClient_constant_RESPONSE_LOOP_DETECTED: - -.. _class_HTTPClient_constant_RESPONSE_NOT_EXTENDED: - -.. _class_HTTPClient_constant_RESPONSE_NETWORK_AUTH_REQUIRED: +.. rst-class:: classref-enumeration enum **ResponseCode**: -- **RESPONSE_CONTINUE** = **100** --- HTTP status code ``100 Continue``. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished). +.. _class_HTTPClient_constant_RESPONSE_CONTINUE: -- **RESPONSE_SWITCHING_PROTOCOLS** = **101** --- HTTP status code ``101 Switching Protocol``. Sent in response to an ``Upgrade`` request header by the client. Indicates the protocol the server is switching to. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_PROCESSING** = **102** --- HTTP status code ``102 Processing`` (WebDAV). Indicates that the server has received and is processing the request, but no response is available yet. +:ref:`ResponseCode` **RESPONSE_CONTINUE** = ``100`` -- **RESPONSE_OK** = **200** --- HTTP status code ``200 OK``. The request has succeeded. Default response for successful requests. Meaning varies depending on the request. GET: The resource has been fetched and is transmitted in the message body. HEAD: The entity headers are in the message body. POST: The resource describing the result of the action is transmitted in the message body. TRACE: The message body contains the request message as received by the server. +HTTP status code ``100 Continue``. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished). -- **RESPONSE_CREATED** = **201** --- HTTP status code ``201 Created``. The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request. +.. _class_HTTPClient_constant_RESPONSE_SWITCHING_PROTOCOLS: -- **RESPONSE_ACCEPTED** = **202** --- HTTP status code ``202 Accepted``. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_NON_AUTHORITATIVE_INFORMATION** = **203** --- HTTP status code ``203 Non-Authoritative Information``. This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response. +:ref:`ResponseCode` **RESPONSE_SWITCHING_PROTOCOLS** = ``101`` -- **RESPONSE_NO_CONTENT** = **204** --- HTTP status code ``204 No Content``. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones. +HTTP status code ``101 Switching Protocol``. Sent in response to an ``Upgrade`` request header by the client. Indicates the protocol the server is switching to. -- **RESPONSE_RESET_CONTENT** = **205** --- HTTP status code ``205 Reset Content``. The server has fulfilled the request and desires that the client resets the "document view" that caused the request to be sent to its original state as received from the origin server. +.. _class_HTTPClient_constant_RESPONSE_PROCESSING: -- **RESPONSE_PARTIAL_CONTENT** = **206** --- HTTP status code ``206 Partial Content``. This response code is used because of a range header sent by the client to separate download into multiple streams. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_MULTI_STATUS** = **207** --- HTTP status code ``207 Multi-Status`` (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate. +:ref:`ResponseCode` **RESPONSE_PROCESSING** = ``102`` -- **RESPONSE_ALREADY_REPORTED** = **208** --- HTTP status code ``208 Already Reported`` (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. +HTTP status code ``102 Processing`` (WebDAV). Indicates that the server has received and is processing the request, but no response is available yet. -- **RESPONSE_IM_USED** = **226** --- HTTP status code ``226 IM Used`` (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. +.. _class_HTTPClient_constant_RESPONSE_OK: -- **RESPONSE_MULTIPLE_CHOICES** = **300** --- HTTP status code ``300 Multiple Choice``. The request has more than one possible responses and there is no standardized way to choose one of the responses. User-agent or user should choose one of them. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_MOVED_PERMANENTLY** = **301** --- HTTP status code ``301 Moved Permanently``. Redirection. This response code means the URI of requested resource has been changed. The new URI is usually included in the response. +:ref:`ResponseCode` **RESPONSE_OK** = ``200`` -- **RESPONSE_FOUND** = **302** --- HTTP status code ``302 Found``. Temporary redirection. This response code means the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests. +HTTP status code ``200 OK``. The request has succeeded. Default response for successful requests. Meaning varies depending on the request. GET: The resource has been fetched and is transmitted in the message body. HEAD: The entity headers are in the message body. POST: The resource describing the result of the action is transmitted in the message body. TRACE: The message body contains the request message as received by the server. -- **RESPONSE_SEE_OTHER** = **303** --- HTTP status code ``303 See Other``. The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request. +.. _class_HTTPClient_constant_RESPONSE_CREATED: -- **RESPONSE_NOT_MODIFIED** = **304** --- HTTP status code ``304 Not Modified``. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to ``false``. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_USE_PROXY** = **305** --- HTTP status code ``305 Use Proxy``. *Deprecated. Do not use.* +:ref:`ResponseCode` **RESPONSE_CREATED** = ``201`` -- **RESPONSE_SWITCH_PROXY** = **306** --- HTTP status code ``306 Switch Proxy``. *Deprecated. Do not use.* +HTTP status code ``201 Created``. The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request. -- **RESPONSE_TEMPORARY_REDIRECT** = **307** --- HTTP status code ``307 Temporary Redirect``. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. +.. _class_HTTPClient_constant_RESPONSE_ACCEPTED: -- **RESPONSE_PERMANENT_REDIRECT** = **308** --- HTTP status code ``308 Permanent Redirect``. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_BAD_REQUEST** = **400** --- HTTP status code ``400 Bad Request``. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing). +:ref:`ResponseCode` **RESPONSE_ACCEPTED** = ``202`` -- **RESPONSE_UNAUTHORIZED** = **401** --- HTTP status code ``401 Unauthorized``. Credentials required. The request has not been applied because it lacks valid authentication credentials for the target resource. +HTTP status code ``202 Accepted``. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing. -- **RESPONSE_PAYMENT_REQUIRED** = **402** --- HTTP status code ``402 Payment Required``. This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems, however this is not currently used. +.. _class_HTTPClient_constant_RESPONSE_NON_AUTHORITATIVE_INFORMATION: -- **RESPONSE_FORBIDDEN** = **403** --- HTTP status code ``403 Forbidden``. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike ``401``, the client's identity is known to the server. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_NOT_FOUND** = **404** --- HTTP status code ``404 Not Found``. The server can not find requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist. May also be sent instead of 403 to hide existence of a resource if the client is not authorized. +:ref:`ResponseCode` **RESPONSE_NON_AUTHORITATIVE_INFORMATION** = ``203`` -- **RESPONSE_METHOD_NOT_ALLOWED** = **405** --- HTTP status code ``405 Method Not Allowed``. The request's HTTP method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code. +HTTP status code ``203 Non-Authoritative Information``. This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response. -- **RESPONSE_NOT_ACCEPTABLE** = **406** --- HTTP status code ``406 Not Acceptable``. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request. Used when negotiation content. +.. _class_HTTPClient_constant_RESPONSE_NO_CONTENT: -- **RESPONSE_PROXY_AUTHENTICATION_REQUIRED** = **407** --- HTTP status code ``407 Proxy Authentication Required``. Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_REQUEST_TIMEOUT** = **408** --- HTTP status code ``408 Request Timeout``. The server did not receive a complete request message within the time that it was prepared to wait. +:ref:`ResponseCode` **RESPONSE_NO_CONTENT** = ``204`` -- **RESPONSE_CONFLICT** = **409** --- HTTP status code ``409 Conflict``. The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. +HTTP status code ``204 No Content``. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones. -- **RESPONSE_GONE** = **410** --- HTTP status code ``410 Gone``. The target resource is no longer available at the origin server and this condition is likely permanent. +.. _class_HTTPClient_constant_RESPONSE_RESET_CONTENT: -- **RESPONSE_LENGTH_REQUIRED** = **411** --- HTTP status code ``411 Length Required``. The server refuses to accept the request without a defined Content-Length header. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_PRECONDITION_FAILED** = **412** --- HTTP status code ``412 Precondition Failed``. One or more conditions given in the request header fields evaluated to ``false`` when tested on the server. +:ref:`ResponseCode` **RESPONSE_RESET_CONTENT** = ``205`` -- **RESPONSE_REQUEST_ENTITY_TOO_LARGE** = **413** --- HTTP status code ``413 Entity Too Large``. The server is refusing to process a request because the request payload is larger than the server is willing or able to process. +HTTP status code ``205 Reset Content``. The server has fulfilled the request and desires that the client resets the "document view" that caused the request to be sent to its original state as received from the origin server. -- **RESPONSE_REQUEST_URI_TOO_LONG** = **414** --- HTTP status code ``414 Request-URI Too Long``. The server is refusing to service the request because the request-target is longer than the server is willing to interpret. +.. _class_HTTPClient_constant_RESPONSE_PARTIAL_CONTENT: -- **RESPONSE_UNSUPPORTED_MEDIA_TYPE** = **415** --- HTTP status code ``415 Unsupported Media Type``. The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE** = **416** --- HTTP status code ``416 Requested Range Not Satisfiable``. None of the ranges in the request's Range header field overlap the current extent of the selected resource or the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges. +:ref:`ResponseCode` **RESPONSE_PARTIAL_CONTENT** = ``206`` -- **RESPONSE_EXPECTATION_FAILED** = **417** --- HTTP status code ``417 Expectation Failed``. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers. +HTTP status code ``206 Partial Content``. This response code is used because of a range header sent by the client to separate download into multiple streams. -- **RESPONSE_IM_A_TEAPOT** = **418** --- HTTP status code ``418 I'm A Teapot``. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout. +.. _class_HTTPClient_constant_RESPONSE_MULTI_STATUS: -- **RESPONSE_MISDIRECTED_REQUEST** = **421** --- HTTP status code ``421 Misdirected Request``. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_UNPROCESSABLE_ENTITY** = **422** --- HTTP status code ``422 Unprocessable Entity`` (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions. +:ref:`ResponseCode` **RESPONSE_MULTI_STATUS** = ``207`` -- **RESPONSE_LOCKED** = **423** --- HTTP status code ``423 Locked`` (WebDAV). The source or destination resource of a method is locked. +HTTP status code ``207 Multi-Status`` (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate. -- **RESPONSE_FAILED_DEPENDENCY** = **424** --- HTTP status code ``424 Failed Dependency`` (WebDAV). The method could not be performed on the resource because the requested action depended on another action and that action failed. +.. _class_HTTPClient_constant_RESPONSE_ALREADY_REPORTED: -- **RESPONSE_UPGRADE_REQUIRED** = **426** --- HTTP status code ``426 Upgrade Required``. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_PRECONDITION_REQUIRED** = **428** --- HTTP status code ``428 Precondition Required``. The origin server requires the request to be conditional. +:ref:`ResponseCode` **RESPONSE_ALREADY_REPORTED** = ``208`` -- **RESPONSE_TOO_MANY_REQUESTS** = **429** --- HTTP status code ``429 Too Many Requests``. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later. +HTTP status code ``208 Already Reported`` (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. -- **RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE** = **431** --- HTTP status code ``431 Request Header Fields Too Large``. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. +.. _class_HTTPClient_constant_RESPONSE_IM_USED: -- **RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS** = **451** --- HTTP status code ``451 Response Unavailable For Legal Reasons``. The server is denying access to the resource as a consequence of a legal demand. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_INTERNAL_SERVER_ERROR** = **500** --- HTTP status code ``500 Internal Server Error``. The server encountered an unexpected condition that prevented it from fulfilling the request. +:ref:`ResponseCode` **RESPONSE_IM_USED** = ``226`` -- **RESPONSE_NOT_IMPLEMENTED** = **501** --- HTTP status code ``501 Not Implemented``. The server does not support the functionality required to fulfill the request. +HTTP status code ``226 IM Used`` (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. -- **RESPONSE_BAD_GATEWAY** = **502** --- HTTP status code ``502 Bad Gateway``. The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. Usually returned by load balancers or proxies. +.. _class_HTTPClient_constant_RESPONSE_MULTIPLE_CHOICES: -- **RESPONSE_SERVICE_UNAVAILABLE** = **503** --- HTTP status code ``503 Service Unavailable``. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_GATEWAY_TIMEOUT** = **504** --- HTTP status code ``504 Gateway Timeout``. The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Usually returned by load balancers or proxies. +:ref:`ResponseCode` **RESPONSE_MULTIPLE_CHOICES** = ``300`` -- **RESPONSE_HTTP_VERSION_NOT_SUPPORTED** = **505** --- HTTP status code ``505 HTTP Version Not Supported``. The server does not support, or refuses to support, the major version of HTTP that was used in the request message. +HTTP status code ``300 Multiple Choice``. The request has more than one possible responses and there is no standardized way to choose one of the responses. User-agent or user should choose one of them. -- **RESPONSE_VARIANT_ALSO_NEGOTIATES** = **506** --- HTTP status code ``506 Variant Also Negotiates``. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. +.. _class_HTTPClient_constant_RESPONSE_MOVED_PERMANENTLY: -- **RESPONSE_INSUFFICIENT_STORAGE** = **507** --- HTTP status code ``507 Insufficient Storage``. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. +.. rst-class:: classref-enumeration-constant -- **RESPONSE_LOOP_DETECTED** = **508** --- HTTP status code ``508 Loop Detected``. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed. +:ref:`ResponseCode` **RESPONSE_MOVED_PERMANENTLY** = ``301`` -- **RESPONSE_NOT_EXTENDED** = **510** --- HTTP status code ``510 Not Extended``. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request. +HTTP status code ``301 Moved Permanently``. Redirection. This response code means the URI of requested resource has been changed. The new URI is usually included in the response. -- **RESPONSE_NETWORK_AUTH_REQUIRED** = **511** --- HTTP status code ``511 Network Authentication Required``. The client needs to authenticate to gain network access. +.. _class_HTTPClient_constant_RESPONSE_FOUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_FOUND** = ``302`` + +HTTP status code ``302 Found``. Temporary redirection. This response code means the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests. + +.. _class_HTTPClient_constant_RESPONSE_SEE_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_SEE_OTHER** = ``303`` + +HTTP status code ``303 See Other``. The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request. + +.. _class_HTTPClient_constant_RESPONSE_NOT_MODIFIED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_NOT_MODIFIED** = ``304`` + +HTTP status code ``304 Not Modified``. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to ``false``. + +.. _class_HTTPClient_constant_RESPONSE_USE_PROXY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_USE_PROXY** = ``305`` + +HTTP status code ``305 Use Proxy``. *Deprecated. Do not use.* + +.. _class_HTTPClient_constant_RESPONSE_SWITCH_PROXY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_SWITCH_PROXY** = ``306`` + +HTTP status code ``306 Switch Proxy``. *Deprecated. Do not use.* + +.. _class_HTTPClient_constant_RESPONSE_TEMPORARY_REDIRECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_TEMPORARY_REDIRECT** = ``307`` + +HTTP status code ``307 Temporary Redirect``. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. + +.. _class_HTTPClient_constant_RESPONSE_PERMANENT_REDIRECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_PERMANENT_REDIRECT** = ``308`` + +HTTP status code ``308 Permanent Redirect``. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. + +.. _class_HTTPClient_constant_RESPONSE_BAD_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_BAD_REQUEST** = ``400`` + +HTTP status code ``400 Bad Request``. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing). + +.. _class_HTTPClient_constant_RESPONSE_UNAUTHORIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_UNAUTHORIZED** = ``401`` + +HTTP status code ``401 Unauthorized``. Credentials required. The request has not been applied because it lacks valid authentication credentials for the target resource. + +.. _class_HTTPClient_constant_RESPONSE_PAYMENT_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_PAYMENT_REQUIRED** = ``402`` + +HTTP status code ``402 Payment Required``. This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems, however this is not currently used. + +.. _class_HTTPClient_constant_RESPONSE_FORBIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_FORBIDDEN** = ``403`` + +HTTP status code ``403 Forbidden``. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike ``401``, the client's identity is known to the server. + +.. _class_HTTPClient_constant_RESPONSE_NOT_FOUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_NOT_FOUND** = ``404`` + +HTTP status code ``404 Not Found``. The server can not find requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist. May also be sent instead of 403 to hide existence of a resource if the client is not authorized. + +.. _class_HTTPClient_constant_RESPONSE_METHOD_NOT_ALLOWED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_METHOD_NOT_ALLOWED** = ``405`` + +HTTP status code ``405 Method Not Allowed``. The request's HTTP method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code. + +.. _class_HTTPClient_constant_RESPONSE_NOT_ACCEPTABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_NOT_ACCEPTABLE** = ``406`` + +HTTP status code ``406 Not Acceptable``. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request. Used when negotiation content. + +.. _class_HTTPClient_constant_RESPONSE_PROXY_AUTHENTICATION_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_PROXY_AUTHENTICATION_REQUIRED** = ``407`` + +HTTP status code ``407 Proxy Authentication Required``. Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy. + +.. _class_HTTPClient_constant_RESPONSE_REQUEST_TIMEOUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_REQUEST_TIMEOUT** = ``408`` + +HTTP status code ``408 Request Timeout``. The server did not receive a complete request message within the time that it was prepared to wait. + +.. _class_HTTPClient_constant_RESPONSE_CONFLICT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_CONFLICT** = ``409`` + +HTTP status code ``409 Conflict``. The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. + +.. _class_HTTPClient_constant_RESPONSE_GONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_GONE** = ``410`` + +HTTP status code ``410 Gone``. The target resource is no longer available at the origin server and this condition is likely permanent. + +.. _class_HTTPClient_constant_RESPONSE_LENGTH_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_LENGTH_REQUIRED** = ``411`` + +HTTP status code ``411 Length Required``. The server refuses to accept the request without a defined Content-Length header. + +.. _class_HTTPClient_constant_RESPONSE_PRECONDITION_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_PRECONDITION_FAILED** = ``412`` + +HTTP status code ``412 Precondition Failed``. One or more conditions given in the request header fields evaluated to ``false`` when tested on the server. + +.. _class_HTTPClient_constant_RESPONSE_REQUEST_ENTITY_TOO_LARGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_REQUEST_ENTITY_TOO_LARGE** = ``413`` + +HTTP status code ``413 Entity Too Large``. The server is refusing to process a request because the request payload is larger than the server is willing or able to process. + +.. _class_HTTPClient_constant_RESPONSE_REQUEST_URI_TOO_LONG: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_REQUEST_URI_TOO_LONG** = ``414`` + +HTTP status code ``414 Request-URI Too Long``. The server is refusing to service the request because the request-target is longer than the server is willing to interpret. + +.. _class_HTTPClient_constant_RESPONSE_UNSUPPORTED_MEDIA_TYPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_UNSUPPORTED_MEDIA_TYPE** = ``415`` + +HTTP status code ``415 Unsupported Media Type``. The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. + +.. _class_HTTPClient_constant_RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE** = ``416`` + +HTTP status code ``416 Requested Range Not Satisfiable``. None of the ranges in the request's Range header field overlap the current extent of the selected resource or the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges. + +.. _class_HTTPClient_constant_RESPONSE_EXPECTATION_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_EXPECTATION_FAILED** = ``417`` + +HTTP status code ``417 Expectation Failed``. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers. + +.. _class_HTTPClient_constant_RESPONSE_IM_A_TEAPOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_IM_A_TEAPOT** = ``418`` + +HTTP status code ``418 I'm A Teapot``. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout. + +.. _class_HTTPClient_constant_RESPONSE_MISDIRECTED_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_MISDIRECTED_REQUEST** = ``421`` + +HTTP status code ``421 Misdirected Request``. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI. + +.. _class_HTTPClient_constant_RESPONSE_UNPROCESSABLE_ENTITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_UNPROCESSABLE_ENTITY** = ``422`` + +HTTP status code ``422 Unprocessable Entity`` (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions. + +.. _class_HTTPClient_constant_RESPONSE_LOCKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_LOCKED** = ``423`` + +HTTP status code ``423 Locked`` (WebDAV). The source or destination resource of a method is locked. + +.. _class_HTTPClient_constant_RESPONSE_FAILED_DEPENDENCY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_FAILED_DEPENDENCY** = ``424`` + +HTTP status code ``424 Failed Dependency`` (WebDAV). The method could not be performed on the resource because the requested action depended on another action and that action failed. + +.. _class_HTTPClient_constant_RESPONSE_UPGRADE_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_UPGRADE_REQUIRED** = ``426`` + +HTTP status code ``426 Upgrade Required``. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. + +.. _class_HTTPClient_constant_RESPONSE_PRECONDITION_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_PRECONDITION_REQUIRED** = ``428`` + +HTTP status code ``428 Precondition Required``. The origin server requires the request to be conditional. + +.. _class_HTTPClient_constant_RESPONSE_TOO_MANY_REQUESTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_TOO_MANY_REQUESTS** = ``429`` + +HTTP status code ``429 Too Many Requests``. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later. + +.. _class_HTTPClient_constant_RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE** = ``431`` + +HTTP status code ``431 Request Header Fields Too Large``. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. + +.. _class_HTTPClient_constant_RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS** = ``451`` + +HTTP status code ``451 Response Unavailable For Legal Reasons``. The server is denying access to the resource as a consequence of a legal demand. + +.. _class_HTTPClient_constant_RESPONSE_INTERNAL_SERVER_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_INTERNAL_SERVER_ERROR** = ``500`` + +HTTP status code ``500 Internal Server Error``. The server encountered an unexpected condition that prevented it from fulfilling the request. + +.. _class_HTTPClient_constant_RESPONSE_NOT_IMPLEMENTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_NOT_IMPLEMENTED** = ``501`` + +HTTP status code ``501 Not Implemented``. The server does not support the functionality required to fulfill the request. + +.. _class_HTTPClient_constant_RESPONSE_BAD_GATEWAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_BAD_GATEWAY** = ``502`` + +HTTP status code ``502 Bad Gateway``. The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. Usually returned by load balancers or proxies. + +.. _class_HTTPClient_constant_RESPONSE_SERVICE_UNAVAILABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_SERVICE_UNAVAILABLE** = ``503`` + +HTTP status code ``503 Service Unavailable``. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later. + +.. _class_HTTPClient_constant_RESPONSE_GATEWAY_TIMEOUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_GATEWAY_TIMEOUT** = ``504`` + +HTTP status code ``504 Gateway Timeout``. The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Usually returned by load balancers or proxies. + +.. _class_HTTPClient_constant_RESPONSE_HTTP_VERSION_NOT_SUPPORTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_HTTP_VERSION_NOT_SUPPORTED** = ``505`` + +HTTP status code ``505 HTTP Version Not Supported``. The server does not support, or refuses to support, the major version of HTTP that was used in the request message. + +.. _class_HTTPClient_constant_RESPONSE_VARIANT_ALSO_NEGOTIATES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_VARIANT_ALSO_NEGOTIATES** = ``506`` + +HTTP status code ``506 Variant Also Negotiates``. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. + +.. _class_HTTPClient_constant_RESPONSE_INSUFFICIENT_STORAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_INSUFFICIENT_STORAGE** = ``507`` + +HTTP status code ``507 Insufficient Storage``. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. + +.. _class_HTTPClient_constant_RESPONSE_LOOP_DETECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_LOOP_DETECTED** = ``508`` + +HTTP status code ``508 Loop Detected``. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed. + +.. _class_HTTPClient_constant_RESPONSE_NOT_EXTENDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_NOT_EXTENDED** = ``510`` + +HTTP status code ``510 Not Extended``. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request. + +.. _class_HTTPClient_constant_RESPONSE_NETWORK_AUTH_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResponseCode` **RESPONSE_NETWORK_AUTH_REQUIRED** = ``511`` + +HTTP status code ``511 Network Authentication Required``. The client needs to authenticate to gain network access. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_HTTPClient_property_blocking_mode_enabled: -- :ref:`bool` **blocking_mode_enabled** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_blocking_mode(value) | -+-----------+----------------------------+ -| *Getter* | is_blocking_mode_enabled() | -+-----------+----------------------------+ +:ref:`bool` **blocking_mode_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_blocking_mode** **(** :ref:`bool` value **)** +- :ref:`bool` **is_blocking_mode_enabled** **(** **)** If ``true``, execution will block until all data is read from the response. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_property_connection: -- :ref:`StreamPeer` **connection** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_connection(value) | -+----------+-----------------------+ -| *Getter* | get_connection() | -+----------+-----------------------+ +:ref:`StreamPeer` **connection** + +.. rst-class:: classref-property-setget + +- void **set_connection** **(** :ref:`StreamPeer` value **)** +- :ref:`StreamPeer` **get_connection** **(** **)** The connection to use for this client. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_property_read_chunk_size: -- :ref:`int` **read_chunk_size** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``65536`` | -+-----------+----------------------------+ -| *Setter* | set_read_chunk_size(value) | -+-----------+----------------------------+ -| *Getter* | get_read_chunk_size() | -+-----------+----------------------------+ +:ref:`int` **read_chunk_size** = ``65536`` + +.. rst-class:: classref-property-setget + +- void **set_read_chunk_size** **(** :ref:`int` value **)** +- :ref:`int` **get_read_chunk_size** **(** **)** The size of the buffer used and maximum bytes to read per iteration. See :ref:`read_response_body_chunk`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_HTTPClient_method_close: -- void **close** **(** **)** +.. rst-class:: classref-method -Closes the current connection, allowing reuse of this ``HTTPClient``. +void **close** **(** **)** + +Closes the current connection, allowing reuse of this **HTTPClient**. + +.. rst-class:: classref-item-separator ---- .. _class_HTTPClient_method_connect_to_host: -- :ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port=-1, :ref:`bool` use_tls=false, :ref:`bool` verify_host=true **)** +.. rst-class:: classref-method + +:ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port=-1, :ref:`bool` use_tls=false, :ref:`bool` verify_host=true **)** Connects to a host. This needs to be done before any requests are sent. @@ -505,37 +880,53 @@ If no ``port`` is specified (or ``-1`` is used), it is automatically set to 80 f \ ``verify_host`` will check the TLS identity of the host if set to ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_get_response_body_length: -- :ref:`int` **get_response_body_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_response_body_length** **(** **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_get_response_code: -- :ref:`int` **get_response_code** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_response_code** **(** **)** |const| Returns the response's HTTP status code. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_get_response_headers: -- :ref:`PackedStringArray` **get_response_headers** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_response_headers** **(** **)** Returns the response headers. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_get_response_headers_as_dictionary: -- :ref:`Dictionary` **get_response_headers_as_dictionary** **(** **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **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. @@ -548,43 +939,63 @@ Returns all response headers as a Dictionary of structure ``{ "key": "value1; va "Content-Type": "application/json; charset=UTF-8", } +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_get_status: -- :ref:`Status` **get_status** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Status` **get_status** **(** **)** |const| Returns a :ref:`Status` constant. Need to call :ref:`poll` in order to get status updates. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_has_response: -- :ref:`bool` **has_response** **(** **)** |const| +.. rst-class:: classref-method -If ``true``, this ``HTTPClient`` has a response available. +:ref:`bool` **has_response** **(** **)** |const| + +If ``true``, this **HTTPClient** has a response available. + +.. rst-class:: classref-item-separator ---- .. _class_HTTPClient_method_is_response_chunked: -- :ref:`bool` **is_response_chunked** **(** **)** |const| +.. rst-class:: classref-method -If ``true``, this ``HTTPClient`` has a response that is chunked. +:ref:`bool` **is_response_chunked** **(** **)** |const| + +If ``true``, this **HTTPClient** has a response that is chunked. + +.. rst-class:: classref-item-separator ---- .. _class_HTTPClient_method_poll: -- :ref:`Error` **poll** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **poll** **(** **)** This needs to be called in order to have any request processed. Check results with :ref:`get_status`. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_query_string_from_dict: -- :ref:`String` **query_string_from_dict** **(** :ref:`Dictionary` fields **)** +.. rst-class:: classref-method + +:ref:`String` **query_string_from_dict** **(** :ref:`Dictionary` fields **)** Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: @@ -624,19 +1035,27 @@ Furthermore, if a key has a ``null`` value, only the key itself is added, withou +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_read_response_body_chunk: -- :ref:`PackedByteArray` **read_response_body_chunk** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **read_response_body_chunk** **(** **)** Reads one chunk from the response. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_request: -- :ref:`Error` **request** **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`String` body="" **)** +.. rst-class:: classref-method + +:ref:`Error` **request** **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`String` body="" **)** Sends a request to the connected host. @@ -667,11 +1086,15 @@ To create a POST request with query strings to push to the server, do: \ **Note:** The ``body`` parameter is ignored if ``method`` is :ref:`METHOD_GET`. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See :ref:`String.uri_encode` for an example. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_request_raw: -- :ref:`Error` **request_raw** **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`PackedByteArray` body **)** +.. rst-class:: classref-method + +:ref:`Error` **request_raw** **(** :ref:`Method` method, :ref:`String` url, :ref:`PackedStringArray` headers, :ref:`PackedByteArray` body **)** Sends a raw request to the connected host. @@ -681,21 +1104,29 @@ Headers are HTTP request headers. For available HTTP methods, see :ref:`Method` host, :ref:`int` port **)** +.. rst-class:: classref-method + +void **set_http_proxy** **(** :ref:`String` host, :ref:`int` port **)** Sets the proxy server for HTTP requests. The proxy server is unset if ``host`` is empty or ``port`` is -1. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPClient_method_set_https_proxy: -- void **set_https_proxy** **(** :ref:`String` host, :ref:`int` port **)** +.. rst-class:: classref-method + +void **set_https_proxy** **(** :ref:`String` host, :ref:`int` port **)** Sets the proxy server for HTTPS requests. diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index f1fa35f23..d8e7a8da9 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -14,6 +14,8 @@ HTTPRequest A node with the ability to send HTTP(S) requests. +.. rst-class:: classref-introduction-group + Description ----------- @@ -182,6 +184,8 @@ Can be used to make HTTP requests, i.e. download or upload files or web content \ **Gzipped response bodies**: HTTPRequest will automatically handle decompression of response bodies. A ``Accept-Encoding`` header will be automatically added to each of your requests, unless one is already specified. Any response with a ``Content-Encoding: gzip`` header will automatically be decompressed and delivered to you as uncompressed bytes. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -189,132 +193,219 @@ Tutorials - :doc:`TLS certificates <../tutorials/networking/ssl_certificates>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`accept_gzip` | ``true`` | -+-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`body_size_limit` | ``-1`` | -+-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`download_chunk_size` | ``65536`` | -+-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`download_file` | ``""`` | -+-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`max_redirects` | ``8`` | -+-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`timeout` | ``0.0`` | -+-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_threads` | ``false`` | -+-----------------------------+----------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`accept_gzip` | ``true`` | + +-----------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`body_size_limit` | ``-1`` | + +-----------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`download_chunk_size` | ``65536`` | + +-----------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`download_file` | ``""`` | + +-----------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`max_redirects` | ``8`` | + +-----------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`timeout` | ``0.0`` | + +-----------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_threads` | ``false`` | + +-----------------------------+----------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cancel_request` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_body_size` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_downloaded_bytes` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Status` | :ref:`get_http_client_status` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`request` **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`String` request_data="" **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`request_raw` **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`PackedByteArray` request_data_raw=PackedByteArray() **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_http_proxy` **(** :ref:`String` host, :ref:`int` port **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_https_proxy` **(** :ref:`String` host, :ref:`int` port **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`cancel_request` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_body_size` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_downloaded_bytes` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`get_http_client_status` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`request` **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`String` request_data="" **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`request_raw` **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`PackedByteArray` request_data_raw=PackedByteArray() **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_http_proxy` **(** :ref:`String` host, :ref:`int` port **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_https_proxy` **(** :ref:`String` host, :ref:`int` port **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_HTTPRequest_signal_request_completed: -- **request_completed** **(** :ref:`int` result, :ref:`int` response_code, :ref:`PackedStringArray` headers, :ref:`PackedByteArray` body **)** +.. rst-class:: classref-signal + +**request_completed** **(** :ref:`int` result, :ref:`int` response_code, :ref:`PackedStringArray` headers, :ref:`PackedByteArray` body **)** Emitted when a request is completed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_HTTPRequest_Result: -.. _class_HTTPRequest_constant_RESULT_SUCCESS: - -.. _class_HTTPRequest_constant_RESULT_CHUNKED_BODY_SIZE_MISMATCH: - -.. _class_HTTPRequest_constant_RESULT_CANT_CONNECT: - -.. _class_HTTPRequest_constant_RESULT_CANT_RESOLVE: - -.. _class_HTTPRequest_constant_RESULT_CONNECTION_ERROR: - -.. _class_HTTPRequest_constant_RESULT_TLS_HANDSHAKE_ERROR: - -.. _class_HTTPRequest_constant_RESULT_NO_RESPONSE: - -.. _class_HTTPRequest_constant_RESULT_BODY_SIZE_LIMIT_EXCEEDED: - -.. _class_HTTPRequest_constant_RESULT_BODY_DECOMPRESS_FAILED: - -.. _class_HTTPRequest_constant_RESULT_REQUEST_FAILED: - -.. _class_HTTPRequest_constant_RESULT_DOWNLOAD_FILE_CANT_OPEN: - -.. _class_HTTPRequest_constant_RESULT_DOWNLOAD_FILE_WRITE_ERROR: - -.. _class_HTTPRequest_constant_RESULT_REDIRECT_LIMIT_REACHED: - -.. _class_HTTPRequest_constant_RESULT_TIMEOUT: +.. rst-class:: classref-enumeration enum **Result**: -- **RESULT_SUCCESS** = **0** --- Request successful. +.. _class_HTTPRequest_constant_RESULT_SUCCESS: -- **RESULT_CHUNKED_BODY_SIZE_MISMATCH** = **1** +.. rst-class:: classref-enumeration-constant -- **RESULT_CANT_CONNECT** = **2** --- Request failed while connecting. +:ref:`Result` **RESULT_SUCCESS** = ``0`` -- **RESULT_CANT_RESOLVE** = **3** --- Request failed while resolving. +Request successful. -- **RESULT_CONNECTION_ERROR** = **4** --- Request failed due to connection (read/write) error. +.. _class_HTTPRequest_constant_RESULT_CHUNKED_BODY_SIZE_MISMATCH: -- **RESULT_TLS_HANDSHAKE_ERROR** = **5** --- Request failed on TLS handshake. +.. rst-class:: classref-enumeration-constant -- **RESULT_NO_RESPONSE** = **6** --- Request does not have a response (yet). +:ref:`Result` **RESULT_CHUNKED_BODY_SIZE_MISMATCH** = ``1`` -- **RESULT_BODY_SIZE_LIMIT_EXCEEDED** = **7** --- Request exceeded its maximum size limit, see :ref:`body_size_limit`. -- **RESULT_BODY_DECOMPRESS_FAILED** = **8** -- **RESULT_REQUEST_FAILED** = **9** --- Request failed (currently unused). +.. _class_HTTPRequest_constant_RESULT_CANT_CONNECT: -- **RESULT_DOWNLOAD_FILE_CANT_OPEN** = **10** --- HTTPRequest couldn't open the download file. +.. rst-class:: classref-enumeration-constant -- **RESULT_DOWNLOAD_FILE_WRITE_ERROR** = **11** --- HTTPRequest couldn't write to the download file. +:ref:`Result` **RESULT_CANT_CONNECT** = ``2`` -- **RESULT_REDIRECT_LIMIT_REACHED** = **12** --- Request reached its maximum redirect limit, see :ref:`max_redirects`. +Request failed while connecting. -- **RESULT_TIMEOUT** = **13** +.. _class_HTTPRequest_constant_RESULT_CANT_RESOLVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_CANT_RESOLVE** = ``3`` + +Request failed while resolving. + +.. _class_HTTPRequest_constant_RESULT_CONNECTION_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_CONNECTION_ERROR** = ``4`` + +Request failed due to connection (read/write) error. + +.. _class_HTTPRequest_constant_RESULT_TLS_HANDSHAKE_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_TLS_HANDSHAKE_ERROR** = ``5`` + +Request failed on TLS handshake. + +.. _class_HTTPRequest_constant_RESULT_NO_RESPONSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_NO_RESPONSE** = ``6`` + +Request does not have a response (yet). + +.. _class_HTTPRequest_constant_RESULT_BODY_SIZE_LIMIT_EXCEEDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_BODY_SIZE_LIMIT_EXCEEDED** = ``7`` + +Request exceeded its maximum size limit, see :ref:`body_size_limit`. + +.. _class_HTTPRequest_constant_RESULT_BODY_DECOMPRESS_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_BODY_DECOMPRESS_FAILED** = ``8`` + + + +.. _class_HTTPRequest_constant_RESULT_REQUEST_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_REQUEST_FAILED** = ``9`` + +Request failed (currently unused). + +.. _class_HTTPRequest_constant_RESULT_DOWNLOAD_FILE_CANT_OPEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_DOWNLOAD_FILE_CANT_OPEN** = ``10`` + +HTTPRequest couldn't open the download file. + +.. _class_HTTPRequest_constant_RESULT_DOWNLOAD_FILE_WRITE_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_DOWNLOAD_FILE_WRITE_ERROR** = ``11`` + +HTTPRequest couldn't write to the download file. + +.. _class_HTTPRequest_constant_RESULT_REDIRECT_LIMIT_REACHED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_REDIRECT_LIMIT_REACHED** = ``12`` + +Request reached its maximum redirect limit, see :ref:`max_redirects`. + +.. _class_HTTPRequest_constant_RESULT_TIMEOUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Result` **RESULT_TIMEOUT** = ``13`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_HTTPRequest_property_accept_gzip: -- :ref:`bool` **accept_gzip** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_accept_gzip(value) | -+-----------+------------------------+ -| *Getter* | is_accepting_gzip() | -+-----------+------------------------+ +:ref:`bool` **accept_gzip** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_accept_gzip** **(** :ref:`bool` value **)** +- :ref:`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. @@ -324,144 +415,174 @@ If the user has specified their own ``Accept-Encoding`` header, then no header w 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``. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_property_body_size_limit: -- :ref:`int` **body_size_limit** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``-1`` | -+-----------+----------------------------+ -| *Setter* | set_body_size_limit(value) | -+-----------+----------------------------+ -| *Getter* | get_body_size_limit() | -+-----------+----------------------------+ +:ref:`int` **body_size_limit** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_body_size_limit** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_property_download_chunk_size: -- :ref:`int` **download_chunk_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``65536`` | -+-----------+--------------------------------+ -| *Setter* | set_download_chunk_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_download_chunk_size() | -+-----------+--------------------------------+ +:ref:`int` **download_chunk_size** = ``65536`` + +.. rst-class:: classref-property-setget + +- void **set_download_chunk_size** **(** :ref:`int` value **)** +- :ref:`int` **get_download_chunk_size** **(** **)** The size of the buffer used and maximum bytes to read per iteration. See :ref:`HTTPClient.read_chunk_size`. Set this to a lower value (e.g. 4096 for 4 KiB) when downloading small files to decrease memory usage at the cost of download speeds. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_property_download_file: -- :ref:`String` **download_file** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``""`` | -+-----------+--------------------------+ -| *Setter* | set_download_file(value) | -+-----------+--------------------------+ -| *Getter* | get_download_file() | -+-----------+--------------------------+ +:ref:`String` **download_file** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_download_file** **(** :ref:`String` value **)** +- :ref:`String` **get_download_file** **(** **)** The file to download into. Will output any received file into it. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_property_max_redirects: -- :ref:`int` **max_redirects** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``8`` | -+-----------+--------------------------+ -| *Setter* | set_max_redirects(value) | -+-----------+--------------------------+ -| *Getter* | get_max_redirects() | -+-----------+--------------------------+ +:ref:`int` **max_redirects** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_max_redirects** **(** :ref:`int` value **)** +- :ref:`int` **get_max_redirects** **(** **)** Maximum number of allowed redirects. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_property_timeout: -- :ref:`float` **timeout** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_timeout(value) | -+-----------+--------------------+ -| *Getter* | get_timeout() | -+-----------+--------------------+ +:ref:`float` **timeout** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_timeout** **(** :ref:`float` value **)** +- :ref:`float` **get_timeout** **(** **)** If set to a value greater than ``0.0`` before the request starts, the HTTP request will time out after ``timeout`` seconds have passed and the request is not *completed* yet. For small HTTP requests such as REST API usage, set :ref:`timeout` to a value between ``10.0`` and ``30.0`` to prevent the application from getting stuck if the request fails to get a response in a timely manner. For file downloads, leave this to ``0.0`` to prevent the download from failing if it takes too much time. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_property_use_threads: -- :ref:`bool` **use_threads** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_use_threads(value) | -+-----------+------------------------+ -| *Getter* | is_using_threads() | -+-----------+------------------------+ +:ref:`bool` **use_threads** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_threads** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_threads** **(** **)** If ``true``, multithreading is used to improve performance. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_HTTPRequest_method_cancel_request: -- void **cancel_request** **(** **)** +.. rst-class:: classref-method + +void **cancel_request** **(** **)** Cancels the current request. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_method_get_body_size: -- :ref:`int` **get_body_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_body_size** **(** **)** |const| Returns the response 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``. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_method_get_downloaded_bytes: -- :ref:`int` **get_downloaded_bytes** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_downloaded_bytes** **(** **)** |const| Returns the number of bytes this HTTPRequest downloaded. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_method_get_http_client_status: -- :ref:`Status` **get_http_client_status** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Status` **get_http_client_status** **(** **)** |const| Returns the current status of the underlying :ref:`HTTPClient`. See :ref:`Status`. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_method_request: -- :ref:`Error` **request** **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`String` request_data="" **)** +.. rst-class:: classref-method + +:ref:`Error` **request** **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`String` request_data="" **)** Creates request on the underlying :ref:`HTTPClient`. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host` and passes parameters onto :ref:`HTTPClient.request`. @@ -471,31 +592,43 @@ Returns :ref:`@GlobalScope.OK` if request is suc \ **Note:** It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_method_request_raw: -- :ref:`Error` **request_raw** **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`PackedByteArray` request_data_raw=PackedByteArray() **)** +.. rst-class:: classref-method + +:ref:`Error` **request_raw** **(** :ref:`String` url, :ref:`PackedStringArray` custom_headers=PackedStringArray(), :ref:`bool` tls_validate_domain=true, :ref:`Method` method=0, :ref:`PackedByteArray` request_data_raw=PackedByteArray() **)** Creates request on the underlying :ref:`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` and passes parameters onto :ref:`HTTPClient.request`. Returns :ref:`@GlobalScope.OK` if request is successfully created. (Does not imply that the server has responded), :ref:`@GlobalScope.ERR_UNCONFIGURED` if not in the tree, :ref:`@GlobalScope.ERR_BUSY` if still processing previous request, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if given string is not a valid URL format, or :ref:`@GlobalScope.ERR_CANT_CONNECT` if not using thread and the :ref:`HTTPClient` cannot connect to host. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_method_set_http_proxy: -- void **set_http_proxy** **(** :ref:`String` host, :ref:`int` port **)** +.. rst-class:: classref-method + +void **set_http_proxy** **(** :ref:`String` host, :ref:`int` port **)** Sets the proxy server for HTTP requests. The proxy server is unset if ``host`` is empty or ``port`` is -1. +.. rst-class:: classref-item-separator + ---- .. _class_HTTPRequest_method_set_https_proxy: -- void **set_https_proxy** **(** :ref:`String` host, :ref:`int` port **)** +.. rst-class:: classref-method + +void **set_https_proxy** **(** :ref:`String` host, :ref:`int` port **)** Sets the proxy server for HTTPS requests. diff --git a/classes/class_image.rst b/classes/class_image.rst index 584dd9dcd..318ff38aa 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -14,354 +14,538 @@ Image Image datatype. +.. rst-class:: classref-introduction-group + Description ----------- -Native image datatype. Contains image data which can be converted to an :ref:`ImageTexture` and provides commonly used *image processing* methods. The maximum width and height for an ``Image`` are :ref:`MAX_WIDTH` and :ref:`MAX_HEIGHT`. +Native image datatype. Contains image data which can be converted to an :ref:`ImageTexture` and provides commonly used *image processing* methods. The maximum width and height for an **Image** are :ref:`MAX_WIDTH` and :ref:`MAX_HEIGHT`. -An ``Image`` cannot be assigned to a ``texture`` property of an object directly (such as :ref:`Sprite2D`), and has to be converted manually to an :ref:`ImageTexture` first. +An **Image** cannot be assigned to a ``texture`` property of an object directly (such as :ref:`Sprite2D`), and has to be converted manually to an :ref:`ImageTexture` first. \ **Note:** The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Importing images <../tutorials/assets_pipeline/importing_images>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+----------------------------------------+------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`data` | ``{ "data": PackedByteArray(), "format": "Lum8", "height": 0, "mipmaps": false, "width": 0 }`` | -+-------------------------------------+----------------------------------------+------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+----------------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`data` | ``{ "data": PackedByteArray(), "format": "Lum8", "height": 0, "mipmaps": false, "width": 0 }`` | + +-------------------------------------+----------------------------------------+------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`adjust_bcs` **(** :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`blend_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`blend_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`blit_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`blit_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bump_map_to_normal_map` **(** :ref:`float` bump_scale=1.0 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_mipmaps` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`compress` **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`compress_from_channels` **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`compute_image_metrics` **(** :ref:`Image` compared_image, :ref:`bool` use_luma **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`convert` **(** :ref:`Format` format **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`copy_from` **(** :ref:`Image` src **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`create` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format **)** |static| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`create_from_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** |static| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`crop` **(** :ref:`int` width, :ref:`int` height **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`decompress` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AlphaMode` | :ref:`detect_alpha` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`UsedChannels` | :ref:`detect_used_channels` **(** :ref:`CompressSource` source=0 **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`Color` color **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill_rect` **(** :ref:`Rect2i` rect, :ref:`Color` color **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fix_alpha_edges` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`flip_x` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`flip_y` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`generate_mipmaps` **(** :ref:`bool` renormalize=false **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`get_data` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`get_format` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_height` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_mipmap_offset` **(** :ref:`int` mipmap **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_pixel` **(** :ref:`int` x, :ref:`int` y **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_pixelv` **(** :ref:`Vector2i` point **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_region` **(** :ref:`Rect2i` region **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`get_used_rect` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_width` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_compressed` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_invisible` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_bmp_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`load_from_file` **(** :ref:`String` path **)** |static| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_jpg_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_png_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_tga_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_webp_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`normal_map_to_xy` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`premultiply_alpha` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` width, :ref:`int` height, :ref:`Interpolation` interpolation=1 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize_to_po2` **(** :ref:`bool` square=false, :ref:`Interpolation` interpolation=1 **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`rgbe_to_srgb` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_180` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_90` **(** :ref:`ClockDirection` direction **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_exr` **(** :ref:`String` path, :ref:`bool` grayscale=false **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`save_exr_to_buffer` **(** :ref:`bool` grayscale=false **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_jpg` **(** :ref:`String` path, :ref:`float` quality=0.75 **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`save_jpg_to_buffer` **(** :ref:`float` quality=0.75 **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_png` **(** :ref:`String` path **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`save_png_to_buffer` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_webp` **(** :ref:`String` path, :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`save_webp_to_buffer` **(** :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_pixelv` **(** :ref:`Vector2i` point, :ref:`Color` color **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shrink_x2` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`srgb_to_linear` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`adjust_bcs` **(** :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blend_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blend_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blit_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blit_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bump_map_to_normal_map` **(** :ref:`float` bump_scale=1.0 **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_mipmaps` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`compress` **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7 **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`compress_from_channels` **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7 **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`compute_image_metrics` **(** :ref:`Image` compared_image, :ref:`bool` use_luma **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`convert` **(** :ref:`Format` format **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`copy_from` **(** :ref:`Image` src **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`create` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format **)** |static| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`create_from_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** |static| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`crop` **(** :ref:`int` width, :ref:`int` height **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`decompress` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AlphaMode` | :ref:`detect_alpha` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UsedChannels` | :ref:`detect_used_channels` **(** :ref:`CompressSource` source=0 **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`Color` color **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_rect` **(** :ref:`Rect2i` rect, :ref:`Color` color **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fix_alpha_edges` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flip_x` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flip_y` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`generate_mipmaps` **(** :ref:`bool` renormalize=false **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_data` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_height` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_mipmap_offset` **(** :ref:`int` mipmap **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_pixel` **(** :ref:`int` x, :ref:`int` y **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_pixelv` **(** :ref:`Vector2i` point **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_region` **(** :ref:`Rect2i` region **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_used_rect` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_width` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_compressed` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_invisible` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_bmp_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`load_from_file` **(** :ref:`String` path **)** |static| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_jpg_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_png_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_tga_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_webp_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`normal_map_to_xy` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`premultiply_alpha` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`resize` **(** :ref:`int` width, :ref:`int` height, :ref:`Interpolation` interpolation=1 **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`resize_to_po2` **(** :ref:`bool` square=false, :ref:`Interpolation` interpolation=1 **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`rgbe_to_srgb` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_180` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_90` **(** :ref:`ClockDirection` direction **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_exr` **(** :ref:`String` path, :ref:`bool` grayscale=false **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_exr_to_buffer` **(** :ref:`bool` grayscale=false **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_jpg` **(** :ref:`String` path, :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_jpg_to_buffer` **(** :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_png` **(** :ref:`String` path **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_png_to_buffer` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_webp` **(** :ref:`String` path, :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_webp_to_buffer` **(** :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_pixelv` **(** :ref:`Vector2i` point, :ref:`Color` color **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shrink_x2` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`srgb_to_linear` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Image_Format: -.. _class_Image_constant_FORMAT_L8: - -.. _class_Image_constant_FORMAT_LA8: - -.. _class_Image_constant_FORMAT_R8: - -.. _class_Image_constant_FORMAT_RG8: - -.. _class_Image_constant_FORMAT_RGB8: - -.. _class_Image_constant_FORMAT_RGBA8: - -.. _class_Image_constant_FORMAT_RGBA4444: - -.. _class_Image_constant_FORMAT_RGB565: - -.. _class_Image_constant_FORMAT_RF: - -.. _class_Image_constant_FORMAT_RGF: - -.. _class_Image_constant_FORMAT_RGBF: - -.. _class_Image_constant_FORMAT_RGBAF: - -.. _class_Image_constant_FORMAT_RH: - -.. _class_Image_constant_FORMAT_RGH: - -.. _class_Image_constant_FORMAT_RGBH: - -.. _class_Image_constant_FORMAT_RGBAH: - -.. _class_Image_constant_FORMAT_RGBE9995: - -.. _class_Image_constant_FORMAT_DXT1: - -.. _class_Image_constant_FORMAT_DXT3: - -.. _class_Image_constant_FORMAT_DXT5: - -.. _class_Image_constant_FORMAT_RGTC_R: - -.. _class_Image_constant_FORMAT_RGTC_RG: - -.. _class_Image_constant_FORMAT_BPTC_RGBA: - -.. _class_Image_constant_FORMAT_BPTC_RGBF: - -.. _class_Image_constant_FORMAT_BPTC_RGBFU: - -.. _class_Image_constant_FORMAT_ETC: - -.. _class_Image_constant_FORMAT_ETC2_R11: - -.. _class_Image_constant_FORMAT_ETC2_R11S: - -.. _class_Image_constant_FORMAT_ETC2_RG11: - -.. _class_Image_constant_FORMAT_ETC2_RG11S: - -.. _class_Image_constant_FORMAT_ETC2_RGB8: - -.. _class_Image_constant_FORMAT_ETC2_RGBA8: - -.. _class_Image_constant_FORMAT_ETC2_RGB8A1: - -.. _class_Image_constant_FORMAT_ETC2_RA_AS_RG: - -.. _class_Image_constant_FORMAT_DXT5_RA_AS_RG: - -.. _class_Image_constant_FORMAT_MAX: +.. rst-class:: classref-enumeration enum **Format**: -- **FORMAT_L8** = **0** --- Texture format with a single 8-bit depth representing luminance. +.. _class_Image_constant_FORMAT_L8: -- **FORMAT_LA8** = **1** --- OpenGL texture format with two values, luminance and alpha each stored with 8 bits. +.. rst-class:: classref-enumeration-constant -- **FORMAT_R8** = **2** --- OpenGL texture format ``RED`` with a single component and a bitdepth of 8. +:ref:`Format` **FORMAT_L8** = ``0`` -- **FORMAT_RG8** = **3** --- OpenGL texture format ``RG`` with two components and a bitdepth of 8 for each. +Texture format with a single 8-bit depth representing luminance. -- **FORMAT_RGB8** = **4** --- OpenGL texture format ``RGB`` with three components, each with a bitdepth of 8. +.. _class_Image_constant_FORMAT_LA8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_LA8** = ``1`` + +OpenGL texture format with two values, luminance and alpha each stored with 8 bits. + +.. _class_Image_constant_FORMAT_R8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_R8** = ``2`` + +OpenGL texture format ``RED`` with a single component and a bitdepth of 8. + +.. _class_Image_constant_FORMAT_RG8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RG8** = ``3`` + +OpenGL texture format ``RG`` with two components and a bitdepth of 8 for each. + +.. _class_Image_constant_FORMAT_RGB8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGB8** = ``4`` + +OpenGL texture format ``RGB`` with three components, each with a bitdepth of 8. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_RGBA8** = **5** --- OpenGL texture format ``RGBA`` with four components, each with a bitdepth of 8. +.. _class_Image_constant_FORMAT_RGBA8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGBA8** = ``5`` + +OpenGL texture format ``RGBA`` with four components, each with a bitdepth of 8. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_RGBA4444** = **6** --- OpenGL texture format ``RGBA`` with four components, each with a bitdepth of 4. +.. _class_Image_constant_FORMAT_RGBA4444: -- **FORMAT_RGB565** = **7** +.. rst-class:: classref-enumeration-constant -- **FORMAT_RF** = **8** --- OpenGL texture format ``GL_R32F`` where there's one component, a 32-bit floating-point value. +:ref:`Format` **FORMAT_RGBA4444** = ``6`` -- **FORMAT_RGF** = **9** --- OpenGL texture format ``GL_RG32F`` where there are two components, each a 32-bit floating-point values. +OpenGL texture format ``RGBA`` with four components, each with a bitdepth of 4. -- **FORMAT_RGBF** = **10** --- OpenGL texture format ``GL_RGB32F`` where there are three components, each a 32-bit floating-point values. +.. _class_Image_constant_FORMAT_RGB565: -- **FORMAT_RGBAF** = **11** --- OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 32-bit floating-point values. +.. rst-class:: classref-enumeration-constant -- **FORMAT_RH** = **12** --- OpenGL texture format ``GL_R32F`` where there's one component, a 16-bit "half-precision" floating-point value. +:ref:`Format` **FORMAT_RGB565** = ``7`` -- **FORMAT_RGH** = **13** --- OpenGL texture format ``GL_RG32F`` where there are two components, each a 16-bit "half-precision" floating-point value. -- **FORMAT_RGBH** = **14** --- OpenGL texture format ``GL_RGB32F`` where there are three components, each a 16-bit "half-precision" floating-point value. -- **FORMAT_RGBAH** = **15** --- OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 16-bit "half-precision" floating-point value. +.. _class_Image_constant_FORMAT_RF: -- **FORMAT_RGBE9995** = **16** --- A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent. +.. rst-class:: classref-enumeration-constant -- **FORMAT_DXT1** = **17** --- The `S3TC `__ texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. +:ref:`Format` **FORMAT_RF** = ``8`` + +OpenGL texture format ``GL_R32F`` where there's one component, a 32-bit floating-point value. + +.. _class_Image_constant_FORMAT_RGF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGF** = ``9`` + +OpenGL texture format ``GL_RG32F`` where there are two components, each a 32-bit floating-point values. + +.. _class_Image_constant_FORMAT_RGBF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGBF** = ``10`` + +OpenGL texture format ``GL_RGB32F`` where there are three components, each a 32-bit floating-point values. + +.. _class_Image_constant_FORMAT_RGBAF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGBAF** = ``11`` + +OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 32-bit floating-point values. + +.. _class_Image_constant_FORMAT_RH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RH** = ``12`` + +OpenGL texture format ``GL_R32F`` where there's one component, a 16-bit "half-precision" floating-point value. + +.. _class_Image_constant_FORMAT_RGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGH** = ``13`` + +OpenGL texture format ``GL_RG32F`` where there are two components, each a 16-bit "half-precision" floating-point value. + +.. _class_Image_constant_FORMAT_RGBH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGBH** = ``14`` + +OpenGL texture format ``GL_RGB32F`` where there are three components, each a 16-bit "half-precision" floating-point value. + +.. _class_Image_constant_FORMAT_RGBAH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGBAH** = ``15`` + +OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 16-bit "half-precision" floating-point value. + +.. _class_Image_constant_FORMAT_RGBE9995: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGBE9995** = ``16`` + +A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent. + +.. _class_Image_constant_FORMAT_DXT1: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_DXT1** = ``17`` + +The `S3TC `__ texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_DXT3** = **18** --- The `S3TC `__ texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. +.. _class_Image_constant_FORMAT_DXT3: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_DXT3** = ``18`` + +The `S3TC `__ texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_DXT5** = **19** --- The `S3TC `__ texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3. +.. _class_Image_constant_FORMAT_DXT5: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_DXT5** = ``19`` + +The `S3TC `__ texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_RGTC_R** = **20** --- Texture format that uses `Red Green Texture Compression `__, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. +.. _class_Image_constant_FORMAT_RGTC_R: -- **FORMAT_RGTC_RG** = **21** --- Texture format that uses `Red Green Texture Compression `__, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. +.. rst-class:: classref-enumeration-constant -- **FORMAT_BPTC_RGBA** = **22** --- Texture format that uses `BPTC `__ compression with unsigned normalized RGBA components. +:ref:`Format` **FORMAT_RGTC_R** = ``20`` + +Texture format that uses `Red Green Texture Compression `__, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. + +.. _class_Image_constant_FORMAT_RGTC_RG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_RGTC_RG** = ``21`` + +Texture format that uses `Red Green Texture Compression `__, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. + +.. _class_Image_constant_FORMAT_BPTC_RGBA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_BPTC_RGBA** = ``22`` + +Texture format that uses `BPTC `__ compression with unsigned normalized RGBA components. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_BPTC_RGBF** = **23** --- Texture format that uses `BPTC `__ compression with signed floating-point RGB components. +.. _class_Image_constant_FORMAT_BPTC_RGBF: -- **FORMAT_BPTC_RGBFU** = **24** --- Texture format that uses `BPTC `__ compression with unsigned floating-point RGB components. +.. rst-class:: classref-enumeration-constant -- **FORMAT_ETC** = **25** --- `Ericsson Texture Compression format 1 `__, also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel. +:ref:`Format` **FORMAT_BPTC_RGBF** = ``23`` -- **FORMAT_ETC2_R11** = **26** --- `Ericsson Texture Compression format 2 `__ (``R11_EAC`` variant), which provides one channel of unsigned data. +Texture format that uses `BPTC `__ compression with signed floating-point RGB components. -- **FORMAT_ETC2_R11S** = **27** --- `Ericsson Texture Compression format 2 `__ (``SIGNED_R11_EAC`` variant), which provides one channel of signed data. +.. _class_Image_constant_FORMAT_BPTC_RGBFU: -- **FORMAT_ETC2_RG11** = **28** --- `Ericsson Texture Compression format 2 `__ (``RG11_EAC`` variant), which provides two channels of unsigned data. +.. rst-class:: classref-enumeration-constant -- **FORMAT_ETC2_RG11S** = **29** --- `Ericsson Texture Compression format 2 `__ (``SIGNED_RG11_EAC`` variant), which provides two channels of signed data. +:ref:`Format` **FORMAT_BPTC_RGBFU** = ``24`` -- **FORMAT_ETC2_RGB8** = **30** --- `Ericsson Texture Compression format 2 `__ (``RGB8`` variant), which is a follow-up of ETC1 and compresses RGB888 data. +Texture format that uses `BPTC `__ compression with unsigned floating-point RGB components. + +.. _class_Image_constant_FORMAT_ETC: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC** = ``25`` + +`Ericsson Texture Compression format 1 `__, also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel. + +.. _class_Image_constant_FORMAT_ETC2_R11: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC2_R11** = ``26`` + +`Ericsson Texture Compression format 2 `__ (``R11_EAC`` variant), which provides one channel of unsigned data. + +.. _class_Image_constant_FORMAT_ETC2_R11S: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC2_R11S** = ``27`` + +`Ericsson Texture Compression format 2 `__ (``SIGNED_R11_EAC`` variant), which provides one channel of signed data. + +.. _class_Image_constant_FORMAT_ETC2_RG11: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC2_RG11** = ``28`` + +`Ericsson Texture Compression format 2 `__ (``RG11_EAC`` variant), which provides two channels of unsigned data. + +.. _class_Image_constant_FORMAT_ETC2_RG11S: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC2_RG11S** = ``29`` + +`Ericsson Texture Compression format 2 `__ (``SIGNED_RG11_EAC`` variant), which provides two channels of signed data. + +.. _class_Image_constant_FORMAT_ETC2_RGB8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC2_RGB8** = ``30`` + +`Ericsson Texture Compression format 2 `__ (``RGB8`` variant), which is a follow-up of ETC1 and compresses RGB888 data. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_ETC2_RGBA8** = **31** --- `Ericsson Texture Compression format 2 `__ (``RGBA8``\ variant), which compresses RGBA8888 data with full alpha support. +.. _class_Image_constant_FORMAT_ETC2_RGBA8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC2_RGBA8** = ``31`` + +`Ericsson Texture Compression format 2 `__ (``RGBA8``\ variant), which compresses RGBA8888 data with full alpha support. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_ETC2_RGB8A1** = **32** --- `Ericsson Texture Compression format 2 `__ (``RGB8_PUNCHTHROUGH_ALPHA1`` variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. +.. _class_Image_constant_FORMAT_ETC2_RGB8A1: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ETC2_RGB8A1** = ``32`` + +`Ericsson Texture Compression format 2 `__ (``RGB8_PUNCHTHROUGH_ALPHA1`` variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. \ **Note:** When creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. -- **FORMAT_ETC2_RA_AS_RG** = **33** +.. _class_Image_constant_FORMAT_ETC2_RA_AS_RG: -- **FORMAT_DXT5_RA_AS_RG** = **34** +.. rst-class:: classref-enumeration-constant -- **FORMAT_MAX** = **35** --- Represents the size of the :ref:`Format` enum. +:ref:`Format` **FORMAT_ETC2_RA_AS_RG** = ``33`` + + + +.. _class_Image_constant_FORMAT_DXT5_RA_AS_RG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_DXT5_RA_AS_RG** = ``34`` + + + +.. _class_Image_constant_FORMAT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_MAX** = ``35`` + +Represents the size of the :ref:`Format` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Image_Interpolation: -.. _class_Image_constant_INTERPOLATE_NEAREST: - -.. _class_Image_constant_INTERPOLATE_BILINEAR: - -.. _class_Image_constant_INTERPOLATE_CUBIC: - -.. _class_Image_constant_INTERPOLATE_TRILINEAR: - -.. _class_Image_constant_INTERPOLATE_LANCZOS: +.. rst-class:: classref-enumeration enum **Interpolation**: -- **INTERPOLATE_NEAREST** = **0** --- Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated. +.. _class_Image_constant_INTERPOLATE_NEAREST: -- **INTERPOLATE_BILINEAR** = **1** --- Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than :ref:`INTERPOLATE_CUBIC`, but it results in lower quality. +.. rst-class:: classref-enumeration-constant -- **INTERPOLATE_CUBIC** = **2** --- Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to :ref:`INTERPOLATE_BILINEAR`, at the cost of being slower. +:ref:`Interpolation` **INTERPOLATE_NEAREST** = ``0`` -- **INTERPOLATE_TRILINEAR** = **3** --- Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them. +Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated. + +.. _class_Image_constant_INTERPOLATE_BILINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Interpolation` **INTERPOLATE_BILINEAR** = ``1`` + +Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than :ref:`INTERPOLATE_CUBIC`, but it results in lower quality. + +.. _class_Image_constant_INTERPOLATE_CUBIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`Interpolation` **INTERPOLATE_CUBIC** = ``2`` + +Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to :ref:`INTERPOLATE_BILINEAR`, at the cost of being slower. + +.. _class_Image_constant_INTERPOLATE_TRILINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Interpolation` **INTERPOLATE_TRILINEAR** = ``3`` + +Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them. It's slower than :ref:`INTERPOLATE_BILINEAR`, but produces higher-quality results with far fewer aliasing artifacts. @@ -371,444 +555,708 @@ If the image does not have mipmaps, they will be generated and used internally, On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. -- **INTERPOLATE_LANCZOS** = **4** --- Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. +.. _class_Image_constant_INTERPOLATE_LANCZOS: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. rst-class:: classref-item-separator ---- .. _enum_Image_AlphaMode: -.. _class_Image_constant_ALPHA_NONE: - -.. _class_Image_constant_ALPHA_BIT: - -.. _class_Image_constant_ALPHA_BLEND: +.. rst-class:: classref-enumeration enum **AlphaMode**: -- **ALPHA_NONE** = **0** --- Image does not have alpha. +.. _class_Image_constant_ALPHA_NONE: -- **ALPHA_BIT** = **1** --- Image stores alpha in a single bit. +.. rst-class:: classref-enumeration-constant -- **ALPHA_BLEND** = **2** --- Image uses alpha. +:ref:`AlphaMode` **ALPHA_NONE** = ``0`` + +Image does not have alpha. + +.. _class_Image_constant_ALPHA_BIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaMode` **ALPHA_BIT** = ``1`` + +Image stores alpha in a single bit. + +.. _class_Image_constant_ALPHA_BLEND: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaMode` **ALPHA_BLEND** = ``2`` + +Image uses alpha. + +.. rst-class:: classref-item-separator ---- .. _enum_Image_CompressMode: -.. _class_Image_constant_COMPRESS_S3TC: - -.. _class_Image_constant_COMPRESS_ETC: - -.. _class_Image_constant_COMPRESS_ETC2: - -.. _class_Image_constant_COMPRESS_BPTC: +.. rst-class:: classref-enumeration enum **CompressMode**: -- **COMPRESS_S3TC** = **0** --- Use S3TC compression. +.. _class_Image_constant_COMPRESS_S3TC: -- **COMPRESS_ETC** = **1** --- Use ETC compression. +.. rst-class:: classref-enumeration-constant -- **COMPRESS_ETC2** = **2** --- Use ETC2 compression. +:ref:`CompressMode` **COMPRESS_S3TC** = ``0`` -- **COMPRESS_BPTC** = **3** --- Use BPTC compression. +Use S3TC compression. + +.. _class_Image_constant_COMPRESS_ETC: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressMode` **COMPRESS_ETC** = ``1`` + +Use ETC compression. + +.. _class_Image_constant_COMPRESS_ETC2: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressMode` **COMPRESS_ETC2** = ``2`` + +Use ETC2 compression. + +.. _class_Image_constant_COMPRESS_BPTC: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressMode` **COMPRESS_BPTC** = ``3`` + +Use BPTC compression. + +.. rst-class:: classref-item-separator ---- .. _enum_Image_UsedChannels: -.. _class_Image_constant_USED_CHANNELS_L: - -.. _class_Image_constant_USED_CHANNELS_LA: - -.. _class_Image_constant_USED_CHANNELS_R: - -.. _class_Image_constant_USED_CHANNELS_RG: - -.. _class_Image_constant_USED_CHANNELS_RGB: - -.. _class_Image_constant_USED_CHANNELS_RGBA: +.. rst-class:: classref-enumeration enum **UsedChannels**: -- **USED_CHANNELS_L** = **0** +.. _class_Image_constant_USED_CHANNELS_L: -- **USED_CHANNELS_LA** = **1** +.. rst-class:: classref-enumeration-constant -- **USED_CHANNELS_R** = **2** +:ref:`UsedChannels` **USED_CHANNELS_L** = ``0`` -- **USED_CHANNELS_RG** = **3** -- **USED_CHANNELS_RGB** = **4** -- **USED_CHANNELS_RGBA** = **5** +.. _class_Image_constant_USED_CHANNELS_LA: + +.. rst-class:: classref-enumeration-constant + +:ref:`UsedChannels` **USED_CHANNELS_LA** = ``1`` + + + +.. _class_Image_constant_USED_CHANNELS_R: + +.. rst-class:: classref-enumeration-constant + +:ref:`UsedChannels` **USED_CHANNELS_R** = ``2`` + + + +.. _class_Image_constant_USED_CHANNELS_RG: + +.. rst-class:: classref-enumeration-constant + +:ref:`UsedChannels` **USED_CHANNELS_RG** = ``3`` + + + +.. _class_Image_constant_USED_CHANNELS_RGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`UsedChannels` **USED_CHANNELS_RGB** = ``4`` + + + +.. _class_Image_constant_USED_CHANNELS_RGBA: + +.. rst-class:: classref-enumeration-constant + +:ref:`UsedChannels` **USED_CHANNELS_RGBA** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_Image_CompressSource: -.. _class_Image_constant_COMPRESS_SOURCE_GENERIC: - -.. _class_Image_constant_COMPRESS_SOURCE_SRGB: - -.. _class_Image_constant_COMPRESS_SOURCE_NORMAL: +.. rst-class:: classref-enumeration enum **CompressSource**: -- **COMPRESS_SOURCE_GENERIC** = **0** --- Source texture (before compression) is a regular texture. Default for all textures. +.. _class_Image_constant_COMPRESS_SOURCE_GENERIC: -- **COMPRESS_SOURCE_SRGB** = **1** --- Source texture (before compression) is in sRGB space. +.. rst-class:: classref-enumeration-constant -- **COMPRESS_SOURCE_NORMAL** = **2** --- Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). +:ref:`CompressSource` **COMPRESS_SOURCE_GENERIC** = ``0`` + +Source texture (before compression) is a regular texture. Default for all textures. + +.. _class_Image_constant_COMPRESS_SOURCE_SRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressSource` **COMPRESS_SOURCE_SRGB** = ``1`` + +Source texture (before compression) is in sRGB space. + +.. _class_Image_constant_COMPRESS_SOURCE_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressSource` **COMPRESS_SOURCE_NORMAL** = ``2`` + +Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Image_constant_MAX_WIDTH: +.. rst-class:: classref-constant + +**MAX_WIDTH** = ``16777216`` + +The maximal width allowed for **Image** resources. + .. _class_Image_constant_MAX_HEIGHT: -- **MAX_WIDTH** = **16777216** --- The maximal width allowed for ``Image`` resources. +.. rst-class:: classref-constant -- **MAX_HEIGHT** = **16777216** --- The maximal height allowed for ``Image`` resources. +**MAX_HEIGHT** = ``16777216`` + +The maximal height allowed for **Image** resources. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Image_property_data: -- :ref:`Dictionary` **data** +.. rst-class:: classref-property -+-----------+------------------------------------------------------------------------------------------------+ -| *Default* | ``{ "data": PackedByteArray(), "format": "Lum8", "height": 0, "mipmaps": false, "width": 0 }`` | -+-----------+------------------------------------------------------------------------------------------------+ +:ref:`Dictionary` **data** = ``{ "data": PackedByteArray(), "format": "Lum8", "height": 0, "mipmaps": false, "width": 0 }`` Holds all the image's color data in a given format. See :ref:`Format` constants. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Image_method_adjust_bcs: -- void **adjust_bcs** **(** :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation **)** +.. rst-class:: classref-method + +void **adjust_bcs** **(** :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_blend_rect: -- void **blend_rect** **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** +.. rst-class:: classref-method + +void **blend_rect** **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_blend_rect_mask: -- void **blend_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** +.. rst-class:: classref-method + +void **blend_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_blit_rect: -- void **blit_rect** **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** +.. rst-class:: classref-method + +void **blit_rect** **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_blit_rect_mask: -- void **blit_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** +.. rst-class:: classref-method + +void **blit_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_bump_map_to_normal_map: -- void **bump_map_to_normal_map** **(** :ref:`float` bump_scale=1.0 **)** +.. rst-class:: classref-method + +void **bump_map_to_normal_map** **(** :ref:`float` bump_scale=1.0 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_clear_mipmaps: -- void **clear_mipmaps** **(** **)** +.. rst-class:: classref-method + +void **clear_mipmaps** **(** **)** Removes the image's mipmaps. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_compress: -- :ref:`Error` **compress** **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7 **)** +.. rst-class:: classref-method + +:ref:`Error` **compress** **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7 **)** 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. See :ref:`CompressMode` and :ref:`CompressSource` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_compress_from_channels: -- :ref:`Error` **compress_from_channels** **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7 **)** +.. rst-class:: classref-method + +:ref:`Error` **compress_from_channels** **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_compute_image_metrics: -- :ref:`Dictionary` **compute_image_metrics** **(** :ref:`Image` compared_image, :ref:`bool` use_luma **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **compute_image_metrics** **(** :ref:`Image` compared_image, :ref:`bool` use_luma **)** Compute image metrics on the current image and the compared image. The dictionary contains ``max``, ``mean``, ``mean_squared``, ``root_mean_squared`` and ``peak_snr``. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_convert: -- void **convert** **(** :ref:`Format` format **)** +.. rst-class:: classref-method + +void **convert** **(** :ref:`Format` format **)** Converts the image's format. See :ref:`Format` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_copy_from: -- void **copy_from** **(** :ref:`Image` src **)** +.. rst-class:: classref-method + +void **copy_from** **(** :ref:`Image` src **)** Copies ``src`` image to this image. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_create: -- :ref:`Image` **create** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format **)** |static| +.. rst-class:: classref-method + +:ref:`Image` **create** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format **)** |static| Creates an empty image of given size and format. See :ref:`Format` constants. If ``use_mipmaps`` is ``true``, then generate mipmaps for this image. See the :ref:`generate_mipmaps`. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_create_from_data: -- :ref:`Image` **create_from_data** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** |static| +.. rst-class:: classref-method + +:ref:`Image` **create_from_data** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** |static| Creates a new image of given size and format. See :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_crop: -- void **crop** **(** :ref:`int` width, :ref:`int` height **)** +.. rst-class:: classref-method + +void **crop** **(** :ref:`int` width, :ref:`int` height **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_decompress: -- :ref:`Error` **decompress** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **decompress** **(** **)** Decompresses the image if it is VRAM compressed in a supported format. Returns :ref:`@GlobalScope.OK` if the format is supported, otherwise :ref:`@GlobalScope.ERR_UNAVAILABLE`. \ **Note:** The following formats can be decompressed: DXT, RGTC, BPTC. The formats ETC1 and ETC2 are not supported. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_detect_alpha: -- :ref:`AlphaMode` **detect_alpha** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AlphaMode` **detect_alpha** **(** **)** |const| Returns :ref:`ALPHA_BLEND` if the image has data for alpha values. Returns :ref:`ALPHA_BIT` if all the alpha values are stored in a single bit. Returns :ref:`ALPHA_NONE` if no data for alpha values is found. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_detect_used_channels: -- :ref:`UsedChannels` **detect_used_channels** **(** :ref:`CompressSource` source=0 **)** |const| +.. rst-class:: classref-method + +:ref:`UsedChannels` **detect_used_channels** **(** :ref:`CompressSource` source=0 **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_fill: -- void **fill** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`Color` color **)** Fills the image with ``color``. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_fill_rect: -- void **fill_rect** **(** :ref:`Rect2i` rect, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **fill_rect** **(** :ref:`Rect2i` rect, :ref:`Color` color **)** Fills ``rect`` with ``color``. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_fix_alpha_edges: -- void **fix_alpha_edges** **(** **)** +.. rst-class:: classref-method + +void **fix_alpha_edges** **(** **)** Blends low-alpha pixels with nearby pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_flip_x: -- void **flip_x** **(** **)** +.. rst-class:: classref-method + +void **flip_x** **(** **)** Flips the image horizontally. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_flip_y: -- void **flip_y** **(** **)** +.. rst-class:: classref-method + +void **flip_y** **(** **)** Flips the image vertically. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_generate_mipmaps: -- :ref:`Error` **generate_mipmaps** **(** :ref:`bool` renormalize=false **)** +.. rst-class:: classref-method + +:ref:`Error` **generate_mipmaps** **(** :ref:`bool` renormalize=false **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_data: -- :ref:`PackedByteArray` **get_data** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_data** **(** **)** |const| Returns a copy of the image's raw data. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_format: -- :ref:`Format` **get_format** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Format` **get_format** **(** **)** |const| Returns the image's format. See :ref:`Format` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_height: -- :ref:`int` **get_height** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_height** **(** **)** |const| Returns the image's height. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_mipmap_offset: -- :ref:`int` **get_mipmap_offset** **(** :ref:`int` mipmap **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_mipmap_offset** **(** :ref:`int` mipmap **)** |const| Returns the offset where the image's mipmap with index ``mipmap`` is stored in the ``data`` dictionary. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_pixel: -- :ref:`Color` **get_pixel** **(** :ref:`int` x, :ref:`int` y **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_pixel** **(** :ref:`int` x, :ref:`int` y **)** |const| Returns the color of the pixel at ``(x, y)``. This is the same as :ref:`get_pixelv`, but with two integer arguments instead of a :ref:`Vector2i` argument. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_pixelv: -- :ref:`Color` **get_pixelv** **(** :ref:`Vector2i` point **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_pixelv** **(** :ref:`Vector2i` point **)** |const| Returns the color of the pixel at ``point``. This is the same as :ref:`get_pixel`, but with a :ref:`Vector2i` argument instead of two integer arguments. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_region: -- :ref:`Image` **get_region** **(** :ref:`Rect2i` region **)** |const| +.. rst-class:: classref-method -Returns a new ``Image`` that is a copy of this ``Image``'s area specified with ``region``. +:ref:`Image` **get_region** **(** :ref:`Rect2i` region **)** |const| + +Returns a new **Image** that is a copy of this **Image**'s area specified with ``region``. + +.. rst-class:: classref-item-separator ---- .. _class_Image_method_get_size: -- :ref:`Vector2i` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_size** **(** **)** |const| Returns the image's size (width and height). +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_used_rect: -- :ref:`Rect2i` **get_used_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2i` **get_used_rect** **(** **)** |const| Returns a :ref:`Rect2i` enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_get_width: -- :ref:`int` **get_width** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_width** **(** **)** |const| Returns the image's width. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_has_mipmaps: -- :ref:`bool` **has_mipmaps** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_mipmaps** **(** **)** |const| Returns ``true`` if the image has generated mipmaps. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_is_compressed: -- :ref:`bool` **is_compressed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_compressed** **(** **)** |const| Returns ``true`` if the image is compressed. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the image has no data. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_is_invisible: -- :ref:`bool` **is_invisible** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_invisible** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_load: -- :ref:`Error` **load** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load** **(** :ref:`String` path **)** 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. @@ -816,197 +1264,289 @@ Loads an image from file ``path``. See `Supported image formats <../tutorials/as See also :ref:`ImageTexture` description for usage examples. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_load_bmp_from_buffer: -- :ref:`Error` **load_bmp_from_buffer** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +:ref:`Error` **load_bmp_from_buffer** **(** :ref:`PackedByteArray` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_load_from_file: -- :ref:`Image` **load_from_file** **(** :ref:`String` path **)** |static| +.. rst-class:: classref-method -Creates a new ``Image`` and loads data from the specified file. +:ref:`Image` **load_from_file** **(** :ref:`String` path **)** |static| + +Creates a new **Image** and loads data from the specified file. + +.. rst-class:: classref-item-separator ---- .. _class_Image_method_load_jpg_from_buffer: -- :ref:`Error` **load_jpg_from_buffer** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +:ref:`Error` **load_jpg_from_buffer** **(** :ref:`PackedByteArray` buffer **)** Loads an image from the binary contents of a JPEG file. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_load_png_from_buffer: -- :ref:`Error` **load_png_from_buffer** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +:ref:`Error` **load_png_from_buffer** **(** :ref:`PackedByteArray` buffer **)** Loads an image from the binary contents of a PNG file. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_load_tga_from_buffer: -- :ref:`Error` **load_tga_from_buffer** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +:ref:`Error` **load_tga_from_buffer** **(** :ref:`PackedByteArray` buffer **)** Loads an image from the binary contents of a TGA file. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_load_webp_from_buffer: -- :ref:`Error` **load_webp_from_buffer** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +:ref:`Error` **load_webp_from_buffer** **(** :ref:`PackedByteArray` buffer **)** Loads an image from the binary contents of a WebP file. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_normal_map_to_xy: -- void **normal_map_to_xy** **(** **)** +.. rst-class:: classref-method + +void **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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_premultiply_alpha: -- void **premultiply_alpha** **(** **)** +.. rst-class:: classref-method + +void **premultiply_alpha** **(** **)** Multiplies color values with alpha values. Resulting color values for a pixel are ``(color * alpha)/256``. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_resize: -- void **resize** **(** :ref:`int` width, :ref:`int` height, :ref:`Interpolation` interpolation=1 **)** +.. rst-class:: classref-method + +void **resize** **(** :ref:`int` width, :ref:`int` height, :ref:`Interpolation` interpolation=1 **)** Resizes the image to the given ``width`` and ``height``. New pixels are calculated using the ``interpolation`` mode defined via :ref:`Interpolation` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_resize_to_po2: -- void **resize_to_po2** **(** :ref:`bool` square=false, :ref:`Interpolation` interpolation=1 **)** +.. rst-class:: classref-method + +void **resize_to_po2** **(** :ref:`bool` square=false, :ref:`Interpolation` interpolation=1 **)** 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` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_rgbe_to_srgb: -- :ref:`Image` **rgbe_to_srgb** **(** **)** +.. rst-class:: classref-method + +:ref:`Image` **rgbe_to_srgb** **(** **)** Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_rotate_180: -- void **rotate_180** **(** **)** +.. rst-class:: classref-method + +void **rotate_180** **(** **)** Rotates the image by ``180`` degrees. The width and height of the image must be greater than ``1``. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_rotate_90: -- void **rotate_90** **(** :ref:`ClockDirection` direction **)** +.. rst-class:: classref-method + +void **rotate_90** **(** :ref:`ClockDirection` direction **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_save_exr: -- :ref:`Error` **save_exr** **(** :ref:`String` path, :ref:`bool` grayscale=false **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **save_exr** **(** :ref:`String` path, :ref:`bool` grayscale=false **)** |const| 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` if Godot was compiled without the TinyEXR module. \ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr` will return :ref:`@GlobalScope.ERR_UNAVAILABLE` when it is called from an exported project. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_save_exr_to_buffer: -- :ref:`PackedByteArray` **save_exr_to_buffer** **(** :ref:`bool` grayscale=false **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **save_exr_to_buffer** **(** :ref:`bool` grayscale=false **)** |const| 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. \ **Note:** The TinyEXR module is disabled in non-editor builds, which means :ref:`save_exr` will return an empty byte array when it is called from an exported project. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_save_jpg: -- :ref:`Error` **save_jpg** **(** :ref:`String` path, :ref:`float` quality=0.75 **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **save_jpg** **(** :ref:`String` path, :ref:`float` quality=0.75 **)** |const| 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. -\ **Note:** JPEG does not save an alpha channel. If the ``Image`` contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel. +\ **Note:** JPEG does not save an alpha channel. If the **Image** contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel. + +.. rst-class:: classref-item-separator ---- .. _class_Image_method_save_jpg_to_buffer: -- :ref:`PackedByteArray` **save_jpg_to_buffer** **(** :ref:`float` quality=0.75 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **save_jpg_to_buffer** **(** :ref:`float` quality=0.75 **)** |const| 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. -\ **Note:** JPEG does not save an alpha channel. If the ``Image`` contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel. +\ **Note:** JPEG does not save an alpha channel. If the **Image** contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel. + +.. rst-class:: classref-item-separator ---- .. _class_Image_method_save_png: -- :ref:`Error` **save_png** **(** :ref:`String` path **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **save_png** **(** :ref:`String` path **)** |const| Saves the image as a PNG file to the file at ``path``. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_save_png_to_buffer: -- :ref:`PackedByteArray` **save_png_to_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **save_png_to_buffer** **(** **)** |const| Saves the image as a PNG file to a byte array. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_save_webp: -- :ref:`Error` **save_webp** **(** :ref:`String` path, :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **save_webp** **(** :ref:`String` path, :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| 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). +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_save_webp_to_buffer: -- :ref:`PackedByteArray` **save_webp_to_buffer** **(** :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **save_webp_to_buffer** **(** :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| 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). +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_set_data: -- void **set_data** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method -Overwrites data of an existing ``Image``. Non-static equivalent of :ref:`create_from_data`. +void **set_data** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** + +Overwrites data of an existing **Image**. Non-static equivalent of :ref:`create_from_data`. + +.. rst-class:: classref-item-separator ---- .. _class_Image_method_set_pixel: -- void **set_pixel** **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_pixel** **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color **)** Sets the :ref:`Color` of the pixel at ``(x, y)`` to ``color``. @@ -1037,11 +1577,15 @@ Sets the :ref:`Color` of the pixel at ``(x, y)`` to ``color``. This is the same as :ref:`set_pixelv`, but with a two integer arguments instead of a :ref:`Vector2i` argument. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_set_pixelv: -- void **set_pixelv** **(** :ref:`Vector2i` point, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_pixelv** **(** :ref:`Vector2i` point, :ref:`Color` color **)** Sets the :ref:`Color` of the pixel at ``point`` to ``color``. @@ -1072,19 +1616,27 @@ Sets the :ref:`Color` of the pixel at ``point`` to ``color``. This is the same as :ref:`set_pixel`, but with a :ref:`Vector2i` argument instead of two integer arguments. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_shrink_x2: -- void **shrink_x2** **(** **)** +.. rst-class:: classref-method + +void **shrink_x2** **(** **)** Shrinks the image by a factor of 2. +.. rst-class:: classref-item-separator + ---- .. _class_Image_method_srgb_to_linear: -- void **srgb_to_linear** **(** **)** +.. rst-class:: classref-method + +void **srgb_to_linear** **(** **)** Converts the raw data from the sRGB colorspace to a linear scale. diff --git a/classes/class_imageformatloader.rst b/classes/class_imageformatloader.rst index ba52c4e93..fc667f797 100644 --- a/classes/class_imageformatloader.rst +++ b/classes/class_imageformatloader.rst @@ -16,29 +16,51 @@ ImageFormatLoader Base class to add support for specific image formats. +.. rst-class:: classref-introduction-group + Description ----------- The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending :ref:`ImageFormatLoaderExtension`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_ImageFormatLoader_LoaderFlags: -.. _class_ImageFormatLoader_constant_FLAG_NONE: - -.. _class_ImageFormatLoader_constant_FLAG_FORCE_LINEAR: - -.. _class_ImageFormatLoader_constant_FLAG_CONVERT_COLORS: +.. rst-class:: classref-enumeration flags **LoaderFlags**: -- **FLAG_NONE** = **0** +.. _class_ImageFormatLoader_constant_FLAG_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoaderFlags` **FLAG_NONE** = ``0`` + + + +.. _class_ImageFormatLoader_constant_FLAG_FORCE_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoaderFlags` **FLAG_FORCE_LINEAR** = ``1`` + + + +.. _class_ImageFormatLoader_constant_FLAG_CONVERT_COLORS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoaderFlags` **FLAG_CONVERT_COLORS** = ``2`` -- **FLAG_FORCE_LINEAR** = **1** -- **FLAG_CONVERT_COLORS** = **2** .. |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.)` diff --git a/classes/class_imageformatloaderextension.rst b/classes/class_imageformatloaderextension.rst index 12c9cdb57..102695244 100644 --- a/classes/class_imageformatloaderextension.rst +++ b/classes/class_imageformatloaderextension.rst @@ -14,6 +14,8 @@ ImageFormatLoaderExtension Base class for creating :ref:`ImageFormatLoader` extensions (adding support for extra image formats). +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,49 +23,74 @@ The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP Be sure to respect the documented return types and values. You should create an instance of it, and call :ref:`add_format_loader` to register that loader during the initialization phase. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_load_image` **(** :ref:`Image` image, :ref:`FileAccess` fileaccess, :ref:`LoaderFlags` flags, :ref:`float` scale **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_format_loader` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_format_loader` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_load_image` **(** :ref:`Image` image, :ref:`FileAccess` fileaccess, :ref:`LoaderFlags` flags, :ref:`float` scale **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_format_loader` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_format_loader` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ImageFormatLoaderExtension_method__get_recognized_extensions: -- :ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_ImageFormatLoaderExtension_method__load_image: -- :ref:`Error` **_load_image** **(** :ref:`Image` image, :ref:`FileAccess` fileaccess, :ref:`LoaderFlags` flags, :ref:`float` scale **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_load_image** **(** :ref:`Image` image, :ref:`FileAccess` fileaccess, :ref:`LoaderFlags` flags, :ref:`float` scale **)** |virtual| Loads the content of ``fileaccess`` into the provided ``image``. +.. rst-class:: classref-item-separator + ---- .. _class_ImageFormatLoaderExtension_method_add_format_loader: -- void **add_format_loader** **(** **)** +.. rst-class:: classref-method + +void **add_format_loader** **(** **)** Add this format loader to the engine, allowing it to recognize the file extensions returned by :ref:`_get_recognized_extensions`. +.. rst-class:: classref-item-separator + ---- .. _class_ImageFormatLoaderExtension_method_remove_format_loader: -- void **remove_format_loader** **(** **)** +.. rst-class:: classref-method + +void **remove_format_loader** **(** **)** Remove this format loader from the engine. diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 1620384ae..9b29941d1 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -14,10 +14,12 @@ ImageTexture A :ref:`Texture2D` based on an :ref:`Image`. +.. rst-class:: classref-introduction-group + Description ----------- -A :ref:`Texture2D` based on an :ref:`Image`. For an image to be displayed, an ``ImageTexture`` has to be created from it using the :ref:`create_from_image` method: +A :ref:`Texture2D` based on an :ref:`Image`. For an image to be displayed, an **ImageTexture** has to be created from it using the :ref:`create_from_image` method: :: @@ -43,77 +45,113 @@ This is because images have to be imported as a :ref:`CompressedTexture2D`. +An **ImageTexture** is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new :ref:`EditorImportPlugin`. \ **Note:** The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Importing images <../tutorials/assets_pipeline/importing_images>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-------------------------+-------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-------------------------+-------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ImageTexture` | :ref:`create_from_image` **(** :ref:`Image` image **)** |static| | -+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`get_format` **(** **)** |const| | -+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_image` **(** :ref:`Image` image **)** | -+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_size_override` **(** :ref:`Vector2i` size **)** | -+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update` **(** :ref:`Image` image **)** | -+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ImageTexture` | :ref:`create_from_image` **(** :ref:`Image` image **)** |static| | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_image` **(** :ref:`Image` image **)** | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_size_override` **(** :ref:`Vector2i` size **)** | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update` **(** :ref:`Image` image **)** | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ImageTexture_method_create_from_image: -- :ref:`ImageTexture` **create_from_image** **(** :ref:`Image` image **)** |static| +.. rst-class:: classref-method -Creates a new ``ImageTexture`` and initializes it by allocating and setting the data from an :ref:`Image`. +:ref:`ImageTexture` **create_from_image** **(** :ref:`Image` image **)** |static| + +Creates a new **ImageTexture** and initializes it by allocating and setting the data from an :ref:`Image`. + +.. rst-class:: classref-item-separator ---- .. _class_ImageTexture_method_get_format: -- :ref:`Format` **get_format** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Format` **get_format** **(** **)** |const| Returns the format of the texture, one of :ref:`Format`. +.. rst-class:: classref-item-separator + ---- .. _class_ImageTexture_method_set_image: -- void **set_image** **(** :ref:`Image` image **)** +.. rst-class:: classref-method + +void **set_image** **(** :ref:`Image` image **)** Replaces the texture's data with a new :ref:`Image`. This will re-allocate new memory for the texture. If you want to update the image, but don't need to change its parameters (format, size), use :ref:`update` instead for better performance. +.. rst-class:: classref-item-separator + ---- .. _class_ImageTexture_method_set_size_override: -- void **set_size_override** **(** :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **set_size_override** **(** :ref:`Vector2i` size **)** Resizes the texture to the specified dimensions. +.. rst-class:: classref-item-separator + ---- .. _class_ImageTexture_method_update: -- void **update** **(** :ref:`Image` image **)** +.. rst-class:: classref-method + +void **update** **(** :ref:`Image` image **)** Replaces the texture's data with a new :ref:`Image`. diff --git a/classes/class_imagetexture3d.rst b/classes/class_imagetexture3d.rst index 514eba9d2..937cbf466 100644 --- a/classes/class_imagetexture3d.rst +++ b/classes/class_imagetexture3d.rst @@ -14,36 +14,55 @@ ImageTexture3D Texture with 3 dimensions. +.. rst-class:: classref-introduction-group + Description ----------- -``ImageTexture3D`` is a 3-dimensional :ref:`ImageTexture` that has a width, height, and depth. See also :ref:`ImageTextureLayered`. +**ImageTexture3D** is a 3-dimensional :ref:`ImageTexture` that has a width, height, and depth. See also :ref:`ImageTextureLayered`. 3D textures are typically used to store density maps for :ref:`FogMaterial`, color correction LUTs for :ref:`Environment`, vector fields for :ref:`GPUParticlesAttractorVectorField3D` and collision maps for :ref:`GPUParticlesCollisionSDF3D`. 3D textures can also be used in custom shaders. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create` **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` use_mipmaps, :ref:`Image[]` data **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update` **(** :ref:`Image[]` data **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create` **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` use_mipmaps, :ref:`Image[]` data **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update` **(** :ref:`Image[]` data **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ImageTexture3D_method_create: -- :ref:`Error` **create** **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` use_mipmaps, :ref:`Image[]` data **)** +.. rst-class:: classref-method -Creates the ``ImageTexture3D`` with specified ``width``, ``height``, and ``depth``. See :ref:`Format` for ``format`` options. If ``use_mipmaps`` is ``true``, then generate mipmaps for the ``ImageTexture3D``. +:ref:`Error` **create** **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` use_mipmaps, :ref:`Image[]` data **)** + +Creates the **ImageTexture3D** with specified ``width``, ``height``, and ``depth``. See :ref:`Format` for ``format`` options. If ``use_mipmaps`` is ``true``, then generate mipmaps for the **ImageTexture3D**. + +.. rst-class:: classref-item-separator ---- .. _class_ImageTexture3D_method_update: -- void **update** **(** :ref:`Image[]` data **)** +.. rst-class:: classref-method + +void **update** **(** :ref:`Image[]` data **)** 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`. In other words, the texture cannot be resized or have its format changed by calling :ref:`update`. diff --git a/classes/class_imagetexturelayered.rst b/classes/class_imagetexturelayered.rst index 6056d65a3..5c8d47918 100644 --- a/classes/class_imagetexturelayered.rst +++ b/classes/class_imagetexturelayered.rst @@ -16,36 +16,55 @@ ImageTextureLayered Base class for texture types which contain the data of multiple :ref:`ImageTexture`\ s. Each image is of the same size and format. +.. rst-class:: classref-introduction-group + Description ----------- Base class for :ref:`Texture2DArray`, :ref:`Cubemap` and :ref:`CubemapArray`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`Texture3D`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_from_images` **(** :ref:`Image[]` images **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_layer` **(** :ref:`Image` image, :ref:`int` layer **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_from_images` **(** :ref:`Image[]` images **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_layer` **(** :ref:`Image` image, :ref:`int` layer **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ImageTextureLayered_method_create_from_images: -- :ref:`Error` **create_from_images** **(** :ref:`Image[]` images **)** +.. rst-class:: classref-method -Creates an ``ImageTextureLayered`` from an array of :ref:`Image`\ s. See :ref:`Image.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. +:ref:`Error` **create_from_images** **(** :ref:`Image[]` images **)** + +Creates an **ImageTextureLayered** from an array of :ref:`Image`\ s. See :ref:`Image.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. Each :ref:`Image` represents one ``layer``. +.. rst-class:: classref-item-separator + ---- .. _class_ImageTextureLayered_method_update_layer: -- void **update_layer** **(** :ref:`Image` image, :ref:`int` layer **)** +.. rst-class:: classref-method + +void **update_layer** **(** :ref:`Image` image, :ref:`int` layer **)** Replaces the existing :ref:`Image` data at the given ``layer`` with this new image. diff --git a/classes/class_immediatemesh.rst b/classes/class_immediatemesh.rst index 5d3d8f785..257eb286d 100644 --- a/classes/class_immediatemesh.rst +++ b/classes/class_immediatemesh.rst @@ -14,114 +14,165 @@ ImmediateMesh Mesh optimized for creating geometry manually. +.. rst-class:: classref-introduction-group + Description ----------- Mesh optimized for creating geometry manually, similar to OpenGL1.x immediate mode. +.. rst-class:: classref-reftable-group + Methods ------- -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_surfaces` **(** **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_add_vertex` **(** :ref:`Vector3` vertex **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_add_vertex_2d` **(** :ref:`Vector2` vertex **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_begin` **(** :ref:`PrimitiveType` primitive, :ref:`Material` material=null **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_end` **(** **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_set_color` **(** :ref:`Color` color **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_set_normal` **(** :ref:`Vector3` normal **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_set_tangent` **(** :ref:`Plane` tangent **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_set_uv` **(** :ref:`Vector2` uv **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_set_uv2` **(** :ref:`Vector2` uv2 **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_surfaces` **(** **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_add_vertex` **(** :ref:`Vector3` vertex **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_add_vertex_2d` **(** :ref:`Vector2` vertex **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_begin` **(** :ref:`PrimitiveType` primitive, :ref:`Material` material=null **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_end` **(** **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_set_color` **(** :ref:`Color` color **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_set_normal` **(** :ref:`Vector3` normal **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_set_tangent` **(** :ref:`Plane` tangent **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_set_uv` **(** :ref:`Vector2` uv **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_set_uv2` **(** :ref:`Vector2` uv2 **)** | + +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ImmediateMesh_method_clear_surfaces: -- void **clear_surfaces** **(** **)** +.. rst-class:: classref-method + +void **clear_surfaces** **(** **)** Clear all surfaces. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_add_vertex: -- void **surface_add_vertex** **(** :ref:`Vector3` vertex **)** +.. rst-class:: classref-method + +void **surface_add_vertex** **(** :ref:`Vector3` vertex **)** Add a 3D vertex using the current attributes previously set. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_add_vertex_2d: -- void **surface_add_vertex_2d** **(** :ref:`Vector2` vertex **)** +.. rst-class:: classref-method + +void **surface_add_vertex_2d** **(** :ref:`Vector2` vertex **)** Add a 2D vertex using the current attributes previously set. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_begin: -- void **surface_begin** **(** :ref:`PrimitiveType` primitive, :ref:`Material` material=null **)** +.. rst-class:: classref-method + +void **surface_begin** **(** :ref:`PrimitiveType` primitive, :ref:`Material` material=null **)** Begin a new surface. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_end: -- void **surface_end** **(** **)** +.. rst-class:: classref-method + +void **surface_end** **(** **)** End and commit current surface. Note that surface being created will not be visible until this function is called. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_set_color: -- void **surface_set_color** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **surface_set_color** **(** :ref:`Color` color **)** Set the color attribute that will be pushed with the next vertex. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_set_normal: -- void **surface_set_normal** **(** :ref:`Vector3` normal **)** +.. rst-class:: classref-method + +void **surface_set_normal** **(** :ref:`Vector3` normal **)** Set the normal attribute that will be pushed with the next vertex. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_set_tangent: -- void **surface_set_tangent** **(** :ref:`Plane` tangent **)** +.. rst-class:: classref-method + +void **surface_set_tangent** **(** :ref:`Plane` tangent **)** Set the tangent attribute that will be pushed with the next vertex. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_set_uv: -- void **surface_set_uv** **(** :ref:`Vector2` uv **)** +.. rst-class:: classref-method + +void **surface_set_uv** **(** :ref:`Vector2` uv **)** Set the UV attribute that will be pushed with the next vertex. +.. rst-class:: classref-item-separator + ---- .. _class_ImmediateMesh_method_surface_set_uv2: -- void **surface_set_uv2** **(** :ref:`Vector2` uv2 **)** +.. rst-class:: classref-method + +void **surface_set_uv2** **(** :ref:`Vector2` uv2 **)** Set the UV2 attribute that will be pushed with the next vertex. diff --git a/classes/class_importermesh.rst b/classes/class_importermesh.rst index 5e6fd0ef0..38473a4b2 100644 --- a/classes/class_importermesh.rst +++ b/classes/class_importermesh.rst @@ -14,100 +14,128 @@ ImporterMesh A :ref:`Resource` that contains vertex array-based geometry during the import process. +.. rst-class:: classref-introduction-group + Description ----------- ImporterMesh is a type of :ref:`Resource` analogous to :ref:`ArrayMesh`. It 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. -Unlike its runtime counterpart, ``ImporterMesh`` contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling :ref:`clear`, followed by :ref:`add_surface` for each surface. +Unlike its runtime counterpart, **ImporterMesh** contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling :ref:`clear`, followed by :ref:`add_surface` for each surface. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------------------+-------------------------------------------------+------------------------+ -| :ref:`Dictionary` | :ref:`_data` | ``{ "surfaces": [] }`` | -+-------------------------------------+-------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------+------------------------+ + | :ref:`Dictionary` | :ref:`_data` | ``{ "surfaces": [] }`` | + +-------------------------------------+-------------------------------------------------+------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_blend_shape` **(** :ref:`String` name **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_surface` **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`Material` material=null, :ref:`String` name="", :ref:`int` flags=0 **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generate_lods` **(** :ref:`float` normal_merge_angle, :ref:`float` normal_split_angle, :ref:`Array` bone_transform_array **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BlendShapeMode` | :ref:`get_blend_shape_mode` **(** **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_blend_shape_name` **(** :ref:`int` blend_shape_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_lightmap_size_hint` **(** **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ArrayMesh` | :ref:`get_mesh` **(** :ref:`ArrayMesh` base_mesh=null **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_surface_arrays` **(** :ref:`int` surface_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_surface_blend_shape_arrays` **(** :ref:`int` surface_idx, :ref:`int` blend_shape_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_surface_format` **(** :ref:`int` surface_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_surface_lod_count` **(** :ref:`int` surface_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_surface_lod_indices` **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_surface_lod_size` **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Material` | :ref:`get_surface_material` **(** :ref:`int` surface_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_surface_name` **(** :ref:`int` surface_idx **)** |const| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PrimitiveType` | :ref:`get_surface_primitive_type` **(** :ref:`int` surface_idx **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_blend_shape_mode` **(** :ref:`BlendShapeMode` mode **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_lightmap_size_hint` **(** :ref:`Vector2i` size **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_surface_material` **(** :ref:`int` surface_idx, :ref:`Material` material **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_surface_name` **(** :ref:`int` surface_idx, :ref:`String` name **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_blend_shape` **(** :ref:`String` name **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_surface` **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`Material` material=null, :ref:`String` name="", :ref:`int` flags=0 **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generate_lods` **(** :ref:`float` normal_merge_angle, :ref:`float` normal_split_angle, :ref:`Array` bone_transform_array **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BlendShapeMode` | :ref:`get_blend_shape_mode` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_blend_shape_name` **(** :ref:`int` blend_shape_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_lightmap_size_hint` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh` | :ref:`get_mesh` **(** :ref:`ArrayMesh` base_mesh=null **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_surface_arrays` **(** :ref:`int` surface_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_surface_blend_shape_arrays` **(** :ref:`int` surface_idx, :ref:`int` blend_shape_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_format` **(** :ref:`int` surface_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_lod_count` **(** :ref:`int` surface_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_surface_lod_indices` **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_surface_lod_size` **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_surface_material` **(** :ref:`int` surface_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_surface_name` **(** :ref:`int` surface_idx **)** |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PrimitiveType` | :ref:`get_surface_primitive_type` **(** :ref:`int` surface_idx **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_blend_shape_mode` **(** :ref:`BlendShapeMode` mode **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_lightmap_size_hint` **(** :ref:`Vector2i` size **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_surface_material` **(** :ref:`int` surface_idx, :ref:`Material` material **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_surface_name` **(** :ref:`int` surface_idx, :ref:`String` name **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ImporterMesh_property__data: -- :ref:`Dictionary` **_data** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``{ "surfaces": [] }`` | -+-----------+------------------------+ +:ref:`Dictionary` **_data** = ``{ "surfaces": [] }`` .. 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 ------------------- .. _class_ImporterMesh_method_add_blend_shape: -- void **add_blend_shape** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **add_blend_shape** **(** :ref:`String` name **)** Adds name for a blend shape that will be added with :ref:`add_surface`. Must be called before surface is added. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_add_surface: -- void **add_surface** **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`Material` material=null, :ref:`String` name="", :ref:`int` flags=0 **)** +.. rst-class:: classref-method + +void **add_surface** **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`Material` material=null, :ref:`String` name="", :ref:`int` flags=0 **)** Creates a new surface, analogous to :ref:`ArrayMesh.add_surface_from_arrays`. @@ -115,19 +143,27 @@ Surfaces are created to be rendered using a ``primitive``, which may be any of t The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for :ref:`Mesh.ARRAY_INDEX` if it is used. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method -Removes all surfaces and blend shapes from this ``ImporterMesh``. +void **clear** **(** **)** + +Removes all surfaces and blend shapes from this **ImporterMesh**. + +.. rst-class:: classref-item-separator ---- .. _class_ImporterMesh_method_generate_lods: -- void **generate_lods** **(** :ref:`float` normal_merge_angle, :ref:`float` normal_split_angle, :ref:`Array` bone_transform_array **)** +.. rst-class:: classref-method + +void **generate_lods** **(** :ref:`float` normal_merge_angle, :ref:`float` normal_split_angle, :ref:`Array` bone_transform_array **)** Generates all lods for this ImporterMesh. @@ -137,159 +173,235 @@ The number of generated lods can be accessed using :ref:`get_surface_lod_count` which can be either empty or contain :ref:`Transform3D`\ s which, for each of the mesh's bone IDs, will apply mesh skinning when generating the LOD mesh variations. This is usually used to account for discrepancies in scale between the mesh itself and its skinning data. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_blend_shape_count: -- :ref:`int` **get_blend_shape_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_blend_shape_count** **(** **)** |const| Returns the number of blend shapes that the mesh holds. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_blend_shape_mode: -- :ref:`BlendShapeMode` **get_blend_shape_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`BlendShapeMode` **get_blend_shape_mode** **(** **)** |const| Returns the blend shape mode for this Mesh. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_blend_shape_name: -- :ref:`String` **get_blend_shape_name** **(** :ref:`int` blend_shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_blend_shape_name** **(** :ref:`int` blend_shape_idx **)** |const| Returns the name of the blend shape at this index. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_lightmap_size_hint: -- :ref:`Vector2i` **get_lightmap_size_hint** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_lightmap_size_hint** **(** **)** |const| Returns the size hint of this mesh for lightmap-unwrapping in UV-space. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_mesh: -- :ref:`ArrayMesh` **get_mesh** **(** :ref:`ArrayMesh` base_mesh=null **)** +.. rst-class:: classref-method -Returns the mesh data represented by this ``ImporterMesh`` as a usable :ref:`ArrayMesh`. +:ref:`ArrayMesh` **get_mesh** **(** :ref:`ArrayMesh` base_mesh=null **)** + +Returns the mesh data represented by this **ImporterMesh** as a usable :ref:`ArrayMesh`. This method caches the returned mesh, and subsequent calls will return the cached data until :ref:`clear` is called. If not yet cached and ``base_mesh`` is provided, ``base_mesh`` will be used and mutated. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_arrays: -- :ref:`Array` **get_surface_arrays** **(** :ref:`int` surface_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_surface_arrays** **(** :ref:`int` surface_idx **)** |const| Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface. See :ref:`add_surface`. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_blend_shape_arrays: -- :ref:`Array` **get_surface_blend_shape_arrays** **(** :ref:`int` surface_idx, :ref:`int` blend_shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_surface_blend_shape_arrays** **(** :ref:`int` surface_idx, :ref:`int` blend_shape_idx **)** |const| Returns a single set of blend shape arrays for the requested blend shape index for a surface. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_count: -- :ref:`int` **get_surface_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_surface_count** **(** **)** |const| Returns the number of surfaces that the mesh holds. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_format: -- :ref:`int` **get_surface_format** **(** :ref:`int` surface_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_surface_format** **(** :ref:`int` surface_idx **)** |const| Returns the format of the surface that the mesh holds. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_lod_count: -- :ref:`int` **get_surface_lod_count** **(** :ref:`int` surface_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_surface_lod_count** **(** :ref:`int` surface_idx **)** |const| Returns the number of lods that the mesh holds on a given surface. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_lod_indices: -- :ref:`PackedInt32Array` **get_surface_lod_indices** **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_surface_lod_indices** **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| Returns the index buffer of a lod for a surface. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_lod_size: -- :ref:`float` **get_surface_lod_size** **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_surface_lod_size** **(** :ref:`int` surface_idx, :ref:`int` lod_idx **)** |const| Returns the screen ratio which activates a lod for a surface. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_material: -- :ref:`Material` **get_surface_material** **(** :ref:`int` surface_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Material` **get_surface_material** **(** :ref:`int` surface_idx **)** |const| Returns a :ref:`Material` in a given surface. Surface is rendered using this material. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_name: -- :ref:`String` **get_surface_name** **(** :ref:`int` surface_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_surface_name** **(** :ref:`int` surface_idx **)** |const| Gets the name assigned to this surface. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_get_surface_primitive_type: -- :ref:`PrimitiveType` **get_surface_primitive_type** **(** :ref:`int` surface_idx **)** +.. rst-class:: classref-method + +:ref:`PrimitiveType` **get_surface_primitive_type** **(** :ref:`int` surface_idx **)** Returns the primitive type of the requested surface (see :ref:`add_surface`). +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_set_blend_shape_mode: -- void **set_blend_shape_mode** **(** :ref:`BlendShapeMode` mode **)** +.. rst-class:: classref-method + +void **set_blend_shape_mode** **(** :ref:`BlendShapeMode` mode **)** Sets the blend shape mode to one of :ref:`BlendShapeMode`. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_set_lightmap_size_hint: -- void **set_lightmap_size_hint** **(** :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **set_lightmap_size_hint** **(** :ref:`Vector2i` size **)** Sets the size hint of this mesh for lightmap-unwrapping in UV-space. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_set_surface_material: -- void **set_surface_material** **(** :ref:`int` surface_idx, :ref:`Material` material **)** +.. rst-class:: classref-method + +void **set_surface_material** **(** :ref:`int` surface_idx, :ref:`Material` material **)** Sets a :ref:`Material` for a given surface. Surface will be rendered using this material. +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMesh_method_set_surface_name: -- void **set_surface_name** **(** :ref:`int` surface_idx, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_surface_name** **(** :ref:`int` surface_idx, :ref:`String` name **)** Sets a name for a given surface. diff --git a/classes/class_importermeshinstance3d.rst b/classes/class_importermeshinstance3d.rst index b286992a1..967ca3810 100644 --- a/classes/class_importermeshinstance3d.rst +++ b/classes/class_importermeshinstance3d.rst @@ -16,63 +16,79 @@ ImporterMeshInstance3D There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------+---------------------------------------------------------------------------+------------------+ -| :ref:`ImporterMesh` | :ref:`mesh` | | -+-----------------------------------------+---------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`skeleton_path` | ``NodePath("")`` | -+-----------------------------------------+---------------------------------------------------------------------------+------------------+ -| :ref:`Skin` | :ref:`skin` | | -+-----------------------------------------+---------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+---------------------------------------------------------------------------+------------------+ + | :ref:`ImporterMesh` | :ref:`mesh` | | + +-----------------------------------------+---------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`skeleton_path` | ``NodePath("")`` | + +-----------------------------------------+---------------------------------------------------------------------------+------------------+ + | :ref:`Skin` | :ref:`skin` | | + +-----------------------------------------+---------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ImporterMeshInstance3D_property_mesh: -- :ref:`ImporterMesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`ImporterMesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`ImporterMesh` value **)** +- :ref:`ImporterMesh` **get_mesh** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMeshInstance3D_property_skeleton_path: -- :ref:`NodePath` **skeleton_path** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+--------------------------+ -| *Setter* | set_skeleton_path(value) | -+-----------+--------------------------+ -| *Getter* | get_skeleton_path() | -+-----------+--------------------------+ +:ref:`NodePath` **skeleton_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_skeleton_path** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_skeleton_path** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ImporterMeshInstance3D_property_skin: -- :ref:`Skin` **skin** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_skin(value) | -+----------+-----------------+ -| *Getter* | get_skin() | -+----------+-----------------+ +:ref:`Skin` **skin** + +.. rst-class:: classref-property-setget + +- void **set_skin** **(** :ref:`Skin` value **)** +- :ref:`Skin` **get_skin** **(** **)** .. container:: contribute diff --git a/classes/class_input.rst b/classes/class_input.rst index 7fc495fde..d9e9b6035 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -14,11 +14,15 @@ Input A singleton that deals with inputs. +.. rst-class:: classref-introduction-group + Description ----------- A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the **Input Map** tab in the **Project > Project Settings**, or with the :ref:`InputMap` class. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,244 +32,372 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------+--------------------------------------------------------------------------+ -| :ref:`MouseMode` | :ref:`mouse_mode` | -+----------------------------------------+--------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`use_accumulated_input` | -+----------------------------------------+--------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------+--------------------------------------------------------------------------+ + | :ref:`MouseMode` | :ref:`mouse_mode` | + +----------------------------------------+--------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_accumulated_input` | + +----------------------------------------+--------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_press` **(** :ref:`StringName` action, :ref:`float` strength=1.0 **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_release` **(** :ref:`StringName` action **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_joy_mapping` **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`flush_buffered_events` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_accelerometer` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_action_raw_strength` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_action_strength` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_axis` **(** :ref:`StringName` negative_action, :ref:`StringName` positive_action **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int[]` | :ref:`get_connected_joypads` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CursorShape` | :ref:`get_current_cursor_shape` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_gravity` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_gyroscope` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_joy_axis` **(** :ref:`int` device, :ref:`JoyAxis` axis **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_joy_guid` **(** :ref:`int` device **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_joy_name` **(** :ref:`int` device **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_joy_vibration_duration` **(** :ref:`int` device **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_joy_vibration_strength` **(** :ref:`int` device **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_last_mouse_velocity` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_magnetometer` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MouseButton` | :ref:`get_mouse_button_mask` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_vector` **(** :ref:`StringName` negative_x, :ref:`StringName` positive_x, :ref:`StringName` negative_y, :ref:`StringName` positive_y, :ref:`float` deadzone=-1.0 **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_just_pressed` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_just_released` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_anything_pressed` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_joy_button_pressed` **(** :ref:`int` device, :ref:`JoyButton` button **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_joy_known` **(** :ref:`int` device **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_key_pressed` **(** :ref:`Key` keycode **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_mouse_button_pressed` **(** :ref:`MouseButton` button **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_physical_key_pressed` **(** :ref:`Key` keycode **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`parse_input_event` **(** :ref:`InputEvent` event **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_joy_mapping` **(** :ref:`String` guid **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_accelerometer` **(** :ref:`Vector3` value **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_mouse_cursor` **(** :ref:`Resource` image, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_cursor_shape` **(** :ref:`CursorShape` shape=0 **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity` **(** :ref:`Vector3` value **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gyroscope` **(** :ref:`Vector3` value **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_magnetometer` **(** :ref:`Vector3` value **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`start_joy_vibration` **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop_joy_vibration` **(** :ref:`int` device **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`vibrate_handheld` **(** :ref:`int` duration_ms=500 **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`action_press` **(** :ref:`StringName` action, :ref:`float` strength=1.0 **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`action_release` **(** :ref:`StringName` action **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_joy_mapping` **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flush_buffered_events` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_accelerometer` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_action_raw_strength` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_action_strength` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_axis` **(** :ref:`StringName` negative_action, :ref:`StringName` positive_action **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int[]` | :ref:`get_connected_joypads` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | :ref:`get_current_cursor_shape` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_gravity` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_gyroscope` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joy_axis` **(** :ref:`int` device, :ref:`JoyAxis` axis **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_joy_guid` **(** :ref:`int` device **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_joy_name` **(** :ref:`int` device **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joy_vibration_duration` **(** :ref:`int` device **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_joy_vibration_strength` **(** :ref:`int` device **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_last_mouse_velocity` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_magnetometer` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MouseButton` | :ref:`get_mouse_button_mask` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_vector` **(** :ref:`StringName` negative_x, :ref:`StringName` positive_x, :ref:`StringName` negative_y, :ref:`StringName` positive_y, :ref:`float` deadzone=-1.0 **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_just_pressed` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_just_released` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_anything_pressed` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_joy_button_pressed` **(** :ref:`int` device, :ref:`JoyButton` button **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_joy_known` **(** :ref:`int` device **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_key_pressed` **(** :ref:`Key` keycode **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_mouse_button_pressed` **(** :ref:`MouseButton` button **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_physical_key_pressed` **(** :ref:`Key` keycode **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`parse_input_event` **(** :ref:`InputEvent` event **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_joy_mapping` **(** :ref:`String` guid **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_accelerometer` **(** :ref:`Vector3` value **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_mouse_cursor` **(** :ref:`Resource` image, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_cursor_shape` **(** :ref:`CursorShape` shape=0 **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gravity` **(** :ref:`Vector3` value **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gyroscope` **(** :ref:`Vector3` value **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_magnetometer` **(** :ref:`Vector3` value **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`start_joy_vibration` **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop_joy_vibration` **(** :ref:`int` device **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`vibrate_handheld` **(** :ref:`int` duration_ms=500 **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Input_signal_joy_connection_changed: -- **joy_connection_changed** **(** :ref:`int` device, :ref:`bool` connected **)** +.. rst-class:: classref-signal + +**joy_connection_changed** **(** :ref:`int` device, :ref:`bool` connected **)** Emitted when a joypad device has been connected or disconnected. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Input_MouseMode: -.. _class_Input_constant_MOUSE_MODE_VISIBLE: - -.. _class_Input_constant_MOUSE_MODE_HIDDEN: - -.. _class_Input_constant_MOUSE_MODE_CAPTURED: - -.. _class_Input_constant_MOUSE_MODE_CONFINED: - -.. _class_Input_constant_MOUSE_MODE_CONFINED_HIDDEN: +.. rst-class:: classref-enumeration enum **MouseMode**: -- **MOUSE_MODE_VISIBLE** = **0** --- Makes the mouse cursor visible if it is hidden. +.. _class_Input_constant_MOUSE_MODE_VISIBLE: -- **MOUSE_MODE_HIDDEN** = **1** --- Makes the mouse cursor hidden if it is visible. +.. rst-class:: classref-enumeration-constant -- **MOUSE_MODE_CAPTURED** = **2** --- Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. +:ref:`MouseMode` **MOUSE_MODE_VISIBLE** = ``0`` + +Makes the mouse cursor visible if it is hidden. + +.. _class_Input_constant_MOUSE_MODE_HIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_HIDDEN** = ``1`` + +Makes the mouse cursor hidden if it is visible. + +.. _class_Input_constant_MOUSE_MODE_CAPTURED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CAPTURED** = ``2`` + +Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. \ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative`. -- **MOUSE_MODE_CONFINED** = **3** --- Confines the mouse cursor to the game window, and make it visible. +.. _class_Input_constant_MOUSE_MODE_CONFINED: -- **MOUSE_MODE_CONFINED_HIDDEN** = **4** --- Confines the mouse cursor to the game window, and make it hidden. +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CONFINED** = ``3`` + +Confines the mouse cursor to the game window, and make it visible. + +.. _class_Input_constant_MOUSE_MODE_CONFINED_HIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CONFINED_HIDDEN** = ``4`` + +Confines the mouse cursor to the game window, and make it hidden. + +.. rst-class:: classref-item-separator ---- .. _enum_Input_CursorShape: -.. _class_Input_constant_CURSOR_ARROW: - -.. _class_Input_constant_CURSOR_IBEAM: - -.. _class_Input_constant_CURSOR_POINTING_HAND: - -.. _class_Input_constant_CURSOR_CROSS: - -.. _class_Input_constant_CURSOR_WAIT: - -.. _class_Input_constant_CURSOR_BUSY: - -.. _class_Input_constant_CURSOR_DRAG: - -.. _class_Input_constant_CURSOR_CAN_DROP: - -.. _class_Input_constant_CURSOR_FORBIDDEN: - -.. _class_Input_constant_CURSOR_VSIZE: - -.. _class_Input_constant_CURSOR_HSIZE: - -.. _class_Input_constant_CURSOR_BDIAGSIZE: - -.. _class_Input_constant_CURSOR_FDIAGSIZE: - -.. _class_Input_constant_CURSOR_MOVE: - -.. _class_Input_constant_CURSOR_VSPLIT: - -.. _class_Input_constant_CURSOR_HSPLIT: - -.. _class_Input_constant_CURSOR_HELP: +.. rst-class:: classref-enumeration enum **CursorShape**: -- **CURSOR_ARROW** = **0** --- Arrow cursor. Standard, default pointing cursor. +.. _class_Input_constant_CURSOR_ARROW: -- **CURSOR_IBEAM** = **1** --- I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked. +.. rst-class:: classref-enumeration-constant -- **CURSOR_POINTING_HAND** = **2** --- Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item. +:ref:`CursorShape` **CURSOR_ARROW** = ``0`` -- **CURSOR_CROSS** = **3** --- Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. +Arrow cursor. Standard, default pointing cursor. -- **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). +.. _class_Input_constant_CURSOR_IBEAM: -- **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. +.. rst-class:: classref-enumeration-constant -- **CURSOR_DRAG** = **6** --- Drag cursor. Usually displayed when dragging something. +:ref:`CursorShape` **CURSOR_IBEAM** = ``1`` + +I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked. + +.. _class_Input_constant_CURSOR_POINTING_HAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_POINTING_HAND** = ``2`` + +Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item. + +.. _class_Input_constant_CURSOR_CROSS: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_CROSS** = ``3`` + +Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. + +.. _class_Input_constant_CURSOR_WAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`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). + +.. _class_Input_constant_CURSOR_BUSY: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_Input_constant_CURSOR_DRAG: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_DRAG** = ``6`` + +Drag cursor. Usually displayed when dragging something. \ **Note:** Windows lacks a dragging cursor, so :ref:`CURSOR_DRAG` is the same as :ref:`CURSOR_MOVE` for this platform. -- **CURSOR_CAN_DROP** = **7** --- Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position. +.. _class_Input_constant_CURSOR_CAN_DROP: -- **CURSOR_FORBIDDEN** = **8** --- Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. +.. rst-class:: classref-enumeration-constant -- **CURSOR_VSIZE** = **9** --- Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. +:ref:`CursorShape` **CURSOR_CAN_DROP** = ``7`` -- **CURSOR_HSIZE** = **10** --- Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. +Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position. -- **CURSOR_BDIAGSIZE** = **11** --- Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. +.. _class_Input_constant_CURSOR_FORBIDDEN: -- **CURSOR_FDIAGSIZE** = **12** --- Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of :ref:`CURSOR_BDIAGSIZE`. It tells the user they can resize the window or the panel both horizontally and vertically. +.. rst-class:: classref-enumeration-constant -- **CURSOR_MOVE** = **13** --- Move cursor. Indicates that something can be moved. +:ref:`CursorShape` **CURSOR_FORBIDDEN** = ``8`` -- **CURSOR_VSPLIT** = **14** --- Vertical split mouse cursor. On Windows, it's the same as :ref:`CURSOR_VSIZE`. +Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. -- **CURSOR_HSPLIT** = **15** --- Horizontal split mouse cursor. On Windows, it's the same as :ref:`CURSOR_HSIZE`. +.. _class_Input_constant_CURSOR_VSIZE: -- **CURSOR_HELP** = **16** --- Help cursor. Usually a question mark. +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSIZE** = ``9`` + +Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. + +.. _class_Input_constant_CURSOR_HSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSIZE** = ``10`` + +Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + +.. _class_Input_constant_CURSOR_BDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_BDIAGSIZE** = ``11`` + +Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + +.. _class_Input_constant_CURSOR_FDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_FDIAGSIZE** = ``12`` + +Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of :ref:`CURSOR_BDIAGSIZE`. It tells the user they can resize the window or the panel both horizontally and vertically. + +.. _class_Input_constant_CURSOR_MOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_MOVE** = ``13`` + +Move cursor. Indicates that something can be moved. + +.. _class_Input_constant_CURSOR_VSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSPLIT** = ``14`` + +Vertical split mouse cursor. On Windows, it's the same as :ref:`CURSOR_VSIZE`. + +.. _class_Input_constant_CURSOR_HSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSPLIT** = ``15`` + +Horizontal split mouse cursor. On Windows, it's the same as :ref:`CURSOR_HSIZE`. + +.. _class_Input_constant_CURSOR_HELP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HELP** = ``16`` + +Help cursor. Usually a question mark. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Input_property_mouse_mode: -- :ref:`MouseMode` **mouse_mode** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_mouse_mode(value) | -+----------+-----------------------+ -| *Getter* | get_mouse_mode() | -+----------+-----------------------+ +:ref:`MouseMode` **mouse_mode** + +.. rst-class:: classref-property-setget + +- void **set_mouse_mode** **(** :ref:`MouseMode` value **)** +- :ref:`MouseMode` **get_mouse_mode** **(** **)** Controls the mouse mode. See :ref:`MouseMode` for more information. +.. rst-class:: classref-item-separator + ---- .. _class_Input_property_use_accumulated_input: -- :ref:`bool` **use_accumulated_input** +.. rst-class:: classref-property -+----------+----------------------------------+ -| *Setter* | set_use_accumulated_input(value) | -+----------+----------------------------------+ -| *Getter* | is_using_accumulated_input() | -+----------+----------------------------------+ +:ref:`bool` **use_accumulated_input** + +.. rst-class:: classref-property-setget + +- void **set_use_accumulated_input** **(** :ref:`bool` value **)** +- :ref:`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. @@ -273,12 +405,20 @@ Input accumulation can be disabled to get slightly more precise/reactive input a \ **Note:** Input accumulation is *enabled* by default. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Input_method_action_press: -- void **action_press** **(** :ref:`StringName` action, :ref:`float` strength=1.0 **)** +.. rst-class:: classref-method + +void **action_press** **(** :ref:`StringName` action, :ref:`float` strength=1.0 **)** This will simulate pressing the specified action. @@ -286,37 +426,53 @@ The strength can be used for non-boolean actions, it's ranged between 0 and 1 re \ **Note:** This method will not cause any :ref:`Node._input` calls. It is intended to be used with :ref:`is_action_pressed` and :ref:`is_action_just_pressed`. If you want to simulate ``_input``, use :ref:`parse_input_event` instead. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_action_release: -- void **action_release** **(** :ref:`StringName` action **)** +.. rst-class:: classref-method + +void **action_release** **(** :ref:`StringName` action **)** If the specified action is already pressed, this will release it. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_add_joy_mapping: -- void **add_joy_mapping** **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** +.. rst-class:: classref-method + +void **add_joy_mapping** **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_flush_buffered_events: -- void **flush_buffered_events** **(** **)** +.. rst-class:: classref-method + +void **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`) or agile input flushing (:ref:`ProjectSettings.input_devices/buffering/agile_event_flushing`). The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_accelerometer: -- :ref:`Vector3` **get_accelerometer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_accelerometer** **(** **)** |const| Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO`. @@ -324,143 +480,207 @@ Note this method returns an empty :ref:`Vector3` when running fro \ **Note:** This method only works on iOS, Android, and UWP. On other platforms, it always returns :ref:`Vector3.ZERO`. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_action_raw_strength: -- :ref:`float` **get_action_raw_strength** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_action_raw_strength** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| 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` instead. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_action_strength: -- :ref:`float` **get_action_strength** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_action_strength** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| 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. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_axis: -- :ref:`float` **get_axis** **(** :ref:`StringName` negative_action, :ref:`StringName` positive_action **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_axis** **(** :ref:`StringName` negative_action, :ref:`StringName` positive_action **)** |const| Get axis input by specifying two actions, one negative and one positive. This is a shorthand for writing ``Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")``. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_connected_joypads: -- :ref:`int[]` **get_connected_joypads** **(** **)** +.. rst-class:: classref-method + +:ref:`int[]` **get_connected_joypads** **(** **)** Returns an :ref:`Array` containing the device IDs of all currently connected joypads. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_current_cursor_shape: -- :ref:`CursorShape` **get_current_cursor_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`CursorShape` **get_current_cursor_shape** **(** **)** |const| Returns the currently assigned cursor shape (see :ref:`CursorShape`). +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_gravity: -- :ref:`Vector3` **get_gravity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_gravity** **(** **)** |const| Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO`. \ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO`. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_gyroscope: -- :ref:`Vector3` **get_gyroscope** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_gyroscope** **(** **)** |const| 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`. \ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO`. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_joy_axis: -- :ref:`float` **get_joy_axis** **(** :ref:`int` device, :ref:`JoyAxis` axis **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_joy_axis** **(** :ref:`int` device, :ref:`JoyAxis` axis **)** |const| Returns the current value of the joypad axis at given index (see :ref:`JoyAxis`). +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_joy_guid: -- :ref:`String` **get_joy_guid** **(** :ref:`int` device **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_joy_guid** **(** :ref:`int` device **)** |const| Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns ``"Default Gamepad"`` otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_joy_name: -- :ref:`String` **get_joy_name** **(** :ref:`int` device **)** +.. rst-class:: classref-method + +:ref:`String` **get_joy_name** **(** :ref:`int` device **)** Returns the name of the joypad at the specified device index. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_joy_vibration_duration: -- :ref:`float` **get_joy_vibration_duration** **(** :ref:`int` device **)** +.. rst-class:: classref-method + +:ref:`float` **get_joy_vibration_duration** **(** :ref:`int` device **)** Returns the duration of the current vibration effect in seconds. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_joy_vibration_strength: -- :ref:`Vector2` **get_joy_vibration_strength** **(** :ref:`int` device **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_joy_vibration_strength** **(** :ref:`int` device **)** Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_last_mouse_velocity: -- :ref:`Vector2` **get_last_mouse_velocity** **(** **)** +.. rst-class:: classref-method + +:ref:`Vector2` **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. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_magnetometer: -- :ref:`Vector3` **get_magnetometer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_magnetometer** **(** **)** |const| 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`. \ **Note:** This method only works on Android, iOS and UWP. On other platforms, it always returns :ref:`Vector3.ZERO`. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_mouse_button_mask: -- :ref:`MouseButton` **get_mouse_button_mask** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`MouseButton` **get_mouse_button_mask** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_get_vector: -- :ref:`Vector2` **get_vector** **(** :ref:`StringName` negative_x, :ref:`StringName` positive_x, :ref:`StringName` negative_y, :ref:`StringName` positive_y, :ref:`float` deadzone=-1.0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_vector** **(** :ref:`StringName` negative_x, :ref:`StringName` positive_x, :ref:`StringName` negative_y, :ref:`StringName` positive_y, :ref:`float` deadzone=-1.0 **)** |const| Gets an input vector by specifying four actions for the positive and negative X and Y axes. @@ -468,11 +688,15 @@ This method is useful when getting vector input, such as from a joystick, direct By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1). +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_action_just_pressed: -- :ref:`bool` **is_action_just_pressed** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_action_just_pressed** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| Returns ``true`` when the user starts pressing the action event, meaning it's ``true`` only on the frame that the user pressed down the button. @@ -482,21 +706,29 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: \ **Note:** Due to keyboard ghosting, :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_action_just_released: -- :ref:`bool` **is_action_just_released** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_action_just_released** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| Returns ``true`` when the user stops pressing the action event, meaning it's ``true`` only on the frame that the user released the button. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_action_pressed: -- :ref:`bool` **is_action_pressed** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_action_pressed** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| 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. @@ -504,35 +736,51 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: \ **Note:** Due to keyboard ghosting, :ref:`is_action_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. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_anything_pressed: -- :ref:`bool` **is_anything_pressed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_anything_pressed** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_joy_button_pressed: -- :ref:`bool` **is_joy_button_pressed** **(** :ref:`int` device, :ref:`JoyButton` button **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_joy_button_pressed** **(** :ref:`int` device, :ref:`JoyButton` button **)** |const| Returns ``true`` if you are pressing the joypad button (see :ref:`JoyButton`). +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_joy_known: -- :ref:`bool` **is_joy_known** **(** :ref:`int` device **)** +.. rst-class:: classref-method + +:ref:`bool` **is_joy_known** **(** :ref:`int` device **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_key_pressed: -- :ref:`bool` **is_key_pressed** **(** :ref:`Key` keycode **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_key_pressed** **(** :ref:`Key` keycode **)** |const| Returns ``true`` if you are pressing the key in the current keyboard layout. You can pass a :ref:`Key` constant. @@ -540,19 +788,27 @@ Returns ``true`` if you are pressing the key in the current keyboard layout. You \ **Note:** Due to keyboard ghosting, :ref:`is_key_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. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_mouse_button_pressed: -- :ref:`bool` **is_mouse_button_pressed** **(** :ref:`MouseButton` button **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_mouse_button_pressed** **(** :ref:`MouseButton` button **)** |const| Returns ``true`` if you are pressing the mouse button specified with :ref:`MouseButton`. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_is_physical_key_pressed: -- :ref:`bool` **is_physical_key_pressed** **(** :ref:`Key` keycode **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_physical_key_pressed** **(** :ref:`Key` keycode **)** |const| 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` constant. @@ -560,11 +816,15 @@ Returns ``true`` if you are pressing the key in the physical location on the 101 \ **Note:** Due to keyboard ghosting, :ref:`is_physical_key_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. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_parse_input_event: -- void **parse_input_event** **(** :ref:`InputEvent` event **)** +.. rst-class:: classref-method + +void **parse_input_event** **(** :ref:`InputEvent` event **)** Feeds an :ref:`InputEvent` to the game. Can be used to artificially trigger input events from code. Also generates :ref:`Node._input` calls. @@ -589,29 +849,41 @@ Feeds an :ref:`InputEvent` to the game. Can be used to artific +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_remove_joy_mapping: -- void **remove_joy_mapping** **(** :ref:`String` guid **)** +.. rst-class:: classref-method + +void **remove_joy_mapping** **(** :ref:`String` guid **)** Removes all mappings from the internal database that match the given GUID. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_set_accelerometer: -- void **set_accelerometer** **(** :ref:`Vector3` value **)** +.. rst-class:: classref-method + +void **set_accelerometer** **(** :ref:`Vector3` value **)** 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. \ **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_set_custom_mouse_cursor: -- void **set_custom_mouse_cursor** **(** :ref:`Resource` image, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **set_custom_mouse_cursor** **(** :ref:`Resource` image, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** 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` for the list of shapes. @@ -623,11 +895,15 @@ Sets a custom mouse cursor image, which is only visible inside the game window. \ **Note:** Only images imported with the **Lossless**, **Lossy** or **Uncompressed** compression modes are supported. The **Video RAM** compression mode can't be used for custom cursors. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_set_default_cursor_shape: -- void **set_default_cursor_shape** **(** :ref:`CursorShape` shape=0 **)** +.. rst-class:: classref-method + +void **set_default_cursor_shape** **(** :ref:`CursorShape` shape=0 **)** Sets the default cursor shape to be used in the viewport instead of :ref:`CURSOR_ARROW`. @@ -635,59 +911,83 @@ Sets the default cursor shape to be used in the viewport instead of :ref:`CURSOR \ **Note:** This method generates an :ref:`InputEventMouseMotion` to update cursor immediately. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_set_gravity: -- void **set_gravity** **(** :ref:`Vector3` value **)** +.. rst-class:: classref-method + +void **set_gravity** **(** :ref:`Vector3` value **)** 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. \ **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_set_gyroscope: -- void **set_gyroscope** **(** :ref:`Vector3` value **)** +.. rst-class:: classref-method + +void **set_gyroscope** **(** :ref:`Vector3` value **)** 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. \ **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_set_magnetometer: -- void **set_magnetometer** **(** :ref:`Vector3` value **)** +.. rst-class:: classref-method + +void **set_magnetometer** **(** :ref:`Vector3` value **)** 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. \ **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_start_joy_vibration: -- void **start_joy_vibration** **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** +.. rst-class:: classref-method + +void **start_joy_vibration** **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** 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). \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_stop_joy_vibration: -- void **stop_joy_vibration** **(** :ref:`int` device **)** +.. rst-class:: classref-method + +void **stop_joy_vibration** **(** :ref:`int` device **)** Stops the vibration of the joypad. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_vibrate_handheld: -- void **vibrate_handheld** **(** :ref:`int` duration_ms=500 **)** +.. rst-class:: classref-method + +void **vibrate_handheld** **(** :ref:`int` duration_ms=500 **)** Vibrate handheld devices. @@ -699,11 +999,15 @@ Vibrate handheld devices. \ **Note:** Some web browsers such as Safari and Firefox for Android do not support this method. +.. rst-class:: classref-item-separator + ---- .. _class_Input_method_warp_mouse: -- void **warp_mouse** **(** :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **warp_mouse** **(** :ref:`Vector2` position **)** 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. diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index 26400bf5b..cbc172d95 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -16,11 +16,15 @@ InputEvent Generic input event. +.. rst-class:: classref-introduction-group + Description ----------- Base class of all sort of input event. See :ref:`Node._input`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,103 +36,142 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+-------------------------------------------------+-------+ -| :ref:`int` | :ref:`device` | ``0`` | -+-----------------------+-------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------+-------+ + | :ref:`int` | :ref:`device` | ``0`` | + +-----------------------+-------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`accumulate` **(** :ref:`InputEvent` with_event **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`as_text` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_action_strength` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`StringName` action, :ref:`bool` allow_echo=false, :ref:`bool` exact_match=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_released` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_type` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_echo` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_match` **(** :ref:`InputEvent` event, :ref:`bool` exact_match=true **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_pressed` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`InputEvent` | :ref:`xformed_by` **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2(0, 0) **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`accumulate` **(** :ref:`InputEvent` with_event **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`as_text` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_action_strength` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`StringName` action, :ref:`bool` allow_echo=false, :ref:`bool` exact_match=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_released` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_type` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_echo` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_match` **(** :ref:`InputEvent` event, :ref:`bool` exact_match=true **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_pressed` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InputEvent` | :ref:`xformed_by` **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2(0, 0) **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEvent_property_device: -- :ref:`int` **device** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_device(value) | -+-----------+-------------------+ -| *Getter* | get_device() | -+-----------+-------------------+ +:ref:`int` **device** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_device** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_InputEvent_method_accumulate: -- :ref:`bool` **accumulate** **(** :ref:`InputEvent` with_event **)** +.. rst-class:: classref-method + +:ref:`bool` **accumulate** **(** :ref:`InputEvent` with_event **)** Returns ``true`` if the given input event and this input event can be added together (only for events of type :ref:`InputEventMouseMotion`). The given input event's position, global position and speed will be copied. The resulting ``relative`` is a sum of both events. Both events' modifiers have to be identical. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_as_text: -- :ref:`String` **as_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **as_text** **(** **)** |const| Returns a :ref:`String` representation of the event. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_get_action_strength: -- :ref:`float` **get_action_strength** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_action_strength** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| 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`. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_is_action: -- :ref:`bool` **is_action** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_action** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| Returns ``true`` if this input event matches a pre-defined action of any type. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_is_action_pressed: -- :ref:`bool` **is_action_pressed** **(** :ref:`StringName` action, :ref:`bool` allow_echo=false, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_action_pressed** **(** :ref:`StringName` action, :ref:`bool` allow_echo=false, :ref:`bool` exact_match=false **)** |const| Returns ``true`` if the given action is being pressed (and is not an echo event for :ref:`InputEventKey` events, unless ``allow_echo`` is ``true``). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. @@ -136,57 +179,81 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: \ **Note:** Due to keyboard ghosting, :ref:`is_action_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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_is_action_released: -- :ref:`bool` **is_action_released** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_action_released** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| Returns ``true`` if the given action is released (i.e. not pressed). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_is_action_type: -- :ref:`bool` **is_action_type** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_action_type** **(** **)** |const| Returns ``true`` if this input event's type is one that can be assigned to an input action. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_is_echo: -- :ref:`bool` **is_echo** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_echo** **(** **)** |const| Returns ``true`` if this input event is an echo event (only for events of type :ref:`InputEventKey`). +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_is_match: -- :ref:`bool` **is_match** **(** :ref:`InputEvent` event, :ref:`bool` exact_match=true **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_match** **(** :ref:`InputEvent` event, :ref:`bool` exact_match=true **)** |const| Returns ``true`` if the specified ``event`` matches this event. Only valid for action events i.e key (:ref:`InputEventKey`), button (:ref:`InputEventMouseButton` or :ref:`InputEventJoypadButton`), axis :ref:`InputEventJoypadMotion` or action (:ref:`InputEventAction`) events. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_is_pressed: -- :ref:`bool` **is_pressed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_pressed** **(** **)** |const| Returns ``true`` if this input event is pressed. Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. \ **Note:** Due to keyboard ghosting, :ref:`is_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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEvent_method_xformed_by: -- :ref:`InputEvent` **xformed_by** **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2(0, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`InputEvent` **xformed_by** **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2(0, 0) **)** |const| 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`, :ref:`InputEventMouseMotion`, :ref:`InputEventScreenTouch`, :ref:`InputEventScreenDrag`, :ref:`InputEventMagnifyGesture` and :ref:`InputEventPanGesture`. diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index 4f72d4d9d..81e0902cc 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -14,11 +14,15 @@ InputEventAction Input event type for actions. +.. rst-class:: classref-introduction-group + Description ----------- Contains a generic action which can be targeted from several types of inputs. Actions can be created from the **Input Map** tab in the **Project > Project Settings** menu. See :ref:`Node._input`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,63 +32,75 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+-----------------------------------------------------------+-----------+ -| :ref:`StringName` | :ref:`action` | ``&""`` | -+-------------------------------------+-----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`pressed` | ``false`` | -+-------------------------------------+-----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`strength` | ``1.0`` | -+-------------------------------------+-----------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------+-----------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`action` | ``&""`` | + +-------------------------------------+-----------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pressed` | ``false`` | + +-------------------------------------+-----------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`strength` | ``1.0`` | + +-------------------------------------+-----------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventAction_property_action: -- :ref:`StringName` **action** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``&""`` | -+-----------+-------------------+ -| *Setter* | set_action(value) | -+-----------+-------------------+ -| *Getter* | get_action() | -+-----------+-------------------+ +:ref:`StringName` **action** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_action** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_action** **(** **)** The action's name. Actions are accessed via this :ref:`String`. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventAction_property_pressed: -- :ref:`bool` **pressed** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_pressed(value) | -+-----------+--------------------+ -| *Getter* | is_pressed() | -+-----------+--------------------+ +:ref:`bool` **pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_pressed** **(** **)** If ``true``, the action's state is pressed. If ``false``, the action's state is released. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventAction_property_strength: -- :ref:`float` **strength** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_strength(value) | -+-----------+---------------------+ -| *Getter* | get_strength() | -+-----------+---------------------+ +:ref:`float` **strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_strength** **(** :ref:`float` value **)** +- :ref:`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. diff --git a/classes/class_inputeventfromwindow.rst b/classes/class_inputeventfromwindow.rst index 0ff3b62c8..9ae4dd5fc 100644 --- a/classes/class_inputeventfromwindow.rst +++ b/classes/class_inputeventfromwindow.rst @@ -18,27 +18,37 @@ InputEventFromWindow There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+-----------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`window_id` | ``0`` | -+-----------------------+-----------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`window_id` | ``0`` | + +-----------------------+-----------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventFromWindow_property_window_id: -- :ref:`int` **window_id** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_window_id(value) | -+-----------+----------------------+ -| *Getter* | get_window_id() | -+-----------+----------------------+ +:ref:`int` **window_id** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_window_id** **(** :ref:`int` value **)** +- :ref:`int` **get_window_id** **(** **)** .. container:: contribute diff --git a/classes/class_inputeventgesture.rst b/classes/class_inputeventgesture.rst index eaf5feed3..d66d668f6 100644 --- a/classes/class_inputeventgesture.rst +++ b/classes/class_inputeventgesture.rst @@ -16,27 +16,37 @@ InputEventGesture Base class for touch control gestures. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventGesture_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_position(value) | -+-----------+---------------------+ -| *Getter* | get_position() | -+-----------+---------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position** **(** **)** The local gesture position relative to the :ref:`Viewport`. If used in :ref:`Control._gui_input`, the position is relative to the current :ref:`Control` that received this gesture. diff --git a/classes/class_inputeventjoypadbutton.rst b/classes/class_inputeventjoypadbutton.rst index 64709dd4c..18cfadc24 100644 --- a/classes/class_inputeventjoypadbutton.rst +++ b/classes/class_inputeventjoypadbutton.rst @@ -14,73 +14,89 @@ InputEventJoypadButton Input event for gamepad buttons. +.. rst-class:: classref-introduction-group + Description ----------- Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see :ref:`InputEventJoypadMotion`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`JoyButton` | :ref:`button_index` | ``0`` | -+-----------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`pressed` | ``false`` | -+-----------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`pressure` | ``0.0`` | -+-----------------------------------------------+-------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`JoyButton` | :ref:`button_index` | ``0`` | + +-----------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pressed` | ``false`` | + +-----------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`pressure` | ``0.0`` | + +-----------------------------------------------+-------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventJoypadButton_property_button_index: -- :ref:`JoyButton` **button_index** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_button_index(value) | -+-----------+-------------------------+ -| *Getter* | get_button_index() | -+-----------+-------------------------+ +:ref:`JoyButton` **button_index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_button_index** **(** :ref:`JoyButton` value **)** +- :ref:`JoyButton` **get_button_index** **(** **)** Button identifier. One of the :ref:`JoyButton` button constants. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventJoypadButton_property_pressed: -- :ref:`bool` **pressed** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_pressed(value) | -+-----------+--------------------+ -| *Getter* | is_pressed() | -+-----------+--------------------+ +:ref:`bool` **pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_pressed** **(** **)** If ``true``, the button's state is pressed. If ``false``, the button's state is released. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventJoypadButton_property_pressure: -- :ref:`float` **pressure** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_pressure(value) | -+-----------+---------------------+ -| *Getter* | get_pressure() | -+-----------+---------------------+ +:ref:`float` **pressure** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pressure** **(** :ref:`float` value **)** +- :ref:`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``. diff --git a/classes/class_inputeventjoypadmotion.rst b/classes/class_inputeventjoypadmotion.rst index 65aad1d4c..129a0303f 100644 --- a/classes/class_inputeventjoypadmotion.rst +++ b/classes/class_inputeventjoypadmotion.rst @@ -14,55 +14,70 @@ InputEventJoypadMotion Input event type for gamepad joysticks and other motions. For buttons, see ``InputEventJoypadButton``. +.. rst-class:: classref-introduction-group + Description ----------- -Stores information about joystick motions. One ``InputEventJoypadMotion`` represents one axis at a time. +Stores information about joystick motions. One **InputEventJoypadMotion** represents one axis at a time. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------+---------------------------------------------------------------------+---------+ -| :ref:`JoyAxis` | :ref:`axis` | ``0`` | -+-------------------------------------------+---------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`axis_value` | ``0.0`` | -+-------------------------------------------+---------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +-------------------------------------------+---------------------------------------------------------------------+---------+ + | :ref:`JoyAxis` | :ref:`axis` | ``0`` | + +-------------------------------------------+---------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`axis_value` | ``0.0`` | + +-------------------------------------------+---------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventJoypadMotion_property_axis: -- :ref:`JoyAxis` **axis** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_axis(value) | -+-----------+-----------------+ -| *Getter* | get_axis() | -+-----------+-----------------+ +:ref:`JoyAxis` **axis** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_axis** **(** :ref:`JoyAxis` value **)** +- :ref:`JoyAxis` **get_axis** **(** **)** Axis identifier. Use one of the :ref:`JoyAxis` axis constants. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventJoypadMotion_property_axis_value: -- :ref:`float` **axis_value** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_axis_value(value) | -+-----------+-----------------------+ -| *Getter* | get_axis_value() | -+-----------+-----------------------+ +:ref:`float` **axis_value** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_axis_value** **(** :ref:`float` value **)** +- :ref:`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. diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index bdcf081e4..23b786d22 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -14,145 +14,180 @@ InputEventKey Input event type for keyboard events. +.. rst-class:: classref-introduction-group + Description ----------- Stores key presses on the keyboard. Supports key presses, key releases and :ref:`echo` events. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`echo` | ``false`` | -+-----------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`Key` | :ref:`keycode` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`Key` | :ref:`physical_keycode` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`pressed` | ``false`` | -+-----------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`unicode` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`echo` | ``false`` | + +-----------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`Key` | :ref:`keycode` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`Key` | :ref:`physical_keycode` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pressed` | ``false`` | + +-----------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`unicode` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Key` | :ref:`get_keycode_with_modifiers` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Key` | :ref:`get_physical_keycode_with_modifiers` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`get_keycode_with_modifiers` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`get_physical_keycode_with_modifiers` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventKey_property_echo: -- :ref:`bool` **echo** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_echo(value) | -+-----------+-----------------+ -| *Getter* | is_echo() | -+-----------+-----------------+ +:ref:`bool` **echo** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_echo** **(** :ref:`bool` value **)** +- :ref:`bool` **is_echo** **(** **)** If ``true``, the key was already pressed before this event. It means the user is holding the key down. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventKey_property_keycode: -- :ref:`Key` **keycode** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_keycode(value) | -+-----------+--------------------+ -| *Getter* | get_keycode() | -+-----------+--------------------+ +:ref:`Key` **keycode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_keycode** **(** :ref:`Key` value **)** +- :ref:`Key` **get_keycode** **(** **)** The key keycode, which corresponds to one of the :ref:`Key` constants. Represent key in the current keyboard layout. -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 ``OS.get_keycode_string(event.keycode)`` where ``event`` is the **InputEventKey**. + +.. rst-class:: classref-item-separator ---- .. _class_InputEventKey_property_physical_keycode: -- :ref:`Key` **physical_keycode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_physical_keycode(value) | -+-----------+-----------------------------+ -| *Getter* | get_physical_keycode() | -+-----------+-----------------------------+ +:ref:`Key` **physical_keycode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_physical_keycode** **(** :ref:`Key` value **)** +- :ref:`Key` **get_physical_keycode** **(** **)** Key physical keycode, which corresponds to one of the :ref:`Key` constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. -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 ``OS.get_keycode_string(event.keycode)`` where ``event`` is the **InputEventKey**. + +.. rst-class:: classref-item-separator ---- .. _class_InputEventKey_property_pressed: -- :ref:`bool` **pressed** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_pressed(value) | -+-----------+--------------------+ -| *Getter* | is_pressed() | -+-----------+--------------------+ +:ref:`bool` **pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_pressed** **(** **)** If ``true``, the key's state is pressed. If ``false``, the key's state is released. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventKey_property_unicode: -- :ref:`int` **unicode** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_unicode(value) | -+-----------+--------------------+ -| *Getter* | get_unicode() | -+-----------+--------------------+ +:ref:`int` **unicode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_unicode** **(** :ref:`int` value **)** +- :ref:`int` **get_unicode** **(** **)** The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See :ref:`Window.set_ime_active` for more information. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_InputEventKey_method_get_keycode_with_modifiers: -- :ref:`Key` **get_keycode_with_modifiers** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Key` **get_keycode_with_modifiers** **(** **)** |const| Returns the keycode combined with modifier keys such as :kbd:`Shift` or :kbd:`Alt`. See also :ref:`InputEventWithModifiers`. -To get a human-readable representation of the ``InputEventKey`` with modifiers, use ``OS.get_keycode_string(event.get_keycode_with_modifiers())`` where ``event`` is the ``InputEventKey``. +To get a human-readable representation of the **InputEventKey** with modifiers, use ``OS.get_keycode_string(event.get_keycode_with_modifiers())`` where ``event`` is the **InputEventKey**. + +.. rst-class:: classref-item-separator ---- .. _class_InputEventKey_method_get_physical_keycode_with_modifiers: -- :ref:`Key` **get_physical_keycode_with_modifiers** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Key` **get_physical_keycode_with_modifiers** **(** **)** |const| Returns the physical keycode combined with modifier keys such as :kbd:`Shift` or :kbd:`Alt`. See also :ref:`InputEventWithModifiers`. -To get a human-readable representation of the ``InputEventKey`` with modifiers, use ``OS.get_keycode_string(event.get_physical_keycode_with_modifiers())`` where ``event`` is the ``InputEventKey``. +To get a human-readable representation of the **InputEventKey** with modifiers, use ``OS.get_keycode_string(event.get_physical_keycode_with_modifiers())`` where ``event`` is the **InputEventKey**. .. |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.)` diff --git a/classes/class_inputeventmagnifygesture.rst b/classes/class_inputeventmagnifygesture.rst index 689ab17c4..95d092cb1 100644 --- a/classes/class_inputeventmagnifygesture.rst +++ b/classes/class_inputeventmagnifygesture.rst @@ -16,27 +16,37 @@ InputEventMagnifyGesture There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`factor` | ``1.0`` | -+---------------------------+---------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`factor` | ``1.0`` | + +---------------------------+---------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventMagnifyGesture_property_factor: -- :ref:`float` **factor** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_factor(value) | -+-----------+-------------------+ -| *Getter* | get_factor() | -+-----------+-------------------+ +:ref:`float` **factor** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_factor** **(** :ref:`float` value **)** +- :ref:`float` **get_factor** **(** **)** .. container:: contribute diff --git a/classes/class_inputeventmidi.rst b/classes/class_inputeventmidi.rst index 275f6a5b8..e9fdc942f 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -14,6 +14,8 @@ InputEventMIDI Input event for MIDI inputs. +.. rst-class:: classref-introduction-group + Description ----------- @@ -80,6 +82,8 @@ 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. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -89,105 +93,119 @@ Tutorials - `Wikipedia Piano Key Frequencies List `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`channel` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`controller_number` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`controller_value` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`instrument` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`MIDIMessage` | :ref:`message` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`pitch` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`pressure` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`velocity` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`channel` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`controller_number` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`controller_value` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`instrument` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`MIDIMessage` | :ref:`message` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`pitch` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`pressure` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`velocity` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventMIDI_property_channel: -- :ref:`int` **channel** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_channel(value) | -+-----------+--------------------+ -| *Getter* | get_channel() | -+-----------+--------------------+ +:ref:`int` **channel** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_channel** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMIDI_property_controller_number: -- :ref:`int` **controller_number** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_controller_number(value) | -+-----------+------------------------------+ -| *Getter* | get_controller_number() | -+-----------+------------------------------+ +:ref:`int` **controller_number** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_controller_number** **(** :ref:`int` value **)** +- :ref:`int` **get_controller_number** **(** **)** If the message is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE`, this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMIDI_property_controller_value: -- :ref:`int` **controller_value** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_controller_value(value) | -+-----------+-----------------------------+ -| *Getter* | get_controller_value() | -+-----------+-----------------------------+ +:ref:`int` **controller_value** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_controller_value** **(** :ref:`int` value **)** +- :ref:`int` **get_controller_value** **(** **)** If the message is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE`, this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMIDI_property_instrument: -- :ref:`int` **instrument** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_instrument(value) | -+-----------+-----------------------+ -| *Getter* | get_instrument() | -+-----------+-----------------------+ +:ref:`int` **instrument** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_instrument** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMIDI_property_message: -- :ref:`MIDIMessage` **message** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_message(value) | -+-----------+--------------------+ -| *Getter* | get_message() | -+-----------+--------------------+ +:ref:`MIDIMessage` **message** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_message** **(** :ref:`MIDIMessage` value **)** +- :ref:`MIDIMessage` **get_message** **(** **)** Returns a value indicating the type of message for this MIDI signal. This is a member of the :ref:`MIDIMessage` enum. @@ -197,51 +215,54 @@ Notes will return :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` **pitch** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_pitch(value) | -+-----------+------------------+ -| *Getter* | get_pitch() | -+-----------+------------------+ +:ref:`int` **pitch** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pitch** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMIDI_property_pressure: -- :ref:`int` **pressure** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_pressure(value) | -+-----------+---------------------+ -| *Getter* | get_pressure() | -+-----------+---------------------+ +:ref:`int` **pressure** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pressure** **(** :ref:`int` value **)** +- :ref:`int` **get_pressure** **(** **)** The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMIDI_property_velocity: -- :ref:`int` **velocity** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_velocity(value) | -+-----------+---------------------+ -| *Getter* | get_velocity() | -+-----------+---------------------+ +:ref:`int` **velocity** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`int` value **)** +- :ref:`int` **get_velocity** **(** **)** 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 that some MIDI devices may send a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` message with zero velocity and expect this to be treated the same as a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` message, but device implementations vary so Godot reports event data exactly as received. diff --git a/classes/class_inputeventmouse.rst b/classes/class_inputeventmouse.rst index 0d44dbc69..0729bb043 100644 --- a/classes/class_inputeventmouse.rst +++ b/classes/class_inputeventmouse.rst @@ -16,75 +16,91 @@ InputEventMouse Base input event type for mouse events. +.. rst-class:: classref-introduction-group + Description ----------- Stores general mouse events information. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`MouseButton` | :ref:`button_mask` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`global_position` | ``Vector2(0, 0)`` | -+---------------------------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+---------------------------------------------------+------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`MouseButton` | :ref:`button_mask` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`global_position` | ``Vector2(0, 0)`` | + +---------------------------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +---------------------------------------------------+------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventMouse_property_button_mask: -- :ref:`MouseButton` **button_mask** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_button_mask(value) | -+-----------+------------------------+ -| *Getter* | get_button_mask() | -+-----------+------------------------+ +:ref:`MouseButton` **button_mask** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_button_mask** **(** :ref:`MouseButton` value **)** +- :ref:`MouseButton` **get_button_mask** **(** **)** The mouse button mask identifier, one of or a bitwise combination of the :ref:`MouseButton` button masks. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouse_property_global_position: -- :ref:`Vector2` **global_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_global_position(value) | -+-----------+----------------------------+ -| *Getter* | get_global_position() | -+-----------+----------------------------+ +:ref:`Vector2` **global_position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_global_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_global_position** **(** **)** When received in :ref:`Node._input` or :ref:`Node._unhandled_input`, returns the mouse's position in the root :ref:`Viewport` using the coordinate system of the root :ref:`Viewport`. When received in :ref:`Control._gui_input`, returns the mouse's position in the :ref:`CanvasLayer` that the :ref:`Control` is in using the coordinate system of the :ref:`CanvasLayer`. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouse_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_position(value) | -+-----------+---------------------+ -| *Getter* | get_position() | -+-----------+---------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position** **(** **)** When received in :ref:`Node._input` or :ref:`Node._unhandled_input`, returns the mouse's position in the :ref:`Viewport` this :ref:`Node` is in using the coordinate system of this :ref:`Viewport`. diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index f3de077eb..e309097a5 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -14,91 +14,108 @@ InputEventMouseButton Input event type for mouse button events. +.. rst-class:: classref-introduction-group + Description ----------- Contains mouse click information. See :ref:`Node._input`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Mouse and input coordinates <../tutorials/inputs/mouse_and_input_coordinates>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`MouseButton` | :ref:`button_index` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`double_click` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`factor` | ``1.0`` | -+---------------------------------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`pressed` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`MouseButton` | :ref:`button_index` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`double_click` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`factor` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pressed` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventMouseButton_property_button_index: -- :ref:`MouseButton` **button_index** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_button_index(value) | -+-----------+-------------------------+ -| *Getter* | get_button_index() | -+-----------+-------------------------+ +:ref:`MouseButton` **button_index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_button_index** **(** :ref:`MouseButton` value **)** +- :ref:`MouseButton` **get_button_index** **(** **)** The mouse button identifier, one of the :ref:`MouseButton` button or button wheel constants. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouseButton_property_double_click: -- :ref:`bool` **double_click** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_double_click(value) | -+-----------+-------------------------+ -| *Getter* | is_double_click() | -+-----------+-------------------------+ +:ref:`bool` **double_click** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_double_click** **(** :ref:`bool` value **)** +- :ref:`bool` **is_double_click** **(** **)** If ``true``, the mouse button's state is a double-click. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouseButton_property_factor: -- :ref:`float` **factor** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_factor(value) | -+-----------+-------------------+ -| *Getter* | get_factor() | -+-----------+-------------------+ +:ref:`float` **factor** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_factor** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouseButton_property_pressed: -- :ref:`bool` **pressed** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_pressed(value) | -+-----------+--------------------+ -| *Getter* | is_pressed() | -+-----------+--------------------+ +:ref:`bool` **pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_pressed** **(** **)** If ``true``, the mouse button's state is pressed. If ``false``, the mouse button's state is released. diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index dd9cc0a3e..2c7aad2c5 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -14,6 +14,8 @@ InputEventMouseMotion Input event type for mouse motion events. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ Contains mouse and pen motion information. Supports relative, absolute positions \ **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` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing `Bresenham's line algorithm `__ as well to avoid visible gaps in lines if the user is moving the mouse quickly. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,103 +32,117 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`pen_inverted` | ``false`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`pressure` | ``0.0`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`relative` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`tilt` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`pen_inverted` | ``false`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`pressure` | ``0.0`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`relative` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`tilt` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventMouseMotion_property_pen_inverted: -- :ref:`bool` **pen_inverted** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_pen_inverted(value) | -+-----------+-------------------------+ -| *Getter* | get_pen_inverted() | -+-----------+-------------------------+ +:ref:`bool` **pen_inverted** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pen_inverted** **(** :ref:`bool` value **)** +- :ref:`bool` **get_pen_inverted** **(** **)** Returns ``true`` when using the eraser end of a stylus pen. \ **Note:** This property is implemented on Linux, macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouseMotion_property_pressure: -- :ref:`float` **pressure** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_pressure(value) | -+-----------+---------------------+ -| *Getter* | get_pressure() | -+-----------+---------------------+ +:ref:`float` **pressure** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pressure** **(** :ref:`float` value **)** +- :ref:`float` **get_pressure** **(** **)** Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0``. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouseMotion_property_relative: -- :ref:`Vector2` **relative** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_relative(value) | -+-----------+---------------------+ -| *Getter* | get_relative() | -+-----------+---------------------+ +:ref:`Vector2` **relative** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_relative** **(** :ref:`Vector2` value **)** +- :ref:`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:** 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. + +.. rst-class:: classref-item-separator ---- .. _class_InputEventMouseMotion_property_tilt: -- :ref:`Vector2` **tilt** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_tilt(value) | -+-----------+-------------------+ -| *Getter* | get_tilt() | -+-----------+-------------------+ +:ref:`Vector2` **tilt** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_tilt** **(** :ref:`Vector2` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventMouseMotion_property_velocity: -- :ref:`Vector2` **velocity** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_velocity(value) | -+-----------+---------------------+ -| *Getter* | get_velocity() | -+-----------+---------------------+ +:ref:`Vector2` **velocity** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_velocity** **(** **)** The mouse velocity in pixels per second. diff --git a/classes/class_inputeventpangesture.rst b/classes/class_inputeventpangesture.rst index b1eaa26a4..2b87cdc7b 100644 --- a/classes/class_inputeventpangesture.rst +++ b/classes/class_inputeventpangesture.rst @@ -16,27 +16,37 @@ InputEventPanGesture There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+---------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`delta` | ``Vector2(0, 0)`` | -+-------------------------------+---------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`delta` | ``Vector2(0, 0)`` | + +-------------------------------+---------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventPanGesture_property_delta: -- :ref:`Vector2` **delta** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_delta(value) | -+-----------+-------------------+ -| *Getter* | get_delta() | -+-----------+-------------------+ +:ref:`Vector2` **delta** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_delta** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_delta** **(** **)** .. container:: contribute diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index 0c3e153c5..1c6a20bf3 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -14,91 +14,108 @@ InputEventScreenDrag Input event type for screen drag events. Only available on mobile devices. +.. rst-class:: classref-introduction-group + Description ----------- Contains screen drag information. See :ref:`Node._input`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+---------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`index` | ``0`` | -+-------------------------------+---------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+-------------------------------+---------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`relative` | ``Vector2(0, 0)`` | -+-------------------------------+---------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | -+-------------------------------+---------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`index` | ``0`` | + +-------------------------------+---------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +-------------------------------+---------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`relative` | ``Vector2(0, 0)`` | + +-------------------------------+---------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | + +-------------------------------+---------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventScreenDrag_property_index: -- :ref:`int` **index** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_index(value) | -+-----------+------------------+ -| *Getter* | get_index() | -+-----------+------------------+ +:ref:`int` **index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_index** **(** :ref:`int` value **)** +- :ref:`int` **get_index** **(** **)** The drag event index in the case of a multi-drag event. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventScreenDrag_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_position(value) | -+-----------+---------------------+ -| *Getter* | get_position() | -+-----------+---------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position** **(** **)** The drag position. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventScreenDrag_property_relative: -- :ref:`Vector2` **relative** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_relative(value) | -+-----------+---------------------+ -| *Getter* | get_relative() | -+-----------+---------------------+ +:ref:`Vector2` **relative** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_relative** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_relative** **(** **)** The drag position relative to the previous position (position at the last frame). +.. rst-class:: classref-item-separator + ---- .. _class_InputEventScreenDrag_property_velocity: -- :ref:`Vector2` **velocity** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_velocity(value) | -+-----------+---------------------+ -| *Getter* | get_velocity() | -+-----------+---------------------+ +:ref:`Vector2` **velocity** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_velocity** **(** **)** The drag velocity. diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index b9f2738b1..3660fb1f4 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -16,91 +16,108 @@ Input event type for screen touch events. (only available on mobile devices) +.. rst-class:: classref-introduction-group + Description ----------- Stores multi-touch press/release information. Supports touch press, touch release and :ref:`index` for multi-touch count and order. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`double_tap` | ``false`` | -+-------------------------------+--------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`index` | ``0`` | -+-------------------------------+--------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+-------------------------------+--------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`pressed` | ``false`` | -+-------------------------------+--------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`double_tap` | ``false`` | + +-------------------------------+--------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`index` | ``0`` | + +-------------------------------+--------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +-------------------------------+--------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`pressed` | ``false`` | + +-------------------------------+--------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventScreenTouch_property_double_tap: -- :ref:`bool` **double_tap** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_double_tap(value) | -+-----------+-----------------------+ -| *Getter* | is_double_tap() | -+-----------+-----------------------+ +:ref:`bool` **double_tap** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_double_tap** **(** :ref:`bool` value **)** +- :ref:`bool` **is_double_tap** **(** **)** If ``true``, the touch's state is a double tap. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventScreenTouch_property_index: -- :ref:`int` **index** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_index(value) | -+-----------+------------------+ -| *Getter* | get_index() | -+-----------+------------------+ +:ref:`int` **index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_index** **(** :ref:`int` value **)** +- :ref:`int` **get_index** **(** **)** The touch index in the case of a multi-touch event. One index = one finger. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventScreenTouch_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_position(value) | -+-----------+---------------------+ -| *Getter* | get_position() | -+-----------+---------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position** **(** **)** The touch position, in screen (global) coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventScreenTouch_property_pressed: -- :ref:`bool` **pressed** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_pressed(value) | -+-----------+--------------------+ -| *Getter* | is_pressed() | -+-----------+--------------------+ +:ref:`bool` **pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_pressed** **(** **)** If ``true``, the touch's state is pressed. If ``false``, the touch's state is released. diff --git a/classes/class_inputeventshortcut.rst b/classes/class_inputeventshortcut.rst index e17dc7967..cd043aa6a 100644 --- a/classes/class_inputeventshortcut.rst +++ b/classes/class_inputeventshortcut.rst @@ -16,25 +16,37 @@ InputEventShortcut There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------+ -| :ref:`Shortcut` | :ref:`shortcut` | -+---------------------------------+-------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------+ + | :ref:`Shortcut` | :ref:`shortcut` | + +---------------------------------+-------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventShortcut_property_shortcut: -- :ref:`Shortcut` **shortcut** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_shortcut(value) | -+----------+---------------------+ -| *Getter* | get_shortcut() | -+----------+---------------------+ +:ref:`Shortcut` **shortcut** + +.. rst-class:: classref-property-setget + +- void **set_shortcut** **(** :ref:`Shortcut` value **)** +- :ref:`Shortcut` **get_shortcut** **(** **)** .. container:: contribute diff --git a/classes/class_inputeventwithmodifiers.rst b/classes/class_inputeventwithmodifiers.rst index 00b821d0a..8a40ad2f5 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -16,125 +16,156 @@ InputEventWithModifiers Base class for keys events with modifiers. +.. rst-class:: classref-introduction-group + Description ----------- Contains keys events information with modifiers support like :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`InputEvent <../tutorials/inputs/inputevent>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`alt_pressed` | ``false`` | -+-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`command_or_control_autoremap` | ``false`` | -+-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`ctrl_pressed` | ``false`` | -+-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`meta_pressed` | ``false`` | -+-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`shift_pressed` | ``false`` | -+-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`alt_pressed` | ``false`` | + +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`command_or_control_autoremap` | ``false`` | + +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`ctrl_pressed` | ``false`` | + +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`meta_pressed` | ``false`` | + +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`shift_pressed` | ``false`` | + +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_command_or_control_pressed` **(** **)** |const| | -+-------------------------+------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_command_or_control_pressed` **(** **)** |const| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_InputEventWithModifiers_property_alt_pressed: -- :ref:`bool` **alt_pressed** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_alt_pressed(value) | -+-----------+------------------------+ -| *Getter* | is_alt_pressed() | -+-----------+------------------------+ +:ref:`bool` **alt_pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_alt_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_alt_pressed** **(** **)** State of the :kbd:`Alt` modifier. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventWithModifiers_property_command_or_control_autoremap: -- :ref:`bool` **command_or_control_autoremap** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------+ -| *Setter* | set_command_or_control_autoremap(value) | -+-----------+-----------------------------------------+ -| *Getter* | is_command_or_control_autoremap() | -+-----------+-----------------------------------------+ +:ref:`bool` **command_or_control_autoremap** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_command_or_control_autoremap** **(** :ref:`bool` value **)** +- :ref:`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` and :ref:`meta_pressed` cannot be set. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventWithModifiers_property_ctrl_pressed: -- :ref:`bool` **ctrl_pressed** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_ctrl_pressed(value) | -+-----------+-------------------------+ -| *Getter* | is_ctrl_pressed() | -+-----------+-------------------------+ +:ref:`bool` **ctrl_pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_ctrl_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_ctrl_pressed** **(** **)** State of the :kbd:`Ctrl` modifier. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventWithModifiers_property_meta_pressed: -- :ref:`bool` **meta_pressed** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_meta_pressed(value) | -+-----------+-------------------------+ -| *Getter* | is_meta_pressed() | -+-----------+-------------------------+ +:ref:`bool` **meta_pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_meta_pressed** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_InputEventWithModifiers_property_shift_pressed: -- :ref:`bool` **shift_pressed** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_shift_pressed(value) | -+-----------+--------------------------+ -| *Getter* | is_shift_pressed() | -+-----------+--------------------------+ +:ref:`bool` **shift_pressed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_shift_pressed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shift_pressed** **(** **)** State of the :kbd:`Shift` modifier. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_InputEventWithModifiers_method_is_command_or_control_pressed: -- :ref:`bool` **is_command_or_control_pressed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_command_or_control_pressed** **(** **)** |const| On macOS, returns ``true`` if :kbd:`Meta` (:kbd:`Command`) is pressed. diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index f955e9ed9..efe9d5373 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -14,157 +14,222 @@ InputMap Singleton that manages :ref:`InputEventAction`. +.. rst-class:: classref-introduction-group + Description ----------- Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action` and :ref:`action_add_event`. See :ref:`Node._input`. +.. rst-class:: classref-introduction-group + Tutorials --------- - `InputEvent: InputMap <../tutorials/inputs/inputevent.html#inputmap>`__ +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_add_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_erase_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_erase_events` **(** :ref:`StringName` action **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`action_get_deadzone` **(** :ref:`StringName` action **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`InputEvent[]` | :ref:`action_get_events` **(** :ref:`StringName` action **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`action_has_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_set_deadzone` **(** :ref:`StringName` action, :ref:`float` deadzone **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_action` **(** :ref:`StringName` action, :ref:`float` deadzone=0.5 **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_action` **(** :ref:`StringName` action **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`event_is_action` **(** :ref:`InputEvent` event, :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName[]` | :ref:`get_actions` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_action` **(** :ref:`StringName` action **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`load_from_project_settings` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`action_add_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`action_erase_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`action_erase_events` **(** :ref:`StringName` action **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`action_get_deadzone` **(** :ref:`StringName` action **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InputEvent[]` | :ref:`action_get_events` **(** :ref:`StringName` action **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`action_has_event` **(** :ref:`StringName` action, :ref:`InputEvent` event **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`action_set_deadzone` **(** :ref:`StringName` action, :ref:`float` deadzone **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_action` **(** :ref:`StringName` action, :ref:`float` deadzone=0.5 **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_action` **(** :ref:`StringName` action **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`event_is_action` **(** :ref:`InputEvent` event, :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_actions` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_action` **(** :ref:`StringName` action **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`load_from_project_settings` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_InputMap_method_action_add_event: -- void **action_add_event** **(** :ref:`StringName` action, :ref:`InputEvent` event **)** +.. rst-class:: classref-method + +void **action_add_event** **(** :ref:`StringName` action, :ref:`InputEvent` event **)** Adds an :ref:`InputEvent` to an action. This :ref:`InputEvent` will trigger the action. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_action_erase_event: -- void **action_erase_event** **(** :ref:`StringName` action, :ref:`InputEvent` event **)** +.. rst-class:: classref-method + +void **action_erase_event** **(** :ref:`StringName` action, :ref:`InputEvent` event **)** Removes an :ref:`InputEvent` from an action. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_action_erase_events: -- void **action_erase_events** **(** :ref:`StringName` action **)** +.. rst-class:: classref-method + +void **action_erase_events** **(** :ref:`StringName` action **)** Removes all events from an action. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_action_get_deadzone: -- :ref:`float` **action_get_deadzone** **(** :ref:`StringName` action **)** +.. rst-class:: classref-method + +:ref:`float` **action_get_deadzone** **(** :ref:`StringName` action **)** Returns a deadzone value for the action. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_action_get_events: -- :ref:`InputEvent[]` **action_get_events** **(** :ref:`StringName` action **)** +.. rst-class:: classref-method + +:ref:`InputEvent[]` **action_get_events** **(** :ref:`StringName` action **)** Returns an array of :ref:`InputEvent`\ s associated with a given action. \ **Note:** When used in the editor (e.g. a tool script or :ref:`EditorPlugin`), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the ``input/*`` settings from :ref:`ProjectSettings`. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_action_has_event: -- :ref:`bool` **action_has_event** **(** :ref:`StringName` action, :ref:`InputEvent` event **)** +.. rst-class:: classref-method + +:ref:`bool` **action_has_event** **(** :ref:`StringName` action, :ref:`InputEvent` event **)** Returns ``true`` if the action has the given :ref:`InputEvent` associated with it. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_action_set_deadzone: -- void **action_set_deadzone** **(** :ref:`StringName` action, :ref:`float` deadzone **)** +.. rst-class:: classref-method + +void **action_set_deadzone** **(** :ref:`StringName` action, :ref:`float` deadzone **)** Sets a deadzone value for the action. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_add_action: -- void **add_action** **(** :ref:`StringName` action, :ref:`float` deadzone=0.5 **)** +.. rst-class:: classref-method -Adds an empty action to the ``InputMap`` with a configurable ``deadzone``. +void **add_action** **(** :ref:`StringName` action, :ref:`float` deadzone=0.5 **)** + +Adds an empty action to the **InputMap** with a configurable ``deadzone``. An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event`. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_erase_action: -- void **erase_action** **(** :ref:`StringName` action **)** +.. rst-class:: classref-method -Removes an action from the ``InputMap``. +void **erase_action** **(** :ref:`StringName` action **)** + +Removes an action from the **InputMap**. + +.. rst-class:: classref-item-separator ---- .. _class_InputMap_method_event_is_action: -- :ref:`bool` **event_is_action** **(** :ref:`InputEvent` event, :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **event_is_action** **(** :ref:`InputEvent` event, :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| Returns ``true`` if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +.. rst-class:: classref-item-separator + ---- .. _class_InputMap_method_get_actions: -- :ref:`StringName[]` **get_actions** **(** **)** +.. rst-class:: classref-method -Returns an array of all actions in the ``InputMap``. +:ref:`StringName[]` **get_actions** **(** **)** + +Returns an array of all actions in the **InputMap**. + +.. rst-class:: classref-item-separator ---- .. _class_InputMap_method_has_action: -- :ref:`bool` **has_action** **(** :ref:`StringName` action **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``InputMap`` has a registered action with the given name. +:ref:`bool` **has_action** **(** :ref:`StringName` action **)** |const| + +Returns ``true`` if the **InputMap** has a registered action with the given name. + +.. rst-class:: classref-item-separator ---- .. _class_InputMap_method_load_from_project_settings: -- void **load_from_project_settings** **(** **)** +.. rst-class:: classref-method -Clears all :ref:`InputEventAction` in the ``InputMap`` and load it anew from :ref:`ProjectSettings`. +void **load_from_project_settings** **(** **)** + +Clears all :ref:`InputEventAction` in the **InputMap** and load it anew from :ref:`ProjectSettings`. .. |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.)` diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst index b48d5dab0..d4fcfb9f7 100644 --- a/classes/class_instanceplaceholder.rst +++ b/classes/class_instanceplaceholder.rst @@ -14,48 +14,71 @@ InstancePlaceholder Placeholder for the root :ref:`Node` of a :ref:`PackedScene`. +.. rst-class:: classref-introduction-group + Description ----------- -Turning on the option **Load As Placeholder** for an instantiated scene in the editor causes it to be replaced by an ``InstancePlaceholder`` when running the game, this will not replace the node in the editor. This makes it possible to delay actually loading the scene until calling :ref:`create_instance`. This is useful to avoid loading large scenes all at once by loading parts of it selectively. +Turning on the option **Load As Placeholder** for an instantiated scene in the editor causes it to be replaced by an **InstancePlaceholder** when running the game, this will not replace the node in the editor. This makes it possible to delay actually loading the scene until calling :ref:`create_instance`. This is useful to avoid loading large scenes all at once by loading parts of it selectively. -The ``InstancePlaceholder`` does not have a transform. This causes any child nodes to be positioned relatively to the :ref:`Viewport` from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. +The **InstancePlaceholder** does not have a transform. This causes any child nodes to be positioned relatively to the :ref:`Viewport` from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`create_instance` **(** :ref:`bool` replace=false, :ref:`PackedScene` custom_scene=null **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_instance_path` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_stored_values` **(** :ref:`bool` with_order=false **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`create_instance` **(** :ref:`bool` replace=false, :ref:`PackedScene` custom_scene=null **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_instance_path` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_stored_values` **(** :ref:`bool` with_order=false **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_InstancePlaceholder_method_create_instance: -- :ref:`Node` **create_instance** **(** :ref:`bool` replace=false, :ref:`PackedScene` custom_scene=null **)** +.. rst-class:: classref-method -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`'s reference is also returned for convenience. +:ref:`Node` **create_instance** **(** :ref:`bool` replace=false, :ref:`PackedScene` custom_scene=null **)** + +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`'s reference is also returned for convenience. \ **Note:** :ref:`create_instance` is not thread-safe. Use :ref:`Object.call_deferred` if calling from a thread. +.. rst-class:: classref-item-separator + ---- .. _class_InstancePlaceholder_method_get_instance_path: -- :ref:`String` **get_instance_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_instance_path** **(** **)** |const| Gets the path to the :ref:`PackedScene` resource file that is loaded by default when calling :ref:`create_instance`. Not thread-safe. Use :ref:`Object.call_deferred` if calling from a thread. +.. rst-class:: classref-item-separator + ---- .. _class_InstancePlaceholder_method_get_stored_values: -- :ref:`Dictionary` **get_stored_values** **(** :ref:`bool` with_order=false **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_stored_values** **(** :ref:`bool` with_order=false **)** Returns the list of properties that will be applied to the node when :ref:`create_instance` is called. diff --git a/classes/class_int.rst b/classes/class_int.rst index 616bcf49f..b930c7f14 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -12,6 +12,8 @@ int Integer built-in type. +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,7 +21,7 @@ Signed 64-bit integer type. It can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. -\ ``int`` is a :ref:`Variant` type, and will thus be used when assigning an integer value to a :ref:`Variant`. It can also be enforced with the ``: int`` type hint. +\ **int** is a :ref:`Variant` type, and will thus be used when assigning an integer value to a :ref:`Variant`. It can also be enforced with the ``: int`` type hint. .. tabs:: @@ -54,157 +56,209 @@ It can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854 +.. rst-class:: classref-reftable-group + Constructors ------------ -+-----------------------+------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** **)** | -+-----------------------+------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** :ref:`int` from **)** | -+-----------------------+------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** :ref:`String` from **)** | -+-----------------------+------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** :ref:`bool` from **)** | -+-----------------------+------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`int` **(** :ref:`float` from **)** | -+-----------------------+------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`int` **(** **)** | + +-----------------------+------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`int` **(** :ref:`int` from **)** | + +-----------------------+------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`int` **(** :ref:`String` from **)** | + +-----------------------+------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`int` **(** :ref:`bool` from **)** | + +-----------------------+------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`int` **(** :ref:`float` from **)** | + +-----------------------+------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator %` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator &` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`operator *` **(** :ref:`Color` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator *` **(** :ref:`Vector2i` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator *` **(** :ref:`Vector3i` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator *` **(** :ref:`Vector4i` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator *` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator *` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator **` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator **` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator +` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator +` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator -` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator -` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator /` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator /` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator \<\<` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`float` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator >>` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator ^` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator unary+` **(** **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator unary-` **(** **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator |` **(** :ref:`int` right **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator ~` **(** **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator %` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator &` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator *` **(** :ref:`Color` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator *` **(** :ref:`Vector2i` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator *` **(** :ref:`Vector3i` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator *` **(** :ref:`Vector4i` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator *` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator *` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator **` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator **` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator +` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator +` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator -` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator -` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator /` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator /` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator \<\<` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`float` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator >>` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator ^` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator unary+` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator unary-` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator |` **(** :ref:`int` right **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator ~` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_int_constructor_int: -- :ref:`int` **int** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``int`` set to ``0``. +:ref:`int` **int** **(** **)** + +Constructs a default-initialized **int** set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`int` **int** **(** :ref:`int` from **)** +.. rst-class:: classref-constructor -Constructs an ``int`` as a copy of the given ``int``. +:ref:`int` **int** **(** :ref:`int` from **)** + +Constructs an **int** as a copy of the given **int**. + +.. rst-class:: classref-item-separator ---- -- :ref:`int` **int** **(** :ref:`String` from **)** +.. rst-class:: classref-constructor -Converts a :ref:`String` to an ``int``, following the same rules as :ref:`String.to_int`. +:ref:`int` **int** **(** :ref:`String` from **)** + +Converts a :ref:`String` to an **int**, following the same rules as :ref:`String.to_int`. + +.. rst-class:: classref-item-separator ---- -- :ref:`int` **int** **(** :ref:`bool` from **)** +.. rst-class:: classref-constructor + +:ref:`int` **int** **(** :ref:`bool` from **)** Cast a :ref:`bool` value to an integer value, ``int(true)`` will be equals to 1 and ``int(false)`` will be equals to 0. +.. rst-class:: classref-item-separator + ---- -- :ref:`int` **int** **(** :ref:`float` from **)** +.. rst-class:: classref-constructor + +:ref:`int` **int** **(** :ref:`float` from **)** Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds ``from`` towards zero), so for example ``int(2.7)`` will be equals to 2, ``int(0.1)`` will be equals to 0 and ``int(-2.7)`` will be equals to -2. This operation is also called truncation. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_int_operator_neq_bool: +.. _class_int_operator_neq_float: -- :ref:`bool` **operator !=** **(** :ref:`float` right **)** +.. rst-class:: classref-operator -Returns ``true`` if this ``int`` is not equivalent to the given :ref:`float`. +:ref:`bool` **operator !=** **(** :ref:`float` right **)** + +Returns ``true`` if this **int** is not equivalent to the given :ref:`float`. + +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator !=** **(** :ref:`int` right **)** +.. _class_int_operator_neq_int: + +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`int` right **)** Returns ``true`` if the integers are not equal. +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_mod_int: -- :ref:`int` **operator %** **(** :ref:`int` right **)** +.. rst-class:: classref-operator + +:ref:`int` **operator %** **(** :ref:`int` right **)** Returns the remainder after dividing two integers. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. @@ -214,11 +268,15 @@ Returns the remainder after dividing two integers. This operation uses truncated print(12 % 4) # 0 print(-5 % 3) # -2 +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_bwand_int: -- :ref:`int` **operator &** **(** :ref:`int` right **)** +.. rst-class:: classref-operator + +:ref:`int` **operator &** **(** :ref:`int` right **)** Returns the result of bitwise ``AND`` operation for two integers. @@ -236,137 +294,235 @@ It's useful to retrieve binary flags from a variable. if flags & 1: do_stuff() +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_mul_Color: -- :ref:`Color` **operator *** **(** :ref:`Color` right **)** +.. rst-class:: classref-operator -Multiplies each component of the :ref:`Color` by the given ``int``. +:ref:`Color` **operator *** **(** :ref:`Color` right **)** + +Multiplies each component of the :ref:`Color` by the given **int**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** +.. _class_int_operator_mul_Quaternion: -Multiplies each component of the :ref:`Quaternion` by the given ``int``. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +.. rst-class:: classref-operator + +:ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** + +Multiplies each component of the :ref:`Quaternion` by the given **int**. 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 ---- -- :ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** +.. _class_int_operator_mul_Vector2: -Multiplies each component of the :ref:`Vector2` by the given ``int``. +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** + +Multiplies each component of the :ref:`Vector2` by the given **int**. :: print(2 * Vector2(1, 1)) # Vector2(2, 2) ----- - -- :ref:`Vector2i` **operator *** **(** :ref:`Vector2i` right **)** - -Multiplies each component of the :ref:`Vector2i` by the given ``int``. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** +.. _class_int_operator_mul_Vector2i: -Multiplies each component of the :ref:`Vector3` by the given ``int``. +.. rst-class:: classref-operator + +:ref:`Vector2i` **operator *** **(** :ref:`Vector2i` right **)** + +Multiplies each component of the :ref:`Vector2i` by the given **int**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3i` **operator *** **(** :ref:`Vector3i` right **)** +.. _class_int_operator_mul_Vector3: -Multiplies each component of the :ref:`Vector3i` by the given ``int``. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** + +Multiplies each component of the :ref:`Vector3` by the given **int**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** +.. _class_int_operator_mul_Vector3i: -Multiplies each component of the :ref:`Vector4` by the given ``int``. +.. rst-class:: classref-operator + +:ref:`Vector3i` **operator *** **(** :ref:`Vector3i` right **)** + +Multiplies each component of the :ref:`Vector3i` by the given **int**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4i` **operator *** **(** :ref:`Vector4i` right **)** +.. _class_int_operator_mul_Vector4: -Multiplies each component of the :ref:`Vector4i` by the given ``int``. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** + +Multiplies each component of the :ref:`Vector4` by the given **int**. + +.. rst-class:: classref-item-separator ---- -- :ref:`float` **operator *** **(** :ref:`float` right **)** +.. _class_int_operator_mul_Vector4i: -Multiplies an ``int`` and a :ref:`float`. The result is a :ref:`float`. +.. rst-class:: classref-operator + +:ref:`Vector4i` **operator *** **(** :ref:`Vector4i` right **)** + +Multiplies each component of the :ref:`Vector4i` by the given **int**. + +.. rst-class:: classref-item-separator ---- -- :ref:`int` **operator *** **(** :ref:`int` right **)** +.. _class_int_operator_mul_float: -Multiplies two ``int``\ s. +.. rst-class:: classref-operator + +:ref:`float` **operator *** **(** :ref:`float` right **)** + +Multiplies an **int** and a :ref:`float`. The result is a :ref:`float`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_int_operator_mul_int: + +.. rst-class:: classref-operator + +:ref:`int` **operator *** **(** :ref:`int` right **)** + +Multiplies two **int**\ s. + +.. rst-class:: classref-item-separator ---- .. _class_int_operator_pow_float: -- :ref:`float` **operator **** **(** :ref:`float` right **)** +.. rst-class:: classref-operator -Raises an ``int`` to a power of a :ref:`float`. The result is a :ref:`float`. +:ref:`float` **operator **** **(** :ref:`float` right **)** + +Raises an **int** to a power of a :ref:`float`. The result is a :ref:`float`. :: print(8**0.25) # 1.68179283050743 +.. rst-class:: classref-item-separator + ---- -- :ref:`int` **operator **** **(** :ref:`int` right **)** +.. _class_int_operator_pow_int: -Raises an ``int`` to a power of a ``int``. +.. rst-class:: classref-operator + +:ref:`int` **operator **** **(** :ref:`int` right **)** + +Raises an **int** to a power of a **int**. :: print(5**5) # 3125 +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_sum_float: -- :ref:`float` **operator +** **(** :ref:`float` right **)** +.. rst-class:: classref-operator -Adds an ``int`` and a :ref:`float`. The result is a :ref:`float`. +:ref:`float` **operator +** **(** :ref:`float` right **)** + +Adds an **int** and a :ref:`float`. The result is a :ref:`float`. + +.. rst-class:: classref-item-separator ---- -- :ref:`int` **operator +** **(** :ref:`int` right **)** +.. _class_int_operator_sum_int: + +.. rst-class:: classref-operator + +:ref:`int` **operator +** **(** :ref:`int` right **)** Adds two integers. +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_dif_float: -- :ref:`float` **operator -** **(** :ref:`float` right **)** +.. rst-class:: classref-operator -Subtracts a :ref:`float` from an ``int``. The result is a :ref:`float`. +:ref:`float` **operator -** **(** :ref:`float` right **)** + +Subtracts a :ref:`float` from an **int**. The result is a :ref:`float`. + +.. rst-class:: classref-item-separator ---- -- :ref:`int` **operator -** **(** :ref:`int` right **)** +.. _class_int_operator_dif_int: + +.. rst-class:: classref-operator + +:ref:`int` **operator -** **(** :ref:`int` right **)** Subtracts two integers. +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_div_float: -- :ref:`float` **operator /** **(** :ref:`float` right **)** +.. rst-class:: classref-operator -Divides an ``int`` by a :ref:`float`. The result is a :ref:`float`. +:ref:`float` **operator /** **(** :ref:`float` right **)** + +Divides an **int** by a :ref:`float`. The result is a :ref:`float`. :: print(10 / 3.0) # 3.333... +.. rst-class:: classref-item-separator + ---- -- :ref:`int` **operator /** **(** :ref:`int` right **)** +.. _class_int_operator_div_int: + +.. rst-class:: classref-operator + +:ref:`int` **operator /** **(** :ref:`int` right **)** Divides two integers. The decimal part of the result is discarded (truncated). @@ -375,25 +531,39 @@ Divides two integers. The decimal part of the result is discarded (truncated). print(10 / 2) # 5 print(10 / 3) # 3 ----- - -.. _class_int_operator_lt_bool: - -- :ref:`bool` **operator <** **(** :ref:`float` right **)** - -Returns ``true`` if this ``int`` is less than the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator <** **(** :ref:`int` right **)** +.. _class_int_operator_lt_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator <** **(** :ref:`float` right **)** + +Returns ``true`` if this **int** is less than the given :ref:`float`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_int_operator_lt_int: + +.. rst-class:: classref-operator + +:ref:`bool` **operator <** **(** :ref:`int` right **)** Returns ``true`` if the left integer is less than the right one. +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_bwsl_int: -- :ref:`int` **operator <<** **(** :ref:`int` right **)** +.. rst-class:: classref-operator + +:ref:`int` **operator <<** **(** :ref:`int` right **)** Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2. @@ -402,67 +572,111 @@ Performs bitwise shift left operation on the integer. Effectively the same as mu print(10 << 1) # 20 print(10 << 4) # 160 ----- - -.. _class_int_operator_lte_bool: - -- :ref:`bool` **operator <=** **(** :ref:`float` right **)** - -Returns ``true`` if this ``int`` is less than or equal to the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator <=** **(** :ref:`int` right **)** +.. _class_int_operator_lte_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`float` right **)** + +Returns ``true`` if this **int** is less than or equal to the given :ref:`float`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_int_operator_lte_int: + +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`int` right **)** Returns ``true`` if the left integer is less than or equal to the right one. +.. rst-class:: classref-item-separator + ---- -.. _class_int_operator_eq_bool: +.. _class_int_operator_eq_float: -- :ref:`bool` **operator ==** **(** :ref:`float` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`float` right **)** Returns ``true`` if the integer is equal to the given :ref:`float`. +.. rst-class:: classref-item-separator + ---- -- :ref:`bool` **operator ==** **(** :ref:`int` right **)** +.. _class_int_operator_eq_int: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`int` right **)** Returns ``true`` if both integers are equal. ----- - -.. _class_int_operator_gt_bool: - -- :ref:`bool` **operator >** **(** :ref:`float` right **)** - -Returns ``true`` if this ``int`` is greater than the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator >** **(** :ref:`int` right **)** +.. _class_int_operator_gt_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >** **(** :ref:`float` right **)** + +Returns ``true`` if this **int** is greater than the given :ref:`float`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_int_operator_gt_int: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >** **(** :ref:`int` right **)** Returns ``true`` if the left integer is greater than the right one. ----- - -.. _class_int_operator_gte_bool: - -- :ref:`bool` **operator >=** **(** :ref:`float` right **)** - -Returns ``true`` if this ``int`` is greater than or equal to the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator >=** **(** :ref:`int` right **)** +.. _class_int_operator_gte_float: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`float` right **)** + +Returns ``true`` if this **int** is greater than or equal to the given :ref:`float`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_int_operator_gte_int: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`int` right **)** Returns ``true`` if the left integer is greater than or equal to the right one. +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_bwsr_int: -- :ref:`int` **operator >>** **(** :ref:`int` right **)** +.. rst-class:: classref-operator + +:ref:`int` **operator >>** **(** :ref:`int` right **)** Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2. @@ -471,11 +685,15 @@ Performs bitwise shift right operation on the integer. Effectively the same as d print(10 >> 1) # 5 print(10 >> 2) # 2 +.. rst-class:: classref-item-separator + ---- .. _class_int_operator_bwxor_int: -- :ref:`int` **operator ^** **(** :ref:`int` right **)** +.. rst-class:: classref-operator + +:ref:`int` **operator ^** **(** :ref:`int` right **)** Returns the result of bitwise ``XOR`` operation for two integers. @@ -484,27 +702,39 @@ Returns the result of bitwise ``XOR`` operation for two integers. print(5 ^ 1) # 4 print(4 ^ 7) # 3 +.. rst-class:: classref-item-separator + ---- -.. _class_int_operator_unplus_int: +.. _class_int_operator_unplus: -- :ref:`int` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`int` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_int_operator_unminus_int: +.. _class_int_operator_unminus: -- :ref:`int` **operator unary-** **(** **)** +.. rst-class:: classref-operator -Returns the negated value of the ``int``. If positive, turns the number negative. If negative, turns the number positive. If zero, does nothing. +:ref:`int` **operator unary-** **(** **)** + +Returns the negated value of the **int**. If positive, turns the number negative. If negative, turns the number positive. If zero, does nothing. + +.. rst-class:: classref-item-separator ---- .. _class_int_operator_bwor_int: -- :ref:`int` **operator |** **(** :ref:`int` right **)** +.. rst-class:: classref-operator + +:ref:`int` **operator |** **(** :ref:`int` right **)** Returns the result of bitwise ``OR`` operation for two integers. @@ -522,11 +752,15 @@ It's useful to store binary flags in a variable. flags |= 1 flags |= 4 +.. rst-class:: classref-item-separator + ---- -.. _class_int_operator_bwnot_int: +.. _class_int_operator_bwnot: -- :ref:`int` **operator ~** **(** **)** +.. rst-class:: classref-operator + +:ref:`int` **operator ~** **(** **)** Returns the result of bitwise ``NOT`` operation for the integer. It's effectively equal to ``-int + 1``. diff --git a/classes/class_intervaltweener.rst b/classes/class_intervaltweener.rst index f9c6c542c..604a44b3d 100644 --- a/classes/class_intervaltweener.rst +++ b/classes/class_intervaltweener.rst @@ -14,12 +14,14 @@ IntervalTweener Creates an idle interval in a :ref:`Tween` animation. +.. rst-class:: classref-introduction-group + Description ----------- -``IntervalTweener`` is used to make delays in a tweening sequence. See :ref:`Tween.tween_interval` for more usage information. +**IntervalTweener** is used to make delays in a tweening sequence. See :ref:`Tween.tween_interval` for more usage information. -\ **Note:** :ref:`Tween.tween_interval` is the only correct way to create ``IntervalTweener``. Any ``IntervalTweener`` created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_interval` is the only correct way to create **IntervalTweener**. Any **IntervalTweener** created manually will not function correctly. .. |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.)` diff --git a/classes/class_ip.rst b/classes/class_ip.rst index 45d22893b..464826811 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -14,122 +14,207 @@ IP Internet protocol (IP) support functions such as DNS resolution. +.. rst-class:: classref-introduction-group + Description ----------- IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see :ref:`StreamPeerTCP` and :ref:`TCPServer`). IP provides DNS hostname resolution support, both blocking and threaded. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_cache` **(** :ref:`String` hostname="" **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_resolve_item` **(** :ref:`int` id **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_local_addresses` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_local_interfaces` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_resolve_item_address` **(** :ref:`int` id **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_resolve_item_addresses` **(** :ref:`int` id **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ResolverStatus` | :ref:`get_resolve_item_status` **(** :ref:`int` id **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`resolve_hostname` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`resolve_hostname_addresses` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resolve_hostname_queue_item` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_cache` **(** :ref:`String` hostname="" **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_resolve_item` **(** :ref:`int` id **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_local_addresses` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_local_interfaces` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_resolve_item_address` **(** :ref:`int` id **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_resolve_item_addresses` **(** :ref:`int` id **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ResolverStatus` | :ref:`get_resolve_item_status` **(** :ref:`int` id **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`resolve_hostname` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`resolve_hostname_addresses` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resolve_hostname_queue_item` **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_IP_ResolverStatus: -.. _class_IP_constant_RESOLVER_STATUS_NONE: - -.. _class_IP_constant_RESOLVER_STATUS_WAITING: - -.. _class_IP_constant_RESOLVER_STATUS_DONE: - -.. _class_IP_constant_RESOLVER_STATUS_ERROR: +.. rst-class:: classref-enumeration enum **ResolverStatus**: -- **RESOLVER_STATUS_NONE** = **0** --- DNS hostname resolver status: No status. +.. _class_IP_constant_RESOLVER_STATUS_NONE: -- **RESOLVER_STATUS_WAITING** = **1** --- DNS hostname resolver status: Waiting. +.. rst-class:: classref-enumeration-constant -- **RESOLVER_STATUS_DONE** = **2** --- DNS hostname resolver status: Done. +:ref:`ResolverStatus` **RESOLVER_STATUS_NONE** = ``0`` -- **RESOLVER_STATUS_ERROR** = **3** --- DNS hostname resolver status: Error. +DNS hostname resolver status: No status. + +.. _class_IP_constant_RESOLVER_STATUS_WAITING: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResolverStatus` **RESOLVER_STATUS_WAITING** = ``1`` + +DNS hostname resolver status: Waiting. + +.. _class_IP_constant_RESOLVER_STATUS_DONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResolverStatus` **RESOLVER_STATUS_DONE** = ``2`` + +DNS hostname resolver status: Done. + +.. _class_IP_constant_RESOLVER_STATUS_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ResolverStatus` **RESOLVER_STATUS_ERROR** = ``3`` + +DNS hostname resolver status: Error. + +.. rst-class:: classref-item-separator ---- .. _enum_IP_Type: -.. _class_IP_constant_TYPE_NONE: - -.. _class_IP_constant_TYPE_IPV4: - -.. _class_IP_constant_TYPE_IPV6: - -.. _class_IP_constant_TYPE_ANY: +.. rst-class:: classref-enumeration enum **Type**: -- **TYPE_NONE** = **0** --- Address type: None. +.. _class_IP_constant_TYPE_NONE: -- **TYPE_IPV4** = **1** --- Address type: Internet protocol version 4 (IPv4). +.. rst-class:: classref-enumeration-constant -- **TYPE_IPV6** = **2** --- Address type: Internet protocol version 6 (IPv6). +:ref:`Type` **TYPE_NONE** = ``0`` -- **TYPE_ANY** = **3** --- Address type: Any. +Address type: None. + +.. _class_IP_constant_TYPE_IPV4: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_IPV4** = ``1`` + +Address type: Internet protocol version 4 (IPv4). + +.. _class_IP_constant_TYPE_IPV6: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_IPV6** = ``2`` + +Address type: Internet protocol version 6 (IPv6). + +.. _class_IP_constant_TYPE_ANY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_ANY** = ``3`` + +Address type: Any. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_IP_constant_RESOLVER_MAX_QUERIES: +.. rst-class:: classref-constant + +**RESOLVER_MAX_QUERIES** = ``256`` + +Maximum number of concurrent DNS resolver queries allowed, :ref:`RESOLVER_INVALID_ID` is returned if exceeded. + .. _class_IP_constant_RESOLVER_INVALID_ID: -- **RESOLVER_MAX_QUERIES** = **256** --- Maximum number of concurrent DNS resolver queries allowed, :ref:`RESOLVER_INVALID_ID` is returned if exceeded. +.. rst-class:: classref-constant -- **RESOLVER_INVALID_ID** = **-1** --- Invalid ID constant. Returned if :ref:`RESOLVER_MAX_QUERIES` is exceeded. +**RESOLVER_INVALID_ID** = ``-1`` + +Invalid ID constant. Returned if :ref:`RESOLVER_MAX_QUERIES` is exceeded. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_IP_method_clear_cache: -- void **clear_cache** **(** :ref:`String` hostname="" **)** +.. rst-class:: classref-method + +void **clear_cache** **(** :ref:`String` hostname="" **)** Removes all of a ``hostname``'s cached references. If no ``hostname`` is given, all cached IP addresses are removed. +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_erase_resolve_item: -- void **erase_resolve_item** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **erase_resolve_item** **(** :ref:`int` id **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_get_local_addresses: -- :ref:`PackedStringArray` **get_local_addresses** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_local_addresses** **(** **)** |const| Returns all the user's current IPv4 and IPv6 addresses as an array. +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_get_local_interfaces: -- :ref:`Dictionary[]` **get_local_interfaces** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_local_interfaces** **(** **)** |const| Returns all network adapters as an array. @@ -144,51 +229,75 @@ Each adapter is a dictionary of the form: "addresses": ["192.168.1.101"], # An array of IP addresses associated to this interface. } +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_get_resolve_item_address: -- :ref:`String` **get_resolve_item_address** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_resolve_item_address** **(** :ref:`int` id **)** |const| 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`). +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_get_resolve_item_addresses: -- :ref:`Array` **get_resolve_item_addresses** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_resolve_item_addresses** **(** :ref:`int` id **)** |const| Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see :ref:`get_resolve_item_status`). +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_get_resolve_item_status: -- :ref:`ResolverStatus` **get_resolve_item_status** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`ResolverStatus` **get_resolve_item_status** **(** :ref:`int` id **)** |const| Returns a queued hostname's status as a :ref:`ResolverStatus` constant, given its queue ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_resolve_hostname: -- :ref:`String` **resolve_hostname** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** +.. rst-class:: classref-method + +:ref:`String` **resolve_hostname** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the :ref:`Type` constant given as ``ip_type``. +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_resolve_hostname_addresses: -- :ref:`PackedStringArray` **resolve_hostname_addresses** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **resolve_hostname_addresses** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** Resolves a given hostname in a blocking way. Addresses are returned as an :ref:`Array` of IPv4 or IPv6 addresses depending on ``ip_type``. +.. rst-class:: classref-item-separator + ---- .. _class_IP_method_resolve_hostname_queue_item: -- :ref:`int` **resolve_hostname_queue_item** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** +.. rst-class:: classref-method + +:ref:`int` **resolve_hostname_queue_item** **(** :ref:`String` host, :ref:`Type` ip_type=3 **)** Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the :ref:`Type` constant given as ``ip_type``. Returns the queue ID if successful, or :ref:`RESOLVER_INVALID_ID` on error. diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index dd75f90dd..2a01863ec 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -14,6 +14,8 @@ ItemList Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,393 +27,473 @@ Item text only supports single-line strings, newline characters (e.g. ``\n``) in All ``set_*`` methods allow negative item index, which makes the item accessed from the last one. -\ **Incremental search:** Like :ref:`PopupMenu` and :ref:`Tree`, ``ItemList`` supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec`. +\ **Incremental search:** Like :ref:`PopupMenu` and :ref:`Tree`, **ItemList** supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec`. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_reselect` | ``false`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`auto_height` | ``false`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`fixed_column_width` | ``0`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`fixed_icon_size` | ``Vector2i(0, 0)`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`IconMode` | :ref:`icon_mode` | ``1`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`icon_scale` | ``1.0`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`item_count` | ``0`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_columns` | ``1`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_text_lines` | ``1`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`same_column_width` | ``false`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`SelectMode` | :ref:`select_mode` | ``0`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``3`` | -+---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_reselect` | ``false`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_height` | ``false`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`fixed_column_width` | ``0`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`fixed_icon_size` | ``Vector2i(0, 0)`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`IconMode` | :ref:`icon_mode` | ``1`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`icon_scale` | ``1.0`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`item_count` | ``0`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_columns` | ``1`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_text_lines` | ``1`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`same_column_width` | ``false`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`SelectMode` | :ref:`select_mode` | ``0`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``3`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_icon_item` **(** :ref:`Texture2D` icon, :ref:`bool` selectable=true **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture2D` icon=null, :ref:`bool` selectable=true **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect` **(** :ref:`int` idx **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect_all` **(** **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ensure_current_is_visible` **(** **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_at_position` **(** :ref:`Vector2` position, :ref:`bool` exact=false **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_item_custom_fg_color` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_item_icon_modulate` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_item_icon_region` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_language` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`get_item_text_direction` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_selected_items` **(** **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_anything_selected` **(** **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_icon_transposed` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_tooltip_enabled` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** |const| | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_item` **(** :ref:`int` from_idx, :ref:`int` to_idx **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` idx **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_custom_fg_color` **(** :ref:`int` idx, :ref:`Color` custom_fg_color **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture2D` icon **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon_modulate` **(** :ref:`int` idx, :ref:`Color` modulate **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon_region` **(** :ref:`int` idx, :ref:`Rect2` rect **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon_transposed` **(** :ref:`int` idx, :ref:`bool` transposed **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_language` **(** :ref:`int` idx, :ref:`String` language **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text_direction` **(** :ref:`int` idx, :ref:`TextDirection` direction **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_tooltip_enabled` **(** :ref:`int` idx, :ref:`bool` enable **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort_items_by_text` **(** **)** | -+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_icon_item` **(** :ref:`Texture2D` icon, :ref:`bool` selectable=true **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture2D` icon=null, :ref:`bool` selectable=true **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** :ref:`int` idx **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect_all` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ensure_current_is_visible` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_at_position` **(** :ref:`Vector2` position, :ref:`bool` exact=false **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_item_custom_fg_color` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_item_icon_modulate` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_icon_region` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_language` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_item_text_direction` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_selected_items` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_anything_selected` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_icon_transposed` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_tooltip_enabled` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** |const| | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_item` **(** :ref:`int` from_idx, :ref:`int` to_idx **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_item` **(** :ref:`int` idx **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_custom_fg_color` **(** :ref:`int` idx, :ref:`Color` custom_fg_color **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture2D` icon **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon_modulate` **(** :ref:`int` idx, :ref:`Color` modulate **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon_region` **(** :ref:`int` idx, :ref:`Rect2` rect **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon_transposed` **(** :ref:`int` idx, :ref:`bool` transposed **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_language` **(** :ref:`int` idx, :ref:`String` language **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_text_direction` **(** :ref:`int` idx, :ref:`TextDirection` direction **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_tooltip_enabled` **(** :ref:`int` idx, :ref:`bool` enable **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort_items_by_text` **(** **)** | + +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.65, 0.65, 0.65, 1)`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`icon_margin` | ``4`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`line_separation` | ``2`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`v_separation` | ``2`` | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Font` | :ref:`font` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`cursor` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`cursor_unfocused` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`selected` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`selected_focus` | | -+---------------------------------+----------------------------------------------------------------------------+--------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.65, 0.65, 0.65, 1)`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`icon_margin` | ``4`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`line_separation` | ``2`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`v_separation` | ``2`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Font` | :ref:`font` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`cursor` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`cursor_unfocused` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`selected` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`selected_focus` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ItemList_signal_empty_clicked: -- **empty_clicked** **(** :ref:`Vector2` at_position, :ref:`int` mouse_button_index **)** +.. rst-class:: classref-signal + +**empty_clicked** **(** :ref:`Vector2` at_position, :ref:`int` mouse_button_index **)** Triggered when any mouse click is issued within the rect of the list but on empty space. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_signal_item_activated: -- **item_activated** **(** :ref:`int` index **)** +.. rst-class:: classref-signal + +**item_activated** **(** :ref:`int` index **)** Triggered when specified list item is activated via double-clicking or by pressing :kbd:`Enter`. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_signal_item_clicked: -- **item_clicked** **(** :ref:`int` index, :ref:`Vector2` at_position, :ref:`int` mouse_button_index **)** +.. rst-class:: classref-signal + +**item_clicked** **(** :ref:`int` index, :ref:`Vector2` at_position, :ref:`int` mouse_button_index **)** Triggered when specified list item has been clicked with any mouse button. The click position is also provided to allow appropriate popup of context menus at the correct location. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_signal_item_selected: -- **item_selected** **(** :ref:`int` index **)** +.. rst-class:: classref-signal + +**item_selected** **(** :ref:`int` index **)** Triggered when specified item has been selected. \ :ref:`allow_reselect` must be enabled to reselect an item. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_signal_multi_selected: -- **multi_selected** **(** :ref:`int` index, :ref:`bool` selected **)** +.. rst-class:: classref-signal + +**multi_selected** **(** :ref:`int` index, :ref:`bool` selected **)** Triggered when a multiple selection is altered on a list allowing multiple selection. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_ItemList_IconMode: -.. _class_ItemList_constant_ICON_MODE_TOP: - -.. _class_ItemList_constant_ICON_MODE_LEFT: +.. rst-class:: classref-enumeration enum **IconMode**: -- **ICON_MODE_TOP** = **0** --- Icon is drawn above the text. +.. _class_ItemList_constant_ICON_MODE_TOP: -- **ICON_MODE_LEFT** = **1** --- Icon is drawn to the left of the text. +.. rst-class:: classref-enumeration-constant + +:ref:`IconMode` **ICON_MODE_TOP** = ``0`` + +Icon is drawn above the text. + +.. _class_ItemList_constant_ICON_MODE_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`IconMode` **ICON_MODE_LEFT** = ``1`` + +Icon is drawn to the left of the text. + +.. rst-class:: classref-item-separator ---- .. _enum_ItemList_SelectMode: -.. _class_ItemList_constant_SELECT_SINGLE: - -.. _class_ItemList_constant_SELECT_MULTI: +.. rst-class:: classref-enumeration enum **SelectMode**: -- **SELECT_SINGLE** = **0** --- Only allow selecting a single item. +.. _class_ItemList_constant_SELECT_SINGLE: -- **SELECT_MULTI** = **1** --- Allows selecting multiple items by holding :kbd:`Ctrl` or :kbd:`Shift`. +.. rst-class:: classref-enumeration-constant + +:ref:`SelectMode` **SELECT_SINGLE** = ``0`` + +Only allow selecting a single item. + +.. _class_ItemList_constant_SELECT_MULTI: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectMode` **SELECT_MULTI** = ``1`` + +Allows selecting multiple items by holding :kbd:`Ctrl` or :kbd:`Shift`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ItemList_property_allow_reselect: -- :ref:`bool` **allow_reselect** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_allow_reselect(value) | -+-----------+---------------------------+ -| *Getter* | get_allow_reselect() | -+-----------+---------------------------+ +:ref:`bool` **allow_reselect** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_reselect** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_reselect** **(** **)** If ``true``, the currently selected item can be selected again. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_allow_rmb_select: -- :ref:`bool` **allow_rmb_select** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_allow_rmb_select(value) | -+-----------+-----------------------------+ -| *Getter* | get_allow_rmb_select() | -+-----------+-----------------------------+ +:ref:`bool` **allow_rmb_select** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_rmb_select** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_rmb_select** **(** **)** If ``true``, right mouse button click can select items. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_auto_height: -- :ref:`bool` **auto_height** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_auto_height(value) | -+-----------+------------------------+ -| *Getter* | has_auto_height() | -+-----------+------------------------+ +:ref:`bool` **auto_height** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_auto_height** **(** :ref:`bool` value **)** +- :ref:`bool` **has_auto_height** **(** **)** If ``true``, the control will automatically resize the height to fit its content. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_fixed_column_width: -- :ref:`int` **fixed_column_width** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_fixed_column_width(value) | -+-----------+-------------------------------+ -| *Getter* | get_fixed_column_width() | -+-----------+-------------------------------+ +:ref:`int` **fixed_column_width** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_column_width** **(** :ref:`int` value **)** +- :ref:`int` **get_fixed_column_width** **(** **)** The width all columns will be adjusted to. A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_fixed_icon_size: -- :ref:`Vector2i` **fixed_icon_size** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_fixed_icon_size(value) | -+-----------+----------------------------+ -| *Getter* | get_fixed_icon_size() | -+-----------+----------------------------+ +:ref:`Vector2i` **fixed_icon_size** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_icon_size** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_fixed_icon_size** **(** **)** The size all icons will be adjusted to. If either X or Y component is not greater than zero, icon size won't be affected. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_icon_mode: -- :ref:`IconMode` **icon_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1`` | -+-----------+----------------------+ -| *Setter* | set_icon_mode(value) | -+-----------+----------------------+ -| *Getter* | get_icon_mode() | -+-----------+----------------------+ +:ref:`IconMode` **icon_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_icon_mode** **(** :ref:`IconMode` value **)** +- :ref:`IconMode` **get_icon_mode** **(** **)** The icon position, whether above or to the left of the text. See the :ref:`IconMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_icon_scale: -- :ref:`float` **icon_scale** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_icon_scale(value) | -+-----------+-----------------------+ -| *Getter* | get_icon_scale() | -+-----------+-----------------------+ +:ref:`float` **icon_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_icon_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_icon_scale** **(** **)** The scale of icon applied after :ref:`fixed_icon_size` and transposing takes effect. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_item_count: -- :ref:`int` **item_count** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_item_count(value) | -+-----------+-----------------------+ -| *Getter* | get_item_count() | -+-----------+-----------------------+ +:ref:`int` **item_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_item_count** **(** :ref:`int` value **)** +- :ref:`int` **get_item_count** **(** **)** The number of items currently in the list. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_max_columns: -- :ref:`int` **max_columns** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_max_columns(value) | -+-----------+------------------------+ -| *Getter* | get_max_columns() | -+-----------+------------------------+ +:ref:`int` **max_columns** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_columns** **(** :ref:`int` value **)** +- :ref:`int` **get_max_columns** **(** **)** Maximum columns the list will have. @@ -419,88 +501,104 @@ If greater than zero, the content will be split among the specified columns. A value of zero means unlimited columns, i.e. all items will be put in the same row. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_max_text_lines: -- :ref:`int` **max_text_lines** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_max_text_lines(value) | -+-----------+---------------------------+ -| *Getter* | get_max_text_lines() | -+-----------+---------------------------+ +:ref:`int` **max_text_lines** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_text_lines** **(** :ref:`int` value **)** +- :ref:`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. \ **Note:** This property takes effect only when :ref:`icon_mode` is :ref:`ICON_MODE_TOP`. To make the text wrap, :ref:`fixed_column_width` should be greater than zero. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_same_column_width: -- :ref:`bool` **same_column_width** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_same_column_width(value) | -+-----------+------------------------------+ -| *Getter* | is_same_column_width() | -+-----------+------------------------------+ +:ref:`bool` **same_column_width** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_same_column_width** **(** :ref:`bool` value **)** +- :ref:`bool` **is_same_column_width** **(** **)** Whether all columns will have the same width. If ``true``, the width is equal to the largest column width of all columns. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_select_mode: -- :ref:`SelectMode` **select_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_select_mode(value) | -+-----------+------------------------+ -| *Getter* | get_select_mode() | -+-----------+------------------------+ +:ref:`SelectMode` **select_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_select_mode** **(** :ref:`SelectMode` value **)** +- :ref:`SelectMode` **get_select_mode** **(** **)** Allows single or multiple item selection. See the :ref:`SelectMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_property_text_overrun_behavior: -- :ref:`OverrunBehavior` **text_overrun_behavior** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``3`` | -+-----------+----------------------------------+ -| *Setter* | set_text_overrun_behavior(value) | -+-----------+----------------------------------+ -| *Getter* | get_text_overrun_behavior() | -+-----------+----------------------------------+ +:ref:`OverrunBehavior` **text_overrun_behavior** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior` value **)** +- :ref:`OverrunBehavior` **get_text_overrun_behavior** **(** **)** Sets the clipping behavior when the text exceeds an item's bounding rectangle. See :ref:`OverrunBehavior` for a description of all modes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ItemList_method_add_icon_item: -- :ref:`int` **add_icon_item** **(** :ref:`Texture2D` icon, :ref:`bool` selectable=true **)** +.. rst-class:: classref-method + +:ref:`int` **add_icon_item** **(** :ref:`Texture2D` icon, :ref:`bool` selectable=true **)** Adds an item to the item list with no text, only an icon. Returns the index of an added item. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_add_item: -- :ref:`int` **add_item** **(** :ref:`String` text, :ref:`Texture2D` icon=null, :ref:`bool` selectable=true **)** +.. rst-class:: classref-method + +:ref:`int` **add_item** **(** :ref:`String` text, :ref:`Texture2D` icon=null, :ref:`bool` selectable=true **)** Adds an item to the item list with specified text. Returns the index of an added item. @@ -508,514 +606,714 @@ Specify an ``icon``, or use ``null`` as the ``icon`` for a list item with no ico If selectable is ``true``, the list item will be selectable. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Removes all items from the list. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_deselect: -- void **deselect** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **deselect** **(** :ref:`int` idx **)** Ensures the item associated with the specified index is not selected. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_deselect_all: -- void **deselect_all** **(** **)** +.. rst-class:: classref-method + +void **deselect_all** **(** **)** Ensures there are no items selected. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_ensure_current_is_visible: -- void **ensure_current_is_visible** **(** **)** +.. rst-class:: classref-method + +void **ensure_current_is_visible** **(** **)** Ensure current selection is visible, adjusting the scroll position as necessary. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_at_position: -- :ref:`int` **get_item_at_position** **(** :ref:`Vector2` position, :ref:`bool` exact=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_item_at_position** **(** :ref:`Vector2` position, :ref:`bool` exact=false **)** |const| Returns the item index at the given ``position``. When there is no item at that point, -1 will be returned if ``exact`` is ``true``, and the closest item index will be returned otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_custom_bg_color: -- :ref:`Color` **get_item_custom_bg_color** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_item_custom_bg_color** **(** :ref:`int` idx **)** |const| Returns the custom background color of the item specified by ``idx`` index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_custom_fg_color: -- :ref:`Color` **get_item_custom_fg_color** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_item_custom_fg_color** **(** :ref:`int` idx **)** |const| Returns the custom foreground color of the item specified by ``idx`` index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_icon: -- :ref:`Texture2D` **get_item_icon** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_item_icon** **(** :ref:`int` idx **)** |const| Returns the icon associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_icon_modulate: -- :ref:`Color` **get_item_icon_modulate** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_item_icon_modulate** **(** :ref:`int` idx **)** |const| Returns a :ref:`Color` modulating item's icon at the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_icon_region: -- :ref:`Rect2` **get_item_icon_region** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_item_icon_region** **(** :ref:`int` idx **)** |const| Returns the region of item's icon used. The whole icon will be used if the region has no area. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_language: -- :ref:`String` **get_item_language** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_language** **(** :ref:`int` idx **)** |const| Returns item's text language code. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_metadata: -- :ref:`Variant` **get_item_metadata** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_item_metadata** **(** :ref:`int` idx **)** |const| Returns the metadata value of the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_text: -- :ref:`String` **get_item_text** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_text** **(** :ref:`int` idx **)** |const| Returns the text associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_text_direction: -- :ref:`TextDirection` **get_item_text_direction** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`TextDirection` **get_item_text_direction** **(** :ref:`int` idx **)** |const| Returns item's text base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_item_tooltip: -- :ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** |const| Returns the tooltip hint associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_selected_items: -- :ref:`PackedInt32Array` **get_selected_items** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_selected_items** **(** **)** Returns an array with the indexes of the selected items. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_get_v_scroll_bar: -- :ref:`VScrollBar` **get_v_scroll_bar** **(** **)** +.. rst-class:: classref-method + +:ref:`VScrollBar` **get_v_scroll_bar** **(** **)** Returns the vertical scrollbar. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_is_anything_selected: -- :ref:`bool` **is_anything_selected** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_anything_selected** **(** **)** Returns ``true`` if one or more items are selected. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_is_item_disabled: -- :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** |const| Returns ``true`` if the item at the specified index is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_is_item_icon_transposed: -- :ref:`bool` **is_item_icon_transposed** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_icon_transposed** **(** :ref:`int` idx **)** |const| Returns ``true`` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_is_item_selectable: -- :ref:`bool` **is_item_selectable** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_selectable** **(** :ref:`int` idx **)** |const| Returns ``true`` if the item at the specified index is selectable. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_is_item_tooltip_enabled: -- :ref:`bool` **is_item_tooltip_enabled** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_tooltip_enabled** **(** :ref:`int` idx **)** |const| Returns ``true`` if the tooltip is enabled for specified item index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_is_selected: -- :ref:`bool` **is_selected** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_selected** **(** :ref:`int` idx **)** |const| Returns ``true`` if the item at the specified index is currently selected. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_move_item: -- void **move_item** **(** :ref:`int` from_idx, :ref:`int` to_idx **)** +.. rst-class:: classref-method + +void **move_item** **(** :ref:`int` from_idx, :ref:`int` to_idx **)** Moves item from index ``from_idx`` to ``to_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_remove_item: -- void **remove_item** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **remove_item** **(** :ref:`int` idx **)** Removes the item specified by ``idx`` index from the list. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_select: -- void **select** **(** :ref:`int` idx, :ref:`bool` single=true **)** +.. rst-class:: classref-method + +void **select** **(** :ref:`int` idx, :ref:`bool` single=true **)** Select the item at the specified index. \ **Note:** This method does not trigger the item selection signal. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_custom_bg_color: -- void **set_item_custom_bg_color** **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** +.. rst-class:: classref-method + +void **set_item_custom_bg_color** **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** Sets the background color of the item specified by ``idx`` index to the specified :ref:`Color`. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_custom_fg_color: -- void **set_item_custom_fg_color** **(** :ref:`int` idx, :ref:`Color` custom_fg_color **)** +.. rst-class:: classref-method + +void **set_item_custom_fg_color** **(** :ref:`int` idx, :ref:`Color` custom_fg_color **)** Sets the foreground color of the item specified by ``idx`` index to the specified :ref:`Color`. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_disabled: -- void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** Disables (or enables) the item at the specified index. Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing :kbd:`Enter`). +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_icon: -- void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture2D` icon **)** Sets (or replaces) the icon's :ref:`Texture2D` associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_icon_modulate: -- void **set_item_icon_modulate** **(** :ref:`int` idx, :ref:`Color` modulate **)** +.. rst-class:: classref-method + +void **set_item_icon_modulate** **(** :ref:`int` idx, :ref:`Color` modulate **)** Sets a modulating :ref:`Color` of the item associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_icon_region: -- void **set_item_icon_region** **(** :ref:`int` idx, :ref:`Rect2` rect **)** +.. rst-class:: classref-method + +void **set_item_icon_region** **(** :ref:`int` idx, :ref:`Rect2` rect **)** Sets the region of item's icon used. The whole icon will be used if the region has no area. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_icon_transposed: -- void **set_item_icon_transposed** **(** :ref:`int` idx, :ref:`bool` transposed **)** +.. rst-class:: classref-method + +void **set_item_icon_transposed** **(** :ref:`int` idx, :ref:`bool` transposed **)** Sets whether the item icon will be drawn transposed. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_language: -- void **set_item_language** **(** :ref:`int` idx, :ref:`String` language **)** +.. rst-class:: classref-method + +void **set_item_language** **(** :ref:`int` idx, :ref:`String` language **)** Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_metadata: -- void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` metadata **)** +.. rst-class:: classref-method + +void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` metadata **)** Sets a value (of any type) to be stored with the item associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_selectable: -- void **set_item_selectable** **(** :ref:`int` idx, :ref:`bool` selectable **)** +.. rst-class:: classref-method + +void **set_item_selectable** **(** :ref:`int` idx, :ref:`bool` selectable **)** Allows or disallows selection of the item associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_text: -- void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** +.. rst-class:: classref-method + +void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** Sets text of the item associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_text_direction: -- void **set_item_text_direction** **(** :ref:`int` idx, :ref:`TextDirection` direction **)** +.. rst-class:: classref-method + +void **set_item_text_direction** **(** :ref:`int` idx, :ref:`TextDirection` direction **)** Sets item's text base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_tooltip: -- void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** +.. rst-class:: classref-method + +void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** Sets the tooltip hint for the item associated with the specified index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_set_item_tooltip_enabled: -- void **set_item_tooltip_enabled** **(** :ref:`int` idx, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_item_tooltip_enabled** **(** :ref:`int` idx, :ref:`bool` enable **)** Sets whether the tooltip hint is enabled for specified item index. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_method_sort_items_by_text: -- void **sort_items_by_text** **(** **)** +.. rst-class:: classref-method + +void **sort_items_by_text** **(** **)** Sorts items in the list by their text. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_ItemList_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.65, 0.65, 0.65, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_color** = ``Color(0.65, 0.65, 0.65, 1)`` Default text :ref:`Color` of the item. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` The tint of text outline of the item. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_selected_color** = ``Color(1, 1, 1, 1)`` Text :ref:`Color` used when the item is selected. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_color_guide_color: -- :ref:`Color` **guide_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.7, 0.7, 0.7, 0.25)`` | -+-----------+--------------------------------+ +:ref:`Color` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`Color` of the guideline. The guideline is a line drawn between each row of items. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal spacing between items. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_constant_icon_margin: -- :ref:`int` **icon_margin** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **icon_margin** = ``4`` The spacing between item's icon and text. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_constant_line_separation: -- :ref:`int` **line_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **line_separation** = ``2`` The vertical spacing between each line of text. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the item text outline. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_constant_v_separation: -- :ref:`int` **v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **v_separation** = ``2`` The vertical spacing between items. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** :ref:`Font` of the item's text. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Font size of the item's text. +.. rst-class:: classref-item-separator + ---- .. _class_ItemList_theme_style_cursor: -- :ref:`StyleBox` **cursor** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used for the cursor, when the ``ItemList`` is being focused. +:ref:`StyleBox` **cursor** + +:ref:`StyleBox` used for the cursor, when the **ItemList** is being focused. + +.. rst-class:: classref-item-separator ---- .. _class_ItemList_theme_style_cursor_unfocused: -- :ref:`StyleBox` **cursor_unfocused** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used for the cursor, when the ``ItemList`` is not being focused. +:ref:`StyleBox` **cursor_unfocused** + +:ref:`StyleBox` used for the cursor, when the **ItemList** is not being focused. + +.. rst-class:: classref-item-separator ---- .. _class_ItemList_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -The focused style for the ``ItemList``, drawn on top of the background, but below everything else. +:ref:`StyleBox` **focus** + +The focused style for the **ItemList**, drawn on top of the background, but below everything else. + +.. rst-class:: classref-item-separator ---- .. _class_ItemList_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty -The background style for the ``ItemList``. +:ref:`StyleBox` **panel** + +The background style for the **ItemList**. + +.. rst-class:: classref-item-separator ---- .. _class_ItemList_theme_style_selected: -- :ref:`StyleBox` **selected** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` for the selected items, used when the ``ItemList`` is not being focused. +:ref:`StyleBox` **selected** + +:ref:`StyleBox` for the selected items, used when the **ItemList** is not being focused. + +.. rst-class:: classref-item-separator ---- .. _class_ItemList_theme_style_selected_focus: -- :ref:`StyleBox` **selected_focus** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` for the selected items, used when the ``ItemList`` is being focused. +:ref:`StyleBox` **selected_focus** + +:ref:`StyleBox` for the selected items, used when the **ItemList** is being focused. .. |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.)` diff --git a/classes/class_javaclasswrapper.rst b/classes/class_javaclasswrapper.rst index 111df451c..ee9dae715 100644 --- a/classes/class_javaclasswrapper.rst +++ b/classes/class_javaclasswrapper.rst @@ -16,19 +16,32 @@ JavaClassWrapper There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------+----------------------------------------------------------------------------------------------+ -| :ref:`JavaClass` | :ref:`wrap` **(** :ref:`String` name **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`JavaClass` | :ref:`wrap` **(** :ref:`String` name **)** | + +-----------------------------------+----------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_JavaClassWrapper_method_wrap: -- :ref:`JavaClass` **wrap** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +:ref:`JavaClass` **wrap** **(** :ref:`String` name **)** .. container:: contribute diff --git a/classes/class_javascriptbridge.rst b/classes/class_javascriptbridge.rst index 68d8eb82a..18b3aa03a 100644 --- a/classes/class_javascriptbridge.rst +++ b/classes/class_javascriptbridge.rst @@ -14,6 +14,8 @@ JavaScriptBridge Singleton that connects the engine with the browser's JavaScript context in Web export. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,61 +23,92 @@ The JavaScriptBridge singleton is implemented only in the Web export. It's used \ **Note:** This singleton can be disabled at build-time to improve security. By default, the JavaScriptBridge singleton is enabled. Official export templates also have the JavaScriptBridge singleton enabled. See :doc:`Compiling for the Web <../development/compiling/compiling_for_web>` in the documentation for more information. +.. rst-class:: classref-introduction-group + Tutorials --------- - `Exporting for the Web: Calling JavaScript from script <../tutorials/export/exporting_for_web.html#calling-javascript-from-script>`__ +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`JavaScriptObject` | :ref:`create_callback` **(** :ref:`Callable` callable **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`create_object` **(** :ref:`String` object, ... **)** |vararg| | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`download_buffer` **(** :ref:`PackedByteArray` buffer, :ref:`String` name, :ref:`String` mime="application/octet-stream" **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`eval` **(** :ref:`String` code, :ref:`bool` use_global_execution_context=false **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`JavaScriptObject` | :ref:`get_interface` **(** :ref:`String` interface **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`pwa_needs_update` **(** **)** |const| | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`pwa_update` **(** **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JavaScriptObject` | :ref:`create_callback` **(** :ref:`Callable` callable **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`create_object` **(** :ref:`String` object, ... **)** |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`download_buffer` **(** :ref:`PackedByteArray` buffer, :ref:`String` name, :ref:`String` mime="application/octet-stream" **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`eval` **(** :ref:`String` code, :ref:`bool` use_global_execution_context=false **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JavaScriptObject` | :ref:`get_interface` **(** :ref:`String` interface **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`pwa_needs_update` **(** **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`pwa_update` **(** **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_JavaScriptBridge_signal_pwa_update_available: -- **pwa_update_available** **(** **)** +.. rst-class:: classref-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` to force the update to take place immediately. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_JavaScriptBridge_method_create_callback: -- :ref:`JavaScriptObject` **create_callback** **(** :ref:`Callable` callable **)** +.. rst-class:: classref-method + +:ref:`JavaScriptObject` **create_callback** **(** :ref:`Callable` callable **)** Creates a reference to a :ref:`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` for usage. +.. rst-class:: classref-item-separator + ---- .. _class_JavaScriptBridge_method_create_object: -- :ref:`Variant` **create_object** **(** :ref:`String` object, ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Variant` **create_object** **(** :ref:`String` object, ... **)** |vararg| Creates a new JavaScript object using the ``new`` constructor. The ``object`` must a valid property of the JavaScript ``window``. See :ref:`JavaScriptObject` for usage. +.. rst-class:: classref-item-separator + ---- .. _class_JavaScriptBridge_method_download_buffer: -- void **download_buffer** **(** :ref:`PackedByteArray` buffer, :ref:`String` name, :ref:`String` mime="application/octet-stream" **)** +.. rst-class:: classref-method + +void **download_buffer** **(** :ref:`PackedByteArray` buffer, :ref:`String` name, :ref:`String` mime="application/octet-stream" **)** Prompts the user to download a file containing the specified ``buffer``. The file will have the given ``name`` and ``mime`` type. @@ -85,39 +118,55 @@ Prompts the user to download a file containing the specified ``buffer``. The fil \ **Note:** Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. +.. rst-class:: classref-item-separator + ---- .. _class_JavaScriptBridge_method_eval: -- :ref:`Variant` **eval** **(** :ref:`String` code, :ref:`bool` use_global_execution_context=false **)** +.. rst-class:: classref-method + +:ref:`Variant` **eval** **(** :ref:`String` code, :ref:`bool` use_global_execution_context=false **)** Execute the string ``code`` as JavaScript code within the browser window. This is a call to the actual global JavaScript function ``eval()``. If ``use_global_execution_context`` is ``true``, the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. +.. rst-class:: classref-item-separator + ---- .. _class_JavaScriptBridge_method_get_interface: -- :ref:`JavaScriptObject` **get_interface** **(** :ref:`String` interface **)** +.. rst-class:: classref-method + +:ref:`JavaScriptObject` **get_interface** **(** :ref:`String` 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` argument, which will contain the JavaScript ``arguments``. See :ref:`JavaScriptObject` for usage. +.. rst-class:: classref-item-separator + ---- .. _class_JavaScriptBridge_method_pwa_needs_update: -- :ref:`bool` **pwa_needs_update** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **pwa_needs_update** **(** **)** |const| Returns ``true`` if a new version of the progressive web app is waiting to be activated. \ **Note:** Only relevant when exported as a Progressive Web App. +.. rst-class:: classref-item-separator + ---- .. _class_JavaScriptBridge_method_pwa_update: -- :ref:`Error` **pwa_update** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **pwa_update** **(** **)** Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded. diff --git a/classes/class_javascriptobject.rst b/classes/class_javascriptobject.rst index 9eda2a001..ec7c6688e 100644 --- a/classes/class_javascriptobject.rst +++ b/classes/class_javascriptobject.rst @@ -14,6 +14,8 @@ JavaScriptObject A wrapper class for web native JavaScript objects. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_jnisingleton.rst b/classes/class_jnisingleton.rst index f6ac26a4a..59da542d5 100644 --- a/classes/class_jnisingleton.rst +++ b/classes/class_jnisingleton.rst @@ -14,11 +14,15 @@ JNISingleton Singleton that connects the engine with Android plugins to interface with native Android code. +.. rst-class:: classref-introduction-group + Description ----------- The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See `Java Native Interface - Wikipedia `__ for more information. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst index 8f52d6aee..92a1a40c3 100644 --- a/classes/class_joint2d.rst +++ b/classes/class_joint2d.rst @@ -16,88 +16,103 @@ Joint2D Base node for all joint constraints in 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+--------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`bias` | ``0.0`` | -+---------------------------------+--------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`disable_collision` | ``true`` | -+---------------------------------+--------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`node_a` | ``NodePath("")`` | -+---------------------------------+--------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`node_b` | ``NodePath("")`` | -+---------------------------------+--------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`bias` | ``0.0`` | + +---------------------------------+--------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`disable_collision` | ``true`` | + +---------------------------------+--------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`node_a` | ``NodePath("")`` | + +---------------------------------+--------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`node_b` | ``NodePath("")`` | + +---------------------------------+--------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Joint2D_property_bias: -- :ref:`float` **bias** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.0`` | -+-----------+-----------------+ -| *Setter* | set_bias(value) | -+-----------+-----------------+ -| *Getter* | get_bias() | -+-----------+-----------------+ +:ref:`float` **bias** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_bias** **(** :ref:`float` value **)** +- :ref:`float` **get_bias** **(** **)** When :ref:`node_a` and :ref:`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 set to ``0``, the default value from :ref:`ProjectSettings.physics/2d/solver/default_constraint_bias` is used. +.. rst-class:: classref-item-separator + ---- .. _class_Joint2D_property_disable_collision: -- :ref:`bool` **disable_collision** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------------+ -| *Setter* | set_exclude_nodes_from_collision(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_exclude_nodes_from_collision() | -+-----------+-----------------------------------------+ +:ref:`bool` **disable_collision** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_nodes_from_collision** **(** :ref:`bool` value **)** +- :ref:`bool` **get_exclude_nodes_from_collision** **(** **)** If ``true``, :ref:`node_a` and :ref:`node_b` can not collide. +.. rst-class:: classref-item-separator + ---- .. _class_Joint2D_property_node_a: -- :ref:`NodePath` **node_a** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-------------------+ -| *Setter* | set_node_a(value) | -+-----------+-------------------+ -| *Getter* | get_node_a() | -+-----------+-------------------+ +:ref:`NodePath` **node_a** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_node_a** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_node_a** **(** **)** The first body attached to the joint. Must derive from :ref:`PhysicsBody2D`. +.. rst-class:: classref-item-separator + ---- .. _class_Joint2D_property_node_b: -- :ref:`NodePath` **node_b** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-------------------+ -| *Setter* | set_node_b(value) | -+-----------+-------------------+ -| *Getter* | get_node_b() | -+-----------+-------------------+ +:ref:`NodePath` **node_b** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_node_b** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_node_b** **(** **)** The second body attached to the joint. Must derive from :ref:`PhysicsBody2D`. diff --git a/classes/class_joint3d.rst b/classes/class_joint3d.rst index c6a9e29e7..716b34868 100644 --- a/classes/class_joint3d.rst +++ b/classes/class_joint3d.rst @@ -16,91 +16,108 @@ Joint3D Base class for all 3D joints. +.. rst-class:: classref-introduction-group + Description ----------- Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. See also :ref:`Generic6DOFJoint3D`. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Truck Town Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`exclude_nodes_from_collision` | ``true`` | -+---------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`node_a` | ``NodePath("")`` | -+---------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`node_b` | ``NodePath("")`` | -+---------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`solver_priority` | ``1`` | -+---------------------------------+------------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`exclude_nodes_from_collision` | ``true`` | + +---------------------------------+------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`node_a` | ``NodePath("")`` | + +---------------------------------+------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`node_b` | ``NodePath("")`` | + +---------------------------------+------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`solver_priority` | ``1`` | + +---------------------------------+------------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Joint3D_property_exclude_nodes_from_collision: -- :ref:`bool` **exclude_nodes_from_collision** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------------+ -| *Setter* | set_exclude_nodes_from_collision(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_exclude_nodes_from_collision() | -+-----------+-----------------------------------------+ +:ref:`bool` **exclude_nodes_from_collision** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_nodes_from_collision** **(** :ref:`bool` value **)** +- :ref:`bool` **get_exclude_nodes_from_collision** **(** **)** If ``true``, the two bodies of the nodes are not able to collide with each other. +.. rst-class:: classref-item-separator + ---- .. _class_Joint3D_property_node_a: -- :ref:`NodePath` **node_a** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-------------------+ -| *Setter* | set_node_a(value) | -+-----------+-------------------+ -| *Getter* | get_node_a() | -+-----------+-------------------+ +:ref:`NodePath` **node_a** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_node_a** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_node_a** **(** **)** The node attached to the first side (A) of the joint. +.. rst-class:: classref-item-separator + ---- .. _class_Joint3D_property_node_b: -- :ref:`NodePath` **node_b** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-------------------+ -| *Setter* | set_node_b(value) | -+-----------+-------------------+ -| *Getter* | get_node_b() | -+-----------+-------------------+ +:ref:`NodePath` **node_b** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_node_b** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_node_b** **(** **)** The node attached to the second side (B) of the joint. +.. rst-class:: classref-item-separator + ---- .. _class_Joint3D_property_solver_priority: -- :ref:`int` **solver_priority** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``1`` | -+-----------+----------------------------+ -| *Setter* | set_solver_priority(value) | -+-----------+----------------------------+ -| *Getter* | get_solver_priority() | -+-----------+----------------------------+ +:ref:`int` **solver_priority** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_solver_priority** **(** :ref:`int` value **)** +- :ref:`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. diff --git a/classes/class_json.rst b/classes/class_json.rst index fc5ce6cf4..f5083ea37 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -14,10 +14,12 @@ JSON Helper class for creating and parsing JSON data. +.. rst-class:: classref-introduction-group + Description ----------- -The ``JSON`` enables all data types to be converted to and from a JSON string. This useful for serializing data to save to a file or send over the network. +The **JSON** enables all data types to be converted to and from a JSON string. This useful for serializing data to save to a file or send over the network. \ :ref:`stringify` is used to convert any data type into a JSON string. @@ -58,67 +60,98 @@ Alternatively, you can parse string using the static :ref:`parse_string` | :ref:`data` | ``null`` | -+-------------------------------+---------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------+----------+ + | :ref:`Variant` | :ref:`data` | ``null`` | + +-------------------------------+---------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_error_line` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_error_message` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`parse` **(** :ref:`String` json_string **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`parse_string` **(** :ref:`String` json_string **)** |static| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`stringify` **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** |static| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_error_line` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_error_message` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`parse` **(** :ref:`String` json_string **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`parse_string` **(** :ref:`String` json_string **)** |static| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`stringify` **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** |static| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_JSON_property_data: -- :ref:`Variant` **data** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``null`` | -+-----------+-----------------+ -| *Setter* | set_data(value) | -+-----------+-----------------+ -| *Getter* | get_data() | -+-----------+-----------------+ +:ref:`Variant` **data** = ``null`` + +.. rst-class:: classref-property-setget + +- void **set_data** **(** :ref:`Variant` value **)** +- :ref:`Variant` **get_data** **(** **)** Contains the parsed JSON data in :ref:`Variant` form. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_JSON_method_get_error_line: -- :ref:`int` **get_error_line** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_error_line** **(** **)** |const| Returns ``0`` if the last call to :ref:`parse` was successful, or the line number where the parse failed. +.. rst-class:: classref-item-separator + ---- .. _class_JSON_method_get_error_message: -- :ref:`String` **get_error_message** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_error_message** **(** **)** |const| Returns an empty string if the last call to :ref:`parse` was successful, or the error message if it failed. +.. rst-class:: classref-item-separator + ---- .. _class_JSON_method_parse: -- :ref:`Error` **parse** **(** :ref:`String` json_string **)** +.. rst-class:: classref-method + +:ref:`Error` **parse** **(** :ref:`String` json_string **)** Attempts to parse the ``json_string`` provided. @@ -126,19 +159,27 @@ Returns an :ref:`Error`. If the parse was successful, i Non-static variant of :ref:`parse_string`, if you want custom error handling. +.. rst-class:: classref-item-separator + ---- .. _class_JSON_method_parse_string: -- :ref:`Variant` **parse_string** **(** :ref:`String` json_string **)** |static| +.. rst-class:: classref-method + +:ref:`Variant` **parse_string** **(** :ref:`String` json_string **)** |static| Attempts to parse the ``json_string`` provided and returns the parsed data. Returns ``null`` if parse failed. +.. rst-class:: classref-item-separator + ---- .. _class_JSON_method_stringify: -- :ref:`String` **stringify** **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** |static| +.. rst-class:: classref-method + +:ref:`String` **stringify** **(** :ref:`Variant` data, :ref:`String` indent="", :ref:`bool` sort_keys=true, :ref:`bool` full_precision=false **)** |static| Converts a :ref:`Variant` var to JSON text and returns the result. Useful for serializing data to store or send over the network. diff --git a/classes/class_jsonrpc.rst b/classes/class_jsonrpc.rst index 04042b37f..bea3d1f9a 100644 --- a/classes/class_jsonrpc.rst +++ b/classes/class_jsonrpc.rst @@ -14,63 +14,106 @@ JSONRPC A helper to handle dictionaries which look like JSONRPC documents. +.. rst-class:: classref-introduction-group + Description ----------- `JSON-RPC `__ is a standard which wraps a method call in a :ref:`JSON` object. The object has a particular structure and identifies which method is called, the parameters to that function, and carries an ID to keep track of responses. This class implements that standard on top of :ref:`Dictionary`; you will have to convert between a :ref:`Dictionary` and :ref:`JSON` with other functions. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`make_notification` **(** :ref:`String` method, :ref:`Variant` params **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`make_request` **(** :ref:`String` method, :ref:`Variant` params, :ref:`Variant` id **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`make_response` **(** :ref:`Variant` result, :ref:`Variant` id **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`make_response_error` **(** :ref:`int` code, :ref:`String` message, :ref:`Variant` id=null **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`process_action` **(** :ref:`Variant` action, :ref:`bool` recurse=false **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`process_string` **(** :ref:`String` action **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scope` **(** :ref:`String` scope, :ref:`Object` target **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`make_notification` **(** :ref:`String` method, :ref:`Variant` params **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`make_request` **(** :ref:`String` method, :ref:`Variant` params, :ref:`Variant` id **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`make_response` **(** :ref:`Variant` result, :ref:`Variant` id **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`make_response_error` **(** :ref:`int` code, :ref:`String` message, :ref:`Variant` id=null **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`process_action` **(** :ref:`Variant` action, :ref:`bool` recurse=false **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`process_string` **(** :ref:`String` action **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_scope` **(** :ref:`String` scope, :ref:`Object` target **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_JSONRPC_ErrorCode: -.. _class_JSONRPC_constant_PARSE_ERROR: - -.. _class_JSONRPC_constant_INVALID_REQUEST: - -.. _class_JSONRPC_constant_METHOD_NOT_FOUND: - -.. _class_JSONRPC_constant_INVALID_PARAMS: - -.. _class_JSONRPC_constant_INTERNAL_ERROR: +.. rst-class:: classref-enumeration enum **ErrorCode**: -- **PARSE_ERROR** = **-32700** +.. _class_JSONRPC_constant_PARSE_ERROR: -- **INVALID_REQUEST** = **-32600** +.. rst-class:: classref-enumeration-constant -- **METHOD_NOT_FOUND** = **-32601** --- A method call was requested but no function of that name existed in the JSONRPC subclass. +:ref:`ErrorCode` **PARSE_ERROR** = ``-32700`` -- **INVALID_PARAMS** = **-32602** -- **INTERNAL_ERROR** = **-32603** + +.. _class_JSONRPC_constant_INVALID_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorCode` **INVALID_REQUEST** = ``-32600`` + + + +.. _class_JSONRPC_constant_METHOD_NOT_FOUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorCode` **METHOD_NOT_FOUND** = ``-32601`` + +A method call was requested but no function of that name existed in the JSONRPC subclass. + +.. _class_JSONRPC_constant_INVALID_PARAMS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorCode` **INVALID_PARAMS** = ``-32602`` + + + +.. _class_JSONRPC_constant_INTERNAL_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ErrorCode` **INTERNAL_ERROR** = ``-32603`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_JSONRPC_method_make_notification: -- :ref:`Dictionary` **make_notification** **(** :ref:`String` method, :ref:`Variant` params **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **make_notification** **(** :ref:`String` method, :ref:`Variant` params **)** Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response. @@ -78,11 +121,15 @@ Returns a dictionary in the form of a JSON-RPC notification. Notifications are o - ``params``: An array or dictionary of parameters being passed to the method. +.. rst-class:: classref-item-separator + ---- .. _class_JSONRPC_method_make_request: -- :ref:`Dictionary` **make_request** **(** :ref:`String` method, :ref:`Variant` params, :ref:`Variant` id **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **make_request** **(** :ref:`String` method, :ref:`Variant` params, :ref:`Variant` id **)** 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. @@ -92,11 +139,15 @@ Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a s - ``id``: Uniquely identifies this request. The server is expected to send a response with the same ID. +.. rst-class:: classref-item-separator + ---- .. _class_JSONRPC_method_make_response: -- :ref:`Dictionary` **make_response** **(** :ref:`Variant` result, :ref:`Variant` id **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **make_response** **(** :ref:`Variant` result, :ref:`Variant` id **)** 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. @@ -104,11 +155,15 @@ When a server has received and processed a request, it is expected to send a res - ``id``: The ID of the request this response is targeted to. +.. rst-class:: classref-item-separator + ---- .. _class_JSONRPC_method_make_response_error: -- :ref:`Dictionary` **make_response_error** **(** :ref:`int` code, :ref:`String` message, :ref:`Variant` id=null **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **make_response_error** **(** :ref:`int` code, :ref:`String` message, :ref:`Variant` id=null **)** |const| Creates a response which indicates a previous reply has failed in some way. @@ -118,11 +173,15 @@ Creates a response which indicates a previous reply has failed in some way. - ``id``: The request this error is a response to. +.. rst-class:: classref-item-separator + ---- .. _class_JSONRPC_method_process_action: -- :ref:`Variant` **process_action** **(** :ref:`Variant` action, :ref:`bool` recurse=false **)** +.. rst-class:: classref-method + +:ref:`Variant` **process_action** **(** :ref:`Variant` action, :ref:`bool` recurse=false **)** 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. @@ -130,21 +189,29 @@ To add new supported methods extend the JSONRPC class and call :ref:`process_act \ ``action``: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. +.. rst-class:: classref-item-separator + ---- .. _class_JSONRPC_method_process_string: -- :ref:`String` **process_string** **(** :ref:`String` action **)** +.. rst-class:: classref-method + +:ref:`String` **process_string** **(** :ref:`String` action **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_JSONRPC_method_set_scope: -- void **set_scope** **(** :ref:`String` scope, :ref:`Object` target **)** +.. rst-class:: classref-method + +void **set_scope** **(** :ref:`String` scope, :ref:`Object` target **)** .. container:: contribute diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index f8166183e..ed9b00d88 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -14,146 +14,209 @@ KinematicCollision2D Collision data for :ref:`PhysicsBody2D.move_and_collide` collisions. +.. rst-class:: classref-introduction-group + Description ----------- -Contains collision data for :ref:`PhysicsBody2D.move_and_collide` collisions. When a :ref:`PhysicsBody2D` is moved using :ref:`PhysicsBody2D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a ``KinematicCollision2D`` object is returned. +Contains collision data for :ref:`PhysicsBody2D.move_and_collide` collisions. When a :ref:`PhysicsBody2D` is moved using :ref:`PhysicsBody2D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a **KinematicCollision2D** object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angle` **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_id` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider_shape` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape_index` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collider_velocity` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_depth` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_local_shape` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_normal` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_position` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_remainder` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_travel` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_angle` **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_id` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider_shape` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collider_velocity` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_depth` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_local_shape` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_normal` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_position` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_remainder` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_travel` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_KinematicCollision2D_method_get_angle: -- :ref:`float` **get_angle** **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_angle** **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| Returns the collision angle according to ``up_direction``, which is :ref:`Vector2.UP` by default. This value is always positive. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_collider: -- :ref:`Object` **get_collider** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** **)** |const| Returns the colliding body's attached :ref:`Object`. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_collider_id: -- :ref:`int` **get_collider_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_id** **(** **)** |const| Returns the unique instance ID of the colliding body's attached :ref:`Object`. See :ref:`Object.get_instance_id`. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** **)** |const| Returns the colliding body's :ref:`RID` used by the :ref:`PhysicsServer2D`. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_collider_shape: -- :ref:`Object` **get_collider_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider_shape** **(** **)** |const| Returns the colliding body's shape. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_collider_shape_index: -- :ref:`int` **get_collider_shape_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape_index** **(** **)** |const| Returns the colliding body's shape index. See :ref:`CollisionObject2D`. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_collider_velocity: -- :ref:`Vector2` **get_collider_velocity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collider_velocity** **(** **)** |const| Returns the colliding body's velocity. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_depth: -- :ref:`float` **get_depth** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_depth** **(** **)** |const| Returns the colliding body's length of overlap along the collision normal. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_local_shape: -- :ref:`Object` **get_local_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_local_shape** **(** **)** |const| Returns the moving object's colliding shape. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_normal: -- :ref:`Vector2` **get_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_normal** **(** **)** |const| Returns the colliding body's shape's normal at the point of collision. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_position: -- :ref:`Vector2` **get_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_position** **(** **)** |const| Returns the point of collision in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_remainder: -- :ref:`Vector2` **get_remainder** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_remainder** **(** **)** |const| Returns the moving object's remaining movement vector. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision2D_method_get_travel: -- :ref:`Vector2` **get_travel** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_travel** **(** **)** |const| Returns the moving object's travel before collision. diff --git a/classes/class_kinematiccollision3d.rst b/classes/class_kinematiccollision3d.rst index c9415d357..9faace40d 100644 --- a/classes/class_kinematiccollision3d.rst +++ b/classes/class_kinematiccollision3d.rst @@ -14,156 +14,223 @@ KinematicCollision3D Collision data for :ref:`PhysicsBody3D.move_and_collide` collisions. +.. rst-class:: classref-introduction-group + Description ----------- -Contains collision data for :ref:`PhysicsBody3D.move_and_collide` collisions. When a :ref:`PhysicsBody3D` is moved using :ref:`PhysicsBody3D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a ``KinematicCollision3D`` object is returned. +Contains collision data for :ref:`PhysicsBody3D.move_and_collide` collisions. When a :ref:`PhysicsBody3D` is moved using :ref:`PhysicsBody3D.move_and_collide`, it stops if it detects a collision with another body. If a collision is detected, a **KinematicCollision3D** object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angle` **(** :ref:`int` collision_index=0, :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_id` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider_shape` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape_index` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collider_velocity` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_depth` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_local_shape` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_normal` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_position` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_remainder` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_travel` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_angle` **(** :ref:`int` collision_index=0, :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_id` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider_shape` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape_index` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collider_velocity` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_depth` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_local_shape` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_normal` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_position` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_remainder` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_travel` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_KinematicCollision3D_method_get_angle: -- :ref:`float` **get_angle** **(** :ref:`int` collision_index=0, :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_angle** **(** :ref:`int` collision_index=0, :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| Returns the collision angle according to ``up_direction``, which is :ref:`Vector3.UP` by default. This value is always positive. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_collider: -- :ref:`Object` **get_collider** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default). +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_collider_id: -- :ref:`int` **get_collider_id** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_id** **(** :ref:`int` collision_index=0 **)** |const| Returns the unique instance ID of the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default). See :ref:`Object.get_instance_id`. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's :ref:`RID` used by the :ref:`PhysicsServer3D` given a collision index (the deepest collision by default). +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_collider_shape: -- :ref:`Object` **get_collider_shape** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider_shape** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's shape given a collision index (the deepest collision by default). +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_collider_shape_index: -- :ref:`int` **get_collider_shape_index** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape_index** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's shape index given a collision index (the deepest collision by default). See :ref:`CollisionObject3D`. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_collider_velocity: -- :ref:`Vector3` **get_collider_velocity** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collider_velocity** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's velocity given a collision index (the deepest collision by default). +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_collision_count: -- :ref:`int` **get_collision_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_count** **(** **)** |const| Returns the number of detected collisions. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_depth: -- :ref:`float` **get_depth** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_depth** **(** **)** |const| Returns the colliding body's length of overlap along the collision normal. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_local_shape: -- :ref:`Object` **get_local_shape** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_local_shape** **(** :ref:`int` collision_index=0 **)** |const| Returns the moving object's colliding shape given a collision index (the deepest collision by default). +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_normal: -- :ref:`Vector3` **get_normal** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_normal** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default). +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_position: -- :ref:`Vector3` **get_position** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_position** **(** :ref:`int` collision_index=0 **)** |const| Returns the point of collision in global coordinates given a collision index (the deepest collision by default). +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_remainder: -- :ref:`Vector3` **get_remainder** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_remainder** **(** **)** |const| Returns the moving object's remaining movement vector. +.. rst-class:: classref-item-separator + ---- .. _class_KinematicCollision3D_method_get_travel: -- :ref:`Vector3` **get_travel** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_travel** **(** **)** |const| Returns the moving object's travel before collision. diff --git a/classes/class_label.rst b/classes/class_label.rst index 55353aca6..49047e545 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -14,6 +14,8 @@ Label Displays plain text in a line or wrapped inside a rectangle. For formatted text, use :ref:`RichTextLabel`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,385 +23,435 @@ Label displays plain text on the screen. It gives you control over the horizonta \ **Note:** Contrarily to most other :ref:`Control`\ s, Label's :ref:`Control.mouse_filter` defaults to :ref:`Control.MOUSE_FILTER_IGNORE` (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.tooltip_text`, unless you change its mouse filter. +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Dodge The Creeps Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`clip_text` | ``false`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`LabelSettings` | :ref:`label_settings` | | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`lines_skipped` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_lines_visible` | ``-1`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``2`` (overrides :ref:`Control`) | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``4`` (overrides :ref:`Control`) | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`uppercase` | ``false`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`visible_characters` | ``-1`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`visible_ratio` | ``1.0`` | -+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clip_text` | ``false`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`LabelSettings` | :ref:`label_settings` | | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`lines_skipped` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_lines_visible` | ``-1`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``2`` (overrides :ref:`Control`) | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_vertical | ``4`` (overrides :ref:`Control`) | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`uppercase` | ``false`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`visible_characters` | ``-1`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`visible_ratio` | ``1.0`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_count` **(** **)** |const| | -+-----------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_height` **(** :ref:`int` line=-1 **)** |const| | -+-----------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | -+-----------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | -+-----------------------+--------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +-----------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_height` **(** :ref:`int` line=-1 **)** |const| | + +-----------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | + +-----------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | + +-----------------------+--------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`font_shadow_color` | ``Color(0, 0, 0, 0)`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`line_spacing` | ``3`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`shadow_offset_x` | ``1`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`shadow_offset_y` | ``1`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`shadow_outline_size` | ``1`` | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Font` | :ref:`font` | | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`font_size` | | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`StyleBox` | :ref:`normal` | | -+---------------------------------+----------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`font_shadow_color` | ``Color(0, 0, 0, 0)`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`line_spacing` | ``3`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`shadow_offset_x` | ``1`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`shadow_offset_y` | ``1`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`shadow_outline_size` | ``1`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`Font` | :ref:`font` | | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`font_size` | | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`StyleBox` | :ref:`normal` | | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Label_property_autowrap_mode: -- :ref:`AutowrapMode` **autowrap_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_autowrap_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_autowrap_mode() | -+-----------+--------------------------+ +:ref:`AutowrapMode` **autowrap_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_autowrap_mode** **(** :ref:`AutowrapMode` value **)** +- :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. 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_clip_text: -- :ref:`bool` **clip_text** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_clip_text(value) | -+-----------+----------------------+ -| *Getter* | is_clipping_text() | -+-----------+----------------------+ +:ref:`bool` **clip_text** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_clip_text** **(** :ref:`bool` value **)** +- :ref:`bool` **is_clipping_text** **(** **)** If ``true``, the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_horizontal_alignment: -- :ref:`HorizontalAlignment` **horizontal_alignment** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_horizontal_alignment(value) | -+-----------+---------------------------------+ -| *Getter* | get_horizontal_alignment() | -+-----------+---------------------------------+ +:ref:`HorizontalAlignment` **horizontal_alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`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` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_label_settings: -- :ref:`LabelSettings` **label_settings** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_label_settings(value) | -+----------+---------------------------+ -| *Getter* | get_label_settings() | -+----------+---------------------------+ +:ref:`LabelSettings` **label_settings** -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_label_settings** **(** :ref:`LabelSettings` value **)** +- :ref:`LabelSettings` **get_label_settings** **(** **)** + +A :ref:`LabelSettings` resource that can be shared between multiple **Label** nodes. Takes priority over theme properties. + +.. rst-class:: classref-item-separator ---- .. _class_Label_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_Label_property_lines_skipped: -- :ref:`int` **lines_skipped** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_lines_skipped(value) | -+-----------+--------------------------+ -| *Getter* | get_lines_skipped() | -+-----------+--------------------------+ +:ref:`int` **lines_skipped** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_lines_skipped** **(** :ref:`int` value **)** +- :ref:`int` **get_lines_skipped** **(** **)** The node ignores the first ``lines_skipped`` lines before it starts to display text. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_max_lines_visible: -- :ref:`int` **max_lines_visible** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------------+ -| *Setter* | set_max_lines_visible(value) | -+-----------+------------------------------+ -| *Getter* | get_max_lines_visible() | -+-----------+------------------------------+ +:ref:`int` **max_lines_visible** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_max_lines_visible** **(** :ref:`int` value **)** +- :ref:`int` **get_max_lines_visible** **(** **)** Limits the lines of text the node shows on screen. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_structured_text_bidi_override(value) | -+-----------+------------------------------------------+ -| *Getter* | get_structured_text_bidi_override() | -+-----------+------------------------------------------+ +:ref:`StructuredTextParser` **structured_text_bidi_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser` value **)** +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** **)** Set BiDi algorithm override for the structured text. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_structured_text_bidi_override_options: -- :ref:`Array` **structured_text_bidi_override_options** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``[]`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_structured_text_bidi_override_options(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_structured_text_bidi_override_options() | -+-----------+--------------------------------------------------+ +:ref:`Array` **structured_text_bidi_override_options** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override_options** **(** :ref:`Array` value **)** +- :ref:`Array` **get_structured_text_bidi_override_options** **(** **)** Set additional options for BiDi override. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** The text to display on screen. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_text_overrun_behavior: -- :ref:`OverrunBehavior` **text_overrun_behavior** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_text_overrun_behavior(value) | -+-----------+----------------------------------+ -| *Getter* | get_text_overrun_behavior() | -+-----------+----------------------------------+ +:ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_uppercase: -- :ref:`bool` **uppercase** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_uppercase(value) | -+-----------+----------------------+ -| *Getter* | is_uppercase() | -+-----------+----------------------+ +:ref:`bool` **uppercase** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_uppercase** **(** :ref:`bool` value **)** +- :ref:`bool` **is_uppercase** **(** **)** If ``true``, all the text displays as UPPERCASE. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_vertical_alignment: -- :ref:`VerticalAlignment` **vertical_alignment** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_vertical_alignment(value) | -+-----------+-------------------------------+ -| *Getter* | get_vertical_alignment() | -+-----------+-------------------------------+ +:ref:`VerticalAlignment` **vertical_alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_vertical_alignment** **(** :ref:`VerticalAlignment` value **)** +- :ref:`VerticalAlignment` **get_vertical_alignment** **(** **)** Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the :ref:`VerticalAlignment` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_visible_characters: -- :ref:`int` **visible_characters** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``-1`` | -+-----------+-------------------------------+ -| *Setter* | set_visible_characters(value) | -+-----------+-------------------------------+ -| *Getter* | get_visible_characters() | -+-----------+-------------------------------+ +:ref:`int` **visible_characters** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_visible_characters** **(** :ref:`int` value **)** +- :ref:`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. \ **Note:** Setting this property updates :ref:`visible_ratio` accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_visible_characters_behavior: -- :ref:`VisibleCharactersBehavior` **visible_characters_behavior** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------+ -| *Setter* | set_visible_characters_behavior(value) | -+-----------+----------------------------------------+ -| *Getter* | get_visible_characters_behavior() | -+-----------+----------------------------------------+ +:ref:`VisibleCharactersBehavior` **visible_characters_behavior** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_visible_characters_behavior** **(** :ref:`VisibleCharactersBehavior` value **)** +- :ref:`VisibleCharactersBehavior` **get_visible_characters_behavior** **(** **)** Sets the clipping behavior when :ref:`visible_characters` or :ref:`visible_ratio` is set. See :ref:`VisibleCharactersBehavior` for more info. +.. rst-class:: classref-item-separator + ---- .. _class_Label_property_visible_ratio: -- :ref:`float` **visible_ratio** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_visible_ratio(value) | -+-----------+--------------------------+ -| *Getter* | get_visible_ratio() | -+-----------+--------------------------+ +:ref:`float` **visible_ratio** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_visible_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_visible_ratio** **(** **)** The fraction of characters to display, relative to the total number of characters (see :ref:`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. \ **Note:** Setting this property updates :ref:`visible_characters` accordingly. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Label_method_get_line_count: -- :ref:`int` **get_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_count** **(** **)** |const| Returns the number of lines of text the Label has. +.. rst-class:: classref-item-separator + ---- .. _class_Label_method_get_line_height: -- :ref:`int` **get_line_height** **(** :ref:`int` line=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_height** **(** :ref:`int` line=-1 **)** |const| Returns the height of the line ``line``. @@ -407,142 +459,166 @@ If ``line`` is set to ``-1``, returns the biggest line height. If there are no lines, returns font size in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Label_method_get_total_character_count: -- :ref:`int` **get_total_character_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_total_character_count** **(** **)** |const| Returns the total number of printable characters in the text (excluding spaces and newlines). +.. rst-class:: classref-item-separator + ---- .. _class_Label_method_get_visible_line_count: -- :ref:`int` **get_visible_line_count** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of lines shown. Useful if the ``Label``'s height cannot currently display all lines. +:ref:`int` **get_visible_line_count** **(** **)** |const| + +Returns the number of lines shown. Useful if the **Label**'s height cannot currently display all lines. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_Label_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_color** = ``Color(1, 1, 1, 1)`` -Default text :ref:`Color` of the ``Label``. +Default text :ref:`Color` of the **Label**. + +.. rst-class:: classref-item-separator ---- .. _class_Label_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline. +The color of text outline. + +.. rst-class:: classref-item-separator ---- .. _class_Label_theme_color_font_shadow_color: -- :ref:`Color` **font_shadow_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **font_shadow_color** = ``Color(0, 0, 0, 0)`` :ref:`Color` of the text's shadow effect. +.. rst-class:: classref-item-separator + ---- .. _class_Label_theme_constant_line_spacing: -- :ref:`int` **line_spacing** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **line_spacing** = ``3`` -Vertical space between lines in multiline ``Label``. +Vertical space between lines in multiline **Label**. + +.. rst-class:: classref-item-separator ---- .. _class_Label_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` Text outline size. +.. rst-class:: classref-item-separator + ---- .. _class_Label_theme_constant_shadow_offset_x: -- :ref:`int` **shadow_offset_x** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **shadow_offset_x** = ``1`` The horizontal offset of the text's shadow. +.. rst-class:: classref-item-separator + ---- .. _class_Label_theme_constant_shadow_offset_y: -- :ref:`int` **shadow_offset_y** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **shadow_offset_y** = ``1`` The vertical offset of the text's shadow. +.. rst-class:: classref-item-separator + ---- .. _class_Label_theme_constant_shadow_outline_size: -- :ref:`int` **shadow_outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **shadow_outline_size** = ``1`` The size of the shadow outline. +.. rst-class:: classref-item-separator + ---- .. _class_Label_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -:ref:`Font` used for the ``Label``'s text. +:ref:`Font` **font** + +:ref:`Font` used for the **Label**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_Label_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``Label``'s text. +:ref:`int` **font_size** + +Font size of the **Label**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_Label_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -Background :ref:`StyleBox` for the ``Label``. +:ref:`StyleBox` **normal** + +Background :ref:`StyleBox` for the **Label**. .. |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.)` diff --git a/classes/class_label3d.rst b/classes/class_label3d.rst index f04e94af3..738677ecd 100644 --- a/classes/class_label3d.rst +++ b/classes/class_label3d.rst @@ -14,392 +14,470 @@ Label3D Displays plain text in a 3D world. +.. rst-class:: classref-introduction-group + Description ----------- Label3D displays plain text in a 3D world. It gives you control over the horizontal and vertical alignment. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`AlphaCutMode` | :ref:`alpha_cut` | ``0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`alpha_scissor_threshold` | ``0.5`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`BillboardMode` | :ref:`billboard` | ``0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`ShadowCastingSetting` | cast_shadow | ``0`` (overrides :ref:`GeometryInstance3D`) | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`double_sided` | ``true`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`fixed_size` | ``false`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`Font` | :ref:`font` | | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_size` | ``32`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`GIMode` | gi_mode | ``0`` (overrides :ref:`GeometryInstance3D`) | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`line_spacing` | ``0.0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`no_depth_test` | ``false`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`outline_modulate` | ``Color(0, 0, 0, 1)`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`outline_render_priority` | ``-1`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``12`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pixel_size` | ``0.005`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`render_priority` | ``0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaded` | ``false`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`text_direction` | ``0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`uppercase` | ``false`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``1`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`width` | ``500.0`` | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`AlphaCutMode` | :ref:`alpha_cut` | ``0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`alpha_scissor_threshold` | ``0.5`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`BillboardMode` | :ref:`billboard` | ``0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`ShadowCastingSetting` | cast_shadow | ``0`` (overrides :ref:`GeometryInstance3D`) | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`double_sided` | ``true`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`fixed_size` | ``false`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_size` | ``32`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`GIMode` | gi_mode | ``0`` (overrides :ref:`GeometryInstance3D`) | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`line_spacing` | ``0.0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`no_depth_test` | ``false`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`outline_modulate` | ``Color(0, 0, 0, 1)`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`outline_render_priority` | ``-1`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``12`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`pixel_size` | ``0.005`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`render_priority` | ``0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaded` | ``false`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`text_direction` | ``0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`uppercase` | ``false`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``1`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`width` | ``500.0`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_draw_flag` **(** :ref:`DrawFlags` flag **)** |const| | -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_draw_flag` **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** | -+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | + +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_draw_flag` **(** :ref:`DrawFlags` flag **)** |const| | + +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_draw_flag` **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** | + +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Label3D_DrawFlags: -.. _class_Label3D_constant_FLAG_SHADED: - -.. _class_Label3D_constant_FLAG_DOUBLE_SIDED: - -.. _class_Label3D_constant_FLAG_DISABLE_DEPTH_TEST: - -.. _class_Label3D_constant_FLAG_FIXED_SIZE: - -.. _class_Label3D_constant_FLAG_MAX: +.. rst-class:: classref-enumeration enum **DrawFlags**: -- **FLAG_SHADED** = **0** --- If set, lights in the environment affect the label. +.. _class_Label3D_constant_FLAG_SHADED: -- **FLAG_DOUBLE_SIDED** = **1** --- If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind. +.. rst-class:: classref-enumeration-constant -- **FLAG_DISABLE_DEPTH_TEST** = **2** --- Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. +:ref:`DrawFlags` **FLAG_SHADED** = ``0`` -- **FLAG_FIXED_SIZE** = **3** --- Label is scaled by depth so that it always appears the same size on screen. +If set, lights in the environment affect the label. -- **FLAG_MAX** = **4** --- Represents the size of the :ref:`DrawFlags` enum. +.. _class_Label3D_constant_FLAG_DOUBLE_SIDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_DOUBLE_SIDED** = ``1`` + +If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind. + +.. _class_Label3D_constant_FLAG_DISABLE_DEPTH_TEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_DISABLE_DEPTH_TEST** = ``2`` + +Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. + +.. _class_Label3D_constant_FLAG_FIXED_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_FIXED_SIZE** = ``3`` + +Label is scaled by depth so that it always appears the same size on screen. + +.. _class_Label3D_constant_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_MAX** = ``4`` + +Represents the size of the :ref:`DrawFlags` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Label3D_AlphaCutMode: -.. _class_Label3D_constant_ALPHA_CUT_DISABLED: - -.. _class_Label3D_constant_ALPHA_CUT_DISCARD: - -.. _class_Label3D_constant_ALPHA_CUT_OPAQUE_PREPASS: +.. rst-class:: classref-enumeration enum **AlphaCutMode**: -- **ALPHA_CUT_DISABLED** = **0** --- This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. :ref:`GeometryInstance3D.cast_shadow` has no effect when this transparency mode is used; the ``Label3D`` will never cast shadows. +.. _class_Label3D_constant_ALPHA_CUT_DISABLED: -- **ALPHA_CUT_DISCARD** = **1** --- This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa`). This mode is also known as *alpha testing* or *1-bit transparency*. +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaCutMode` **ALPHA_CUT_DISABLED** = ``0`` + +This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. :ref:`GeometryInstance3D.cast_shadow` has no effect when this transparency mode is used; the **Label3D** will never cast shadows. + +.. _class_Label3D_constant_ALPHA_CUT_DISCARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaCutMode` **ALPHA_CUT_DISCARD** = ``1`` + +This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa`). This mode is also known as *alpha testing* or *1-bit transparency*. \ **Note:** This mode might have issues with anti-aliased fonts and outlines, try adjusting :ref:`alpha_scissor_threshold` or using MSDF font. \ **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. -- **ALPHA_CUT_OPAQUE_PREPASS** = **2** --- This mode draws fully opaque pixels in the depth prepass. This is slower than :ref:`ALPHA_CUT_DISABLED` or :ref:`ALPHA_CUT_DISCARD`, but it allows displaying translucent areas and smooth edges while using proper sorting. +.. _class_Label3D_constant_ALPHA_CUT_OPAQUE_PREPASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaCutMode` **ALPHA_CUT_OPAQUE_PREPASS** = ``2`` + +This mode draws fully opaque pixels in the depth prepass. This is slower than :ref:`ALPHA_CUT_DISABLED` or :ref:`ALPHA_CUT_DISCARD`, but it allows displaying translucent areas and smooth edges while using proper sorting. \ **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Label3D_property_alpha_cut: -- :ref:`AlphaCutMode` **alpha_cut** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_alpha_cut_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_alpha_cut_mode() | -+-----------+---------------------------+ +:ref:`AlphaCutMode` **alpha_cut** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_alpha_cut_mode** **(** :ref:`AlphaCutMode` value **)** +- :ref:`AlphaCutMode` **get_alpha_cut_mode** **(** **)** The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_alpha_scissor_threshold: -- :ref:`float` **alpha_scissor_threshold** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``0.5`` | -+-----------+------------------------------------+ -| *Setter* | set_alpha_scissor_threshold(value) | -+-----------+------------------------------------+ -| *Getter* | get_alpha_scissor_threshold() | -+-----------+------------------------------------+ +:ref:`float` **alpha_scissor_threshold** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_alpha_scissor_threshold** **(** :ref:`float` value **)** +- :ref:`float` **get_alpha_scissor_threshold** **(** **)** Threshold at which the alpha scissor will discard values. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_autowrap_mode: -- :ref:`AutowrapMode` **autowrap_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_autowrap_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_autowrap_mode() | -+-----------+--------------------------+ +:ref:`AutowrapMode` **autowrap_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_autowrap_mode** **(** :ref:`AutowrapMode` value **)** +- :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. 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_billboard: -- :ref:`BillboardMode` **billboard** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_billboard_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_billboard_mode() | -+-----------+---------------------------+ +:ref:`BillboardMode` **billboard** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_billboard_mode** **(** :ref:`BillboardMode` value **)** +- :ref:`BillboardMode` **get_billboard_mode** **(** **)** The billboard mode to use for the label. See :ref:`BillboardMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_double_sided: -- :ref:`bool` **double_sided** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **double_sided** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, text can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_fixed_size: -- :ref:`bool` **fixed_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **fixed_size** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, the label is rendered at the same size regardless of distance. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_font: -- :ref:`Font` **font** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_font(value) | -+----------+-----------------+ -| *Getter* | get_font() | -+----------+-----------------+ +:ref:`Font` **font** + +.. rst-class:: classref-property-setget + +- void **set_font** **(** :ref:`Font` value **)** +- :ref:`Font` **get_font** **(** **)** Font configuration used to display text. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``32`` | -+-----------+----------------------+ -| *Setter* | set_font_size(value) | -+-----------+----------------------+ -| *Getter* | get_font_size() | -+-----------+----------------------+ +:ref:`int` **font_size** = ``32`` -Font size of the ``Label3D``'s text. To make the font look more detailed when up close, increase :ref:`font_size` while decreasing :ref:`pixel_size` at the same time. +.. rst-class:: classref-property-setget + +- void **set_font_size** **(** :ref:`int` value **)** +- :ref:`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` while decreasing :ref:`pixel_size` at the same time. Higher font sizes require more time to render new characters, which can cause stuttering during gameplay. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_horizontal_alignment: -- :ref:`HorizontalAlignment` **horizontal_alignment** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_horizontal_alignment(value) | -+-----------+---------------------------------+ -| *Getter* | get_horizontal_alignment() | -+-----------+---------------------------------+ +:ref:`HorizontalAlignment` **horizontal_alignment** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`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` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_Label3D_property_line_spacing: -- :ref:`float` **line_spacing** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_line_spacing(value) | -+-----------+-------------------------+ -| *Getter* | get_line_spacing() | -+-----------+-------------------------+ +:ref:`float` **line_spacing** = ``0.0`` -Vertical space between lines in multiline ``Label3D``. +.. rst-class:: classref-property-setget + +- void **set_line_spacing** **(** :ref:`float` value **)** +- :ref:`float` **get_line_spacing** **(** **)** + +Vertical space between lines in multiline **Label3D**. + +.. rst-class:: classref-item-separator ---- .. _class_Label3D_property_modulate: -- :ref:`Color` **modulate** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_modulate(value) | -+-----------+-----------------------+ -| *Getter* | get_modulate() | -+-----------+-----------------------+ +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` of the ``Label3D``. +.. rst-class:: classref-property-setget + +- void **set_modulate** **(** :ref:`Color` value **)** +- :ref:`Color` **get_modulate** **(** **)** + +Text :ref:`Color` of the **Label3D**. + +.. rst-class:: classref-item-separator ---- .. _class_Label3D_property_no_depth_test: -- :ref:`bool` **no_depth_test** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **no_depth_test** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, depth testing is disabled and the object will be drawn in render order. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The text drawing offset (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_outline_modulate: -- :ref:`Color` **outline_modulate** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------------+ -| *Setter* | set_outline_modulate(value) | -+-----------+-----------------------------+ -| *Getter* | get_outline_modulate() | -+-----------+-----------------------------+ +:ref:`Color` **outline_modulate** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_outline_modulate** **(** :ref:`Color` value **)** +- :ref:`Color` **get_outline_modulate** **(** **)** The tint of text outline. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_outline_render_priority: -- :ref:`int` **outline_render_priority** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------------------+ -| *Setter* | set_outline_render_priority(value) | -+-----------+------------------------------------+ -| *Getter* | get_outline_render_priority() | -+-----------+------------------------------------+ +:ref:`int` **outline_render_priority** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_outline_render_priority** **(** :ref:`int` value **)** +- :ref:`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. @@ -407,51 +485,54 @@ Sets the render priority for the text outline. Higher priority objects will be s \ **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). +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``12`` | -+-----------+-------------------------+ -| *Setter* | set_outline_size(value) | -+-----------+-------------------------+ -| *Getter* | get_outline_size() | -+-----------+-------------------------+ +:ref:`int` **outline_size** = ``12`` + +.. rst-class:: classref-property-setget + +- void **set_outline_size** **(** :ref:`int` value **)** +- :ref:`int` **get_outline_size** **(** **)** Text outline size. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_pixel_size: -- :ref:`float` **pixel_size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.005`` | -+-----------+-----------------------+ -| *Setter* | set_pixel_size(value) | -+-----------+-----------------------+ -| *Getter* | get_pixel_size() | -+-----------+-----------------------+ +:ref:`float` **pixel_size** = ``0.005`` + +.. rst-class:: classref-property-setget + +- void **set_pixel_size** **(** :ref:`float` value **)** +- :ref:`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` while decreasing :ref:`pixel_size` at the same time. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_render_priority: -- :ref:`int` **render_priority** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_render_priority(value) | -+-----------+----------------------------+ -| *Getter* | get_render_priority() | -+-----------+----------------------------+ +:ref:`int` **render_priority** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_render_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_render_priority** **(** **)** Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. @@ -459,172 +540,197 @@ Sets the render priority for the text. Higher priority objects will be sorted in \ **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). +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_shaded: -- :ref:`bool` **shaded** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **shaded** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, the :ref:`Light3D` in the :ref:`Environment` has effects on the label. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_structured_text_bidi_override(value) | -+-----------+------------------------------------------+ -| *Getter* | get_structured_text_bidi_override() | -+-----------+------------------------------------------+ +:ref:`StructuredTextParser` **structured_text_bidi_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser` value **)** +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** **)** Set BiDi algorithm override for the structured text. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_structured_text_bidi_override_options: -- :ref:`Array` **structured_text_bidi_override_options** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``[]`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_structured_text_bidi_override_options(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_structured_text_bidi_override_options() | -+-----------+--------------------------------------------------+ +:ref:`Array` **structured_text_bidi_override_options** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override_options** **(** :ref:`Array` value **)** +- :ref:`Array` **get_structured_text_bidi_override_options** **(** **)** Set additional options for BiDi override. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** The text to display on screen. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_text_direction: -- :ref:`Direction` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`Direction` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`Direction` value **)** +- :ref:`Direction` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_texture_filter: -- :ref:`TextureFilter` **texture_filter** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``3`` | -+-----------+---------------------------+ -| *Setter* | set_texture_filter(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_filter() | -+-----------+---------------------------+ +:ref:`TextureFilter` **texture_filter** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** +- :ref:`TextureFilter` **get_texture_filter** **(** **)** Filter flags for the texture. See :ref:`TextureFilter` for options. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_uppercase: -- :ref:`bool` **uppercase** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_uppercase(value) | -+-----------+----------------------+ -| *Getter* | is_uppercase() | -+-----------+----------------------+ +:ref:`bool` **uppercase** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_uppercase** **(** :ref:`bool` value **)** +- :ref:`bool` **is_uppercase** **(** **)** If ``true``, all the text displays as UPPERCASE. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_vertical_alignment: -- :ref:`VerticalAlignment` **vertical_alignment** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------------+ -| *Setter* | set_vertical_alignment(value) | -+-----------+-------------------------------+ -| *Getter* | get_vertical_alignment() | -+-----------+-------------------------------+ +:ref:`VerticalAlignment` **vertical_alignment** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_vertical_alignment** **(** :ref:`VerticalAlignment` value **)** +- :ref:`VerticalAlignment` **get_vertical_alignment** **(** **)** Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VerticalAlignment` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_property_width: -- :ref:`float` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``500.0`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`float` **width** = ``500.0`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`float` value **)** +- :ref:`float` **get_width** **(** **)** Text width (in pixels), used for autowrap and fill alignment. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Label3D_method_generate_triangle_mesh: -- :ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| Returns a :ref:`TriangleMesh` with the label's vertices following its current configuration (such as its :ref:`pixel_size`). +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_method_get_draw_flag: -- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| Returns the value of the specified flag. +.. rst-class:: classref-item-separator + ---- .. _class_Label3D_method_set_draw_flag: -- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** If ``true``, the specified flag will be enabled. See :ref:`DrawFlags` for a list of flags. diff --git a/classes/class_labelsettings.rst b/classes/class_labelsettings.rst index 965744753..69544c2b9 100644 --- a/classes/class_labelsettings.rst +++ b/classes/class_labelsettings.rst @@ -12,193 +12,200 @@ LabelSettings **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Collection of common settings to customize label text. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +**LabelSettings** is a resource that can be assigned to a :ref:`Label` node to customize it. It will take priority over the properties defined in theme. The resource can be shared between multiple labels and swapped on the fly, so it's convenient and flexible way to setup text style. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`Font` | :ref:`font` | | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`font_size` | ``16`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`line_spacing` | ``3.0`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`outline_color` | ``Color(1, 1, 1, 1)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(1, 1)`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`shadow_size` | ``1`` | -+-------------------------------+------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`Font` | :ref:`font` | | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`font_size` | ``16`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`line_spacing` | ``3.0`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`outline_color` | ``Color(1, 1, 1, 1)`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0)`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(1, 1)`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`shadow_size` | ``1`` | + +-------------------------------+------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_LabelSettings_property_font: -- :ref:`Font` **font** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_font(value) | -+----------+-----------------+ -| *Getter* | get_font() | -+----------+-----------------+ +:ref:`Font` **font** -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_font** **(** :ref:`Font` value **)** +- :ref:`Font` **get_font** **(** **)** + +:ref:`Font` used for the text. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_font_color(value) | -+-----------+-----------------------+ -| *Getter* | get_font_color() | -+-----------+-----------------------+ +:ref:`Color` **font_color** = ``Color(1, 1, 1, 1)`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_font_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_font_color** **(** **)** + +Color of the text. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``16`` | -+-----------+----------------------+ -| *Setter* | set_font_size(value) | -+-----------+----------------------+ -| *Getter* | get_font_size() | -+-----------+----------------------+ +:ref:`int` **font_size** = ``16`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_font_size** **(** :ref:`int` value **)** +- :ref:`int` **get_font_size** **(** **)** + +Size of the text. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_line_spacing: -- :ref:`float` **line_spacing** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``3.0`` | -+-----------+-------------------------+ -| *Setter* | set_line_spacing(value) | -+-----------+-------------------------+ -| *Getter* | get_line_spacing() | -+-----------+-------------------------+ +:ref:`float` **line_spacing** = ``3.0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_line_spacing** **(** :ref:`float` value **)** +- :ref:`float` **get_line_spacing** **(** **)** + +Vertical space between lines when the text is multiline. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_outline_color: -- :ref:`Color` **outline_color** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_outline_color(value) | -+-----------+--------------------------+ -| *Getter* | get_outline_color() | -+-----------+--------------------------+ +:ref:`Color` **outline_color** = ``Color(1, 1, 1, 1)`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_outline_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_outline_color** **(** **)** + +The color of the outline. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_outline_size(value) | -+-----------+-------------------------+ -| *Getter* | get_outline_size() | -+-----------+-------------------------+ +:ref:`int` **outline_size** = ``0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_outline_size** **(** :ref:`int` value **)** +- :ref:`int` **get_outline_size** **(** **)** + +Text outline size. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_shadow_color: -- :ref:`Color` **shadow_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_shadow_color(value) | -+-----------+-------------------------+ -| *Getter* | get_shadow_color() | -+-----------+-------------------------+ +:ref:`Color` **shadow_color** = ``Color(0, 0, 0, 0)`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_shadow_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_shadow_color** **(** **)** + +Color of the shadow effect. If alpha is ``0``, no shadow will be drawn. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_shadow_offset: -- :ref:`Vector2` **shadow_offset** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_shadow_offset(value) | -+-----------+--------------------------+ -| *Getter* | get_shadow_offset() | -+-----------+--------------------------+ +:ref:`Vector2` **shadow_offset** = ``Vector2(1, 1)`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_shadow_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_shadow_offset** **(** **)** + +Offset of the shadow effect, in pixels. + +.. rst-class:: classref-item-separator ---- .. _class_LabelSettings_property_shadow_size: -- :ref:`int` **shadow_size** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_shadow_size(value) | -+-----------+------------------------+ -| *Getter* | get_shadow_size() | -+-----------+------------------------+ +:ref:`int` **shadow_size** = ``1`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_shadow_size** **(** :ref:`int` value **)** +- :ref:`int` **get_shadow_size** **(** **)** + +Size of the shadow effect. .. |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.)` diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst index 89cfcf838..eaced9f97 100644 --- a/classes/class_light2d.rst +++ b/classes/class_light2d.rst @@ -16,360 +16,435 @@ Light2D Casts light in a 2D environment. +.. rst-class:: classref-introduction-group + Description ----------- -Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). +Casts light in a 2D environment. A light is defined as a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). -\ **Note:** Light2D can also be used as a mask. +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>` +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`editor_only` | ``false`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`energy` | ``1.0`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`range_item_cull_mask` | ``1`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`range_layer_max` | ``0`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`range_layer_min` | ``0`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`range_z_max` | ``1024`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`range_z_min` | ``-1024`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0)`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shadow_enabled` | ``false`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`ShadowFilter` | :ref:`shadow_filter` | ``0`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_filter_smooth` | ``0.0`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`shadow_item_cull_mask` | ``1`` | -+------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`editor_only` | ``false`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`energy` | ``1.0`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`range_item_cull_mask` | ``1`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`range_layer_max` | ``0`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`range_layer_min` | ``0`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`range_z_max` | ``1024`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`range_z_min` | ``-1024`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0)`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`shadow_enabled` | ``false`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`ShadowFilter` | :ref:`shadow_filter` | ``0`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`shadow_filter_smooth` | ``0.0`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`shadow_item_cull_mask` | ``1`` | + +------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_height` **(** **)** |const| | -+---------------------------+-------------------------------------------------------------------------------------------------+ -| void | :ref:`set_height` **(** :ref:`float` height **)** | -+---------------------------+-------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_height` **(** **)** |const| | + +---------------------------+-------------------------------------------------------------------------------------------------+ + | void | :ref:`set_height` **(** :ref:`float` height **)** | + +---------------------------+-------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Light2D_ShadowFilter: -.. _class_Light2D_constant_SHADOW_FILTER_NONE: - -.. _class_Light2D_constant_SHADOW_FILTER_PCF5: - -.. _class_Light2D_constant_SHADOW_FILTER_PCF13: +.. rst-class:: classref-enumeration enum **ShadowFilter**: -- **SHADOW_FILTER_NONE** = **0** --- No filter applies to the shadow map. See :ref:`shadow_filter`. +.. _class_Light2D_constant_SHADOW_FILTER_NONE: -- **SHADOW_FILTER_PCF5** = **1** --- Percentage closer filtering (5 samples) applies to the shadow map. See :ref:`shadow_filter`. +.. rst-class:: classref-enumeration-constant -- **SHADOW_FILTER_PCF13** = **2** --- Percentage closer filtering (13 samples) applies to the shadow map. See :ref:`shadow_filter`. +:ref:`ShadowFilter` **SHADOW_FILTER_NONE** = ``0`` + +No filter applies to the shadow map. This provides hard shadow edges and is the fastest to render. See :ref:`shadow_filter`. + +.. _class_Light2D_constant_SHADOW_FILTER_PCF5: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowFilter` **SHADOW_FILTER_PCF5** = ``1`` + +Percentage closer filtering (5 samples) applies to the shadow map. This is slower compared to hard shadow rendering. See :ref:`shadow_filter`. + +.. _class_Light2D_constant_SHADOW_FILTER_PCF13: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowFilter` **SHADOW_FILTER_PCF13** = ``2`` + +Percentage closer filtering (13 samples) applies to the shadow map. This is the slowest shadow filtereing mode, and should be used sparingly. See :ref:`shadow_filter`. + +.. rst-class:: classref-item-separator ---- .. _enum_Light2D_BlendMode: -.. _class_Light2D_constant_BLEND_MODE_ADD: - -.. _class_Light2D_constant_BLEND_MODE_SUB: - -.. _class_Light2D_constant_BLEND_MODE_MIX: +.. rst-class:: classref-enumeration enum **BlendMode**: -- **BLEND_MODE_ADD** = **0** --- Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light. +.. _class_Light2D_constant_BLEND_MODE_ADD: -- **BLEND_MODE_SUB** = **1** --- Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. +.. rst-class:: classref-enumeration-constant -- **BLEND_MODE_MIX** = **2** --- Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. +:ref:`BlendMode` **BLEND_MODE_ADD** = ``0`` + +Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light. + +.. _class_Light2D_constant_BLEND_MODE_SUB: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_SUB** = ``1`` + +Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. + +.. _class_Light2D_constant_BLEND_MODE_MIX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_MIX** = ``2`` + +Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Light2D_property_blend_mode: -- :ref:`BlendMode` **blend_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_blend_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_blend_mode() | -+-----------+-----------------------+ +:ref:`BlendMode` **blend_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_blend_mode** **(** :ref:`BlendMode` value **)** +- :ref:`BlendMode` **get_blend_mode** **(** **)** The Light2D's blend mode. See :ref:`BlendMode` constants for values. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** The Light2D's :ref:`Color`. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_editor_only: -- :ref:`bool` **editor_only** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_editor_only(value) | -+-----------+------------------------+ -| *Getter* | is_editor_only() | -+-----------+------------------------+ +:ref:`bool` **editor_only** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_editor_only** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editor_only** **(** **)** If ``true``, Light2D will only appear when editing the scene. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** If ``true``, Light2D will emit light. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_energy: -- :ref:`float` **energy** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_energy(value) | -+-----------+-------------------+ -| *Getter* | get_energy() | -+-----------+-------------------+ +:ref:`float` **energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_energy** **(** :ref:`float` value **)** +- :ref:`float` **get_energy** **(** **)** The Light2D's energy value. The larger the value, the stronger the light. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_range_item_cull_mask: -- :ref:`int` **range_item_cull_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_item_cull_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_item_cull_mask() | -+-----------+---------------------------+ +:ref:`int` **range_item_cull_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_item_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_item_cull_mask** **(** **)** The layer mask. Only objects with a matching mask will be affected by the Light2D. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_range_layer_max: -- :ref:`int` **range_layer_max** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_layer_range_max(value) | -+-----------+----------------------------+ -| *Getter* | get_layer_range_max() | -+-----------+----------------------------+ +:ref:`int` **range_layer_max** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_layer_range_max** **(** :ref:`int` value **)** +- :ref:`int` **get_layer_range_max** **(** **)** Maximum layer value of objects that are affected by the Light2D. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_range_layer_min: -- :ref:`int` **range_layer_min** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_layer_range_min(value) | -+-----------+----------------------------+ -| *Getter* | get_layer_range_min() | -+-----------+----------------------------+ +:ref:`int` **range_layer_min** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_layer_range_min** **(** :ref:`int` value **)** +- :ref:`int` **get_layer_range_min** **(** **)** Minimum layer value of objects that are affected by the Light2D. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_range_z_max: -- :ref:`int` **range_z_max** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1024`` | -+-----------+------------------------+ -| *Setter* | set_z_range_max(value) | -+-----------+------------------------+ -| *Getter* | get_z_range_max() | -+-----------+------------------------+ +:ref:`int` **range_z_max** = ``1024`` + +.. rst-class:: classref-property-setget + +- void **set_z_range_max** **(** :ref:`int` value **)** +- :ref:`int` **get_z_range_max** **(** **)** Maximum ``z`` value of objects that are affected by the Light2D. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_range_z_min: -- :ref:`int` **range_z_min** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``-1024`` | -+-----------+------------------------+ -| *Setter* | set_z_range_min(value) | -+-----------+------------------------+ -| *Getter* | get_z_range_min() | -+-----------+------------------------+ +:ref:`int` **range_z_min** = ``-1024`` + +.. rst-class:: classref-property-setget + +- void **set_z_range_min** **(** :ref:`int` value **)** +- :ref:`int` **get_z_range_min** **(** **)** Minimum ``z`` value of objects that are affected by the Light2D. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_shadow_color: -- :ref:`Color` **shadow_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_shadow_color(value) | -+-----------+-------------------------+ -| *Getter* | get_shadow_color() | -+-----------+-------------------------+ +:ref:`Color` **shadow_color** = ``Color(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_shadow_color** **(** **)** :ref:`Color` of shadows cast by the Light2D. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_shadow_enabled: -- :ref:`bool` **shadow_enabled** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_shadow_enabled(value) | -+-----------+---------------------------+ -| *Getter* | is_shadow_enabled() | -+-----------+---------------------------+ +:ref:`bool` **shadow_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shadow_enabled** **(** **)** If ``true``, the Light2D will cast shadows. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_shadow_filter: -- :ref:`ShadowFilter` **shadow_filter** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_shadow_filter(value) | -+-----------+--------------------------+ -| *Getter* | get_shadow_filter() | -+-----------+--------------------------+ +:ref:`ShadowFilter` **shadow_filter** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_filter** **(** :ref:`ShadowFilter` value **)** +- :ref:`ShadowFilter` **get_shadow_filter** **(** **)** Shadow filter type. See :ref:`ShadowFilter` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_Light2D_property_shadow_filter_smooth: -- :ref:`float` **shadow_filter_smooth** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_shadow_smooth(value) | -+-----------+--------------------------+ -| *Getter* | get_shadow_smooth() | -+-----------+--------------------------+ +:ref:`float` **shadow_filter_smooth** = ``0.0`` -Smoothing value for shadows. +.. rst-class:: classref-property-setget + +- void **set_shadow_smooth** **(** :ref:`float` value **)** +- :ref:`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` only has an effect if :ref:`shadow_filter` is :ref:`SHADOW_FILTER_PCF5` or :ref:`SHADOW_FILTER_PCF13`. + +.. rst-class:: classref-item-separator ---- .. _class_Light2D_property_shadow_item_cull_mask: -- :ref:`int` **shadow_item_cull_mask** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1`` | -+-----------+----------------------------------+ -| *Setter* | set_item_shadow_cull_mask(value) | -+-----------+----------------------------------+ -| *Getter* | get_item_shadow_cull_mask() | -+-----------+----------------------------------+ +:ref:`int` **shadow_item_cull_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_item_shadow_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_item_shadow_cull_mask** **(** **)** The shadow mask. Used with :ref:`LightOccluder2D` to cast shadows. Only occluders with a matching light mask will cast shadows. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Light2D_method_get_height: -- :ref:`float` **get_height** **(** **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`float` **get_height** **(** **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the light's height, which is used in 2D normal mapping. See :ref:`PointLight2D.height` and :ref:`DirectionalLight2D.height`. + +.. rst-class:: classref-item-separator ---- .. _class_Light2D_method_set_height: -- void **set_height** **(** :ref:`float` height **)** +.. rst-class:: classref-method -.. container:: contribute +void **set_height** **(** :ref:`float` height **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the light's height, which is used in 2D normal mapping. See :ref:`PointLight2D.height` and :ref:`DirectionalLight2D.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.)` diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index e9aa685a7..666fbd70a 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -16,11 +16,15 @@ Light3D Provides a base class for different kinds of light nodes. +.. rst-class:: classref-introduction-group + Description ----------- Light3D is the *abstract* base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,391 +32,531 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_begin` | ``40.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`distance_fade_enabled` | ``false`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_length` | ``10.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`distance_fade_shadow` | ``50.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`editor_only` | ``false`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_angular_distance` | ``0.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`BakeMode` | :ref:`light_bake_mode` | ``2`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`light_color` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`light_cull_mask` | ``4294967295`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_energy` | ``1.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_indirect_energy` | ``1.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_intensity_lumens` | | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_intensity_lux` | | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`light_negative` | ``false`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`light_projector` | | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_size` | ``0.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_specular` | ``0.5`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_temperature` | | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`light_volumetric_fog_energy` | ``1.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_bias` | ``0.1`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_blur` | ``1.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shadow_enabled` | ``false`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_normal_bias` | ``1.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_opacity` | ``1.0`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shadow_reverse_cull_face` | ``false`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_transmittance_bias` | ``0.05`` | -+----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`distance_fade_begin` | ``40.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`distance_fade_enabled` | ``false`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`distance_fade_length` | ``10.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`distance_fade_shadow` | ``50.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`editor_only` | ``false`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_angular_distance` | ``0.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`BakeMode` | :ref:`light_bake_mode` | ``2`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`light_color` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`light_cull_mask` | ``4294967295`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_energy` | ``1.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_indirect_energy` | ``1.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_intensity_lumens` | | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_intensity_lux` | | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`light_negative` | ``false`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`light_projector` | | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_size` | ``0.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_specular` | ``0.5`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_temperature` | | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`light_volumetric_fog_energy` | ``1.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`shadow_bias` | ``0.1`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`shadow_blur` | ``1.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`shadow_enabled` | ``false`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`shadow_normal_bias` | ``1.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`shadow_opacity` | ``1.0`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`shadow_reverse_cull_face` | ``false`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`shadow_transmittance_bias` | ``0.05`` | + +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_correlated_color` **(** **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_correlated_color` **(** **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Light3D_Param: -.. _class_Light3D_constant_PARAM_ENERGY: - -.. _class_Light3D_constant_PARAM_INDIRECT_ENERGY: - -.. _class_Light3D_constant_PARAM_VOLUMETRIC_FOG_ENERGY: - -.. _class_Light3D_constant_PARAM_SPECULAR: - -.. _class_Light3D_constant_PARAM_RANGE: - -.. _class_Light3D_constant_PARAM_SIZE: - -.. _class_Light3D_constant_PARAM_ATTENUATION: - -.. _class_Light3D_constant_PARAM_SPOT_ANGLE: - -.. _class_Light3D_constant_PARAM_SPOT_ATTENUATION: - -.. _class_Light3D_constant_PARAM_SHADOW_MAX_DISTANCE: - -.. _class_Light3D_constant_PARAM_SHADOW_SPLIT_1_OFFSET: - -.. _class_Light3D_constant_PARAM_SHADOW_SPLIT_2_OFFSET: - -.. _class_Light3D_constant_PARAM_SHADOW_SPLIT_3_OFFSET: - -.. _class_Light3D_constant_PARAM_SHADOW_FADE_START: - -.. _class_Light3D_constant_PARAM_SHADOW_NORMAL_BIAS: - -.. _class_Light3D_constant_PARAM_SHADOW_BIAS: - -.. _class_Light3D_constant_PARAM_SHADOW_PANCAKE_SIZE: - -.. _class_Light3D_constant_PARAM_SHADOW_OPACITY: - -.. _class_Light3D_constant_PARAM_SHADOW_BLUR: - -.. _class_Light3D_constant_PARAM_TRANSMITTANCE_BIAS: - -.. _class_Light3D_constant_PARAM_INTENSITY: - -.. _class_Light3D_constant_PARAM_MAX: +.. rst-class:: classref-enumeration enum **Param**: -- **PARAM_ENERGY** = **0** --- Constant for accessing :ref:`light_energy`. +.. _class_Light3D_constant_PARAM_ENERGY: -- **PARAM_INDIRECT_ENERGY** = **1** --- Constant for accessing :ref:`light_indirect_energy`. +.. rst-class:: classref-enumeration-constant -- **PARAM_VOLUMETRIC_FOG_ENERGY** = **2** --- Constant for accessing :ref:`light_volumetric_fog_energy`. +:ref:`Param` **PARAM_ENERGY** = ``0`` -- **PARAM_SPECULAR** = **3** --- Constant for accessing :ref:`light_specular`. +Constant for accessing :ref:`light_energy`. -- **PARAM_RANGE** = **4** --- Constant for accessing :ref:`OmniLight3D.omni_range` or :ref:`SpotLight3D.spot_range`. +.. _class_Light3D_constant_PARAM_INDIRECT_ENERGY: -- **PARAM_SIZE** = **5** --- Constant for accessing :ref:`light_size`. +.. rst-class:: classref-enumeration-constant -- **PARAM_ATTENUATION** = **6** --- Constant for accessing :ref:`OmniLight3D.omni_attenuation` or :ref:`SpotLight3D.spot_attenuation`. +:ref:`Param` **PARAM_INDIRECT_ENERGY** = ``1`` -- **PARAM_SPOT_ANGLE** = **7** --- Constant for accessing :ref:`SpotLight3D.spot_angle`. +Constant for accessing :ref:`light_indirect_energy`. -- **PARAM_SPOT_ATTENUATION** = **8** --- Constant for accessing :ref:`SpotLight3D.spot_angle_attenuation`. +.. _class_Light3D_constant_PARAM_VOLUMETRIC_FOG_ENERGY: -- **PARAM_SHADOW_MAX_DISTANCE** = **9** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_max_distance`. +.. rst-class:: classref-enumeration-constant -- **PARAM_SHADOW_SPLIT_1_OFFSET** = **10** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_1`. +:ref:`Param` **PARAM_VOLUMETRIC_FOG_ENERGY** = ``2`` -- **PARAM_SHADOW_SPLIT_2_OFFSET** = **11** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_2`. +Constant for accessing :ref:`light_volumetric_fog_energy`. -- **PARAM_SHADOW_SPLIT_3_OFFSET** = **12** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_3`. +.. _class_Light3D_constant_PARAM_SPECULAR: -- **PARAM_SHADOW_FADE_START** = **13** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_fade_start`. +.. rst-class:: classref-enumeration-constant -- **PARAM_SHADOW_NORMAL_BIAS** = **14** --- Constant for accessing :ref:`shadow_normal_bias`. +:ref:`Param` **PARAM_SPECULAR** = ``3`` -- **PARAM_SHADOW_BIAS** = **15** --- Constant for accessing :ref:`shadow_bias`. +Constant for accessing :ref:`light_specular`. -- **PARAM_SHADOW_PANCAKE_SIZE** = **16** --- Constant for accessing :ref:`DirectionalLight3D.directional_shadow_pancake_size`. +.. _class_Light3D_constant_PARAM_RANGE: -- **PARAM_SHADOW_OPACITY** = **17** --- Constant for accessing :ref:`shadow_opacity`. +.. rst-class:: classref-enumeration-constant -- **PARAM_SHADOW_BLUR** = **18** --- Constant for accessing :ref:`shadow_blur`. +:ref:`Param` **PARAM_RANGE** = ``4`` -- **PARAM_TRANSMITTANCE_BIAS** = **19** --- Constant for accessing :ref:`shadow_transmittance_bias`. +Constant for accessing :ref:`OmniLight3D.omni_range` or :ref:`SpotLight3D.spot_range`. -- **PARAM_INTENSITY** = **20** --- Constant for accessing :ref:`light_intensity_lumens` and :ref:`light_intensity_lux`. Only used when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is ``true``. +.. _class_Light3D_constant_PARAM_SIZE: -- **PARAM_MAX** = **21** --- Represents the size of the :ref:`Param` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SIZE** = ``5`` + +Constant for accessing :ref:`light_size`. + +.. _class_Light3D_constant_PARAM_ATTENUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ATTENUATION** = ``6`` + +Constant for accessing :ref:`OmniLight3D.omni_attenuation` or :ref:`SpotLight3D.spot_attenuation`. + +.. _class_Light3D_constant_PARAM_SPOT_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SPOT_ANGLE** = ``7`` + +Constant for accessing :ref:`SpotLight3D.spot_angle`. + +.. _class_Light3D_constant_PARAM_SPOT_ATTENUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SPOT_ATTENUATION** = ``8`` + +Constant for accessing :ref:`SpotLight3D.spot_angle_attenuation`. + +.. _class_Light3D_constant_PARAM_SHADOW_MAX_DISTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_MAX_DISTANCE** = ``9`` + +Constant for accessing :ref:`DirectionalLight3D.directional_shadow_max_distance`. + +.. _class_Light3D_constant_PARAM_SHADOW_SPLIT_1_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_SPLIT_1_OFFSET** = ``10`` + +Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_1`. + +.. _class_Light3D_constant_PARAM_SHADOW_SPLIT_2_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_SPLIT_2_OFFSET** = ``11`` + +Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_2`. + +.. _class_Light3D_constant_PARAM_SHADOW_SPLIT_3_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_SPLIT_3_OFFSET** = ``12`` + +Constant for accessing :ref:`DirectionalLight3D.directional_shadow_split_3`. + +.. _class_Light3D_constant_PARAM_SHADOW_FADE_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_FADE_START** = ``13`` + +Constant for accessing :ref:`DirectionalLight3D.directional_shadow_fade_start`. + +.. _class_Light3D_constant_PARAM_SHADOW_NORMAL_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_NORMAL_BIAS** = ``14`` + +Constant for accessing :ref:`shadow_normal_bias`. + +.. _class_Light3D_constant_PARAM_SHADOW_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_BIAS** = ``15`` + +Constant for accessing :ref:`shadow_bias`. + +.. _class_Light3D_constant_PARAM_SHADOW_PANCAKE_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_PANCAKE_SIZE** = ``16`` + +Constant for accessing :ref:`DirectionalLight3D.directional_shadow_pancake_size`. + +.. _class_Light3D_constant_PARAM_SHADOW_OPACITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_OPACITY** = ``17`` + +Constant for accessing :ref:`shadow_opacity`. + +.. _class_Light3D_constant_PARAM_SHADOW_BLUR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_SHADOW_BLUR** = ``18`` + +Constant for accessing :ref:`shadow_blur`. + +.. _class_Light3D_constant_PARAM_TRANSMITTANCE_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_TRANSMITTANCE_BIAS** = ``19`` + +Constant for accessing :ref:`shadow_transmittance_bias`. + +.. _class_Light3D_constant_PARAM_INTENSITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_INTENSITY** = ``20`` + +Constant for accessing :ref:`light_intensity_lumens` and :ref:`light_intensity_lux`. Only used when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is ``true``. + +.. _class_Light3D_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_MAX** = ``21`` + +Represents the size of the :ref:`Param` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Light3D_BakeMode: -.. _class_Light3D_constant_BAKE_DISABLED: - -.. _class_Light3D_constant_BAKE_STATIC: - -.. _class_Light3D_constant_BAKE_DYNAMIC: +.. rst-class:: classref-enumeration enum **BakeMode**: -- **BAKE_DISABLED** = **0** --- 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. +.. _class_Light3D_constant_BAKE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeMode` **BAKE_DISABLED** = ``0`` + +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`. Hiding a light will still affect baking :ref:`VoxelGI` and SDFGI (see [member Environment.sdfgi_enabled). -- **BAKE_STATIC** = **1** --- Light is taken into account in static baking (:ref:`VoxelGI`, :ref:`LightmapGI`, SDFGI (:ref:`Environment.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. +.. _class_Light3D_constant_BAKE_STATIC: -- **BAKE_DYNAMIC** = **2** --- Light is taken into account in dynamic baking (:ref:`VoxelGI` and SDFGI (:ref:`Environment.sdfgi_enabled`) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to :ref:`BAKE_STATIC`. This has a greater performance cost compared to :ref:`BAKE_STATIC`. +.. rst-class:: classref-enumeration-constant + +:ref:`BakeMode` **BAKE_STATIC** = ``1`` + +Light is taken into account in static baking (:ref:`VoxelGI`, :ref:`LightmapGI`, SDFGI (:ref:`Environment.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. + +.. _class_Light3D_constant_BAKE_DYNAMIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeMode` **BAKE_DYNAMIC** = ``2`` + +Light is taken into account in dynamic baking (:ref:`VoxelGI` and SDFGI (:ref:`Environment.sdfgi_enabled`) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to :ref:`BAKE_STATIC`. This has a greater performance cost compared to :ref:`BAKE_STATIC`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Light3D_property_distance_fade_begin: -- :ref:`float` **distance_fade_begin** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``40.0`` | -+-----------+--------------------------------+ -| *Setter* | set_distance_fade_begin(value) | -+-----------+--------------------------------+ -| *Getter* | get_distance_fade_begin() | -+-----------+--------------------------------+ +:ref:`float` **distance_fade_begin** = ``40.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade_begin** **(** :ref:`float` value **)** +- :ref:`float` **get_distance_fade_begin** **(** **)** The distance from the camera at which the light begins to fade away (in 3D units). \ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_distance_fade_enabled: -- :ref:`bool` **distance_fade_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_enable_distance_fade(value) | -+-----------+---------------------------------+ -| *Getter* | is_distance_fade_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **distance_fade_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_distance_fade** **(** :ref:`bool` value **)** +- :ref:`bool` **is_distance_fade_enabled** **(** **)** If ``true``, the light will smoothly fade away when far from the active :ref:`Camera3D` starting at :ref:`distance_fade_begin`. This acts as a form of level of detail (LOD). The light 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 lights in a scene and thus improve performance. \ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_distance_fade_length: -- :ref:`float` **distance_fade_length** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``10.0`` | -+-----------+---------------------------------+ -| *Setter* | set_distance_fade_length(value) | -+-----------+---------------------------------+ -| *Getter* | get_distance_fade_length() | -+-----------+---------------------------------+ +:ref:`float` **distance_fade_length** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade_length** **(** :ref:`float` value **)** +- :ref:`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. \ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_distance_fade_shadow: -- :ref:`float` **distance_fade_shadow** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``50.0`` | -+-----------+---------------------------------+ -| *Setter* | set_distance_fade_shadow(value) | -+-----------+---------------------------------+ -| *Getter* | get_distance_fade_shadow() | -+-----------+---------------------------------+ +:ref:`float` **distance_fade_shadow** = ``50.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance_fade_shadow** **(** :ref:`float` value **)** +- :ref:`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` + :ref:`distance_fade_length` to further improve performance, as shadow rendering is often more expensive than light rendering itself. \ **Note:** Only effective for :ref:`OmniLight3D` and :ref:`SpotLight3D`, and only when :ref:`shadow_enabled` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_editor_only: -- :ref:`bool` **editor_only** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_editor_only(value) | -+-----------+------------------------+ -| *Getter* | is_editor_only() | -+-----------+------------------------+ +:ref:`bool` **editor_only** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_editor_only** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editor_only** **(** **)** If ``true``, the light only appears in the editor and will not be visible at runtime. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_angular_distance: -- :ref:`float` **light_angular_distance** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **light_angular_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The light's angular size in degrees. Increasing this will make shadows softer at greater distances. Only available for :ref:`DirectionalLight3D`\ s. For reference, the Sun from the Earth is approximately ``0.5``. \ **Note:** :ref:`light_angular_distance` is not affected by :ref:`Node3D.scale` (the light's scale or its parent's scale). +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_bake_mode: -- :ref:`BakeMode` **light_bake_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``2`` | -+-----------+----------------------+ -| *Setter* | set_bake_mode(value) | -+-----------+----------------------+ -| *Getter* | get_bake_mode() | -+-----------+----------------------+ +:ref:`BakeMode` **light_bake_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_bake_mode** **(** :ref:`BakeMode` value **)** +- :ref:`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`. \ **Note:** Meshes' global illumination mode will also affect the global illumination rendering. See :ref:`GeometryInstance3D.gi_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_color: -- :ref:`Color` **light_color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **light_color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_cull_mask: -- :ref:`int` **light_cull_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4294967295`` | -+-----------+----------------------+ -| *Setter* | set_cull_mask(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mask() | -+-----------+----------------------+ +:ref:`int` **light_cull_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_cull_mask** **(** **)** The light will affect objects in the selected layers. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_energy: -- :ref:`float` **light_energy** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **light_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The light's strength multiplier (this is not a physical unit). For :ref:`OmniLight3D` and :ref:`SpotLight3D`, changing this value will only change the light color's intensity, not the light's radius. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_indirect_energy: -- :ref:`float` **light_indirect_energy** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **light_indirect_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Secondary multiplier used with indirect light (light bounces). Used with :ref:`VoxelGI` and SDFGI (see :ref:`Environment.sdfgi_enabled`). \ **Note:** This property is ignored if :ref:`light_energy` is equal to ``0.0``, as the light won't be present at all in the GI shader. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_intensity_lumens: -- :ref:`float` **light_intensity_lumens** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_param(value) | -+----------+------------------+ -| *Getter* | get_param() | -+----------+------------------+ +:ref:`float` **light_intensity_lumens** + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Used by positional lights (:ref:`OmniLight3D` and :ref:`SpotLight3D`) when :ref:`ProjectSettings.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. @@ -420,258 +564,294 @@ For :ref:`SpotLight3D`\ s, we assume that the area outside th A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_intensity_lux: -- :ref:`float` **light_intensity_lux** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_param(value) | -+----------+------------------+ -| *Getter* | get_param() | -+----------+------------------+ +:ref:`float` **light_intensity_lux** + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Used by :ref:`DirectionalLight3D`\ s when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is ``true``. Sets the intensity of the light source measured in Lux. Lux is a measure pf luminous flux per unit area, it is equal to one lumen per square metre. Lux is the measure of how much light hits a surface at a given time. On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_negative: -- :ref:`bool` **light_negative** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_negative(value) | -+-----------+---------------------+ -| *Getter* | is_negative() | -+-----------+---------------------+ +:ref:`bool` **light_negative** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_negative** **(** :ref:`bool` value **)** +- :ref:`bool` **is_negative** **(** **)** If ``true``, the light's effect is reversed, darkening areas and casting bright shadows. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_projector: -- :ref:`Texture2D` **light_projector** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_projector(value) | -+----------+----------------------+ -| *Getter* | get_projector() | -+----------+----------------------+ +:ref:`Texture2D` **light_projector** + +.. rst-class:: classref-property-setget + +- void **set_projector** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_projector** **(** **)** :ref:`Texture2D` projected by light. :ref:`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. \ **Note:** Unlike :ref:`BaseMaterial3D` whose filter mode can be adjusted on a per-material basis, the filter mode for light projector textures is set globally with :ref:`ProjectSettings.rendering/textures/light_projectors/filter`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_size: -- :ref:`float` **light_size** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **light_size** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The size of the light in Godot units. Only available for :ref:`OmniLight3D`\ s and :ref:`SpotLight3D`\ s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent. \ **Note:** :ref:`light_size` is not affected by :ref:`Node3D.scale` (the light's scale or its parent's scale). +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_specular: -- :ref:`float` **light_specular** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.5`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **light_specular** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_temperature: -- :ref:`float` **light_temperature** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_temperature(value) | -+----------+------------------------+ -| *Getter* | get_temperature() | -+----------+------------------------+ +:ref:`float` **light_temperature** + +.. rst-class:: classref-property-setget + +- void **set_temperature** **(** :ref:`float` value **)** +- :ref:`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`. The sun on a cloudy day is approximately 6500 Kelvin, on a clear day it is between 5500 to 6000 Kelvin, and on a clear day at sunrise or sunset it ranges to around 1850 Kelvin. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_light_volumetric_fog_energy: -- :ref:`float` **light_volumetric_fog_energy** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **light_volumetric_fog_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Secondary multiplier multiplied with :ref:`light_energy` then used with the :ref:`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. \ **Note:** To prevent short-lived dynamic light effects from poorly interacting with volumetric fog, lights used in those effects should have :ref:`light_volumetric_fog_energy` set to ``0.0`` unless :ref:`Environment.volumetric_fog_temporal_reprojection_enabled` is disabled (or unless the reprojection amount is significantly lowered). +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_shadow_bias: -- :ref:`float` **shadow_bias** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.1`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **shadow_bias** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_shadow_blur: -- :ref:`float` **shadow_blur** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **shadow_blur** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_shadow_enabled: -- :ref:`bool` **shadow_enabled** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_shadow(value) | -+-----------+-------------------+ -| *Getter* | has_shadow() | -+-----------+-------------------+ +:ref:`bool` **shadow_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_shadow** **(** :ref:`bool` value **)** +- :ref:`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` to hide the light when far away from the :ref:`Camera3D`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_shadow_normal_bias: -- :ref:`float` **shadow_normal_bias** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **shadow_normal_bias** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` 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`. In practice, this value should be tweaked along with :ref:`shadow_bias` to reduce artifacts as much as possible. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_shadow_opacity: -- :ref:`float` **shadow_opacity** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **shadow_opacity** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_shadow_reverse_cull_face: -- :ref:`bool` **shadow_reverse_cull_face** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------+ -| *Setter* | set_shadow_reverse_cull_face(value) | -+-----------+-------------------------------------+ -| *Getter* | get_shadow_reverse_cull_face() | -+-----------+-------------------------------------+ +:ref:`bool` **shadow_reverse_cull_face** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_reverse_cull_face** **(** :ref:`bool` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_property_shadow_transmittance_bias: -- :ref:`float` **shadow_transmittance_bias** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.05`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **shadow_transmittance_bias** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| .. 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 ------------------- .. _class_Light3D_method_get_correlated_color: -- :ref:`Color` **get_correlated_color** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_correlated_color** **(** **)** |const| Returns the :ref:`Color` of an idealized blackbody at the given :ref:`light_temperature`. This value is calculated internally based on the :ref:`light_temperature`. This :ref:`Color` is multiplied by :ref:`light_color` before being sent to the :ref:`RenderingServer`. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_method_get_param: -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Returns the value of the specified :ref:`Param` parameter. +.. rst-class:: classref-item-separator + ---- .. _class_Light3D_method_set_param: -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** Sets the value of the specified :ref:`Param` parameter. diff --git a/classes/class_lightmapgi.rst b/classes/class_lightmapgi.rst index 84d14346e..576d74644 100644 --- a/classes/class_lightmapgi.rst +++ b/classes/class_lightmapgi.rst @@ -14,297 +14,425 @@ LightmapGI Computes and stores baked lightmaps for fast global illumination. +.. rst-class:: classref-introduction-group + Description ----------- -The ``LightmapGI`` node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. ``LightmapGI`` can also provide rough reflections using spherical harmonics if :ref:`directional` is enabled. Dynamic objects can receive indirect lighting thanks to *light probes*, which can be automatically placed by setting :ref:`generate_probes_subdiv` to a value other than :ref:`GENERATE_PROBES_DISABLED`. Additional lightmap probes can also be added by creating :ref:`LightmapProbe` nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a ``LightmapGI`` node is also slower compared to :ref:`VoxelGI`. +The **LightmapGI** node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. **LightmapGI** can also provide rough reflections using spherical harmonics if :ref:`directional` is enabled. Dynamic objects can receive indirect lighting thanks to *light probes*, which can be automatically placed by setting :ref:`generate_probes_subdiv` to a value other than :ref:`GENERATE_PROBES_DISABLED`. Additional lightmap probes can also be added by creating :ref:`LightmapProbe` nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a **LightmapGI** node is also slower compared to :ref:`VoxelGI`. -\ **Procedural generation:** Lightmap baking functionality is only available in the editor. This means ``LightmapGI`` is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use :ref:`VoxelGI` or SDFGI instead (see :ref:`Environment.sdfgi_enabled`). +\ **Procedural generation:** Lightmap baking functionality is only available in the editor. This means **LightmapGI** is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use :ref:`VoxelGI` or SDFGI instead (see :ref:`Environment.sdfgi_enabled`). -\ **Performance:** ``LightmapGI`` provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices. +\ **Performance:** **LightmapGI** provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices. \ **Note:** Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again. \ **Note:** Lightmap baking on :ref:`CSGShape3D`\ s and :ref:`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 (Clustered or Mobile), not OpenGL. +\ **Note:** If no custom lightmappers are installed, **LightmapGI** can only be baked when using the Vulkan backend (Clustered or Mobile), not OpenGL. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`bias` | ``0.0005`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`int` | :ref:`bounces` | ``3`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`CameraAttributes` | :ref:`camera_attributes` | | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`bool` | :ref:`directional` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`Color` | :ref:`environment_custom_color` | | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`environment_custom_energy` | | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`Sky` | :ref:`environment_custom_sky` | | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`EnvironmentMode` | :ref:`environment_mode` | ``1`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`GenerateProbes` | :ref:`generate_probes_subdiv` | ``2`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`bool` | :ref:`interior` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`LightmapGIData` | :ref:`light_data` | | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`int` | :ref:`max_texture_size` | ``16384`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`BakeQuality` | :ref:`quality` | ``1`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ -| :ref:`bool` | :ref:`use_denoiser` | ``true`` | -+---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`bias` | ``0.0005`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`bounces` | ``3`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`CameraAttributes` | :ref:`camera_attributes` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`directional` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`Color` | :ref:`environment_custom_color` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`environment_custom_energy` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`Sky` | :ref:`environment_custom_sky` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`EnvironmentMode` | :ref:`environment_mode` | ``1`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`GenerateProbes` | :ref:`generate_probes_subdiv` | ``2`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`interior` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`LightmapGIData` | :ref:`light_data` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`max_texture_size` | ``16384`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`BakeQuality` | :ref:`quality` | ``1`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`use_denoiser` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_LightmapGI_BakeQuality: -.. _class_LightmapGI_constant_BAKE_QUALITY_LOW: - -.. _class_LightmapGI_constant_BAKE_QUALITY_MEDIUM: - -.. _class_LightmapGI_constant_BAKE_QUALITY_HIGH: - -.. _class_LightmapGI_constant_BAKE_QUALITY_ULTRA: +.. rst-class:: classref-enumeration enum **BakeQuality**: -- **BAKE_QUALITY_LOW** = **0** --- Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count`. +.. _class_LightmapGI_constant_BAKE_QUALITY_LOW: -- **BAKE_QUALITY_MEDIUM** = **1** --- Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count`. +.. rst-class:: classref-enumeration-constant -- **BAKE_QUALITY_HIGH** = **2** --- High bake quality (slow bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count`. +:ref:`BakeQuality` **BAKE_QUALITY_LOW** = ``0`` -- **BAKE_QUALITY_ULTRA** = **3** --- Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count`. +Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count`. + +.. _class_LightmapGI_constant_BAKE_QUALITY_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeQuality` **BAKE_QUALITY_MEDIUM** = ``1`` + +Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count`. + +.. _class_LightmapGI_constant_BAKE_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeQuality` **BAKE_QUALITY_HIGH** = ``2`` + +High bake quality (slow bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count`. + +.. _class_LightmapGI_constant_BAKE_QUALITY_ULTRA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeQuality` **BAKE_QUALITY_ULTRA** = ``3`` + +Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing :ref:`ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count` and :ref:`ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count`. + +.. rst-class:: classref-item-separator ---- .. _enum_LightmapGI_GenerateProbes: -.. _class_LightmapGI_constant_GENERATE_PROBES_DISABLED: - -.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_4: - -.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_8: - -.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_16: - -.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_32: +.. rst-class:: classref-enumeration enum **GenerateProbes**: -- **GENERATE_PROBES_DISABLED** = **0** --- Don't generate lightmap probes for lighting dynamic objects. +.. _class_LightmapGI_constant_GENERATE_PROBES_DISABLED: -- **GENERATE_PROBES_SUBDIV_4** = **1** --- Lowest level of subdivision (fastest bake times, smallest file sizes). +.. rst-class:: classref-enumeration-constant -- **GENERATE_PROBES_SUBDIV_8** = **2** --- Low level of subdivision (fast bake times, small file sizes). +:ref:`GenerateProbes` **GENERATE_PROBES_DISABLED** = ``0`` -- **GENERATE_PROBES_SUBDIV_16** = **3** --- High level of subdivision (slow bake times, large file sizes). +Don't generate lightmap probes for lighting dynamic objects. -- **GENERATE_PROBES_SUBDIV_32** = **4** --- Highest level of subdivision (slowest bake times, largest file sizes). +.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenerateProbes` **GENERATE_PROBES_SUBDIV_4** = ``1`` + +Lowest level of subdivision (fastest bake times, smallest file sizes). + +.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_8: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenerateProbes` **GENERATE_PROBES_SUBDIV_8** = ``2`` + +Low level of subdivision (fast bake times, small file sizes). + +.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_16: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenerateProbes` **GENERATE_PROBES_SUBDIV_16** = ``3`` + +High level of subdivision (slow bake times, large file sizes). + +.. _class_LightmapGI_constant_GENERATE_PROBES_SUBDIV_32: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenerateProbes` **GENERATE_PROBES_SUBDIV_32** = ``4`` + +Highest level of subdivision (slowest bake times, largest file sizes). + +.. rst-class:: classref-item-separator ---- .. _enum_LightmapGI_BakeError: -.. _class_LightmapGI_constant_BAKE_ERROR_OK: - -.. _class_LightmapGI_constant_BAKE_ERROR_NO_LIGHTMAPPER: - -.. _class_LightmapGI_constant_BAKE_ERROR_NO_SAVE_PATH: - -.. _class_LightmapGI_constant_BAKE_ERROR_NO_MESHES: - -.. _class_LightmapGI_constant_BAKE_ERROR_MESHES_INVALID: - -.. _class_LightmapGI_constant_BAKE_ERROR_CANT_CREATE_IMAGE: - -.. _class_LightmapGI_constant_BAKE_ERROR_USER_ABORTED: +.. rst-class:: classref-enumeration enum **BakeError**: -- **BAKE_ERROR_OK** = **0** --- Lightmap baking was successful. +.. _class_LightmapGI_constant_BAKE_ERROR_OK: -- **BAKE_ERROR_NO_LIGHTMAPPER** = **1** --- Lightmap baking failed as there is no lightmapper available in this Godot build. +.. rst-class:: classref-enumeration-constant -- **BAKE_ERROR_NO_SAVE_PATH** = **2** --- Lightmap baking failed as the :ref:`LightmapGIData` save path isn't configured in the resource. +:ref:`BakeError` **BAKE_ERROR_OK** = ``0`` -- **BAKE_ERROR_NO_MESHES** = **3** --- Lightmap baking failed as there are no meshes whose :ref:`GeometryInstance3D.gi_mode` is :ref:`GeometryInstance3D.GI_MODE_STATIC` and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly. +Lightmap baking was successful. -- **BAKE_ERROR_MESHES_INVALID** = **4** --- Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking. +.. _class_LightmapGI_constant_BAKE_ERROR_NO_LIGHTMAPPER: -- **BAKE_ERROR_CANT_CREATE_IMAGE** = **5** --- Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved. +.. rst-class:: classref-enumeration-constant -- **BAKE_ERROR_USER_ABORTED** = **6** --- The user aborted the lightmap baking operation (typically by clicking the **Cancel** button in the progress dialog). +:ref:`BakeError` **BAKE_ERROR_NO_LIGHTMAPPER** = ``1`` + +Lightmap baking failed as there is no lightmapper available in this Godot build. + +.. _class_LightmapGI_constant_BAKE_ERROR_NO_SAVE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError` **BAKE_ERROR_NO_SAVE_PATH** = ``2`` + +Lightmap baking failed as the :ref:`LightmapGIData` save path isn't configured in the resource. + +.. _class_LightmapGI_constant_BAKE_ERROR_NO_MESHES: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError` **BAKE_ERROR_NO_MESHES** = ``3`` + +Lightmap baking failed as there are no meshes whose :ref:`GeometryInstance3D.gi_mode` is :ref:`GeometryInstance3D.GI_MODE_STATIC` and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly. + +.. _class_LightmapGI_constant_BAKE_ERROR_MESHES_INVALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError` **BAKE_ERROR_MESHES_INVALID** = ``4`` + +Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking. + +.. _class_LightmapGI_constant_BAKE_ERROR_CANT_CREATE_IMAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError` **BAKE_ERROR_CANT_CREATE_IMAGE** = ``5`` + +Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved. + +.. _class_LightmapGI_constant_BAKE_ERROR_USER_ABORTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError` **BAKE_ERROR_USER_ABORTED** = ``6`` + +The user aborted the lightmap baking operation (typically by clicking the **Cancel** button in the progress dialog). + +.. rst-class:: classref-item-separator ---- .. _enum_LightmapGI_EnvironmentMode: -.. _class_LightmapGI_constant_ENVIRONMENT_MODE_DISABLED: - -.. _class_LightmapGI_constant_ENVIRONMENT_MODE_SCENE: - -.. _class_LightmapGI_constant_ENVIRONMENT_MODE_CUSTOM_SKY: - -.. _class_LightmapGI_constant_ENVIRONMENT_MODE_CUSTOM_COLOR: +.. rst-class:: classref-enumeration enum **EnvironmentMode**: -- **ENVIRONMENT_MODE_DISABLED** = **0** --- Ignore environment lighting when baking lightmaps. +.. _class_LightmapGI_constant_ENVIRONMENT_MODE_DISABLED: -- **ENVIRONMENT_MODE_SCENE** = **1** --- Use the scene's environment lighting when baking lightmaps. +.. rst-class:: classref-enumeration-constant -\ **Note:** If baking lightmaps in a scene with no :ref:`WorldEnvironment` node, this will act like :ref:`ENVIRONMENT_MODE_DISABLED`. The editor's preview sky and sun is *not* taken into account by ``LightmapGI`` when baking lightmaps. +:ref:`EnvironmentMode` **ENVIRONMENT_MODE_DISABLED** = ``0`` -- **ENVIRONMENT_MODE_CUSTOM_SKY** = **2** --- Use :ref:`environment_custom_sky` as a source of environment lighting when baking lightmaps. +Ignore environment lighting when baking lightmaps. -- **ENVIRONMENT_MODE_CUSTOM_COLOR** = **3** --- Use :ref:`environment_custom_color` multiplied by :ref:`environment_custom_energy` as a constant source of environment lighting when baking lightmaps. +.. _class_LightmapGI_constant_ENVIRONMENT_MODE_SCENE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentMode` **ENVIRONMENT_MODE_SCENE** = ``1`` + +Use the scene's environment lighting when baking lightmaps. + +\ **Note:** If baking lightmaps in a scene with no :ref:`WorldEnvironment` node, this will act like :ref:`ENVIRONMENT_MODE_DISABLED`. The editor's preview sky and sun is *not* taken into account by **LightmapGI** when baking lightmaps. + +.. _class_LightmapGI_constant_ENVIRONMENT_MODE_CUSTOM_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentMode` **ENVIRONMENT_MODE_CUSTOM_SKY** = ``2`` + +Use :ref:`environment_custom_sky` as a source of environment lighting when baking lightmaps. + +.. _class_LightmapGI_constant_ENVIRONMENT_MODE_CUSTOM_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentMode` **ENVIRONMENT_MODE_CUSTOM_COLOR** = ``3`` + +Use :ref:`environment_custom_color` multiplied by :ref:`environment_custom_energy` as a constant source of environment lighting when baking lightmaps. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_LightmapGI_property_bias: -- :ref:`float` **bias** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.0005`` | -+-----------+-----------------+ -| *Setter* | set_bias(value) | -+-----------+-----------------+ -| *Getter* | get_bias() | -+-----------+-----------------+ +:ref:`float` **bias** = ``0.0005`` + +.. rst-class:: classref-property-setget + +- void **set_bias** **(** :ref:`float` value **)** +- :ref:`float` **get_bias** **(** **)** The bias to use when computing shadows. Increasing :ref:`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` shadows are not affected by this :ref:`bias` property. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_bounces: -- :ref:`int` **bounces** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``3`` | -+-----------+--------------------+ -| *Setter* | set_bounces(value) | -+-----------+--------------------+ -| *Getter* | get_bounces() | -+-----------+--------------------+ +:ref:`int` **bounces** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_bounces** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_camera_attributes: -- :ref:`CameraAttributes` **camera_attributes** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_camera_attributes(value) | -+----------+------------------------------+ -| *Getter* | get_camera_attributes() | -+----------+------------------------------+ +:ref:`CameraAttributes` **camera_attributes** -The :ref:`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. +.. rst-class:: classref-property-setget + +- void **set_camera_attributes** **(** :ref:`CameraAttributes` value **)** +- :ref:`CameraAttributes` **get_camera_attributes** **(** **)** + +The :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_LightmapGI_property_directional: -- :ref:`bool` **directional** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_directional(value) | -+-----------+------------------------+ -| *Getter* | is_directional() | -+-----------+------------------------+ +:ref:`bool` **directional** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_directional** **(** :ref:`bool` value **)** +- :ref:`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` set to :ref:`Light3D.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. \ **Note:** The property's name has no relationship with :ref:`DirectionalLight3D`. :ref:`directional` works with all light types. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_environment_custom_color: -- :ref:`Color` **environment_custom_color** +.. rst-class:: classref-property -+----------+-------------------------------------+ -| *Setter* | set_environment_custom_color(value) | -+----------+-------------------------------------+ -| *Getter* | get_environment_custom_color() | -+----------+-------------------------------------+ +:ref:`Color` **environment_custom_color** + +.. rst-class:: classref-property-setget + +- void **set_environment_custom_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_environment_custom_color** **(** **)** The color to use for environment lighting. Only effective if :ref:`environment_mode` is :ref:`ENVIRONMENT_MODE_CUSTOM_COLOR`. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_environment_custom_energy: -- :ref:`float` **environment_custom_energy** +.. rst-class:: classref-property -+----------+--------------------------------------+ -| *Setter* | set_environment_custom_energy(value) | -+----------+--------------------------------------+ -| *Getter* | get_environment_custom_energy() | -+----------+--------------------------------------+ +:ref:`float` **environment_custom_energy** + +.. rst-class:: classref-property-setget + +- void **set_environment_custom_energy** **(** :ref:`float` value **)** +- :ref:`float` **get_environment_custom_energy** **(** **)** The color multiplier to use for environment lighting. Only effective if :ref:`environment_mode` is :ref:`ENVIRONMENT_MODE_CUSTOM_COLOR`. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_environment_custom_sky: -- :ref:`Sky` **environment_custom_sky** +.. rst-class:: classref-property -+----------+-----------------------------------+ -| *Setter* | set_environment_custom_sky(value) | -+----------+-----------------------------------+ -| *Getter* | get_environment_custom_sky() | -+----------+-----------------------------------+ +:ref:`Sky` **environment_custom_sky** + +.. rst-class:: classref-property-setget + +- void **set_environment_custom_sky** **(** :ref:`Sky` value **)** +- :ref:`Sky` **get_environment_custom_sky** **(** **)** The sky to use as a source of environment lighting. Only effective if :ref:`environment_mode` is :ref:`ENVIRONMENT_MODE_CUSTOM_SKY`. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_environment_mode: -- :ref:`EnvironmentMode` **environment_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------+ -| *Setter* | set_environment_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_environment_mode() | -+-----------+-----------------------------+ +:ref:`EnvironmentMode` **environment_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_environment_mode** **(** :ref:`EnvironmentMode` value **)** +- :ref:`EnvironmentMode` **get_environment_mode** **(** **)** The environment mode to use when baking lightmaps. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_generate_probes_subdiv: -- :ref:`GenerateProbes` **generate_probes_subdiv** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``2`` | -+-----------+----------------------------+ -| *Setter* | set_generate_probes(value) | -+-----------+----------------------------+ -| *Getter* | get_generate_probes() | -+-----------+----------------------------+ +:ref:`GenerateProbes` **generate_probes_subdiv** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_generate_probes** **(** :ref:`GenerateProbes` value **)** +- :ref:`GenerateProbes` **get_generate_probes** **(** **)** The level of subdivision to use when automatically generating :ref:`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. @@ -312,83 +440,90 @@ The level of subdivision to use when automatically generating :ref:`LightmapProb \ **Note:** Regardless of :ref:`generate_probes_subdiv`, direct lighting on dynamic objects is always applied using :ref:`Light3D` nodes in real-time. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_interior: -- :ref:`bool` **interior** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_interior(value) | -+-----------+---------------------+ -| *Getter* | is_interior() | -+-----------+---------------------+ +:ref:`bool` **interior** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_interior** **(** :ref:`bool` value **)** +- :ref:`bool` **is_interior** **(** **)** If ``true``, ignore environment lighting when baking lightmaps. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_light_data: -- :ref:`LightmapGIData` **light_data** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_light_data(value) | -+----------+-----------------------+ -| *Getter* | get_light_data() | -+----------+-----------------------+ +:ref:`LightmapGIData` **light_data** -The :ref:`LightmapGIData` associated to this ``LightmapGI`` node. This resource is automatically created after baking, and is not meant to be created manually. +.. rst-class:: classref-property-setget + +- void **set_light_data** **(** :ref:`LightmapGIData` value **)** +- :ref:`LightmapGIData` **get_light_data** **(** **)** + +The :ref:`LightmapGIData` associated to this **LightmapGI** node. This resource is automatically created after baking, and is not meant to be created manually. + +.. rst-class:: classref-item-separator ---- .. _class_LightmapGI_property_max_texture_size: -- :ref:`int` **max_texture_size** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``16384`` | -+-----------+-----------------------------+ -| *Setter* | set_max_texture_size(value) | -+-----------+-----------------------------+ -| *Getter* | get_max_texture_size() | -+-----------+-----------------------------+ +:ref:`int` **max_texture_size** = ``16384`` + +.. rst-class:: classref-property-setget + +- void **set_max_texture_size** **(** :ref:`int` value **)** +- :ref:`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` at its default value of ``16384`` if unsure. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_quality: -- :ref:`BakeQuality` **quality** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_bake_quality(value) | -+-----------+-------------------------+ -| *Getter* | get_bake_quality() | -+-----------+-------------------------+ +:ref:`BakeQuality` **quality** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_bake_quality** **(** :ref:`BakeQuality` value **)** +- :ref:`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. To further speed up bake times, decrease :ref:`bounces`, disable :ref:`use_denoiser` and increase the lightmap texel size on 3D scenes in the Import doc. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGI_property_use_denoiser: -- :ref:`bool` **use_denoiser** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_use_denoiser(value) | -+-----------+-------------------------+ -| *Getter* | is_using_denoiser() | -+-----------+-------------------------+ +:ref:`bool` **use_denoiser** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_denoiser** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_denoiser** **(** **)** 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. diff --git a/classes/class_lightmapgidata.rst b/classes/class_lightmapgidata.rst index 793b6b4b9..4f8d595a4 100644 --- a/classes/class_lightmapgidata.rst +++ b/classes/class_lightmapgidata.rst @@ -14,100 +14,147 @@ LightmapGIData Contains baked lightmap and dynamic object probe data for :ref:`LightmapGI`. +.. rst-class:: classref-introduction-group + Description ----------- -``LightmapGIData`` contains baked lightmap and dynamic object probe data for :ref:`LightmapGI`. It is replaced every time lightmaps are baked in :ref:`LightmapGI`. +**LightmapGIData** contains baked lightmap and dynamic object probe data for :ref:`LightmapGI`. It is replaced every time lightmaps are baked in :ref:`LightmapGI`. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------------------------+-------------------------------------------------------------------+ -| :ref:`TextureLayered` | :ref:`light_texture` | -+---------------------------------------------+-------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+-------------------------------------------------------------------+ + | :ref:`TextureLayered` | :ref:`light_texture` | + +---------------------------------------------+-------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_user` **(** :ref:`NodePath` path, :ref:`Rect2` uv_scale, :ref:`int` slice_index, :ref:`int` sub_instance **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_users` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_user_count` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_user_path` **(** :ref:`int` user_idx **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_using_spherical_harmonics` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_uses_spherical_harmonics` **(** :ref:`bool` uses_spherical_harmonics **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_user` **(** :ref:`NodePath` path, :ref:`Rect2` uv_scale, :ref:`int` slice_index, :ref:`int` sub_instance **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_users` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_user_count` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_user_path` **(** :ref:`int` user_idx **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_spherical_harmonics` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_uses_spherical_harmonics` **(** :ref:`bool` uses_spherical_harmonics **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_LightmapGIData_property_light_texture: -- :ref:`TextureLayered` **light_texture** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_light_texture(value) | -+----------+--------------------------+ -| *Getter* | get_light_texture() | -+----------+--------------------------+ +:ref:`TextureLayered` **light_texture** + +.. rst-class:: classref-property-setget + +- void **set_light_texture** **(** :ref:`TextureLayered` value **)** +- :ref:`TextureLayered` **get_light_texture** **(** **)** The lightmap atlas texture generated by the lightmapper. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_LightmapGIData_method_add_user: -- void **add_user** **(** :ref:`NodePath` path, :ref:`Rect2` uv_scale, :ref:`int` slice_index, :ref:`int` sub_instance **)** +.. rst-class:: classref-method -Adds an object that is considered baked within this ``LightmapGIData``. +void **add_user** **(** :ref:`NodePath` path, :ref:`Rect2` uv_scale, :ref:`int` slice_index, :ref:`int` sub_instance **)** + +Adds an object that is considered baked within this **LightmapGIData**. + +.. rst-class:: classref-item-separator ---- .. _class_LightmapGIData_method_clear_users: -- void **clear_users** **(** **)** +.. rst-class:: classref-method -Clear all objects that are considered baked within this ``LightmapGIData``. +void **clear_users** **(** **)** + +Clear all objects that are considered baked within this **LightmapGIData**. + +.. rst-class:: classref-item-separator ---- .. _class_LightmapGIData_method_get_user_count: -- :ref:`int` **get_user_count** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of objects that are considered baked within this ``LightmapGIData``. +:ref:`int` **get_user_count** **(** **)** |const| + +Returns the number of objects that are considered baked within this **LightmapGIData**. + +.. rst-class:: classref-item-separator ---- .. _class_LightmapGIData_method_get_user_path: -- :ref:`NodePath` **get_user_path** **(** :ref:`int` user_idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_user_path** **(** :ref:`int` user_idx **)** |const| Returns the :ref:`NodePath` of the baked object at index ``user_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGIData_method_is_using_spherical_harmonics: -- :ref:`bool` **is_using_spherical_harmonics** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_using_spherical_harmonics** **(** **)** |const| If ``true``, lightmaps were baked with directional information. See also :ref:`LightmapGI.directional`. +.. rst-class:: classref-item-separator + ---- .. _class_LightmapGIData_method_set_uses_spherical_harmonics: -- void **set_uses_spherical_harmonics** **(** :ref:`bool` uses_spherical_harmonics **)** +.. rst-class:: classref-method + +void **set_uses_spherical_harmonics** **(** :ref:`bool` 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. -\ **Note:** Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire ``LightmapGIData`` resource is replaced by the lightmapper. +\ **Note:** Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire **LightmapGIData** resource is replaced by the lightmapper. .. |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.)` diff --git a/classes/class_lightmapper.rst b/classes/class_lightmapper.rst index 80399671c..54824469c 100644 --- a/classes/class_lightmapper.rst +++ b/classes/class_lightmapper.rst @@ -16,6 +16,8 @@ Lightmapper Abstract class extended by lightmappers, for use in :ref:`LightmapGI`. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_lightmapperrd.rst b/classes/class_lightmapperrd.rst index c7530984f..b9d5023d7 100644 --- a/classes/class_lightmapperrd.rst +++ b/classes/class_lightmapperrd.rst @@ -14,6 +14,8 @@ LightmapperRD The built-in GPU-based lightmapper for use with :ref:`LightmapGI`. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_lightmapprobe.rst b/classes/class_lightmapprobe.rst index 943878046..3a6c0b978 100644 --- a/classes/class_lightmapprobe.rst +++ b/classes/class_lightmapprobe.rst @@ -14,12 +14,14 @@ LightmapProbe Represents a single manually placed probe for dynamic object lighting with :ref:`LightmapGI`. +.. rst-class:: classref-introduction-group + Description ----------- -``LightmapProbe`` represents the position of a single manually placed probe for dynamic object lighting with :ref:`LightmapGI`. +**LightmapProbe** represents the position of a single manually placed probe for dynamic object lighting with :ref:`LightmapGI`. -Typically, :ref:`LightmapGI` probes are placed automatically by setting :ref:`LightmapGI.generate_probes_subdiv` to a value other than :ref:`LightmapGI.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. +Typically, :ref:`LightmapGI` probes are placed automatically by setting :ref:`LightmapGI.generate_probes_subdiv` to a value other than :ref:`LightmapGI.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. .. |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.)` diff --git a/classes/class_lightoccluder2d.rst b/classes/class_lightoccluder2d.rst index d9d512b4d..f92bf9d83 100644 --- a/classes/class_lightoccluder2d.rst +++ b/classes/class_lightoccluder2d.rst @@ -14,71 +14,89 @@ LightOccluder2D Occludes light cast by a Light2D, casting shadows. +.. rst-class:: classref-introduction-group + Description ----------- Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an :ref:`OccluderPolygon2D` in order for the shadow to be computed. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`OccluderPolygon2D` | :ref:`occluder` | | -+---------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`occluder_light_mask` | ``1`` | -+---------------------------------------------------+--------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`sdf_collision` | ``true`` | -+---------------------------------------------------+--------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`OccluderPolygon2D` | :ref:`occluder` | | + +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`occluder_light_mask` | ``1`` | + +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`sdf_collision` | ``true`` | + +---------------------------------------------------+--------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_LightOccluder2D_property_occluder: -- :ref:`OccluderPolygon2D` **occluder** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_occluder_polygon(value) | -+----------+-----------------------------+ -| *Getter* | get_occluder_polygon() | -+----------+-----------------------------+ +:ref:`OccluderPolygon2D` **occluder** + +.. rst-class:: classref-property-setget + +- void **set_occluder_polygon** **(** :ref:`OccluderPolygon2D` value **)** +- :ref:`OccluderPolygon2D` **get_occluder_polygon** **(** **)** The :ref:`OccluderPolygon2D` used to compute the shadow. +.. rst-class:: classref-item-separator + ---- .. _class_LightOccluder2D_property_occluder_light_mask: -- :ref:`int` **occluder_light_mask** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------------+ -| *Setter* | set_occluder_light_mask(value) | -+-----------+--------------------------------+ -| *Getter* | get_occluder_light_mask() | -+-----------+--------------------------------+ +:ref:`int` **occluder_light_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_occluder_light_mask** **(** :ref:`int` value **)** +- :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_LightOccluder2D_property_sdf_collision: -- :ref:`bool` **sdf_collision** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_as_sdf_collision(value) | -+-----------+-----------------------------+ -| *Getter* | is_set_as_sdf_collision() | -+-----------+-----------------------------+ +:ref:`bool` **sdf_collision** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_as_sdf_collision** **(** :ref:`bool` value **)** +- :ref:`bool` **is_set_as_sdf_collision** **(** **)** .. container:: contribute diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 8ad0c4031..482e6bcb1 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -14,11 +14,15 @@ Line2D A 2D line. +.. rst-class:: classref-introduction-group + Description ----------- A line through several points in 2D space. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,364 +30,477 @@ Tutorials - `2.5D Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`antialiased` | ``false`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`LineCapMode` | :ref:`begin_cap_mode` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`default_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`LineCapMode` | :ref:`end_cap_mode` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`Gradient` | :ref:`gradient` | | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`LineJointMode` | :ref:`joint_mode` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`points` | ``PackedVector2Array()`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`round_precision` | ``8`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`float` | :ref:`sharp_limit` | ``2.0`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`LineTextureMode` | :ref:`texture_mode` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`float` | :ref:`width` | ``10.0`` | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ -| :ref:`Curve` | :ref:`width_curve` | | -+-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`antialiased` | ``false`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`LineCapMode` | :ref:`begin_cap_mode` | ``0`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`default_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`LineCapMode` | :ref:`end_cap_mode` | ``0`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`Gradient` | :ref:`gradient` | | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`LineJointMode` | :ref:`joint_mode` | ``0`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`points` | ``PackedVector2Array()`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`round_precision` | ``8`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`sharp_limit` | ``2.0`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`LineTextureMode` | :ref:`texture_mode` | ``0`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`width` | ``10.0`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`Curve` | :ref:`width_curve` | | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`int` index=-1 **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_points` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` index **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` index **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` index, :ref:`Vector2` position **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`int` index=-1 **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_points` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_point_count` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` index **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_point` **(** :ref:`int` index **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_position` **(** :ref:`int` index, :ref:`Vector2` position **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Line2D_LineJointMode: -.. _class_Line2D_constant_LINE_JOINT_SHARP: - -.. _class_Line2D_constant_LINE_JOINT_BEVEL: - -.. _class_Line2D_constant_LINE_JOINT_ROUND: +.. rst-class:: classref-enumeration enum **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. +.. _class_Line2D_constant_LINE_JOINT_SHARP: -- **LINE_JOINT_BEVEL** = **1** --- The line's joints will be bevelled/chamfered. +.. rst-class:: classref-enumeration-constant -- **LINE_JOINT_ROUND** = **2** --- The line's joints will be rounded. +:ref:`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. + +.. _class_Line2D_constant_LINE_JOINT_BEVEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineJointMode` **LINE_JOINT_BEVEL** = ``1`` + +The line's joints will be bevelled/chamfered. + +.. _class_Line2D_constant_LINE_JOINT_ROUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineJointMode` **LINE_JOINT_ROUND** = ``2`` + +The line's joints will be rounded. + +.. rst-class:: classref-item-separator ---- .. _enum_Line2D_LineCapMode: -.. _class_Line2D_constant_LINE_CAP_NONE: - -.. _class_Line2D_constant_LINE_CAP_BOX: - -.. _class_Line2D_constant_LINE_CAP_ROUND: +.. rst-class:: classref-enumeration enum **LineCapMode**: -- **LINE_CAP_NONE** = **0** --- Don't draw a line cap. +.. _class_Line2D_constant_LINE_CAP_NONE: -- **LINE_CAP_BOX** = **1** --- Draws the line cap as a box. +.. rst-class:: classref-enumeration-constant -- **LINE_CAP_ROUND** = **2** --- Draws the line cap as a circle. +:ref:`LineCapMode` **LINE_CAP_NONE** = ``0`` + +Don't draw a line cap. + +.. _class_Line2D_constant_LINE_CAP_BOX: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineCapMode` **LINE_CAP_BOX** = ``1`` + +Draws the line cap as a box. + +.. _class_Line2D_constant_LINE_CAP_ROUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineCapMode` **LINE_CAP_ROUND** = ``2`` + +Draws the line cap as a circle. + +.. rst-class:: classref-item-separator ---- .. _enum_Line2D_LineTextureMode: -.. _class_Line2D_constant_LINE_TEXTURE_NONE: - -.. _class_Line2D_constant_LINE_TEXTURE_TILE: - -.. _class_Line2D_constant_LINE_TEXTURE_STRETCH: +.. rst-class:: classref-enumeration enum **LineTextureMode**: -- **LINE_TEXTURE_NONE** = **0** --- Takes the left pixels of the texture and renders it over the whole line. +.. _class_Line2D_constant_LINE_TEXTURE_NONE: -- **LINE_TEXTURE_TILE** = **1** --- Tiles the texture over the line. :ref:`CanvasItem.texture_repeat` of the ``Line2D`` node must be :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED` or :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR` for it to work properly. +.. rst-class:: classref-enumeration-constant -- **LINE_TEXTURE_STRETCH** = **2** --- Stretches the texture across the line. :ref:`CanvasItem.texture_repeat` of the ``Line2D`` node must be :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED` for best results. +:ref:`LineTextureMode` **LINE_TEXTURE_NONE** = ``0`` + +Takes the left pixels of the texture and renders it over the whole line. + +.. _class_Line2D_constant_LINE_TEXTURE_TILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineTextureMode` **LINE_TEXTURE_TILE** = ``1`` + +Tiles the texture over the line. :ref:`CanvasItem.texture_repeat` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED` or :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR` for it to work properly. + +.. _class_Line2D_constant_LINE_TEXTURE_STRETCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineTextureMode` **LINE_TEXTURE_STRETCH** = ``2`` + +Stretches the texture across the line. :ref:`CanvasItem.texture_repeat` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED` for best results. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Line2D_property_antialiased: -- :ref:`bool` **antialiased** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_antialiased(value) | -+-----------+------------------------+ -| *Getter* | get_antialiased() | -+-----------+------------------------+ +:ref:`bool` **antialiased** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_antialiased** **(** :ref:`bool` value **)** +- :ref:`bool` **get_antialiased** **(** **)** If ``true``, the line's border will be anti-aliased. \ **Note:** Line2D is not accelerated by batching when being anti-aliased. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_begin_cap_mode: -- :ref:`LineCapMode` **begin_cap_mode** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_begin_cap_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_begin_cap_mode() | -+-----------+---------------------------+ +:ref:`LineCapMode` **begin_cap_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_begin_cap_mode** **(** :ref:`LineCapMode` value **)** +- :ref:`LineCapMode` **get_begin_cap_mode** **(** **)** Controls the style of the line's first point. Use :ref:`LineCapMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_default_color: -- :ref:`Color` **default_color** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_default_color(value) | -+-----------+--------------------------+ -| *Getter* | get_default_color() | -+-----------+--------------------------+ +:ref:`Color` **default_color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_default_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_default_color** **(** **)** The line's color. Will not be used if a gradient is set. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_end_cap_mode: -- :ref:`LineCapMode` **end_cap_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_end_cap_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_end_cap_mode() | -+-----------+-------------------------+ +:ref:`LineCapMode` **end_cap_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_end_cap_mode** **(** :ref:`LineCapMode` value **)** +- :ref:`LineCapMode` **get_end_cap_mode** **(** **)** Controls the style of the line's last point. Use :ref:`LineCapMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_gradient: -- :ref:`Gradient` **gradient** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_gradient(value) | -+----------+---------------------+ -| *Getter* | get_gradient() | -+----------+---------------------+ +:ref:`Gradient` **gradient** + +.. rst-class:: classref-property-setget + +- void **set_gradient** **(** :ref:`Gradient` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_joint_mode: -- :ref:`LineJointMode` **joint_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_joint_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_joint_mode() | -+-----------+-----------------------+ +:ref:`LineJointMode` **joint_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_joint_mode** **(** :ref:`LineJointMode` value **)** +- :ref:`LineJointMode` **get_joint_mode** **(** **)** The style for the points between the start and the end. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_points: -- :ref:`PackedVector2Array` **points** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_points(value) | -+-----------+--------------------------+ -| *Getter* | get_points() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **points** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_points** **(** :ref:`PackedVector2Array` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_round_precision: -- :ref:`int` **round_precision** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``8`` | -+-----------+----------------------------+ -| *Setter* | set_round_precision(value) | -+-----------+----------------------------+ -| *Getter* | get_round_precision() | -+-----------+----------------------------+ +:ref:`int` **round_precision** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_round_precision** **(** :ref:`int` value **)** +- :ref:`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. \ **Note:** The default value is tuned for lines with the default :ref:`width`. For thin lines, this value should be reduced to a number between ``2`` and ``4`` to improve performance. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_sharp_limit: -- :ref:`float` **sharp_limit** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``2.0`` | -+-----------+------------------------+ -| *Setter* | set_sharp_limit(value) | -+-----------+------------------------+ -| *Getter* | get_sharp_limit() | -+-----------+------------------------+ +:ref:`float` **sharp_limit** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_sharp_limit** **(** :ref:`float` value **)** +- :ref:`float` **get_sharp_limit** **(** **)** The direction difference in radians between vector points. This value is only used if :ref:`joint_mode` is set to :ref:`LINE_JOINT_SHARP`. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The texture used for the line's texture. Uses ``texture_mode`` for drawing style. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_texture_mode: -- :ref:`LineTextureMode` **texture_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_texture_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_texture_mode() | -+-----------+-------------------------+ +:ref:`LineTextureMode` **texture_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_mode** **(** :ref:`LineTextureMode` value **)** +- :ref:`LineTextureMode` **get_texture_mode** **(** **)** The style to render the ``texture`` on the line. Use :ref:`LineTextureMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_width: -- :ref:`float` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``10.0`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`float` **width** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`float` value **)** +- :ref:`float` **get_width** **(** **)** The line's width. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_property_width_curve: -- :ref:`Curve` **width_curve** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_curve(value) | -+----------+------------------+ -| *Getter* | get_curve() | -+----------+------------------+ +:ref:`Curve` **width_curve** + +.. rst-class:: classref-property-setget + +- void **set_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_curve** **(** **)** The line's width varies with the curve. The original width is simply multiply by the value of the Curve. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Line2D_method_add_point: -- void **add_point** **(** :ref:`Vector2` position, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +void **add_point** **(** :ref:`Vector2` position, :ref:`int` index=-1 **)** 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. 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_method_clear_points: -- void **clear_points** **(** **)** +.. rst-class:: classref-method + +void **clear_points** **(** **)** Removes all points from the line. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_method_get_point_count: -- :ref:`int` **get_point_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_point_count** **(** **)** |const| Returns the number of points in the line. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_method_get_point_position: -- :ref:`Vector2` **get_point_position** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_point_position** **(** :ref:`int` index **)** |const| Returns the position of the point at index ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_method_remove_point: -- void **remove_point** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_point** **(** :ref:`int` index **)** Removes the point at index ``index`` from the line. +.. rst-class:: classref-item-separator + ---- .. _class_Line2D_method_set_point_position: -- void **set_point_position** **(** :ref:`int` index, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_point_position** **(** :ref:`int` index, :ref:`Vector2` position **)** Overwrites the position of the point at index ``index`` with the supplied ``position``. diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 8d813b4fc..fe6957496 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -14,6 +14,8 @@ LineEdit Control that provides single-line string editing. +.. rst-class:: classref-introduction-group + Description ----------- @@ -63,581 +65,791 @@ On macOS, some extra keyboard shortcuts are available: - :kbd:`Cmd + Right Arrow`: Same as :kbd:`End`, move the caret to the end of the line +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_blink` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`caret_column` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_force_displayed` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`clear_button_enabled` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_control_chars` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editable` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`expand_to_text_length` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`flat` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_length` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`placeholder_text` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`right_icon` | | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`secret` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`secret_character` | ``"•"`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`select_all_on_focus` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`selecting_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`VirtualKeyboardType` | :ref:`virtual_keyboard_type` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_blink` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`caret_column` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_force_displayed` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clear_button_enabled` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_control_chars` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editable` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`expand_to_text_length` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`flat` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_length` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`placeholder_text` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`right_icon` | | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`secret` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`secret_character` | ``"•"`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_all_on_focus` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selecting_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`VirtualKeyboardType` | :ref:`virtual_keyboard_type` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delete_char_at_caret` **(** **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delete_text` **(** :ref:`int` from_column, :ref:`int` to_column **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect` **(** **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_scroll_offset` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_from_column` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_to_column` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_selection` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`insert_text_at_caret` **(** :ref:`String` text **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`menu_option` **(** :ref:`int` option **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` from=0, :ref:`int` to=-1 **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select_all` **(** **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`delete_char_at_caret` **(** **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`delete_text` **(** :ref:`int` from_column, :ref:`int` to_column **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_scroll_offset` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from_column` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to_column` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_selection` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`insert_text_at_caret` **(** :ref:`String` text **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`menu_option` **(** :ref:`int` option **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select` **(** :ref:`int` from=0, :ref:`int` to=-1 **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_all` **(** **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`caret_color` | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`clear_button_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`clear_button_color_pressed` | ``Color(1, 1, 1, 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_selected_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_uneditable_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`selection_color` | ``Color(0.5, 0.5, 0.5, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`caret_width` | ``1`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`minimum_character_width` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`clear` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`normal` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`read_only` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`caret_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`clear_button_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`clear_button_color_pressed` | ``Color(1, 1, 1, 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_selected_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_uneditable_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`selection_color` | ``Color(0.5, 0.5, 0.5, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`caret_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`minimum_character_width` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`clear` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`read_only` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_LineEdit_signal_text_change_rejected: -- **text_change_rejected** **(** :ref:`String` rejected_substring **)** +.. rst-class:: classref-signal + +**text_change_rejected** **(** :ref:`String` rejected_substring **)** Emitted when appending text that overflows the :ref:`max_length`. The appended text is truncated to fit :ref:`max_length`, and the part that couldn't fit is passed as the ``rejected_substring`` argument. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_signal_text_changed: -- **text_changed** **(** :ref:`String` new_text **)** +.. rst-class:: classref-signal + +**text_changed** **(** :ref:`String` new_text **)** Emitted when the text changes. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_signal_text_submitted: -- **text_submitted** **(** :ref:`String` new_text **)** +.. rst-class:: classref-signal -Emitted when the user presses :ref:`@GlobalScope.KEY_ENTER` on the ``LineEdit``. +**text_submitted** **(** :ref:`String` new_text **)** + +Emitted when the user presses :ref:`@GlobalScope.KEY_ENTER` on the **LineEdit**. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_LineEdit_MenuItems: -.. _class_LineEdit_constant_MENU_CUT: - -.. _class_LineEdit_constant_MENU_COPY: - -.. _class_LineEdit_constant_MENU_PASTE: - -.. _class_LineEdit_constant_MENU_CLEAR: - -.. _class_LineEdit_constant_MENU_SELECT_ALL: - -.. _class_LineEdit_constant_MENU_UNDO: - -.. _class_LineEdit_constant_MENU_REDO: - -.. _class_LineEdit_constant_MENU_DIR_INHERITED: - -.. _class_LineEdit_constant_MENU_DIR_AUTO: - -.. _class_LineEdit_constant_MENU_DIR_LTR: - -.. _class_LineEdit_constant_MENU_DIR_RTL: - -.. _class_LineEdit_constant_MENU_DISPLAY_UCC: - -.. _class_LineEdit_constant_MENU_INSERT_LRM: - -.. _class_LineEdit_constant_MENU_INSERT_RLM: - -.. _class_LineEdit_constant_MENU_INSERT_LRE: - -.. _class_LineEdit_constant_MENU_INSERT_RLE: - -.. _class_LineEdit_constant_MENU_INSERT_LRO: - -.. _class_LineEdit_constant_MENU_INSERT_RLO: - -.. _class_LineEdit_constant_MENU_INSERT_PDF: - -.. _class_LineEdit_constant_MENU_INSERT_ALM: - -.. _class_LineEdit_constant_MENU_INSERT_LRI: - -.. _class_LineEdit_constant_MENU_INSERT_RLI: - -.. _class_LineEdit_constant_MENU_INSERT_FSI: - -.. _class_LineEdit_constant_MENU_INSERT_PDI: - -.. _class_LineEdit_constant_MENU_INSERT_ZWJ: - -.. _class_LineEdit_constant_MENU_INSERT_ZWNJ: - -.. _class_LineEdit_constant_MENU_INSERT_WJ: - -.. _class_LineEdit_constant_MENU_INSERT_SHY: - -.. _class_LineEdit_constant_MENU_MAX: +.. rst-class:: classref-enumeration enum **MenuItems**: -- **MENU_CUT** = **0** --- Cuts (copies and clears) the selected text. +.. _class_LineEdit_constant_MENU_CUT: -- **MENU_COPY** = **1** --- Copies the selected text. +.. rst-class:: classref-enumeration-constant -- **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the caret's position). +:ref:`MenuItems` **MENU_CUT** = ``0`` + +Cuts (copies and clears) the selected text. + +.. _class_LineEdit_constant_MENU_COPY: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_COPY** = ``1`` + +Copies the selected text. + +.. _class_LineEdit_constant_MENU_PASTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_PASTE** = ``2`` + +Pastes the clipboard text over the selected text (or at the caret's position). Non-printable escape characters are automatically stripped from the OS clipboard via :ref:`String.strip_escapes`. -- **MENU_CLEAR** = **3** --- Erases the whole ``LineEdit`` text. +.. _class_LineEdit_constant_MENU_CLEAR: -- **MENU_SELECT_ALL** = **4** --- Selects the whole ``LineEdit`` text. +.. rst-class:: classref-enumeration-constant -- **MENU_UNDO** = **5** --- Undoes the previous action. +:ref:`MenuItems` **MENU_CLEAR** = ``3`` -- **MENU_REDO** = **6** --- Reverse the last undo action. +Erases the whole **LineEdit** text. -- **MENU_DIR_INHERITED** = **7** --- Sets text direction to inherited. +.. _class_LineEdit_constant_MENU_SELECT_ALL: -- **MENU_DIR_AUTO** = **8** --- Sets text direction to automatic. +.. rst-class:: classref-enumeration-constant -- **MENU_DIR_LTR** = **9** --- Sets text direction to left-to-right. +:ref:`MenuItems` **MENU_SELECT_ALL** = ``4`` -- **MENU_DIR_RTL** = **10** --- Sets text direction to right-to-left. +Selects the whole **LineEdit** text. -- **MENU_DISPLAY_UCC** = **11** --- Toggles control character display. +.. _class_LineEdit_constant_MENU_UNDO: -- **MENU_INSERT_LRM** = **12** --- Inserts left-to-right mark (LRM) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_RLM** = **13** --- Inserts right-to-left mark (RLM) character. +:ref:`MenuItems` **MENU_UNDO** = ``5`` -- **MENU_INSERT_LRE** = **14** --- Inserts start of left-to-right embedding (LRE) character. +Undoes the previous action. -- **MENU_INSERT_RLE** = **15** --- Inserts start of right-to-left embedding (RLE) character. +.. _class_LineEdit_constant_MENU_REDO: -- **MENU_INSERT_LRO** = **16** --- Inserts start of left-to-right override (LRO) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_RLO** = **17** --- Inserts start of right-to-left override (RLO) character. +:ref:`MenuItems` **MENU_REDO** = ``6`` -- **MENU_INSERT_PDF** = **18** --- Inserts pop direction formatting (PDF) character. +Reverse the last undo action. -- **MENU_INSERT_ALM** = **19** --- Inserts Arabic letter mark (ALM) character. +.. _class_LineEdit_constant_MENU_DIR_INHERITED: -- **MENU_INSERT_LRI** = **20** --- Inserts left-to-right isolate (LRI) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_RLI** = **21** --- Inserts right-to-left isolate (RLI) character. +:ref:`MenuItems` **MENU_DIR_INHERITED** = ``7`` -- **MENU_INSERT_FSI** = **22** --- Inserts first strong isolate (FSI) character. +Sets text direction to inherited. -- **MENU_INSERT_PDI** = **23** --- Inserts pop direction isolate (PDI) character. +.. _class_LineEdit_constant_MENU_DIR_AUTO: -- **MENU_INSERT_ZWJ** = **24** --- Inserts zero width joiner (ZWJ) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_ZWNJ** = **25** --- Inserts zero width non-joiner (ZWNJ) character. +:ref:`MenuItems` **MENU_DIR_AUTO** = ``8`` -- **MENU_INSERT_WJ** = **26** --- Inserts word joiner (WJ) character. +Sets text direction to automatic. -- **MENU_INSERT_SHY** = **27** --- Inserts soft hyphen (SHY) character. +.. _class_LineEdit_constant_MENU_DIR_LTR: -- **MENU_MAX** = **28** --- Represents the size of the :ref:`MenuItems` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DIR_LTR** = ``9`` + +Sets text direction to left-to-right. + +.. _class_LineEdit_constant_MENU_DIR_RTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DIR_RTL** = ``10`` + +Sets text direction to right-to-left. + +.. _class_LineEdit_constant_MENU_DISPLAY_UCC: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DISPLAY_UCC** = ``11`` + +Toggles control character display. + +.. _class_LineEdit_constant_MENU_INSERT_LRM: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRM** = ``12`` + +Inserts left-to-right mark (LRM) character. + +.. _class_LineEdit_constant_MENU_INSERT_RLM: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLM** = ``13`` + +Inserts right-to-left mark (RLM) character. + +.. _class_LineEdit_constant_MENU_INSERT_LRE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRE** = ``14`` + +Inserts start of left-to-right embedding (LRE) character. + +.. _class_LineEdit_constant_MENU_INSERT_RLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLE** = ``15`` + +Inserts start of right-to-left embedding (RLE) character. + +.. _class_LineEdit_constant_MENU_INSERT_LRO: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRO** = ``16`` + +Inserts start of left-to-right override (LRO) character. + +.. _class_LineEdit_constant_MENU_INSERT_RLO: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLO** = ``17`` + +Inserts start of right-to-left override (RLO) character. + +.. _class_LineEdit_constant_MENU_INSERT_PDF: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_PDF** = ``18`` + +Inserts pop direction formatting (PDF) character. + +.. _class_LineEdit_constant_MENU_INSERT_ALM: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_ALM** = ``19`` + +Inserts Arabic letter mark (ALM) character. + +.. _class_LineEdit_constant_MENU_INSERT_LRI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRI** = ``20`` + +Inserts left-to-right isolate (LRI) character. + +.. _class_LineEdit_constant_MENU_INSERT_RLI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLI** = ``21`` + +Inserts right-to-left isolate (RLI) character. + +.. _class_LineEdit_constant_MENU_INSERT_FSI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_FSI** = ``22`` + +Inserts first strong isolate (FSI) character. + +.. _class_LineEdit_constant_MENU_INSERT_PDI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_PDI** = ``23`` + +Inserts pop direction isolate (PDI) character. + +.. _class_LineEdit_constant_MENU_INSERT_ZWJ: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_ZWJ** = ``24`` + +Inserts zero width joiner (ZWJ) character. + +.. _class_LineEdit_constant_MENU_INSERT_ZWNJ: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_ZWNJ** = ``25`` + +Inserts zero width non-joiner (ZWNJ) character. + +.. _class_LineEdit_constant_MENU_INSERT_WJ: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_WJ** = ``26`` + +Inserts word joiner (WJ) character. + +.. _class_LineEdit_constant_MENU_INSERT_SHY: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_SHY** = ``27`` + +Inserts soft hyphen (SHY) character. + +.. _class_LineEdit_constant_MENU_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_MAX** = ``28`` + +Represents the size of the :ref:`MenuItems` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_LineEdit_VirtualKeyboardType: -.. _class_LineEdit_constant_KEYBOARD_TYPE_DEFAULT: - -.. _class_LineEdit_constant_KEYBOARD_TYPE_MULTILINE: - -.. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER: - -.. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: - -.. _class_LineEdit_constant_KEYBOARD_TYPE_PHONE: - -.. _class_LineEdit_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: - -.. _class_LineEdit_constant_KEYBOARD_TYPE_PASSWORD: - -.. _class_LineEdit_constant_KEYBOARD_TYPE_URL: +.. rst-class:: classref-enumeration enum **VirtualKeyboardType**: -- **KEYBOARD_TYPE_DEFAULT** = **0** --- Default text virtual keyboard. +.. _class_LineEdit_constant_KEYBOARD_TYPE_DEFAULT: -- **KEYBOARD_TYPE_MULTILINE** = **1** --- Multiline virtual keyboard. +.. rst-class:: classref-enumeration-constant -- **KEYBOARD_TYPE_NUMBER** = **2** --- Virtual number keypad, useful for PIN entry. +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_DEFAULT** = ``0`` -- **KEYBOARD_TYPE_NUMBER_DECIMAL** = **3** --- Virtual number keypad, useful for entering fractional numbers. +Default text virtual keyboard. -- **KEYBOARD_TYPE_PHONE** = **4** --- Virtual phone number keypad. +.. _class_LineEdit_constant_KEYBOARD_TYPE_MULTILINE: -- **KEYBOARD_TYPE_EMAIL_ADDRESS** = **5** --- Virtual keyboard with additional keys to assist with typing email addresses. +.. rst-class:: classref-enumeration-constant -- **KEYBOARD_TYPE_PASSWORD** = **6** --- Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_MULTILINE** = ``1`` + +Multiline virtual keyboard. + +.. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER** = ``2`` + +Virtual number keypad, useful for PIN entry. + +.. _class_LineEdit_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3`` + +Virtual number keypad, useful for entering fractional numbers. + +.. _class_LineEdit_constant_KEYBOARD_TYPE_PHONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PHONE** = ``4`` + +Virtual phone number keypad. + +.. _class_LineEdit_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5`` + +Virtual keyboard with additional keys to assist with typing email addresses. + +.. _class_LineEdit_constant_KEYBOARD_TYPE_PASSWORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PASSWORD** = ``6`` + +Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. \ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT`. -- **KEYBOARD_TYPE_URL** = **7** --- Virtual keyboard with additional keys to assist with typing URLs. +.. _class_LineEdit_constant_KEYBOARD_TYPE_URL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_URL** = ``7`` + +Virtual keyboard with additional keys to assist with typing URLs. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_LineEdit_property_alignment: -- :ref:`HorizontalAlignment` **alignment** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_horizontal_alignment(value) | -+-----------+---------------------------------+ -| *Getter* | get_horizontal_alignment() | -+-----------+---------------------------------+ +:ref:`HorizontalAlignment` **alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`HorizontalAlignment` **get_horizontal_alignment** **(** **)** Text alignment as defined in the :ref:`HorizontalAlignment` enum. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_caret_blink: -- :ref:`bool` **caret_blink** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_caret_blink_enabled(value) | -+-----------+--------------------------------+ -| *Getter* | is_caret_blink_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **caret_blink** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_caret_blink_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_caret_blink_enabled** **(** **)** If ``true``, the caret (text cursor) blinks. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_caret_blink_interval: -- :ref:`float` **caret_blink_interval** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.65`` | -+-----------+---------------------------------+ -| *Setter* | set_caret_blink_interval(value) | -+-----------+---------------------------------+ -| *Getter* | get_caret_blink_interval() | -+-----------+---------------------------------+ +:ref:`float` **caret_blink_interval** = ``0.65`` + +.. rst-class:: classref-property-setget + +- void **set_caret_blink_interval** **(** :ref:`float` value **)** +- :ref:`float` **get_caret_blink_interval** **(** **)** Duration (in seconds) of a caret's blinking cycle. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_caret_column: -- :ref:`int` **caret_column** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_caret_column(value) | -+-----------+-------------------------+ -| *Getter* | get_caret_column() | -+-----------+-------------------------+ +:ref:`int` **caret_column** = ``0`` -The caret's column position inside the ``LineEdit``. When set, the text may scroll to accommodate it. +.. rst-class:: classref-property-setget + +- void **set_caret_column** **(** :ref:`int` value **)** +- :ref:`int` **get_caret_column** **(** **)** + +The caret's column position inside the **LineEdit**. When set, the text may scroll to accommodate it. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_caret_force_displayed: -- :ref:`bool` **caret_force_displayed** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_caret_force_displayed(value) | -+-----------+----------------------------------+ -| *Getter* | is_caret_force_displayed() | -+-----------+----------------------------------+ +:ref:`bool` **caret_force_displayed** = ``false`` -If ``true``, the ``LineEdit`` will always show the caret, even if focus is lost. +.. rst-class:: classref-property-setget + +- void **set_caret_force_displayed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_caret_force_displayed** **(** **)** + +If ``true``, the **LineEdit** will always show the caret, even if focus is lost. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_caret_mid_grapheme: -- :ref:`bool` **caret_mid_grapheme** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------------+ -| *Setter* | set_caret_mid_grapheme_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_caret_mid_grapheme_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **caret_mid_grapheme** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_caret_mid_grapheme_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_caret_mid_grapheme_enabled** **(** **)** Allow moving caret, selecting and removing the individual composite character components. \ **Note:** :kbd:`Backspace` is always removing individual composite character components. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_clear_button_enabled: -- :ref:`bool` **clear_button_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_clear_button_enabled(value) | -+-----------+---------------------------------+ -| *Getter* | is_clear_button_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **clear_button_enabled** = ``false`` -If ``true``, the ``LineEdit`` will show a clear button if ``text`` is not empty, which can be used to clear the text quickly. +.. rst-class:: classref-property-setget + +- void **set_clear_button_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_clear_button_enabled** **(** **)** + +If ``true``, the **LineEdit** will show a clear button if ``text`` is not empty, which can be used to clear the text quickly. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_context_menu_enabled: -- :ref:`bool` **context_menu_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_context_menu_enabled(value) | -+-----------+---------------------------------+ -| *Getter* | is_context_menu_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **context_menu_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_context_menu_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_context_menu_enabled** **(** **)** If ``true``, the context menu will appear when right-clicked. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_deselect_on_focus_loss_enabled: -- :ref:`bool` **deselect_on_focus_loss_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------------+ -| *Setter* | set_deselect_on_focus_loss_enabled(value) | -+-----------+-------------------------------------------+ -| *Getter* | is_deselect_on_focus_loss_enabled() | -+-----------+-------------------------------------------+ +:ref:`bool` **deselect_on_focus_loss_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_deselect_on_focus_loss_enabled** **(** **)** If ``true``, the selected text will be deselected when focus is lost. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_draw_control_chars: -- :ref:`bool` **draw_control_chars** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_draw_control_chars(value) | -+-----------+-------------------------------+ -| *Getter* | get_draw_control_chars() | -+-----------+-------------------------------+ +:ref:`bool` **draw_control_chars** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_control_chars** **(** :ref:`bool` value **)** +- :ref:`bool` **get_draw_control_chars** **(** **)** If ``true``, control characters are displayed. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_editable: -- :ref:`bool` **editable** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_editable(value) | -+-----------+---------------------+ -| *Getter* | is_editable() | -+-----------+---------------------+ +:ref:`bool` **editable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_editable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editable** **(** **)** If ``false``, existing text cannot be modified and new text cannot be added. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_expand_to_text_length: -- :ref:`bool` **expand_to_text_length** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------------+ -| *Setter* | set_expand_to_text_length_enabled(value) | -+-----------+------------------------------------------+ -| *Getter* | is_expand_to_text_length_enabled() | -+-----------+------------------------------------------+ +:ref:`bool` **expand_to_text_length** = ``false`` -If ``true``, the ``LineEdit`` width will increase to stay longer than the :ref:`text`. It will **not** compress if the :ref:`text` is shortened. +.. rst-class:: classref-property-setget + +- void **set_expand_to_text_length_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_expand_to_text_length_enabled** **(** **)** + +If ``true``, the **LineEdit** width will increase to stay longer than the :ref:`text`. It will **not** compress if the :ref:`text` is shortened. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_flat: -- :ref:`bool` **flat** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flat(value) | -+-----------+-----------------+ -| *Getter* | is_flat() | -+-----------+-----------------+ +:ref:`bool` **flat** = ``false`` -If ``true``, the ``LineEdit`` don't display decoration. +.. rst-class:: classref-property-setget + +- void **set_flat** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flat** **(** **)** + +If ``true``, the **LineEdit** don't display decoration. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_LineEdit_property_max_length: -- :ref:`int` **max_length** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_max_length(value) | -+-----------+-----------------------+ -| *Getter* | get_max_length() | -+-----------+-----------------------+ +:ref:`int` **max_length** = ``0`` -Maximum number of characters that can be entered inside the ``LineEdit``. If ``0``, there is no limit. +.. rst-class:: classref-property-setget -When a limit is defined, characters that would exceed :ref:`max_length` are truncated. This happens both for existing :ref:`text` contents when setting the max length, or for new text inserted in the ``LineEdit``, including pasting. If any input text is truncated, the :ref:`text_change_rejected` signal is emitted with the truncated substring as parameter. +- void **set_max_length** **(** :ref:`int` value **)** +- :ref:`int` **get_max_length** **(** **)** + +Maximum number of characters that can be entered inside the **LineEdit**. If ``0``, there is no limit. + +When a limit is defined, characters that would exceed :ref:`max_length` are truncated. This happens both for existing :ref:`text` contents when setting the max length, or for new text inserted in the **LineEdit**, including pasting. If any input text is truncated, the :ref:`text_change_rejected` signal is emitted with the truncated substring as parameter. \ **Example:**\ @@ -666,338 +878,410 @@ When a limit is defined, characters that would exceed :ref:`max_length` **middle_mouse_paste_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------------+ -| *Setter* | set_middle_mouse_paste_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_middle_mouse_paste_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **middle_mouse_paste_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_middle_mouse_paste_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_middle_mouse_paste_enabled** **(** **)** If ``false``, using middle mouse button to paste clipboard will be disabled. \ **Note:** This method is only implemented on Linux. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_placeholder_text: -- :ref:`String` **placeholder_text** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``""`` | -+-----------+------------------------+ -| *Setter* | set_placeholder(value) | -+-----------+------------------------+ -| *Getter* | get_placeholder() | -+-----------+------------------------+ +:ref:`String` **placeholder_text** = ``""`` -Text shown when the ``LineEdit`` is empty. It is **not** the ``LineEdit``'s default value (see :ref:`text`). +.. rst-class:: classref-property-setget + +- void **set_placeholder** **(** :ref:`String` value **)** +- :ref:`String` **get_placeholder** **(** **)** + +Text shown when the **LineEdit** is empty. It is **not** the **LineEdit**'s default value (see :ref:`text`). + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_right_icon: -- :ref:`Texture2D` **right_icon** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_right_icon(value) | -+----------+-----------------------+ -| *Getter* | get_right_icon() | -+----------+-----------------------+ +:ref:`Texture2D` **right_icon** -Sets the icon that will appear in the right end of the ``LineEdit`` if there's no :ref:`text`, or always, if :ref:`clear_button_enabled` is set to ``false``. +.. rst-class:: classref-property-setget + +- void **set_right_icon** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_right_icon** **(** **)** + +Sets the icon that will appear in the right end of the **LineEdit** if there's no :ref:`text`, or always, if :ref:`clear_button_enabled` is set to ``false``. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_secret: -- :ref:`bool` **secret** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_secret(value) | -+-----------+-------------------+ -| *Getter* | is_secret() | -+-----------+-------------------+ +:ref:`bool` **secret** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_secret** **(** :ref:`bool` value **)** +- :ref:`bool` **is_secret** **(** **)** If ``true``, every character is replaced with the secret character (see :ref:`secret_character`). +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_secret_character: -- :ref:`String` **secret_character** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``"•"`` | -+-----------+-----------------------------+ -| *Setter* | set_secret_character(value) | -+-----------+-----------------------------+ -| *Getter* | get_secret_character() | -+-----------+-----------------------------+ +:ref:`String` **secret_character** = ``"•"`` + +.. rst-class:: classref-property-setget + +- void **set_secret_character** **(** :ref:`String` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_select_all_on_focus: -- :ref:`bool` **select_all_on_focus** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_select_all_on_focus(value) | -+-----------+--------------------------------+ -| *Getter* | is_select_all_on_focus() | -+-----------+--------------------------------+ +:ref:`bool` **select_all_on_focus** = ``false`` -If ``true``, the ``LineEdit`` will select the whole text when it gains focus. +.. rst-class:: classref-property-setget + +- void **set_select_all_on_focus** **(** :ref:`bool` value **)** +- :ref:`bool` **is_select_all_on_focus** **(** **)** + +If ``true``, the **LineEdit** will select the whole text when it gains focus. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_property_selecting_enabled: -- :ref:`bool` **selecting_enabled** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_selecting_enabled(value) | -+-----------+------------------------------+ -| *Getter* | is_selecting_enabled() | -+-----------+------------------------------+ +:ref:`bool` **selecting_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_selecting_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_selecting_enabled** **(** **)** If ``false``, it's impossible to select the text using mouse nor keyboard. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_shortcut_keys_enabled: -- :ref:`bool` **shortcut_keys_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_shortcut_keys_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_shortcut_keys_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **shortcut_keys_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_shortcut_keys_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shortcut_keys_enabled** **(** **)** If ``false``, using shortcuts will be disabled. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_structured_text_bidi_override(value) | -+-----------+------------------------------------------+ -| *Getter* | get_structured_text_bidi_override() | -+-----------+------------------------------------------+ +:ref:`StructuredTextParser` **structured_text_bidi_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser` value **)** +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** **)** Set BiDi algorithm override for the structured text. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_structured_text_bidi_override_options: -- :ref:`Array` **structured_text_bidi_override_options** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``[]`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_structured_text_bidi_override_options(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_structured_text_bidi_override_options() | -+-----------+--------------------------------------------------+ +:ref:`Array` **structured_text_bidi_override_options** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override_options** **(** :ref:`Array` value **)** +- :ref:`Array` **get_structured_text_bidi_override_options** **(** **)** Set additional options for BiDi override. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` -String value of the ``LineEdit``. +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** + +String value of the **LineEdit**. \ **Note:** Changing text using this property won't emit the :ref:`text_changed` signal. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_virtual_keyboard_enabled: -- :ref:`bool` **virtual_keyboard_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------+ -| *Setter* | set_virtual_keyboard_enabled(value) | -+-----------+-------------------------------------+ -| *Getter* | is_virtual_keyboard_enabled() | -+-----------+-------------------------------------+ +:ref:`bool` **virtual_keyboard_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_virtual_keyboard_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_virtual_keyboard_enabled** **(** **)** If ``true``, the native virtual keyboard is shown when focused on platforms that support it. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_property_virtual_keyboard_type: -- :ref:`VirtualKeyboardType` **virtual_keyboard_type** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_virtual_keyboard_type(value) | -+-----------+----------------------------------+ -| *Getter* | get_virtual_keyboard_type() | -+-----------+----------------------------------+ +:ref:`VirtualKeyboardType` **virtual_keyboard_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_virtual_keyboard_type** **(** :ref:`VirtualKeyboardType` value **)** +- :ref:`VirtualKeyboardType` **get_virtual_keyboard_type** **(** **)** Specifies the type of virtual keyboard to show. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_LineEdit_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method -Erases the ``LineEdit``'s :ref:`text`. +void **clear** **(** **)** + +Erases the **LineEdit**'s :ref:`text`. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_method_delete_char_at_caret: -- void **delete_char_at_caret** **(** **)** +.. rst-class:: classref-method + +void **delete_char_at_caret** **(** **)** Deletes one character at the caret's current position (equivalent to pressing :kbd:`Delete`). +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_delete_text: -- void **delete_text** **(** :ref:`int` from_column, :ref:`int` to_column **)** +.. rst-class:: classref-method + +void **delete_text** **(** :ref:`int` from_column, :ref:`int` to_column **)** Deletes a section of the :ref:`text` going from position ``from_column`` to ``to_column``. Both parameters should be within the text's length. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_deselect: -- void **deselect** **(** **)** +.. rst-class:: classref-method + +void **deselect** **(** **)** Clears the current selection. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_get_menu: -- :ref:`PopupMenu` **get_menu** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`PopupMenu` of this ``LineEdit``. By default, this menu is displayed when right-clicking on the ``LineEdit``. +:ref:`PopupMenu` **get_menu** **(** **)** |const| + +Returns the :ref:`PopupMenu` of this **LineEdit**. By default, this menu is displayed when right-clicking on the **LineEdit**. \ **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:`Window.visible` property. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_get_scroll_offset: -- :ref:`float` **get_scroll_offset** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_scroll_offset** **(** **)** |const| Returns the scroll offset due to :ref:`caret_column`, as a number of characters. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_get_selection_from_column: -- :ref:`int` **get_selection_from_column** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_from_column** **(** **)** |const| Returns the selection begin column. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_get_selection_to_column: -- :ref:`int` **get_selection_to_column** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_to_column** **(** **)** |const| Returns the selection end column. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_has_selection: -- :ref:`bool` **has_selection** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_selection** **(** **)** |const| Returns ``true`` if the user has selected text. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_insert_text_at_caret: -- void **insert_text_at_caret** **(** :ref:`String` text **)** +.. rst-class:: classref-method + +void **insert_text_at_caret** **(** :ref:`String` text **)** Inserts ``text`` at the caret. If the resulting value is longer than :ref:`max_length`, nothing happens. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_is_menu_visible: -- :ref:`bool` **is_menu_visible** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_menu_visible** **(** **)** |const| Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_menu_option: -- void **menu_option** **(** :ref:`int` option **)** +.. rst-class:: classref-method + +void **menu_option** **(** :ref:`int` option **)** Executes a given action as defined in the :ref:`MenuItems` enum. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_select: -- void **select** **(** :ref:`int` from=0, :ref:`int` to=-1 **)** +.. rst-class:: classref-method -Selects characters inside ``LineEdit`` between ``from`` and ``to``. By default, ``from`` is at the beginning and ``to`` at the end. +void **select** **(** :ref:`int` from=0, :ref:`int` to=-1 **)** + +Selects characters inside **LineEdit** between ``from`` and ``to``. By default, ``from`` is at the beginning and ``to`` at the end. .. tabs:: @@ -1018,206 +1302,238 @@ Selects characters inside ``LineEdit`` between ``from`` and ``to``. By default, +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_method_select_all: -- void **select_all** **(** **)** +.. rst-class:: classref-method + +void **select_all** **(** **)** Selects the whole :ref:`String`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_LineEdit_theme_color_caret_color: -- :ref:`Color` **caret_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **caret_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Color of the ``LineEdit``'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely. +Color of the **LineEdit**'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_theme_color_clear_button_color: -- :ref:`Color` **clear_button_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **clear_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` Color used as default tint for the clear button. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_color_clear_button_color_pressed: -- :ref:`Color` **clear_button_color_pressed** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **clear_button_color_pressed** = ``Color(1, 1, 1, 1)`` Color used for the clear button when it's pressed. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` Default font color. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``LineEdit``. +The tint of text outline of the **LineEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_theme_color_font_placeholder_color: -- :ref:`Color` **font_placeholder_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.6)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` Font color for :ref:`placeholder_text`. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_selected_color** = ``Color(1, 1, 1, 1)`` Font color for selected text (inside the selection rectangle). +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_color_font_uneditable_color: -- :ref:`Color` **font_uneditable_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_uneditable_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` Font color when editing is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_color_selection_color: -- :ref:`Color` **selection_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.5, 0.5, 0.5, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` Color of the selection rectangle. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_constant_caret_width: -- :ref:`int` **caret_width** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **caret_width** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_constant_minimum_character_width: -- :ref:`int` **minimum_character_width** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **minimum_character_width** = ``4`` 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). +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** Font used for the text. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``LineEdit``'s text. +:ref:`int` **font_size** + +Font size of the **LineEdit**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_theme_icon_clear: -- :ref:`Texture2D` **clear** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **clear** Texture for the clear button. See :ref:`clear_button_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_LineEdit_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -Background used when ``LineEdit`` has GUI 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. +:ref:`StyleBox` **focus** + +Background used when **LineEdit** has GUI 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_LineEdit_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -Default background for the ``LineEdit``. +:ref:`StyleBox` **normal** + +Default background for the **LineEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_LineEdit_theme_style_read_only: -- :ref:`StyleBox` **read_only** +.. rst-class:: classref-themeproperty -Background used when ``LineEdit`` is in read-only mode (:ref:`editable` is set to ``false``). +:ref:`StyleBox` **read_only** + +Background used when **LineEdit** is in read-only mode (:ref:`editable` is set to ``false``). .. |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.)` diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index 5f9e19f55..435523627 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -14,6 +14,8 @@ LinkButton Simple button used to represent a link to some resource. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,276 +23,332 @@ This kind of button is primarily used when the interaction with the button cause See also :ref:`BaseButton` which contains common properties and methods associated with this node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``0`` (overrides :ref:`Control`) | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CursorShape` | mouse_default_cursor_shape | ``2`` (overrides :ref:`Control`) | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`UnderlineMode` | :ref:`underline` | ``0`` | -+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``0`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | mouse_default_cursor_shape | ``2`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`UnderlineMode` | :ref:`underline` | ``0`` | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :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_outline_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`underline_spacing` | ``2`` | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`font` | | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | | -+---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :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_outline_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`underline_spacing` | ``2`` | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`font` | | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_LinkButton_UnderlineMode: -.. _class_LinkButton_constant_UNDERLINE_MODE_ALWAYS: - -.. _class_LinkButton_constant_UNDERLINE_MODE_ON_HOVER: - -.. _class_LinkButton_constant_UNDERLINE_MODE_NEVER: +.. rst-class:: classref-enumeration enum **UnderlineMode**: -- **UNDERLINE_MODE_ALWAYS** = **0** --- The LinkButton will always show an underline at the bottom of its text. +.. _class_LinkButton_constant_UNDERLINE_MODE_ALWAYS: -- **UNDERLINE_MODE_ON_HOVER** = **1** --- The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. +.. rst-class:: classref-enumeration-constant -- **UNDERLINE_MODE_NEVER** = **2** --- The LinkButton will never show an underline at the bottom of its text. +:ref:`UnderlineMode` **UNDERLINE_MODE_ALWAYS** = ``0`` + +The LinkButton will always show an underline at the bottom of its text. + +.. _class_LinkButton_constant_UNDERLINE_MODE_ON_HOVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnderlineMode` **UNDERLINE_MODE_ON_HOVER** = ``1`` + +The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. + +.. _class_LinkButton_constant_UNDERLINE_MODE_NEVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnderlineMode` **UNDERLINE_MODE_NEVER** = ``2`` + +The LinkButton will never show an underline at the bottom of its text. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_LinkButton_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_LinkButton_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_structured_text_bidi_override(value) | -+-----------+------------------------------------------+ -| *Getter* | get_structured_text_bidi_override() | -+-----------+------------------------------------------+ +:ref:`StructuredTextParser` **structured_text_bidi_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser` value **)** +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** **)** Set BiDi algorithm override for the structured text. +.. rst-class:: classref-item-separator + ---- .. _class_LinkButton_property_structured_text_bidi_override_options: -- :ref:`Array` **structured_text_bidi_override_options** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``[]`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_structured_text_bidi_override_options(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_structured_text_bidi_override_options() | -+-----------+--------------------------------------------------+ +:ref:`Array` **structured_text_bidi_override_options** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override_options** **(** :ref:`Array` value **)** +- :ref:`Array` **get_structured_text_bidi_override_options** **(** **)** Set additional options for BiDi override. +.. rst-class:: classref-item-separator + ---- .. _class_LinkButton_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** The button's text that will be displayed inside the button's area. +.. rst-class:: classref-item-separator + ---- .. _class_LinkButton_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_LinkButton_property_underline: -- :ref:`UnderlineMode` **underline** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_underline_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_underline_mode() | -+-----------+---------------------------+ +:ref:`UnderlineMode` **underline** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_underline_mode** **(** :ref:`UnderlineMode` value **)** +- :ref:`UnderlineMode` **get_underline_mode** **(** **)** Determines when to show the underline. See :ref:`UnderlineMode` for options. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_LinkButton_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` -Default text :ref:`Color` of the ``LinkButton``. +Default text :ref:`Color` of the **LinkButton**. + +.. rst-class:: classref-item-separator ---- .. _class_LinkButton_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Text :ref:`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. +Text :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_LinkButton_theme_color_font_hover_color: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Text :ref:`Color` used when the ``LinkButton`` is being hovered. +Text :ref:`Color` used when the **LinkButton** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_LinkButton_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``LinkButton``. +The tint of text outline of the **LinkButton**. + +.. rst-class:: classref-item-separator ---- .. _class_LinkButton_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` used when the ``LinkButton`` is being pressed. +Text :ref:`Color` used when the **LinkButton** is being pressed. + +.. rst-class:: classref-item-separator ---- .. _class_LinkButton_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_LinkButton_theme_constant_underline_spacing: -- :ref:`int` **underline_spacing** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **underline_spacing** = ``2`` The vertical space between the baseline of text and the underline. +.. rst-class:: classref-item-separator + ---- .. _class_LinkButton_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -:ref:`Font` of the ``LinkButton``'s text. +:ref:`Font` **font** + +:ref:`Font` of the **LinkButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_LinkButton_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``LinkButton``'s text. +:ref:`int` **font_size** + +Font size of the **LinkButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_LinkButton_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``LinkButton`` 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` **focus** + +:ref:`StyleBox` used when the **LinkButton** 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. .. |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.)` diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index b562ecb53..0bf1fa2cb 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -16,14 +16,16 @@ MainLoop Abstract base class for the game's main loop. +.. rst-class:: classref-introduction-group + Description ----------- -``MainLoop`` is the abstract base class for a Godot project's game loop. It is inherited by :ref:`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. +**MainLoop** is the abstract base class for a Godot project's game loop. It is inherited by :ref:`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` is created) unless a ``MainLoop`` :ref:`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` is created) unless a **MainLoop** :ref:`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``: +Here is an example script implementing a simple **MainLoop**: .. tabs:: @@ -79,119 +81,198 @@ Here is an example script implementing a simple ``MainLoop``: +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_finalize` **(** **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_initialize` **(** **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finalize` **(** **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_initialize` **(** **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MainLoop_signal_on_request_permissions_result: -- **on_request_permissions_result** **(** :ref:`String` permission, :ref:`bool` granted **)** +.. rst-class:: classref-signal + +**on_request_permissions_result** **(** :ref:`String` permission, :ref:`bool` granted **)** Emitted when a user responds to a permission request. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constants --------- .. _class_MainLoop_constant_NOTIFICATION_OS_MEMORY_WARNING: -.. _class_MainLoop_constant_NOTIFICATION_TRANSLATION_CHANGED: +.. rst-class:: classref-constant -.. _class_MainLoop_constant_NOTIFICATION_WM_ABOUT: +**NOTIFICATION_OS_MEMORY_WARNING** = ``2009`` -.. _class_MainLoop_constant_NOTIFICATION_CRASH: - -.. _class_MainLoop_constant_NOTIFICATION_OS_IME_UPDATE: - -.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_RESUMED: - -.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_PAUSED: - -.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_IN: - -.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_OUT: - -.. _class_MainLoop_constant_NOTIFICATION_TEXT_SERVER_CHANGED: - -- **NOTIFICATION_OS_MEMORY_WARNING** = **2009** --- Notification received from the OS when the application is exceeding its allocated memory. +Notification received from the OS when the application is exceeding its allocated memory. Specific to the iOS platform. -- **NOTIFICATION_TRANSLATION_CHANGED** = **2010** --- 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_MainLoop_constant_NOTIFICATION_TRANSLATION_CHANGED: -- **NOTIFICATION_WM_ABOUT** = **2011** --- Notification received from the OS when a request for "About" information is sent. +.. rst-class:: classref-constant + +**NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` + +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_MainLoop_constant_NOTIFICATION_WM_ABOUT: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_ABOUT** = ``2011`` + +Notification received from the OS when a request for "About" information is sent. Specific to the macOS platform. -- **NOTIFICATION_CRASH** = **2012** --- Notification received from Godot's crash handler when the engine is about to crash. +.. _class_MainLoop_constant_NOTIFICATION_CRASH: + +.. rst-class:: classref-constant + +**NOTIFICATION_CRASH** = ``2012`` + +Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms if the crash handler is enabled. -- **NOTIFICATION_OS_IME_UPDATE** = **2013** --- Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). +.. _class_MainLoop_constant_NOTIFICATION_OS_IME_UPDATE: + +.. rst-class:: classref-constant + +**NOTIFICATION_OS_IME_UPDATE** = ``2013`` + +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. -- **NOTIFICATION_APPLICATION_RESUMED** = **2014** --- Notification received from the OS when the application is resumed. +.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_RESUMED: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_RESUMED** = ``2014`` + +Notification received from the OS when the application is resumed. Specific to the Android platform. -- **NOTIFICATION_APPLICATION_PAUSED** = **2015** --- Notification received from the OS when the application is paused. +.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_PAUSED: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_PAUSED** = ``2015`` + +Notification received from the OS when the application is paused. Specific to the Android platform. -- **NOTIFICATION_APPLICATION_FOCUS_IN** = **2016** --- 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. +.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_IN: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016`` + +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. -- **NOTIFICATION_APPLICATION_FOCUS_OUT** = **2017** --- 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. +.. _class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_OUT: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017`` + +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. -- **NOTIFICATION_TEXT_SERVER_CHANGED** = **2018** --- Notification received when text server is changed. +.. _class_MainLoop_constant_NOTIFICATION_TEXT_SERVER_CHANGED: + +.. rst-class:: classref-constant + +**NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018`` + +Notification received when text server is changed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MainLoop_method__finalize: -- void **_finalize** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_finalize** **(** **)** |virtual| Called before the program exits. +.. rst-class:: classref-item-separator + ---- .. _class_MainLoop_method__initialize: -- void **_initialize** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_initialize** **(** **)** |virtual| Called once during initialization. +.. rst-class:: classref-item-separator + ---- .. _class_MainLoop_method__physics_process: -- :ref:`bool` **_physics_process** **(** :ref:`float` delta **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_physics_process** **(** :ref:`float` delta **)** |virtual| Called each physics frame with the time since the last physics frame as argument (``delta``, in seconds). Equivalent to :ref:`Node._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. +.. rst-class:: classref-item-separator + ---- .. _class_MainLoop_method__process: -- :ref:`bool` **_process** **(** :ref:`float` delta **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_process** **(** :ref:`float` delta **)** |virtual| Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to :ref:`Node._process`. diff --git a/classes/class_margincontainer.rst b/classes/class_margincontainer.rst index c1b52ce95..6aa202fef 100644 --- a/classes/class_margincontainer.rst +++ b/classes/class_margincontainer.rst @@ -14,12 +14,14 @@ MarginContainer Simple margin container. +.. rst-class:: classref-introduction-group + Description ----------- -Adds a top, left, bottom, and right margin to all :ref:`Control` nodes that are direct children of the container. To control the ``MarginContainer``'s margin, use the ``margin_*`` theme properties listed below. +Adds a top, left, bottom, and right margin to all :ref:`Control` nodes that are direct children of the container. To control the **MarginContainer**'s margin, use the ``margin_*`` theme properties listed below. -\ **Note:** Be careful, :ref:`Control` margin values are different from the constant margin values. If you want to change the custom margin values of the ``MarginContainer`` by code, you should use the following examples: +\ **Note:** Be careful, :ref:`Control` margin values are different from the constant margin values. If you want to change the custom margin values of the **MarginContainer** by code, you should use the following examples: .. tabs:: @@ -44,72 +46,83 @@ Adds a top, left, bottom, and right margin to all :ref:`Control` +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------+--------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`margin_bottom` | ``0`` | -+-----------------------+--------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`margin_left` | ``0`` | -+-----------------------+--------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`margin_right` | ``0`` | -+-----------------------+--------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`margin_top` | ``0`` | -+-----------------------+--------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`margin_bottom` | ``0`` | + +-----------------------+--------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`margin_left` | ``0`` | + +-----------------------+--------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`margin_right` | ``0`` | + +-----------------------+--------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`margin_top` | ``0`` | + +-----------------------+--------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_MarginContainer_theme_constant_margin_bottom: -- :ref:`int` **margin_bottom** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **margin_bottom** = ``0`` -All direct children of ``MarginContainer`` will have a bottom margin of ``margin_bottom`` pixels. +All direct children of **MarginContainer** will have a bottom margin of ``margin_bottom`` pixels. + +.. rst-class:: classref-item-separator ---- .. _class_MarginContainer_theme_constant_margin_left: -- :ref:`int` **margin_left** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **margin_left** = ``0`` -All direct children of ``MarginContainer`` will have a left margin of ``margin_left`` pixels. +All direct children of **MarginContainer** will have a left margin of ``margin_left`` pixels. + +.. rst-class:: classref-item-separator ---- .. _class_MarginContainer_theme_constant_margin_right: -- :ref:`int` **margin_right** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **margin_right** = ``0`` -All direct children of ``MarginContainer`` will have a right margin of ``margin_right`` pixels. +All direct children of **MarginContainer** will have a right margin of ``margin_right`` pixels. + +.. rst-class:: classref-item-separator ---- .. _class_MarginContainer_theme_constant_margin_top: -- :ref:`int` **margin_top** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **margin_top** = ``0`` -All direct children of ``MarginContainer`` will have a top margin of ``margin_top`` pixels. +All direct children of **MarginContainer** will have a top margin of ``margin_top`` pixels. .. |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.)` diff --git a/classes/class_marker2d.rst b/classes/class_marker2d.rst index 4894abece..549321226 100644 --- a/classes/class_marker2d.rst +++ b/classes/class_marker2d.rst @@ -14,32 +14,44 @@ Marker2D Generic 2D position hint for editing. +.. rst-class:: classref-introduction-group + Description ----------- Generic 2D position hint for editing. It's just like a plain :ref:`Node2D`, but it displays as a cross in the 2D editor at all times. You can set cross' visual size by using the gizmo in the 2D editor while the node is selected. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`gizmo_extents` | ``10.0`` | -+---------------------------+-------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`gizmo_extents` | ``10.0`` | + +---------------------------+-------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Marker2D_property_gizmo_extents: -- :ref:`float` **gizmo_extents** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``10.0`` | -+-----------+--------------------------+ -| *Setter* | set_gizmo_extents(value) | -+-----------+--------------------------+ -| *Getter* | get_gizmo_extents() | -+-----------+--------------------------+ +:ref:`float` **gizmo_extents** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_gizmo_extents** **(** :ref:`float` value **)** +- :ref:`float` **get_gizmo_extents** **(** **)** Size of the gizmo cross that appears in the editor. diff --git a/classes/class_marker3d.rst b/classes/class_marker3d.rst index cbe33749c..ab26ea296 100644 --- a/classes/class_marker3d.rst +++ b/classes/class_marker3d.rst @@ -14,32 +14,44 @@ Marker3D Generic 3D position hint for editing. +.. rst-class:: classref-introduction-group + Description ----------- Generic 3D position hint for editing. It's just like a plain :ref:`Node3D`, but it displays as a cross in the 3D editor at all times. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`gizmo_extents` | ``0.25`` | -+---------------------------+-------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`gizmo_extents` | ``0.25`` | + +---------------------------+-------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Marker3D_property_gizmo_extents: -- :ref:`float` **gizmo_extents** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.25`` | -+-----------+--------------------------+ -| *Setter* | set_gizmo_extents(value) | -+-----------+--------------------------+ -| *Getter* | get_gizmo_extents() | -+-----------+--------------------------+ +:ref:`float` **gizmo_extents** = ``0.25`` + +.. rst-class:: classref-property-setget + +- void **set_gizmo_extents** **(** :ref:`float` value **)** +- :ref:`float` **get_gizmo_extents** **(** **)** Size of the gizmo cross that appears in the editor. diff --git a/classes/class_marshalls.rst b/classes/class_marshalls.rst index de249fbaa..6e3490bfc 100644 --- a/classes/class_marshalls.rst +++ b/classes/class_marshalls.rst @@ -14,76 +14,111 @@ Marshalls Data transformation (marshalling) and encoding helpers. +.. rst-class:: classref-introduction-group + Description ----------- Provides data transformation and encoding utility functions. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`base64_to_raw` **(** :ref:`String` base64_str **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`base64_to_utf8` **(** :ref:`String` base64_str **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`base64_to_variant` **(** :ref:`String` base64_str, :ref:`bool` allow_objects=false **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`raw_to_base64` **(** :ref:`PackedByteArray` array **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`utf8_to_base64` **(** :ref:`String` utf8_str **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`variant_to_base64` **(** :ref:`Variant` variant, :ref:`bool` full_objects=false **)** | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`base64_to_raw` **(** :ref:`String` base64_str **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`base64_to_utf8` **(** :ref:`String` base64_str **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`base64_to_variant` **(** :ref:`String` base64_str, :ref:`bool` allow_objects=false **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`raw_to_base64` **(** :ref:`PackedByteArray` array **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`utf8_to_base64` **(** :ref:`String` utf8_str **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`variant_to_base64` **(** :ref:`Variant` variant, :ref:`bool` full_objects=false **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Marshalls_method_base64_to_raw: -- :ref:`PackedByteArray` **base64_to_raw** **(** :ref:`String` base64_str **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **base64_to_raw** **(** :ref:`String` base64_str **)** Returns a decoded :ref:`PackedByteArray` corresponding to the Base64-encoded string ``base64_str``. +.. rst-class:: classref-item-separator + ---- .. _class_Marshalls_method_base64_to_utf8: -- :ref:`String` **base64_to_utf8** **(** :ref:`String` base64_str **)** +.. rst-class:: classref-method + +:ref:`String` **base64_to_utf8** **(** :ref:`String` base64_str **)** Returns a decoded string corresponding to the Base64-encoded string ``base64_str``. +.. rst-class:: classref-item-separator + ---- .. _class_Marshalls_method_base64_to_variant: -- :ref:`Variant` **base64_to_variant** **(** :ref:`String` base64_str, :ref:`bool` allow_objects=false **)** +.. rst-class:: classref-method + +:ref:`Variant` **base64_to_variant** **(** :ref:`String` base64_str, :ref:`bool` allow_objects=false **)** Returns a decoded :ref:`Variant` corresponding to the Base64-encoded string ``base64_str``. If ``allow_objects`` is ``true``, decoding objects is allowed. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. +.. rst-class:: classref-item-separator + ---- .. _class_Marshalls_method_raw_to_base64: -- :ref:`String` **raw_to_base64** **(** :ref:`PackedByteArray` array **)** +.. rst-class:: classref-method + +:ref:`String` **raw_to_base64** **(** :ref:`PackedByteArray` array **)** Returns a Base64-encoded string of a given :ref:`PackedByteArray`. +.. rst-class:: classref-item-separator + ---- .. _class_Marshalls_method_utf8_to_base64: -- :ref:`String` **utf8_to_base64** **(** :ref:`String` utf8_str **)** +.. rst-class:: classref-method + +:ref:`String` **utf8_to_base64** **(** :ref:`String` utf8_str **)** Returns a Base64-encoded string of the UTF-8 string ``utf8_str``. +.. rst-class:: classref-item-separator + ---- .. _class_Marshalls_method_variant_to_base64: -- :ref:`String` **variant_to_base64** **(** :ref:`Variant` variant, :ref:`bool` full_objects=false **)** +.. rst-class:: classref-method + +:ref:`String` **variant_to_base64** **(** :ref:`Variant` variant, :ref:`bool` full_objects=false **)** Returns a Base64-encoded string of the :ref:`Variant` ``variant``. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). diff --git a/classes/class_material.rst b/classes/class_material.rst index 2dbbe07fb..c982abad6 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -16,11 +16,15 @@ Material Abstract base :ref:`Resource` for coloring and shading geometry. +.. rst-class:: classref-introduction-group + Description ----------- Material is a base :ref:`Resource` used for coloring and shading geometry. All materials inherit from it and almost all :ref:`VisualInstance3D` derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,69 +32,103 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-----------------------------------------------------------------+ -| :ref:`Material` | :ref:`next_pass` | -+---------------------------------+-----------------------------------------------------------------+ -| :ref:`int` | :ref:`render_priority` | -+---------------------------------+-----------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-----------------------------------------------------------------+ + | :ref:`Material` | :ref:`next_pass` | + +---------------------------------+-----------------------------------------------------------------+ + | :ref:`int` | :ref:`render_priority` | + +---------------------------------+-----------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_can_do_next_pass` **(** **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_can_use_render_priority` **(** **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Mode` | :ref:`_get_shader_mode` **(** **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_get_shader_rid` **(** **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`inspect_native_shader_code` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_do_next_pass` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_use_render_priority` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`Mode` | :ref:`_get_shader_mode` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_shader_rid` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------+ + | void | :ref:`inspect_native_shader_code` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Material_constant_RENDER_PRIORITY_MAX: +.. rst-class:: classref-constant + +**RENDER_PRIORITY_MAX** = ``127`` + +Maximum value for the :ref:`render_priority` parameter. + .. _class_Material_constant_RENDER_PRIORITY_MIN: -- **RENDER_PRIORITY_MAX** = **127** --- Maximum value for the :ref:`render_priority` parameter. +.. rst-class:: classref-constant -- **RENDER_PRIORITY_MIN** = **-128** --- Minimum value for the :ref:`render_priority` parameter. +**RENDER_PRIORITY_MIN** = ``-128`` + +Minimum value for the :ref:`render_priority` parameter. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Material_property_next_pass: -- :ref:`Material` **next_pass** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_next_pass(value) | -+----------+----------------------+ -| *Getter* | get_next_pass() | -+----------+----------------------+ +:ref:`Material` **next_pass** -Sets the ``Material`` to be used for the next pass. This renders the object again using a different material. +.. rst-class:: classref-property-setget + +- void **set_next_pass** **(** :ref:`Material` value **)** +- :ref:`Material` **get_next_pass** **(** **)** + +Sets the **Material** to be used for the next pass. This renders the object again using a different material. \ **Note:** This only applies to :ref:`StandardMaterial3D`\ s and :ref:`ShaderMaterial`\ s with type "Spatial". +.. rst-class:: classref-item-separator + ---- .. _class_Material_property_render_priority: -- :ref:`int` **render_priority** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_render_priority(value) | -+----------+----------------------------+ -| *Getter* | get_render_priority() | -+----------+----------------------------+ +:ref:`int` **render_priority** + +.. rst-class:: classref-property-setget + +- void **set_render_priority** **(** :ref:`int` value **)** +- :ref:`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. @@ -98,52 +136,76 @@ Sets the render priority for transparent objects in 3D scenes. Higher priority o \ **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). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Material_method__can_do_next_pass: -- :ref:`bool` **_can_do_next_pass** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_do_next_pass** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Material_method__can_use_render_priority: -- :ref:`bool` **_can_use_render_priority** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_use_render_priority** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Material_method__get_shader_mode: -- :ref:`Mode` **_get_shader_mode** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Mode` **_get_shader_mode** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Material_method__get_shader_rid: -- :ref:`RID` **_get_shader_rid** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_get_shader_rid** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Material_method_inspect_native_shader_code: -- void **inspect_native_shader_code** **(** **)** +.. rst-class:: classref-method + +void **inspect_native_shader_code** **(** **)** .. container:: contribute diff --git a/classes/class_menubar.rst b/classes/class_menubar.rst index bd237ccf7..b389e9531 100644 --- a/classes/class_menubar.rst +++ b/classes/class_menubar.rst @@ -14,450 +14,561 @@ MenuBar A horizontal menu bar, which displays :ref:`PopupMenu`\ s or system global menu. +.. rst-class:: classref-introduction-group + Description ----------- New items can be created by adding :ref:`PopupMenu` nodes to his node. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------+----------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`flat` | ``false`` | -+--------------------------------------------------+----------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`language` | ``""`` | -+--------------------------------------------------+----------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`prefer_global_menu` | ``true`` | -+--------------------------------------------------+----------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`start_index` | ``-1`` | -+--------------------------------------------------+----------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`switch_on_hover` | ``true`` | -+--------------------------------------------------+----------------------------------------------------------------------+-----------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+--------------------------------------------------+----------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`flat` | ``false`` | + +--------------------------------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`language` | ``""`` | + +--------------------------------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`prefer_global_menu` | ``true`` | + +--------------------------------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`start_index` | ``-1`` | + +--------------------------------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`switch_on_hover` | ``true`` | + +--------------------------------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +--------------------------------------------------+----------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_menu_count` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_menu_popup` **(** :ref:`int` menu **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_menu_title` **(** :ref:`int` menu **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_menu_tooltip` **(** :ref:`int` menu **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_menu_disabled` **(** :ref:`int` menu **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_menu_hidden` **(** :ref:`int` menu **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_native_menu` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_shortcuts` **(** :ref:`bool` disabled **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_menu_disabled` **(** :ref:`int` menu, :ref:`bool` disabled **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_menu_hidden` **(** :ref:`int` menu, :ref:`bool` hidden **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_menu_title` **(** :ref:`int` menu, :ref:`String` title **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_menu_tooltip` **(** :ref:`int` menu, :ref:`String` tooltip **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_menu_count` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu_popup` **(** :ref:`int` menu **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_menu_title` **(** :ref:`int` menu **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_menu_tooltip` **(** :ref:`int` menu **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_disabled` **(** :ref:`int` menu **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_hidden` **(** :ref:`int` menu **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_native_menu` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_shortcuts` **(** :ref:`bool` disabled **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_menu_disabled` **(** :ref:`int` menu, :ref:`bool` disabled **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_menu_hidden` **(** :ref:`int` menu, :ref:`bool` hidden **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_menu_title` **(** :ref:`int` menu, :ref:`String` title **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_menu_tooltip` **(** :ref:`int` menu, :ref:`String` tooltip **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ -| :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:`h_separation` | ``4`` | -+---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ -| :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` | | -+---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ +.. 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:`h_separation` | ``4`` | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :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` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MenuBar_property_flat: -- :ref:`bool` **flat** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flat(value) | -+-----------+-----------------+ -| *Getter* | is_flat() | -+-----------+-----------------+ +:ref:`bool` **flat** = ``false`` -Flat ``MenuBar`` don't display item decoration. +.. rst-class:: classref-property-setget + +- void **set_flat** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flat** **(** **)** + +Flat **MenuBar** don't display item decoration. + +.. rst-class:: classref-item-separator ---- .. _class_MenuBar_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_MenuBar_property_prefer_global_menu: -- :ref:`bool` **prefer_global_menu** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------+ -| *Setter* | set_prefer_global_menu(value) | -+-----------+-------------------------------+ -| *Getter* | is_prefer_global_menu() | -+-----------+-------------------------------+ +:ref:`bool` **prefer_global_menu** = ``true`` -If ``true``, ``MenuBar`` will use system global menu when supported. +.. rst-class:: classref-property-setget + +- void **set_prefer_global_menu** **(** :ref:`bool` value **)** +- :ref:`bool` **is_prefer_global_menu** **(** **)** + +If ``true``, **MenuBar** will use system global menu when supported. + +.. rst-class:: classref-item-separator ---- .. _class_MenuBar_property_start_index: -- :ref:`int` **start_index** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------+ -| *Setter* | set_start_index(value) | -+-----------+------------------------+ -| *Getter* | get_start_index() | -+-----------+------------------------+ +:ref:`int` **start_index** = ``-1`` -Position in the global menu to insert first ``MenuBar`` item at. +.. rst-class:: classref-property-setget + +- void **set_start_index** **(** :ref:`int` value **)** +- :ref:`int` **get_start_index** **(** **)** + +Position in the global menu to insert first **MenuBar** item at. + +.. rst-class:: classref-item-separator ---- .. _class_MenuBar_property_switch_on_hover: -- :ref:`bool` **switch_on_hover** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_switch_on_hover(value) | -+-----------+----------------------------+ -| *Getter* | is_switch_on_hover() | -+-----------+----------------------------+ +:ref:`bool` **switch_on_hover** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_switch_on_hover** **(** :ref:`bool` value **)** +- :ref:`bool` **is_switch_on_hover** **(** **)** If ``true``, when the cursor hovers above menu item, it will close the current :ref:`PopupMenu` and open the other one. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_MenuBar_method_get_menu_count: -- :ref:`int` **get_menu_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_menu_count** **(** **)** |const| Returns number of menu items. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_get_menu_popup: -- :ref:`PopupMenu` **get_menu_popup** **(** :ref:`int` menu **)** |const| +.. rst-class:: classref-method + +:ref:`PopupMenu` **get_menu_popup** **(** :ref:`int` menu **)** |const| Returns :ref:`PopupMenu` associated with menu item. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_get_menu_title: -- :ref:`String` **get_menu_title** **(** :ref:`int` menu **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_menu_title** **(** :ref:`int` menu **)** |const| Returns menu item title. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_get_menu_tooltip: -- :ref:`String` **get_menu_tooltip** **(** :ref:`int` menu **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_menu_tooltip** **(** :ref:`int` menu **)** |const| Returns menu item tooltip. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_is_menu_disabled: -- :ref:`bool` **is_menu_disabled** **(** :ref:`int` menu **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_menu_disabled** **(** :ref:`int` menu **)** |const| Returns ``true``, if menu item is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_is_menu_hidden: -- :ref:`bool` **is_menu_hidden** **(** :ref:`int` menu **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_menu_hidden** **(** :ref:`int` menu **)** |const| Returns ``true``, if menu item is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_is_native_menu: -- :ref:`bool` **is_native_menu** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true``, if system global menu is supported and used by this ``MenuBar``. +:ref:`bool` **is_native_menu** **(** **)** |const| + +Returns ``true``, if system global menu is supported and used by this **MenuBar**. + +.. rst-class:: classref-item-separator ---- .. _class_MenuBar_method_set_disable_shortcuts: -- void **set_disable_shortcuts** **(** :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_disable_shortcuts** **(** :ref:`bool` disabled **)** If ``true``, shortcuts are disabled and cannot be used to trigger the button. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_set_menu_disabled: -- void **set_menu_disabled** **(** :ref:`int` menu, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_menu_disabled** **(** :ref:`int` menu, :ref:`bool` disabled **)** If ``true``, menu item is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_set_menu_hidden: -- void **set_menu_hidden** **(** :ref:`int` menu, :ref:`bool` hidden **)** +.. rst-class:: classref-method + +void **set_menu_hidden** **(** :ref:`int` menu, :ref:`bool` hidden **)** If ``true``, menu item is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_set_menu_title: -- void **set_menu_title** **(** :ref:`int` menu, :ref:`String` title **)** +.. rst-class:: classref-method + +void **set_menu_title** **(** :ref:`int` menu, :ref:`String` title **)** Sets menu item title. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_method_set_menu_tooltip: -- void **set_menu_tooltip** **(** :ref:`int` menu, :ref:`String` tooltip **)** +.. rst-class:: classref-method + +void **set_menu_tooltip** **(** :ref:`int` menu, :ref:`String` tooltip **)** Sets menu item tooltip. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_MenuBar_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` Default text :ref:`Color` of the menu item. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` Text :ref:`Color` used when the menu item is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` Text :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_color_font_hover_color: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` Text :ref:`Color` used when the menu item is being hovered. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_color_font_hover_pressed_color: -- :ref:`Color` **font_hover_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` Text :ref:`Color` used when the menu item is being hovered and pressed. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` The tint of text outline of the menu item. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` Text :ref:`Color` used when the menu item is being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal space between menu items. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** :ref:`Font` of the menu item's text. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Font size of the menu item's text. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_style_disabled: -- :ref:`StyleBox` **disabled** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **disabled** :ref:`StyleBox` used when the menu item is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **focus** :ref:`StyleBox` used when the menu item 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_MenuBar_theme_style_hover: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover** :ref:`StyleBox` used when the menu item is being hovered. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **normal** Default :ref:`StyleBox` for the menu item. +.. rst-class:: classref-item-separator + ---- .. _class_MenuBar_theme_style_pressed: -- :ref:`StyleBox` **pressed** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **pressed** :ref:`StyleBox` used when the menu item is being pressed. diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index 70ba89cb8..9e7e6603c 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -14,299 +14,378 @@ MenuButton Special button that brings up a :ref:`PopupMenu` when clicked. +.. rst-class:: classref-introduction-group + Description ----------- Special button that brings up a :ref:`PopupMenu` when clicked. -New items can be created inside this :ref:`PopupMenu` using ``get_popup().add_item("My Item Name")``. You can also create them directly from the editor. To do so, select the ``MenuButton`` node, then in the toolbar at the top of the 2D editor, click **Items** then click **Add** in the popup. You will be able to give each item new properties. +New items can be created inside this :ref:`PopupMenu` using ``get_popup().add_item("My Item Name")``. You can also create them directly from the editor. To do so, select the **MenuButton** node, then in the toolbar at the top of the 2D editor, click **Items** then click **Add** in the popup. You will be able to give each item new properties. See also :ref:`BaseButton` which contains common properties and methods associated with this node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`ActionMode` | action_mode | ``0`` (overrides :ref:`BaseButton`) | -+-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | flat | ``true`` (overrides :ref:`Button`) | -+-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``0`` (overrides :ref:`Control`) | -+-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`item_count` | ``0`` | -+-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`switch_on_hover` | ``false`` | -+-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | -+-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`ActionMode` | action_mode | ``0`` (overrides :ref:`BaseButton`) | + +-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | flat | ``true`` (overrides :ref:`Button`) | + +-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``0`` (overrides :ref:`Control`) | + +-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`item_count` | ``0`` | + +-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`switch_on_hover` | ``false`` | + +-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | + +-----------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_popup` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_shortcuts` **(** :ref:`bool` disabled **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`show_popup` **(** **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_popup` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_shortcuts` **(** :ref:`bool` disabled **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show_popup` **(** **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_disabled_color` | ``Color(1, 1, 1, 0.3)`` | -+---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ -| :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_outline_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`h_separation` | ``3`` | -+---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ -| :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` | | -+---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(1, 1, 1, 0.3)`` | + +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + | :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_outline_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``3`` | + +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + | :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` | | + +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MenuButton_signal_about_to_popup: -- **about_to_popup** **(** **)** +.. rst-class:: classref-signal + +**about_to_popup** **(** **)** Emitted when the :ref:`PopupMenu` of this MenuButton is about to show. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_MenuButton_property_item_count: -- :ref:`int` **item_count** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_item_count(value) | -+-----------+-----------------------+ -| *Getter* | get_item_count() | -+-----------+-----------------------+ +:ref:`int` **item_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_item_count** **(** :ref:`int` value **)** +- :ref:`int` **get_item_count** **(** **)** The number of items currently in the list. +.. rst-class:: classref-item-separator + ---- .. _class_MenuButton_property_switch_on_hover: -- :ref:`bool` **switch_on_hover** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_switch_on_hover(value) | -+-----------+----------------------------+ -| *Getter* | is_switch_on_hover() | -+-----------+----------------------------+ +:ref:`bool` **switch_on_hover** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_switch_on_hover** **(** :ref:`bool` value **)** +- :ref:`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. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MenuButton_method_get_popup: -- :ref:`PopupMenu` **get_popup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PopupMenu` **get_popup** **(** **)** |const| Returns the :ref:`PopupMenu` contained in this button. \ **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:`Window.visible` property. +.. rst-class:: classref-item-separator + ---- .. _class_MenuButton_method_set_disable_shortcuts: -- void **set_disable_shortcuts** **(** :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_disable_shortcuts** **(** :ref:`bool` disabled **)** If ``true``, shortcuts are disabled and cannot be used to trigger the button. +.. rst-class:: classref-item-separator + ---- .. _class_MenuButton_method_show_popup: -- void **show_popup** **(** **)** +.. rst-class:: classref-method -Adjusts popup position and sizing for the ``MenuButton``, then shows the :ref:`PopupMenu`. Prefer this over using ``get_popup().popup()``. +void **show_popup** **(** **)** + +Adjusts popup position and sizing for the **MenuButton**, then shows the :ref:`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: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` -Default text :ref:`Color` of the ``MenuButton``. +Default text :ref:`Color` of the **MenuButton**. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------+ -| *Default* | ``Color(1, 1, 1, 0.3)`` | -+-----------+-------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(1, 1, 1, 0.3)`` -Text :ref:`Color` used when the ``MenuButton`` is disabled. +Text :ref:`Color` used when the **MenuButton** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Text :ref:`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. +Text :ref:`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: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Text :ref:`Color` used when the ``MenuButton`` is being hovered. +Text :ref:`Color` used when the **MenuButton** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``MenuButton``. +The tint of text outline of the **MenuButton**. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` used when the ``MenuButton`` is being pressed. +Text :ref:`Color` used when the **MenuButton** is being pressed. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``3`` -The horizontal space between ``MenuButton``'s icon and text. Negative values will be treated as ``0`` when used. +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: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_MenuButton_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -:ref:`Font` of the ``MenuButton``'s text. +:ref:`Font` **font** + +:ref:`Font` of the **MenuButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``MenuButton``'s text. +:ref:`int` **font_size** + +Font size of the **MenuButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_style_disabled: -- :ref:`StyleBox` **disabled** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``MenuButton`` is disabled. +:ref:`StyleBox` **disabled** + +:ref:`StyleBox` used when the **MenuButton** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``MenuButton`` 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` **focus** + +:ref:`StyleBox` used when the **MenuButton** 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_MenuButton_theme_style_hover: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``MenuButton`` is being hovered. +:ref:`StyleBox` **hover** + +:ref:`StyleBox` used when the **MenuButton** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -Default :ref:`StyleBox` for the ``MenuButton``. +:ref:`StyleBox` **normal** + +Default :ref:`StyleBox` for the **MenuButton**. + +.. rst-class:: classref-item-separator ---- .. _class_MenuButton_theme_style_pressed: -- :ref:`StyleBox` **pressed** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``MenuButton`` is being pressed. +:ref:`StyleBox` **pressed** + +:ref:`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.)` diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 5a3eb1434..e318452ac 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -16,11 +16,15 @@ Mesh A :ref:`Resource` that contains vertex array-based geometry. +.. rst-class:: classref-introduction-group + Description ----------- Mesh is a type of :ref:`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. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,484 +36,807 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------------+--------------------+ -| :ref:`Vector2i` | :ref:`lightmap_size_hint` | ``Vector2i(0, 0)`` | -+---------------------------------+-------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`lightmap_size_hint` | ``Vector2i(0, 0)`` | + +---------------------------------+-------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_blend_shape_count` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`_get_blend_shape_name` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_surface_count` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_blend_shape_name` **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_surface_get_array_index_len` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_surface_get_array_len` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_surface_get_arrays` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array[]` | :ref:`_surface_get_blend_shape_arrays` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_surface_get_format` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_surface_get_lods` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Material` | :ref:`_surface_get_material` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_surface_get_primitive_type` **(** :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_surface_set_material` **(** :ref:`int` index, :ref:`Material` material **)** |virtual| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shape3D` | :ref:`create_convex_shape` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`create_outline` **(** :ref:`float` margin **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shape3D` | :ref:`create_trimesh_shape` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`surface_get_arrays` **(** :ref:`int` surf_idx **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array[]` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`surface_set_material` **(** :ref:`int` surf_idx, :ref:`Material` material **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_blend_shape_count` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_blend_shape_name` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_surface_count` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_blend_shape_name` **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_array_index_len` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_array_len` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_surface_get_arrays` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array[]` | :ref:`_surface_get_blend_shape_arrays` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_format` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_surface_get_lods` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`_surface_get_material` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_primitive_type` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_surface_set_material` **(** :ref:`int` index, :ref:`Material` material **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConvexPolygonShape3D` | :ref:`create_convex_shape` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`create_outline` **(** :ref:`float` margin **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConcavePolygonShape3D` | :ref:`create_trimesh_shape` **(** **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`surface_get_arrays` **(** :ref:`int` surf_idx **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array[]` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_set_material` **(** :ref:`int` surf_idx, :ref:`Material` material **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Mesh_PrimitiveType: -.. _class_Mesh_constant_PRIMITIVE_POINTS: - -.. _class_Mesh_constant_PRIMITIVE_LINES: - -.. _class_Mesh_constant_PRIMITIVE_LINE_STRIP: - -.. _class_Mesh_constant_PRIMITIVE_TRIANGLES: - -.. _class_Mesh_constant_PRIMITIVE_TRIANGLE_STRIP: +.. rst-class:: classref-enumeration enum **PrimitiveType**: -- **PRIMITIVE_POINTS** = **0** --- Render array as points (one vertex equals one point). +.. _class_Mesh_constant_PRIMITIVE_POINTS: -- **PRIMITIVE_LINES** = **1** --- Render array as lines (every two vertices a line is created). +.. rst-class:: classref-enumeration-constant -- **PRIMITIVE_LINE_STRIP** = **2** --- Render array as line strip. +:ref:`PrimitiveType` **PRIMITIVE_POINTS** = ``0`` -- **PRIMITIVE_TRIANGLES** = **3** --- Render array as triangles (every three vertices a triangle is created). +Render array as points (one vertex equals one point). -- **PRIMITIVE_TRIANGLE_STRIP** = **4** --- Render array as triangle strips. +.. _class_Mesh_constant_PRIMITIVE_LINES: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_LINES** = ``1`` + +Render array as lines (every two vertices a line is created). + +.. _class_Mesh_constant_PRIMITIVE_LINE_STRIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_LINE_STRIP** = ``2`` + +Render array as line strip. + +.. _class_Mesh_constant_PRIMITIVE_TRIANGLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_TRIANGLES** = ``3`` + +Render array as triangles (every three vertices a triangle is created). + +.. _class_Mesh_constant_PRIMITIVE_TRIANGLE_STRIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_TRIANGLE_STRIP** = ``4`` + +Render array as triangle strips. + +.. rst-class:: classref-item-separator ---- .. _enum_Mesh_ArrayType: -.. _class_Mesh_constant_ARRAY_VERTEX: - -.. _class_Mesh_constant_ARRAY_NORMAL: - -.. _class_Mesh_constant_ARRAY_TANGENT: - -.. _class_Mesh_constant_ARRAY_COLOR: - -.. _class_Mesh_constant_ARRAY_TEX_UV: - -.. _class_Mesh_constant_ARRAY_TEX_UV2: - -.. _class_Mesh_constant_ARRAY_CUSTOM0: - -.. _class_Mesh_constant_ARRAY_CUSTOM1: - -.. _class_Mesh_constant_ARRAY_CUSTOM2: - -.. _class_Mesh_constant_ARRAY_CUSTOM3: - -.. _class_Mesh_constant_ARRAY_BONES: - -.. _class_Mesh_constant_ARRAY_WEIGHTS: - -.. _class_Mesh_constant_ARRAY_INDEX: - -.. _class_Mesh_constant_ARRAY_MAX: +.. rst-class:: classref-enumeration enum **ArrayType**: -- **ARRAY_VERTEX** = **0** --- :ref:`PackedVector3Array`, :ref:`PackedVector2Array`, or :ref:`Array` of vertex positions. +.. _class_Mesh_constant_ARRAY_VERTEX: -- **ARRAY_NORMAL** = **1** --- :ref:`PackedVector3Array` of vertex normals. +.. rst-class:: classref-enumeration-constant -- **ARRAY_TANGENT** = **2** --- :ref:`PackedFloat32Array` of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. +:ref:`ArrayType` **ARRAY_VERTEX** = ``0`` -- **ARRAY_COLOR** = **3** --- :ref:`PackedColorArray` of vertex colors. +:ref:`PackedVector3Array`, :ref:`PackedVector2Array`, or :ref:`Array` of vertex positions. -- **ARRAY_TEX_UV** = **4** --- :ref:`PackedVector2Array` for UV coordinates. +.. _class_Mesh_constant_ARRAY_NORMAL: -- **ARRAY_TEX_UV2** = **5** --- :ref:`PackedVector2Array` for second UV coordinates. +.. rst-class:: classref-enumeration-constant -- **ARRAY_CUSTOM0** = **6** --- Contains custom color channel 0. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM0_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +:ref:`ArrayType` **ARRAY_NORMAL** = ``1`` -- **ARRAY_CUSTOM1** = **7** --- Contains custom color channel 1. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM1_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +:ref:`PackedVector3Array` of vertex normals. -- **ARRAY_CUSTOM2** = **8** --- Contains custom color channel 2. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM2_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +.. _class_Mesh_constant_ARRAY_TANGENT: -- **ARRAY_CUSTOM3** = **9** --- Contains custom color channel 3. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM3_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. +.. rst-class:: classref-enumeration-constant -- **ARRAY_BONES** = **10** --- :ref:`PackedFloat32Array` or :ref:`PackedInt32Array` of bone indices. Each element is a group of 4 numbers. +:ref:`ArrayType` **ARRAY_TANGENT** = ``2`` -- **ARRAY_WEIGHTS** = **11** --- :ref:`PackedFloat32Array` of bone weights. Each element in groups of 4 floats. +:ref:`PackedFloat32Array` of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. -- **ARRAY_INDEX** = **12** --- :ref:`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. +.. _class_Mesh_constant_ARRAY_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_COLOR** = ``3`` + +:ref:`PackedColorArray` of vertex colors. + +.. _class_Mesh_constant_ARRAY_TEX_UV: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_TEX_UV** = ``4`` + +:ref:`PackedVector2Array` for UV coordinates. + +.. _class_Mesh_constant_ARRAY_TEX_UV2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_TEX_UV2** = ``5`` + +:ref:`PackedVector2Array` for second UV coordinates. + +.. _class_Mesh_constant_ARRAY_CUSTOM0: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM0** = ``6`` + +Contains custom color channel 0. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM0_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. + +.. _class_Mesh_constant_ARRAY_CUSTOM1: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM1** = ``7`` + +Contains custom color channel 1. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM1_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. + +.. _class_Mesh_constant_ARRAY_CUSTOM2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM2** = ``8`` + +Contains custom color channel 2. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM2_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. + +.. _class_Mesh_constant_ARRAY_CUSTOM3: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM3** = ``9`` + +Contains custom color channel 3. :ref:`PackedByteArray` if ``(format >> [constant ARRAY_FORMAT_CUSTOM3_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM`, :ref:`ARRAY_CUSTOM_RG_HALF` or :ref:`ARRAY_CUSTOM_RGBA_HALF`. :ref:`PackedFloat32Array` otherwise. + +.. _class_Mesh_constant_ARRAY_BONES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_BONES** = ``10`` + +:ref:`PackedFloat32Array` or :ref:`PackedInt32Array` of bone indices. Each element is a group of 4 numbers. + +.. _class_Mesh_constant_ARRAY_WEIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_WEIGHTS** = ``11`` + +:ref:`PackedFloat32Array` of bone weights. Each element in groups of 4 floats. + +.. _class_Mesh_constant_ARRAY_INDEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_INDEX** = ``12`` + +:ref:`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. -- **ARRAY_MAX** = **13** --- Represents the size of the :ref:`ArrayType` enum. +.. _class_Mesh_constant_ARRAY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_MAX** = ``13`` + +Represents the size of the :ref:`ArrayType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Mesh_ArrayCustomFormat: -.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM: - -.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA8_SNORM: - -.. _class_Mesh_constant_ARRAY_CUSTOM_RG_HALF: - -.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF: - -.. _class_Mesh_constant_ARRAY_CUSTOM_R_FLOAT: - -.. _class_Mesh_constant_ARRAY_CUSTOM_RG_FLOAT: - -.. _class_Mesh_constant_ARRAY_CUSTOM_RGB_FLOAT: - -.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA_FLOAT: - -.. _class_Mesh_constant_ARRAY_CUSTOM_MAX: +.. rst-class:: classref-enumeration enum **ArrayCustomFormat**: -- **ARRAY_CUSTOM_RGBA8_UNORM** = **0** --- Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as :ref:`PackedByteArray`. +.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM: -- **ARRAY_CUSTOM_RGBA8_SNORM** = **1** --- Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as :ref:`PackedByteArray`. +.. rst-class:: classref-enumeration-constant -- **ARRAY_CUSTOM_RG_HALF** = **2** --- Indicates this custom channel contains half precision float colors, encoded as :ref:`PackedByteArray`. Only red and green channels are used. +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA8_UNORM** = ``0`` -- **ARRAY_CUSTOM_RGBA_HALF** = **3** --- Indicates this custom channel contains half precision float colors, encoded as :ref:`PackedByteArray`. +Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as :ref:`PackedByteArray`. -- **ARRAY_CUSTOM_R_FLOAT** = **4** --- Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. Only the red green channel is used. +.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA8_SNORM: -- **ARRAY_CUSTOM_RG_FLOAT** = **5** --- Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. Only red and green channels are used. +.. rst-class:: classref-enumeration-constant -- **ARRAY_CUSTOM_RGB_FLOAT** = **6** --- Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. Only red, green and blue channels are used. +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA8_SNORM** = ``1`` -- **ARRAY_CUSTOM_RGBA_FLOAT** = **7** --- Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. +Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as :ref:`PackedByteArray`. -- **ARRAY_CUSTOM_MAX** = **8** --- Represents the size of the :ref:`ArrayCustomFormat` enum. +.. _class_Mesh_constant_ARRAY_CUSTOM_RG_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RG_HALF** = ``2`` + +Indicates this custom channel contains half precision float colors, encoded as :ref:`PackedByteArray`. Only red and green channels are used. + +.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA_HALF** = ``3`` + +Indicates this custom channel contains half precision float colors, encoded as :ref:`PackedByteArray`. + +.. _class_Mesh_constant_ARRAY_CUSTOM_R_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_R_FLOAT** = ``4`` + +Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. Only the red green channel is used. + +.. _class_Mesh_constant_ARRAY_CUSTOM_RG_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RG_FLOAT** = ``5`` + +Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. Only red and green channels are used. + +.. _class_Mesh_constant_ARRAY_CUSTOM_RGB_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGB_FLOAT** = ``6`` + +Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. Only red, green and blue channels are used. + +.. _class_Mesh_constant_ARRAY_CUSTOM_RGBA_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA_FLOAT** = ``7`` + +Indicates this custom channel contains full float colors, in a :ref:`PackedFloat32Array`. + +.. _class_Mesh_constant_ARRAY_CUSTOM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_MAX** = ``8`` + +Represents the size of the :ref:`ArrayCustomFormat` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Mesh_ArrayFormat: -.. _class_Mesh_constant_ARRAY_FORMAT_VERTEX: - -.. _class_Mesh_constant_ARRAY_FORMAT_NORMAL: - -.. _class_Mesh_constant_ARRAY_FORMAT_TANGENT: - -.. _class_Mesh_constant_ARRAY_FORMAT_COLOR: - -.. _class_Mesh_constant_ARRAY_FORMAT_TEX_UV: - -.. _class_Mesh_constant_ARRAY_FORMAT_TEX_UV2: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM0: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM1: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM2: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM3: - -.. _class_Mesh_constant_ARRAY_FORMAT_BONES: - -.. _class_Mesh_constant_ARRAY_FORMAT_WEIGHTS: - -.. _class_Mesh_constant_ARRAY_FORMAT_INDEX: - -.. _class_Mesh_constant_ARRAY_FORMAT_BLEND_SHAPE_MASK: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM_BASE: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM_BITS: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM0_SHIFT: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM1_SHIFT: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM2_SHIFT: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM3_SHIFT: - -.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM_MASK: - -.. _class_Mesh_constant_ARRAY_COMPRESS_FLAGS_BASE: - -.. _class_Mesh_constant_ARRAY_FLAG_USE_2D_VERTICES: - -.. _class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE: - -.. _class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS: +.. rst-class:: classref-enumeration enum **ArrayFormat**: -- **ARRAY_FORMAT_VERTEX** = **1** --- Mesh array contains vertices. All meshes require a vertex array so this should always be present. +.. _class_Mesh_constant_ARRAY_FORMAT_VERTEX: -- **ARRAY_FORMAT_NORMAL** = **2** --- Mesh array contains normals. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_TANGENT** = **4** --- Mesh array contains tangents. +:ref:`ArrayFormat` **ARRAY_FORMAT_VERTEX** = ``1`` -- **ARRAY_FORMAT_COLOR** = **8** --- Mesh array contains colors. +Mesh array contains vertices. All meshes require a vertex array so this should always be present. -- **ARRAY_FORMAT_TEX_UV** = **16** --- Mesh array contains UVs. +.. _class_Mesh_constant_ARRAY_FORMAT_NORMAL: -- **ARRAY_FORMAT_TEX_UV2** = **32** --- Mesh array contains second UV. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_CUSTOM0** = **64** --- Mesh array contains custom channel index 0. +:ref:`ArrayFormat` **ARRAY_FORMAT_NORMAL** = ``2`` -- **ARRAY_FORMAT_CUSTOM1** = **128** --- Mesh array contains custom channel index 1. +Mesh array contains normals. -- **ARRAY_FORMAT_CUSTOM2** = **256** --- Mesh array contains custom channel index 2. +.. _class_Mesh_constant_ARRAY_FORMAT_TANGENT: -- **ARRAY_FORMAT_CUSTOM3** = **512** --- Mesh array contains custom channel index 3. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_BONES** = **1024** --- Mesh array contains bones. +:ref:`ArrayFormat` **ARRAY_FORMAT_TANGENT** = ``4`` -- **ARRAY_FORMAT_WEIGHTS** = **2048** --- Mesh array contains bone weights. +Mesh array contains tangents. -- **ARRAY_FORMAT_INDEX** = **4096** --- Mesh array uses indices. +.. _class_Mesh_constant_ARRAY_FORMAT_COLOR: -- **ARRAY_FORMAT_BLEND_SHAPE_MASK** = **7** --- Mask of mesh channels permitted in blend shapes. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_CUSTOM_BASE** = **13** --- Shift of first custom channel. +:ref:`ArrayFormat` **ARRAY_FORMAT_COLOR** = ``8`` -- **ARRAY_FORMAT_CUSTOM_BITS** = **3** --- Number of format bits per custom channel. See :ref:`ArrayCustomFormat`. +Mesh array contains colors. -- **ARRAY_FORMAT_CUSTOM0_SHIFT** = **13** --- Amount to shift :ref:`ArrayCustomFormat` for custom channel index 0. +.. _class_Mesh_constant_ARRAY_FORMAT_TEX_UV: -- **ARRAY_FORMAT_CUSTOM1_SHIFT** = **16** --- Amount to shift :ref:`ArrayCustomFormat` for custom channel index 1. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_CUSTOM2_SHIFT** = **19** --- Amount to shift :ref:`ArrayCustomFormat` for custom channel index 2. +:ref:`ArrayFormat` **ARRAY_FORMAT_TEX_UV** = ``16`` -- **ARRAY_FORMAT_CUSTOM3_SHIFT** = **22** --- Amount to shift :ref:`ArrayCustomFormat` for custom channel index 3. +Mesh array contains UVs. -- **ARRAY_FORMAT_CUSTOM_MASK** = **7** --- Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See :ref:`ArrayCustomFormat`. +.. _class_Mesh_constant_ARRAY_FORMAT_TEX_UV2: -- **ARRAY_COMPRESS_FLAGS_BASE** = **25** --- Shift of first compress flag. Compress flags should be passed to :ref:`ArrayMesh.add_surface_from_arrays` and :ref:`SurfaceTool.commit`. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FLAG_USE_2D_VERTICES** = **33554432** --- Flag used to mark that the array contains 2D vertices. +:ref:`ArrayFormat` **ARRAY_FORMAT_TEX_UV2** = ``32`` -- **ARRAY_FLAG_USE_DYNAMIC_UPDATE** = **67108864** --- Flag indices that the mesh data will use ``GL_DYNAMIC_DRAW`` on GLES. Unused on Vulkan. +Mesh array contains second UV. -- **ARRAY_FLAG_USE_8_BONE_WEIGHTS** = **134217728** --- Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that :ref:`ARRAY_BONES` and :ref:`ARRAY_WEIGHTS` elements will have double length. +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM0: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM0** = ``64`` + +Mesh array contains custom channel index 0. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM1: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM1** = ``128`` + +Mesh array contains custom channel index 1. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM2** = ``256`` + +Mesh array contains custom channel index 2. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM3: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM3** = ``512`` + +Mesh array contains custom channel index 3. + +.. _class_Mesh_constant_ARRAY_FORMAT_BONES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_BONES** = ``1024`` + +Mesh array contains bones. + +.. _class_Mesh_constant_ARRAY_FORMAT_WEIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_WEIGHTS** = ``2048`` + +Mesh array contains bone weights. + +.. _class_Mesh_constant_ARRAY_FORMAT_INDEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_INDEX** = ``4096`` + +Mesh array uses indices. + +.. _class_Mesh_constant_ARRAY_FORMAT_BLEND_SHAPE_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_BLEND_SHAPE_MASK** = ``7`` + +Mask of mesh channels permitted in blend shapes. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM_BASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM_BASE** = ``13`` + +Shift of first custom channel. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM_BITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM_BITS** = ``3`` + +Number of format bits per custom channel. See :ref:`ArrayCustomFormat`. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM0_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM0_SHIFT** = ``13`` + +Amount to shift :ref:`ArrayCustomFormat` for custom channel index 0. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM1_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM1_SHIFT** = ``16`` + +Amount to shift :ref:`ArrayCustomFormat` for custom channel index 1. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM2_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM2_SHIFT** = ``19`` + +Amount to shift :ref:`ArrayCustomFormat` for custom channel index 2. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM3_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM3_SHIFT** = ``22`` + +Amount to shift :ref:`ArrayCustomFormat` for custom channel index 3. + +.. _class_Mesh_constant_ARRAY_FORMAT_CUSTOM_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM_MASK** = ``7`` + +Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See :ref:`ArrayCustomFormat`. + +.. _class_Mesh_constant_ARRAY_COMPRESS_FLAGS_BASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_COMPRESS_FLAGS_BASE** = ``25`` + +Shift of first compress flag. Compress flags should be passed to :ref:`ArrayMesh.add_surface_from_arrays` and :ref:`SurfaceTool.commit`. + +.. _class_Mesh_constant_ARRAY_FLAG_USE_2D_VERTICES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_USE_2D_VERTICES** = ``33554432`` + +Flag used to mark that the array contains 2D vertices. + +.. _class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_USE_DYNAMIC_UPDATE** = ``67108864`` + +Flag indices that the mesh data will use ``GL_DYNAMIC_DRAW`` on GLES. Unused on Vulkan. + +.. _class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_USE_8_BONE_WEIGHTS** = ``134217728`` + +Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that :ref:`ARRAY_BONES` and :ref:`ARRAY_WEIGHTS` elements will have double length. + +.. rst-class:: classref-item-separator ---- .. _enum_Mesh_BlendShapeMode: -.. _class_Mesh_constant_BLEND_SHAPE_MODE_NORMALIZED: - -.. _class_Mesh_constant_BLEND_SHAPE_MODE_RELATIVE: +.. rst-class:: classref-enumeration enum **BlendShapeMode**: -- **BLEND_SHAPE_MODE_NORMALIZED** = **0** --- Blend shapes are normalized. +.. _class_Mesh_constant_BLEND_SHAPE_MODE_NORMALIZED: -- **BLEND_SHAPE_MODE_RELATIVE** = **1** --- Blend shapes are relative to base weight. +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeMode` **BLEND_SHAPE_MODE_NORMALIZED** = ``0`` + +Blend shapes are normalized. + +.. _class_Mesh_constant_BLEND_SHAPE_MODE_RELATIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeMode` **BLEND_SHAPE_MODE_RELATIVE** = ``1`` + +Blend shapes are relative to base weight. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Mesh_property_lightmap_size_hint: -- :ref:`Vector2i` **lightmap_size_hint** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+-------------------------------+ -| *Setter* | set_lightmap_size_hint(value) | -+-----------+-------------------------------+ -| *Getter* | get_lightmap_size_hint() | -+-----------+-------------------------------+ +:ref:`Vector2i` **lightmap_size_hint** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_lightmap_size_hint** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_lightmap_size_hint** **(** **)** Sets a hint to be used for lightmap resolution. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Mesh_method__get_aabb: -- :ref:`AABB` **_get_aabb** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`AABB` **_get_aabb** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__get_blend_shape_count: -- :ref:`int` **_get_blend_shape_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_blend_shape_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__get_blend_shape_name: -- :ref:`StringName` **_get_blend_shape_name** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`StringName` **_get_blend_shape_name** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__get_surface_count: -- :ref:`int` **_get_surface_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_surface_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__set_blend_shape_name: -- void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| +.. rst-class:: classref-method + +void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_array_index_len: -- :ref:`int` **_surface_get_array_index_len** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_surface_get_array_index_len** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_array_len: -- :ref:`int` **_surface_get_array_len** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_surface_get_array_len** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_arrays: -- :ref:`Array` **_surface_get_arrays** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Array` **_surface_get_arrays** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_blend_shape_arrays: -- :ref:`Array[]` **_surface_get_blend_shape_arrays** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Array[]` **_surface_get_blend_shape_arrays** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_format: -- :ref:`int` **_surface_get_format** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_surface_get_format** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_lods: -- :ref:`Dictionary` **_surface_get_lods** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_surface_get_lods** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_material: -- :ref:`Material` **_surface_get_material** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Material` **_surface_get_material** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_get_primitive_type: -- :ref:`int` **_surface_get_primitive_type** **(** :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_surface_get_primitive_type** **(** :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method__surface_set_material: -- void **_surface_set_material** **(** :ref:`int` index, :ref:`Material` material **)** |virtual| +.. rst-class:: classref-method + +void **_surface_set_material** **(** :ref:`int` index, :ref:`Material` material **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_create_convex_shape: -- :ref:`Shape3D` **create_convex_shape** **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| +.. rst-class:: classref-method + +:ref:`ConvexPolygonShape3D` **create_convex_shape** **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| Calculate a :ref:`ConvexPolygonShape3D` from the mesh. @@ -517,87 +844,127 @@ If ``clean`` is ``true`` (default), duplicate and interior vertices are removed If ``simplify`` is ``true``, the geometry can be further simplified to reduce the number of vertices. Disabled by default. +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_create_outline: -- :ref:`Mesh` **create_outline** **(** :ref:`float` margin **)** |const| +.. rst-class:: classref-method + +:ref:`Mesh` **create_outline** **(** :ref:`float` margin **)** |const| Calculate an outline mesh at a defined offset (margin) from the original mesh. \ **Note:** This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise). +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_create_trimesh_shape: -- :ref:`Shape3D` **create_trimesh_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`ConcavePolygonShape3D` **create_trimesh_shape** **(** **)** |const| Calculate a :ref:`ConcavePolygonShape3D` from the mesh. +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_generate_triangle_mesh: -- :ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| Generate a :ref:`TriangleMesh` from the mesh. Considers only surfaces using one of these primitive types: :ref:`PRIMITIVE_TRIANGLES`, :ref:`PRIMITIVE_TRIANGLE_STRIP`. +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_get_aabb: -- :ref:`AABB` **get_aabb** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **get_aabb** **(** **)** |const| Returns the smallest :ref:`AABB` enclosing this mesh in local space. Not affected by ``custom_aabb``. \ **Note:** This is only implemented for :ref:`ArrayMesh` and :ref:`PrimitiveMesh`. +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_get_faces: -- :ref:`PackedVector3Array` **get_faces** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_faces** **(** **)** |const| Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_get_surface_count: -- :ref:`int` **get_surface_count** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of surfaces that the ``Mesh`` holds. +:ref:`int` **get_surface_count** **(** **)** |const| + +Returns the number of surfaces that the **Mesh** holds. + +.. rst-class:: classref-item-separator ---- .. _class_Mesh_method_surface_get_arrays: -- :ref:`Array` **surface_get_arrays** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **surface_get_arrays** **(** :ref:`int` surf_idx **)** |const| Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see :ref:`ArrayMesh.add_surface_from_arrays`). +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_surface_get_blend_shape_arrays: -- :ref:`Array[]` **surface_get_blend_shape_arrays** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Array[]` **surface_get_blend_shape_arrays** **(** :ref:`int` surf_idx **)** |const| Returns the blend shape arrays for the requested surface. +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_surface_get_material: -- :ref:`Material` **surface_get_material** **(** :ref:`int` surf_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Material` **surface_get_material** **(** :ref:`int` surf_idx **)** |const| Returns a :ref:`Material` in a given surface. Surface is rendered using this material. +.. rst-class:: classref-item-separator + ---- .. _class_Mesh_method_surface_set_material: -- void **surface_set_material** **(** :ref:`int` surf_idx, :ref:`Material` material **)** +.. rst-class:: classref-method + +void **surface_set_material** **(** :ref:`int` surf_idx, :ref:`Material` material **)** Sets a :ref:`Material` for a given surface. Surface will be rendered using this material. diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 23879f9ca..778e5b1b2 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -14,6 +14,8 @@ MeshDataTool Helper tool to access and edit :ref:`Mesh` data. +.. rst-class:: classref-introduction-group + Description ----------- @@ -70,399 +72,560 @@ See also :ref:`ArrayMesh`, :ref:`ImmediateMesh`__ for front faces of triangle primitive modes. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`commit_to_surface` **(** :ref:`ArrayMesh` mesh **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_from_surface` **(** :ref:`ArrayMesh` mesh, :ref:`int` surface **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_edge_count` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_edge_faces` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_edge_meta` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_edge_vertex` **(** :ref:`int` idx, :ref:`int` vertex **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_face_count` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_face_edge` **(** :ref:`int` idx, :ref:`int` edge **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_face_meta` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_face_normal` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_face_vertex` **(** :ref:`int` idx, :ref:`int` vertex **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_format` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Material` | :ref:`get_material` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_vertex` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_vertex_bones` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_vertex_color` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_vertex_count` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_vertex_edges` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_vertex_faces` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_vertex_meta` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_vertex_normal` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`get_vertex_tangent` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_vertex_uv` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_vertex_uv2` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`get_vertex_weights` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_edge_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_face_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_material` **(** :ref:`Material` material **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex` **(** :ref:`int` idx, :ref:`Vector3` vertex **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_bones` **(** :ref:`int` idx, :ref:`PackedInt32Array` bones **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_color` **(** :ref:`int` idx, :ref:`Color` color **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_normal` **(** :ref:`int` idx, :ref:`Vector3` normal **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_tangent` **(** :ref:`int` idx, :ref:`Plane` tangent **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_uv` **(** :ref:`int` idx, :ref:`Vector2` uv **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_uv2` **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_weights` **(** :ref:`int` idx, :ref:`PackedFloat32Array` weights **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`commit_to_surface` **(** :ref:`ArrayMesh` mesh **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_from_surface` **(** :ref:`ArrayMesh` mesh, :ref:`int` surface **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_edge_count` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_edge_faces` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_edge_meta` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_edge_vertex` **(** :ref:`int` idx, :ref:`int` vertex **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_face_count` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_face_edge` **(** :ref:`int` idx, :ref:`int` edge **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_face_meta` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_face_normal` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_face_vertex` **(** :ref:`int` idx, :ref:`int` vertex **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_format` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_material` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_vertex` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_vertex_bones` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_vertex_color` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_vertex_count` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_vertex_edges` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_vertex_faces` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_vertex_meta` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_vertex_normal` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`get_vertex_tangent` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_vertex_uv` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_vertex_uv2` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_vertex_weights` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_edge_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_face_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_material` **(** :ref:`Material` material **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex` **(** :ref:`int` idx, :ref:`Vector3` vertex **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_bones` **(** :ref:`int` idx, :ref:`PackedInt32Array` bones **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_color` **(** :ref:`int` idx, :ref:`Color` color **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_normal` **(** :ref:`int` idx, :ref:`Vector3` normal **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_tangent` **(** :ref:`int` idx, :ref:`Plane` tangent **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_uv` **(** :ref:`int` idx, :ref:`Vector2` uv **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_uv2` **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex_weights` **(** :ref:`int` idx, :ref:`PackedFloat32Array` weights **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MeshDataTool_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears all data currently in MeshDataTool. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_commit_to_surface: -- :ref:`Error` **commit_to_surface** **(** :ref:`ArrayMesh` mesh **)** +.. rst-class:: classref-method + +:ref:`Error` **commit_to_surface** **(** :ref:`ArrayMesh` mesh **)** Adds a new surface to specified :ref:`Mesh` with edited data. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_create_from_surface: -- :ref:`Error` **create_from_surface** **(** :ref:`ArrayMesh` mesh, :ref:`int` surface **)** +.. rst-class:: classref-method + +:ref:`Error` **create_from_surface** **(** :ref:`ArrayMesh` mesh, :ref:`int` surface **)** Uses specified surface of given :ref:`Mesh` to populate data for MeshDataTool. Requires :ref:`Mesh` with primitive type :ref:`Mesh.PRIMITIVE_TRIANGLES`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_edge_count: -- :ref:`int` **get_edge_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_edge_count** **(** **)** |const| Returns the number of edges in this :ref:`Mesh`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_edge_faces: -- :ref:`PackedInt32Array` **get_edge_faces** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_edge_faces** **(** :ref:`int` idx **)** |const| Returns array of faces that touch given edge. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_edge_meta: -- :ref:`Variant` **get_edge_meta** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_edge_meta** **(** :ref:`int` idx **)** |const| Returns meta information assigned to given edge. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_edge_vertex: -- :ref:`int` **get_edge_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_edge_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** |const| Returns index of specified vertex connected to given edge. Vertex argument can only be 0 or 1 because edges are comprised of two vertices. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_face_count: -- :ref:`int` **get_face_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_face_count** **(** **)** |const| Returns the number of faces in this :ref:`Mesh`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_face_edge: -- :ref:`int` **get_face_edge** **(** :ref:`int` idx, :ref:`int` edge **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_face_edge** **(** :ref:`int` idx, :ref:`int` edge **)** |const| Returns specified edge associated with given face. Edge argument must be either 0, 1, or 2 because a face only has three edges. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_face_meta: -- :ref:`Variant` **get_face_meta** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_face_meta** **(** :ref:`int` idx **)** |const| Returns the metadata associated with the given face. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_face_normal: -- :ref:`Vector3` **get_face_normal** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_face_normal** **(** :ref:`int` idx **)** |const| Calculates and returns the face normal of the given face. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_face_vertex: -- :ref:`int` **get_face_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_face_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** |const| Returns the specified vertex of the given face. Vertex argument must be either 0, 1, or 2 because faces contain three vertices. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_format: -- :ref:`int` **get_format** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_format** **(** **)** |const| Returns the :ref:`Mesh`'s format. Format is an integer made up of :ref:`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` is ``1`` and :ref:`Mesh.ARRAY_FORMAT_NORMAL` is ``2``. See :ref:`ArrayFormat` for a list of format flags. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_material: -- :ref:`Material` **get_material** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Material` **get_material** **(** **)** |const| Returns the material assigned to the :ref:`Mesh`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex: -- :ref:`Vector3` **get_vertex** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_vertex** **(** :ref:`int` idx **)** |const| Returns the vertex at given index. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_bones: -- :ref:`PackedInt32Array` **get_vertex_bones** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_vertex_bones** **(** :ref:`int` idx **)** |const| Returns the bones of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_color: -- :ref:`Color` **get_vertex_color** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_vertex_color** **(** :ref:`int` idx **)** |const| Returns the color of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_count: -- :ref:`int` **get_vertex_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_vertex_count** **(** **)** |const| Returns the total number of vertices in :ref:`Mesh`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_edges: -- :ref:`PackedInt32Array` **get_vertex_edges** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_vertex_edges** **(** :ref:`int` idx **)** |const| Returns an array of edges that share the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_faces: -- :ref:`PackedInt32Array` **get_vertex_faces** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_vertex_faces** **(** :ref:`int` idx **)** |const| Returns an array of faces that share the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_meta: -- :ref:`Variant` **get_vertex_meta** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_vertex_meta** **(** :ref:`int` idx **)** |const| Returns the metadata associated with the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_normal: -- :ref:`Vector3` **get_vertex_normal** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_vertex_normal** **(** :ref:`int` idx **)** |const| Returns the normal of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_tangent: -- :ref:`Plane` **get_vertex_tangent** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Plane` **get_vertex_tangent** **(** :ref:`int` idx **)** |const| Returns the tangent of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_uv: -- :ref:`Vector2` **get_vertex_uv** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_vertex_uv** **(** :ref:`int` idx **)** |const| Returns the UV of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_uv2: -- :ref:`Vector2` **get_vertex_uv2** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_vertex_uv2** **(** :ref:`int` idx **)** |const| Returns the UV2 of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_get_vertex_weights: -- :ref:`PackedFloat32Array` **get_vertex_weights** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **get_vertex_weights** **(** :ref:`int` idx **)** |const| Returns bone weights of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_edge_meta: -- void **set_edge_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** +.. rst-class:: classref-method + +void **set_edge_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** Sets the metadata of the given edge. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_face_meta: -- void **set_face_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** +.. rst-class:: classref-method + +void **set_face_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** Sets the metadata of the given face. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_material: -- void **set_material** **(** :ref:`Material` material **)** +.. rst-class:: classref-method + +void **set_material** **(** :ref:`Material` material **)** Sets the material to be used by newly-constructed :ref:`Mesh`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex: -- void **set_vertex** **(** :ref:`int` idx, :ref:`Vector3` vertex **)** +.. rst-class:: classref-method + +void **set_vertex** **(** :ref:`int` idx, :ref:`Vector3` vertex **)** Sets the position of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_bones: -- void **set_vertex_bones** **(** :ref:`int` idx, :ref:`PackedInt32Array` bones **)** +.. rst-class:: classref-method + +void **set_vertex_bones** **(** :ref:`int` idx, :ref:`PackedInt32Array` bones **)** Sets the bones of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_color: -- void **set_vertex_color** **(** :ref:`int` idx, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_vertex_color** **(** :ref:`int` idx, :ref:`Color` color **)** Sets the color of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_meta: -- void **set_vertex_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** +.. rst-class:: classref-method + +void **set_vertex_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** Sets the metadata associated with the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_normal: -- void **set_vertex_normal** **(** :ref:`int` idx, :ref:`Vector3` normal **)** +.. rst-class:: classref-method + +void **set_vertex_normal** **(** :ref:`int` idx, :ref:`Vector3` normal **)** Sets the normal of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_tangent: -- void **set_vertex_tangent** **(** :ref:`int` idx, :ref:`Plane` tangent **)** +.. rst-class:: classref-method + +void **set_vertex_tangent** **(** :ref:`int` idx, :ref:`Plane` tangent **)** Sets the tangent of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_uv: -- void **set_vertex_uv** **(** :ref:`int` idx, :ref:`Vector2` uv **)** +.. rst-class:: classref-method + +void **set_vertex_uv** **(** :ref:`int` idx, :ref:`Vector2` uv **)** Sets the UV of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_uv2: -- void **set_vertex_uv2** **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** +.. rst-class:: classref-method + +void **set_vertex_uv2** **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** Sets the UV2 of the given vertex. +.. rst-class:: classref-item-separator + ---- .. _class_MeshDataTool_method_set_vertex_weights: -- void **set_vertex_weights** **(** :ref:`int` idx, :ref:`PackedFloat32Array` weights **)** +.. rst-class:: classref-method + +void **set_vertex_weights** **(** :ref:`int` idx, :ref:`PackedFloat32Array` weights **)** Sets the bone weights of the given vertex. diff --git a/classes/class_meshinstance2d.rst b/classes/class_meshinstance2d.rst index d8a8f94da..1141a89b0 100644 --- a/classes/class_meshinstance2d.rst +++ b/classes/class_meshinstance2d.rst @@ -14,78 +14,108 @@ MeshInstance2D Node used for displaying a :ref:`Mesh` in 2D. +.. rst-class:: classref-introduction-group + Description ----------- -Node used for displaying a :ref:`Mesh` in 2D. A ``MeshInstance2D`` can be automatically created from an existing :ref:`Sprite2D` via a tool in the editor toolbar. Select the :ref:`Sprite2D` node, then choose **Sprite2D > Convert to MeshInstance2D** at the top of the 2D editor viewport. +Node used for displaying a :ref:`Mesh` in 2D. A **MeshInstance2D** can be automatically created from an existing :ref:`Sprite2D` via a tool in the editor toolbar. Select the :ref:`Sprite2D` node, then choose **Sprite2D > Convert to MeshInstance2D** at the top of the 2D editor viewport. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`2D meshes <../tutorials/2d/2d_meshes>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+-------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`mesh` | -+-----------------------------------+-------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`normal_map` | -+-----------------------------------+-------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture` | -+-----------------------------------+-------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`mesh` | + +-----------------------------------+-------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`normal_map` | + +-----------------------------------+-------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture` | + +-----------------------------------+-------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MeshInstance2D_signal_texture_changed: -- **texture_changed** **(** **)** +.. rst-class:: classref-signal + +**texture_changed** **(** **)** Emitted when the :ref:`texture` is changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_MeshInstance2D_property_mesh: -- :ref:`Mesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`Mesh` **mesh** -The :ref:`Mesh` that will be drawn by the ``MeshInstance2D``. +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`Mesh` value **)** +- :ref:`Mesh` **get_mesh** **(** **)** + +The :ref:`Mesh` that will be drawn by the **MeshInstance2D**. + +.. rst-class:: classref-item-separator ---- .. _class_MeshInstance2D_property_normal_map: -- :ref:`Texture2D` **normal_map** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_normal_map(value) | -+----------+-----------------------+ -| *Getter* | get_normal_map() | -+----------+-----------------------+ +:ref:`Texture2D` **normal_map** + +.. rst-class:: classref-property-setget + +- void **set_normal_map** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_normal_map** **(** **)** The normal map that will be used if using the default :ref:`CanvasItemMaterial`. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The :ref:`Texture2D` that will be used if using the default :ref:`CanvasItemMaterial`. Can be accessed as ``TEXTURE`` in CanvasItem shader. diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index 5f56313bf..5aeeadae6 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -16,11 +16,15 @@ MeshInstance3D Node that instances meshes into a scenario. +.. rst-class:: classref-introduction-group + Description ----------- MeshInstance3D is a node that takes a :ref:`Mesh` resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single :ref:`Mesh` in many places. This allows reusing geometry, which can save on resources. When a :ref:`Mesh` has to be instantiated more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance3D` instead. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,97 +36,126 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+---------------------------------------------------------+--------------------+ -| :ref:`Mesh` | :ref:`mesh` | | -+---------------------------------+---------------------------------------------------------+--------------------+ -| :ref:`NodePath` | :ref:`skeleton` | ``NodePath("..")`` | -+---------------------------------+---------------------------------------------------------+--------------------+ -| :ref:`Skin` | :ref:`skin` | | -+---------------------------------+---------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------+--------------------+ + | :ref:`Mesh` | :ref:`mesh` | | + +---------------------------------+---------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`skeleton` | ``NodePath("..")`` | + +---------------------------------+---------------------------------------------------------+--------------------+ + | :ref:`Skin` | :ref:`skin` | | + +---------------------------------+---------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_convex_collision` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_debug_tangents` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_multiple_convex_collisions` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_trimesh_collision` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_blend_shape_by_name` **(** :ref:`StringName` name **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Material` | :ref:`get_active_material` **(** :ref:`int` surface **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_blend_shape_value` **(** :ref:`int` blend_shape_idx **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Material` | :ref:`get_surface_override_material` **(** :ref:`int` surface **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_surface_override_material_count` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_blend_shape_value` **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_surface_override_material` **(** :ref:`int` surface, :ref:`Material` material **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_convex_collision` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_debug_tangents` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_multiple_convex_collisions` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_trimesh_collision` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_blend_shape_by_name` **(** :ref:`StringName` name **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_active_material` **(** :ref:`int` surface **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_shape_value` **(** :ref:`int` blend_shape_idx **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_surface_override_material` **(** :ref:`int` surface **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_override_material_count` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_blend_shape_value` **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_surface_override_material` **(** :ref:`int` surface, :ref:`Material` material **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MeshInstance3D_property_mesh: -- :ref:`Mesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`Mesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`Mesh` value **)** +- :ref:`Mesh` **get_mesh** **(** **)** The :ref:`Mesh` resource for the instance. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_property_skeleton: -- :ref:`NodePath` **skeleton** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``NodePath("..")`` | -+-----------+--------------------------+ -| *Setter* | set_skeleton_path(value) | -+-----------+--------------------------+ -| *Getter* | get_skeleton_path() | -+-----------+--------------------------+ +:ref:`NodePath` **skeleton** = ``NodePath("..")`` + +.. rst-class:: classref-property-setget + +- void **set_skeleton_path** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_skeleton_path** **(** **)** :ref:`NodePath` to the :ref:`Skeleton3D` associated with the instance. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_property_skin: -- :ref:`Skin` **skin** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_skin(value) | -+----------+-----------------+ -| *Getter* | get_skin() | -+----------+-----------------+ +:ref:`Skin` **skin** + +.. rst-class:: classref-property-setget + +- void **set_skin** **(** :ref:`Skin` value **)** +- :ref:`Skin` **get_skin** **(** **)** Sets the skin to be used by this instance. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_MeshInstance3D_method_create_convex_collision: -- void **create_convex_collision** **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** +.. rst-class:: classref-method + +void **create_convex_collision** **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** This helper creates a :ref:`StaticBody3D` child node with a :ref:`ConvexPolygonShape3D` collision shape calculated from the mesh geometry. It's mainly used for testing. @@ -130,101 +163,145 @@ If ``clean`` is ``true`` (default), duplicate and interior vertices are removed If ``simplify`` is ``true``, the geometry can be further simplified to reduce the number of vertices. Disabled by default. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_create_debug_tangents: -- void **create_debug_tangents** **(** **)** +.. rst-class:: classref-method -This helper creates a ``MeshInstance3D`` child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. +void **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. + +.. rst-class:: classref-item-separator ---- .. _class_MeshInstance3D_method_create_multiple_convex_collisions: -- void **create_multiple_convex_collisions** **(** **)** +.. rst-class:: classref-method + +void **create_multiple_convex_collisions** **(** **)** This helper creates a :ref:`StaticBody3D` child node with multiple :ref:`ConvexPolygonShape3D` collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_create_trimesh_collision: -- void **create_trimesh_collision** **(** **)** +.. rst-class:: classref-method + +void **create_trimesh_collision** **(** **)** This helper creates a :ref:`StaticBody3D` child node with a :ref:`ConcavePolygonShape3D` collision shape calculated from the mesh geometry. It's mainly used for testing. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_find_blend_shape_by_name: -- :ref:`int` **find_blend_shape_by_name** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +:ref:`int` **find_blend_shape_by_name** **(** :ref:`StringName` name **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_get_active_material: -- :ref:`Material` **get_active_material** **(** :ref:`int` surface **)** |const| +.. rst-class:: classref-method -Returns the :ref:`Material` that will be used by the :ref:`Mesh` when drawing. This can return the :ref:`GeometryInstance3D.material_override`, the surface override :ref:`Material` defined in this ``MeshInstance3D``, or the surface :ref:`Material` defined in the :ref:`Mesh`. For example, if :ref:`GeometryInstance3D.material_override` is used, all surfaces will return the override material. +:ref:`Material` **get_active_material** **(** :ref:`int` surface **)** |const| + +Returns the :ref:`Material` that will be used by the :ref:`Mesh` when drawing. This can return the :ref:`GeometryInstance3D.material_override`, the surface override :ref:`Material` defined in this **MeshInstance3D**, or the surface :ref:`Material` defined in the :ref:`Mesh`. For example, if :ref:`GeometryInstance3D.material_override` is used, all surfaces will return the override material. + +.. rst-class:: classref-item-separator ---- .. _class_MeshInstance3D_method_get_blend_shape_count: -- :ref:`int` **get_blend_shape_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_blend_shape_count** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_get_blend_shape_value: -- :ref:`float` **get_blend_shape_value** **(** :ref:`int` blend_shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_blend_shape_value** **(** :ref:`int` blend_shape_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_get_surface_override_material: -- :ref:`Material` **get_surface_override_material** **(** :ref:`int` surface **)** |const| +.. rst-class:: classref-method + +:ref:`Material` **get_surface_override_material** **(** :ref:`int` surface **)** |const| Returns the override :ref:`Material` for the specified surface of the :ref:`Mesh` resource. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_get_surface_override_material_count: -- :ref:`int` **get_surface_override_material_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_surface_override_material_count** **(** **)** |const| Returns the number of surface override materials. This is equivalent to :ref:`Mesh.get_surface_count`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_set_blend_shape_value: -- void **set_blend_shape_value** **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_blend_shape_value** **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_MeshInstance3D_method_set_surface_override_material: -- void **set_surface_override_material** **(** :ref:`int` surface, :ref:`Material` material **)** +.. rst-class:: classref-method -Sets the override :ref:`Material` for the specified surface of the :ref:`Mesh` resource. This material is associated with this ``MeshInstance3D`` rather than with the :ref:`Mesh` resource. +void **set_surface_override_material** **(** :ref:`int` surface, :ref:`Material` material **)** + +Sets the override :ref:`Material` for the specified surface of the :ref:`Mesh` resource. This material is associated with this **MeshInstance3D** rather than with the :ref:`Mesh` 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.)` diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index 499544245..7ba1e38a2 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -14,11 +14,15 @@ MeshLibrary Library of meshes. +.. rst-class:: classref-introduction-group + Description ----------- A library of meshes. Contains a list of :ref:`Mesh` resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in :ref:`GridMap`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,215 +30,304 @@ Tutorials - `3D Platformer Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_item` **(** :ref:`int` id **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_item_by_name` **(** :ref:`String` name **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_item_list` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`get_item_mesh` **(** :ref:`int` id **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_item_mesh_transform` **(** :ref:`int` id **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_name` **(** :ref:`int` id **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NavigationMesh` | :ref:`get_item_navmesh` **(** :ref:`int` id **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_item_navmesh_transform` **(** :ref:`int` id **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_item_preview` **(** :ref:`int` id **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_item_shapes` **(** :ref:`int` id **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_last_unused_item_id` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` id **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_mesh` **(** :ref:`int` id, :ref:`Mesh` mesh **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_mesh_transform` **(** :ref:`int` id, :ref:`Transform3D` mesh_transform **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_name` **(** :ref:`int` id, :ref:`String` name **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_navmesh` **(** :ref:`int` id, :ref:`NavigationMesh` navmesh **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_navmesh_transform` **(** :ref:`int` id, :ref:`Transform3D` navmesh **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_preview` **(** :ref:`int` id, :ref:`Texture2D` texture **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_shapes` **(** :ref:`int` id, :ref:`Array` shapes **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_item` **(** :ref:`int` id **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_item_by_name` **(** :ref:`String` name **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_item_list` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`get_item_mesh` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_item_mesh_transform` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_name` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationMesh` | :ref:`get_item_navmesh` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_item_navmesh_transform` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_item_preview` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_item_shapes` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_last_unused_item_id` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_item` **(** :ref:`int` id **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_mesh` **(** :ref:`int` id, :ref:`Mesh` mesh **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_mesh_transform` **(** :ref:`int` id, :ref:`Transform3D` mesh_transform **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_name` **(** :ref:`int` id, :ref:`String` name **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_navmesh` **(** :ref:`int` id, :ref:`NavigationMesh` navmesh **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_navmesh_transform` **(** :ref:`int` id, :ref:`Transform3D` navmesh **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_preview` **(** :ref:`int` id, :ref:`Texture2D` texture **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_shapes` **(** :ref:`int` id, :ref:`Array` shapes **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MeshLibrary_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the library. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_create_item: -- void **create_item** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **create_item** **(** :ref:`int` id **)** Creates a new item in the library with the given ID. You can get an unused ID from :ref:`get_last_unused_item_id`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_find_item_by_name: -- :ref:`int` **find_item_by_name** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find_item_by_name** **(** :ref:`String` name **)** |const| Returns the first item with the given name. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_list: -- :ref:`PackedInt32Array` **get_item_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_item_list** **(** **)** |const| Returns the list of item IDs in use. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_mesh: -- :ref:`Mesh` **get_item_mesh** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Mesh` **get_item_mesh** **(** :ref:`int` id **)** |const| Returns the item's mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_mesh_transform: -- :ref:`Transform3D` **get_item_mesh_transform** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_item_mesh_transform** **(** :ref:`int` id **)** |const| Returns the transform applied to the item's mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_name: -- :ref:`String` **get_item_name** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_name** **(** :ref:`int` id **)** |const| Returns the item's name. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_navmesh: -- :ref:`NavigationMesh` **get_item_navmesh** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`NavigationMesh` **get_item_navmesh** **(** :ref:`int` id **)** |const| Returns the item's navigation mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_navmesh_transform: -- :ref:`Transform3D` **get_item_navmesh_transform** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_item_navmesh_transform** **(** :ref:`int` id **)** |const| Returns the transform applied to the item's navigation mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_preview: -- :ref:`Texture2D` **get_item_preview** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_item_preview** **(** :ref:`int` id **)** |const| 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`. Returns an empty :ref:`Texture2D` if no preview was manually set in a running project. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_item_shapes: -- :ref:`Array` **get_item_shapes** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_item_shapes** **(** :ref:`int` id **)** |const| Returns an item's collision shapes. The array consists of each :ref:`Shape3D` followed by its :ref:`Transform3D`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_get_last_unused_item_id: -- :ref:`int` **get_last_unused_item_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_last_unused_item_id** **(** **)** |const| Gets an unused ID for a new item. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_remove_item: -- void **remove_item** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_item** **(** :ref:`int` id **)** Removes the item. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_set_item_mesh: -- void **set_item_mesh** **(** :ref:`int` id, :ref:`Mesh` mesh **)** +.. rst-class:: classref-method + +void **set_item_mesh** **(** :ref:`int` id, :ref:`Mesh` mesh **)** Sets the item's mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_set_item_mesh_transform: -- void **set_item_mesh_transform** **(** :ref:`int` id, :ref:`Transform3D` mesh_transform **)** +.. rst-class:: classref-method + +void **set_item_mesh_transform** **(** :ref:`int` id, :ref:`Transform3D` mesh_transform **)** Sets the transform to apply to the item's mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_set_item_name: -- void **set_item_name** **(** :ref:`int` id, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_item_name** **(** :ref:`int` id, :ref:`String` name **)** Sets the item's name. This name is shown in the editor. It can also be used to look up the item later using :ref:`find_item_by_name`. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_set_item_navmesh: -- void **set_item_navmesh** **(** :ref:`int` id, :ref:`NavigationMesh` navmesh **)** +.. rst-class:: classref-method + +void **set_item_navmesh** **(** :ref:`int` id, :ref:`NavigationMesh` navmesh **)** Sets the item's navigation mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_set_item_navmesh_transform: -- void **set_item_navmesh_transform** **(** :ref:`int` id, :ref:`Transform3D` navmesh **)** +.. rst-class:: classref-method + +void **set_item_navmesh_transform** **(** :ref:`int` id, :ref:`Transform3D` navmesh **)** Sets the transform to apply to the item's navigation mesh. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_set_item_preview: -- void **set_item_preview** **(** :ref:`int` id, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_item_preview** **(** :ref:`int` id, :ref:`Texture2D` texture **)** Sets a texture to use as the item's preview icon in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_MeshLibrary_method_set_item_shapes: -- void **set_item_shapes** **(** :ref:`int` id, :ref:`Array` shapes **)** +.. rst-class:: classref-method + +void **set_item_shapes** **(** :ref:`int` id, :ref:`Array` shapes **)** Sets an item's collision shapes. diff --git a/classes/class_meshtexture.rst b/classes/class_meshtexture.rst index 1979b0f83..7d04f8474 100644 --- a/classes/class_meshtexture.rst +++ b/classes/class_meshtexture.rst @@ -14,66 +14,84 @@ MeshTexture Simple texture that uses a mesh to draw itself. +.. rst-class:: classref-introduction-group + Description ----------- Simple texture that uses a mesh to draw itself. It's limited because flags can't be changed and region drawing is not supported. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`base_texture` | | -+-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`image_size` | ``Vector2(0, 0)`` | -+-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`mesh` | | -+-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`base_texture` | | + +-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`image_size` | ``Vector2(0, 0)`` | + +-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`mesh` | | + +-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-----------------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MeshTexture_property_base_texture: -- :ref:`Texture2D` **base_texture** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_base_texture(value) | -+----------+-------------------------+ -| *Getter* | get_base_texture() | -+----------+-------------------------+ +:ref:`Texture2D` **base_texture** + +.. rst-class:: classref-property-setget + +- void **set_base_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_base_texture** **(** **)** Sets the base texture that the Mesh will use to draw. +.. rst-class:: classref-item-separator + ---- .. _class_MeshTexture_property_image_size: -- :ref:`Vector2` **image_size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_image_size(value) | -+-----------+-----------------------+ -| *Getter* | get_image_size() | -+-----------+-----------------------+ +:ref:`Vector2` **image_size** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_image_size** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_image_size** **(** **)** Sets the size of the image, needed for reference. +.. rst-class:: classref-item-separator + ---- .. _class_MeshTexture_property_mesh: -- :ref:`Mesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`Mesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`Mesh` value **)** +- :ref:`Mesh` **get_mesh** **(** **)** Sets the mesh used to draw. It must be a mesh using 2D vertices. diff --git a/classes/class_methodtweener.rst b/classes/class_methodtweener.rst index 92eb65a18..320c66da2 100644 --- a/classes/class_methodtweener.rst +++ b/classes/class_methodtweener.rst @@ -14,46 +14,69 @@ MethodTweener Interpolates an abstract value and supplies it to a method called over time. +.. rst-class:: classref-introduction-group + Description ----------- -``MethodTweener`` is similar to a combination of :ref:`CallbackTweener` and :ref:`PropertyTweener`. It calls a method providing an interpolated value as a parameter. See :ref:`Tween.tween_method` for more usage information. +**MethodTweener** is similar to a combination of :ref:`CallbackTweener` and :ref:`PropertyTweener`. It calls a method providing an interpolated value as a parameter. See :ref:`Tween.tween_method` for more usage information. -\ **Note:** :ref:`Tween.tween_method` is the only correct way to create ``MethodTweener``. Any ``MethodTweener`` created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_method` is the only correct way to create **MethodTweener**. Any **MethodTweener** created manually will not function correctly. + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MethodTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MethodTweener` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MethodTweener` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | -+-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MethodTweener_method_set_delay: -- :ref:`MethodTweener` **set_delay** **(** :ref:`float` delay **)** +.. rst-class:: classref-method -Sets the time in seconds after which the ``MethodTweener`` will start interpolating. By default there's no delay. +:ref:`MethodTweener` **set_delay** **(** :ref:`float` delay **)** + +Sets the time in seconds after which the **MethodTweener** will start interpolating. By default there's no delay. + +.. rst-class:: classref-item-separator ---- .. _class_MethodTweener_method_set_ease: -- :ref:`MethodTweener` **set_ease** **(** :ref:`EaseType` ease **)** +.. rst-class:: classref-method + +:ref:`MethodTweener` **set_ease** **(** :ref:`EaseType` ease **)** Sets the type of used easing from :ref:`EaseType`. If not set, the default easing is used from the :ref:`Tween` that contains this Tweener. +.. rst-class:: classref-item-separator + ---- .. _class_MethodTweener_method_set_trans: -- :ref:`MethodTweener` **set_trans** **(** :ref:`TransitionType` trans **)** +.. rst-class:: classref-method + +:ref:`MethodTweener` **set_trans** **(** :ref:`TransitionType` trans **)** Sets the type of used transition from :ref:`TransitionType`. If not set, the default transition is used from the :ref:`Tween` that contains this Tweener. diff --git a/classes/class_missingnode.rst b/classes/class_missingnode.rst index b89fcece5..0e9f51984 100644 --- a/classes/class_missingnode.rst +++ b/classes/class_missingnode.rst @@ -14,48 +14,65 @@ MissingNode This is an internal editor class intended for keeping data of nodes of unknown type. +.. rst-class:: classref-introduction-group + 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. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`original_class` | -+-----------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`recording_properties` | -+-----------------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`original_class` | + +-----------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`recording_properties` | + +-----------------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MissingNode_property_original_class: -- :ref:`String` **original_class** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_original_class(value) | -+----------+---------------------------+ -| *Getter* | get_original_class() | -+----------+---------------------------+ +:ref:`String` **original_class** + +.. rst-class:: classref-property-setget + +- void **set_original_class** **(** :ref:`String` value **)** +- :ref:`String` **get_original_class** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_MissingNode_property_recording_properties: -- :ref:`bool` **recording_properties** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_recording_properties(value) | -+----------+---------------------------------+ -| *Getter* | is_recording_properties() | -+----------+---------------------------------+ +:ref:`bool` **recording_properties** + +.. rst-class:: classref-property-setget + +- void **set_recording_properties** **(** :ref:`bool` value **)** +- :ref:`bool` **is_recording_properties** **(** **)** .. container:: contribute diff --git a/classes/class_missingresource.rst b/classes/class_missingresource.rst index 3cb00b5cd..d912a25b4 100644 --- a/classes/class_missingresource.rst +++ b/classes/class_missingresource.rst @@ -14,48 +14,65 @@ MissingResource This is an internal editor class intended for keeping data of resources of unknown type. +.. rst-class:: classref-introduction-group + 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. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+----------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`original_class` | -+-----------------------------+----------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`recording_properties` | -+-----------------------------+----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`original_class` | + +-----------------------------+----------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`recording_properties` | + +-----------------------------+----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MissingResource_property_original_class: -- :ref:`String` **original_class** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_original_class(value) | -+----------+---------------------------+ -| *Getter* | get_original_class() | -+----------+---------------------------+ +:ref:`String` **original_class** + +.. rst-class:: classref-property-setget + +- void **set_original_class** **(** :ref:`String` value **)** +- :ref:`String` **get_original_class** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_MissingResource_property_recording_properties: -- :ref:`bool` **recording_properties** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_recording_properties(value) | -+----------+---------------------------------+ -| *Getter* | is_recording_properties() | -+----------+---------------------------------+ +:ref:`bool` **recording_properties** + +.. rst-class:: classref-property-setget + +- void **set_recording_properties** **(** :ref:`bool` value **)** +- :ref:`bool` **is_recording_properties** **(** **)** .. container:: contribute diff --git a/classes/class_mobilevrinterface.rst b/classes/class_mobilevrinterface.rst index 4212c9911..487dd2b23 100644 --- a/classes/class_mobilevrinterface.rst +++ b/classes/class_mobilevrinterface.rst @@ -14,6 +14,8 @@ MobileVRInterface Generic mobile VR implementation. +.. rst-class:: classref-introduction-group + Description ----------- @@ -29,137 +31,153 @@ You can initialize this interface as follows: if interface and interface.initialize(): get_viewport().xr = true +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`display_to_lens` | ``4.0`` | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`display_width` | ``14.5`` | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`eye_height` | ``1.85`` | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`iod` | ``6.0`` | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`k1` | ``0.215`` | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`k2` | ``0.215`` | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`oversample` | ``1.5`` | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ -| :ref:`PlayAreaMode` | xr_play_area_mode | ``1`` (overrides :ref:`XRInterface`) | -+----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`display_to_lens` | ``4.0`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`display_width` | ``14.5`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`eye_height` | ``1.85`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`iod` | ``6.0`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`k1` | ``0.215`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`k2` | ``0.215`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`oversample` | ``1.5`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`PlayAreaMode` | xr_play_area_mode | ``1`` (overrides :ref:`XRInterface`) | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MobileVRInterface_property_display_to_lens: -- :ref:`float` **display_to_lens** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``4.0`` | -+-----------+----------------------------+ -| *Setter* | set_display_to_lens(value) | -+-----------+----------------------------+ -| *Getter* | get_display_to_lens() | -+-----------+----------------------------+ +:ref:`float` **display_to_lens** = ``4.0`` + +.. rst-class:: classref-property-setget + +- void **set_display_to_lens** **(** :ref:`float` value **)** +- :ref:`float` **get_display_to_lens** **(** **)** The distance between the display and the lenses inside of the device in centimeters. +.. rst-class:: classref-item-separator + ---- .. _class_MobileVRInterface_property_display_width: -- :ref:`float` **display_width** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``14.5`` | -+-----------+--------------------------+ -| *Setter* | set_display_width(value) | -+-----------+--------------------------+ -| *Getter* | get_display_width() | -+-----------+--------------------------+ +:ref:`float` **display_width** = ``14.5`` + +.. rst-class:: classref-property-setget + +- void **set_display_width** **(** :ref:`float` value **)** +- :ref:`float` **get_display_width** **(** **)** The width of the display in centimeters. +.. rst-class:: classref-item-separator + ---- .. _class_MobileVRInterface_property_eye_height: -- :ref:`float` **eye_height** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.85`` | -+-----------+-----------------------+ -| *Setter* | set_eye_height(value) | -+-----------+-----------------------+ -| *Getter* | get_eye_height() | -+-----------+-----------------------+ +:ref:`float` **eye_height** = ``1.85`` + +.. rst-class:: classref-property-setget + +- void **set_eye_height** **(** :ref:`float` value **)** +- :ref:`float` **get_eye_height** **(** **)** The height at which the camera is placed in relation to the ground (i.e. :ref:`XROrigin3D` node). +.. rst-class:: classref-item-separator + ---- .. _class_MobileVRInterface_property_iod: -- :ref:`float` **iod** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``6.0`` | -+-----------+----------------+ -| *Setter* | set_iod(value) | -+-----------+----------------+ -| *Getter* | get_iod() | -+-----------+----------------+ +:ref:`float` **iod** = ``6.0`` + +.. rst-class:: classref-property-setget + +- void **set_iod** **(** :ref:`float` value **)** +- :ref:`float` **get_iod** **(** **)** The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye. +.. rst-class:: classref-item-separator + ---- .. _class_MobileVRInterface_property_k1: -- :ref:`float` **k1** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``0.215`` | -+-----------+---------------+ -| *Setter* | set_k1(value) | -+-----------+---------------+ -| *Getter* | get_k1() | -+-----------+---------------+ +:ref:`float` **k1** = ``0.215`` + +.. rst-class:: classref-property-setget + +- void **set_k1** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_MobileVRInterface_property_k2: -- :ref:`float` **k2** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``0.215`` | -+-----------+---------------+ -| *Setter* | set_k2(value) | -+-----------+---------------+ -| *Getter* | get_k2() | -+-----------+---------------+ +:ref:`float` **k2** = ``0.215`` + +.. rst-class:: classref-property-setget + +- void **set_k2** **(** :ref:`float` value **)** +- :ref:`float` **get_k2** **(** **)** The k2 lens factor, see k1. +.. rst-class:: classref-item-separator + ---- .. _class_MobileVRInterface_property_oversample: -- :ref:`float` **oversample** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.5`` | -+-----------+-----------------------+ -| *Setter* | set_oversample(value) | -+-----------+-----------------------+ -| *Getter* | get_oversample() | -+-----------+-----------------------+ +:ref:`float` **oversample** = ``1.5`` + +.. rst-class:: classref-property-setget + +- void **set_oversample** **(** :ref:`float` value **)** +- :ref:`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. diff --git a/classes/class_moviewriter.rst b/classes/class_moviewriter.rst index 9cce7b810..6a2fa01b9 100644 --- a/classes/class_moviewriter.rst +++ b/classes/class_moviewriter.rst @@ -14,66 +14,89 @@ MovieWriter Abstract class for non-real-time video recording encoders. +.. rst-class:: classref-introduction-group + 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` 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: +Godot has 2 built-in **MovieWriter**\ s: - AVI container with MJPEG for video and uncompressed audio (``.avi`` file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing :ref:`ProjectSettings.editor/movie_writer/mjpeg_quality`. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with :ref:`VideoStreamPlayer`. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most. - PNG image sequence for video and WAV for audio (``.png`` file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as `FFmpeg `__ after recording. Transparency is currently not supported, even if the root viewport is set to be transparent. -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. +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`. 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. \ **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 `__ or `SimpleScreenRecorder `__ instead. +.. rst-class:: classref-reftable-group + Methods ------- -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_audio_mix_rate` **(** **)** |virtual| |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SpeakerMode` | :ref:`_get_audio_speaker_mode` **(** **)** |virtual| |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handles_file` **(** :ref:`String` path **)** |virtual| |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_write_begin` **(** :ref:`Vector2i` movie_size, :ref:`int` fps, :ref:`String` base_path **)** |virtual| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_write_end` **(** **)** |virtual| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_write_frame` **(** :ref:`Image` frame_image, const void* audio_frame_block **)** |virtual| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_writer` **(** :ref:`MovieWriter` writer **)** |static| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_audio_mix_rate` **(** **)** |virtual| |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SpeakerMode` | :ref:`_get_audio_speaker_mode` **(** **)** |virtual| |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_file` **(** :ref:`String` path **)** |virtual| |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_write_begin` **(** :ref:`Vector2i` movie_size, :ref:`int` fps, :ref:`String` base_path **)** |virtual| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_write_end` **(** **)** |virtual| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_write_frame` **(** :ref:`Image` frame_image, const void* audio_frame_block **)** |virtual| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_writer` **(** :ref:`MovieWriter` writer **)** |static| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MovieWriter_method__get_audio_mix_rate: -- :ref:`int` **_get_audio_mix_rate** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_audio_mix_rate** **(** **)** |virtual| |const| 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` is not overridden. +.. rst-class:: classref-item-separator + ---- .. _class_MovieWriter_method__get_audio_speaker_mode: -- :ref:`SpeakerMode` **_get_audio_speaker_mode** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`SpeakerMode` **_get_audio_speaker_mode** **(** **)** |virtual| |const| 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` if :ref:`_get_audio_speaker_mode` is not overridden. +.. rst-class:: classref-item-separator + ---- .. _class_MovieWriter_method__handles_file: -- :ref:`bool` **_handles_file** **(** :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method -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` is overridden as follows to allow the user to record a file at any path with a given file extension: +:ref:`bool` **_handles_file** **(** :ref:`String` path **)** |virtual| |const| + +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` is overridden as follows to allow the user to record a file at any path with a given file extension: :: @@ -82,37 +105,53 @@ Called when the engine determines whether this ``MovieWriter`` is able to handle # either in the Project Settings or with the `--write-movie ` command line argument. return path.get_extension().to_lower() == "mkv" +.. rst-class:: classref-item-separator + ---- .. _class_MovieWriter_method__write_begin: -- :ref:`Error` **_write_begin** **(** :ref:`Vector2i` movie_size, :ref:`int` fps, :ref:`String` base_path **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_write_begin** **(** :ref:`Vector2i` movie_size, :ref:`int` fps, :ref:`String` base_path **)** |virtual| 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 `` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. +.. rst-class:: classref-item-separator + ---- .. _class_MovieWriter_method__write_end: -- void **_write_end** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_write_end** **(** **)** |virtual| 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` is called. \ **Note:** Pressing :kbd:`Ctrl + C` on the terminal running the editor/project does *not* result in :ref:`_write_end` being called. +.. rst-class:: classref-item-separator + ---- .. _class_MovieWriter_method__write_frame: -- :ref:`Error` **_write_frame** **(** :ref:`Image` frame_image, const void* audio_frame_block **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_write_frame** **(** :ref:`Image` frame_image, const void* audio_frame_block **)** |virtual| Called at the end of every rendered frame. The ``frame_image`` and ``audio_frame_block`` function arguments should be written to. +.. rst-class:: classref-item-separator + ---- .. _class_MovieWriter_method_add_writer: -- void **add_writer** **(** :ref:`MovieWriter` writer **)** |static| +.. rst-class:: classref-method + +void **add_writer** **(** :ref:`MovieWriter` writer **)** |static| Adds a writer to be usable by the engine. The supported file extensions can be set by overriding :ref:`_handles_file`. diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index b011c09e6..de5a54015 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -14,6 +14,8 @@ MultiMesh Provides high-performance drawing of a mesh multiple times using GPU instancing. +.. rst-class:: classref-introduction-group + Description ----------- @@ -29,6 +31,8 @@ Since instances may have any behavior, the AABB used for visibility must be prov \ **Note:** Blend Shapes will be ignored if used in a MultiMesh. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,276 +40,363 @@ Tutorials - :doc:`Optimization using MultiMeshes <../tutorials/performance/using_multimesh>` +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedFloat32Array` | :ref:`buffer` | ``PackedFloat32Array()`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedColorArray` | :ref:`color_array` | | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedColorArray` | :ref:`custom_data_array` | | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`instance_count` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`Mesh` | :ref:`mesh` | | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`transform_2d_array` | | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector3Array` | :ref:`transform_array` | | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`TransformFormat` | :ref:`transform_format` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`use_colors` | ``false`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`use_custom_data` | ``false`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`visible_instance_count` | ``-1`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedFloat32Array` | :ref:`buffer` | ``PackedFloat32Array()`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedColorArray` | :ref:`color_array` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedColorArray` | :ref:`custom_data_array` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`instance_count` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`Mesh` | :ref:`mesh` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`transform_2d_array` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array` | :ref:`transform_array` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`TransformFormat` | :ref:`transform_format` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`use_colors` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`use_custom_data` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`visible_instance_count` | ``-1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_instance_color` **(** :ref:`int` instance **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_instance_custom_data` **(** :ref:`int` instance **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_instance_transform` **(** :ref:`int` instance **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`get_instance_transform_2d` **(** :ref:`int` instance **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_color` **(** :ref:`int` instance, :ref:`Color` color **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_custom_data` **(** :ref:`int` instance, :ref:`Color` custom_data **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_transform` **(** :ref:`int` instance, :ref:`Transform3D` transform **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_transform_2d` **(** :ref:`int` instance, :ref:`Transform2D` transform **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_instance_color` **(** :ref:`int` instance **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_instance_custom_data` **(** :ref:`int` instance **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_instance_transform` **(** :ref:`int` instance **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_instance_transform_2d` **(** :ref:`int` instance **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_instance_color` **(** :ref:`int` instance, :ref:`Color` color **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_instance_custom_data` **(** :ref:`int` instance, :ref:`Color` custom_data **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_instance_transform` **(** :ref:`int` instance, :ref:`Transform3D` transform **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_instance_transform_2d` **(** :ref:`int` instance, :ref:`Transform2D` transform **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_MultiMesh_TransformFormat: -.. _class_MultiMesh_constant_TRANSFORM_2D: - -.. _class_MultiMesh_constant_TRANSFORM_3D: +.. rst-class:: classref-enumeration enum **TransformFormat**: -- **TRANSFORM_2D** = **0** --- Use this when using 2D transforms. +.. _class_MultiMesh_constant_TRANSFORM_2D: -- **TRANSFORM_3D** = **1** --- Use this when using 3D transforms. +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFormat` **TRANSFORM_2D** = ``0`` + +Use this when using 2D transforms. + +.. _class_MultiMesh_constant_TRANSFORM_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFormat` **TRANSFORM_3D** = ``1`` + +Use this when using 3D transforms. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MultiMesh_property_buffer: -- :ref:`PackedFloat32Array` **buffer** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedFloat32Array()`` | -+-----------+--------------------------+ -| *Setter* | set_buffer(value) | -+-----------+--------------------------+ -| *Getter* | get_buffer() | -+-----------+--------------------------+ +:ref:`PackedFloat32Array` **buffer** = ``PackedFloat32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_buffer** **(** :ref:`PackedFloat32Array` value **)** +- :ref:`PackedFloat32Array` **get_buffer** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_color_array: -- :ref:`PackedColorArray` **color_array** +.. rst-class:: classref-property + +:ref:`PackedColorArray` **color_array** See :ref:`set_instance_color`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_custom_data_array: -- :ref:`PackedColorArray` **custom_data_array** +.. rst-class:: classref-property + +:ref:`PackedColorArray` **custom_data_array** See :ref:`set_instance_custom_data`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_instance_count: -- :ref:`int` **instance_count** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_instance_count(value) | -+-----------+---------------------------+ -| *Getter* | get_instance_count() | -+-----------+---------------------------+ +:ref:`int` **instance_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_instance_count** **(** :ref:`int` value **)** +- :ref:`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. By default, all instances are drawn but you can limit this with :ref:`visible_instance_count`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_mesh: -- :ref:`Mesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`Mesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`Mesh` value **)** +- :ref:`Mesh` **get_mesh** **(** **)** :ref:`Mesh` resource to be instanced. The looks of the individual instances can be modified using :ref:`set_instance_color` and :ref:`set_instance_custom_data`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_transform_2d_array: -- :ref:`PackedVector2Array` **transform_2d_array** +.. rst-class:: classref-property + +:ref:`PackedVector2Array` **transform_2d_array** See :ref:`set_instance_transform_2d`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_transform_array: -- :ref:`PackedVector3Array` **transform_array** +.. rst-class:: classref-property + +:ref:`PackedVector3Array` **transform_array** See :ref:`set_instance_transform`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_transform_format: -- :ref:`TransformFormat` **transform_format** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_transform_format(value) | -+-----------+-----------------------------+ -| *Getter* | get_transform_format() | -+-----------+-----------------------------+ +:ref:`TransformFormat` **transform_format** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_transform_format** **(** :ref:`TransformFormat` value **)** +- :ref:`TransformFormat` **get_transform_format** **(** **)** Format of transform used to transform mesh, either 2D or 3D. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_property_use_colors: -- :ref:`bool` **use_colors** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_use_colors(value) | -+-----------+-----------------------+ -| *Getter* | is_using_colors() | -+-----------+-----------------------+ +:ref:`bool` **use_colors** = ``false`` -If ``true``, the ``MultiMesh`` will use color data (see :ref:`set_instance_color`). Can only be set when :ref:`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``. +.. rst-class:: classref-property-setget + +- void **set_use_colors** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_colors** **(** **)** + +If ``true``, the **MultiMesh** will use color data (see :ref:`set_instance_color`). Can only be set when :ref:`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``. + +.. rst-class:: classref-item-separator ---- .. _class_MultiMesh_property_use_custom_data: -- :ref:`bool` **use_custom_data** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_use_custom_data(value) | -+-----------+----------------------------+ -| *Getter* | is_using_custom_data() | -+-----------+----------------------------+ +:ref:`bool` **use_custom_data** = ``false`` -If ``true``, the ``MultiMesh`` will use custom data (see :ref:`set_instance_custom_data`). Can only be set when :ref:`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``. +.. rst-class:: classref-property-setget + +- void **set_use_custom_data** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_custom_data** **(** **)** + +If ``true``, the **MultiMesh** will use custom data (see :ref:`set_instance_custom_data`). Can only be set when :ref:`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``. + +.. rst-class:: classref-item-separator ---- .. _class_MultiMesh_property_visible_instance_count: -- :ref:`int` **visible_instance_count** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``-1`` | -+-----------+-----------------------------------+ -| *Setter* | set_visible_instance_count(value) | -+-----------+-----------------------------------+ -| *Getter* | get_visible_instance_count() | -+-----------+-----------------------------------+ +:ref:`int` **visible_instance_count** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_visible_instance_count** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_MultiMesh_method_get_aabb: -- :ref:`AABB` **get_aabb** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **get_aabb** **(** **)** |const| Returns the visibility axis-aligned bounding box in local space. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_method_get_instance_color: -- :ref:`Color` **get_instance_color** **(** :ref:`int` instance **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_instance_color** **(** :ref:`int` instance **)** |const| Gets a specific instance's color multiplier. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_method_get_instance_custom_data: -- :ref:`Color` **get_instance_custom_data** **(** :ref:`int` instance **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_instance_custom_data** **(** :ref:`int` instance **)** |const| Returns the custom data that has been set for a specific instance. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_method_get_instance_transform: -- :ref:`Transform3D` **get_instance_transform** **(** :ref:`int` instance **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_instance_transform** **(** :ref:`int` instance **)** |const| Returns the :ref:`Transform3D` of a specific instance. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_method_get_instance_transform_2d: -- :ref:`Transform2D` **get_instance_transform_2d** **(** :ref:`int` instance **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_instance_transform_2d** **(** :ref:`int` instance **)** |const| Returns the :ref:`Transform2D` of a specific instance. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_method_set_instance_color: -- void **set_instance_color** **(** :ref:`int` instance, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_instance_color** **(** :ref:`int` instance, :ref:`Color` color **)** Sets the color of a specific instance by *multiplying* the mesh's existing vertex colors. This allows for different color tinting per instance. -For the color to take effect, ensure that :ref:`use_colors` is ``true`` on the ``MultiMesh`` and :ref:`BaseMaterial3D.vertex_color_use_as_albedo` is ``true`` on the material. If you intend to set an absolute color instead of tinting, make sure the material's albedo color is set to pure white (``Color(1, 1, 1)``). +For the color to take effect, ensure that :ref:`use_colors` is ``true`` on the **MultiMesh** and :ref:`BaseMaterial3D.vertex_color_use_as_albedo` is ``true`` on the material. If you intend to set an absolute color instead of tinting, make sure the material's albedo color is set to pure white (``Color(1, 1, 1)``). + +.. rst-class:: classref-item-separator ---- .. _class_MultiMesh_method_set_instance_custom_data: -- void **set_instance_custom_data** **(** :ref:`int` instance, :ref:`Color` custom_data **)** +.. rst-class:: classref-method + +void **set_instance_custom_data** **(** :ref:`int` instance, :ref:`Color` custom_data **)** Sets custom data for a specific instance. Although :ref:`Color` is used, it is just a container for 4 floating point numbers. @@ -313,19 +404,27 @@ For the custom data to be used, ensure that :ref:`use_custom_data` instance, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **set_instance_transform** **(** :ref:`int` instance, :ref:`Transform3D` transform **)** Sets the :ref:`Transform3D` for a specific instance. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMesh_method_set_instance_transform_2d: -- void **set_instance_transform_2d** **(** :ref:`int` instance, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **set_instance_transform_2d** **(** :ref:`int` instance, :ref:`Transform2D` transform **)** Sets the :ref:`Transform2D` for a specific instance. diff --git a/classes/class_multimeshinstance2d.rst b/classes/class_multimeshinstance2d.rst index 99585243e..ad8cfedea 100644 --- a/classes/class_multimeshinstance2d.rst +++ b/classes/class_multimeshinstance2d.rst @@ -14,75 +14,103 @@ MultiMeshInstance2D Node that instances a :ref:`MultiMesh` in 2D. +.. rst-class:: classref-introduction-group + Description ----------- -``MultiMeshInstance2D`` is a specialized node to instance a :ref:`MultiMesh` resource in 2D. +**MultiMeshInstance2D** is a specialized node to instance a :ref:`MultiMesh` resource in 2D. Usage is the same as :ref:`MultiMeshInstance3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+------------------------------------------------------------------+ -| :ref:`MultiMesh` | :ref:`multimesh` | -+-----------------------------------+------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`normal_map` | -+-----------------------------------+------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture` | -+-----------------------------------+------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------+ + | :ref:`MultiMesh` | :ref:`multimesh` | + +-----------------------------------+------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`normal_map` | + +-----------------------------------+------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture` | + +-----------------------------------+------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MultiMeshInstance2D_signal_texture_changed: -- **texture_changed** **(** **)** +.. rst-class:: classref-signal + +**texture_changed** **(** **)** Emitted when the :ref:`texture` is changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_MultiMeshInstance2D_property_multimesh: -- :ref:`MultiMesh` **multimesh** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_multimesh(value) | -+----------+----------------------+ -| *Getter* | get_multimesh() | -+----------+----------------------+ +:ref:`MultiMesh` **multimesh** -The :ref:`MultiMesh` that will be drawn by the ``MultiMeshInstance2D``. +.. rst-class:: classref-property-setget + +- void **set_multimesh** **(** :ref:`MultiMesh` value **)** +- :ref:`MultiMesh` **get_multimesh** **(** **)** + +The :ref:`MultiMesh` that will be drawn by the **MultiMeshInstance2D**. + +.. rst-class:: classref-item-separator ---- .. _class_MultiMeshInstance2D_property_normal_map: -- :ref:`Texture2D` **normal_map** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_normal_map(value) | -+----------+-----------------------+ -| *Getter* | get_normal_map() | -+----------+-----------------------+ +:ref:`Texture2D` **normal_map** + +.. rst-class:: classref-property-setget + +- void **set_normal_map** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_normal_map** **(** **)** The normal map that will be used if using the default :ref:`CanvasItemMaterial`. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. +.. rst-class:: classref-item-separator + ---- .. _class_MultiMeshInstance2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The :ref:`Texture2D` that will be used if using the default :ref:`CanvasItemMaterial`. Can be accessed as ``TEXTURE`` in CanvasItem shader. diff --git a/classes/class_multimeshinstance3d.rst b/classes/class_multimeshinstance3d.rst index 534e6b378..f5df33d8b 100644 --- a/classes/class_multimeshinstance3d.rst +++ b/classes/class_multimeshinstance3d.rst @@ -14,13 +14,17 @@ MultiMeshInstance3D Node that instances a :ref:`MultiMesh`. +.. rst-class:: classref-introduction-group + Description ----------- -``MultiMeshInstance3D`` is a specialized node to instance :ref:`GeometryInstance3D`\ s based on a :ref:`MultiMesh` resource. +**MultiMeshInstance3D** is a specialized node to instance :ref:`GeometryInstance3D`\ s based on a :ref:`MultiMesh` resource. This is useful to optimize the rendering of a high number of instances of a given mesh (for example trees in a forest or grass strands). +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,27 +34,39 @@ Tutorials - :doc:`Optimization using MultiMeshes <../tutorials/performance/using_multimesh>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+----------------------------------------------------------------+ -| :ref:`MultiMesh` | :ref:`multimesh` | -+-----------------------------------+----------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+----------------------------------------------------------------+ + | :ref:`MultiMesh` | :ref:`multimesh` | + +-----------------------------------+----------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MultiMeshInstance3D_property_multimesh: -- :ref:`MultiMesh` **multimesh** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_multimesh(value) | -+----------+----------------------+ -| *Getter* | get_multimesh() | -+----------+----------------------+ +:ref:`MultiMesh` **multimesh** -The :ref:`MultiMesh` resource that will be used and shared among all instances of the ``MultiMeshInstance3D``. +.. rst-class:: classref-property-setget + +- void **set_multimesh** **(** :ref:`MultiMesh` value **)** +- :ref:`MultiMesh` **get_multimesh** **(** **)** + +The :ref:`MultiMesh` resource that will be used and shared among all instances of the **MultiMeshInstance3D**. .. |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.)` diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index fb0b3066b..8104357ae 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -16,6 +16,8 @@ MultiplayerAPI High-level multiplayer API interface. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,221 +29,334 @@ It is possible to override the MultiplayerAPI instance used by specific tree bra It is also possible to extend or replace the default implementation via scripting or native extensions. See :ref:`MultiplayerAPIExtension` for details about extensions, :ref:`SceneMultiplayer` for the details about the default implementation. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`MultiplayerPeer` | :ref:`multiplayer_peer` | -+-----------------------------------------------+-------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`MultiplayerPeer` | :ref:`multiplayer_peer` | + +-----------------------------------------------+-------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MultiplayerAPI` | :ref:`create_default_interface` **(** **)** |static| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_default_interface` **(** **)** |static| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_peers` **(** **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_remote_sender_id` **(** **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_unique_id` **(** **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_multiplayer_peer` **(** **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_server` **(** **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`poll` **(** **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` arguments=[] **)** | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_interface` **(** :ref:`StringName` interface_name **)** |static| | -+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MultiplayerAPI` | :ref:`create_default_interface` **(** **)** |static| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_default_interface` **(** **)** |static| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_peers` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_remote_sender_id` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_unique_id` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_multiplayer_peer` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_server` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`poll` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` arguments=[] **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_interface` **(** :ref:`StringName` interface_name **)** |static| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MultiplayerAPI_signal_connected_to_server: -- **connected_to_server** **(** **)** +.. rst-class:: classref-signal + +**connected_to_server** **(** **)** Emitted when this MultiplayerAPI's :ref:`multiplayer_peer` successfully connected to a server. Only emitted on clients. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_signal_connection_failed: -- **connection_failed** **(** **)** +.. rst-class:: classref-signal + +**connection_failed** **(** **)** Emitted when this MultiplayerAPI's :ref:`multiplayer_peer` fails to establish a connection to a server. Only emitted on clients. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_signal_peer_connected: -- **peer_connected** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**peer_connected** **(** :ref:`int` id **)** Emitted when this MultiplayerAPI's :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_signal_peer_disconnected: -- **peer_disconnected** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**peer_disconnected** **(** :ref:`int` id **)** Emitted when this MultiplayerAPI's :ref:`multiplayer_peer` disconnects from a peer. Clients get notified when other clients disconnect from the same server. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_signal_server_disconnected: -- **server_disconnected** **(** **)** +.. rst-class:: classref-signal + +**server_disconnected** **(** **)** Emitted when this MultiplayerAPI's :ref:`multiplayer_peer` disconnects from server. Only emitted on clients. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_MultiplayerAPI_RPCMode: -.. _class_MultiplayerAPI_constant_RPC_MODE_DISABLED: - -.. _class_MultiplayerAPI_constant_RPC_MODE_ANY_PEER: - -.. _class_MultiplayerAPI_constant_RPC_MODE_AUTHORITY: +.. rst-class:: classref-enumeration enum **RPCMode**: -- **RPC_MODE_DISABLED** = **0** --- Used with :ref:`Node.rpc_config` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. +.. _class_MultiplayerAPI_constant_RPC_MODE_DISABLED: -- **RPC_MODE_ANY_PEER** = **1** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely by any peer. Analogous to the ``@rpc(any)`` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. +.. rst-class:: classref-enumeration-constant -- **RPC_MODE_AUTHORITY** = **2** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc(authority)`` annotation. See :ref:`Node.set_multiplayer_authority`. +:ref:`RPCMode` **RPC_MODE_DISABLED** = ``0`` + +Used with :ref:`Node.rpc_config` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. + +.. _class_MultiplayerAPI_constant_RPC_MODE_ANY_PEER: + +.. rst-class:: classref-enumeration-constant + +:ref:`RPCMode` **RPC_MODE_ANY_PEER** = ``1`` + +Used with :ref:`Node.rpc_config` to set a method to be callable remotely by any peer. Analogous to the ``@rpc(any)`` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. + +.. _class_MultiplayerAPI_constant_RPC_MODE_AUTHORITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`RPCMode` **RPC_MODE_AUTHORITY** = ``2`` + +Used with :ref:`Node.rpc_config` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc(authority)`` annotation. See :ref:`Node.set_multiplayer_authority`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MultiplayerAPI_property_multiplayer_peer: -- :ref:`MultiplayerPeer` **multiplayer_peer** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_multiplayer_peer(value) | -+----------+-----------------------------+ -| *Getter* | get_multiplayer_peer() | -+----------+-----------------------------+ +:ref:`MultiplayerPeer` **multiplayer_peer** + +.. rst-class:: classref-property-setget + +- void **set_multiplayer_peer** **(** :ref:`MultiplayerPeer` value **)** +- :ref:`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`) 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_MultiplayerAPI_method_create_default_interface: -- :ref:`MultiplayerAPI` **create_default_interface** **(** **)** |static| +.. rst-class:: classref-method + +:ref:`MultiplayerAPI` **create_default_interface** **(** **)** |static| Returns a new instance of the default MultiplayerAPI. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_get_default_interface: -- :ref:`StringName` **get_default_interface** **(** **)** |static| +.. rst-class:: classref-method + +:ref:`StringName` **get_default_interface** **(** **)** |static| Returns the default MultiplayerAPI implementation class name. This is usually ``"SceneMultiplayer"`` when :ref:`SceneMultiplayer` is available. See :ref:`set_default_interface`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_get_peers: -- :ref:`PackedInt32Array` **get_peers** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_peers** **(** **)** Returns the peer IDs of all connected peers of this MultiplayerAPI's :ref:`multiplayer_peer`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_get_remote_sender_id: -- :ref:`int` **get_remote_sender_id** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **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. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_get_unique_id: -- :ref:`int` **get_unique_id** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_unique_id** **(** **)** Returns the unique peer ID of this MultiplayerAPI's :ref:`multiplayer_peer`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_has_multiplayer_peer: -- :ref:`bool` **has_multiplayer_peer** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **has_multiplayer_peer** **(** **)** Returns ``true`` if there is a :ref:`multiplayer_peer` set. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_is_server: -- :ref:`bool` **is_server** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_server** **(** **)** Returns ``true`` if this MultiplayerAPI's :ref:`multiplayer_peer` is valid and in server mode (listening for connections). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_object_configuration_add: -- :ref:`Error` **object_configuration_add** **(** :ref:`Object` object, :ref:`Variant` configuration **)** +.. rst-class:: classref-method + +:ref:`Error` **object_configuration_add** **(** :ref:`Object` object, :ref:`Variant` configuration **)** Notifies the MultiplayerAPI of a new ``configuration`` for the given ``object``. This method is used internally by :ref:`SceneTree` to configure the root path for this MultiplayerAPI (passing ``null`` and a valid :ref:`NodePath` as ``configuration``). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. :ref:`SceneMultiplayer`) for details on how they use it. \ **Note:** This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via :ref:`MultiplayerAPIExtension`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_object_configuration_remove: -- :ref:`Error` **object_configuration_remove** **(** :ref:`Object` object, :ref:`Variant` configuration **)** +.. rst-class:: classref-method + +:ref:`Error` **object_configuration_remove** **(** :ref:`Object` object, :ref:`Variant` configuration **)** Notifies the MultiplayerAPI to remove a ``configuration`` for the given ``object``. This method is used internally by :ref:`SceneTree` to configure the root path for this MultiplayerAPI (passing ``null`` and an empty :ref:`NodePath` as ``configuration``). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. :ref:`SceneMultiplayer`) for details on how they use it. \ **Note:** This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via :ref:`MultiplayerAPIExtension`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_poll: -- :ref:`Error` **poll** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **poll** **(** **)** Method used for polling the MultiplayerAPI. You only need to worry about this if you set :ref:`SceneTree.multiplayer_poll` to ``false``. By default, :ref:`SceneTree` will poll its MultiplayerAPI(s) for you. \ **Note:** This method results in RPCs being called, so they will be executed in the same context of this function (e.g. ``_process``, ``physics``, :ref:`Thread`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_rpc: -- :ref:`Error` **rpc** **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` arguments=[] **)** +.. rst-class:: classref-method + +:ref:`Error` **rpc** **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` arguments=[] **)** 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` and :ref:`Node.rpc_config`. \ **Note:** Prefer using :ref:`Node.rpc`, :ref:`Node.rpc_id`, or ``my_method.rpc(peer, arg1, arg2, ...)`` (in GDScript), since they are faster. This method is mostly useful in conjunction with :ref:`MultiplayerAPIExtension` when augmenting or replacing the multiplayer capabilities. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPI_method_set_default_interface: -- void **set_default_interface** **(** :ref:`StringName` interface_name **)** |static| +.. rst-class:: classref-method + +void **set_default_interface** **(** :ref:`StringName` interface_name **)** |static| 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` when the engine starts. diff --git a/classes/class_multiplayerapiextension.rst b/classes/class_multiplayerapiextension.rst index daf55f31e..1d15b454f 100644 --- a/classes/class_multiplayerapiextension.rst +++ b/classes/class_multiplayerapiextension.rst @@ -14,6 +14,8 @@ MultiplayerAPIExtension Base class used for extending the :ref:`MultiplayerAPI`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -95,99 +97,144 @@ Then in your main scene or in an autoload call :ref:`SceneTree.set_multiplayer` method during initialization to configure themselves as the default implementation. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MultiplayerPeer` | :ref:`_get_multiplayer_peer` **(** **)** |virtual| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_get_peer_ids` **(** **)** |virtual| |const| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_remote_sender_id` **(** **)** |virtual| |const| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_poll` **(** **)** |virtual| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_multiplayer_peer` **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MultiplayerPeer` | :ref:`_get_multiplayer_peer` **(** **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_get_peer_ids` **(** **)** |virtual| |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_remote_sender_id` **(** **)** |virtual| |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_poll` **(** **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_multiplayer_peer` **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MultiplayerAPIExtension_method__get_multiplayer_peer: -- :ref:`MultiplayerPeer` **_get_multiplayer_peer** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`MultiplayerPeer` **_get_multiplayer_peer** **(** **)** |virtual| Called when the :ref:`MultiplayerAPI.multiplayer_peer` is retrieved. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__get_peer_ids: -- :ref:`PackedInt32Array` **_get_peer_ids** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_get_peer_ids** **(** **)** |virtual| |const| Callback for :ref:`MultiplayerAPI.get_peers`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__get_remote_sender_id: -- :ref:`int` **_get_remote_sender_id** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_remote_sender_id** **(** **)** |virtual| |const| Callback for :ref:`MultiplayerAPI.get_remote_sender_id`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__get_unique_id: -- :ref:`int` **_get_unique_id** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_unique_id** **(** **)** |virtual| |const| Callback for :ref:`MultiplayerAPI.get_unique_id`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__object_configuration_add: -- :ref:`int` **_object_configuration_add** **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_object_configuration_add** **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| Callback for :ref:`MultiplayerAPI.object_configuration_add`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__object_configuration_remove: -- :ref:`int` **_object_configuration_remove** **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_object_configuration_remove** **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| Callback for :ref:`MultiplayerAPI.object_configuration_remove`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__poll: -- :ref:`int` **_poll** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_poll** **(** **)** |virtual| Callback for :ref:`MultiplayerAPI.poll`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__rpc: -- :ref:`int` **_rpc** **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_rpc** **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| Callback for :ref:`MultiplayerAPI.rpc`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerAPIExtension_method__set_multiplayer_peer: -- void **_set_multiplayer_peer** **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| +.. rst-class:: classref-method + +void **_set_multiplayer_peer** **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| Called when the :ref:`MultiplayerAPI.multiplayer_peer` is set. diff --git a/classes/class_multiplayerpeer.rst b/classes/class_multiplayerpeer.rst index 577650a2e..e891ac7c9 100644 --- a/classes/class_multiplayerpeer.rst +++ b/classes/class_multiplayerpeer.rst @@ -12,10 +12,12 @@ MultiplayerPeer **Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ENetMultiplayerPeer`, :ref:`MultiplayerPeerExtension`, :ref:`WebRTCMultiplayerPeer`, :ref:`WebSocketMultiplayerPeer` +**Inherited By:** :ref:`ENetMultiplayerPeer`, :ref:`MultiplayerPeerExtension`, :ref:`OfflineMultiplayerPeer`, :ref:`WebRTCMultiplayerPeer`, :ref:`WebSocketMultiplayerPeer` Abstract class for specialized :ref:`PacketPeer`\ s used by the :ref:`MultiplayerAPI`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,6 +27,8 @@ Manages the connection with one or more remote peers acting as server or client \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,246 +36,373 @@ Tutorials - `WebRTC Signaling Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`transfer_channel` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`TransferMode` | :ref:`transfer_mode` | ``2`` | -+--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`transfer_channel` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`TransferMode` | :ref:`transfer_mode` | ``2`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_peer` **(** :ref:`int` peer, :ref:`bool` force=false **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`generate_unique_id` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ConnectionStatus` | :ref:`get_connection_status` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_packet_channel` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TransferMode` | :ref:`get_packet_mode` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_packet_peer` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_unique_id` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_server_relay_supported` **(** **)** |const| | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`poll` **(** **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_target_peer` **(** :ref:`int` id **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close` **(** **)** | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect_peer` **(** :ref:`int` peer, :ref:`bool` force=false **)** | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`generate_unique_id` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionStatus` | :ref:`get_connection_status` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_packet_channel` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode` | :ref:`get_packet_mode` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_packet_peer` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_unique_id` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_server_relay_supported` **(** **)** |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`poll` **(** **)** | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_target_peer` **(** :ref:`int` id **)** | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MultiplayerPeer_signal_peer_connected: -- **peer_connected** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**peer_connected** **(** :ref:`int` id **)** Emitted when a remote peer connects. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_signal_peer_disconnected: -- **peer_disconnected** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**peer_disconnected** **(** :ref:`int` id **)** Emitted when a remote peer has disconnected. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_MultiplayerPeer_ConnectionStatus: -.. _class_MultiplayerPeer_constant_CONNECTION_DISCONNECTED: - -.. _class_MultiplayerPeer_constant_CONNECTION_CONNECTING: - -.. _class_MultiplayerPeer_constant_CONNECTION_CONNECTED: +.. rst-class:: classref-enumeration enum **ConnectionStatus**: -- **CONNECTION_DISCONNECTED** = **0** --- The MultiplayerPeer is disconnected. +.. _class_MultiplayerPeer_constant_CONNECTION_DISCONNECTED: -- **CONNECTION_CONNECTING** = **1** --- The MultiplayerPeer is currently connecting to a server. +.. rst-class:: classref-enumeration-constant -- **CONNECTION_CONNECTED** = **2** --- This MultiplayerPeer is connected. +:ref:`ConnectionStatus` **CONNECTION_DISCONNECTED** = ``0`` + +The MultiplayerPeer is disconnected. + +.. _class_MultiplayerPeer_constant_CONNECTION_CONNECTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectionStatus` **CONNECTION_CONNECTING** = ``1`` + +The MultiplayerPeer is currently connecting to a server. + +.. _class_MultiplayerPeer_constant_CONNECTION_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectionStatus` **CONNECTION_CONNECTED** = ``2`` + +This MultiplayerPeer is connected. + +.. rst-class:: classref-item-separator ---- .. _enum_MultiplayerPeer_TransferMode: -.. _class_MultiplayerPeer_constant_TRANSFER_MODE_UNRELIABLE: - -.. _class_MultiplayerPeer_constant_TRANSFER_MODE_UNRELIABLE_ORDERED: - -.. _class_MultiplayerPeer_constant_TRANSFER_MODE_RELIABLE: +.. rst-class:: classref-enumeration enum **TransferMode**: -- **TRANSFER_MODE_UNRELIABLE** = **0** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than :ref:`TRANSFER_MODE_UNRELIABLE_ORDERED`. Use for non-critical data, and always consider whether the order matters. +.. _class_MultiplayerPeer_constant_TRANSFER_MODE_UNRELIABLE: -- **TRANSFER_MODE_UNRELIABLE_ORDERED** = **1** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than :ref:`TRANSFER_MODE_RELIABLE`. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. +.. rst-class:: classref-enumeration-constant -- **TRANSFER_MODE_RELIABLE** = **2** --- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. +:ref:`TransferMode` **TRANSFER_MODE_UNRELIABLE** = ``0`` + +Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than :ref:`TRANSFER_MODE_UNRELIABLE_ORDERED`. Use for non-critical data, and always consider whether the order matters. + +.. _class_MultiplayerPeer_constant_TRANSFER_MODE_UNRELIABLE_ORDERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransferMode` **TRANSFER_MODE_UNRELIABLE_ORDERED** = ``1`` + +Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than :ref:`TRANSFER_MODE_RELIABLE`. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. + +.. _class_MultiplayerPeer_constant_TRANSFER_MODE_RELIABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransferMode` **TRANSFER_MODE_RELIABLE** = ``2`` + +Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_MultiplayerPeer_constant_TARGET_PEER_BROADCAST: +.. rst-class:: classref-constant + +**TARGET_PEER_BROADCAST** = ``0`` + +Packets are sent to all connected peers. + .. _class_MultiplayerPeer_constant_TARGET_PEER_SERVER: -- **TARGET_PEER_BROADCAST** = **0** --- Packets are sent to all connected peers. +.. rst-class:: classref-constant -- **TARGET_PEER_SERVER** = **1** --- Packets are sent to the remote peer acting as server. +**TARGET_PEER_SERVER** = ``1`` + +Packets are sent to the remote peer acting as server. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MultiplayerPeer_property_refuse_new_connections: -- :ref:`bool` **refuse_new_connections** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_refuse_new_connections(value) | -+-----------+-----------------------------------+ -| *Getter* | is_refusing_new_connections() | -+-----------+-----------------------------------+ +:ref:`bool` **refuse_new_connections** = ``false`` -If ``true``, this ``MultiplayerPeer`` refuses new connections. +.. rst-class:: classref-property-setget + +- void **set_refuse_new_connections** **(** :ref:`bool` value **)** +- :ref:`bool` **is_refusing_new_connections** **(** **)** + +If ``true``, this **MultiplayerPeer** refuses new connections. + +.. rst-class:: classref-item-separator ---- .. _class_MultiplayerPeer_property_transfer_channel: -- :ref:`int` **transfer_channel** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_transfer_channel(value) | -+-----------+-----------------------------+ -| *Getter* | get_transfer_channel() | -+-----------+-----------------------------+ +:ref:`int` **transfer_channel** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_transfer_channel** **(** :ref:`int` value **)** +- :ref:`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. \ **Note:** The default channel (``0``) actually works as 3 separate channels (one for each :ref:`TransferMode`) so that :ref:`TRANSFER_MODE_RELIABLE` and :ref:`TRANSFER_MODE_UNRELIABLE_ORDERED` does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_property_transfer_mode: -- :ref:`TransferMode` **transfer_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``2`` | -+-----------+--------------------------+ -| *Setter* | set_transfer_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_transfer_mode() | -+-----------+--------------------------+ +:ref:`TransferMode` **transfer_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_transfer_mode** **(** :ref:`TransferMode` value **)** +- :ref:`TransferMode` **get_transfer_mode** **(** **)** The manner in which to send packets to the target peer. See :ref:`TransferMode`, and the :ref:`set_target_peer` method. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_MultiplayerPeer_method_close: -- void **close** **(** **)** +.. rst-class:: classref-method + +void **close** **(** **)** Immediately close the multiplayer peer returning to the state :ref:`CONNECTION_DISCONNECTED`. Connected peers will be dropped without emitting :ref:`peer_disconnected`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_disconnect_peer: -- void **disconnect_peer** **(** :ref:`int` peer, :ref:`bool` force=false **)** +.. rst-class:: classref-method + +void **disconnect_peer** **(** :ref:`int` peer, :ref:`bool` force=false **)** Disconnects the given ``peer`` from this host. If ``force`` is ``true`` the :ref:`peer_disconnected` signal will not be emitted for this peer. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_generate_unique_id: -- :ref:`int` **generate_unique_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **generate_unique_id** **(** **)** |const| Returns a randomly generated integer that can be used as a network unique ID. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_get_connection_status: -- :ref:`ConnectionStatus` **get_connection_status** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`ConnectionStatus` **get_connection_status** **(** **)** |const| Returns the current state of the connection. See :ref:`ConnectionStatus`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_get_packet_channel: -- :ref:`int` **get_packet_channel** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_packet_channel** **(** **)** |const| Returns the channel over which the next available packet was received. See :ref:`PacketPeer.get_available_packet_count`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_get_packet_mode: -- :ref:`TransferMode` **get_packet_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TransferMode` **get_packet_mode** **(** **)** |const| Returns the :ref:`TransferMode` the remote peer used to send the next available packet. See :ref:`PacketPeer.get_available_packet_count`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_get_packet_peer: -- :ref:`int` **get_packet_peer** **(** **)** |const| +.. rst-class:: classref-method -Returns the ID of the ``MultiplayerPeer`` who sent the next available packet. See :ref:`PacketPeer.get_available_packet_count`. +:ref:`int` **get_packet_peer** **(** **)** |const| + +Returns the ID of the **MultiplayerPeer** who sent the next available packet. See :ref:`PacketPeer.get_available_packet_count`. + +.. rst-class:: classref-item-separator ---- .. _class_MultiplayerPeer_method_get_unique_id: -- :ref:`int` **get_unique_id** **(** **)** |const| +.. rst-class:: classref-method -Returns the ID of this ``MultiplayerPeer``. +:ref:`int` **get_unique_id** **(** **)** |const| + +Returns the ID of this **MultiplayerPeer**. + +.. rst-class:: classref-item-separator ---- .. _class_MultiplayerPeer_method_is_server_relay_supported: -- :ref:`bool` **is_server_relay_supported** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_server_relay_supported** **(** **)** |const| Returns true if the server can act as a relay in the current configuration (i.e. if the higher level :ref:`MultiplayerAPI` should notify connected clients of other peers, and implement a relay protocol to allow communication between them). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_poll: -- void **poll** **(** **)** +.. rst-class:: classref-method + +void **poll** **(** **)** Waits up to 1 second to receive a new network event. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeer_method_set_target_peer: -- void **set_target_peer** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **set_target_peer** **(** :ref:`int` id **)** Sets the peer to which packets will be sent. diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 2f50d5b8b..8da8e7039 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -14,214 +14,305 @@ MultiplayerPeerExtension Class that can be inherited to implement custom multiplayer API networking layers via GDExtension. +.. rst-class:: classref-introduction-group + Description ----------- This class is designed to be inherited from a GDExtension plugin to implement custom networking layers for the multiplayer API (such as WebRTC). All the methods below **must** be implemented to have a working custom multiplayer implementation. See also :ref:`MultiplayerAPI`. +.. rst-class:: classref-reftable-group + Methods ------- -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_close` **(** **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_disconnect_peer` **(** :ref:`int` p_peer, :ref:`bool` p_force **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ConnectionStatus` | :ref:`_get_connection_status` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_packet_peer` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`_get_packet_script` **(** **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_transfer_channel` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TransferMode` | :ref:`_get_transfer_mode` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_refusing_new_connections` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_server` **(** **)** |virtual| |const| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_poll` **(** **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_put_packet_script` **(** :ref:`PackedByteArray` p_buffer **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_refuse_new_connections` **(** :ref:`bool` p_enable **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_target_peer` **(** :ref:`int` p_peer **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_transfer_channel` **(** :ref:`int` p_channel **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_transfer_mode` **(** :ref:`TransferMode` p_mode **)** |virtual| | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_close` **(** **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_disconnect_peer` **(** :ref:`int` p_peer, :ref:`bool` p_force **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionStatus` | :ref:`_get_connection_status` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_packet_peer` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_get_packet_script` **(** **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_transfer_channel` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode` | :ref:`_get_transfer_mode` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_refusing_new_connections` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_server` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_poll` **(** **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet_script` **(** :ref:`PackedByteArray` p_buffer **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_refuse_new_connections` **(** :ref:`bool` p_enable **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_target_peer` **(** :ref:`int` p_peer **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transfer_channel` **(** :ref:`int` p_channel **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transfer_mode` **(** :ref:`TransferMode` p_mode **)** |virtual| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_MultiplayerPeerExtension_method__close: -- void **_close** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_close** **(** **)** |virtual| Called when the multiplayer peer should be immediately closed (see :ref:`MultiplayerPeer.close`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__disconnect_peer: -- void **_disconnect_peer** **(** :ref:`int` p_peer, :ref:`bool` p_force **)** |virtual| +.. rst-class:: classref-method + +void **_disconnect_peer** **(** :ref:`int` p_peer, :ref:`bool` p_force **)** |virtual| Called when the connected ``p_peer`` should be forcibly disconnected (see :ref:`MultiplayerPeer.disconnect_peer`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_available_packet_count: -- :ref:`int` **_get_available_packet_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_available_packet_count** **(** **)** |virtual| |const| Called when the available packet count is internally requested by the :ref:`MultiplayerAPI`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_connection_status: -- :ref:`ConnectionStatus` **_get_connection_status** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`ConnectionStatus` **_get_connection_status** **(** **)** |virtual| |const| Called when the connection status is requested on the :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.get_connection_status`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_max_packet_size: -- :ref:`int` **_get_max_packet_size** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_max_packet_size** **(** **)** |virtual| |const| Called when the maximum allowed packet size (in bytes) is requested by the :ref:`MultiplayerAPI`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_packet: -- :ref:`Error` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| Called when a packet needs to be received by the :ref:`MultiplayerAPI`, with ``r_buffer_size`` being the size of the binary ``r_buffer`` in bytes. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_packet_peer: -- :ref:`int` **_get_packet_peer** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_packet_peer** **(** **)** |virtual| |const| Called when the ID of the :ref:`MultiplayerPeer` who sent the most recent packet is requested (see :ref:`MultiplayerPeer.get_packet_peer`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_packet_script: -- :ref:`PackedByteArray` **_get_packet_script** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **_get_packet_script** **(** **)** |virtual| Called when a packet needs to be received by the :ref:`MultiplayerAPI`, if :ref:`_get_packet` isn't implemented. Use this when extending this class via GDScript. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_transfer_channel: -- :ref:`int` **_get_transfer_channel** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_transfer_channel** **(** **)** |virtual| |const| Called when the transfer channel to use is read on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_channel`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_transfer_mode: -- :ref:`TransferMode` **_get_transfer_mode** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`TransferMode` **_get_transfer_mode** **(** **)** |virtual| |const| Called when the transfer mode to use is read on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_mode`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__get_unique_id: -- :ref:`int` **_get_unique_id** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_unique_id** **(** **)** |virtual| |const| Called when the unique ID of this :ref:`MultiplayerPeer` is requested (see :ref:`MultiplayerPeer.get_unique_id`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__is_refusing_new_connections: -- :ref:`bool` **_is_refusing_new_connections** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_refusing_new_connections** **(** **)** |virtual| |const| Called when the "refuse new connections" status is requested on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.refuse_new_connections`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__is_server: -- :ref:`bool` **_is_server** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_server** **(** **)** |virtual| |const| Called when the "is server" status is requested on the :ref:`MultiplayerAPI`. See :ref:`MultiplayerAPI.is_server`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__poll: -- void **_poll** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_poll** **(** **)** |virtual| Called when the :ref:`MultiplayerAPI` is polled. See :ref:`MultiplayerAPI.poll`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__put_packet: -- :ref:`Error` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| Called when a packet needs to be sent by the :ref:`MultiplayerAPI`, with ``p_buffer_size`` being the size of the binary ``p_buffer`` in bytes. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__put_packet_script: -- :ref:`Error` **_put_packet_script** **(** :ref:`PackedByteArray` p_buffer **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_put_packet_script** **(** :ref:`PackedByteArray` p_buffer **)** |virtual| Called when a packet needs to be sent by the :ref:`MultiplayerAPI`, if :ref:`_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: -- void **_set_refuse_new_connections** **(** :ref:`bool` p_enable **)** |virtual| +.. rst-class:: classref-method + +void **_set_refuse_new_connections** **(** :ref:`bool` p_enable **)** |virtual| Called when the "refuse new connections" status is set on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.refuse_new_connections`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__set_target_peer: -- void **_set_target_peer** **(** :ref:`int` p_peer **)** |virtual| +.. rst-class:: classref-method + +void **_set_target_peer** **(** :ref:`int` p_peer **)** |virtual| Called when the target peer to use is set for this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.set_target_peer`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__set_transfer_channel: -- void **_set_transfer_channel** **(** :ref:`int` p_channel **)** |virtual| +.. rst-class:: classref-method + +void **_set_transfer_channel** **(** :ref:`int` p_channel **)** |virtual| Called when the channel to use is set for this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_channel`). +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerPeerExtension_method__set_transfer_mode: -- void **_set_transfer_mode** **(** :ref:`TransferMode` p_mode **)** |virtual| +.. rst-class:: classref-method + +void **_set_transfer_mode** **(** :ref:`TransferMode` p_mode **)** |virtual| Called when the transfer mode is set on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_mode`). diff --git a/classes/class_multiplayerspawner.rst b/classes/class_multiplayerspawner.rst index 99194a425..8e6d34863 100644 --- a/classes/class_multiplayerspawner.rst +++ b/classes/class_multiplayerspawner.rst @@ -14,6 +14,8 @@ MultiplayerSpawner Automatically replicates spawnable nodes from the authority to other multiplayer peers. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,134 +23,190 @@ Spawnable scenes can be configured in the editor or through code (see :ref:`add_ Also supports custom node spawns through :ref:`spawn`, calling :ref:`_spawn_custom` on all peers. -Internally, ``MultiplayerSpawner`` uses :ref:`MultiplayerAPI.object_configuration_add` to notify spawns passing the spawned node as the ``object`` and itself as the ``configuration``, and :ref:`MultiplayerAPI.object_configuration_remove` to notify despawns in a similar way. +Internally, **MultiplayerSpawner** uses :ref:`MultiplayerAPI.object_configuration_add` to notify spawns passing the spawned node as the ``object`` and itself as the ``configuration``, and :ref:`MultiplayerAPI.object_configuration_remove` to notify despawns in a similar way. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------------+-------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`spawn_limit` | ``0`` | -+---------------------------------+-------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`spawn_path` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`spawn_limit` | ``0`` | + +---------------------------------+-------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`spawn_path` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`_spawn_custom` **(** :ref:`Variant` data **)** |virtual| | -+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_spawnable_scene` **(** :ref:`String` path **)** | -+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_spawnable_scenes` **(** **)** | -+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_spawnable_scene` **(** :ref:`int` index **)** |const| | -+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_spawnable_scene_count` **(** **)** |const| | -+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`spawn` **(** :ref:`Variant` data=null **)** | -+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`_spawn_custom` **(** :ref:`Variant` data **)** |virtual| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_spawnable_scene` **(** :ref:`String` path **)** | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_spawnable_scenes` **(** **)** | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_spawnable_scene` **(** :ref:`int` index **)** |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_spawnable_scene_count` **(** **)** |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`spawn` **(** :ref:`Variant` data=null **)** | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MultiplayerSpawner_signal_despawned: -- **despawned** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**despawned** **(** :ref:`Node` node **)** Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on puppets. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSpawner_signal_spawned: -- **spawned** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**spawned** **(** :ref:`Node` node **)** Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on puppets. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_MultiplayerSpawner_property_spawn_limit: -- :ref:`int` **spawn_limit** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_spawn_limit(value) | -+-----------+------------------------+ -| *Getter* | get_spawn_limit() | -+-----------+------------------------+ +:ref:`int` **spawn_limit** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_spawn_limit** **(** :ref:`int` value **)** +- :ref:`int` **get_spawn_limit** **(** **)** Maximum nodes that is allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns. When set to ``0`` (the default), there is no limit. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSpawner_property_spawn_path: -- :ref:`NodePath` **spawn_path** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-----------------------+ -| *Setter* | set_spawn_path(value) | -+-----------+-----------------------+ -| *Getter* | get_spawn_path() | -+-----------+-----------------------+ +:ref:`NodePath` **spawn_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_spawn_path** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_spawn_path** **(** **)** Path to the spawn root. Spawnable scenes that are added as direct children are replicated to other peers. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_MultiplayerSpawner_method__spawn_custom: -- :ref:`Node` **_spawn_custom** **(** :ref:`Variant` data **)** |virtual| +.. rst-class:: classref-method + +:ref:`Node` **_spawn_custom** **(** :ref:`Variant` data **)** |virtual| Method called on all peers when a custom spawn was requested by the authority using :ref:`spawn`. Should return a :ref:`Node` that is not in the scene tree. \ **Note:** Spawned nodes should **not** be added to the scene with :ref:`Node.add_child`. This is done automatically. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSpawner_method_add_spawnable_scene: -- void **add_spawnable_scene** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_spawnable_scene** **(** :ref:`String` path **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSpawner_method_clear_spawnable_scenes: -- void **clear_spawnable_scenes** **(** **)** +.. rst-class:: classref-method + +void **clear_spawnable_scenes** **(** **)** Clears all spawnable scenes. Does not despawn existing instances on remote peers. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSpawner_method_get_spawnable_scene: -- :ref:`String` **get_spawnable_scene** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_spawnable_scene** **(** :ref:`int` index **)** |const| Returns the spawnable scene path by index. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSpawner_method_get_spawnable_scene_count: -- :ref:`int` **get_spawnable_scene_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_spawnable_scene_count** **(** **)** |const| Returns the count of spawnable scene paths. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSpawner_method_spawn: -- :ref:`Node` **spawn** **(** :ref:`Variant` data=null **)** +.. rst-class:: classref-method + +:ref:`Node` **spawn** **(** :ref:`Variant` data=null **)** Requests a custom spawn, with ``data`` passed to :ref:`_spawn_custom` 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`. diff --git a/classes/class_multiplayersynchronizer.rst b/classes/class_multiplayersynchronizer.rst index 1fccc00da..6a4e6cb4d 100644 --- a/classes/class_multiplayersynchronizer.rst +++ b/classes/class_multiplayersynchronizer.rst @@ -14,196 +14,271 @@ MultiplayerSynchronizer Synchronizes properties from the multiplayer authority to the remote peers. +.. rst-class:: classref-introduction-group + Description ----------- -By default, ``MultiplayerSynchronizer`` synchronizes configured properties to all peers. +By default, **MultiplayerSynchronizer** synchronizes configured properties to all peers. Visibility can be handled directly with :ref:`set_visibility_for` or as-needed with :ref:`add_visibility_filter` and :ref:`update_visibility`. \ :ref:`MultiplayerSpawner`\ s will handle nodes according to visibility of synchronizers as long as the node at :ref:`root_path` was spawned by one. -Internally, ``MultiplayerSynchronizer`` uses :ref:`MultiplayerAPI.object_configuration_add` to notify synchronization start passing the :ref:`Node` at :ref:`root_path` as the ``object`` and itself as the ``configuration``, and uses :ref:`MultiplayerAPI.object_configuration_remove` to notify synchronization end in a similar way. +Internally, **MultiplayerSynchronizer** uses :ref:`MultiplayerAPI.object_configuration_add` to notify synchronization start passing the :ref:`Node` at :ref:`root_path` as the ``object`` and itself as the ``configuration``, and uses :ref:`MultiplayerAPI.object_configuration_remove` to notify synchronization end in a similar way. + +.. rst-class:: classref-reftable-group Properties ---------- -+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`public_visibility` | ``true`` | -+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ -| :ref:`SceneReplicationConfig` | :ref:`replication_config` | | -+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`replication_interval` | ``0.0`` | -+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ -| :ref:`NodePath` | :ref:`root_path` | ``NodePath("..")`` | -+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ -| :ref:`VisibilityUpdateMode` | :ref:`visibility_update_mode` | ``0`` | -+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`public_visibility` | ``true`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ + | :ref:`SceneReplicationConfig` | :ref:`replication_config` | | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`replication_interval` | ``0.0`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`root_path` | ``NodePath("..")`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ + | :ref:`VisibilityUpdateMode` | :ref:`visibility_update_mode` | ``0`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_visibility_filter` **(** :ref:`Callable` filter **)** | -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_visibility_for` **(** :ref:`int` peer **)** |const| | -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_visibility_filter` **(** :ref:`Callable` filter **)** | -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_visibility_for` **(** :ref:`int` peer, :ref:`bool` visible **)** | -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_visibility` **(** :ref:`int` for_peer=0 **)** | -+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_visibility_filter` **(** :ref:`Callable` filter **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_visibility_for` **(** :ref:`int` peer **)** |const| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_visibility_filter` **(** :ref:`Callable` filter **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_visibility_for` **(** :ref:`int` peer, :ref:`bool` visible **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_visibility` **(** :ref:`int` for_peer=0 **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_MultiplayerSynchronizer_signal_visibility_changed: -- **visibility_changed** **(** :ref:`int` for_peer **)** +.. rst-class:: classref-signal + +**visibility_changed** **(** :ref:`int` for_peer **)** Emitted when visibility of ``for_peer`` is updated. See :ref:`update_visibility`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_MultiplayerSynchronizer_VisibilityUpdateMode: -.. _class_MultiplayerSynchronizer_constant_VISIBILITY_PROCESS_IDLE: - -.. _class_MultiplayerSynchronizer_constant_VISIBILITY_PROCESS_PHYSICS: - -.. _class_MultiplayerSynchronizer_constant_VISIBILITY_PROCESS_NONE: +.. rst-class:: classref-enumeration enum **VisibilityUpdateMode**: -- **VISIBILITY_PROCESS_IDLE** = **0** --- Visibility filters are updated every idle process frame. +.. _class_MultiplayerSynchronizer_constant_VISIBILITY_PROCESS_IDLE: -- **VISIBILITY_PROCESS_PHYSICS** = **1** --- Visibility filters are updated every physics process frame. +.. rst-class:: classref-enumeration-constant -- **VISIBILITY_PROCESS_NONE** = **2** --- Visibility filters are not updated automatically, and must be updated manually by calling :ref:`update_visibility`. +:ref:`VisibilityUpdateMode` **VISIBILITY_PROCESS_IDLE** = ``0`` + +Visibility filters are updated every idle process frame. + +.. _class_MultiplayerSynchronizer_constant_VISIBILITY_PROCESS_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityUpdateMode` **VISIBILITY_PROCESS_PHYSICS** = ``1`` + +Visibility filters are updated every physics process frame. + +.. _class_MultiplayerSynchronizer_constant_VISIBILITY_PROCESS_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityUpdateMode` **VISIBILITY_PROCESS_NONE** = ``2`` + +Visibility filters are not updated automatically, and must be updated manually by calling :ref:`update_visibility`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_MultiplayerSynchronizer_property_public_visibility: -- :ref:`bool` **public_visibility** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_visibility_public(value) | -+-----------+------------------------------+ -| *Getter* | is_visibility_public() | -+-----------+------------------------------+ +:ref:`bool` **public_visibility** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_public** **(** :ref:`bool` value **)** +- :ref:`bool` **is_visibility_public** **(** **)** Whether synchronization should be visible to all peers by default. See :ref:`set_visibility_for` and :ref:`add_visibility_filter` for ways of configuring fine-grained visibility options. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_property_replication_config: -- :ref:`SceneReplicationConfig` **replication_config** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_replication_config(value) | -+----------+-------------------------------+ -| *Getter* | get_replication_config() | -+----------+-------------------------------+ +:ref:`SceneReplicationConfig` **replication_config** + +.. rst-class:: classref-property-setget + +- void **set_replication_config** **(** :ref:`SceneReplicationConfig` value **)** +- :ref:`SceneReplicationConfig` **get_replication_config** **(** **)** Resource containing which properties to synchronize. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_property_replication_interval: -- :ref:`float` **replication_interval** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_replication_interval(value) | -+-----------+---------------------------------+ -| *Getter* | get_replication_interval() | -+-----------+---------------------------------+ +:ref:`float` **replication_interval** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_replication_interval** **(** :ref:`float` value **)** +- :ref:`float` **get_replication_interval** **(** **)** Time interval between synchronizes. When set to ``0.0`` (the default), synchronizes happen every network process frame. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_property_root_path: -- :ref:`NodePath` **root_path** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``NodePath("..")`` | -+-----------+----------------------+ -| *Setter* | set_root_path(value) | -+-----------+----------------------+ -| *Getter* | get_root_path() | -+-----------+----------------------+ +:ref:`NodePath` **root_path** = ``NodePath("..")`` + +.. rst-class:: classref-property-setget + +- void **set_root_path** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_root_path** **(** **)** Node path that replicated properties are relative to. If :ref:`root_path` was spawned by a :ref:`MultiplayerSpawner`, the node will be also be spawned and despawned based on this synchronizer visibility options. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_property_visibility_update_mode: -- :ref:`VisibilityUpdateMode` **visibility_update_mode** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------------+ -| *Setter* | set_visibility_update_mode(value) | -+-----------+-----------------------------------+ -| *Getter* | get_visibility_update_mode() | -+-----------+-----------------------------------+ +:ref:`VisibilityUpdateMode` **visibility_update_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_update_mode** **(** :ref:`VisibilityUpdateMode` value **)** +- :ref:`VisibilityUpdateMode` **get_visibility_update_mode** **(** **)** Specifies when visibility filters are updated (see :ref:`VisibilityUpdateMode` for options). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_MultiplayerSynchronizer_method_add_visibility_filter: -- void **add_visibility_filter** **(** :ref:`Callable` filter **)** +.. rst-class:: classref-method + +void **add_visibility_filter** **(** :ref:`Callable` filter **)** Adds a peer visibility filter for this synchronizer. \ ``filter`` should take a peer id :ref:`int` and return a :ref:`bool`. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_method_get_visibility_for: -- :ref:`bool` **get_visibility_for** **(** :ref:`int` peer **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_visibility_for** **(** :ref:`int` peer **)** |const| Queries the current visibility for peer ``peer``. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_method_remove_visibility_filter: -- void **remove_visibility_filter** **(** :ref:`Callable` filter **)** +.. rst-class:: classref-method + +void **remove_visibility_filter** **(** :ref:`Callable` filter **)** Removes a peer visibility filter from this synchronizer. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_method_set_visibility_for: -- void **set_visibility_for** **(** :ref:`int` peer, :ref:`bool` visible **)** +.. rst-class:: classref-method + +void **set_visibility_for** **(** :ref:`int` peer, :ref:`bool` visible **)** Sets the visibility of ``peer`` to ``visible``. If ``peer`` is ``0``, the value of :ref:`public_visibility` will be updated instead. +.. rst-class:: classref-item-separator + ---- .. _class_MultiplayerSynchronizer_method_update_visibility: -- void **update_visibility** **(** :ref:`int` for_peer=0 **)** +.. rst-class:: classref-method + +void **update_visibility** **(** :ref:`int` for_peer=0 **)** Updates the visibility of ``peer`` according to visibility filters. If ``peer`` is ``0`` (the default), all peers' visibilties are updated. diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index 17691a091..2b593ce97 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -14,55 +14,80 @@ Mutex A synchronization mutex (mutual exclusion). +.. rst-class:: classref-introduction-group + Description ----------- A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`Semaphore`. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Using multiple threads <../tutorials/performance/using_multiple_threads>` +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+----------------------------------------------------------+ -| void | :ref:`lock` **(** **)** | -+---------------------------------------+----------------------------------------------------------+ -| :ref:`Error` | :ref:`try_lock` **(** **)** | -+---------------------------------------+----------------------------------------------------------+ -| void | :ref:`unlock` **(** **)** | -+---------------------------------------+----------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------+ + | void | :ref:`lock` **(** **)** | + +---------------------------------------+----------------------------------------------------------+ + | :ref:`Error` | :ref:`try_lock` **(** **)** | + +---------------------------------------+----------------------------------------------------------+ + | void | :ref:`unlock` **(** **)** | + +---------------------------------------+----------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Mutex_method_lock: -- void **lock** **(** **)** +.. rst-class:: classref-method -Locks this ``Mutex``, blocks until it is unlocked by the current owner. +void **lock** **(** **)** + +Locks this **Mutex**, blocks until it is unlocked by the current owner. \ **Note:** This function returns without blocking if the thread already has ownership of the mutex. +.. rst-class:: classref-item-separator + ---- .. _class_Mutex_method_try_lock: -- :ref:`Error` **try_lock** **(** **)** +.. rst-class:: classref-method -Tries locking this ``Mutex``, but does not block. Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_BUSY` otherwise. +:ref:`Error` **try_lock** **(** **)** + +Tries locking this **Mutex**, but does not block. Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_BUSY` otherwise. \ **Note:** This function returns :ref:`@GlobalScope.OK` if the thread already has ownership of the mutex. +.. rst-class:: classref-item-separator + ---- .. _class_Mutex_method_unlock: -- void **unlock** **(** **)** +.. rst-class:: classref-method -Unlocks this ``Mutex``, leaving it to other threads. +void **unlock** **(** **)** + +Unlocks this **Mutex**, leaving it to other threads. \ **Note:** If a thread called :ref:`lock` or :ref:`try_lock` multiple times while already having ownership of the mutex, it must also call :ref:`unlock` the same number of times in order to unlock it correctly. diff --git a/classes/class_nativeextension.rst b/classes/class_nativeextension.rst index e9131639a..37d5118ad 100644 --- a/classes/class_nativeextension.rst +++ b/classes/class_nativeextension.rst @@ -16,90 +16,143 @@ NativeExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close_library` **(** **)** | -+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`InitializationLevel` | :ref:`get_minimum_library_initialization_level` **(** **)** |const| | -+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`initialize_library` **(** :ref:`InitializationLevel` level **)** | -+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_library_open` **(** **)** |const| | -+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`open_library` **(** :ref:`String` path, :ref:`String` entry_symbol **)** | -+----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close_library` **(** **)** | + +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InitializationLevel` | :ref:`get_minimum_library_initialization_level` **(** **)** |const| | + +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`initialize_library` **(** :ref:`InitializationLevel` level **)** | + +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_library_open` **(** **)** |const| | + +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`open_library` **(** :ref:`String` path, :ref:`String` entry_symbol **)** | + +----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_NativeExtension_InitializationLevel: -.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_CORE: - -.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_SERVERS: - -.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_SCENE: - -.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_EDITOR: +.. rst-class:: classref-enumeration enum **InitializationLevel**: -- **INITIALIZATION_LEVEL_CORE** = **0** +.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_CORE: -- **INITIALIZATION_LEVEL_SERVERS** = **1** +.. rst-class:: classref-enumeration-constant -- **INITIALIZATION_LEVEL_SCENE** = **2** +:ref:`InitializationLevel` **INITIALIZATION_LEVEL_CORE** = ``0`` -- **INITIALIZATION_LEVEL_EDITOR** = **3** + + +.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_SERVERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitializationLevel` **INITIALIZATION_LEVEL_SERVERS** = ``1`` + + + +.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_SCENE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitializationLevel` **INITIALIZATION_LEVEL_SCENE** = ``2`` + + + +.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitializationLevel` **INITIALIZATION_LEVEL_EDITOR** = ``3`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_NativeExtension_method_close_library: -- void **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 `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtension_method_get_minimum_library_initialization_level: -- :ref:`InitializationLevel` **get_minimum_library_initialization_level** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`InitializationLevel` **get_minimum_library_initialization_level** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtension_method_initialize_library: -- void **initialize_library** **(** :ref:`InitializationLevel` level **)** +.. rst-class:: classref-method + +void **initialize_library** **(** :ref:`InitializationLevel` level **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtension_method_is_library_open: -- :ref:`bool` **is_library_open** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_library_open** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtension_method_open_library: -- :ref:`Error` **open_library** **(** :ref:`String` path, :ref:`String` entry_symbol **)** +.. rst-class:: classref-method + +:ref:`Error` **open_library** **(** :ref:`String` path, :ref:`String` entry_symbol **)** .. container:: contribute diff --git a/classes/class_nativeextensionmanager.rst b/classes/class_nativeextensionmanager.rst index 9f74ab453..2f8b997bf 100644 --- a/classes/class_nativeextensionmanager.rst +++ b/classes/class_nativeextensionmanager.rst @@ -16,106 +16,167 @@ NativeExtensionManager There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NativeExtension` | :ref:`get_extension` **(** :ref:`String` path **)** | -+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_loaded_extensions` **(** **)** |const| | -+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_extension_loaded` **(** :ref:`String` path **)** |const| | -+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`LoadStatus` | :ref:`load_extension` **(** :ref:`String` path **)** | -+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`LoadStatus` | :ref:`reload_extension` **(** :ref:`String` path **)** | -+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`LoadStatus` | :ref:`unload_extension` **(** :ref:`String` path **)** | -+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NativeExtension` | :ref:`get_extension` **(** :ref:`String` path **)** | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_loaded_extensions` **(** **)** |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_extension_loaded` **(** :ref:`String` path **)** |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LoadStatus` | :ref:`load_extension` **(** :ref:`String` path **)** | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LoadStatus` | :ref:`reload_extension` **(** :ref:`String` path **)** | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LoadStatus` | :ref:`unload_extension` **(** :ref:`String` path **)** | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_NativeExtensionManager_LoadStatus: -.. _class_NativeExtensionManager_constant_LOAD_STATUS_OK: - -.. _class_NativeExtensionManager_constant_LOAD_STATUS_FAILED: - -.. _class_NativeExtensionManager_constant_LOAD_STATUS_ALREADY_LOADED: - -.. _class_NativeExtensionManager_constant_LOAD_STATUS_NOT_LOADED: - -.. _class_NativeExtensionManager_constant_LOAD_STATUS_NEEDS_RESTART: +.. rst-class:: classref-enumeration enum **LoadStatus**: -- **LOAD_STATUS_OK** = **0** +.. _class_NativeExtensionManager_constant_LOAD_STATUS_OK: -- **LOAD_STATUS_FAILED** = **1** +.. rst-class:: classref-enumeration-constant -- **LOAD_STATUS_ALREADY_LOADED** = **2** +:ref:`LoadStatus` **LOAD_STATUS_OK** = ``0`` -- **LOAD_STATUS_NOT_LOADED** = **3** -- **LOAD_STATUS_NEEDS_RESTART** = **4** + +.. _class_NativeExtensionManager_constant_LOAD_STATUS_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoadStatus` **LOAD_STATUS_FAILED** = ``1`` + + + +.. _class_NativeExtensionManager_constant_LOAD_STATUS_ALREADY_LOADED: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoadStatus` **LOAD_STATUS_ALREADY_LOADED** = ``2`` + + + +.. _class_NativeExtensionManager_constant_LOAD_STATUS_NOT_LOADED: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoadStatus` **LOAD_STATUS_NOT_LOADED** = ``3`` + + + +.. _class_NativeExtensionManager_constant_LOAD_STATUS_NEEDS_RESTART: + +.. rst-class:: classref-enumeration-constant + +:ref:`LoadStatus` **LOAD_STATUS_NEEDS_RESTART** = ``4`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_NativeExtensionManager_method_get_extension: -- :ref:`NativeExtension` **get_extension** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`NativeExtension` **get_extension** **(** :ref:`String` path **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtensionManager_method_get_loaded_extensions: -- :ref:`PackedStringArray` **get_loaded_extensions** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_loaded_extensions** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtensionManager_method_is_extension_loaded: -- :ref:`bool` **is_extension_loaded** **(** :ref:`String` path **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_extension_loaded** **(** :ref:`String` path **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtensionManager_method_load_extension: -- :ref:`LoadStatus` **load_extension** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`LoadStatus` **load_extension** **(** :ref:`String` path **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtensionManager_method_reload_extension: -- :ref:`LoadStatus` **reload_extension** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`LoadStatus` **reload_extension** **(** :ref:`String` path **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_NativeExtensionManager_method_unload_extension: -- :ref:`LoadStatus` **unload_extension** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`LoadStatus` **unload_extension** **(** :ref:`String` path **)** .. container:: contribute diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 7349e786b..d990e194e 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -14,395 +14,502 @@ NavigationAgent2D 2D Agent used in navigation for collision avoidance. +.. rst-class:: classref-introduction-group + Description ----------- -2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. ``NavigationAgent2D`` is physics safe. +2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. **NavigationAgent2D** is physics safe. \ **Note:** After setting :ref:`target_location` it is required to use the :ref:`get_next_location` function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`max_neighbors` | ``10`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`max_speed` | ``200.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`path_max_distance` | ``3.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`radius` | ``10.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`target_location` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`time_horizon` | ``20.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`max_speed` | ``200.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``3.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`target_location` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`time_horizon` | ``20.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_final_location` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_nav_path` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_nav_path_index` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_next_location` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_target_reachable` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_velocity` **(** :ref:`Vector2` velocity **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_final_location` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_nav_path` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_nav_path_index` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_next_location` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reachable` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_velocity` **(** :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_NavigationAgent2D_signal_navigation_finished: -- **navigation_finished** **(** **)** +.. rst-class:: classref-signal + +**navigation_finished** **(** **)** Notifies when the final location is reached. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_signal_path_changed: -- **path_changed** **(** **)** +.. rst-class:: classref-signal + +**path_changed** **(** **)** Notifies when the navigation path changes. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_signal_target_reached: -- **target_reached** **(** **)** +.. rst-class:: classref-signal + +**target_reached** **(** **)** Notifies when the player-defined :ref:`target_location` is reached. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_signal_velocity_computed: -- **velocity_computed** **(** :ref:`Vector2` safe_velocity **)** +.. rst-class:: classref-signal + +**velocity_computed** **(** :ref:`Vector2` safe_velocity **)** Notifies when the collision avoidance velocity is calculated. Emitted by :ref:`set_velocity`. Only emitted when :ref:`avoidance_enabled` is true. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_NavigationAgent2D_property_avoidance_enabled: -- :ref:`bool` **avoidance_enabled** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_avoidance_enabled(value) | -+-----------+------------------------------+ -| *Getter* | get_avoidance_enabled() | -+-----------+------------------------------+ +:ref:`bool` **avoidance_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_avoidance_enabled** **(** **)** If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer2D`. When :ref:`set_velocity` is used and the processing is completed a ``safe_velocity`` Vector2 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_max_neighbors: -- :ref:`int` **max_neighbors** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``10`` | -+-----------+--------------------------+ -| *Setter* | set_max_neighbors(value) | -+-----------+--------------------------+ -| *Getter* | get_max_neighbors() | -+-----------+--------------------------+ +:ref:`int` **max_neighbors** = ``10`` + +.. rst-class:: classref-property-setget + +- void **set_max_neighbors** **(** :ref:`int` value **)** +- :ref:`int` **get_max_neighbors** **(** **)** The maximum number of neighbors for the agent to consider. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_max_speed: -- :ref:`float` **max_speed** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``200.0`` | -+-----------+----------------------+ -| *Setter* | set_max_speed(value) | -+-----------+----------------------+ -| *Getter* | get_max_speed() | -+-----------+----------------------+ +:ref:`float` **max_speed** = ``200.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_speed** **(** :ref:`float` value **)** +- :ref:`float` **get_max_speed** **(** **)** The maximum speed that an agent can move. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_navigation_layers** **(** **)** A bitfield determining what navigation layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_neighbor_distance: -- :ref:`float` **neighbor_distance** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``500.0`` | -+-----------+------------------------------+ -| *Setter* | set_neighbor_distance(value) | -+-----------+------------------------------+ -| *Getter* | get_neighbor_distance() | -+-----------+------------------------------+ +:ref:`float` **neighbor_distance** = ``500.0`` + +.. rst-class:: classref-property-setget + +- void **set_neighbor_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_neighbor_distance** **(** **)** The distance to search for other agents. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_path_desired_distance: -- :ref:`float` **path_desired_distance** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------------+ -| *Setter* | set_path_desired_distance(value) | -+-----------+----------------------------------+ -| *Getter* | get_path_desired_distance() | -+-----------+----------------------------------+ +:ref:`float` **path_desired_distance** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_path_desired_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_path_desired_distance** **(** **)** The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_path_max_distance: -- :ref:`float` **path_max_distance** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``3.0`` | -+-----------+------------------------------+ -| *Setter* | set_path_max_distance(value) | -+-----------+------------------------------+ -| *Getter* | get_path_max_distance() | -+-----------+------------------------------+ +:ref:`float` **path_max_distance** = ``3.0`` + +.. rst-class:: classref-property-setget + +- void **set_path_max_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_path_max_distance** **(** **)** The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``10.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`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`). Does not affect normal pathfinding. To change an actor's pathfinding radius bake :ref:`NavigationMesh` resources with a different :ref:`NavigationMesh.agent_radius` property and use different navigation maps for each actor size. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_target_desired_distance: -- :ref:`float` **target_desired_distance** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------------+ -| *Setter* | set_target_desired_distance(value) | -+-----------+------------------------------------+ -| *Getter* | get_target_desired_distance() | -+-----------+------------------------------------+ +:ref:`float` **target_desired_distance** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_target_desired_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_target_desired_distance** **(** **)** The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_target_location: -- :ref:`Vector2` **target_location** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_target_location(value) | -+-----------+----------------------------+ -| *Getter* | get_target_location() | -+-----------+----------------------------+ +:ref:`Vector2` **target_location** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_target_location** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_target_location** **(** **)** The user-defined target location. Setting this property will clear the current navigation path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_property_time_horizon: -- :ref:`float` **time_horizon** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``20.0`` | -+-----------+-------------------------+ -| *Setter* | set_time_horizon(value) | -+-----------+-------------------------+ -| *Getter* | get_time_horizon() | -+-----------+-------------------------+ +:ref:`float` **time_horizon** = ``20.0`` + +.. rst-class:: classref-property-setget + +- void **set_time_horizon** **(** :ref:`float` value **)** +- :ref:`float` **get_time_horizon** **(** **)** 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. Must be positive. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationAgent2D_method_distance_to_target: -- :ref:`float` **distance_to_target** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_to_target** **(** **)** |const| Returns the distance to the target location, using the agent's global position. The user must set :ref:`target_location` in order for this to be accurate. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_get_final_location: -- :ref:`Vector2` **get_final_location** **(** **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_final_location** **(** **)** Returns the reachable final location 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_get_nav_path: -- :ref:`PackedVector2Array` **get_nav_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_nav_path** **(** **)** |const| Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location 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_location` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_get_nav_path_index: -- :ref:`int` **get_nav_path_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_nav_path_index** **(** **)** |const| Returns which index the agent is currently on in the navigation path's :ref:`PackedVector2Array`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_get_navigation_layer_value: -- :ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_get_navigation_map: -- :ref:`RID` **get_navigation_map** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_navigation_map** **(** **)** |const| Returns the :ref:`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` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_get_next_location: -- :ref:`Vector2` **get_next_location** **(** **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_next_location** **(** **)** Returns the next location 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns the :ref:`RID` of this agent on the :ref:`NavigationServer2D`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_is_navigation_finished: -- :ref:`bool` **is_navigation_finished** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_navigation_finished** **(** **)** Returns true if the navigation path's final location has been reached. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_is_target_reachable: -- :ref:`bool` **is_target_reachable** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_target_reachable** **(** **)** Returns true if :ref:`target_location` is reachable. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_is_target_reached: -- :ref:`bool` **is_target_reached** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_target_reached** **(** **)** |const| Returns true if :ref:`target_location` is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See :ref:`get_final_location`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_set_navigation_layer_value: -- void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_set_navigation_map: -- void **set_navigation_map** **(** :ref:`RID` navigation_map **)** +.. rst-class:: classref-method + +void **set_navigation_map** **(** :ref:`RID` navigation_map **)** Sets the :ref:`RID` of the navigation map this NavigationAgent node should use and also updates the ``agent`` on the NavigationServer. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent2D_method_set_velocity: -- void **set_velocity** **(** :ref:`Vector2` velocity **)** +.. rst-class:: classref-method + +void **set_velocity** **(** :ref:`Vector2` velocity **)** Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the :ref:`velocity_computed` signal. diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index a80d6cc95..1ee643739 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -14,431 +14,540 @@ NavigationAgent3D 3D Agent used in navigation for collision avoidance. +.. rst-class:: classref-introduction-group + Description ----------- -3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. ``NavigationAgent3D`` is physics safe. +3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. **NavigationAgent3D** is physics safe. \ **Note:** After setting :ref:`target_location` it is required to use the :ref:`get_next_location` function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`ignore_y` | ``true`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`max_neighbors` | ``10`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`max_speed` | ``10.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`path_max_distance` | ``3.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`target_location` | ``Vector3(0, 0, 0)`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`time_horizon` | ``5.0`` | -+-------------------------------+------------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`ignore_y` | ``true`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`max_speed` | ``10.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``3.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`target_location` | ``Vector3(0, 0, 0)`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`time_horizon` | ``5.0`` | + +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_final_location` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_nav_path` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_nav_path_index` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_next_location` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_target_reachable` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_velocity` **(** :ref:`Vector3` velocity **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_final_location` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_nav_path` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_nav_path_index` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_next_location` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reachable` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_velocity` **(** :ref:`Vector3` velocity **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_NavigationAgent3D_signal_navigation_finished: -- **navigation_finished** **(** **)** +.. rst-class:: classref-signal + +**navigation_finished** **(** **)** Notifies when the final location is reached. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_signal_path_changed: -- **path_changed** **(** **)** +.. rst-class:: classref-signal + +**path_changed** **(** **)** Notifies when the navigation path changes. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_signal_target_reached: -- **target_reached** **(** **)** +.. rst-class:: classref-signal + +**target_reached** **(** **)** Notifies when the player-defined :ref:`target_location` is reached. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_signal_velocity_computed: -- **velocity_computed** **(** :ref:`Vector3` safe_velocity **)** +.. rst-class:: classref-signal + +**velocity_computed** **(** :ref:`Vector3` safe_velocity **)** Notifies when the collision avoidance velocity is calculated. Emitted by :ref:`set_velocity`. Only emitted when :ref:`avoidance_enabled` is true. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_NavigationAgent3D_property_agent_height_offset: -- :ref:`float` **agent_height_offset** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_agent_height_offset(value) | -+-----------+--------------------------------+ -| *Getter* | get_agent_height_offset() | -+-----------+--------------------------------+ +:ref:`float` **agent_height_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_agent_height_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_agent_height_offset** **(** **)** The NavigationAgent 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_avoidance_enabled: -- :ref:`bool` **avoidance_enabled** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_avoidance_enabled(value) | -+-----------+------------------------------+ -| *Getter* | get_avoidance_enabled() | -+-----------+------------------------------+ +:ref:`bool` **avoidance_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_avoidance_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_avoidance_enabled** **(** **)** If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer3D`. When :ref:`set_velocity` is used and the processing is completed a ``safe_velocity`` Vector3 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_ignore_y: -- :ref:`bool` **ignore_y** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_ignore_y(value) | -+-----------+---------------------+ -| *Getter* | get_ignore_y() | -+-----------+---------------------+ +:ref:`bool` **ignore_y** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_ignore_y** **(** :ref:`bool` value **)** +- :ref:`bool` **get_ignore_y** **(** **)** Ignores collisions on the Y axis. Must be true to move on a horizontal plane. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_max_neighbors: -- :ref:`int` **max_neighbors** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``10`` | -+-----------+--------------------------+ -| *Setter* | set_max_neighbors(value) | -+-----------+--------------------------+ -| *Getter* | get_max_neighbors() | -+-----------+--------------------------+ +:ref:`int` **max_neighbors** = ``10`` + +.. rst-class:: classref-property-setget + +- void **set_max_neighbors** **(** :ref:`int` value **)** +- :ref:`int` **get_max_neighbors** **(** **)** The maximum number of neighbors for the agent to consider. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_max_speed: -- :ref:`float` **max_speed** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``10.0`` | -+-----------+----------------------+ -| *Setter* | set_max_speed(value) | -+-----------+----------------------+ -| *Getter* | get_max_speed() | -+-----------+----------------------+ +:ref:`float` **max_speed** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_speed** **(** :ref:`float` value **)** +- :ref:`float` **get_max_speed** **(** **)** The maximum speed that an agent can move. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_navigation_layers** **(** **)** A bitfield determining what navigation layers of navigation regions this NavigationAgent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_neighbor_distance: -- :ref:`float` **neighbor_distance** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``50.0`` | -+-----------+------------------------------+ -| *Setter* | set_neighbor_distance(value) | -+-----------+------------------------------+ -| *Getter* | get_neighbor_distance() | -+-----------+------------------------------+ +:ref:`float` **neighbor_distance** = ``50.0`` + +.. rst-class:: classref-property-setget + +- void **set_neighbor_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_neighbor_distance** **(** **)** The distance to search for other agents. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_path_desired_distance: -- :ref:`float` **path_desired_distance** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------------+ -| *Setter* | set_path_desired_distance(value) | -+-----------+----------------------------------+ -| *Getter* | get_path_desired_distance() | -+-----------+----------------------------------+ +:ref:`float` **path_desired_distance** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_path_desired_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_path_desired_distance** **(** **)** The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_path_max_distance: -- :ref:`float` **path_max_distance** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``3.0`` | -+-----------+------------------------------+ -| *Setter* | set_path_max_distance(value) | -+-----------+------------------------------+ -| *Getter* | get_path_max_distance() | -+-----------+------------------------------+ +:ref:`float` **path_max_distance** = ``3.0`` + +.. rst-class:: classref-property-setget + +- void **set_path_max_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_path_max_distance** **(** **)** The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`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`). Does not affect normal pathfinding. To change an actor's pathfinding radius bake :ref:`NavigationMesh` resources with a different :ref:`NavigationMesh.agent_radius` property and use different navigation maps for each actor size. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_target_desired_distance: -- :ref:`float` **target_desired_distance** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------------+ -| *Setter* | set_target_desired_distance(value) | -+-----------+------------------------------------+ -| *Getter* | get_target_desired_distance() | -+-----------+------------------------------------+ +:ref:`float` **target_desired_distance** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_target_desired_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_target_desired_distance** **(** **)** The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_target_location: -- :ref:`Vector3` **target_location** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_target_location(value) | -+-----------+----------------------------+ -| *Getter* | get_target_location() | -+-----------+----------------------------+ +:ref:`Vector3` **target_location** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_target_location** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_target_location** **(** **)** The user-defined target location. Setting this property will clear the current navigation path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_property_time_horizon: -- :ref:`float` **time_horizon** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``5.0`` | -+-----------+-------------------------+ -| *Setter* | set_time_horizon(value) | -+-----------+-------------------------+ -| *Getter* | get_time_horizon() | -+-----------+-------------------------+ +:ref:`float` **time_horizon** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_time_horizon** **(** :ref:`float` value **)** +- :ref:`float` **get_time_horizon** **(** **)** 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. Must be positive. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationAgent3D_method_distance_to_target: -- :ref:`float` **distance_to_target** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_to_target** **(** **)** |const| Returns the distance to the target location, using the agent's global position. The user must set :ref:`target_location` in order for this to be accurate. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_get_final_location: -- :ref:`Vector3` **get_final_location** **(** **)** +.. rst-class:: classref-method + +:ref:`Vector3` **get_final_location** **(** **)** Returns the reachable final location 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_get_nav_path: -- :ref:`PackedVector3Array` **get_nav_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_nav_path** **(** **)** |const| Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location 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_location` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_get_nav_path_index: -- :ref:`int` **get_nav_path_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_nav_path_index** **(** **)** |const| Returns which index the agent is currently on in the navigation path's :ref:`PackedVector3Array`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_get_navigation_layer_value: -- :ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_get_navigation_map: -- :ref:`RID` **get_navigation_map** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_navigation_map** **(** **)** |const| Returns the :ref:`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` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_get_next_location: -- :ref:`Vector3` **get_next_location** **(** **)** +.. rst-class:: classref-method + +:ref:`Vector3` **get_next_location** **(** **)** Returns the next location 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns the :ref:`RID` of this agent on the :ref:`NavigationServer3D`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_is_navigation_finished: -- :ref:`bool` **is_navigation_finished** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_navigation_finished** **(** **)** Returns true if the navigation path's final location has been reached. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_is_target_reachable: -- :ref:`bool` **is_target_reachable** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_target_reachable** **(** **)** Returns true if :ref:`target_location` is reachable. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_is_target_reached: -- :ref:`bool` **is_target_reached** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_target_reached** **(** **)** |const| Returns true if :ref:`target_location` is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See :ref:`get_final_location`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_set_navigation_layer_value: -- void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_set_navigation_map: -- void **set_navigation_map** **(** :ref:`RID` navigation_map **)** +.. rst-class:: classref-method + +void **set_navigation_map** **(** :ref:`RID` navigation_map **)** Sets the :ref:`RID` of the navigation map this NavigationAgent node should use and also updates the ``agent`` on the NavigationServer. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationAgent3D_method_set_velocity: -- void **set_velocity** **(** :ref:`Vector3` velocity **)** +.. rst-class:: classref-method + +void **set_velocity** **(** :ref:`Vector3` velocity **)** Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the :ref:`velocity_computed` signal. diff --git a/classes/class_navigationlink2d.rst b/classes/class_navigationlink2d.rst index cd3197e66..e7194f6b0 100644 --- a/classes/class_navigationlink2d.rst +++ b/classes/class_navigationlink2d.rst @@ -14,85 +14,104 @@ NavigationLink2D Creates a link between two locations that :ref:`NavigationServer2D` can route agents through. +.. rst-class:: classref-introduction-group + Description ----------- Creates a link between two locations that :ref:`NavigationServer2D` can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`bidirectional` | ``true`` | -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`end_location` | ``Vector2(0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`enter_cost` | ``0.0`` | -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`start_location` | ``Vector2(0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`travel_cost` | ``1.0`` | -+-------------------------------+-----------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`bidirectional` | ``true`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`end_location` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`enter_cost` | ``0.0`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`start_location` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`travel_cost` | ``1.0`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationLink2D_property_bidirectional: -- :ref:`bool` **bidirectional** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_bidirectional(value) | -+-----------+--------------------------+ -| *Getter* | is_bidirectional() | -+-----------+--------------------------+ +:ref:`bool` **bidirectional** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_bidirectional** **(** :ref:`bool` value **)** +- :ref:`bool` **is_bidirectional** **(** **)** Whether this link can be traveled in both directions or only from :ref:`start_location` to :ref:`end_location`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink2D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** Whether this link is currently active. If ``false``, :ref:`NavigationServer2D.map_get_path` will ignore this link. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink2D_property_end_location: -- :ref:`Vector2` **end_location** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_end_location(value) | -+-----------+-------------------------+ -| *Getter* | get_end_location() | -+-----------+-------------------------+ +:ref:`Vector2` **end_location** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_end_location** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_end_location** **(** **)** Ending position of the link. @@ -100,51 +119,54 @@ This position will search out the nearest polygon in the navigation mesh to atta The distance the link will search is controlled by :ref:`NavigationServer2D.map_set_link_connection_radius`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink2D_property_enter_cost: -- :ref:`float` **enter_cost** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_enter_cost(value) | -+-----------+-----------------------+ -| *Getter* | get_enter_cost() | -+-----------+-----------------------+ +:ref:`float` **enter_cost** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_enter_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_enter_cost** **(** **)** When pathfinding enters this link from another regions navmesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink2D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink2D_property_start_location: -- :ref:`Vector2` **start_location** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_start_location(value) | -+-----------+---------------------------+ -| *Getter* | get_start_location() | -+-----------+---------------------------+ +:ref:`Vector2` **start_location** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_start_location** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_start_location** **(** **)** Starting position of the link. @@ -152,36 +174,49 @@ This position will search out the nearest polygon in the navigation mesh to atta The distance the link will search is controlled by :ref:`NavigationServer2D.map_set_link_connection_radius`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink2D_property_travel_cost: -- :ref:`float` **travel_cost** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_travel_cost(value) | -+-----------+------------------------+ -| *Getter* | get_travel_cost() | -+-----------+------------------------+ +:ref:`float` **travel_cost** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_travel_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_travel_cost** **(** **)** When pathfinding moves along the link the traveled distance is multiplied with ``travel_cost`` for determining the shortest path. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationLink2D_method_get_navigation_layer_value: -- :ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink2D_method_set_navigation_layer_value: -- void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_navigationlink3d.rst b/classes/class_navigationlink3d.rst index c09cc9e97..4794f646e 100644 --- a/classes/class_navigationlink3d.rst +++ b/classes/class_navigationlink3d.rst @@ -14,85 +14,104 @@ NavigationLink3D Creates a link between two locations that :ref:`NavigationServer3D` can route agents through. +.. rst-class:: classref-introduction-group + Description ----------- Creates a link between two locations that :ref:`NavigationServer3D` can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`bidirectional` | ``true`` | -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`end_location` | ``Vector3(0, 0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`enter_cost` | ``0.0`` | -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`start_location` | ``Vector3(0, 0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`travel_cost` | ``1.0`` | -+-------------------------------+-----------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`bidirectional` | ``true`` | + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`end_location` | ``Vector3(0, 0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`enter_cost` | ``0.0`` | + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`start_location` | ``Vector3(0, 0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`travel_cost` | ``1.0`` | + +-------------------------------+-----------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationLink3D_property_bidirectional: -- :ref:`bool` **bidirectional** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_bidirectional(value) | -+-----------+--------------------------+ -| *Getter* | is_bidirectional() | -+-----------+--------------------------+ +:ref:`bool` **bidirectional** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_bidirectional** **(** :ref:`bool` value **)** +- :ref:`bool` **is_bidirectional** **(** **)** Whether this link can be traveled in both directions or only from :ref:`start_location` to :ref:`end_location`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink3D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** Whether this link is currently active. If ``false``, :ref:`NavigationServer3D.map_get_path` will ignore this link. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink3D_property_end_location: -- :ref:`Vector3` **end_location** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_end_location(value) | -+-----------+-------------------------+ -| *Getter* | get_end_location() | -+-----------+-------------------------+ +:ref:`Vector3` **end_location** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_end_location** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_end_location** **(** **)** Ending position of the link. @@ -100,51 +119,54 @@ This position will search out the nearest polygon in the navigation mesh to atta The distance the link will search is controlled by :ref:`NavigationServer3D.map_set_link_connection_radius`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink3D_property_enter_cost: -- :ref:`float` **enter_cost** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_enter_cost(value) | -+-----------+-----------------------+ -| *Getter* | get_enter_cost() | -+-----------+-----------------------+ +:ref:`float` **enter_cost** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_enter_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_enter_cost** **(** **)** When pathfinding enters this link from another regions navmesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink3D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink3D_property_start_location: -- :ref:`Vector3` **start_location** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_start_location(value) | -+-----------+---------------------------+ -| *Getter* | get_start_location() | -+-----------+---------------------------+ +:ref:`Vector3` **start_location** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_start_location** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_start_location** **(** **)** Starting position of the link. @@ -152,36 +174,49 @@ This position will search out the nearest polygon in the navigation mesh to atta The distance the link will search is controlled by :ref:`NavigationServer3D.map_set_link_connection_radius`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink3D_property_travel_cost: -- :ref:`float` **travel_cost** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_travel_cost(value) | -+-----------+------------------------+ -| *Getter* | get_travel_cost() | -+-----------+------------------------+ +:ref:`float` **travel_cost** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_travel_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_travel_cost** **(** **)** When pathfinding moves along the link the traveled distance is multiplied with ``travel_cost`` for determining the shortest path. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationLink3D_method_get_navigation_layer_value: -- :ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationLink3D_method_set_navigation_layer_value: -- void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index ab42c56f5..a18540801 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -14,614 +14,759 @@ NavigationMesh A mesh to approximate the walkable areas and obstacles. +.. rst-class:: classref-introduction-group + Description ----------- A navigation mesh is a collection of polygons that define which areas of an environment are traversable to aid agents in pathfinding through complicated spaces. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Navmesh Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`agent_height` | ``1.5`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`agent_max_climb` | ``0.25`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`agent_max_slope` | ``45.0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`agent_radius` | ``0.5`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`cell_height` | ``0.25`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`cell_size` | ``0.25`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`detail_sample_distance` | ``6.0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`detail_sample_max_error` | ``1.0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`edge_max_error` | ``1.3`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`edge_max_length` | ``12.0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`AABB` | :ref:`filter_baking_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Vector3` | :ref:`filter_baking_aabb_offset` | ``Vector3(0, 0, 0)`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`filter_ledge_spans` | ``false`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`filter_low_hanging_obstacles` | ``false`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`filter_walkable_low_height_spans` | ``false`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`int` | :ref:`geometry_collision_mask` | ``4294967295`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`ParsedGeometryType` | :ref:`geometry_parsed_geometry_type` | ``0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`SourceGeometryMode` | :ref:`geometry_source_geometry_mode` | ``0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`StringName` | :ref:`geometry_source_group_name` | ``&"navmesh"`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`polygon_verts_per_poly` | ``6.0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`region_merge_size` | ``20.0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`region_min_size` | ``2.0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`SamplePartitionType` | :ref:`sample_partition_type` | ``0`` | -+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`agent_height` | ``1.5`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`agent_max_climb` | ``0.25`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`agent_max_slope` | ``45.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`agent_radius` | ``0.5`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`cell_height` | ``0.25`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`cell_size` | ``0.25`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`detail_sample_distance` | ``6.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`detail_sample_max_error` | ``1.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`edge_max_error` | ``1.3`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`edge_max_length` | ``12.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`AABB` | :ref:`filter_baking_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Vector3` | :ref:`filter_baking_aabb_offset` | ``Vector3(0, 0, 0)`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`filter_ledge_spans` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`filter_low_hanging_obstacles` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`filter_walkable_low_height_spans` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`geometry_collision_mask` | ``4294967295`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`ParsedGeometryType` | :ref:`geometry_parsed_geometry_type` | ``0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`SourceGeometryMode` | :ref:`geometry_source_geometry_mode` | ``0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`StringName` | :ref:`geometry_source_group_name` | ``&"navmesh"`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`polygon_verts_per_poly` | ``6.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`region_merge_size` | ``20.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`region_min_size` | ``2.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`SamplePartitionType` | :ref:`sample_partition_type` | ``0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+----------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_polygon` **(** :ref:`PackedInt32Array` polygon **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_polygons` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_from_mesh` **(** :ref:`Mesh` mesh **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_polygon` **(** :ref:`int` idx **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_polygon_count` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_vertices` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertices` **(** :ref:`PackedVector3Array` vertices **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_polygon` **(** :ref:`PackedInt32Array` polygon **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_polygons` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_from_mesh` **(** :ref:`Mesh` mesh **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_polygon` **(** :ref:`int` idx **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_polygon_count` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_vertices` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertices` **(** :ref:`PackedVector3Array` vertices **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_NavigationMesh_SamplePartitionType: -.. _class_NavigationMesh_constant_SAMPLE_PARTITION_WATERSHED: - -.. _class_NavigationMesh_constant_SAMPLE_PARTITION_MONOTONE: - -.. _class_NavigationMesh_constant_SAMPLE_PARTITION_LAYERS: - -.. _class_NavigationMesh_constant_SAMPLE_PARTITION_MAX: +.. rst-class:: classref-enumeration enum **SamplePartitionType**: -- **SAMPLE_PARTITION_WATERSHED** = **0** --- Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas. +.. _class_NavigationMesh_constant_SAMPLE_PARTITION_WATERSHED: -- **SAMPLE_PARTITION_MONOTONE** = **1** --- Monotone partitioning. Use this if you want fast navigation mesh generation. +.. rst-class:: classref-enumeration-constant -- **SAMPLE_PARTITION_LAYERS** = **2** --- Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles. +:ref:`SamplePartitionType` **SAMPLE_PARTITION_WATERSHED** = ``0`` -- **SAMPLE_PARTITION_MAX** = **3** --- Represents the size of the :ref:`SamplePartitionType` enum. +Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas. + +.. _class_NavigationMesh_constant_SAMPLE_PARTITION_MONOTONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplePartitionType` **SAMPLE_PARTITION_MONOTONE** = ``1`` + +Monotone partitioning. Use this if you want fast navigation mesh generation. + +.. _class_NavigationMesh_constant_SAMPLE_PARTITION_LAYERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplePartitionType` **SAMPLE_PARTITION_LAYERS** = ``2`` + +Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles. + +.. _class_NavigationMesh_constant_SAMPLE_PARTITION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplePartitionType` **SAMPLE_PARTITION_MAX** = ``3`` + +Represents the size of the :ref:`SamplePartitionType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_NavigationMesh_ParsedGeometryType: -.. _class_NavigationMesh_constant_PARSED_GEOMETRY_MESH_INSTANCES: - -.. _class_NavigationMesh_constant_PARSED_GEOMETRY_STATIC_COLLIDERS: - -.. _class_NavigationMesh_constant_PARSED_GEOMETRY_BOTH: - -.. _class_NavigationMesh_constant_PARSED_GEOMETRY_MAX: +.. rst-class:: classref-enumeration enum **ParsedGeometryType**: -- **PARSED_GEOMETRY_MESH_INSTANCES** = **0** --- Parses mesh instances as geometry. This includes :ref:`MeshInstance3D`, :ref:`CSGShape3D`, and :ref:`GridMap` nodes. +.. _class_NavigationMesh_constant_PARSED_GEOMETRY_MESH_INSTANCES: -- **PARSED_GEOMETRY_STATIC_COLLIDERS** = **1** --- Parses :ref:`StaticBody3D` colliders as geometry. The collider should be in any of the layers specified by :ref:`geometry_collision_mask`. +.. rst-class:: classref-enumeration-constant -- **PARSED_GEOMETRY_BOTH** = **2** --- Both :ref:`PARSED_GEOMETRY_MESH_INSTANCES` and :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS`. +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_MESH_INSTANCES** = ``0`` -- **PARSED_GEOMETRY_MAX** = **3** --- Represents the size of the :ref:`ParsedGeometryType` enum. +Parses mesh instances as geometry. This includes :ref:`MeshInstance3D`, :ref:`CSGShape3D`, and :ref:`GridMap` nodes. + +.. _class_NavigationMesh_constant_PARSED_GEOMETRY_STATIC_COLLIDERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_STATIC_COLLIDERS** = ``1`` + +Parses :ref:`StaticBody3D` colliders as geometry. The collider should be in any of the layers specified by :ref:`geometry_collision_mask`. + +.. _class_NavigationMesh_constant_PARSED_GEOMETRY_BOTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_BOTH** = ``2`` + +Both :ref:`PARSED_GEOMETRY_MESH_INSTANCES` and :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS`. + +.. _class_NavigationMesh_constant_PARSED_GEOMETRY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_MAX** = ``3`` + +Represents the size of the :ref:`ParsedGeometryType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_NavigationMesh_SourceGeometryMode: -.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_NAVMESH_CHILDREN: - -.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN: - -.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_GROUPS_EXPLICIT: - -.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_MAX: +.. rst-class:: classref-enumeration enum **SourceGeometryMode**: -- **SOURCE_GEOMETRY_NAVMESH_CHILDREN** = **0** --- Scans the child nodes of :ref:`NavigationRegion3D` recursively for geometry. +.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_NAVMESH_CHILDREN: -- **SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN** = **1** --- Scans nodes in a group and their child nodes recursively for geometry. The group is specified by :ref:`geometry_source_group_name`. +.. rst-class:: classref-enumeration-constant -- **SOURCE_GEOMETRY_GROUPS_EXPLICIT** = **2** --- Uses nodes in a group for geometry. The group is specified by :ref:`geometry_source_group_name`. +:ref:`SourceGeometryMode` **SOURCE_GEOMETRY_NAVMESH_CHILDREN** = ``0`` -- **SOURCE_GEOMETRY_MAX** = **3** --- Represents the size of the :ref:`SourceGeometryMode` enum. +Scans the child nodes of :ref:`NavigationRegion3D` recursively for geometry. + +.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN: + +.. rst-class:: classref-enumeration-constant + +:ref:`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:`geometry_source_group_name`. + +.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_GROUPS_EXPLICIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode` **SOURCE_GEOMETRY_GROUPS_EXPLICIT** = ``2`` + +Uses nodes in a group for geometry. The group is specified by :ref:`geometry_source_group_name`. + +.. _class_NavigationMesh_constant_SOURCE_GEOMETRY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode` **SOURCE_GEOMETRY_MAX** = ``3`` + +Represents the size of the :ref:`SourceGeometryMode` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationMesh_property_agent_height: -- :ref:`float` **agent_height** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.5`` | -+-----------+-------------------------+ -| *Setter* | set_agent_height(value) | -+-----------+-------------------------+ -| *Getter* | get_agent_height() | -+-----------+-------------------------+ +:ref:`float` **agent_height** = ``1.5`` + +.. rst-class:: classref-property-setget + +- void **set_agent_height** **(** :ref:`float` value **)** +- :ref:`float` **get_agent_height** **(** **)** The minimum floor to ceiling height that will still allow the floor area to be considered walkable. \ **Note:** While baking, this value will be rounded up to the nearest multiple of :ref:`cell_height`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_agent_max_climb: -- :ref:`float` **agent_max_climb** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.25`` | -+-----------+----------------------------+ -| *Setter* | set_agent_max_climb(value) | -+-----------+----------------------------+ -| *Getter* | get_agent_max_climb() | -+-----------+----------------------------+ +:ref:`float` **agent_max_climb** = ``0.25`` + +.. rst-class:: classref-property-setget + +- void **set_agent_max_climb** **(** :ref:`float` value **)** +- :ref:`float` **get_agent_max_climb** **(** **)** The minimum ledge height that is considered to still be traversable. \ **Note:** While baking, this value will be rounded down to the nearest multiple of :ref:`cell_height`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_agent_max_slope: -- :ref:`float` **agent_max_slope** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``45.0`` | -+-----------+----------------------------+ -| *Setter* | set_agent_max_slope(value) | -+-----------+----------------------------+ -| *Getter* | get_agent_max_slope() | -+-----------+----------------------------+ +:ref:`float` **agent_max_slope** = ``45.0`` + +.. rst-class:: classref-property-setget + +- void **set_agent_max_slope** **(** :ref:`float` value **)** +- :ref:`float` **get_agent_max_slope** **(** **)** The maximum slope that is considered walkable, in degrees. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_agent_radius: -- :ref:`float` **agent_radius** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------------+ -| *Setter* | set_agent_radius(value) | -+-----------+-------------------------+ -| *Getter* | get_agent_radius() | -+-----------+-------------------------+ +:ref:`float` **agent_radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_agent_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_agent_radius** **(** **)** The distance to erode/shrink the walkable area of the heightfield away from obstructions. \ **Note:** While baking, this value will be rounded up to the nearest multiple of :ref:`cell_size`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_cell_height: -- :ref:`float` **cell_height** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.25`` | -+-----------+------------------------+ -| *Setter* | set_cell_height(value) | -+-----------+------------------------+ -| *Getter* | get_cell_height() | -+-----------+------------------------+ +:ref:`float` **cell_height** = ``0.25`` + +.. rst-class:: classref-property-setget + +- void **set_cell_height** **(** :ref:`float` value **)** +- :ref:`float` **get_cell_height** **(** **)** The Y axis cell size to use for fields. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_cell_size: -- :ref:`float` **cell_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.25`` | -+-----------+----------------------+ -| *Setter* | set_cell_size(value) | -+-----------+----------------------+ -| *Getter* | get_cell_size() | -+-----------+----------------------+ +:ref:`float` **cell_size** = ``0.25`` + +.. rst-class:: classref-property-setget + +- void **set_cell_size** **(** :ref:`float` value **)** +- :ref:`float` **get_cell_size** **(** **)** The XZ plane cell size to use for fields. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_detail_sample_distance: -- :ref:`float` **detail_sample_distance** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``6.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_detail_sample_distance(value) | -+-----------+-----------------------------------+ -| *Getter* | get_detail_sample_distance() | -+-----------+-----------------------------------+ +:ref:`float` **detail_sample_distance** = ``6.0`` + +.. rst-class:: classref-property-setget + +- void **set_detail_sample_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_detail_sample_distance** **(** **)** The sampling distance to use when generating the detail mesh, in cell unit. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_detail_sample_max_error: -- :ref:`float` **detail_sample_max_error** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------------+ -| *Setter* | set_detail_sample_max_error(value) | -+-----------+------------------------------------+ -| *Getter* | get_detail_sample_max_error() | -+-----------+------------------------------------+ +:ref:`float` **detail_sample_max_error** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_detail_sample_max_error** **(** :ref:`float` value **)** +- :ref:`float` **get_detail_sample_max_error** **(** **)** The maximum distance the detail mesh surface should deviate from heightfield, in cell unit. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_edge_max_error: -- :ref:`float` **edge_max_error** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1.3`` | -+-----------+---------------------------+ -| *Setter* | set_edge_max_error(value) | -+-----------+---------------------------+ -| *Getter* | get_edge_max_error() | -+-----------+---------------------------+ +:ref:`float` **edge_max_error** = ``1.3`` + +.. rst-class:: classref-property-setget + +- void **set_edge_max_error** **(** :ref:`float` value **)** +- :ref:`float` **get_edge_max_error** **(** **)** The maximum distance a simplfied contour's border edges should deviate the original raw contour. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_edge_max_length: -- :ref:`float` **edge_max_length** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``12.0`` | -+-----------+----------------------------+ -| *Setter* | set_edge_max_length(value) | -+-----------+----------------------------+ -| *Getter* | get_edge_max_length() | -+-----------+----------------------------+ +:ref:`float` **edge_max_length** = ``12.0`` + +.. rst-class:: classref-property-setget + +- void **set_edge_max_length** **(** :ref:`float` value **)** +- :ref:`float` **get_edge_max_length** **(** **)** The maximum allowed length for contour edges along the border of the mesh. \ **Note:** While baking, this value will be rounded up to the nearest multiple of :ref:`cell_size`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_filter_baking_aabb: -- :ref:`AABB` **filter_baking_aabb** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``AABB(0, 0, 0, 0, 0, 0)`` | -+-----------+-------------------------------+ -| *Setter* | set_filter_baking_aabb(value) | -+-----------+-------------------------------+ -| *Getter* | get_filter_baking_aabb() | -+-----------+-------------------------------+ +:ref:`AABB` **filter_baking_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_filter_baking_aabb** **(** :ref:`AABB` value **)** +- :ref:`AABB` **get_filter_baking_aabb** **(** **)** If the baking :ref:`AABB` has a volume the navigation mesh baking will be restricted to its enclosing area. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_filter_baking_aabb_offset: -- :ref:`Vector3` **filter_baking_aabb_offset** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+--------------------------------------+ -| *Setter* | set_filter_baking_aabb_offset(value) | -+-----------+--------------------------------------+ -| *Getter* | get_filter_baking_aabb_offset() | -+-----------+--------------------------------------+ +:ref:`Vector3` **filter_baking_aabb_offset** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_filter_baking_aabb_offset** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_filter_baking_aabb_offset** **(** **)** The position offset applied to the :ref:`filter_baking_aabb` :ref:`AABB`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_filter_ledge_spans: -- :ref:`bool` **filter_ledge_spans** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_filter_ledge_spans(value) | -+-----------+-------------------------------+ -| *Getter* | get_filter_ledge_spans() | -+-----------+-------------------------------+ +:ref:`bool` **filter_ledge_spans** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_filter_ledge_spans** **(** :ref:`bool` value **)** +- :ref:`bool` **get_filter_ledge_spans** **(** **)** If ``true``, marks spans that are ledges as non-walkable. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_filter_low_hanging_obstacles: -- :ref:`bool` **filter_low_hanging_obstacles** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------+ -| *Setter* | set_filter_low_hanging_obstacles(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_filter_low_hanging_obstacles() | -+-----------+-----------------------------------------+ +:ref:`bool` **filter_low_hanging_obstacles** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_filter_low_hanging_obstacles** **(** :ref:`bool` value **)** +- :ref:`bool` **get_filter_low_hanging_obstacles** **(** **)** If ``true``, marks non-walkable spans as walkable if their maximum is within :ref:`agent_max_climb` of a walkable neighbor. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_filter_walkable_low_height_spans: -- :ref:`bool` **filter_walkable_low_height_spans** +.. rst-class:: classref-property -+-----------+---------------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------------+ -| *Setter* | set_filter_walkable_low_height_spans(value) | -+-----------+---------------------------------------------+ -| *Getter* | get_filter_walkable_low_height_spans() | -+-----------+---------------------------------------------+ +:ref:`bool` **filter_walkable_low_height_spans** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_filter_walkable_low_height_spans** **(** :ref:`bool` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_geometry_collision_mask: -- :ref:`int` **geometry_collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4294967295`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **geometry_collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_collision_mask** **(** **)** The physics layers to scan for static colliders. Only used when :ref:`geometry_parsed_geometry_type` is :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS` or :ref:`PARSED_GEOMETRY_BOTH`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_geometry_parsed_geometry_type: -- :ref:`ParsedGeometryType` **geometry_parsed_geometry_type** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_parsed_geometry_type(value) | -+-----------+---------------------------------+ -| *Getter* | get_parsed_geometry_type() | -+-----------+---------------------------------+ +:ref:`ParsedGeometryType` **geometry_parsed_geometry_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_parsed_geometry_type** **(** :ref:`ParsedGeometryType` value **)** +- :ref:`ParsedGeometryType` **get_parsed_geometry_type** **(** **)** Determines which type of nodes will be parsed as geometry. See :ref:`ParsedGeometryType` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_geometry_source_geometry_mode: -- :ref:`SourceGeometryMode` **geometry_source_geometry_mode** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_source_geometry_mode(value) | -+-----------+---------------------------------+ -| *Getter* | get_source_geometry_mode() | -+-----------+---------------------------------+ +:ref:`SourceGeometryMode` **geometry_source_geometry_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_source_geometry_mode** **(** :ref:`SourceGeometryMode` value **)** +- :ref:`SourceGeometryMode` **get_source_geometry_mode** **(** **)** The source of the geometry used when baking. See :ref:`SourceGeometryMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_geometry_source_group_name: -- :ref:`StringName` **geometry_source_group_name** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``&"navmesh"`` | -+-----------+------------------------------+ -| *Setter* | set_source_group_name(value) | -+-----------+------------------------------+ -| *Getter* | get_source_group_name() | -+-----------+------------------------------+ +:ref:`StringName` **geometry_source_group_name** = ``&"navmesh"`` + +.. rst-class:: classref-property-setget + +- void **set_source_group_name** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_source_group_name** **(** **)** The name of the group to scan for geometry. Only used when :ref:`geometry_source_geometry_mode` is :ref:`SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN` or :ref:`SOURCE_GEOMETRY_GROUPS_EXPLICIT`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_polygon_verts_per_poly: -- :ref:`float` **polygon_verts_per_poly** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``6.0`` | -+-----------+---------------------------+ -| *Setter* | set_verts_per_poly(value) | -+-----------+---------------------------+ -| *Getter* | get_verts_per_poly() | -+-----------+---------------------------+ +:ref:`float` **polygon_verts_per_poly** = ``6.0`` + +.. rst-class:: classref-property-setget + +- void **set_verts_per_poly** **(** :ref:`float` value **)** +- :ref:`float` **get_verts_per_poly** **(** **)** The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_region_merge_size: -- :ref:`float` **region_merge_size** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``20.0`` | -+-----------+------------------------------+ -| *Setter* | set_region_merge_size(value) | -+-----------+------------------------------+ -| *Getter* | get_region_merge_size() | -+-----------+------------------------------+ +:ref:`float` **region_merge_size** = ``20.0`` + +.. rst-class:: classref-property-setget + +- void **set_region_merge_size** **(** :ref:`float` value **)** +- :ref:`float` **get_region_merge_size** **(** **)** Any regions with a size smaller than this will be merged with larger regions if possible. \ **Note:** This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_region_min_size: -- :ref:`float` **region_min_size** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``2.0`` | -+-----------+----------------------------+ -| *Setter* | set_region_min_size(value) | -+-----------+----------------------------+ -| *Getter* | get_region_min_size() | -+-----------+----------------------------+ +:ref:`float` **region_min_size** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_region_min_size** **(** :ref:`float` value **)** +- :ref:`float` **get_region_min_size** **(** **)** The minimum size of a region for it to be created. \ **Note:** This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_property_sample_partition_type: -- :ref:`SamplePartitionType` **sample_partition_type** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_sample_partition_type(value) | -+-----------+----------------------------------+ -| *Getter* | get_sample_partition_type() | -+-----------+----------------------------------+ +:ref:`SamplePartitionType` **sample_partition_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sample_partition_type** **(** :ref:`SamplePartitionType` value **)** +- :ref:`SamplePartitionType` **get_sample_partition_type** **(** **)** Partitioning algorithm for creating the navigation mesh polys. See :ref:`SamplePartitionType` for possible values. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationMesh_method_add_polygon: -- void **add_polygon** **(** :ref:`PackedInt32Array` polygon **)** +.. rst-class:: classref-method + +void **add_polygon** **(** :ref:`PackedInt32Array` polygon **)** Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_clear_polygons: -- void **clear_polygons** **(** **)** +.. rst-class:: classref-method + +void **clear_polygons** **(** **)** Clears the array of polygons, but it doesn't clear the array of vertices. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_create_from_mesh: -- void **create_from_mesh** **(** :ref:`Mesh` mesh **)** +.. rst-class:: classref-method + +void **create_from_mesh** **(** :ref:`Mesh` mesh **)** Initializes the navigation mesh by setting the vertices and indices according to a :ref:`Mesh`. \ **Note:** The given ``mesh`` must be of type :ref:`Mesh.PRIMITIVE_TRIANGLES` and have an index array. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`geometry_collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_get_polygon: -- :ref:`PackedInt32Array` **get_polygon** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_polygon** **(** :ref:`int` idx **)** Returns a :ref:`PackedInt32Array` containing the indices of the vertices of a created polygon. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_get_polygon_count: -- :ref:`int` **get_polygon_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_polygon_count** **(** **)** |const| Returns the number of polygons in the navigation mesh. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_get_vertices: -- :ref:`PackedVector3Array` **get_vertices** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_vertices** **(** **)** |const| Returns a :ref:`PackedVector3Array` containing all the vertices being used to create the polygons. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`geometry_collision_mask`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMesh_method_set_vertices: -- void **set_vertices** **(** :ref:`PackedVector3Array` vertices **)** +.. rst-class:: classref-method + +void **set_vertices** **(** :ref:`PackedVector3Array` vertices **)** Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon` method. diff --git a/classes/class_navigationmeshgenerator.rst b/classes/class_navigationmeshgenerator.rst index b85445f1e..436ed0d81 100644 --- a/classes/class_navigationmeshgenerator.rst +++ b/classes/class_navigationmeshgenerator.rst @@ -14,10 +14,12 @@ NavigationMeshGenerator Helper class for creating and clearing navigation meshes. +.. rst-class:: classref-introduction-group + Description ----------- -This class is responsible for creating and clearing 3D navigation meshes used as :ref:`NavigationMesh` resources inside :ref:`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. +This class is responsible for creating and clearing 3D navigation meshes used as :ref:`NavigationMesh` resources inside :ref:`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. @@ -27,29 +29,46 @@ The finalized navigation mesh is then returned and stored inside the :ref:`Navig \ **Note:** Using meshes to not only define walkable surfaces but also obstruct navigation baking does not always work. The navigation baking has no concept of what is a geometry "inside" when dealing with mesh source geometry and this is intentional. Depending on current baking parameters, as soon as the obstructing mesh is large enough to fit a navigation mesh area inside, the baking will generate navigation mesh areas that are inside the obstructing source geometry mesh. +.. rst-class:: classref-reftable-group + Methods ------- -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bake` **(** :ref:`NavigationMesh` nav_mesh, :ref:`Node` root_node **)** | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** :ref:`NavigationMesh` nav_mesh **)** | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bake` **(** :ref:`NavigationMesh` nav_mesh, :ref:`Node` root_node **)** | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** :ref:`NavigationMesh` nav_mesh **)** | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_NavigationMeshGenerator_method_bake: -- void **bake** **(** :ref:`NavigationMesh` nav_mesh, :ref:`Node` root_node **)** +.. rst-class:: classref-method + +void **bake** **(** :ref:`NavigationMesh` nav_mesh, :ref:`Node` root_node **)** Bakes navigation data to the provided ``nav_mesh`` by parsing child nodes under the provided ``root_node`` or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the :ref:`NavigationMesh.geometry_parsed_geometry_type` and :ref:`NavigationMesh.geometry_source_geometry_mode` properties on the :ref:`NavigationMesh` resource. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationMeshGenerator_method_clear: -- void **clear** **(** :ref:`NavigationMesh` nav_mesh **)** +.. rst-class:: classref-method + +void **clear** **(** :ref:`NavigationMesh` nav_mesh **)** Removes all polygons and vertices from the provided ``nav_mesh`` resource. diff --git a/classes/class_navigationobstacle2d.rst b/classes/class_navigationobstacle2d.rst index f9cf067c2..6b024dce9 100644 --- a/classes/class_navigationobstacle2d.rst +++ b/classes/class_navigationobstacle2d.rst @@ -14,88 +14,122 @@ NavigationObstacle2D 2D Obstacle used in navigation for collision avoidance. +.. rst-class:: classref-introduction-group + Description ----------- -2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. ``NavigationObstacle2D`` is physics safe. +2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. **NavigationObstacle2D** is physics safe. Obstacles **don't** change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`estimate_radius` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`estimate_radius` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationObstacle2D_property_estimate_radius: -- :ref:`bool` **estimate_radius** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_estimate_radius(value) | -+-----------+----------------------------+ -| *Getter* | is_radius_estimated() | -+-----------+----------------------------+ +:ref:`bool` **estimate_radius** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_estimate_radius** **(** :ref:`bool` value **)** +- :ref:`bool` **is_radius_estimated** **(** **)** Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationObstacle2D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The radius of the agent. Used only if :ref:`estimate_radius` is set to false. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationObstacle2D_method_get_navigation_map: -- :ref:`RID` **get_navigation_map** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_navigation_map** **(** **)** |const| Returns the :ref:`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 agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map` to change the navigation map for the NavigationObstacle and also update the agent on the NavigationServer. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationObstacle2D_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer2D`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationObstacle2D_method_set_navigation_map: -- void **set_navigation_map** **(** :ref:`RID` navigation_map **)** +.. rst-class:: classref-method + +void **set_navigation_map** **(** :ref:`RID` navigation_map **)** Sets the :ref:`RID` of the navigation map this NavigationObstacle node should use and also updates the ``agent`` on the NavigationServer. diff --git a/classes/class_navigationobstacle3d.rst b/classes/class_navigationobstacle3d.rst index 56ce196c5..8d51d7731 100644 --- a/classes/class_navigationobstacle3d.rst +++ b/classes/class_navigationobstacle3d.rst @@ -14,88 +14,122 @@ NavigationObstacle3D 3D Obstacle used in navigation for collision avoidance. +.. rst-class:: classref-introduction-group + Description ----------- -3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. ``NavigationObstacle3D`` is physics safe. +3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. **NavigationObstacle3D** is physics safe. Obstacles **don't** change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`estimate_radius` | ``true`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`estimate_radius` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationObstacle3D_property_estimate_radius: -- :ref:`bool` **estimate_radius** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_estimate_radius(value) | -+-----------+----------------------------+ -| *Getter* | is_radius_estimated() | -+-----------+----------------------------+ +:ref:`bool` **estimate_radius** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_estimate_radius** **(** :ref:`bool` value **)** +- :ref:`bool` **is_radius_estimated** **(** **)** Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationObstacle3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The radius of the agent. Used only if :ref:`estimate_radius` is set to false. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationObstacle3D_method_get_navigation_map: -- :ref:`RID` **get_navigation_map** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_navigation_map** **(** **)** |const| Returns the :ref:`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 agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map` to change the navigation map for the NavigationObstacle and also update the agent on the NavigationServer. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationObstacle3D_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer3D`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationObstacle3D_method_set_navigation_map: -- void **set_navigation_map** **(** :ref:`RID` navigation_map **)** +.. rst-class:: classref-method + +void **set_navigation_map** **(** :ref:`RID` navigation_map **)** Sets the :ref:`RID` of the navigation map this NavigationObstacle node should use and also updates the ``agent`` on the NavigationServer. diff --git a/classes/class_navigationpathqueryparameters2d.rst b/classes/class_navigationpathqueryparameters2d.rst index 92ab34d7c..1635aa993 100644 --- a/classes/class_navigationpathqueryparameters2d.rst +++ b/classes/class_navigationpathqueryparameters2d.rst @@ -14,145 +14,188 @@ NavigationPathQueryParameters2D Parameters to be sent to a 2D navigation path query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the start and target position and other parameters to be used with :ref:`NavigationServer2D.query_path`. +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`RID` | :ref:`map` | | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`start_position` | ``Vector2(0, 0)`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`RID` | :ref:`map` | | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`start_position` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_NavigationPathQueryParameters2D_PathfindingAlgorithm: -.. _class_NavigationPathQueryParameters2D_constant_PATHFINDING_ALGORITHM_ASTAR: +.. rst-class:: classref-enumeration enum **PathfindingAlgorithm**: -- **PATHFINDING_ALGORITHM_ASTAR** = **0** --- The path query uses the default A\* pathfinding algorithm. +.. _class_NavigationPathQueryParameters2D_constant_PATHFINDING_ALGORITHM_ASTAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathfindingAlgorithm` **PATHFINDING_ALGORITHM_ASTAR** = ``0`` + +The path query uses the default A\* pathfinding algorithm. + +.. rst-class:: classref-item-separator ---- .. _enum_NavigationPathQueryParameters2D_PathPostProcessing: -.. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_CORRIDORFUNNEL: - -.. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_EDGECENTERED: +.. rst-class:: classref-enumeration enum **PathPostProcessing**: -- **PATH_POSTPROCESSING_CORRIDORFUNNEL** = **0** --- Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. +.. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_CORRIDORFUNNEL: -- **PATH_POSTPROCESSING_EDGECENTERED** = **1** --- Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. +.. rst-class:: classref-enumeration-constant + +:ref:`PathPostProcessing` **PATH_POSTPROCESSING_CORRIDORFUNNEL** = ``0`` + +Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + +.. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_EDGECENTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathPostProcessing` **PATH_POSTPROCESSING_EDGECENTERED** = ``1`` + +Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationPathQueryParameters2D_property_map: -- :ref:`RID` **map** +.. rst-class:: classref-property -+----------+----------------+ -| *Setter* | set_map(value) | -+----------+----------------+ -| *Getter* | get_map() | -+----------+----------------+ +:ref:`RID` **map** + +.. rst-class:: classref-property-setget + +- void **set_map** **(** :ref:`RID` value **)** +- :ref:`RID` **get_map** **(** **)** The navigation ``map`` :ref:`RID` used in the path query. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters2D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_navigation_layers** **(** **)** The navigation layers the query will use (as a bitmask). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters2D_property_path_postprocessing: -- :ref:`PathPostProcessing` **path_postprocessing** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_path_postprocessing(value) | -+-----------+--------------------------------+ -| *Getter* | get_path_postprocessing() | -+-----------+--------------------------------+ +:ref:`PathPostProcessing` **path_postprocessing** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_path_postprocessing** **(** :ref:`PathPostProcessing` value **)** +- :ref:`PathPostProcessing` **get_path_postprocessing** **(** **)** The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters2D_property_pathfinding_algorithm: -- :ref:`PathfindingAlgorithm` **pathfinding_algorithm** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_pathfinding_algorithm(value) | -+-----------+----------------------------------+ -| *Getter* | get_pathfinding_algorithm() | -+-----------+----------------------------------+ +:ref:`PathfindingAlgorithm` **pathfinding_algorithm** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm` value **)** +- :ref:`PathfindingAlgorithm` **get_pathfinding_algorithm** **(** **)** The pathfinding algorithm used in the path query. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters2D_property_start_position: -- :ref:`Vector2` **start_position** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_start_position(value) | -+-----------+---------------------------+ -| *Getter* | get_start_position() | -+-----------+---------------------------+ +:ref:`Vector2` **start_position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_start_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_start_position** **(** **)** The pathfinding start position in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters2D_property_target_position: -- :ref:`Vector2` **target_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_target_position(value) | -+-----------+----------------------------+ -| *Getter* | get_target_position() | -+-----------+----------------------------+ +:ref:`Vector2` **target_position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_target_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_target_position** **(** **)** The pathfinding target position in global coordinates. diff --git a/classes/class_navigationpathqueryparameters3d.rst b/classes/class_navigationpathqueryparameters3d.rst index 9cbcaf2c9..53498a59e 100644 --- a/classes/class_navigationpathqueryparameters3d.rst +++ b/classes/class_navigationpathqueryparameters3d.rst @@ -14,145 +14,188 @@ NavigationPathQueryParameters3D Parameters to be sent to a 3D navigation path query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the start and target position and other parameters to be used with :ref:`NavigationServer3D.query_path`. +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`RID` | :ref:`map` | | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`start_position` | ``Vector3(0, 0, 0)`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | -+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`RID` | :ref:`map` | | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`start_position` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_NavigationPathQueryParameters3D_PathfindingAlgorithm: -.. _class_NavigationPathQueryParameters3D_constant_PATHFINDING_ALGORITHM_ASTAR: +.. rst-class:: classref-enumeration enum **PathfindingAlgorithm**: -- **PATHFINDING_ALGORITHM_ASTAR** = **0** --- The path query uses the default A\* pathfinding algorithm. +.. _class_NavigationPathQueryParameters3D_constant_PATHFINDING_ALGORITHM_ASTAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathfindingAlgorithm` **PATHFINDING_ALGORITHM_ASTAR** = ``0`` + +The path query uses the default A\* pathfinding algorithm. + +.. rst-class:: classref-item-separator ---- .. _enum_NavigationPathQueryParameters3D_PathPostProcessing: -.. _class_NavigationPathQueryParameters3D_constant_PATH_POSTPROCESSING_CORRIDORFUNNEL: - -.. _class_NavigationPathQueryParameters3D_constant_PATH_POSTPROCESSING_EDGECENTERED: +.. rst-class:: classref-enumeration enum **PathPostProcessing**: -- **PATH_POSTPROCESSING_CORRIDORFUNNEL** = **0** --- Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. +.. _class_NavigationPathQueryParameters3D_constant_PATH_POSTPROCESSING_CORRIDORFUNNEL: -- **PATH_POSTPROCESSING_EDGECENTERED** = **1** --- Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. +.. rst-class:: classref-enumeration-constant + +:ref:`PathPostProcessing` **PATH_POSTPROCESSING_CORRIDORFUNNEL** = ``0`` + +Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + +.. _class_NavigationPathQueryParameters3D_constant_PATH_POSTPROCESSING_EDGECENTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathPostProcessing` **PATH_POSTPROCESSING_EDGECENTERED** = ``1`` + +Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationPathQueryParameters3D_property_map: -- :ref:`RID` **map** +.. rst-class:: classref-property -+----------+----------------+ -| *Setter* | set_map(value) | -+----------+----------------+ -| *Getter* | get_map() | -+----------+----------------+ +:ref:`RID` **map** + +.. rst-class:: classref-property-setget + +- void **set_map** **(** :ref:`RID` value **)** +- :ref:`RID` **get_map** **(** **)** The navigation ``map`` :ref:`RID` used in the path query. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters3D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_navigation_layers** **(** **)** The navigation layers the query will use (as a bitmask). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters3D_property_path_postprocessing: -- :ref:`PathPostProcessing` **path_postprocessing** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_path_postprocessing(value) | -+-----------+--------------------------------+ -| *Getter* | get_path_postprocessing() | -+-----------+--------------------------------+ +:ref:`PathPostProcessing` **path_postprocessing** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_path_postprocessing** **(** :ref:`PathPostProcessing` value **)** +- :ref:`PathPostProcessing` **get_path_postprocessing** **(** **)** The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters3D_property_pathfinding_algorithm: -- :ref:`PathfindingAlgorithm` **pathfinding_algorithm** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_pathfinding_algorithm(value) | -+-----------+----------------------------------+ -| *Getter* | get_pathfinding_algorithm() | -+-----------+----------------------------------+ +:ref:`PathfindingAlgorithm` **pathfinding_algorithm** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm` value **)** +- :ref:`PathfindingAlgorithm` **get_pathfinding_algorithm** **(** **)** The pathfinding algorithm used in the path query. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters3D_property_start_position: -- :ref:`Vector3` **start_position** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_start_position(value) | -+-----------+---------------------------+ -| *Getter* | get_start_position() | -+-----------+---------------------------+ +:ref:`Vector3` **start_position** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_start_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_start_position** **(** **)** The pathfinding start position in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPathQueryParameters3D_property_target_position: -- :ref:`Vector3` **target_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_target_position(value) | -+-----------+----------------------------+ -| *Getter* | get_target_position() | -+-----------+----------------------------+ +:ref:`Vector3` **target_position** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_target_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_target_position** **(** **)** The pathfinding target position in global coordinates. diff --git a/classes/class_navigationpathqueryresult2d.rst b/classes/class_navigationpathqueryresult2d.rst index f1bbb2067..5b0f617b9 100644 --- a/classes/class_navigationpathqueryresult2d.rst +++ b/classes/class_navigationpathqueryresult2d.rst @@ -14,48 +14,73 @@ NavigationPathQueryResult2D Result from a :ref:`NavigationPathQueryParameters2D` navigation path query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the result of a navigation path query from :ref:`NavigationServer2D.query_path`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`path` | ``PackedVector2Array()`` | -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`path` | ``PackedVector2Array()`` | + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+--------------------------------------------------------------------------+ -| void | :ref:`reset` **(** **)** | -+------+--------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+--------------------------------------------------------------------------+ + | void | :ref:`reset` **(** **)** | + +------+--------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationPathQueryResult2D_property_path: -- :ref:`PackedVector2Array` **path** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_path(value) | -+-----------+--------------------------+ -| *Getter* | get_path() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **path** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_path** **(** :ref:`PackedVector2Array` value **)** +- :ref:`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`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationPathQueryResult2D_method_reset: -- void **reset** **(** **)** +.. rst-class:: classref-method + +void **reset** **(** **)** Reset the result object to its initial state. This is useful to reuse the object across multiple queries. diff --git a/classes/class_navigationpathqueryresult3d.rst b/classes/class_navigationpathqueryresult3d.rst index 3904f5434..c9bfa9943 100644 --- a/classes/class_navigationpathqueryresult3d.rst +++ b/classes/class_navigationpathqueryresult3d.rst @@ -14,48 +14,73 @@ NavigationPathQueryResult3D Result from a :ref:`NavigationPathQueryParameters3D` navigation path query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the result of a navigation path query from :ref:`NavigationServer3D.query_path`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector3Array` | :ref:`path` | ``PackedVector3Array()`` | -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array` | :ref:`path` | ``PackedVector3Array()`` | + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+--------------------------------------------------------------------------+ -| void | :ref:`reset` **(** **)** | -+------+--------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+--------------------------------------------------------------------------+ + | void | :ref:`reset` **(** **)** | + +------+--------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationPathQueryResult3D_property_path: -- :ref:`PackedVector3Array` **path** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector3Array()`` | -+-----------+--------------------------+ -| *Setter* | set_path(value) | -+-----------+--------------------------+ -| *Getter* | get_path() | -+-----------+--------------------------+ +:ref:`PackedVector3Array` **path** = ``PackedVector3Array()`` + +.. rst-class:: classref-property-setget + +- void **set_path** **(** :ref:`PackedVector3Array` value **)** +- :ref:`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`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationPathQueryResult3D_method_reset: -- void **reset** **(** **)** +.. rst-class:: classref-method + +void **reset** **(** **)** Reset the result object to its initial state. This is useful to reuse the object across multiple queries. diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index a69fc50d1..dd90b8ba5 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -14,6 +14,8 @@ NavigationPolygon A node that has methods to draw outlines or use indices of vertices to create navigation polygons. +.. rst-class:: classref-introduction-group + Description ----------- @@ -67,164 +69,235 @@ Using :ref:`add_polygon` and indices +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Navigation Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_outline` **(** :ref:`PackedVector2Array` outline **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_outline_at_index` **(** :ref:`PackedVector2Array` outline, :ref:`int` index **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_polygon` **(** :ref:`PackedInt32Array` polygon **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_outlines` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_polygons` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NavigationMesh` | :ref:`get_mesh` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_outline` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_outline_count` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_polygon` **(** :ref:`int` idx **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_polygon_count` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_vertices` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_polygons_from_outlines` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_outline` **(** :ref:`int` idx **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_outline` **(** :ref:`int` idx, :ref:`PackedVector2Array` outline **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertices` **(** :ref:`PackedVector2Array` vertices **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_outline` **(** :ref:`PackedVector2Array` outline **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_outline_at_index` **(** :ref:`PackedVector2Array` outline, :ref:`int` index **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_polygon` **(** :ref:`PackedInt32Array` polygon **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_outlines` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_polygons` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationMesh` | :ref:`get_mesh` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_outline` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_outline_count` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_polygon` **(** :ref:`int` idx **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_polygon_count` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_vertices` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`make_polygons_from_outlines` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_outline` **(** :ref:`int` idx **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_outline` **(** :ref:`int` idx, :ref:`PackedVector2Array` outline **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertices` **(** :ref:`PackedVector2Array` vertices **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_NavigationPolygon_method_add_outline: -- void **add_outline** **(** :ref:`PackedVector2Array` outline **)** +.. rst-class:: classref-method + +void **add_outline** **(** :ref:`PackedVector2Array` outline **)** Appends a :ref:`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` in order for this array to be converted to polygons that the engine will use. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_add_outline_at_index: -- void **add_outline_at_index** **(** :ref:`PackedVector2Array` outline, :ref:`int` index **)** +.. rst-class:: classref-method + +void **add_outline_at_index** **(** :ref:`PackedVector2Array` outline, :ref:`int` index **)** Adds a :ref:`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` in order for this array to be converted to polygons that the engine will use. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_add_polygon: -- void **add_polygon** **(** :ref:`PackedInt32Array` polygon **)** +.. rst-class:: classref-method + +void **add_polygon** **(** :ref:`PackedInt32Array` polygon **)** Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_clear_outlines: -- void **clear_outlines** **(** **)** +.. rst-class:: classref-method + +void **clear_outlines** **(** **)** Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_clear_polygons: -- void **clear_polygons** **(** **)** +.. rst-class:: classref-method + +void **clear_polygons** **(** **)** Clears the array of polygons, but it doesn't clear the array of outlines and vertices. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_get_mesh: -- :ref:`NavigationMesh` **get_mesh** **(** **)** +.. rst-class:: classref-method + +:ref:`NavigationMesh` **get_mesh** **(** **)** Returns the :ref:`NavigationMesh` resulting from this navigation polygon. This navmesh can be used to update the navmesh of a region with the :ref:`NavigationServer3D.region_set_navmesh` API directly (as 2D uses the 3D server behind the scene). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_get_outline: -- :ref:`PackedVector2Array` **get_outline** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_outline** **(** :ref:`int` idx **)** |const| Returns a :ref:`PackedVector2Array` containing the vertices of an outline that was created in the editor or by script. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_get_outline_count: -- :ref:`int` **get_outline_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_outline_count** **(** **)** |const| Returns the number of outlines that were created in the editor or by script. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_get_polygon: -- :ref:`PackedInt32Array` **get_polygon** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_polygon** **(** :ref:`int` idx **)** Returns a :ref:`PackedInt32Array` containing the indices of the vertices of a created polygon. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_get_polygon_count: -- :ref:`int` **get_polygon_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_polygon_count** **(** **)** |const| Returns the count of all polygons. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_get_vertices: -- :ref:`PackedVector2Array` **get_vertices** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_vertices** **(** **)** |const| Returns a :ref:`PackedVector2Array` containing all the vertices being used to create the polygons. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_make_polygons_from_outlines: -- void **make_polygons_from_outlines** **(** **)** +.. rst-class:: classref-method + +void **make_polygons_from_outlines** **(** **)** Creates polygons from the outlines added in the editor or by script. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_remove_outline: -- void **remove_outline** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **remove_outline** **(** :ref:`int` idx **)** Removes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines` for the polygons to update. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_set_outline: -- void **set_outline** **(** :ref:`int` idx, :ref:`PackedVector2Array` outline **)** +.. rst-class:: classref-method + +void **set_outline** **(** :ref:`int` idx, :ref:`PackedVector2Array` outline **)** Changes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines` for the polygons to update. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationPolygon_method_set_vertices: -- void **set_vertices** **(** :ref:`PackedVector2Array` vertices **)** +.. rst-class:: classref-method + +void **set_vertices** **(** :ref:`PackedVector2Array` vertices **)** Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon` method. diff --git a/classes/class_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 2aaa07da8..62569ef4c 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -14,6 +14,8 @@ NavigationRegion2D A region of the 2D navigation map. +.. rst-class:: classref-introduction-group + Description ----------- @@ -31,133 +33,170 @@ The pathfinding cost of traveling distances inside this region can be controlled \ **Note:** This node caches changes to its properties, so if you make changes to the underlying region :ref:`RID` in :ref:`NavigationServer2D`, they will not be reflected in this node's properties. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+---------------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`enter_cost` | ``0.0`` | -+---------------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+---------------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`NavigationPolygon` | :ref:`navpoly` | | -+---------------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`travel_cost` | ``1.0`` | -+---------------------------------------------------+-------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +---------------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`enter_cost` | ``0.0`` | + +---------------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +---------------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`NavigationPolygon` | :ref:`navpoly` | | + +---------------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`travel_cost` | ``1.0`` | + +---------------------------------------------------+-------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NavigationRegion2D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` -Determines if the ``NavigationRegion2D`` is enabled or disabled. +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** + +Determines if the **NavigationRegion2D** is enabled or disabled. + +.. rst-class:: classref-item-separator ---- .. _class_NavigationRegion2D_property_enter_cost: -- :ref:`float` **enter_cost** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_enter_cost(value) | -+-----------+-----------------------+ -| *Getter* | get_enter_cost() | -+-----------+-----------------------+ +:ref:`float` **enter_cost** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_enter_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_enter_cost** **(** **)** When pathfinding enters this region's navmesh from another regions navmesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion2D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion2D_property_navpoly: -- :ref:`NavigationPolygon` **navpoly** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_navigation_polygon(value) | -+----------+-------------------------------+ -| *Getter* | get_navigation_polygon() | -+----------+-------------------------------+ +:ref:`NavigationPolygon` **navpoly** + +.. rst-class:: classref-property-setget + +- void **set_navigation_polygon** **(** :ref:`NavigationPolygon` value **)** +- :ref:`NavigationPolygon` **get_navigation_polygon** **(** **)** The :ref:`NavigationPolygon` resource to use. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion2D_property_travel_cost: -- :ref:`float` **travel_cost** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_travel_cost(value) | -+-----------+------------------------+ -| *Getter* | get_travel_cost() | -+-----------+------------------------+ +:ref:`float` **travel_cost** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_travel_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_travel_cost** **(** **)** When pathfinding moves inside this region's navmesh the traveled distances are multiplied with ``travel_cost`` for determining the shortest path. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationRegion2D_method_get_navigation_layer_value: -- :ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion2D_method_get_region_rid: -- :ref:`RID` **get_region_rid** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner` can be used to identify the ``NavigationRegion2D`` closest to a point on the merged navigation map. +:ref:`RID` **get_region_rid** **(** **)** |const| + +Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner` can be used to identify the **NavigationRegion2D** closest to a point on the merged navigation map. + +.. rst-class:: classref-item-separator ---- .. _class_NavigationRegion2D_method_set_navigation_layer_value: -- void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index 8f50d29c6..0dbf674d5 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -14,6 +14,8 @@ NavigationRegion3D A region of the navigation map. +.. rst-class:: classref-introduction-group + Description ----------- @@ -31,160 +33,213 @@ The cost of traveling distances inside this region can be controlled with the :r \ **Note:** This node caches changes to its properties, so if you make changes to the underlying region :ref:`RID` in :ref:`NavigationServer3D`, they will not be reflected in this node's properties. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+---------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`enter_cost` | ``0.0`` | -+---------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`navigation_layers` | ``1`` | -+---------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`NavigationMesh` | :ref:`navmesh` | | -+---------------------------------------------+-------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`travel_cost` | ``1.0`` | -+---------------------------------------------+-------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +---------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`enter_cost` | ``0.0`` | + +---------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +---------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`NavigationMesh` | :ref:`navmesh` | | + +---------------------------------------------+-------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`travel_cost` | ``1.0`` | + +---------------------------------------------+-------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bake_navigation_mesh` **(** :ref:`bool` on_thread=true **)** | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bake_navigation_mesh` **(** :ref:`bool` on_thread=true **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_NavigationRegion3D_signal_bake_finished: -- **bake_finished** **(** **)** +.. rst-class:: classref-signal + +**bake_finished** **(** **)** Notifies when the navigation mesh bake operation is completed. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion3D_signal_navigation_mesh_changed: -- **navigation_mesh_changed** **(** **)** +.. rst-class:: classref-signal + +**navigation_mesh_changed** **(** **)** Notifies when the :ref:`NavigationMesh` has changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_NavigationRegion3D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` -Determines if the ``NavigationRegion3D`` is enabled or disabled. +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** + +Determines if the **NavigationRegion3D** is enabled or disabled. + +.. rst-class:: classref-item-separator ---- .. _class_NavigationRegion3D_property_enter_cost: -- :ref:`float` **enter_cost** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------+ -| *Setter* | set_enter_cost(value) | -+-----------+-----------------------+ -| *Getter* | get_enter_cost() | -+-----------+-----------------------+ +:ref:`float` **enter_cost** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_enter_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_enter_cost** **(** **)** When pathfinding enters this region's navmesh from another regions navmesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion3D_property_navigation_layers: -- :ref:`int` **navigation_layers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1`` | -+-----------+------------------------------+ -| *Setter* | set_navigation_layers(value) | -+-----------+------------------------------+ -| *Getter* | get_navigation_layers() | -+-----------+------------------------------+ +:ref:`int` **navigation_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_layers** **(** :ref:`int` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion3D_property_navmesh: -- :ref:`NavigationMesh` **navmesh** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_navigation_mesh(value) | -+----------+----------------------------+ -| *Getter* | get_navigation_mesh() | -+----------+----------------------------+ +:ref:`NavigationMesh` **navmesh** + +.. rst-class:: classref-property-setget + +- void **set_navigation_mesh** **(** :ref:`NavigationMesh` value **)** +- :ref:`NavigationMesh` **get_navigation_mesh** **(** **)** The :ref:`NavigationMesh` resource to use. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion3D_property_travel_cost: -- :ref:`float` **travel_cost** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_travel_cost(value) | -+-----------+------------------------+ -| *Getter* | get_travel_cost() | -+-----------+------------------------+ +:ref:`float` **travel_cost** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_travel_cost** **(** :ref:`float` value **)** +- :ref:`float` **get_travel_cost** **(** **)** When pathfinding moves inside this region's navmesh the traveled distances are multiplied with ``travel_cost`` for determining the shortest path. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationRegion3D_method_bake_navigation_mesh: -- void **bake_navigation_mesh** **(** :ref:`bool` on_thread=true **)** +.. rst-class:: classref-method + +void **bake_navigation_mesh** **(** :ref:`bool` on_thread=true **)** Bakes the :ref:`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`. 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). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion3D_method_get_navigation_layer_value: -- :ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationRegion3D_method_get_region_rid: -- :ref:`RID` **get_region_rid** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner` can be used to identify the ``NavigationRegion3D`` closest to a point on the merged navigation map. +:ref:`RID` **get_region_rid** **(** **)** |const| + +Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner` can be used to identify the **NavigationRegion3D** closest to a point on the merged navigation map. + +.. rst-class:: classref-item-separator ---- .. _class_NavigationRegion3D_method_set_navigation_layer_value: -- void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index 5c3d72c54..c0521d185 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -14,6 +14,8 @@ NavigationServer2D Server interface for low-level 2D navigation access +.. rst-class:: classref-introduction-group + Description ----------- @@ -33,405 +35,552 @@ To use the collision avoidance system, you may use agents. You can set an agent' This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Navigation Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`agent_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_max_neighbors` **(** :ref:`RID` agent, :ref:`int` count **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector2` position **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_target_velocity` **(** :ref:`RID` agent, :ref:`Vector2` target_velocity **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_time_horizon` **(** :ref:`RID` agent, :ref:`float` time **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`link_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`link_get_end_location` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`link_get_enter_cost` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`link_get_map` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`link_get_navigation_layers` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`link_get_start_location` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`link_get_travel_cost` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`link_is_bidirectional` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_bidirectional` **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_end_location` **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_enter_cost` **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_map` **(** :ref:`RID` link, :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_navigation_layers` **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_start_location` **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_travel_cost` **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`map_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_force_update` **(** :ref:`RID` map **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`map_get_closest_point_owner` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`map_get_edge_connection_margin` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`map_get_link_connection_radius` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_cell_size` **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_edge_connection_margin` **(** :ref:`RID` map, :ref:`float` margin **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_link_connection_radius` **(** :ref:`RID` map, :ref:`float` radius **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters2D` parameters, :ref:`NavigationPathQueryResult2D` result **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`region_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`region_get_connection_pathway_end` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`region_get_connection_pathway_start` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`region_get_connections_count` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`region_get_enter_cost` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`region_get_navigation_layers` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector2` point **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_navigation_layers` **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_navpoly` **(** :ref:`RID` region, :ref:`NavigationPolygon` nav_poly **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_transform` **(** :ref:`RID` region, :ref:`Transform2D` transform **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`agent_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_max_neighbors` **(** :ref:`RID` agent, :ref:`int` count **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector2` position **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_target_velocity` **(** :ref:`RID` agent, :ref:`Vector2` target_velocity **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_time_horizon` **(** :ref:`RID` agent, :ref:`float` time **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`link_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`link_get_end_location` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`link_get_enter_cost` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`link_get_map` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`link_get_navigation_layers` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`link_get_start_location` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`link_get_travel_cost` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`link_is_bidirectional` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_bidirectional` **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_end_location` **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_enter_cost` **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_map` **(** :ref:`RID` link, :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_navigation_layers` **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_start_location` **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_travel_cost` **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`map_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_force_update` **(** :ref:`RID` map **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`map_get_closest_point_owner` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_edge_connection_margin` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_link_connection_radius` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_cell_size` **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_edge_connection_margin` **(** :ref:`RID` map, :ref:`float` margin **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_link_connection_radius` **(** :ref:`RID` map, :ref:`float` radius **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters2D` parameters, :ref:`NavigationPathQueryResult2D` result **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`region_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`region_get_connection_pathway_end` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`region_get_connection_pathway_start` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`region_get_connections_count` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`region_get_enter_cost` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`region_get_navigation_layers` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector2` point **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_navigation_layers` **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_navpoly` **(** :ref:`RID` region, :ref:`NavigationPolygon` nav_poly **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_transform` **(** :ref:`RID` region, :ref:`Transform2D` transform **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_NavigationServer2D_signal_map_changed: -- **map_changed** **(** :ref:`RID` map **)** +.. rst-class:: classref-signal + +**map_changed** **(** :ref:`RID` map **)** Emitted when a navigation map is updated, when a region moves or is modified. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationServer2D_method_agent_create: -- :ref:`RID` **agent_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **agent_create** **(** **)** |const| Creates the agent. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_get_map: -- :ref:`RID` **agent_get_map** **(** :ref:`RID` agent **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **agent_get_map** **(** :ref:`RID` agent **)** |const| Returns the navigation map :ref:`RID` the requested ``agent`` is currently assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_is_map_changed: -- :ref:`bool` **agent_is_map_changed** **(** :ref:`RID` agent **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **agent_is_map_changed** **(** :ref:`RID` agent **)** |const| Returns true if the map got changed the previous frame. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_callback: -- void **agent_set_callback** **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| +.. rst-class:: classref-method + +void **agent_set_callback** **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated ``safe_velocity`` to the ``receiver`` object with a signal to the chosen ``method`` name. \ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_callback` again with a ``null`` object as the ``receiver``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_map: -- void **agent_set_map** **(** :ref:`RID` agent, :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +void **agent_set_map** **(** :ref:`RID` agent, :ref:`RID` map **)** |const| Puts the agent in the map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_max_neighbors: -- void **agent_set_max_neighbors** **(** :ref:`RID` agent, :ref:`int` count **)** |const| +.. rst-class:: classref-method + +void **agent_set_max_neighbors** **(** :ref:`RID` agent, :ref:`int` count **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_max_speed: -- void **agent_set_max_speed** **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| +.. rst-class:: classref-method + +void **agent_set_max_speed** **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| Sets the maximum speed of the agent. Must be positive. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_neighbor_distance: -- void **agent_set_neighbor_distance** **(** :ref:`RID` agent, :ref:`float` distance **)** |const| +.. rst-class:: classref-method + +void **agent_set_neighbor_distance** **(** :ref:`RID` agent, :ref:`float` distance **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_position: -- void **agent_set_position** **(** :ref:`RID` agent, :ref:`Vector2` position **)** |const| +.. rst-class:: classref-method + +void **agent_set_position** **(** :ref:`RID` agent, :ref:`Vector2` position **)** |const| Sets the position of the agent in world space. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_radius: -- void **agent_set_radius** **(** :ref:`RID` agent, :ref:`float` radius **)** |const| +.. rst-class:: classref-method + +void **agent_set_radius** **(** :ref:`RID` agent, :ref:`float` radius **)** |const| Sets the radius of the agent. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_target_velocity: -- void **agent_set_target_velocity** **(** :ref:`RID` agent, :ref:`Vector2` target_velocity **)** |const| +.. rst-class:: classref-method + +void **agent_set_target_velocity** **(** :ref:`RID` agent, :ref:`Vector2` target_velocity **)** |const| Sets the new target velocity. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_time_horizon: -- void **agent_set_time_horizon** **(** :ref:`RID` agent, :ref:`float` time **)** |const| +.. rst-class:: classref-method + +void **agent_set_time_horizon** **(** :ref:`RID` agent, :ref:`float` time **)** |const| 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. Must be positive. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_agent_set_velocity: -- void **agent_set_velocity** **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** |const| +.. rst-class:: classref-method + +void **agent_set_velocity** **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** |const| Sets the current velocity of the agent. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_free_rid: -- void **free_rid** **(** :ref:`RID` rid **)** |const| +.. rst-class:: classref-method + +void **free_rid** **(** :ref:`RID` rid **)** |const| Destroys the given RID. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_get_maps: -- :ref:`RID[]` **get_maps** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **get_maps** **(** **)** |const| Returns all created navigation map :ref:`RID`\ s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_create: -- :ref:`RID` **link_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **link_create** **(** **)** |const| Create a new link between two locations on a map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_get_end_location: -- :ref:`Vector2` **link_get_end_location** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **link_get_end_location** **(** :ref:`RID` link **)** |const| Returns the ending location of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_get_enter_cost: -- :ref:`float` **link_get_enter_cost** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`float` **link_get_enter_cost** **(** :ref:`RID` link **)** |const| Returns the ``enter_cost`` of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_get_map: -- :ref:`RID` **link_get_map** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **link_get_map** **(** :ref:`RID` link **)** |const| Returns the navigation map :ref:`RID` the requested ``link`` is currently assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_get_navigation_layers: -- :ref:`int` **link_get_navigation_layers** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`int` **link_get_navigation_layers** **(** :ref:`RID` link **)** |const| Returns the navigation layers for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_get_start_location: -- :ref:`Vector2` **link_get_start_location** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **link_get_start_location** **(** :ref:`RID` link **)** |const| Returns the starting location of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_get_travel_cost: -- :ref:`float` **link_get_travel_cost** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`float` **link_get_travel_cost** **(** :ref:`RID` link **)** |const| Returns the ``travel_cost`` of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_is_bidirectional: -- :ref:`bool` **link_is_bidirectional** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **link_is_bidirectional** **(** :ref:`RID` link **)** |const| Returns whether this ``link`` can be travelled in both directions. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_set_bidirectional: -- void **link_set_bidirectional** **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| +.. rst-class:: classref-method + +void **link_set_bidirectional** **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| Sets whether this ``link`` can be travelled in both directions. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_set_end_location: -- void **link_set_end_location** **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| +.. rst-class:: classref-method + +void **link_set_end_location** **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| Sets the exit location for the ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_set_enter_cost: -- void **link_set_enter_cost** **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| +.. rst-class:: classref-method + +void **link_set_enter_cost** **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| Sets the ``enter_cost`` for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_set_map: -- void **link_set_map** **(** :ref:`RID` link, :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +void **link_set_map** **(** :ref:`RID` link, :ref:`RID` map **)** |const| Sets the navigation map :ref:`RID` for the link. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_set_navigation_layers: -- void **link_set_navigation_layers** **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| +.. rst-class:: classref-method + +void **link_set_navigation_layers** **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path`). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_set_start_location: -- void **link_set_start_location** **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| +.. rst-class:: classref-method + +void **link_set_start_location** **(** :ref:`RID` link, :ref:`Vector2` location **)** |const| Sets the entry location for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_link_set_travel_cost: -- void **link_set_travel_cost** **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| +.. rst-class:: classref-method + +void **link_set_travel_cost** **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| Sets the ``travel_cost`` for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_create: -- :ref:`RID` **map_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **map_create** **(** **)** |const| Create a new map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_force_update: -- void **map_force_update** **(** :ref:`RID` map **)** +.. rst-class:: classref-method + +void **map_force_update** **(** :ref:`RID` map **)** This function immediately forces synchronization of the specified navigation ``map`` :ref:`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). @@ -441,195 +590,291 @@ Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_agents: -- :ref:`RID[]` **map_get_agents** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_agents** **(** :ref:`RID` map **)** |const| Returns all navigation agents :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_cell_size: -- :ref:`float` **map_get_cell_size** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`float` **map_get_cell_size** **(** :ref:`RID` map **)** |const| Returns the map cell size. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_closest_point: -- :ref:`Vector2` **map_get_closest_point** **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **map_get_closest_point** **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| Returns the point closest to the provided ``to_point`` on the navigation mesh surface. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_closest_point_owner: -- :ref:`RID` **map_get_closest_point_owner** **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **map_get_closest_point_owner** **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| Returns the owner region RID for the point returned by :ref:`map_get_closest_point`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_edge_connection_margin: -- :ref:`float` **map_get_edge_connection_margin** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`float` **map_get_edge_connection_margin** **(** :ref:`RID` map **)** |const| Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_link_connection_radius: -- :ref:`float` **map_get_link_connection_radius** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`float` **map_get_link_connection_radius** **(** :ref:`RID` map **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_links: -- :ref:`RID[]` **map_get_links** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_links** **(** :ref:`RID` map **)** |const| Returns all navigation link :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_path: -- :ref:`PackedVector2Array` **map_get_path** **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **map_get_path** **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_get_regions: -- :ref:`RID[]` **map_get_regions** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_regions** **(** :ref:`RID` map **)** |const| Returns all navigation regions :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_is_active: -- :ref:`bool` **map_is_active** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **map_is_active** **(** :ref:`RID` map **)** |const| Returns true if the map is active. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_set_active: -- void **map_set_active** **(** :ref:`RID` map, :ref:`bool` active **)** |const| +.. rst-class:: classref-method + +void **map_set_active** **(** :ref:`RID` map, :ref:`bool` active **)** |const| Sets the map active. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_set_cell_size: -- void **map_set_cell_size** **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| +.. rst-class:: classref-method + +void **map_set_cell_size** **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| Set the map cell size used to weld the navigation mesh polygons. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_set_edge_connection_margin: -- void **map_set_edge_connection_margin** **(** :ref:`RID` map, :ref:`float` margin **)** |const| +.. rst-class:: classref-method + +void **map_set_edge_connection_margin** **(** :ref:`RID` map, :ref:`float` margin **)** |const| Set the map edge connection margin used to weld the compatible region edges. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_map_set_link_connection_radius: -- void **map_set_link_connection_radius** **(** :ref:`RID` map, :ref:`float` radius **)** |const| +.. rst-class:: classref-method + +void **map_set_link_connection_radius** **(** :ref:`RID` map, :ref:`float` radius **)** |const| Set the map's link connection radius used to connect links to navigation polygons. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_query_path: -- void **query_path** **(** :ref:`NavigationPathQueryParameters2D` parameters, :ref:`NavigationPathQueryResult2D` result **)** |const| +.. rst-class:: classref-method + +void **query_path** **(** :ref:`NavigationPathQueryParameters2D` parameters, :ref:`NavigationPathQueryResult2D` result **)** |const| Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters2D`. Updates the provided :ref:`NavigationPathQueryResult2D` result object with the path among other results requested by the query. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_create: -- :ref:`RID` **region_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **region_create** **(** **)** |const| Creates a new region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_get_connection_pathway_end: -- :ref:`Vector2` **region_get_connection_pathway_end** **(** :ref:`RID` region, :ref:`int` connection **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **region_get_connection_pathway_end** **(** :ref:`RID` region, :ref:`int` connection **)** |const| Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_get_connection_pathway_start: -- :ref:`Vector2` **region_get_connection_pathway_start** **(** :ref:`RID` region, :ref:`int` connection **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **region_get_connection_pathway_start** **(** :ref:`RID` region, :ref:`int` connection **)** |const| Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_get_connections_count: -- :ref:`int` **region_get_connections_count** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`int` **region_get_connections_count** **(** :ref:`RID` region **)** |const| Returns how many connections this ``region`` has with other regions in the map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_get_enter_cost: -- :ref:`float` **region_get_enter_cost** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`float` **region_get_enter_cost** **(** :ref:`RID` region **)** |const| Returns the ``enter_cost`` of this ``region``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_get_map: -- :ref:`RID` **region_get_map** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **region_get_map** **(** :ref:`RID` region **)** |const| Returns the navigation map :ref:`RID` the requested ``region`` is currently assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_get_navigation_layers: -- :ref:`int` **region_get_navigation_layers** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`int` **region_get_navigation_layers** **(** :ref:`RID` region **)** |const| Returns the region's navigation layers. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_get_travel_cost: -- :ref:`float` **region_get_travel_cost** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`float` **region_get_travel_cost** **(** :ref:`RID` region **)** |const| Returns the ``travel_cost`` of this ``region``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_owns_point: -- :ref:`bool` **region_owns_point** **(** :ref:`RID` region, :ref:`Vector2` point **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **region_owns_point** **(** :ref:`RID` region, :ref:`Vector2` point **)** |const| 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. @@ -637,51 +882,75 @@ If multiple navigation meshes have positions at equal distance the navigation re \ **Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_set_enter_cost: -- void **region_set_enter_cost** **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| +.. rst-class:: classref-method + +void **region_set_enter_cost** **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| Sets the ``enter_cost`` for this ``region``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_set_map: -- void **region_set_map** **(** :ref:`RID` region, :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +void **region_set_map** **(** :ref:`RID` region, :ref:`RID` map **)** |const| Sets the map for the region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_set_navigation_layers: -- void **region_set_navigation_layers** **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| +.. rst-class:: classref-method + +void **region_set_navigation_layers** **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path`). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_set_navpoly: -- void **region_set_navpoly** **(** :ref:`RID` region, :ref:`NavigationPolygon` nav_poly **)** |const| +.. rst-class:: classref-method + +void **region_set_navpoly** **(** :ref:`RID` region, :ref:`NavigationPolygon` nav_poly **)** |const| Sets the navigation mesh for the region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_set_transform: -- void **region_set_transform** **(** :ref:`RID` region, :ref:`Transform2D` transform **)** |const| +.. rst-class:: classref-method + +void **region_set_transform** **(** :ref:`RID` region, :ref:`Transform2D` transform **)** |const| Sets the global transformation for the region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer2D_method_region_set_travel_cost: -- void **region_set_travel_cost** **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| +.. rst-class:: classref-method + +void **region_set_travel_cost** **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| Sets the ``travel_cost`` for this ``region``. diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index df485e179..dfa7efdbe 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -14,6 +14,8 @@ NavigationServer3D Server interface for low-level 3D navigation access +.. rst-class:: classref-introduction-group + Description ----------- @@ -33,427 +35,578 @@ To use the collision avoidance system, you may use agents. You can set an agent' This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Navmesh Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`agent_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_max_neighbors` **(** :ref:`RID` agent, :ref:`int` count **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector3` position **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_target_velocity` **(** :ref:`RID` agent, :ref:`Vector3` target_velocity **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_time_horizon` **(** :ref:`RID` agent, :ref:`float` time **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`link_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`link_get_end_location` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`link_get_enter_cost` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`link_get_map` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`link_get_navigation_layers` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`link_get_start_location` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`link_get_travel_cost` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`link_is_bidirectional` **(** :ref:`RID` link **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_bidirectional` **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_end_location` **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_enter_cost` **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_map` **(** :ref:`RID` link, :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_navigation_layers` **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_start_location` **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`link_set_travel_cost` **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`map_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_force_update` **(** :ref:`RID` map **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`map_get_closest_point_normal` **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`map_get_closest_point_owner` **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`map_get_closest_point_to_segment` **(** :ref:`RID` map, :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` use_collision=false **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`map_get_edge_connection_margin` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`map_get_link_connection_radius` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`map_get_up` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_cell_size` **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_edge_connection_margin` **(** :ref:`RID` map, :ref:`float` margin **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_link_connection_radius` **(** :ref:`RID` map, :ref:`float` radius **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`map_set_up` **(** :ref:`RID` map, :ref:`Vector3` up **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`process` **(** :ref:`float` delta_time **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters3D` parameters, :ref:`NavigationPathQueryResult3D` result **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_bake_navmesh` **(** :ref:`NavigationMesh` mesh, :ref:`Node` node **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`region_create` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`region_get_connection_pathway_end` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`region_get_connection_pathway_start` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`region_get_connections_count` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`region_get_enter_cost` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`region_get_navigation_layers` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector3` point **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_navigation_layers` **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_navmesh` **(** :ref:`RID` region, :ref:`NavigationMesh` nav_mesh **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_transform` **(** :ref:`RID` region, :ref:`Transform3D` transform **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_active` **(** :ref:`bool` active **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`agent_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_max_neighbors` **(** :ref:`RID` agent, :ref:`int` count **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector3` position **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_target_velocity` **(** :ref:`RID` agent, :ref:`Vector3` target_velocity **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_time_horizon` **(** :ref:`RID` agent, :ref:`float` time **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`link_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`link_get_end_location` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`link_get_enter_cost` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`link_get_map` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`link_get_navigation_layers` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`link_get_start_location` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`link_get_travel_cost` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`link_is_bidirectional` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_bidirectional` **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_end_location` **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_enter_cost` **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_map` **(** :ref:`RID` link, :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_navigation_layers` **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_start_location` **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_travel_cost` **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`map_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_force_update` **(** :ref:`RID` map **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`map_get_closest_point_normal` **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`map_get_closest_point_owner` **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`map_get_closest_point_to_segment` **(** :ref:`RID` map, :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` use_collision=false **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_edge_connection_margin` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_link_connection_radius` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`map_get_up` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_cell_size` **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_edge_connection_margin` **(** :ref:`RID` map, :ref:`float` margin **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_link_connection_radius` **(** :ref:`RID` map, :ref:`float` radius **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_up` **(** :ref:`RID` map, :ref:`Vector3` up **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`process` **(** :ref:`float` delta_time **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters3D` parameters, :ref:`NavigationPathQueryResult3D` result **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_bake_navmesh` **(** :ref:`NavigationMesh` mesh, :ref:`Node` node **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`region_create` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`region_get_connection_pathway_end` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`region_get_connection_pathway_start` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`region_get_connections_count` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`region_get_enter_cost` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`region_get_navigation_layers` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector3` point **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_navigation_layers` **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_navmesh` **(** :ref:`RID` region, :ref:`NavigationMesh` nav_mesh **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_transform` **(** :ref:`RID` region, :ref:`Transform3D` transform **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_active` **(** :ref:`bool` active **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_NavigationServer3D_signal_map_changed: -- **map_changed** **(** :ref:`RID` map **)** +.. rst-class:: classref-signal + +**map_changed** **(** :ref:`RID` map **)** Emitted when a navigation map is updated, when a region moves or is modified. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_signal_navigation_debug_changed: -- **navigation_debug_changed** **(** **)** +.. rst-class:: classref-signal + +**navigation_debug_changed** **(** **)** Emitted when navigation debug settings are changed. Only available in debug builds. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NavigationServer3D_method_agent_create: -- :ref:`RID` **agent_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **agent_create** **(** **)** |const| Creates the agent. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_get_map: -- :ref:`RID` **agent_get_map** **(** :ref:`RID` agent **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **agent_get_map** **(** :ref:`RID` agent **)** |const| Returns the navigation map :ref:`RID` the requested ``agent`` is currently assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_is_map_changed: -- :ref:`bool` **agent_is_map_changed** **(** :ref:`RID` agent **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **agent_is_map_changed** **(** :ref:`RID` agent **)** |const| Returns true if the map got changed the previous frame. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_callback: -- void **agent_set_callback** **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| +.. rst-class:: classref-method + +void **agent_set_callback** **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated ``safe_velocity`` to the ``receiver`` object with a signal to the chosen ``method`` name. \ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_callback` again with a ``null`` object as the ``receiver``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_map: -- void **agent_set_map** **(** :ref:`RID` agent, :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +void **agent_set_map** **(** :ref:`RID` agent, :ref:`RID` map **)** |const| Puts the agent in the map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_max_neighbors: -- void **agent_set_max_neighbors** **(** :ref:`RID` agent, :ref:`int` count **)** |const| +.. rst-class:: classref-method + +void **agent_set_max_neighbors** **(** :ref:`RID` agent, :ref:`int` count **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_max_speed: -- void **agent_set_max_speed** **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| +.. rst-class:: classref-method + +void **agent_set_max_speed** **(** :ref:`RID` agent, :ref:`float` max_speed **)** |const| Sets the maximum speed of the agent. Must be positive. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_neighbor_distance: -- void **agent_set_neighbor_distance** **(** :ref:`RID` agent, :ref:`float` distance **)** |const| +.. rst-class:: classref-method + +void **agent_set_neighbor_distance** **(** :ref:`RID` agent, :ref:`float` distance **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_position: -- void **agent_set_position** **(** :ref:`RID` agent, :ref:`Vector3` position **)** |const| +.. rst-class:: classref-method + +void **agent_set_position** **(** :ref:`RID` agent, :ref:`Vector3` position **)** |const| Sets the position of the agent in world space. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_radius: -- void **agent_set_radius** **(** :ref:`RID` agent, :ref:`float` radius **)** |const| +.. rst-class:: classref-method + +void **agent_set_radius** **(** :ref:`RID` agent, :ref:`float` radius **)** |const| Sets the radius of the agent. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_target_velocity: -- void **agent_set_target_velocity** **(** :ref:`RID` agent, :ref:`Vector3` target_velocity **)** |const| +.. rst-class:: classref-method + +void **agent_set_target_velocity** **(** :ref:`RID` agent, :ref:`Vector3` target_velocity **)** |const| Sets the new target velocity. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_time_horizon: -- void **agent_set_time_horizon** **(** :ref:`RID` agent, :ref:`float` time **)** |const| +.. rst-class:: classref-method + +void **agent_set_time_horizon** **(** :ref:`RID` agent, :ref:`float` time **)** |const| 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. Must be positive. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_agent_set_velocity: -- void **agent_set_velocity** **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** |const| +.. rst-class:: classref-method + +void **agent_set_velocity** **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** |const| Sets the current velocity of the agent. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_free_rid: -- void **free_rid** **(** :ref:`RID` rid **)** |const| +.. rst-class:: classref-method + +void **free_rid** **(** :ref:`RID` rid **)** |const| Destroys the given RID. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_get_maps: -- :ref:`RID[]` **get_maps** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **get_maps** **(** **)** |const| Returns all created navigation map :ref:`RID`\ s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_create: -- :ref:`RID` **link_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **link_create** **(** **)** |const| Create a new link between two locations on a map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_get_end_location: -- :ref:`Vector3` **link_get_end_location** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **link_get_end_location** **(** :ref:`RID` link **)** |const| Returns the ending location of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_get_enter_cost: -- :ref:`float` **link_get_enter_cost** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`float` **link_get_enter_cost** **(** :ref:`RID` link **)** |const| Returns the ``enter_cost`` of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_get_map: -- :ref:`RID` **link_get_map** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **link_get_map** **(** :ref:`RID` link **)** |const| Returns the navigation map :ref:`RID` the requested ``link`` is currently assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_get_navigation_layers: -- :ref:`int` **link_get_navigation_layers** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`int` **link_get_navigation_layers** **(** :ref:`RID` link **)** |const| Returns the navigation layers for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_get_start_location: -- :ref:`Vector3` **link_get_start_location** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **link_get_start_location** **(** :ref:`RID` link **)** |const| Returns the starting location of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_get_travel_cost: -- :ref:`float` **link_get_travel_cost** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`float` **link_get_travel_cost** **(** :ref:`RID` link **)** |const| Returns the ``travel_cost`` of this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_is_bidirectional: -- :ref:`bool` **link_is_bidirectional** **(** :ref:`RID` link **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **link_is_bidirectional** **(** :ref:`RID` link **)** |const| Returns whether this ``link`` can be travelled in both directions. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_set_bidirectional: -- void **link_set_bidirectional** **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| +.. rst-class:: classref-method + +void **link_set_bidirectional** **(** :ref:`RID` link, :ref:`bool` bidirectional **)** |const| Sets whether this ``link`` can be travelled in both directions. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_set_end_location: -- void **link_set_end_location** **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| +.. rst-class:: classref-method + +void **link_set_end_location** **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| Sets the exit location for the ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_set_enter_cost: -- void **link_set_enter_cost** **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| +.. rst-class:: classref-method + +void **link_set_enter_cost** **(** :ref:`RID` link, :ref:`float` enter_cost **)** |const| Sets the ``enter_cost`` for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_set_map: -- void **link_set_map** **(** :ref:`RID` link, :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +void **link_set_map** **(** :ref:`RID` link, :ref:`RID` map **)** |const| Sets the navigation map :ref:`RID` for the link. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_set_navigation_layers: -- void **link_set_navigation_layers** **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| +.. rst-class:: classref-method + +void **link_set_navigation_layers** **(** :ref:`RID` link, :ref:`int` navigation_layers **)** |const| Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path`). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_set_start_location: -- void **link_set_start_location** **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| +.. rst-class:: classref-method + +void **link_set_start_location** **(** :ref:`RID` link, :ref:`Vector3` location **)** |const| Sets the entry location for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_link_set_travel_cost: -- void **link_set_travel_cost** **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| +.. rst-class:: classref-method + +void **link_set_travel_cost** **(** :ref:`RID` link, :ref:`float` travel_cost **)** |const| Sets the ``travel_cost`` for this ``link``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_create: -- :ref:`RID` **map_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **map_create** **(** **)** |const| Create a new map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_force_update: -- void **map_force_update** **(** :ref:`RID` map **)** +.. rst-class:: classref-method + +void **map_force_update** **(** :ref:`RID` map **)** This function immediately forces synchronization of the specified navigation ``map`` :ref:`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). @@ -463,155 +616,231 @@ Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_agents: -- :ref:`RID[]` **map_get_agents** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_agents** **(** :ref:`RID` map **)** |const| Returns all navigation agents :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_cell_size: -- :ref:`float` **map_get_cell_size** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`float` **map_get_cell_size** **(** :ref:`RID` map **)** |const| Returns the map cell size. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_closest_point: -- :ref:`Vector3` **map_get_closest_point** **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **map_get_closest_point** **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| Returns the point closest to the provided ``to_point`` on the navigation mesh surface. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_closest_point_normal: -- :ref:`Vector3` **map_get_closest_point_normal** **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **map_get_closest_point_normal** **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| Returns the normal for the point returned by :ref:`map_get_closest_point`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_closest_point_owner: -- :ref:`RID` **map_get_closest_point_owner** **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **map_get_closest_point_owner** **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| Returns the owner region RID for the point returned by :ref:`map_get_closest_point`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_closest_point_to_segment: -- :ref:`Vector3` **map_get_closest_point_to_segment** **(** :ref:`RID` map, :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` use_collision=false **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **map_get_closest_point_to_segment** **(** :ref:`RID` map, :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` use_collision=false **)** |const| Returns the closest point between the navigation surface and the segment. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_edge_connection_margin: -- :ref:`float` **map_get_edge_connection_margin** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`float` **map_get_edge_connection_margin** **(** :ref:`RID` map **)** |const| Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_link_connection_radius: -- :ref:`float` **map_get_link_connection_radius** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`float` **map_get_link_connection_radius** **(** :ref:`RID` map **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_links: -- :ref:`RID[]` **map_get_links** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_links** **(** :ref:`RID` map **)** |const| Returns all navigation link :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_path: -- :ref:`PackedVector3Array` **map_get_path** **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **map_get_path** **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_regions: -- :ref:`RID[]` **map_get_regions** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **map_get_regions** **(** :ref:`RID` map **)** |const| Returns all navigation regions :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_get_up: -- :ref:`Vector3` **map_get_up** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **map_get_up** **(** :ref:`RID` map **)** |const| Returns the map's up direction. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_is_active: -- :ref:`bool` **map_is_active** **(** :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **map_is_active** **(** :ref:`RID` map **)** |const| Returns true if the map is active. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_set_active: -- void **map_set_active** **(** :ref:`RID` map, :ref:`bool` active **)** |const| +.. rst-class:: classref-method + +void **map_set_active** **(** :ref:`RID` map, :ref:`bool` active **)** |const| Sets the map active. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_set_cell_size: -- void **map_set_cell_size** **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| +.. rst-class:: classref-method + +void **map_set_cell_size** **(** :ref:`RID` map, :ref:`float` cell_size **)** |const| Set the map cell size used to weld the navigation mesh polygons. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_set_edge_connection_margin: -- void **map_set_edge_connection_margin** **(** :ref:`RID` map, :ref:`float` margin **)** |const| +.. rst-class:: classref-method + +void **map_set_edge_connection_margin** **(** :ref:`RID` map, :ref:`float` margin **)** |const| Set the map edge connection margin used to weld the compatible region edges. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_set_link_connection_radius: -- void **map_set_link_connection_radius** **(** :ref:`RID` map, :ref:`float` radius **)** |const| +.. rst-class:: classref-method + +void **map_set_link_connection_radius** **(** :ref:`RID` map, :ref:`float` radius **)** |const| Set the map's link connection radius used to connect links to navigation polygons. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_map_set_up: -- void **map_set_up** **(** :ref:`RID` map, :ref:`Vector3` up **)** |const| +.. rst-class:: classref-method + +void **map_set_up** **(** :ref:`RID` map, :ref:`Vector3` up **)** |const| Sets the map up direction. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_process: -- void **process** **(** :ref:`float` delta_time **)** +.. rst-class:: classref-method + +void **process** **(** :ref:`float` delta_time **)** Process the collision avoidance agents. @@ -619,91 +848,135 @@ The result of this process is needed by the physics server, so this must be call \ **Note:** This function is not thread safe. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_query_path: -- void **query_path** **(** :ref:`NavigationPathQueryParameters3D` parameters, :ref:`NavigationPathQueryResult3D` result **)** |const| +.. rst-class:: classref-method + +void **query_path** **(** :ref:`NavigationPathQueryParameters3D` parameters, :ref:`NavigationPathQueryResult3D` result **)** |const| Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters3D`. Updates the provided :ref:`NavigationPathQueryResult3D` result object with the path among other results requested by the query. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_bake_navmesh: -- void **region_bake_navmesh** **(** :ref:`NavigationMesh` mesh, :ref:`Node` node **)** |const| +.. rst-class:: classref-method + +void **region_bake_navmesh** **(** :ref:`NavigationMesh` mesh, :ref:`Node` node **)** |const| Bakes the navigation mesh. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_create: -- :ref:`RID` **region_create** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **region_create** **(** **)** |const| Creates a new region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_get_connection_pathway_end: -- :ref:`Vector3` **region_get_connection_pathway_end** **(** :ref:`RID` region, :ref:`int` connection **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **region_get_connection_pathway_end** **(** :ref:`RID` region, :ref:`int` connection **)** |const| Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_get_connection_pathway_start: -- :ref:`Vector3` **region_get_connection_pathway_start** **(** :ref:`RID` region, :ref:`int` connection **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **region_get_connection_pathway_start** **(** :ref:`RID` region, :ref:`int` connection **)** |const| Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count`. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_get_connections_count: -- :ref:`int` **region_get_connections_count** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`int` **region_get_connections_count** **(** :ref:`RID` region **)** |const| Returns how many connections this ``region`` has with other regions in the map. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_get_enter_cost: -- :ref:`float` **region_get_enter_cost** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`float` **region_get_enter_cost** **(** :ref:`RID` region **)** |const| Returns the ``enter_cost`` of this ``region``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_get_map: -- :ref:`RID` **region_get_map** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **region_get_map** **(** :ref:`RID` region **)** |const| Returns the navigation map :ref:`RID` the requested ``region`` is currently assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_get_navigation_layers: -- :ref:`int` **region_get_navigation_layers** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`int` **region_get_navigation_layers** **(** :ref:`RID` region **)** |const| Returns the region's navigation layers. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_get_travel_cost: -- :ref:`float` **region_get_travel_cost** **(** :ref:`RID` region **)** |const| +.. rst-class:: classref-method + +:ref:`float` **region_get_travel_cost** **(** :ref:`RID` region **)** |const| Returns the ``travel_cost`` of this ``region``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_owns_point: -- :ref:`bool` **region_owns_point** **(** :ref:`RID` region, :ref:`Vector3` point **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **region_owns_point** **(** :ref:`RID` region, :ref:`Vector3` point **)** |const| 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. @@ -711,59 +984,87 @@ If multiple navigation meshes have positions at equal distance the navigation re \ **Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_set_enter_cost: -- void **region_set_enter_cost** **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| +.. rst-class:: classref-method + +void **region_set_enter_cost** **(** :ref:`RID` region, :ref:`float` enter_cost **)** |const| Sets the ``enter_cost`` for this ``region``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_set_map: -- void **region_set_map** **(** :ref:`RID` region, :ref:`RID` map **)** |const| +.. rst-class:: classref-method + +void **region_set_map** **(** :ref:`RID` region, :ref:`RID` map **)** |const| Sets the map for the region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_set_navigation_layers: -- void **region_set_navigation_layers** **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| +.. rst-class:: classref-method + +void **region_set_navigation_layers** **(** :ref:`RID` region, :ref:`int` navigation_layers **)** |const| Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path`). +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_set_navmesh: -- void **region_set_navmesh** **(** :ref:`RID` region, :ref:`NavigationMesh` nav_mesh **)** |const| +.. rst-class:: classref-method + +void **region_set_navmesh** **(** :ref:`RID` region, :ref:`NavigationMesh` nav_mesh **)** |const| Sets the navigation mesh for the region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_set_transform: -- void **region_set_transform** **(** :ref:`RID` region, :ref:`Transform3D` transform **)** |const| +.. rst-class:: classref-method + +void **region_set_transform** **(** :ref:`RID` region, :ref:`Transform3D` transform **)** |const| Sets the global transformation for the region. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_region_set_travel_cost: -- void **region_set_travel_cost** **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| +.. rst-class:: classref-method + +void **region_set_travel_cost** **(** :ref:`RID` region, :ref:`float` travel_cost **)** |const| Sets the ``travel_cost`` for this ``region``. +.. rst-class:: classref-item-separator + ---- .. _class_NavigationServer3D_method_set_active: -- void **set_active** **(** :ref:`bool` active **)** |const| +.. rst-class:: classref-method + +void **set_active** **(** :ref:`bool` active **)** |const| Control activation of this server. diff --git a/classes/class_ninepatchrect.rst b/classes/class_ninepatchrect.rst index 95c1dab47..9f815f107 100644 --- a/classes/class_ninepatchrect.rst +++ b/classes/class_ninepatchrect.rst @@ -14,234 +14,301 @@ NinePatchRect Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes. +.. rst-class:: classref-introduction-group + Description ----------- Also known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`AxisStretchMode` | :ref:`axis_stretch_horizontal` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`AxisStretchMode` | :ref:`axis_stretch_vertical` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_center` | ``true`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``2`` (overrides :ref:`Control`) | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`patch_margin_bottom` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`patch_margin_left` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`patch_margin_right` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`patch_margin_top` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`AxisStretchMode` | :ref:`axis_stretch_horizontal` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`AxisStretchMode` | :ref:`axis_stretch_vertical` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_center` | ``true`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``2`` (overrides :ref:`Control`) | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int` | :ref:`patch_margin_bottom` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int` | :ref:`patch_margin_left` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int` | :ref:`patch_margin_right` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int` | :ref:`patch_margin_top` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +------------------------------------------------------------+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_patch_margin` **(** :ref:`Side` margin **)** |const| | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_patch_margin` **(** :ref:`Side` margin, :ref:`int` value **)** | -+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_patch_margin` **(** :ref:`Side` margin **)** |const| | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_patch_margin` **(** :ref:`Side` margin, :ref:`int` value **)** | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_NinePatchRect_signal_texture_changed: -- **texture_changed** **(** **)** +.. rst-class:: classref-signal + +**texture_changed** **(** **)** Emitted when the node's texture changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_NinePatchRect_AxisStretchMode: -.. _class_NinePatchRect_constant_AXIS_STRETCH_MODE_STRETCH: - -.. _class_NinePatchRect_constant_AXIS_STRETCH_MODE_TILE: - -.. _class_NinePatchRect_constant_AXIS_STRETCH_MODE_TILE_FIT: +.. rst-class:: classref-enumeration enum **AxisStretchMode**: -- **AXIS_STRETCH_MODE_STRETCH** = **0** --- Stretches the center texture across the NinePatchRect. This may cause the texture to be distorted. +.. _class_NinePatchRect_constant_AXIS_STRETCH_MODE_STRETCH: -- **AXIS_STRETCH_MODE_TILE** = **1** --- Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges. +.. rst-class:: classref-enumeration-constant + +:ref:`AxisStretchMode` **AXIS_STRETCH_MODE_STRETCH** = ``0`` + +Stretches the center texture across the NinePatchRect. This may cause the texture to be distorted. + +.. _class_NinePatchRect_constant_AXIS_STRETCH_MODE_TILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisStretchMode` **AXIS_STRETCH_MODE_TILE** = ``1`` + +Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges. \ **Note:** Only supported when using the Vulkan renderer. When using the OpenGL renderer, this will behave like :ref:`AXIS_STRETCH_MODE_STRETCH`. -- **AXIS_STRETCH_MODE_TILE_FIT** = **2** --- Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than :ref:`AXIS_STRETCH_MODE_STRETCH`. The texture must be seamless for this to work without displaying artifacts between edges. +.. _class_NinePatchRect_constant_AXIS_STRETCH_MODE_TILE_FIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisStretchMode` **AXIS_STRETCH_MODE_TILE_FIT** = ``2`` + +Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than :ref:`AXIS_STRETCH_MODE_STRETCH`. The texture must be seamless for this to work without displaying artifacts between edges. \ **Note:** Only supported when using the Vulkan renderer. When using the OpenGL renderer, this will behave like :ref:`AXIS_STRETCH_MODE_STRETCH`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_NinePatchRect_property_axis_stretch_horizontal: -- :ref:`AxisStretchMode` **axis_stretch_horizontal** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_h_axis_stretch_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_h_axis_stretch_mode() | -+-----------+--------------------------------+ +:ref:`AxisStretchMode` **axis_stretch_horizontal** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_h_axis_stretch_mode** **(** :ref:`AxisStretchMode` value **)** +- :ref:`AxisStretchMode` **get_h_axis_stretch_mode** **(** **)** The stretch mode to use for horizontal stretching/tiling. See :ref:`AxisStretchMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_axis_stretch_vertical: -- :ref:`AxisStretchMode` **axis_stretch_vertical** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_v_axis_stretch_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_v_axis_stretch_mode() | -+-----------+--------------------------------+ +:ref:`AxisStretchMode` **axis_stretch_vertical** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_v_axis_stretch_mode** **(** :ref:`AxisStretchMode` value **)** +- :ref:`AxisStretchMode` **get_v_axis_stretch_mode** **(** **)** The stretch mode to use for vertical stretching/tiling. See :ref:`AxisStretchMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_draw_center: -- :ref:`bool` **draw_center** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_draw_center(value) | -+-----------+--------------------------+ -| *Getter* | is_draw_center_enabled() | -+-----------+--------------------------+ +:ref:`bool` **draw_center** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draw_center** **(** :ref:`bool` value **)** +- :ref:`bool` **is_draw_center_enabled** **(** **)** If ``true``, draw the panel's center. Else, only draw the 9-slice's borders. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_patch_margin_bottom: -- :ref:`int` **patch_margin_bottom** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_patch_margin(value) | -+-----------+-------------------------+ -| *Getter* | get_patch_margin() | -+-----------+-------------------------+ +:ref:`int` **patch_margin_bottom** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_patch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_patch_margin** **(** :ref:`Side` margin **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_patch_margin_left: -- :ref:`int` **patch_margin_left** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_patch_margin(value) | -+-----------+-------------------------+ -| *Getter* | get_patch_margin() | -+-----------+-------------------------+ +:ref:`int` **patch_margin_left** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_patch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_patch_margin** **(** :ref:`Side` margin **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_patch_margin_right: -- :ref:`int` **patch_margin_right** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_patch_margin(value) | -+-----------+-------------------------+ -| *Getter* | get_patch_margin() | -+-----------+-------------------------+ +:ref:`int` **patch_margin_right** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_patch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_patch_margin** **(** :ref:`Side` margin **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_patch_margin_top: -- :ref:`int` **patch_margin_top** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_patch_margin(value) | -+-----------+-------------------------+ -| *Getter* | get_patch_margin() | -+-----------+-------------------------+ +:ref:`int` **patch_margin_top** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_patch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_patch_margin** **(** :ref:`Side` margin **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_region_rect: -- :ref:`Rect2` **region_rect** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Rect2(0, 0, 0, 0)`` | -+-----------+------------------------+ -| *Setter* | set_region_rect(value) | -+-----------+------------------------+ -| *Getter* | get_region_rect() | -+-----------+------------------------+ +:ref:`Rect2` **region_rect** = ``Rect2(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_region_rect** **(** :ref:`Rect2` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The node's texture resource. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NinePatchRect_method_get_patch_margin: -- :ref:`int` **get_patch_margin** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_patch_margin** **(** :ref:`Side` margin **)** |const| Returns the size of the margin on the specified :ref:`Side`. +.. rst-class:: classref-item-separator + ---- .. _class_NinePatchRect_method_set_patch_margin: -- void **set_patch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +.. rst-class:: classref-method + +void **set_patch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** Sets the size of the margin on the specified :ref:`Side` to ``value`` pixels. diff --git a/classes/class_node.rst b/classes/class_node.rst index b470b636e..8ab234c44 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -16,6 +16,8 @@ Node Base class for all *scene* objects. +.. rst-class:: classref-introduction-group + Description ----------- @@ -41,7 +43,9 @@ Finally, when a node is freed with :ref:`Object.free` \ **Networking with nodes:** After connecting to a server (or making one, see :ref:`ENetMultiplayerPeer`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`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` (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, 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, not **Node**. It isn't exposed like most properties but does have a setter and getter (``set_script()`` and ``get_script()``). + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -50,680 +54,993 @@ Tutorials - `All Demos `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`editor_description` | ``""`` | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`MultiplayerAPI` | :ref:`multiplayer` | | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`StringName` | :ref:`name` | | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`Node` | :ref:`owner` | | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`process_priority` | ``0`` | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`scene_file_path` | | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`unique_name_in_owner` | ``false`` | -+---------------------------------------------+-----------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`editor_description` | ``""`` | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`MultiplayerAPI` | :ref:`multiplayer` | | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`name` | | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`Node` | :ref:`owner` | | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`process_priority` | ``0`` | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`scene_file_path` | | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`unique_name_in_owner` | ``false`` | + +---------------------------------------------+-----------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_enter_tree` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_exit_tree` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_ready` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shortcut_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` event **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_child` **(** :ref:`Node` node, :ref:`bool` force_readable_name=false, :ref:`InternalMode` internal=0 **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_sibling` **(** :ref:`Node` sibling, :ref:`bool` force_readable_name=false **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_to_group` **(** :ref:`StringName` group, :ref:`bool` persistent=false **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_process` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`create_tween` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`duplicate` **(** :ref:`int` flags=15 **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`find_child` **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`find_children` **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`find_parent` **(** :ref:`String` pattern **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx, :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_child_count` **(** :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`get_children` **(** :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName[]` | :ref:`get_groups` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_index` **(** :ref:`bool` include_internal=false **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_multiplayer_authority` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_node_and_resource` **(** :ref:`NodePath` path **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_node_or_null` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_parent` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_path` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_path_to` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_physics_process_delta_time` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_process_delta_time` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_scene_instance_load_placeholder` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SceneTree` | :ref:`get_tree` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Viewport` | :ref:`get_viewport` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_node` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_node_and_resource` **(** :ref:`NodePath` path **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_ancestor_of` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_displayed_folded` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_editable_instance` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_greater_than` **(** :ref:`Node` node **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_in_group` **(** :ref:`StringName` group **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_inside_tree` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_multiplayer_authority` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_physics_processing` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_physics_processing_internal` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_input` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_internal` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_shortcut_input` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_unhandled_input` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_processing_unhandled_key_input` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_index **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_orphan_nodes` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_tree` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_tree_pretty` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`propagate_call` **(** :ref:`StringName` method, :ref:`Array` args=[], :ref:`bool` parent_first=false **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`propagate_notification` **(** :ref:`int` what **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_free` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_child` **(** :ref:`Node` node **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_from_group` **(** :ref:`StringName` group **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`replace_by` **(** :ref:`Node` node, :ref:`bool` keep_groups=false **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`request_ready` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`rpc` **(** :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rpc_config` **(** :ref:`StringName` method, :ref:`Variant` config **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`rpc_id` **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_editable_instance` **(** :ref:`Node` node, :ref:`bool` is_editable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_multiplayer_authority` **(** :ref:`int` id, :ref:`bool` recursive=true **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_process` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_process_internal` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_internal` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_shortcut_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_unhandled_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_process_unhandled_key_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scene_instance_load_placeholder` **(** :ref:`bool` load_placeholder **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_configuration_warnings` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_enter_tree` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_exit_tree` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_input` **(** :ref:`InputEvent` event **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_ready` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shortcut_input` **(** :ref:`InputEvent` event **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` event **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_child` **(** :ref:`Node` node, :ref:`bool` force_readable_name=false, :ref:`InternalMode` internal=0 **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_sibling` **(** :ref:`Node` sibling, :ref:`bool` force_readable_name=false **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_to_group` **(** :ref:`StringName` group, :ref:`bool` persistent=false **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_process` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`create_tween` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`duplicate` **(** :ref:`int` flags=15 **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`find_child` **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node[]` | :ref:`find_children` **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`find_parent` **(** :ref:`String` pattern **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx, :ref:`bool` include_internal=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_child_count` **(** :ref:`bool` include_internal=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node[]` | :ref:`get_children` **(** :ref:`bool` include_internal=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_groups` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_index` **(** :ref:`bool` include_internal=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_multiplayer_authority` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_node_and_resource` **(** :ref:`NodePath` path **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_node_or_null` **(** :ref:`NodePath` path **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_parent` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_path` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_path_to` **(** :ref:`Node` node, :ref:`bool` use_unique_path=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_physics_process_delta_time` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_process_delta_time` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_scene_instance_load_placeholder` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SceneTree` | :ref:`get_tree` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Viewport` | :ref:`get_viewport` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_node` **(** :ref:`NodePath` path **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_node_and_resource` **(** :ref:`NodePath` path **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_ancestor_of` **(** :ref:`Node` node **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_displayed_folded` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_editable_instance` **(** :ref:`Node` node **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_greater_than` **(** :ref:`Node` node **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_group` **(** :ref:`StringName` group **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_inside_tree` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_multiplayer_authority` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_physics_processing` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_physics_processing_internal` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_processing` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_processing_input` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_processing_internal` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_processing_shortcut_input` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_processing_unhandled_input` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_processing_unhandled_key_input` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_index **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`print_orphan_nodes` **(** **)** |static| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`print_tree` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`print_tree_pretty` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`propagate_call` **(** :ref:`StringName` method, :ref:`Array` args=[], :ref:`bool` parent_first=false **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`propagate_notification` **(** :ref:`int` what **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue_free` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_child` **(** :ref:`Node` node **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_from_group` **(** :ref:`StringName` group **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`replace_by` **(** :ref:`Node` node, :ref:`bool` keep_groups=false **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_ready` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`rpc` **(** :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rpc_config` **(** :ref:`StringName` method, :ref:`Variant` config **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`rpc_id` **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_editable_instance` **(** :ref:`Node` node, :ref:`bool` is_editable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_multiplayer_authority` **(** :ref:`int` id, :ref:`bool` recursive=true **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_physics_process` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_physics_process_internal` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process_input` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process_internal` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process_shortcut_input` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process_unhandled_input` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process_unhandled_key_input` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_scene_instance_load_placeholder` **(** :ref:`bool` load_placeholder **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_configuration_warnings` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Node_signal_child_entered_tree: -- **child_entered_tree** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**child_entered_tree** **(** :ref:`Node` node **)** Emitted when a child node enters the scene tree, either because it entered on its own or because this node entered with it. This signal is emitted *after* the child node's own :ref:`NOTIFICATION_ENTER_TREE` and :ref:`tree_entered`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_signal_child_exiting_tree: -- **child_exiting_tree** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**child_exiting_tree** **(** :ref:`Node` node **)** 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. 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` and :ref:`NOTIFICATION_EXIT_TREE`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_signal_ready: -- **ready** **(** **)** +.. rst-class:: classref-signal + +**ready** **(** **)** Emitted when the node is ready. Comes after :ref:`_ready` callback and follows the same rules. +.. rst-class:: classref-item-separator + ---- .. _class_Node_signal_renamed: -- **renamed** **(** **)** +.. rst-class:: classref-signal + +**renamed** **(** **)** Emitted when the node is renamed. +.. rst-class:: classref-item-separator + ---- .. _class_Node_signal_tree_entered: -- **tree_entered** **(** **)** +.. rst-class:: classref-signal + +**tree_entered** **(** **)** Emitted when the node enters the tree. This signal is emitted *after* the related :ref:`NOTIFICATION_ENTER_TREE` notification. +.. rst-class:: classref-item-separator + ---- .. _class_Node_signal_tree_exited: -- **tree_exited** **(** **)** +.. rst-class:: classref-signal + +**tree_exited** **(** **)** Emitted after the node exits the tree and is no longer active. +.. rst-class:: classref-item-separator + ---- .. _class_Node_signal_tree_exiting: -- **tree_exiting** **(** **)** +.. rst-class:: classref-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). This signal is emitted *before* the related :ref:`NOTIFICATION_EXIT_TREE` notification. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Node_ProcessMode: -.. _class_Node_constant_PROCESS_MODE_INHERIT: - -.. _class_Node_constant_PROCESS_MODE_PAUSABLE: - -.. _class_Node_constant_PROCESS_MODE_WHEN_PAUSED: - -.. _class_Node_constant_PROCESS_MODE_ALWAYS: - -.. _class_Node_constant_PROCESS_MODE_DISABLED: +.. rst-class:: classref-enumeration enum **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`. Default. +.. _class_Node_constant_PROCESS_MODE_INHERIT: -- **PROCESS_MODE_PAUSABLE** = **1** --- Stops processing when the :ref:`SceneTree` is paused (process when unpaused). This is the inverse of :ref:`PROCESS_MODE_WHEN_PAUSED`. +.. rst-class:: classref-enumeration-constant -- **PROCESS_MODE_WHEN_PAUSED** = **2** --- Only process when the :ref:`SceneTree` is paused (don't process when unpaused). This is the inverse of :ref:`PROCESS_MODE_PAUSABLE`. +:ref:`ProcessMode` **PROCESS_MODE_INHERIT** = ``0`` -- **PROCESS_MODE_ALWAYS** = **3** --- Always process. Continue processing always, ignoring the :ref:`SceneTree`'s paused property. This is the inverse of :ref:`PROCESS_MODE_DISABLED`. +Inherits process mode from the node's parent. For the root node, it is equivalent to :ref:`PROCESS_MODE_PAUSABLE`. Default. -- **PROCESS_MODE_DISABLED** = **4** --- Never process. Completely disables processing, ignoring the :ref:`SceneTree`'s paused property. This is the inverse of :ref:`PROCESS_MODE_ALWAYS`. +.. _class_Node_constant_PROCESS_MODE_PAUSABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessMode` **PROCESS_MODE_PAUSABLE** = ``1`` + +Stops processing when the :ref:`SceneTree` is paused (process when unpaused). This is the inverse of :ref:`PROCESS_MODE_WHEN_PAUSED`. + +.. _class_Node_constant_PROCESS_MODE_WHEN_PAUSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessMode` **PROCESS_MODE_WHEN_PAUSED** = ``2`` + +Only process when the :ref:`SceneTree` is paused (don't process when unpaused). This is the inverse of :ref:`PROCESS_MODE_PAUSABLE`. + +.. _class_Node_constant_PROCESS_MODE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessMode` **PROCESS_MODE_ALWAYS** = ``3`` + +Always process. Continue processing always, ignoring the :ref:`SceneTree`'s paused property. This is the inverse of :ref:`PROCESS_MODE_DISABLED`. + +.. _class_Node_constant_PROCESS_MODE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessMode` **PROCESS_MODE_DISABLED** = ``4`` + +Never process. Completely disables processing, ignoring the :ref:`SceneTree`'s paused property. This is the inverse of :ref:`PROCESS_MODE_ALWAYS`. + +.. rst-class:: classref-item-separator ---- .. _enum_Node_DuplicateFlags: -.. _class_Node_constant_DUPLICATE_SIGNALS: - -.. _class_Node_constant_DUPLICATE_GROUPS: - -.. _class_Node_constant_DUPLICATE_SCRIPTS: - -.. _class_Node_constant_DUPLICATE_USE_INSTANTIATION: +.. rst-class:: classref-enumeration enum **DuplicateFlags**: -- **DUPLICATE_SIGNALS** = **1** --- Duplicate the node's signals. +.. _class_Node_constant_DUPLICATE_SIGNALS: -- **DUPLICATE_GROUPS** = **2** --- Duplicate the node's groups. +.. rst-class:: classref-enumeration-constant -- **DUPLICATE_SCRIPTS** = **4** --- Duplicate the node's scripts. +:ref:`DuplicateFlags` **DUPLICATE_SIGNALS** = ``1`` -- **DUPLICATE_USE_INSTANTIATION** = **8** --- Duplicate using instancing. +Duplicate the node's signals. + +.. _class_Node_constant_DUPLICATE_GROUPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DuplicateFlags` **DUPLICATE_GROUPS** = ``2`` + +Duplicate the node's groups. + +.. _class_Node_constant_DUPLICATE_SCRIPTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DuplicateFlags` **DUPLICATE_SCRIPTS** = ``4`` + +Duplicate the node's scripts. + +.. _class_Node_constant_DUPLICATE_USE_INSTANTIATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`DuplicateFlags` **DUPLICATE_USE_INSTANTIATION** = ``8`` + +Duplicate using instancing. An instance stays linked to the original so when the original changes, the instance changes too. +.. rst-class:: classref-item-separator + ---- .. _enum_Node_InternalMode: -.. _class_Node_constant_INTERNAL_MODE_DISABLED: - -.. _class_Node_constant_INTERNAL_MODE_FRONT: - -.. _class_Node_constant_INTERNAL_MODE_BACK: +.. rst-class:: classref-enumeration enum **InternalMode**: -- **INTERNAL_MODE_DISABLED** = **0** --- Node will not be internal. +.. _class_Node_constant_INTERNAL_MODE_DISABLED: -- **INTERNAL_MODE_FRONT** = **1** --- Node will be placed at the front of parent's node list, before any non-internal sibling. +.. rst-class:: classref-enumeration-constant -- **INTERNAL_MODE_BACK** = **2** --- Node will be placed at the back of parent's node list, after any non-internal sibling. +:ref:`InternalMode` **INTERNAL_MODE_DISABLED** = ``0`` + +Node will not be internal. + +.. _class_Node_constant_INTERNAL_MODE_FRONT: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalMode` **INTERNAL_MODE_FRONT** = ``1`` + +Node will be placed at the front of parent's node list, before any non-internal sibling. + +.. _class_Node_constant_INTERNAL_MODE_BACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`InternalMode` **INTERNAL_MODE_BACK** = ``2`` + +Node will be placed at the back of parent's node list, after any non-internal sibling. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Node_constant_NOTIFICATION_ENTER_TREE: -.. _class_Node_constant_NOTIFICATION_EXIT_TREE: +.. rst-class:: classref-constant -.. _class_Node_constant_NOTIFICATION_MOVED_IN_PARENT: +**NOTIFICATION_ENTER_TREE** = ``10`` -.. _class_Node_constant_NOTIFICATION_READY: - -.. _class_Node_constant_NOTIFICATION_PAUSED: - -.. _class_Node_constant_NOTIFICATION_UNPAUSED: - -.. _class_Node_constant_NOTIFICATION_PHYSICS_PROCESS: - -.. _class_Node_constant_NOTIFICATION_PROCESS: - -.. _class_Node_constant_NOTIFICATION_PARENTED: - -.. _class_Node_constant_NOTIFICATION_UNPARENTED: - -.. _class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED: - -.. _class_Node_constant_NOTIFICATION_DRAG_BEGIN: - -.. _class_Node_constant_NOTIFICATION_DRAG_END: - -.. _class_Node_constant_NOTIFICATION_PATH_RENAMED: - -.. _class_Node_constant_NOTIFICATION_INTERNAL_PROCESS: - -.. _class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS: - -.. _class_Node_constant_NOTIFICATION_POST_ENTER_TREE: - -.. _class_Node_constant_NOTIFICATION_DISABLED: - -.. _class_Node_constant_NOTIFICATION_ENABLED: - -.. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE: - -.. _class_Node_constant_NOTIFICATION_EDITOR_POST_SAVE: - -.. _class_Node_constant_NOTIFICATION_WM_MOUSE_ENTER: - -.. _class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT: - -.. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN: - -.. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_OUT: - -.. _class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST: - -.. _class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST: - -.. _class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED: - -.. _class_Node_constant_NOTIFICATION_WM_DPI_CHANGE: - -.. _class_Node_constant_NOTIFICATION_VP_MOUSE_ENTER: - -.. _class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT: - -.. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING: - -.. _class_Node_constant_NOTIFICATION_TRANSLATION_CHANGED: - -.. _class_Node_constant_NOTIFICATION_WM_ABOUT: - -.. _class_Node_constant_NOTIFICATION_CRASH: - -.. _class_Node_constant_NOTIFICATION_OS_IME_UPDATE: - -.. _class_Node_constant_NOTIFICATION_APPLICATION_RESUMED: - -.. _class_Node_constant_NOTIFICATION_APPLICATION_PAUSED: - -.. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN: - -.. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT: - -.. _class_Node_constant_NOTIFICATION_TEXT_SERVER_CHANGED: - -- **NOTIFICATION_ENTER_TREE** = **10** --- Notification received when the node enters a :ref:`SceneTree`. +Notification received when the node enters a :ref:`SceneTree`. This notification is emitted *before* the related :ref:`tree_entered`. -- **NOTIFICATION_EXIT_TREE** = **11** --- Notification received when the node is about to exit a :ref:`SceneTree`. +.. _class_Node_constant_NOTIFICATION_EXIT_TREE: + +.. rst-class:: classref-constant + +**NOTIFICATION_EXIT_TREE** = ``11`` + +Notification received when the node is about to exit a :ref:`SceneTree`. This notification is emitted *after* the related :ref:`tree_exiting`. -- **NOTIFICATION_MOVED_IN_PARENT** = **12** --- Notification received when the node is moved in the parent. +.. _class_Node_constant_NOTIFICATION_MOVED_IN_PARENT: -- **NOTIFICATION_READY** = **13** --- Notification received when the node is ready. See :ref:`_ready`. +.. rst-class:: classref-constant -- **NOTIFICATION_PAUSED** = **14** --- Notification received when the node is paused. +**NOTIFICATION_MOVED_IN_PARENT** = ``12`` -- **NOTIFICATION_UNPAUSED** = **15** --- Notification received when the node is unpaused. +Notification received when the node is moved in the parent. -- **NOTIFICATION_PHYSICS_PROCESS** = **16** --- Notification received every frame when the physics process flag is set (see :ref:`set_physics_process`). +.. _class_Node_constant_NOTIFICATION_READY: -- **NOTIFICATION_PROCESS** = **17** --- Notification received every frame when the process flag is set (see :ref:`set_process`). +.. rst-class:: classref-constant -- **NOTIFICATION_PARENTED** = **18** --- Notification received when a node is set as a child of another node. +**NOTIFICATION_READY** = ``13`` + +Notification received when the node is ready. See :ref:`_ready`. + +.. _class_Node_constant_NOTIFICATION_PAUSED: + +.. rst-class:: classref-constant + +**NOTIFICATION_PAUSED** = ``14`` + +Notification received when the node is paused. + +.. _class_Node_constant_NOTIFICATION_UNPAUSED: + +.. rst-class:: classref-constant + +**NOTIFICATION_UNPAUSED** = ``15`` + +Notification received when the node is unpaused. + +.. _class_Node_constant_NOTIFICATION_PHYSICS_PROCESS: + +.. rst-class:: classref-constant + +**NOTIFICATION_PHYSICS_PROCESS** = ``16`` + +Notification received every frame when the physics process flag is set (see :ref:`set_physics_process`). + +.. _class_Node_constant_NOTIFICATION_PROCESS: + +.. rst-class:: classref-constant + +**NOTIFICATION_PROCESS** = ``17`` + +Notification received every frame when the process flag is set (see :ref:`set_process`). + +.. _class_Node_constant_NOTIFICATION_PARENTED: + +.. rst-class:: classref-constant + +**NOTIFICATION_PARENTED** = ``18`` + +Notification received when a node is set as a child of another node. \ **Note:** This doesn't mean that a node entered the :ref:`SceneTree`. -- **NOTIFICATION_UNPARENTED** = **19** --- Notification received when a node is unparented (parent removed it from the list of children). +.. _class_Node_constant_NOTIFICATION_UNPARENTED: -- **NOTIFICATION_SCENE_INSTANTIATED** = **20** --- Notification received by scene owner when its scene is instantiated. +.. rst-class:: classref-constant -- **NOTIFICATION_DRAG_BEGIN** = **21** --- Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. +**NOTIFICATION_UNPARENTED** = ``19`` + +Notification received when a node is unparented (parent removed it from the list of children). + +.. _class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED: + +.. rst-class:: classref-constant + +**NOTIFICATION_SCENE_INSTANTIATED** = ``20`` + +Notification received by scene owner when its scene is instantiated. + +.. _class_Node_constant_NOTIFICATION_DRAG_BEGIN: + +.. rst-class:: classref-constant + +**NOTIFICATION_DRAG_BEGIN** = ``21`` + +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` that provides drag data (see :ref:`Control._get_drag_data`) or using :ref:`Control.force_drag`. Use :ref:`Viewport.gui_get_drag_data` to get the dragged data. -- **NOTIFICATION_DRAG_END** = **22** --- Notification received when a drag operation ends. +.. _class_Node_constant_NOTIFICATION_DRAG_END: + +.. rst-class:: classref-constant + +**NOTIFICATION_DRAG_END** = ``22`` + +Notification received when a drag operation ends. Use :ref:`Viewport.gui_is_drag_successful` to check if the drag succeeded. -- **NOTIFICATION_PATH_RENAMED** = **23** --- 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. +.. _class_Node_constant_NOTIFICATION_PATH_RENAMED: -- **NOTIFICATION_INTERNAL_PROCESS** = **25** --- Notification received every frame when the internal process flag is set (see :ref:`set_process_internal`). +.. rst-class:: classref-constant -- **NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = **26** --- Notification received every frame when the internal physics process flag is set (see :ref:`set_physics_process_internal`). +**NOTIFICATION_PATH_RENAMED** = ``23`` -- **NOTIFICATION_POST_ENTER_TREE** = **27** --- Notification received when the node is ready, just before :ref:`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'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_DISABLED** = **28** --- Notification received when the node is disabled. See :ref:`PROCESS_MODE_DISABLED`. +.. _class_Node_constant_NOTIFICATION_INTERNAL_PROCESS: -- **NOTIFICATION_ENABLED** = **29** --- Notification received when the node is enabled again after being disabled. See :ref:`PROCESS_MODE_DISABLED`. +.. rst-class:: classref-constant -- **NOTIFICATION_EDITOR_PRE_SAVE** = **9001** --- 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. +**NOTIFICATION_INTERNAL_PROCESS** = ``25`` -- **NOTIFICATION_EDITOR_POST_SAVE** = **9002** --- 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. +Notification received every frame when the internal process flag is set (see :ref:`set_process_internal`). -- **NOTIFICATION_WM_MOUSE_ENTER** = **1002** --- Notification received from the OS when the mouse enters the game window. +.. _class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS: + +.. rst-class:: classref-constant + +**NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = ``26`` + +Notification received every frame when the internal physics process flag is set (see :ref:`set_physics_process_internal`). + +.. _class_Node_constant_NOTIFICATION_POST_ENTER_TREE: + +.. rst-class:: classref-constant + +**NOTIFICATION_POST_ENTER_TREE** = ``27`` + +Notification received when the node is ready, just before :ref:`NOTIFICATION_READY` is received. Unlike the latter, it's sent every time the node enters tree, instead of only once. + +.. _class_Node_constant_NOTIFICATION_DISABLED: + +.. rst-class:: classref-constant + +**NOTIFICATION_DISABLED** = ``28`` + +Notification received when the node is disabled. See :ref:`PROCESS_MODE_DISABLED`. + +.. _class_Node_constant_NOTIFICATION_ENABLED: + +.. rst-class:: classref-constant + +**NOTIFICATION_ENABLED** = ``29`` + +Notification received when the node is enabled again after being disabled. See :ref:`PROCESS_MODE_DISABLED`. + +.. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE: + +.. rst-class:: classref-constant + +**NOTIFICATION_EDITOR_PRE_SAVE** = ``9001`` + +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. + +.. _class_Node_constant_NOTIFICATION_EDITOR_POST_SAVE: + +.. rst-class:: classref-constant + +**NOTIFICATION_EDITOR_POST_SAVE** = ``9002`` + +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. + +.. _class_Node_constant_NOTIFICATION_WM_MOUSE_ENTER: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_MOUSE_ENTER** = ``1002`` + +Notification received from the OS when the mouse enters the game window. Implemented on desktop and web platforms. -- **NOTIFICATION_WM_MOUSE_EXIT** = **1003** --- Notification received from the OS when the mouse leaves the game window. +.. _class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_MOUSE_EXIT** = ``1003`` + +Notification received from the OS when the mouse leaves the game window. Implemented on desktop and web platforms. -- **NOTIFICATION_WM_WINDOW_FOCUS_IN** = **1004** --- Notification received from the OS when the node's parent :ref:`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` is also emitted). +.. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN: -- **NOTIFICATION_WM_WINDOW_FOCUS_OUT** = **1005** --- Notification received from the OS when the node's parent :ref:`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` is also emitted). +.. rst-class:: classref-constant -- **NOTIFICATION_WM_CLOSE_REQUEST** = **1006** --- Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or :kbd:`Alt + F4`). +**NOTIFICATION_WM_WINDOW_FOCUS_IN** = ``1004`` + +Notification received from the OS when the node's parent :ref:`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` is also emitted). + +.. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_OUT: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_WINDOW_FOCUS_OUT** = ``1005`` + +Notification received from the OS when the node's parent :ref:`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` is also emitted). + +.. _class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_CLOSE_REQUEST** = ``1006`` + +Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or :kbd:`Alt + F4`). Implemented on desktop platforms. -- **NOTIFICATION_WM_GO_BACK_REQUEST** = **1007** --- Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). +.. _class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_GO_BACK_REQUEST** = ``1007`` + +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. -- **NOTIFICATION_WM_SIZE_CHANGED** = **1008** +.. _class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED: -- **NOTIFICATION_WM_DPI_CHANGE** = **1009** +.. rst-class:: classref-constant -- **NOTIFICATION_VP_MOUSE_ENTER** = **1010** --- Notification received when the mouse enters the viewport. +**NOTIFICATION_WM_SIZE_CHANGED** = ``1008`` -- **NOTIFICATION_VP_MOUSE_EXIT** = **1011** --- Notification received when the mouse leaves the viewport. -- **NOTIFICATION_OS_MEMORY_WARNING** = **2009** --- Notification received from the OS when the application is exceeding its allocated memory. + +.. _class_Node_constant_NOTIFICATION_WM_DPI_CHANGE: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_DPI_CHANGE** = ``1009`` + + + +.. _class_Node_constant_NOTIFICATION_VP_MOUSE_ENTER: + +.. rst-class:: classref-constant + +**NOTIFICATION_VP_MOUSE_ENTER** = ``1010`` + +Notification received when the mouse enters the viewport. + +.. _class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT: + +.. rst-class:: classref-constant + +**NOTIFICATION_VP_MOUSE_EXIT** = ``1011`` + +Notification received when the mouse leaves the viewport. + +.. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING: + +.. rst-class:: classref-constant + +**NOTIFICATION_OS_MEMORY_WARNING** = ``2009`` + +Notification received from the OS when the application is exceeding its allocated memory. Specific to the iOS platform. -- **NOTIFICATION_TRANSLATION_CHANGED** = **2010** --- 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_Node_constant_NOTIFICATION_TRANSLATION_CHANGED: -- **NOTIFICATION_WM_ABOUT** = **2011** --- Notification received from the OS when a request for "About" information is sent. +.. rst-class:: classref-constant + +**NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` + +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_Node_constant_NOTIFICATION_WM_ABOUT: + +.. rst-class:: classref-constant + +**NOTIFICATION_WM_ABOUT** = ``2011`` + +Notification received from the OS when a request for "About" information is sent. Specific to the macOS platform. -- **NOTIFICATION_CRASH** = **2012** --- Notification received from Godot's crash handler when the engine is about to crash. +.. _class_Node_constant_NOTIFICATION_CRASH: + +.. rst-class:: classref-constant + +**NOTIFICATION_CRASH** = ``2012`` + +Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms if the crash handler is enabled. -- **NOTIFICATION_OS_IME_UPDATE** = **2013** --- Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). +.. _class_Node_constant_NOTIFICATION_OS_IME_UPDATE: + +.. rst-class:: classref-constant + +**NOTIFICATION_OS_IME_UPDATE** = ``2013`` + +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. -- **NOTIFICATION_APPLICATION_RESUMED** = **2014** --- Notification received from the OS when the application is resumed. +.. _class_Node_constant_NOTIFICATION_APPLICATION_RESUMED: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_RESUMED** = ``2014`` + +Notification received from the OS when the application is resumed. Specific to the Android platform. -- **NOTIFICATION_APPLICATION_PAUSED** = **2015** --- Notification received from the OS when the application is paused. +.. _class_Node_constant_NOTIFICATION_APPLICATION_PAUSED: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_PAUSED** = ``2015`` + +Notification received from the OS when the application is paused. Specific to the Android platform. -- **NOTIFICATION_APPLICATION_FOCUS_IN** = **2016** --- 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. +.. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016`` + +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. -- **NOTIFICATION_APPLICATION_FOCUS_OUT** = **2017** --- 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. +.. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT: + +.. rst-class:: classref-constant + +**NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017`` + +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. -- **NOTIFICATION_TEXT_SERVER_CHANGED** = **2018** --- Notification received when text server is changed. +.. _class_Node_constant_NOTIFICATION_TEXT_SERVER_CHANGED: + +.. rst-class:: classref-constant + +**NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018`` + +Notification received when text server is changed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Node_property_editor_description: -- :ref:`String` **editor_description** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------------+ -| *Setter* | set_editor_description(value) | -+-----------+-------------------------------+ -| *Getter* | get_editor_description() | -+-----------+-------------------------------+ +:ref:`String` **editor_description** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_editor_description** **(** :ref:`String` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Node_property_multiplayer: -- :ref:`MultiplayerAPI` **multiplayer** +.. rst-class:: classref-property -+----------+-------------------+ -| *Getter* | get_multiplayer() | -+----------+-------------------+ +:ref:`MultiplayerAPI` **multiplayer** + +.. rst-class:: classref-property-setget + +- :ref:`MultiplayerAPI` **get_multiplayer** **(** **)** The :ref:`MultiplayerAPI` instance associated with this node. See :ref:`SceneTree.get_multiplayer`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_property_name: -- :ref:`StringName` **name** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_name(value) | -+----------+-----------------+ -| *Getter* | get_name() | -+----------+-----------------+ +:ref:`StringName` **name** + +.. rst-class:: classref-property-setget + +- void **set_name** **(** :ref:`StringName` value **)** +- :ref:`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. \ **Note:** Auto-generated names might include the ``@`` character, which is reserved for unique names when using :ref:`add_child`. When setting the name manually, any ``@`` will be removed. +.. rst-class:: classref-item-separator + ---- .. _class_Node_property_owner: -- :ref:`Node` **owner** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_owner(value) | -+----------+------------------+ -| *Getter* | get_owner() | -+----------+------------------+ +:ref:`Node` **owner** + +.. rst-class:: classref-property-setget + +- void **set_owner** **(** :ref:`Node` value **)** +- :ref:`Node` **get_owner** **(** **)** The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using :ref:`PackedScene`), all the nodes it owns will be saved with it. This allows for the creation of complex :ref:`SceneTree`\ s, with instancing and subinstancing. -\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`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 :ref:`add_child` is called without setting :ref:`owner`, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view. +\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`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 :ref:`add_child` is called without setting :ref:`owner`, the newly added **Node** will not be visible in the scene tree, though it will be visible in the 2D/3D view. + +.. rst-class:: classref-item-separator ---- .. _class_Node_property_process_mode: -- :ref:`ProcessMode` **process_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_process_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_process_mode() | -+-----------+-------------------------+ +:ref:`ProcessMode` **process_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_process_mode** **(** :ref:`ProcessMode` value **)** +- :ref:`ProcessMode` **get_process_mode** **(** **)** Can be used to pause or unpause the node, or make the node paused based on the :ref:`SceneTree`, or make it inherit the process mode from its parent (default). +.. rst-class:: classref-item-separator + ---- .. _class_Node_property_process_priority: -- :ref:`int` **process_priority** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_process_priority(value) | -+-----------+-----------------------------+ -| *Getter* | get_process_priority() | -+-----------+-----------------------------+ +:ref:`int` **process_priority** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_process_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_process_priority** **(** **)** The node's priority in the execution order of the enabled processing callbacks (i.e. :ref:`NOTIFICATION_PROCESS`, :ref:`NOTIFICATION_PHYSICS_PROCESS` and their internal counterparts). Nodes whose process priority value is *lower* will have their processing callbacks executed first. +.. rst-class:: classref-item-separator + ---- .. _class_Node_property_scene_file_path: -- :ref:`String` **scene_file_path** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_scene_file_path(value) | -+----------+----------------------------+ -| *Getter* | get_scene_file_path() | -+----------+----------------------------+ +:ref:`String` **scene_file_path** + +.. rst-class:: classref-property-setget + +- void **set_scene_file_path** **(** :ref:`String` value **)** +- :ref:`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` (e.g. ``res://levels/1.tscn``). Otherwise, :ref:`scene_file_path` is set to an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_Node_property_unique_name_in_owner: -- :ref:`bool` **unique_name_in_owner** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_unique_name_in_owner(value) | -+-----------+---------------------------------+ -| *Getter* | is_unique_name_in_owner() | -+-----------+---------------------------------+ +:ref:`bool` **unique_name_in_owner** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_unique_name_in_owner** **(** :ref:`bool` value **)** +- :ref:`bool` **is_unique_name_in_owner** **(** **)** Sets this node's name as a unique name in its :ref:`owner`. This allows the node to be accessed as ``%Name`` instead of the full path, from any node within that scene. 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Node_method__enter_tree: -- void **_enter_tree** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_enter_tree** **(** **)** |virtual| Called when the node enters the :ref:`SceneTree` (e.g. upon instancing, scene changing, or after calling :ref:`add_child` in a script). If the node has children, its :ref:`_enter_tree` callback will be called first, and then that of the children. Corresponds to the :ref:`NOTIFICATION_ENTER_TREE` notification in :ref:`Object._notification`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method__exit_tree: -- void **_exit_tree** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_exit_tree** **(** **)** |virtual| Called when the node is about to leave the :ref:`SceneTree` (e.g. upon freeing, scene changing, or after calling :ref:`remove_child` in a script). If the node has children, its :ref:`_exit_tree` callback will be called last, after all its children have left the tree. Corresponds to the :ref:`NOTIFICATION_EXIT_TREE` notification in :ref:`Object._notification` and signal :ref:`tree_exiting`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method__get_configuration_warnings: -- :ref:`PackedStringArray` **_get_configuration_warnings** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_configuration_warnings** **(** **)** |virtual| |const| 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. @@ -731,11 +1048,15 @@ Returning an empty array produces no warnings. Call :ref:`update_configuration_warnings` when the warnings need to be updated for this node. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method__input: -- void **_input** **(** :ref:`InputEvent` event **)** |virtual| +.. rst-class:: classref-method + +void **_input** **(** :ref:`InputEvent` event **)** |virtual| Called when there is an input event. The input event propagates up through the node tree until a node consumes it. @@ -747,11 +1068,15 @@ For gameplay input, :ref:`_unhandled_input` \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method__physics_process: -- void **_physics_process** **(** :ref:`float` delta **)** |virtual| +.. rst-class:: classref-method + +void **_physics_process** **(** :ref:`float` delta **)** |virtual| 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. @@ -761,11 +1086,15 @@ Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS` delta **)** |virtual| +.. rst-class:: classref-method + +void **_process** **(** :ref:`float` delta **)** |virtual| 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. @@ -775,11 +1104,15 @@ Corresponds to the :ref:`NOTIFICATION_PROCESS` callbacks get triggered first, and the parent node will receive the ready notification afterwards. @@ -789,11 +1122,15 @@ Usually used for initialization. For even earlier initialization, :ref:`Object._ \ **Note:** :ref:`_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`, which may be called anywhere before adding the node again. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method__shortcut_input: -- void **_shortcut_input** **(** :ref:`InputEvent` event **)** |virtual| +.. rst-class:: classref-method + +void **_shortcut_input** **(** :ref:`InputEvent` event **)** |virtual| Called when an :ref:`InputEventKey` or :ref:`InputEventShortcut` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. The input event propagates up through the node tree until a node consumes it. @@ -805,11 +1142,15 @@ This method can be used to handle shortcuts. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method__unhandled_input: -- void **_unhandled_input** **(** :ref:`InputEvent` event **)** |virtual| +.. rst-class:: classref-method + +void **_unhandled_input** **(** :ref:`InputEvent` event **)** |virtual| Called when an :ref:`InputEvent` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. The input event propagates up through the node tree until a node consumes it. @@ -821,11 +1162,15 @@ For gameplay input, this and :ref:`_unhandled_key_input` event **)** |virtual| +.. rst-class:: classref-method + +void **_unhandled_key_input** **(** :ref:`InputEvent` event **)** |virtual| Called when an :ref:`InputEventKey` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. The input event propagates up through the node tree until a node consumes it. @@ -841,11 +1186,15 @@ This method also performs better than :ref:`_unhandled_input` node, :ref:`bool` force_readable_name=false, :ref:`InternalMode` internal=0 **)** +.. rst-class:: classref-method + +void **add_child** **(** :ref:`Node` node, :ref:`bool` force_readable_name=false, :ref:`InternalMode` internal=0 **)** 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. @@ -878,13 +1227,17 @@ If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED` instead of this method. -\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`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 :ref:`add_child` is called without setting :ref:`owner`, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view. +\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`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 :ref:`add_child` is called without setting :ref:`owner`, the newly added **Node** will not be visible in the scene tree, though it will be visible in the 2D/3D view. + +.. rst-class:: classref-item-separator ---- .. _class_Node_method_add_sibling: -- void **add_sibling** **(** :ref:`Node` sibling, :ref:`bool` force_readable_name=false **)** +.. rst-class:: classref-method + +void **add_sibling** **(** :ref:`Node` sibling, :ref:`bool` force_readable_name=false **)** Adds a ``sibling`` node to current's node parent, at the same level as that node, right below it. @@ -894,11 +1247,15 @@ Use :ref:`add_child` instead of this method if you \ **Note:** If this node is internal, the new sibling will be internal too (see ``internal`` parameter in :ref:`add_child`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_add_to_group: -- void **add_to_group** **(** :ref:`StringName` group, :ref:`bool` persistent=false **)** +.. rst-class:: classref-method + +void **add_to_group** **(** :ref:`StringName` group, :ref:`bool` persistent=false **)** 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`). See notes in the description, and the group methods in :ref:`SceneTree`. @@ -906,19 +1263,27 @@ The ``persistent`` option is used when packing node to :ref:`PackedScene` **can_process** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_process** **(** **)** |const| Returns ``true`` if the node can process while the scene tree is paused (see :ref:`process_mode`). Always returns ``true`` if the scene tree is not paused, and ``false`` if the node is not in the tree. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_create_tween: -- :ref:`Tween` **create_tween** **(** **)** +.. rst-class:: classref-method + +:ref:`Tween` **create_tween** **(** **)** Creates a new :ref:`Tween` and binds it to this node. This is equivalent of doing: @@ -935,11 +1300,15 @@ Creates a new :ref:`Tween` and binds it to this node. This is equiv +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_duplicate: -- :ref:`Node` **duplicate** **(** :ref:`int` flags=15 **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **duplicate** **(** :ref:`int` flags=15 **)** |const| Duplicates the node, returning a new node. @@ -947,11 +1316,15 @@ You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags` method). In that case, the node will be duplicated without a script. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_find_child: -- :ref:`Node` **find_child** **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **find_child** **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match`. @@ -961,17 +1334,21 @@ If ``recursive`` is ``true``, all child nodes are included, even if deeply neste If ``owned`` is ``true``, this method only finds nodes who have an assigned :ref:`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. +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` with unique names instead (see :ref:`unique_name_in_owner`), or caching the node references into variable. \ **Note:** To find all descendant nodes matching a pattern or a class type, see :ref:`find_children`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_find_children: -- :ref:`Node[]` **find_children** **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| +.. rst-class:: classref-method + +:ref:`Node[]` **find_children** **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. @@ -989,11 +1366,15 @@ Returns an empty array if no matching nodes are found. \ **Note:** If you only want to find the first descendant node that matches a pattern, see :ref:`find_child`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_find_parent: -- :ref:`Node` **find_parent** **(** :ref:`String` pattern **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **find_parent** **(** :ref:`String` pattern **)** |const| Finds the first parent of the current node whose name matches ``pattern`` as in :ref:`String.match`. @@ -1001,11 +1382,15 @@ Finds the first parent of the current node whose name matches ``pattern`` as in \ **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` with unique names instead (see :ref:`unique_name_in_owner`), or caching the node references into variable. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_child: -- :ref:`Node` **get_child** **(** :ref:`int` idx, :ref:`bool` include_internal=false **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **get_child** **(** :ref:`int` idx, :ref:`bool` include_internal=false **)** |const| Returns a child node by its index (see :ref:`get_child_count`). This method is often used for iterating all children of a node. @@ -1015,31 +1400,43 @@ If ``include_internal`` is ``false``, internal children are skipped (see ``inter To access a child node via its name, use :ref:`get_node`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_child_count: -- :ref:`int` **get_child_count** **(** :ref:`bool` include_internal=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_child_count** **(** :ref:`bool` include_internal=false **)** |const| Returns the number of child nodes. If ``include_internal`` is ``false``, internal children aren't counted (see ``internal`` parameter in :ref:`add_child`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_children: -- :ref:`Node[]` **get_children** **(** :ref:`bool` include_internal=false **)** |const| +.. rst-class:: classref-method + +:ref:`Node[]` **get_children** **(** :ref:`bool` include_internal=false **)** |const| Returns an array of references to node's children. If ``include_internal`` is ``false``, the returned array won't include internal children (see ``internal`` parameter in :ref:`add_child`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_groups: -- :ref:`StringName[]` **get_groups** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName[]` **get_groups** **(** **)** |const| Returns an array listing the groups that the node is a member of. @@ -1070,29 +1467,41 @@ Returns an array listing the groups that the node is a member of. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_index: -- :ref:`int` **get_index** **(** :ref:`bool` include_internal=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_index** **(** :ref:`bool` include_internal=false **)** |const| Returns the node's order in the scene tree branch. For example, if called on the first child node the position is ``0``. 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`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_multiplayer_authority: -- :ref:`int` **get_multiplayer_authority** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_multiplayer_authority** **(** **)** |const| Returns the peer ID of the multiplayer authority for this node. See :ref:`set_multiplayer_authority`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_node: -- :ref:`Node` **get_node** **(** :ref:`NodePath` path **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **get_node** **(** :ref:`NodePath` path **)** |const| Fetches a node. The :ref:`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 on a null instance." error. @@ -1132,15 +1541,19 @@ Possible paths are: +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_node_and_resource: -- :ref:`Array` **get_node_and_resource** **(** :ref:`NodePath` path **)** +.. rst-class:: classref-method + +:ref:`Array` **get_node_and_resource** **(** :ref:`NodePath` path **)** Fetches a node and one of its resources as specified by the :ref:`NodePath`'s subname (e.g. ``Area2D/CollisionShape2D:shape``). If several nested resources are specified in the :ref:`NodePath`, the last one will be fetched. -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` (or ``null`` if not found), and the third index is the remaining :ref:`NodePath`, if any. +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` (or ``null`` if not found), and the third index is the remaining :ref:`NodePath`, if any. For example, assuming that ``Area2D/CollisionShape2D`` is a valid node and that its ``shape`` property has been assigned a :ref:`RectangleShape2D` resource, one could have this kind of output: @@ -1161,239 +1574,359 @@ For example, assuming that ``Area2D/CollisionShape2D`` is a valid node and that +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_node_or_null: -- :ref:`Node` **get_node_or_null** **(** :ref:`NodePath` path **)** |const| +.. rst-class:: classref-method -Similar to :ref:`get_node`, but does not log an error if ``path`` does not point to a valid ``Node``. +:ref:`Node` **get_node_or_null** **(** :ref:`NodePath` path **)** |const| + +Similar to :ref:`get_node`, but does not log an error if ``path`` does not point to a valid **Node**. + +.. rst-class:: classref-item-separator ---- .. _class_Node_method_get_parent: -- :ref:`Node` **get_parent** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **get_parent** **(** **)** |const| Returns the parent node of the current node, or ``null`` if the node lacks a parent. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_path: -- :ref:`NodePath` **get_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_path** **(** **)** |const| 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`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_path_to: -- :ref:`NodePath` **get_path_to** **(** :ref:`Node` node **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_path_to** **(** :ref:`Node` node, :ref:`bool` use_unique_path=false **)** |const| Returns the relative :ref:`NodePath` from this node to the specified ``node``. Both nodes must be in the same scene or the function will fail. +If ``use_unique_path`` is ``true``, returns the shortest path considering unique node. + +\ **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 + ---- .. _class_Node_method_get_physics_process_delta_time: -- :ref:`float` **get_physics_process_delta_time** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_physics_process_delta_time** **(** **)** |const| Returns the time elapsed (in seconds) since the last physics-bound frame (see :ref:`_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`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_process_delta_time: -- :ref:`float` **get_process_delta_time** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_process_delta_time** **(** **)** |const| Returns the time elapsed (in seconds) since the last process callback. This value may vary from frame to frame. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_scene_instance_load_placeholder: -- :ref:`bool` **get_scene_instance_load_placeholder** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_scene_instance_load_placeholder** **(** **)** |const| Returns ``true`` if this is an instance load placeholder. See :ref:`InstancePlaceholder`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_tree: -- :ref:`SceneTree` **get_tree** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SceneTree` **get_tree** **(** **)** |const| Returns the :ref:`SceneTree` that contains this node. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_get_viewport: -- :ref:`Viewport` **get_viewport** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Viewport` **get_viewport** **(** **)** |const| Returns the node's :ref:`Viewport`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_has_node: -- :ref:`bool` **has_node** **(** :ref:`NodePath` path **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_node** **(** :ref:`NodePath` path **)** |const| Returns ``true`` if the node that the :ref:`NodePath` points to exists. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_has_node_and_resource: -- :ref:`bool` **has_node_and_resource** **(** :ref:`NodePath` path **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_node_and_resource** **(** :ref:`NodePath` path **)** |const| Returns ``true`` if the :ref:`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` type (e.g. nodes or primitive math types) are not considered resources. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_ancestor_of: -- :ref:`bool` **is_ancestor_of** **(** :ref:`Node` node **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_ancestor_of** **(** :ref:`Node` node **)** |const| Returns ``true`` if the given node is a direct or indirect child of the current node. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_displayed_folded: -- :ref:`bool` **is_displayed_folded** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_displayed_folded** **(** **)** |const| Returns ``true`` if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_editable_instance: -- :ref:`bool` **is_editable_instance** **(** :ref:`Node` node **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_editable_instance** **(** :ref:`Node` node **)** |const| Returns ``true`` if ``node`` has editable children enabled relative to this node. This method is only intended for use with editor tooling. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_greater_than: -- :ref:`bool` **is_greater_than** **(** :ref:`Node` node **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_greater_than** **(** :ref:`Node` node **)** |const| Returns ``true`` if the given node occurs later in the scene hierarchy than the current node. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_in_group: -- :ref:`bool` **is_in_group** **(** :ref:`StringName` group **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_in_group** **(** :ref:`StringName` group **)** |const| Returns ``true`` if this node is in the specified group. See notes in the description, and the group methods in :ref:`SceneTree`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_inside_tree: -- :ref:`bool` **is_inside_tree** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_inside_tree** **(** **)** |const| Returns ``true`` if this node is currently inside a :ref:`SceneTree`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_multiplayer_authority: -- :ref:`bool` **is_multiplayer_authority** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_multiplayer_authority** **(** **)** |const| Returns ``true`` if the local system is the multiplayer authority of this node. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_physics_processing: -- :ref:`bool` **is_physics_processing** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_physics_processing** **(** **)** |const| Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_physics_processing_internal: -- :ref:`bool` **is_physics_processing_internal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_physics_processing_internal** **(** **)** |const| Returns ``true`` if internal physics processing is enabled (see :ref:`set_physics_process_internal`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_processing: -- :ref:`bool` **is_processing** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_processing** **(** **)** |const| Returns ``true`` if processing is enabled (see :ref:`set_process`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_processing_input: -- :ref:`bool` **is_processing_input** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_processing_input** **(** **)** |const| Returns ``true`` if the node is processing input (see :ref:`set_process_input`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_processing_internal: -- :ref:`bool` **is_processing_internal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_processing_internal** **(** **)** |const| Returns ``true`` if internal processing is enabled (see :ref:`set_process_internal`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_processing_shortcut_input: -- :ref:`bool` **is_processing_shortcut_input** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_processing_shortcut_input** **(** **)** |const| Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shortcut_input`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_processing_unhandled_input: -- :ref:`bool` **is_processing_unhandled_input** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_processing_unhandled_input** **(** **)** |const| Returns ``true`` if the node is processing unhandled input (see :ref:`set_process_unhandled_input`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_is_processing_unhandled_key_input: -- :ref:`bool` **is_processing_unhandled_key_input** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_processing_unhandled_key_input** **(** **)** |const| Returns ``true`` if the node is processing unhandled key input (see :ref:`set_process_unhandled_key_input`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_move_child: -- void **move_child** **(** :ref:`Node` child_node, :ref:`int` to_index **)** +.. rst-class:: classref-method + +void **move_child** **(** :ref:`Node` child_node, :ref:`int` to_index **)** 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. \ **Note:** Internal children can only be moved within their expected "internal range" (see ``internal`` parameter in :ref:`add_child`). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_print_orphan_nodes: -- void **print_orphan_nodes** **(** **)** +.. rst-class:: classref-method + +void **print_orphan_nodes** **(** **)** |static| Prints all orphan nodes (nodes outside the :ref:`SceneTree`). Used for debugging. \ **Note:** :ref:`print_orphan_nodes` only works in debug builds. When called in a project exported in release mode, :ref:`print_orphan_nodes` will not print anything. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_print_tree: -- void **print_tree** **(** **)** +.. rst-class:: classref-method + +void **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` function. @@ -1408,11 +1941,15 @@ Prints the tree to stdout. Used mainly for debugging purposes. This version disp TheGame/SplashScreen TheGame/SplashScreen/Camera2D +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_print_tree_pretty: -- void **print_tree_pretty** **(** **)** +.. rst-class:: classref-method + +void **print_tree_pretty** **(** **)** Similar to :ref:`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. @@ -1427,53 +1964,77 @@ Similar to :ref:`print_tree`, this prints the tree ┖╴SplashScreen ┖╴Camera2D +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_propagate_call: -- void **propagate_call** **(** :ref:`StringName` method, :ref:`Array` args=[], :ref:`bool` parent_first=false **)** +.. rst-class:: classref-method + +void **propagate_call** **(** :ref:`StringName` method, :ref:`Array` args=[], :ref:`bool` parent_first=false **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_propagate_notification: -- void **propagate_notification** **(** :ref:`int` what **)** +.. rst-class:: classref-method + +void **propagate_notification** **(** :ref:`int` what **)** Notifies the current node and all its children recursively by calling :ref:`Object.notification` on all of them. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_queue_free: -- void **queue_free** **(** **)** +.. rst-class:: classref-method + +void **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. This method ensures it's safe to delete the node, contrary to :ref:`Object.free`. Use :ref:`Object.is_queued_for_deletion` to check whether a node will be deleted at the end of the frame. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_remove_child: -- void **remove_child** **(** :ref:`Node` node **)** +.. rst-class:: classref-method + +void **remove_child** **(** :ref:`Node` node **)** Removes a child node. The node is NOT deleted and must be deleted manually. \ **Note:** This function may set the :ref:`owner` of the removed Node (or its descendants) to be ``null``, if that :ref:`owner` is no longer a parent or ancestor. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_remove_from_group: -- void **remove_from_group** **(** :ref:`StringName` group **)** +.. rst-class:: classref-method + +void **remove_from_group** **(** :ref:`StringName` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_replace_by: -- void **replace_by** **(** :ref:`Node` node, :ref:`bool` keep_groups=false **)** +.. rst-class:: classref-method + +void **replace_by** **(** :ref:`Node` node, :ref:`bool` keep_groups=false **)** Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost. @@ -1483,29 +2044,41 @@ If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that th \ **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`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_request_ready: -- void **request_ready** **(** **)** +.. rst-class:: classref-method + +void **request_ready** **(** **)** 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`). ``_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). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_rpc: -- :ref:`Error` **rpc** **(** :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Error` **rpc** **(** :ref:`StringName` method, ... **)** |vararg| 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`, including the exact same node name. Behavior depends on the RPC configuration for the given method, see :ref:`rpc_config`. Methods are not exposed to RPCs by default. Returns ``null``. \ **Note:** You can only safely use RPCs on clients after you received the ``connected_to_server`` signal from the :ref:`MultiplayerAPI`. You also need to keep track of the connection state, either by the :ref:`MultiplayerAPI` signals like ``server_disconnected`` or by checking ``get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED``. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_rpc_config: -- void **rpc_config** **(** :ref:`StringName` method, :ref:`Variant` config **)** +.. rst-class:: classref-method + +void **rpc_config** **(** :ref:`StringName` method, :ref:`Variant` config **)** Changes the RPC mode for the given ``method`` with the given ``config`` which should be ``null`` (to disable) or a :ref:`Dictionary` in the form: @@ -1520,119 +2093,175 @@ Changes the RPC mode for the given ``method`` with the given ``config`` which sh See :ref:`RPCMode` and :ref:`TransferMode`. An alternative is annotating methods and properties with the corresponding annotation (``@rpc(any)``, ``@rpc(authority)``). By default, methods are not exposed to networking (and RPCs). +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_rpc_id: -- :ref:`Error` **rpc_id** **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method + +:ref:`Error` **rpc_id** **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| Sends a :ref:`rpc` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer`). Returns ``null``. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_display_folded: -- void **set_display_folded** **(** :ref:`bool` fold **)** +.. rst-class:: classref-method + +void **set_display_folded** **(** :ref:`bool` fold **)** Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_editable_instance: -- void **set_editable_instance** **(** :ref:`Node` node, :ref:`bool` is_editable **)** +.. rst-class:: classref-method + +void **set_editable_instance** **(** :ref:`Node` node, :ref:`bool` is_editable **)** Sets the editable children state of ``node`` relative to this node. This method is only intended for use with editor tooling. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_multiplayer_authority: -- void **set_multiplayer_authority** **(** :ref:`int` id, :ref:`bool` recursive=true **)** +.. rst-class:: classref-method + +void **set_multiplayer_authority** **(** :ref:`int` id, :ref:`bool` recursive=true **)** 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` and the :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_physics_process: -- void **set_physics_process** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_physics_process** **(** :ref:`bool` enable **)** Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PHYSICS_PROCESS` at a fixed (usually 60 FPS, see :ref:`Engine.physics_ticks_per_second` to change) interval (and the :ref:`_physics_process` callback will be called if exists). Enabled automatically if :ref:`_physics_process` is overridden. Any calls to this before :ref:`_ready` will be ignored. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_physics_process_internal: -- void **set_physics_process_internal** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_physics_process_internal** **(** :ref:`bool` enable **)** Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_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`). Only useful for advanced uses to manipulate built-in nodes' behavior. \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_process: -- void **set_process** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_process** **(** :ref:`bool` enable **)** Enables or disables processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PROCESS` on every drawn frame (and the :ref:`_process` callback will be called if exists). Enabled automatically if :ref:`_process` is overridden. Any calls to this before :ref:`_ready` will be ignored. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_process_input: -- void **set_process_input** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_process_input** **(** :ref:`bool` enable **)** Enables or disables input processing. This is not required for GUI controls! Enabled automatically if :ref:`_input` is overridden. Any calls to this before :ref:`_ready` will be ignored. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_process_internal: -- void **set_process_internal** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_process_internal** **(** :ref:`bool` enable **)** Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal :ref:`_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`). Only useful for advanced uses to manipulate built-in nodes' behavior. \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_process_shortcut_input: -- void **set_process_shortcut_input** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_process_shortcut_input** **(** :ref:`bool` enable **)** Enables shortcut processing. Enabled automatically if :ref:`_shortcut_input` is overridden. Any calls to this before :ref:`_ready` will be ignored. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_process_unhandled_input: -- void **set_process_unhandled_input** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_process_unhandled_input** **(** :ref:`bool` enable **)** 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`). Enabled automatically if :ref:`_unhandled_input` is overridden. Any calls to this before :ref:`_ready` will be ignored. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_process_unhandled_key_input: -- void **set_process_unhandled_key_input** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_process_unhandled_key_input** **(** :ref:`bool` enable **)** Enables unhandled key input processing. Enabled automatically if :ref:`_unhandled_key_input` is overridden. Any calls to this before :ref:`_ready` will be ignored. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_set_scene_instance_load_placeholder: -- void **set_scene_instance_load_placeholder** **(** :ref:`bool` load_placeholder **)** +.. rst-class:: classref-method + +void **set_scene_instance_load_placeholder** **(** :ref:`bool` load_placeholder **)** Sets whether this is an instance load placeholder. See :ref:`InstancePlaceholder`. +.. rst-class:: classref-item-separator + ---- .. _class_Node_method_update_configuration_warnings: -- void **update_configuration_warnings** **(** **)** +.. rst-class:: classref-method + +void **update_configuration_warnings** **(** **)** Updates the warning displayed for this node in the Scene Dock. diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index 98d526fee..0855e2a99 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -16,11 +16,15 @@ Node2D A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. +.. rst-class:: classref-introduction-group + Description ----------- A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,355 +32,383 @@ Tutorials - `All 2D Demos `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`global_position` | | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`global_rotation` | | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`global_scale` | | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`global_skew` | | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Transform2D` | :ref:`global_transform` | | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`rotation` | ``0.0`` | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`skew` | ``0.0`` | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Transform2D` | :ref:`transform` | | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`y_sort_enabled` | ``false`` | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`z_as_relative` | ``true`` | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`z_index` | ``0`` | -+---------------------------------------+-----------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`global_position` | | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`global_rotation` | | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`global_scale` | | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`global_skew` | | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Transform2D` | :ref:`global_transform` | | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`rotation` | ``0.0`` | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`skew` | ``0.0`` | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Transform2D` | :ref:`transform` | | + +---------------------------------------+-----------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_scale` **(** :ref:`Vector2` ratio **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angle_to` **(** :ref:`Vector2` point **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`get_relative_transform_to_parent` **(** :ref:`Node` parent **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_translate` **(** :ref:`Vector2` offset **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`look_at` **(** :ref:`Vector2` point **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_local_x` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_local_y` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate` **(** :ref:`float` radians **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`to_global` **(** :ref:`Vector2` local_point **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`to_local` **(** :ref:`Vector2` global_point **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`translate` **(** :ref:`Vector2` offset **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_scale` **(** :ref:`Vector2` ratio **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_angle_to` **(** :ref:`Vector2` point **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_relative_transform_to_parent` **(** :ref:`Node` parent **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_translate` **(** :ref:`Vector2` offset **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`look_at` **(** :ref:`Vector2` point **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_local_x` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_local_y` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate` **(** :ref:`float` radians **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`to_global` **(** :ref:`Vector2` local_point **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`to_local` **(** :ref:`Vector2` global_point **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`translate` **(** :ref:`Vector2` offset **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Node2D_property_global_position: -- :ref:`Vector2` **global_position** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_global_position(value) | -+----------+----------------------------+ -| *Getter* | get_global_position() | -+----------+----------------------------+ +:ref:`Vector2` **global_position** + +.. rst-class:: classref-property-setget + +- void **set_global_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_global_position** **(** **)** Global position. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_global_rotation: -- :ref:`float` **global_rotation** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_global_rotation(value) | -+----------+----------------------------+ -| *Getter* | get_global_rotation() | -+----------+----------------------------+ +:ref:`float` **global_rotation** + +.. rst-class:: classref-property-setget + +- void **set_global_rotation** **(** :ref:`float` value **)** +- :ref:`float` **get_global_rotation** **(** **)** Global rotation in radians. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_global_scale: -- :ref:`Vector2` **global_scale** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_global_scale(value) | -+----------+-------------------------+ -| *Getter* | get_global_scale() | -+----------+-------------------------+ +:ref:`Vector2` **global_scale** + +.. rst-class:: classref-property-setget + +- void **set_global_scale** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_global_scale** **(** **)** Global scale. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_global_skew: -- :ref:`float` **global_skew** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_global_skew(value) | -+----------+------------------------+ -| *Getter* | get_global_skew() | -+----------+------------------------+ +:ref:`float` **global_skew** + +.. rst-class:: classref-property-setget + +- void **set_global_skew** **(** :ref:`float` value **)** +- :ref:`float` **get_global_skew** **(** **)** Global skew in radians. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_global_transform: -- :ref:`Transform2D` **global_transform** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_global_transform(value) | -+----------+-----------------------------+ -| *Getter* | get_global_transform() | -+----------+-----------------------------+ +:ref:`Transform2D` **global_transform** + +.. rst-class:: classref-property-setget + +- void **set_global_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_global_transform** **(** **)** Global :ref:`Transform2D`. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_position(value) | -+-----------+---------------------+ -| *Getter* | get_position() | -+-----------+---------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position** **(** **)** Position, relative to the node's parent. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_rotation: -- :ref:`float` **rotation** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_rotation(value) | -+-----------+---------------------+ -| *Getter* | get_rotation() | -+-----------+---------------------+ +:ref:`float` **rotation** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_rotation** **(** :ref:`float` value **)** +- :ref:`float` **get_rotation** **(** **)** Rotation in radians, relative to the node's parent. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_scale: -- :ref:`Vector2` **scale** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------+ -| *Setter* | set_scale(value) | -+-----------+-------------------+ -| *Getter* | get_scale() | -+-----------+-------------------+ +:ref:`Vector2` **scale** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_scale** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_scale** **(** **)** The node's scale. Unscaled value: ``(1, 1)``. \ **Note:** Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_skew: -- :ref:`float` **skew** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.0`` | -+-----------+-----------------+ -| *Setter* | set_skew(value) | -+-----------+-----------------+ -| *Getter* | get_skew() | -+-----------+-----------------+ +:ref:`float` **skew** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_skew** **(** :ref:`float` value **)** +- :ref:`float` **get_skew** **(** **)** Slants the node. \ **Note:** Skew is X axis only. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_property_transform: -- :ref:`Transform2D` **transform** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_transform(value) | -+----------+----------------------+ -| *Getter* | get_transform() | -+----------+----------------------+ +:ref:`Transform2D` **transform** + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_transform** **(** **)** Local :ref:`Transform2D`. ----- - -.. _class_Node2D_property_y_sort_enabled: - -- :ref:`bool` **y_sort_enabled** - -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_y_sort_enabled(value) | -+-----------+---------------------------+ -| *Getter* | 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 :ref:`CanvasItem`. - -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. +.. rst-class:: classref-section-separator ---- -.. _class_Node2D_property_z_as_relative: - -- :ref:`bool` **z_as_relative** - -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_z_as_relative(value) | -+-----------+--------------------------+ -| *Getter* | 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. - ----- - -.. _class_Node2D_property_z_index: - -- :ref:`int` **z_index** - -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_z_index(value) | -+-----------+--------------------+ -| *Getter* | get_z_index() | -+-----------+--------------------+ - -Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between :ref:`RenderingServer.CANVAS_ITEM_Z_MIN` and :ref:`RenderingServer.CANVAS_ITEM_Z_MAX` (inclusive). +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Node2D_method_apply_scale: -- void **apply_scale** **(** :ref:`Vector2` ratio **)** +.. rst-class:: classref-method + +void **apply_scale** **(** :ref:`Vector2` ratio **)** Multiplies the current scale by the ``ratio`` vector. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_get_angle_to: -- :ref:`float` **get_angle_to** **(** :ref:`Vector2` point **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_angle_to** **(** :ref:`Vector2` point **)** |const| Returns the angle between the node and the ``point`` in radians. \ `Illustration of the returned angle. `__ +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_get_relative_transform_to_parent: -- :ref:`Transform2D` **get_relative_transform_to_parent** **(** :ref:`Node` parent **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_relative_transform_to_parent** **(** :ref:`Node` parent **)** |const| Returns the :ref:`Transform2D` relative to this node's parent. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_global_translate: -- void **global_translate** **(** :ref:`Vector2` offset **)** +.. rst-class:: classref-method + +void **global_translate** **(** :ref:`Vector2` offset **)** Adds the ``offset`` vector to the node's global position. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_look_at: -- void **look_at** **(** :ref:`Vector2` point **)** +.. rst-class:: classref-method + +void **look_at** **(** :ref:`Vector2` point **)** Rotates the node so it points towards the ``point``, which is expected to use global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_move_local_x: -- void **move_local_x** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** +.. rst-class:: classref-method + +void **move_local_x** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** Applies a local translation on the node's X axis based on the :ref:`Node._process`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_move_local_y: -- void **move_local_y** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** +.. rst-class:: classref-method + +void **move_local_y** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** Applies a local translation on the node's Y axis based on the :ref:`Node._process`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_rotate: -- void **rotate** **(** :ref:`float` radians **)** +.. rst-class:: classref-method + +void **rotate** **(** :ref:`float` radians **)** Applies a rotation to the node, in radians, starting from its current rotation. +.. rst-class:: classref-item-separator + ---- .. _class_Node2D_method_to_global: -- :ref:`Vector2` **to_global** **(** :ref:`Vector2` local_point **)** |const| +.. rst-class:: classref-method -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. +:ref:`Vector2` **to_global** **(** :ref:`Vector2` local_point **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Node2D_method_to_local: -- :ref:`Vector2` **to_local** **(** :ref:`Vector2` global_point **)** |const| +.. rst-class:: classref-method -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. +:ref:`Vector2` **to_local** **(** :ref:`Vector2` global_point **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Node2D_method_translate: -- void **translate** **(** :ref:`Vector2` offset **)** +.. rst-class:: classref-method + +void **translate** **(** :ref:`Vector2` offset **)** Translates the node by the given ``offset`` in local coordinates. diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index af30c0e12..4b815ac6d 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -16,15 +16,19 @@ Node3D Most basic 3D game object, parent of all 3D-related nodes. +.. rst-class:: classref-introduction-group + Description ----------- -Most basic 3D game object, with a 3D :ref:`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 3D :ref:`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. +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. \ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg_to_rad`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,323 +36,411 @@ Tutorials - `All 3D Demos `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Basis` | :ref:`basis` | | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`global_position` | | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`global_rotation` | | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`global_transform` | | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Quaternion` | :ref:`quaternion` | | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`rotation` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`RotationEditMode` | :ref:`rotation_edit_mode` | ``0`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`EulerOrder` | :ref:`rotation_order` | ``2`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`scale` | ``Vector3(1, 1, 1)`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`top_level` | ``false`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`NodePath` | :ref:`visibility_parent` | ``NodePath("")`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`visible` | ``true`` | -+-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Basis` | :ref:`basis` | | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`global_position` | | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`global_rotation` | | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`global_transform` | | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Quaternion` | :ref:`quaternion` | | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`rotation` | ``Vector3(0, 0, 0)`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`RotationEditMode` | :ref:`rotation_edit_mode` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`EulerOrder` | :ref:`rotation_order` | ``2`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`scale` | ``Vector3(1, 1, 1)`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`top_level` | ``false`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`NodePath` | :ref:`visibility_parent` | ``NodePath("")`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`visible` | ``true`` | + +-------------------------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_gizmo` **(** :ref:`Node3DGizmo` gizmo **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_gizmos` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_subgizmo_selection` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_update_transform` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node3DGizmo[]` | :ref:`get_gizmos` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node3D` | :ref:`get_parent_node_3d` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World3D` | :ref:`get_world_3d` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_scale` **(** :ref:`Vector3` scale **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hide` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_scale_disabled` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`look_at_from_position` **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`orthonormalize` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_object_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_x` **(** :ref:`float` angle **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_y` **(** :ref:`float` angle **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_z` **(** :ref:`float` angle **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scale_object_local` **(** :ref:`Vector3` scale **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_scale` **(** :ref:`bool` disable **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_identity` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_subgizmo_selection` **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`show` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`to_global` **(** :ref:`Vector3` local_point **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`to_local` **(** :ref:`Vector3` global_point **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`translate` **(** :ref:`Vector3` offset **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`translate_object_local` **(** :ref:`Vector3` offset **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_gizmos` **(** **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_gizmo` **(** :ref:`Node3DGizmo` gizmo **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_gizmos` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_subgizmo_selection` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_transform` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3DGizmo[]` | :ref:`get_gizmos` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`get_parent_node_3d` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World3D` | :ref:`get_world_3d` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_scale` **(** :ref:`Vector3` scale **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hide` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_scale_disabled` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`look_at_from_position` **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`orthonormalize` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_object_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_x` **(** :ref:`float` angle **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_y` **(** :ref:`float` angle **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_z` **(** :ref:`float` angle **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scale_object_local` **(** :ref:`Vector3` scale **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_disable_scale` **(** :ref:`bool` disable **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_identity` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_subgizmo_selection` **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`to_global` **(** :ref:`Vector3` local_point **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`to_local` **(** :ref:`Vector3` global_point **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`translate` **(** :ref:`Vector3` offset **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`translate_object_local` **(** :ref:`Vector3` offset **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_gizmos` **(** **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Node3D_signal_visibility_changed: -- **visibility_changed** **(** **)** +.. rst-class:: classref-signal + +**visibility_changed** **(** **)** Emitted when node visibility changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Node3D_RotationEditMode: -.. _class_Node3D_constant_ROTATION_EDIT_MODE_EULER: - -.. _class_Node3D_constant_ROTATION_EDIT_MODE_QUATERNION: - -.. _class_Node3D_constant_ROTATION_EDIT_MODE_BASIS: +.. rst-class:: classref-enumeration enum **RotationEditMode**: -- **ROTATION_EDIT_MODE_EULER** = **0** +.. _class_Node3D_constant_ROTATION_EDIT_MODE_EULER: -- **ROTATION_EDIT_MODE_QUATERNION** = **1** +.. rst-class:: classref-enumeration-constant -- **ROTATION_EDIT_MODE_BASIS** = **2** +:ref:`RotationEditMode` **ROTATION_EDIT_MODE_EULER** = ``0`` + + + +.. _class_Node3D_constant_ROTATION_EDIT_MODE_QUATERNION: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationEditMode` **ROTATION_EDIT_MODE_QUATERNION** = ``1`` + + + +.. _class_Node3D_constant_ROTATION_EDIT_MODE_BASIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationEditMode` **ROTATION_EDIT_MODE_BASIS** = ``2`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Node3D_constant_NOTIFICATION_TRANSFORM_CHANGED: -.. _class_Node3D_constant_NOTIFICATION_ENTER_WORLD: +.. rst-class:: classref-constant -.. _class_Node3D_constant_NOTIFICATION_EXIT_WORLD: +**NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` -.. _class_Node3D_constant_NOTIFICATION_VISIBILITY_CHANGED: - -.. _class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: - -- **NOTIFICATION_TRANSFORM_CHANGED** = **2000** --- 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 receives 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` to work, users first need to ask for it, with :ref:`set_notify_transform`. The notification is also sent if the node is in the editor context and it has at least one valid gizmo. -- **NOTIFICATION_ENTER_WORLD** = **41** --- Node3D nodes receives this notification when they are registered to new :ref:`World3D` resource. +.. _class_Node3D_constant_NOTIFICATION_ENTER_WORLD: -- **NOTIFICATION_EXIT_WORLD** = **42** --- Node3D nodes receives this notification when they are unregistered from current :ref:`World3D` resource. +.. rst-class:: classref-constant -- **NOTIFICATION_VISIBILITY_CHANGED** = **43** --- Node3D nodes receives this notification when their visibility changes. +**NOTIFICATION_ENTER_WORLD** = ``41`` -- **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = **44** --- 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 receives this notification when they are registered to new :ref:`World3D` resource. + +.. _class_Node3D_constant_NOTIFICATION_EXIT_WORLD: + +.. rst-class:: classref-constant + +**NOTIFICATION_EXIT_WORLD** = ``42`` + +Node3D nodes receives this notification when they are unregistered from current :ref:`World3D` resource. + +.. _class_Node3D_constant_NOTIFICATION_VISIBILITY_CHANGED: + +.. rst-class:: classref-constant + +**NOTIFICATION_VISIBILITY_CHANGED** = ``43`` + +Node3D nodes receives this notification when their visibility changes. + +.. _class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: + +.. rst-class:: classref-constant + +**NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``44`` + +Node3D nodes receives 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` to work, users first need to ask for it, with :ref:`set_notify_local_transform`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Node3D_property_basis: -- :ref:`Basis` **basis** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_basis(value) | -+----------+------------------+ -| *Getter* | get_basis() | -+----------+------------------+ +:ref:`Basis` **basis** + +.. rst-class:: classref-property-setget + +- void **set_basis** **(** :ref:`Basis` value **)** +- :ref:`Basis` **get_basis** **(** **)** Direct access to the 3x3 basis of the :ref:`Transform3D` property. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_global_position: -- :ref:`Vector3` **global_position** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_global_position(value) | -+----------+----------------------------+ -| *Getter* | get_global_position() | -+----------+----------------------------+ +:ref:`Vector3` **global_position** + +.. rst-class:: classref-property-setget + +- void **set_global_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_global_position** **(** **)** Global position of this node. This is equivalent to ``global_transform.origin``. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_global_rotation: -- :ref:`Vector3` **global_rotation** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_global_rotation(value) | -+----------+----------------------------+ -| *Getter* | get_global_rotation() | -+----------+----------------------------+ +:ref:`Vector3` **global_rotation** + +.. rst-class:: classref-property-setget + +- void **set_global_rotation** **(** :ref:`Vector3` value **)** +- :ref:`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). \ **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` data structure not because the rotation is a vector, but only because :ref:`Vector3` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_global_transform: -- :ref:`Transform3D` **global_transform** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_global_transform(value) | -+----------+-----------------------------+ -| *Getter* | get_global_transform() | -+----------+-----------------------------+ +:ref:`Transform3D` **global_transform** + +.. rst-class:: classref-property-setget + +- void **set_global_transform** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_global_transform** **(** **)** World3D space (global) :ref:`Transform3D` of this node. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_position: -- :ref:`Vector3` **position** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_position(value) | -+-----------+----------------------+ -| *Getter* | get_position() | -+-----------+----------------------+ +:ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_position** **(** **)** Local position or translation of this node relative to the parent. This is equivalent to ``transform.origin``. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_quaternion: -- :ref:`Quaternion` **quaternion** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_quaternion(value) | -+----------+-----------------------+ -| *Getter* | get_quaternion() | -+----------+-----------------------+ +:ref:`Quaternion` **quaternion** + +.. rst-class:: classref-property-setget + +- void **set_quaternion** **(** :ref:`Quaternion` value **)** +- :ref:`Quaternion` **get_quaternion** **(** **)** Access to the node rotation as a :ref:`Quaternion`. This property is ideal for tweening complex rotations. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_rotation: -- :ref:`Vector3` **rotation** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_rotation(value) | -+-----------+----------------------+ -| *Getter* | get_rotation() | -+-----------+----------------------+ +:ref:`Vector3` **rotation** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_rotation** **(** :ref:`Vector3` value **)** +- :ref:`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` 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` data structure not because the rotation is a vector, but only because :ref:`Vector3` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_rotation_edit_mode: -- :ref:`RotationEditMode` **rotation_edit_mode** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_rotation_edit_mode(value) | -+-----------+-------------------------------+ -| *Getter* | get_rotation_edit_mode() | -+-----------+-------------------------------+ +:ref:`RotationEditMode` **rotation_edit_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_rotation_edit_mode** **(** :ref:`RotationEditMode` value **)** +- :ref:`RotationEditMode` **get_rotation_edit_mode** **(** **)** Specify how rotation (and scale) will be presented in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_rotation_order: -- :ref:`EulerOrder` **rotation_order** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``2`` | -+-----------+---------------------------+ -| *Setter* | set_rotation_order(value) | -+-----------+---------------------------+ -| *Getter* | get_rotation_order() | -+-----------+---------------------------+ +:ref:`EulerOrder` **rotation_order** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_rotation_order** **(** :ref:`EulerOrder` value **)** +- :ref:`EulerOrder` **get_rotation_order** **(** **)** Specify the axis rotation order of the :ref:`rotation` property. The final orientation is constructed by rotating the Euler angles in the order specified by this property. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_scale: -- :ref:`Vector3` **scale** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_scale(value) | -+-----------+----------------------+ -| *Getter* | get_scale() | -+-----------+----------------------+ +:ref:`Vector3` **scale** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_scale** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_scale** **(** **)** Scale part of the local transformation. @@ -356,196 +448,268 @@ Scale part of the local transformation. \ **Note:** Not all nodes are visually scaled by the :ref:`scale` property. For example, :ref:`Light3D`\ s are not visually affected by :ref:`scale`. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_top_level: -- :ref:`bool` **top_level** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_as_top_level(value) | -+-----------+-------------------------+ -| *Getter* | is_set_as_top_level() | -+-----------+-------------------------+ +:ref:`bool` **top_level** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_as_top_level** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_transform: -- :ref:`Transform3D` **transform** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_transform(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_transform() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_transform** **(** **)** Local space :ref:`Transform3D` of this node, with respect to the parent node. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_visibility_parent: -- :ref:`NodePath` **visibility_parent** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------------+ -| *Setter* | set_visibility_parent(value) | -+-----------+------------------------------+ -| *Getter* | get_visibility_parent() | -+-----------+------------------------------+ +:ref:`NodePath` **visibility_parent** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_parent** **(** :ref:`NodePath` value **)** +- :ref:`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`. Nodes hidden via the :ref:`visible` property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its ancestors into account. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_property_visible: -- :ref:`bool` **visible** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_visible(value) | -+-----------+--------------------+ -| *Getter* | is_visible() | -+-----------+--------------------+ +:ref:`bool` **visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_visible** **(** **)** If ``true``, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, :ref:`is_visible_in_tree` must return ``true``). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Node3D_method_add_gizmo: -- void **add_gizmo** **(** :ref:`Node3DGizmo` gizmo **)** +.. rst-class:: classref-method + +void **add_gizmo** **(** :ref:`Node3DGizmo` gizmo **)** Attach a gizmo to this ``Node3D``. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_clear_gizmos: -- void **clear_gizmos** **(** **)** +.. rst-class:: classref-method + +void **clear_gizmos** **(** **)** Clear all gizmos attached to this ``Node3D``. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_clear_subgizmo_selection: -- void **clear_subgizmo_selection** **(** **)** +.. rst-class:: classref-method + +void **clear_subgizmo_selection** **(** **)** Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs become invalid after a property change. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_force_update_transform: -- void **force_update_transform** **(** **)** +.. rst-class:: classref-method + +void **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. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_get_gizmos: -- :ref:`Node3DGizmo[]` **get_gizmos** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node3DGizmo[]` **get_gizmos** **(** **)** |const| Returns all the gizmos attached to this ``Node3D``. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_get_parent_node_3d: -- :ref:`Node3D` **get_parent_node_3d** **(** **)** |const| +.. rst-class:: classref-method -Returns the parent ``Node3D``, or an empty :ref:`Object` if no parent exists or parent is not of type ``Node3D``. +:ref:`Node3D` **get_parent_node_3d** **(** **)** |const| + +Returns the parent **Node3D**, or an empty :ref:`Object` if no parent exists or parent is not of type **Node3D**. + +.. rst-class:: classref-item-separator ---- .. _class_Node3D_method_get_world_3d: -- :ref:`World3D` **get_world_3d** **(** **)** |const| +.. rst-class:: classref-method -Returns the current :ref:`World3D` resource this ``Node3D`` node is registered to. +:ref:`World3D` **get_world_3d** **(** **)** |const| + +Returns the current :ref:`World3D` resource this **Node3D** node is registered to. + +.. rst-class:: classref-item-separator ---- .. _class_Node3D_method_global_rotate: -- void **global_rotate** **(** :ref:`Vector3` axis, :ref:`float` angle **)** +.. rst-class:: classref-method + +void **global_rotate** **(** :ref:`Vector3` axis, :ref:`float` angle **)** Rotates the global (world) transformation around axis, a unit :ref:`Vector3`, by specified angle in radians. The rotation axis is in global coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_global_scale: -- void **global_scale** **(** :ref:`Vector3` scale **)** +.. rst-class:: classref-method + +void **global_scale** **(** :ref:`Vector3` scale **)** Scales the global (world) transformation by the given :ref:`Vector3` scale factors. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_global_translate: -- void **global_translate** **(** :ref:`Vector3` offset **)** +.. rst-class:: classref-method + +void **global_translate** **(** :ref:`Vector3` offset **)** Moves the global (world) transformation by :ref:`Vector3` offset. The offset is in global coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_hide: -- void **hide** **(** **)** +.. rst-class:: classref-method + +void **hide** **(** **)** Disables rendering of this node. Changes :ref:`visible` to ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_is_local_transform_notification_enabled: -- :ref:`bool` **is_local_transform_notification_enabled** **(** **)** |const| +.. rst-class:: classref-method -Returns whether node notifies about its local transformation changes. ``Node3D`` will not propagate this by default. +:ref:`bool` **is_local_transform_notification_enabled** **(** **)** |const| + +Returns whether node notifies about its local transformation changes. **Node3D** will not propagate this by default. + +.. rst-class:: classref-item-separator ---- .. _class_Node3D_method_is_scale_disabled: -- :ref:`bool` **is_scale_disabled** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_scale_disabled** **(** **)** |const| Returns whether this node uses a scale of ``(1, 1, 1)`` or its local transformation scale. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_is_transform_notification_enabled: -- :ref:`bool` **is_transform_notification_enabled** **(** **)** |const| +.. rst-class:: classref-method -Returns whether the node notifies about its global and local transformation changes. ``Node3D`` will not propagate this by default. +:ref:`bool` **is_transform_notification_enabled** **(** **)** |const| + +Returns whether the node notifies about its global and local transformation changes. **Node3D** will not propagate this by default. + +.. rst-class:: classref-item-separator ---- .. _class_Node3D_method_is_visible_in_tree: -- :ref:`bool` **is_visible_in_tree** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_visible_in_tree** **(** **)** |const| Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_look_at: -- void **look_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** +.. rst-class:: classref-method + +void **look_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** Rotates the node so that the local forward axis (-Z) points toward the ``target`` position. @@ -555,165 +719,245 @@ The ``target`` position cannot be the same as the node's position, the ``up`` ve Operations take place in global space, which means that the node must be in the scene tree. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_look_at_from_position: -- void **look_at_from_position** **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** +.. rst-class:: classref-method + +void **look_at_from_position** **(** :ref:`Vector3` position, :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** Moves the node to the specified ``position``, and then rotates the node to point toward the ``target`` as per :ref:`look_at`. Operations take place in global space. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_orthonormalize: -- void **orthonormalize** **(** **)** +.. rst-class:: classref-method + +void **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`. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_rotate: -- void **rotate** **(** :ref:`Vector3` axis, :ref:`float` angle **)** +.. rst-class:: classref-method + +void **rotate** **(** :ref:`Vector3` axis, :ref:`float` angle **)** Rotates the local transformation around axis, a unit :ref:`Vector3`, by specified angle in radians. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_rotate_object_local: -- void **rotate_object_local** **(** :ref:`Vector3` axis, :ref:`float` angle **)** +.. rst-class:: classref-method + +void **rotate_object_local** **(** :ref:`Vector3` axis, :ref:`float` angle **)** Rotates the local transformation around axis, a unit :ref:`Vector3`, by specified angle in radians. The rotation axis is in object-local coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_rotate_x: -- void **rotate_x** **(** :ref:`float` angle **)** +.. rst-class:: classref-method + +void **rotate_x** **(** :ref:`float` angle **)** Rotates the local transformation around the X axis by angle in radians. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_rotate_y: -- void **rotate_y** **(** :ref:`float` angle **)** +.. rst-class:: classref-method + +void **rotate_y** **(** :ref:`float` angle **)** Rotates the local transformation around the Y axis by angle in radians. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_rotate_z: -- void **rotate_z** **(** :ref:`float` angle **)** +.. rst-class:: classref-method + +void **rotate_z** **(** :ref:`float` angle **)** Rotates the local transformation around the Z axis by angle in radians. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_scale_object_local: -- void **scale_object_local** **(** :ref:`Vector3` scale **)** +.. rst-class:: classref-method + +void **scale_object_local** **(** :ref:`Vector3` scale **)** Scales the local transformation by given 3D scale factors in object-local coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_set_disable_scale: -- void **set_disable_scale** **(** :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **set_disable_scale** **(** :ref:`bool` disable **)** Sets whether the node uses a scale of ``(1, 1, 1)`` or its local transformation scale. Changes to the local transformation scale are preserved. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_set_identity: -- void **set_identity** **(** **)** +.. rst-class:: classref-method + +void **set_identity** **(** **)** Reset all transformations for this node (sets its :ref:`Transform3D` to the identity matrix). +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_set_ignore_transform_notification: -- void **set_ignore_transform_notification** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_ignore_transform_notification** **(** :ref:`bool` enabled **)** Sets whether the node ignores notification that its transformation (global or local) changed. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_set_notify_local_transform: -- void **set_notify_local_transform** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method -Sets whether the node notifies about its local transformation changes. ``Node3D`` will not propagate this by default. +void **set_notify_local_transform** **(** :ref:`bool` enable **)** + +Sets whether the node notifies about its local transformation changes. **Node3D** will not propagate this by default. + +.. rst-class:: classref-item-separator ---- .. _class_Node3D_method_set_notify_transform: -- void **set_notify_transform** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method -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. +void **set_notify_transform** **(** :ref:`bool` enable **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Node3D_method_set_subgizmo_selection: -- void **set_subgizmo_selection** **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **set_subgizmo_selection** **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** Set subgizmo selection for this node in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_show: -- void **show** **(** **)** +.. rst-class:: classref-method + +void **show** **(** **)** Enables rendering of this node. Changes :ref:`visible` to ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_to_global: -- :ref:`Vector3` **to_global** **(** :ref:`Vector3` local_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **to_global** **(** :ref:`Vector3` local_point **)** |const| Transforms ``local_point`` from this node's local space to world space. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_to_local: -- :ref:`Vector3` **to_local** **(** :ref:`Vector3` global_point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **to_local** **(** :ref:`Vector3` global_point **)** |const| Transforms ``global_point`` from world space to this node's local space. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_translate: -- void **translate** **(** :ref:`Vector3` offset **)** +.. rst-class:: classref-method + +void **translate** **(** :ref:`Vector3` offset **)** Changes the node's position by the given offset :ref:`Vector3`. Note that the translation ``offset`` is affected by the node's scale, so if scaled by e.g. ``(10, 1, 1)``, a translation by an offset of ``(2, 0, 0)`` would actually add 20 (``2 * 10``) to the X coordinate. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_translate_object_local: -- void **translate_object_local** **(** :ref:`Vector3` offset **)** +.. rst-class:: classref-method + +void **translate_object_local** **(** :ref:`Vector3` offset **)** Changes the node's position by the given offset :ref:`Vector3` in local space. +.. rst-class:: classref-item-separator + ---- .. _class_Node3D_method_update_gizmos: -- void **update_gizmos** **(** **)** +.. rst-class:: classref-method + +void **update_gizmos** **(** **)** Updates all the :ref:`Node3DGizmo`\ s attached to this node. diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index 5e370b0d1..8238fd1b6 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -12,14 +12,16 @@ NodePath Pre-parsed scene tree path. +.. rst-class:: classref-introduction-group + Description ----------- A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.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. -You will usually just pass a string to :ref:`Node.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. +You will usually just pass a string to :ref:`Node.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 ``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. +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. Some examples of NodePaths include the following: @@ -38,76 +40,109 @@ Some examples of NodePaths include the following: See also :ref:`StringName`, which is a similar concept for general-purpose string interning. -\ **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. +\ **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. + +.. rst-class:: classref-introduction-group Tutorials --------- - `2D Role Playing Game Demo `__ +.. rst-class:: classref-reftable-group + Constructors ------------ -+---------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`NodePath` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`NodePath` **(** :ref:`NodePath` from **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`NodePath` **(** :ref:`String` from **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`NodePath` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`NodePath` **(** :ref:`NodePath` from **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`NodePath` **(** :ref:`String` from **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_as_property_path` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_concatenated_names` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_concatenated_subnames` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_name` **(** :ref:`int` idx **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_name_count` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_subname` **(** :ref:`int` idx **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_subname_count` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hash` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_absolute` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_as_property_path` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_concatenated_names` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_concatenated_subnames` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_name` **(** :ref:`int` idx **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_name_count` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_subname` **(** :ref:`int` idx **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_subname_count` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hash` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_absolute` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`NodePath` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`NodePath` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`NodePath` right **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`NodePath` right **)** | + +-------------------------+------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_NodePath_constructor_NodePath: -- :ref:`NodePath` **NodePath** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``NodePath``. +:ref:`NodePath` **NodePath** **(** **)** + +Constructs an empty **NodePath**. + +.. rst-class:: classref-item-separator ---- -- :ref:`NodePath` **NodePath** **(** :ref:`NodePath` from **)** +.. rst-class:: classref-constructor -Constructs a ``NodePath`` as a copy of the given ``NodePath``. ``NodePath("example")`` is equivalent to ``^"example"``. +:ref:`NodePath` **NodePath** **(** :ref:`NodePath` from **)** + +Constructs a **NodePath** as a copy of the given **NodePath**. ``NodePath("example")`` is equivalent to ``^"example"``. + +.. rst-class:: classref-item-separator ---- -- :ref:`NodePath` **NodePath** **(** :ref:`String` from **)** +.. rst-class:: classref-constructor + +:ref:`NodePath` **NodePath** **(** :ref:`String` from **)** 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. @@ -130,12 +165,20 @@ Examples of valid NodePaths (assuming that those nodes exist and have the refere # Absolute path (from "root") "/root/Level/Path2D" +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_NodePath_method_get_as_property_path: -- :ref:`NodePath` **get_as_property_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_as_property_path** **(** **)** |const| 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). @@ -160,19 +203,27 @@ Returns a node path with a colon character (``:``) prepended, transforming it to +.. rst-class:: classref-item-separator + ---- .. _class_NodePath_method_get_concatenated_names: -- :ref:`StringName` **get_concatenated_names** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_concatenated_names** **(** **)** |const| Returns all paths concatenated with a slash character (``/``) as separator without subnames. +.. rst-class:: classref-item-separator + ---- .. _class_NodePath_method_get_concatenated_subnames: -- :ref:`StringName` **get_concatenated_subnames** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_concatenated_subnames** **(** **)** |const| Returns all subnames concatenated with a colon character (``:``) as separator, i.e. the right side of the first colon in a node path. @@ -191,11 +242,15 @@ Returns all subnames concatenated with a colon character (``:``) as separator, i +.. rst-class:: classref-item-separator + ---- .. _class_NodePath_method_get_name: -- :ref:`StringName` **get_name** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_name** **(** :ref:`int` idx **)** |const| Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count` - 1). @@ -218,21 +273,29 @@ Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count` **get_name_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_name_count** **(** **)** |const| Gets the number of node names which make up the path. Subnames (see :ref:`get_subname_count`) are not included. For example, ``"Path2D/PathFollow2D/Sprite2D"`` has 3 names. +.. rst-class:: classref-item-separator + ---- .. _class_NodePath_method_get_subname: -- :ref:`StringName` **get_subname** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_subname** **(** :ref:`int` idx **)** |const| Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_count`). @@ -253,60 +316,84 @@ Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_ +.. rst-class:: classref-item-separator + ---- .. _class_NodePath_method_get_subname_count: -- :ref:`int` **get_subname_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_subname_count** **(** **)** |const| Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character (``:``) in the node path. For example, ``"Path2D/PathFollow2D/Sprite2D:texture:load_path"`` has 2 subnames. +.. rst-class:: classref-item-separator + ---- .. _class_NodePath_method_hash: -- :ref:`int` **hash** **(** **)** |const| +.. rst-class:: classref-method -Returns the 32-bit hash value representing the ``NodePath``'s contents. +:ref:`int` **hash** **(** **)** |const| + +Returns the 32-bit hash value representing the **NodePath**'s contents. + +.. rst-class:: classref-item-separator ---- .. _class_NodePath_method_is_absolute: -- :ref:`bool` **is_absolute** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_absolute** **(** **)** |const| 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). +.. rst-class:: classref-item-separator + ---- .. _class_NodePath_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the node path is empty. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_NodePath_operator_neq_bool: +.. _class_NodePath_operator_neq_NodePath: -- :ref:`bool` **operator !=** **(** :ref:`NodePath` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator !=** **(** :ref:`NodePath` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if two node paths are not equal. + +.. rst-class:: classref-item-separator ---- -.. _class_NodePath_operator_eq_bool: +.. _class_NodePath_operator_eq_NodePath: -- :ref:`bool` **operator ==** **(** :ref:`NodePath` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator ==** **(** :ref:`NodePath` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if two node paths are equal, i.e. all node names in the path are the same and 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.)` diff --git a/classes/class_noise.rst b/classes/class_noise.rst index 7a38cd1f4..d0a56e820 100644 --- a/classes/class_noise.rst +++ b/classes/class_noise.rst @@ -16,6 +16,8 @@ Noise Abstract base class for noise generators. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,79 +27,116 @@ A default get_seamless_noise() implementation is provided for libraries that do Inheriting noise classes can optionally override this function to provide a more optimal algorithm. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_1d` **(** :ref:`float` x **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` v **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` v **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1 **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_1d` **(** :ref:`float` x **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` v **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` v **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1 **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Noise_method_get_image: -- :ref:`Image` **get_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **get_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false **)** |const| Returns a 2D :ref:`Image` noise image. +.. rst-class:: classref-item-separator + ---- .. _class_Noise_method_get_noise_1d: -- :ref:`float` **get_noise_1d** **(** :ref:`float` x **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_noise_1d** **(** :ref:`float` x **)** |const| Returns the 1D noise value at the given (x) coordinate. +.. rst-class:: classref-item-separator + ---- .. _class_Noise_method_get_noise_2d: -- :ref:`float` **get_noise_2d** **(** :ref:`float` x, :ref:`float` y **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_noise_2d** **(** :ref:`float` x, :ref:`float` y **)** |const| Returns the 2D noise value at the given position. +.. rst-class:: classref-item-separator + ---- .. _class_Noise_method_get_noise_2dv: -- :ref:`float` **get_noise_2dv** **(** :ref:`Vector2` v **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_noise_2dv** **(** :ref:`Vector2` v **)** |const| Returns the 2D noise value at the given position. +.. rst-class:: classref-item-separator + ---- .. _class_Noise_method_get_noise_3d: -- :ref:`float` **get_noise_3d** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_noise_3d** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| Returns the 3D noise value at the given position. +.. rst-class:: classref-item-separator + ---- .. _class_Noise_method_get_noise_3dv: -- :ref:`float` **get_noise_3dv** **(** :ref:`Vector3` v **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_noise_3dv** **(** :ref:`Vector3` v **)** |const| Returns the 3D noise value at the given position. +.. rst-class:: classref-item-separator + ---- .. _class_Noise_method_get_seamless_image: -- :ref:`Image` **get_seamless_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1 **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **get_seamless_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1 **)** |const| Returns a seamless 2D :ref:`Image` noise image. diff --git a/classes/class_noisetexture2d.rst b/classes/class_noisetexture2d.rst index a46faf057..b225b46c4 100644 --- a/classes/class_noisetexture2d.rst +++ b/classes/class_noisetexture2d.rst @@ -14,6 +14,8 @@ NoiseTexture2D A texture filled with noise generated by a :ref:`Noise` object. +.. rst-class:: classref-introduction-group + Description ----------- @@ -31,95 +33,110 @@ The class uses :ref:`Thread`\ s to generate the texture data inter var image = texture.get_image() var data = image.get_data() +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`as_normal_map` | ``false`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`bump_strength` | ``8.0`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Gradient` | :ref:`color_ramp` | | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`generate_mipmaps` | ``true`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`height` | ``512`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`in_3d_space` | ``false`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`invert` | ``false`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Noise` | :ref:`noise` | | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`seamless` | ``false`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`seamless_blend_skirt` | ``0.1`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`width` | ``512`` | -+---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`as_normal_map` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`bump_strength` | ``8.0`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Gradient` | :ref:`color_ramp` | | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`generate_mipmaps` | ``true`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`height` | ``512`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`in_3d_space` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`invert` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Noise` | :ref:`noise` | | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`seamless` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`seamless_blend_skirt` | ``0.1`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`width` | ``512`` | + +---------------------------------+---------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_NoiseTexture2D_property_as_normal_map: -- :ref:`bool` **as_normal_map** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_as_normal_map(value) | -+-----------+--------------------------+ -| *Getter* | is_normal_map() | -+-----------+--------------------------+ +:ref:`bool` **as_normal_map** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_as_normal_map** **(** :ref:`bool` value **)** +- :ref:`bool` **is_normal_map** **(** **)** If ``true``, the resulting texture contains a normal map created from the original noise interpreted as a bump map. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_bump_strength: -- :ref:`float` **bump_strength** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``8.0`` | -+-----------+--------------------------+ -| *Setter* | set_bump_strength(value) | -+-----------+--------------------------+ -| *Getter* | get_bump_strength() | -+-----------+--------------------------+ +:ref:`float` **bump_strength** = ``8.0`` + +.. rst-class:: classref-property-setget + +- void **set_bump_strength** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_color_ramp: -- :ref:`Gradient` **color_ramp** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_color_ramp(value) | -+----------+-----------------------+ -| *Getter* | get_color_ramp() | -+----------+-----------------------+ +:ref:`Gradient` **color_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_ramp** **(** :ref:`Gradient` value **)** +- :ref:`Gradient` **get_color_ramp** **(** **)** A :ref:`Gradient` which is used to map the luminance of each pixel to a color value. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_generate_mipmaps: -- :ref:`bool` **generate_mipmaps** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_generate_mipmaps(value) | -+-----------+-----------------------------+ -| *Getter* | is_generating_mipmaps() | -+-----------+-----------------------------+ +:ref:`bool` **generate_mipmaps** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_generate_mipmaps** **(** :ref:`bool` value **)** +- :ref:`bool` **is_generating_mipmaps** **(** **)** Determines whether mipmaps are generated for this texture. @@ -127,115 +144,124 @@ Enabling this results in less texture aliasing, but the noise texture generation Requires (anisotropic) mipmap filtering to be enabled for a material to have an effect. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_height: -- :ref:`int` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``512`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`int` **height** = ``512`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`int` value **)** +- :ref:`int` **get_height** **(** **)** Height of the generated texture. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_in_3d_space: -- :ref:`bool` **in_3d_space** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_in_3d_space(value) | -+-----------+------------------------+ -| *Getter* | is_in_3d_space() | -+-----------+------------------------+ +:ref:`bool` **in_3d_space** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_in_3d_space** **(** :ref:`bool` value **)** +- :ref:`bool` **is_in_3d_space** **(** **)** Determines whether the noise image is calculated in 3D space. May result in reduced contrast. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_invert: -- :ref:`bool` **invert** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_invert(value) | -+-----------+-------------------+ -| *Getter* | get_invert() | -+-----------+-------------------+ +:ref:`bool` **invert** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_invert** **(** :ref:`bool` value **)** +- :ref:`bool` **get_invert** **(** **)** If ``true``, inverts the noise texture. White becomes black, black becomes white. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_noise: -- :ref:`Noise` **noise** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_noise(value) | -+----------+------------------+ -| *Getter* | get_noise() | -+----------+------------------+ +:ref:`Noise` **noise** + +.. rst-class:: classref-property-setget + +- void **set_noise** **(** :ref:`Noise` value **)** +- :ref:`Noise` **get_noise** **(** **)** The instance of the :ref:`Noise` object. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_seamless: -- :ref:`bool` **seamless** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_seamless(value) | -+-----------+---------------------+ -| *Getter* | get_seamless() | -+-----------+---------------------+ +:ref:`bool` **seamless** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_seamless** **(** :ref:`bool` value **)** +- :ref:`bool` **get_seamless** **(** **)** If ``true``, a seamless texture is requested from the :ref:`Noise` resource. \ **Note:** Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used :ref:`Noise` resource. This is because some implementations use higher dimensions for generating seamless noise. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_seamless_blend_skirt: -- :ref:`float` **seamless_blend_skirt** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.1`` | -+-----------+---------------------------------+ -| *Setter* | set_seamless_blend_skirt(value) | -+-----------+---------------------------------+ -| *Getter* | get_seamless_blend_skirt() | -+-----------+---------------------------------+ +:ref:`float` **seamless_blend_skirt** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_seamless_blend_skirt** **(** :ref:`float` value **)** +- :ref:`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` for further details. +.. rst-class:: classref-item-separator + ---- .. _class_NoiseTexture2D_property_width: -- :ref:`int` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``512`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`int` **width** = ``512`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`int` value **)** +- :ref:`int` **get_width** **(** **)** Width of the generated texture. diff --git a/classes/class_object.rst b/classes/class_object.rst index ca745a36f..6c24090c1 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -12,49 +12,44 @@ Object **Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NativeExtensionManager`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` -Base class for all non-built-in types. +Base class for all other classes in the engine. + +.. rst-class:: classref-introduction-group Description ----------- -Every class which is not a built-in type inherits from this class. +An advanced :ref:`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` instance is able to call :ref:`Node.add_child` because it inherits from :ref:`Node`. -You can construct Objects from scripting languages, using ``Object.new()`` in GDScript, or ``new Object`` in C#. +You can create new instances, using ``Object.new()`` in GDScript, or ``new Object`` in C#. -Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the :ref:`free` method from your script or delete the instance from C++. +To delete an Object instance, call :ref:`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` (and by extension :ref:`Resource`) deletes itself when no longer referenced, and :ref:`Node` deletes its children when freed. -Some classes that extend Object add memory management. This is the case of :ref:`RefCounted`, which counts references and deletes itself automatically when no longer referenced. :ref:`Node`, another fundamental type, deletes all its children when freed from memory. +Objects can have a :ref:`Script` attached to them. Once the :ref:`Script` is instantiated, it effectively acts as an extension to the base class, allowing it to define and inherit new properties, methods and signals. -Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list` and handled in :ref:`_get` and :ref:`_set`. However, scripting languages and C++ have simpler means to export them. +Inside a :ref:`Script`, :ref:`_get_property_list` may be overriden 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` annotation. -Property membership can be tested directly in GDScript using ``in``: +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`, :ref:`get`, :ref:`call`, :ref:`has_method`, :ref:`has_signal`, etc. Note that these methods are **much** slower than direct references. +In GDScript, you can also check if a given property, method, or signal name exists in an object with the ``in`` operator: -.. tabs:: +:: - .. code-tab:: gdscript + var node = Node.new() + print("name" in node) # Prints true + print("get_parent" in node) # Prints true + print("tree_entered" in node) # Prints true + print("unknown" in node) # Prints false - var n = Node2D.new() - print("position" in n) # Prints "true". - print("other_property" in n) # Prints "false". +Notifications are :ref:`int` constants commonly sent and received by objects. For example, on every rendered frame, the :ref:`SceneTree` notifies nodes inside the tree with a :ref:`Node.NOTIFICATION_PROCESS`. The nodes receive it and may call :ref:`Node._process` to update. To make use of notifications, see :ref:`notification` and :ref:`_notification`. - .. code-tab:: csharp +Lastly, every object can also contain metadata (data about data). :ref:`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. - var node = new Node2D(); - // C# has no direct equivalent to GDScript's `in` operator here, but we - // can achieve the same behavior by performing `Get` with a null check. - GD.Print(node.Get("position") != null); // Prints "true". - GD.Print(node.Get("other_property") != null); // Prints "false". +\ **Note:** Unlike references to a :ref:`RefCounted`, references to an object stored in a variable can become invalid without being set to ``null``. To check if an object has been deleted, do *not* compare it against ``null``. Instead, use :ref:`@GlobalScope.is_instance_valid`. It's also recommended to inherit from :ref:`RefCounted` for classes storing data instead of **Object**. +\ **Note:** The ``script`` is not exposed like most properties. To set or get an object's :ref:`Script` in code, use :ref:`set_script` and :ref:`get_script`, respectively. - -The ``in`` operator will evaluate to ``true`` as long as the key exists, even if the value is ``null``. - -Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See :ref:`_notification`. - -\ **Note:** Unlike references to a :ref:`RefCounted`, references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use :ref:`RefCounted` for data classes instead of ``Object``. - -\ **Note:** The ``script`` property is not exposed like most properties, but it does have a setter and getter (``set_script()`` and ``get_script()``). +.. rst-class:: classref-introduction-group Tutorials --------- @@ -63,258 +58,585 @@ Tutorials - :doc:`Object notifications <../tutorials/best_practices/godot_notifications>` +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get` **(** :ref:`StringName` property **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_property_list` **(** **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_init` **(** **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_property_can_revert` **(** :ref:`StringName` property **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_property_get_revert` **(** :ref:`StringName` property **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_set` **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_to_string` **(** **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=[] **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call` **(** :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call_deferred` **(** :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`callv` **(** :ref:`StringName` method, :ref:`Array` arg_array **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_translate_messages` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect` **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`emit_signal` **(** :ref:`StringName` signal, ... **)** |vararg| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get` **(** :ref:`StringName` property **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_class` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_incoming_connections` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_indexed` **(** :ref:`NodePath` property_path **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_instance_id` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_meta` **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_meta_list` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_method_list` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_property_list` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_script` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_signal_connection_list` **(** :ref:`StringName` signal **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_signal_list` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_meta` **(** :ref:`StringName` name **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_method` **(** :ref:`StringName` method **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_signal` **(** :ref:`StringName` signal **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_user_signal` **(** :ref:`StringName` signal **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_blocking_signals` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_class` **(** :ref:`String` class **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connected` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_queued_for_deletion` **(** **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`notification` **(** :ref:`int` what, :ref:`bool` reversed=false **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`notify_property_list_changed` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_meta` **(** :ref:`StringName` name **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`StringName` property, :ref:`Variant` value **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_block_signals` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_deferred` **(** :ref:`StringName` property, :ref:`Variant` value **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_indexed` **(** :ref:`NodePath` property_path, :ref:`Variant` value **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_message_translation` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_meta` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_script` **(** :ref:`Variant` script **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_string` **(** **)** | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`tr` **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`tr_n` **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get` **(** :ref:`StringName` property **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_property_list` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_property_can_revert` **(** :ref:`StringName` property **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_property_get_revert` **(** :ref:`StringName` property **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_set` **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_to_string` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=[] **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call` **(** :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call_deferred` **(** :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`callv` **(** :ref:`StringName` method, :ref:`Array` arg_array **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_translate_messages` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect` **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`emit_signal` **(** :ref:`StringName` signal, ... **)** |vararg| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get` **(** :ref:`StringName` property **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_class` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_incoming_connections` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_indexed` **(** :ref:`NodePath` property_path **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_instance_id` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_meta` **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_meta_list` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_method_list` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_property_list` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_script` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_signal_connection_list` **(** :ref:`StringName` signal **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_signal_list` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_meta` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_method` **(** :ref:`StringName` method **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_signal` **(** :ref:`StringName` signal **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_user_signal` **(** :ref:`StringName` signal **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_blocking_signals` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class` **(** :ref:`String` class **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_connected` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_queued_for_deletion` **(** **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notification` **(** :ref:`int` what, :ref:`bool` reversed=false **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notify_property_list_changed` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_can_revert` **(** :ref:`StringName` property **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`StringName` property **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_meta` **(** :ref:`StringName` name **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_block_signals` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_deferred` **(** :ref:`StringName` property, :ref:`Variant` value **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_indexed` **(** :ref:`NodePath` property_path, :ref:`Variant` value **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_message_translation` **(** :ref:`bool` enable **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_meta` **(** :ref:`StringName` name, :ref:`Variant` value **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_script` **(** :ref:`Variant` script **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_string` **(** **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tr` **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tr_n` **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Object_signal_property_list_changed: -- **property_list_changed** **(** **)** +.. rst-class:: classref-signal + +**property_list_changed** **(** **)** + +Emitted when :ref:`notify_property_list_changed` is called. + +.. rst-class:: classref-item-separator ---- .. _class_Object_signal_script_changed: -- **script_changed** **(** **)** +.. rst-class:: classref-signal -Emitted whenever the object's script is changed. +**script_changed** **(** **)** + +Emitted when the object's script is changed. + +\ **Note:** When this signal is emitted, the new script is not initialized yet. If you need to access the new script, defer connections to this signal with :ref:`CONNECT_DEFERRED`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Object_ConnectFlags: -.. _class_Object_constant_CONNECT_DEFERRED: - -.. _class_Object_constant_CONNECT_PERSIST: - -.. _class_Object_constant_CONNECT_ONE_SHOT: - -.. _class_Object_constant_CONNECT_REFERENCE_COUNTED: +.. rst-class:: classref-enumeration enum **ConnectFlags**: -- **CONNECT_DEFERRED** = **1** --- Connects a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. +.. _class_Object_constant_CONNECT_DEFERRED: -- **CONNECT_PERSIST** = **2** --- Persisting connections are saved when the object is serialized to file. +.. rst-class:: classref-enumeration-constant -- **CONNECT_ONE_SHOT** = **4** --- One-shot connections disconnect themselves after emission. +:ref:`ConnectFlags` **CONNECT_DEFERRED** = ``1`` -- **CONNECT_REFERENCE_COUNTED** = **8** --- Connect a signal as reference-counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left. +Deferred connections trigger their :ref:`Callable`\ s on idle time, rather than instantly. + +.. _class_Object_constant_CONNECT_PERSIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectFlags` **CONNECT_PERSIST** = ``2`` + +Persisting connections are stored when the object is serialized (such as when using :ref:`PackedScene.pack`). In the editor, connections created through the Node dock are always persisting. + +.. _class_Object_constant_CONNECT_ONE_SHOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectFlags` **CONNECT_ONE_SHOT** = ``4`` + +One-shot connections disconnect themselves after emission. + +.. _class_Object_constant_CONNECT_REFERENCE_COUNTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectFlags` **CONNECT_REFERENCE_COUNTED** = ``8`` + +Reference-counted connections can be assigned to the same :ref:`Callable` multiple times. Each disconnection decreases the internal counter. The signal fully disconnects only when the counter reaches 0. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Object_constant_NOTIFICATION_POSTINITIALIZE: +.. rst-class:: classref-constant + +**NOTIFICATION_POSTINITIALIZE** = ``0`` + +Notification received when the object is initialized, before its script is attached. Used internally. + .. _class_Object_constant_NOTIFICATION_PREDELETE: -- **NOTIFICATION_POSTINITIALIZE** = **0** --- Called right when the object is initialized. Not available in script. +.. rst-class:: classref-constant -- **NOTIFICATION_PREDELETE** = **1** --- Called before the object is about to be deleted. +**NOTIFICATION_PREDELETE** = ``1`` + +Notification received when the object is about to be deleted. Can act as the deconstructor of some programming languages. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Object_method__get: -- :ref:`Variant` **_get** **(** :ref:`StringName` property **)** |virtual| +.. rst-class:: classref-method -Virtual method which can be overridden to customize the return value of :ref:`get`. +:ref:`Variant` **_get** **(** :ref:`StringName` property **)** |virtual| -Returns the given property. Returns ``null`` if the ``property`` does not exist. +Override this method to customize the behavior of :ref:`get`. Should return the given ``property``'s value, or ``null`` if the ``property`` should be handled normally. + +Combined with :ref:`_set` and :ref:`_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`, otherwise this method will not be called. + + +.. tabs:: + + .. code-tab:: gdscript + + func _get(property): + if (property == "fake_property"): + print("Getting my property!") + return 4 + + func _get_property_list(): + return [ + { "name": "fake_property", "type": TYPE_INT } + ] + + .. code-tab:: csharp + + public override Variant _Get(StringName property) + { + if (property == "FakeProperty") + { + GD.Print("Getting my property!"); + return 4; + } + return default; + } + + public override Godot.Collections.Array _GetPropertyList() + { + return new Godot.Collections.Array() + { + new Godot.Collections.Dictionary() + { + { "name", "FakeProperty" }, + { "type", (int)Variant.Type.Int } + } + }; + } + + + +.. rst-class:: classref-item-separator ---- .. _class_Object_method__get_property_list: -- :ref:`Dictionary[]` **_get_property_list** **(** **)** |virtual| +.. rst-class:: classref-method -Virtual method which can be overridden to customize the return value of :ref:`get_property_list`. +:ref:`Dictionary[]` **_get_property_list** **(** **)** |virtual| -Returns the object's property list as an :ref:`Array` of dictionaries. +Override this method to customize how script properties should be handled by the engine. -Each property's :ref:`Dictionary` must contain at least ``name: String`` and ``type: int`` (see :ref:`Variant.Type`) entries. Optionally, it can also include ``hint: int`` (see :ref:`PropertyHint`), ``hint_string: String``, and ``usage: int`` (see :ref:`PropertyUsageFlags`). +Should return a property list, as an :ref:`Array` of dictionaries. The result is added to the array of :ref:`get_property_list`, and should be formatted in the same way. Each :ref:`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``: + + +.. tabs:: + + .. code-tab:: gdscript + + @tool + extends Node2D + + @export var holding_hammer = false: + set(value): + holding_hammer = value + 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 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" + }) + + return properties + + .. code-tab:: csharp + + [Tool] + public class MyNode2D : Node2D + { + private bool _holdingHammer; + + [Export] + public bool HoldingHammer + { + get => _holdingHammer; + set + { + _holdingHammer = value; + NotifyPropertyListChanged(); + } + } + + public int HammerType { get; set; } + + public override Godot.Collections.Array _GetPropertyList() + { + // By default, `HammerType` is not visible in the editor. + var propertyUsage = PropertyUsageFlags.NoEditor; + + if (HoldingHammer) + { + propertyUsage = PropertyUsageFlags.Default; + } + + var properties = new Godot.Collections.Array(); + properties.Add(new Godot.Collections.Dictionary() + { + { "name", "HammerType" }, + { "type", (int)Variant.Type.Int }, + { "usage", (int)propertyUsage }, // See above assignment. + { "hint", (int)PropertyHint.Enum }, + { "hint_string", "Wooden,Iron,Golden,Enchanted" } + }); + + return properties; + } + } + + + +\ **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`, :ref:`@GDScript.@export_enum`, :ref:`@GDScript.@export_group`, etc. + +\ **Note:** If the object's script is not :ref:`@GDScript.@tool`, this method will not be called in the editor. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method__init: -- void **_init** **(** **)** |virtual| +.. rst-class:: classref-method -Called when the object is initialized in memory. Can be defined to take in parameters, that are passed in when constructing. +void **_init** **(** **)** |virtual| -\ **Note:** If :ref:`_init` is defined with required parameters, then explicit construction is the only valid means of creating an Object of the class. If any other means (such as :ref:`PackedScene.instantiate`) is used, then initialization will fail. +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. + +\ **Note:** If :ref:`_init` is defined with *required* parameters, the Object with script may only be created directly. If any other means (such as :ref:`PackedScene.instantiate` or :ref:`Node.duplicate`) are used, the script's initialization will fail. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method__notification: -- void **_notification** **(** :ref:`int` what **)** |virtual| +.. rst-class:: classref-method -Called whenever the object receives a notification, which is identified in ``what`` by a constant. The base ``Object`` has two constants :ref:`NOTIFICATION_POSTINITIALIZE` and :ref:`NOTIFICATION_PREDELETE`, but subclasses such as :ref:`Node` define a lot more notifications which are also received by this method. +void **_notification** **(** :ref:`int` what **)** |virtual| + +Called when the object receives a notification, which can be identified in ``what`` by comparing it with a constant. See also :ref:`notification`. + + +.. tabs:: + + .. code-tab:: gdscript + + func _notification(what): + if what == NOTIFICATION_PREDELETE: + print("Goodbye!") + + .. code-tab:: csharp + + public override void _Notification(long what) + { + if (what == NotificationPredelete) + { + GD.Print("Goodbye!"); + } + } + + + +\ **Note:** The base **Object** defines a few notifications (:ref:`NOTIFICATION_POSTINITIALIZE` and :ref:`NOTIFICATION_PREDELETE`). Inheriting classes such as :ref:`Node` define a lot more notifications, which are also received by this method. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method__property_can_revert: -- :ref:`bool` **_property_can_revert** **(** :ref:`StringName` property **)** |virtual| +.. rst-class:: classref-method -Virtual methods that can be overridden to customize the property revert behavior in the editor. +:ref:`bool` **_property_can_revert** **(** :ref:`StringName` property **)** |virtual| -Returns ``true`` if the property identified by ``name`` can be reverted to a default value. Override :ref:`_property_get_revert` to return the actual value. +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` to specify the ``property``'s default value. + +\ **Note:** This method must return consistently, regardless of the current value of the ``property``. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method__property_get_revert: -- :ref:`Variant` **_property_get_revert** **(** :ref:`StringName` property **)** |virtual| +.. rst-class:: classref-method -Virtual methods that can be overridden to customize the property revert behavior in the editor. +:ref:`Variant` **_property_get_revert** **(** :ref:`StringName` property **)** |virtual| -Returns the default value of the property identified by ``name``. :ref:`_property_can_revert` must be overridden as well for this method to be called. +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` must also be overridden for this method to be called. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method__set: -- :ref:`bool` **_set** **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method -Virtual method which can be overridden to customize the return value of :ref:`set`. +:ref:`bool` **_set** **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| -Sets a property. Returns ``true`` if the ``property`` exists. +Override this method to customize the behavior of :ref:`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` and :ref:`_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`, otherwise this method will not be called. + + +.. tabs:: + + .. code-tab:: gdscript + + func _set(property, value): + if (property == "fake_property"): + print("Setting my property to ", value) + + func _get_property_list(): + return [ + { "name": "fake_property", "type": TYPE_INT } + ] + + .. code-tab:: csharp + + public override void _Set(StringName property, Variant value) + { + if (property == "FakeProperty") + { + GD.Print($"Setting my property to {value}"); + return true; + } + + return false; + } + + public override Godot.Collections.Array _GetPropertyList() + { + return new Godot.Collections.Array() + { + new Godot.Collections.Dictionary() + { + { "name", "FakeProperty" }, + { "type", (int)Variant.Type.Int } + } + }; + } + + + +.. rst-class:: classref-item-separator ---- .. _class_Object_method__to_string: -- :ref:`String` **_to_string** **(** **)** |virtual| +.. rst-class:: classref-method -Virtual method which can be overridden to customize the return value of :ref:`to_string`, and thus the object's representation where it is converted to a string, e.g. with ``print(obj)``. +:ref:`String` **_to_string** **(** **)** |virtual| -Returns a :ref:`String` representing the object. If not overridden, defaults to ``"[ClassName:RID]"``. +Override this method to customize the return value of :ref:`to_string`, and therefore the object's representation as a :ref:`String`. + +:: + + func _to_string(): + return "Welcome to Godot 4!" + + func _init(): + print(self) # Prints Welcome to Godot 4!" + var a = str(self) # a is "Welcome to Godot 4!" + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_add_user_signal: -- void **add_user_signal** **(** :ref:`String` signal, :ref:`Array` arguments=[] **)** +.. rst-class:: classref-method -Adds a user-defined ``signal``. Arguments are optional, but can be added as an :ref:`Array` of dictionaries, each containing ``name: String`` and ``type: int`` (see :ref:`Variant.Type`) entries. +void **add_user_signal** **(** :ref:`String` signal, :ref:`Array` arguments=[] **)** + +Adds a user-defined ``signal``. Optional arguments for the signal can be added as an :ref:`Array` of dictionaries, each defining a ``name`` :ref:`String` and a ``type`` :ref:`int` (see :ref:`Variant.Type`). See also :ref:`has_user_signal`. + + +.. tabs:: + + .. code-tab:: gdscript + + add_user_signal("hurt", [ + { "name": "damage", "type": TYPE_INT }, + { "name": "source", "type": TYPE_OBJECT } + ]) + + .. code-tab:: csharp + + AddUserSignal("Hurt", new Godot.Collections.Array() + { + new Godot.Collections.Dictionary() + { + { "name", "damage" }, + { "type", (int)Variant.Type.Int } + }, + new Godot.Collections.Dictionary() + { + { "name", "source" }, + { "type", (int)Variant.Type.Object } + } + }); + + + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_call: -- :ref:`Variant` **call** **(** :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method -Calls the ``method`` on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. +:ref:`Variant` **call** **(** :ref:`StringName` method, ... **)** |vararg| -\ **Example:**\ +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. .. tabs:: @@ -331,17 +653,19 @@ Calls the ``method`` on the object and returns the result. This method supports -\ **Note:** In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). +\ **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` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_call_deferred: -- :ref:`Variant` **call_deferred** **(** :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method -Calls the ``method`` on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. +:ref:`Variant` **call_deferred** **(** :ref:`StringName` method, ... **)** |vararg| -\ **Example:**\ +Calls the ``method`` on the object during idle time. This method supports a variable number of arguments, so parameters can be passed as a comma separated list. .. tabs:: @@ -358,15 +682,19 @@ Calls the ``method`` on the object during idle time. This method supports a vari -\ **Note:** In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). +\ **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` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_callv: -- :ref:`Variant` **callv** **(** :ref:`StringName` method, :ref:`Array` arg_array **)** +.. rst-class:: classref-method -Calls the ``method`` on the object and returns the result. Contrarily to :ref:`call`, this method does not support a variable number of arguments but expects all parameters to be via a single :ref:`Array`. +:ref:`Variant` **callv** **(** :ref:`StringName` method, :ref:`Array` arg_array **)** + +Calls the ``method`` on the object and returns the result. Unlike :ref:`call`, this method expects all parameters to be contained inside ``arg_array``. .. tabs:: @@ -383,29 +711,39 @@ Calls the ``method`` on the object and returns the result. Contrarily to :ref:`c +\ **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` on each call + +.. rst-class:: classref-item-separator + ---- .. _class_Object_method_can_translate_messages: -- :ref:`bool` **can_translate_messages** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the object can translate strings. See :ref:`set_message_translation` and :ref:`tr`. +:ref:`bool` **can_translate_messages** **(** **)** |const| + +Returns ``true`` if the object is allowed to translate messages with :ref:`tr` and :ref:`tr_n`. See also :ref:`set_message_translation`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_connect: -- :ref:`Error` **connect** **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** +.. rst-class:: classref-method -Connects a ``signal`` to a ``callable``. Use ``flags`` to set deferred or one-shot connections. See :ref:`ConnectFlags` constants. +:ref:`Error` **connect** **(** :ref:`StringName` signal, :ref:`Callable` callable, :ref:`int` flags=0 **)** -A signal can only be connected once to a :ref:`Callable`. It will print an error if already connected, unless the signal was connected with :ref:`CONNECT_REFERENCE_COUNTED`. To avoid this, first, use :ref:`is_connected` to check for existing connections. +Connects a ``signal`` by name to a ``callable``. Optional ``flags`` can be also added to configure the connection's behavior (see :ref:`ConnectFlags` constants). -If the callable's target is destroyed in the game's lifecycle, the connection will be lost. +A signal can only be connected once to the same :ref:`Callable`. If the signal is already connected, this method returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` and pushes an error message, unless the signal is connected with :ref:`CONNECT_REFERENCE_COUNTED`. To prevent this, use :ref:`is_connected` first to check for existing connections. + +If the ``callable``'s object is freed, the connection will be lost. \ **Examples with recommended syntax:**\ -Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach for both GDScript and C#. +Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach. .. tabs:: @@ -414,14 +752,14 @@ Connecting signals is one of the most common operations in Godot and the API giv func _ready(): var button = Button.new() - # `button_down` here is a Signal object, and we thus call the Signal.connect() method, - # not Object.connect(). See discussion below for a more in-depth overview of the API. + # `button_down` here is a Signal variant type, and we thus call the Signal.connect() method, not Object.connect(). + # See discussion below for a more in-depth overview of the API. button.button_down.connect(_on_button_down) - # This assumes that a `Player` class exists which defines a `hit` signal. + # This assumes that a `Player` class exists, which defines a `hit` signal. var player = Player.new() - # We use Signal.connect() again, and we also use the Callable.bind() method which - # returns a new Callable with the parameter binds. + # We use Signal.connect() again, and we also use the Callable.bind() method, + # which returns a new Callable with the parameter binds. player.hit.connect(_on_player_hit.bind("sword", 100)) func _on_button_down(): @@ -438,7 +776,7 @@ Connecting signals is one of the most common operations in Godot and the API giv // C# supports passing signals as events, so we can use this idiomatic construct: button.ButtonDown += OnButtonDown; - // This assumes that a `Player` class exists which defines a `Hit` signal. + // This assumes that a `Player` class exists, which defines a `Hit` signal. var player = new Player(); // Signals as events (`player.Hit += OnPlayerHit;`) do not support argument binding. You have to use: player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array {"sword", 100 }); @@ -503,13 +841,13 @@ As seen above, the recommended method to connect signals is not :ref:`connect` signal will be connected to ``_on_button_down``), option 3 offers the best validation: it will print a compile-time error if either the ``button_down`` signal or the ``_on_button_down`` callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if ``"button_down"`` doesn't correspond to a signal, or if ``"_on_button_down"`` is not a registered method in the object ``self``. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. +While all options have the same outcome (``button``'s :ref:`BaseButton.button_down` signal will be connected to ``_on_button_down``), **option 3** offers the best validation: it will print a compile-time error if either the ``button_down`` :ref:`Signal` or the ``_on_button_down`` :ref:`Callable` are not defined. On the other hand, **option 2** only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if ``"button_down"`` doesn't correspond to a signal, or if ``"_on_button_down"`` is not a registered method in the object ``self``. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. -\ **Parameter bindings and passing:**\ +\ **Binding and passing parameters:**\ -For legacy or language-specific reasons, there are also several ways to bind parameters to signals. One can pass a ``binds`` :ref:`Array` to :ref:`connect` or :ref:`Signal.connect`, or use the recommended :ref:`Callable.bind` method to create a new callable from an existing one, with the given parameter binds. +The syntax to bind parameters is through :ref:`Callable.bind`, which returns a copy of the :ref:`Callable` with its parameters bound. -One can also pass additional parameters when emitting the signal with :ref:`emit_signal`. The examples below show the relationship between those two types of parameters. +When calling :ref:`emit_signal`, the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. .. tabs:: @@ -517,18 +855,15 @@ One can also pass additional parameters when emitting the signal with :ref:`emit .. code-tab:: gdscript func _ready(): - # This assumes that a `Player` class exists which defines a `hit` signal. + # This assumes that a `Player` class exists, which defines a `hit` signal. var player = Player.new() - # Option 1: Using Callable.bind(). player.hit.connect(_on_player_hit.bind("sword", 100)) - # Option 2: Using a `binds` Array in Signal.connect() (same syntax for Object.connect()). - player.hit.connect(_on_player_hit, ["sword", 100]) # Parameters added when emitting the signal are passed first. player.emit_signal("hit", "Dark lord", 5) - # Four arguments, since we pass two when emitting (hit_by, level) - # and two when connecting (weapon_type, damage). + # We pass two arguments when emitting (`hit_by`, `level`), + # and bind two more arguments when connecting (`weapon_type`, `damage`). func _on_player_hit(hit_by, level, weapon_type, damage): print("Hit by %s (level %d) with weapon %s for %d damage." % [hit_by, level, weapon_type, damage]) @@ -536,19 +871,19 @@ One can also pass additional parameters when emitting the signal with :ref:`emit public override void _Ready() { - // This assumes that a `Player` class exists which defines a `Hit` signal. + // This assumes that a `Player` class exists, which defines a `Hit` signal. var player = new Player(); // Option 1: Using Callable.Bind(). This way we can still use signals as events. player.Hit += OnPlayerHit.Bind("sword", 100); - // Option 2: Using a `binds` Array in Signal.Connect() (same syntax for Object.Connect()). + // Option 2: Using a `binds` Array in Signal.Connect(). player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array{ "sword", 100 }); // Parameters added when emitting the signal are passed first. player.EmitSignal("hit", "Dark lord", 5); } - // Four arguments, since we pass two when emitting (hitBy, level) - // and two when connecting (weaponType, damage). + // We pass two arguments when emitting (`hit_by`, `level`), + // and bind two more arguments when connecting (`weapon_type`, `damage`). private void OnPlayerHit(string hitBy, int level, string weaponType, int damage) { GD.Print(String.Format("Hit by {0} (level {1}) with weapon {2} for {3} damage.", hitBy, level, weaponType, damage)); @@ -556,25 +891,31 @@ One can also pass additional parameters when emitting the signal with :ref:`emit +.. rst-class:: classref-item-separator + ---- .. _class_Object_method_disconnect: -- void **disconnect** **(** :ref:`StringName` signal, :ref:`Callable` callable **)** +.. rst-class:: classref-method -Disconnects a ``signal`` from a given ``callable``. +void **disconnect** **(** :ref:`StringName` signal, :ref:`Callable` callable **)** -If you try to disconnect a connection that does not exist, the method will print an error. Use :ref:`is_connected` to ensure that the connection exists. +Disconnects a ``signal`` by name from a given ``callable``. If the connection does not exist, generates an error. Use :ref:`is_connected` to make sure that the connection exists. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_emit_signal: -- :ref:`Error` **emit_signal** **(** :ref:`StringName` signal, ... **)** |vararg| +.. rst-class:: classref-method -Emits the given ``signal``. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. +:ref:`Error` **emit_signal** **(** :ref:`StringName` signal, ... **)** |vararg| -\ **Example:**\ +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`). This method supports a variable number of arguments, so parameters can be passed as a comma separated list. + +Returns :ref:`@GlobalScope.ERR_UNAVAILABLE` if ``signal`` does not exist or the parameters are invalid. .. tabs:: @@ -586,272 +927,572 @@ Emits the given ``signal``. The signal must exist, so it should be a built-in si .. code-tab:: csharp - EmitSignal("hit", "sword", 100); - EmitSignal("game_over"); + EmitSignal("Hit", "sword", 100); + EmitSignal("GameOver"); +\ **Note:** In C#, ``signal`` must be in snake_case when referring to built-in Godot signals. Prefer using the names exposed in the ``SignalName`` class to avoid allocating a new :ref:`StringName` on each call. + +.. rst-class:: classref-item-separator + ---- .. _class_Object_method_free: -- void **free** **(** **)** +.. rst-class:: classref-method -Deletes the object from memory. Any pre-existing reference to the freed object will become invalid, e.g. ``is_instance_valid(object)`` will return ``false``. +void **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` will return ``false``. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get: -- :ref:`Variant` **get** **(** :ref:`StringName` property **)** |const| +.. rst-class:: classref-method -Returns the :ref:`Variant` value of the given ``property``. If the ``property`` doesn't exist, this will return ``null``. +:ref:`Variant` **get** **(** :ref:`StringName` property **)** |const| -\ **Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). +Returns the :ref:`Variant` value of the given ``property``. If the ``property`` does not exist, this method returns ``null``. + + +.. tabs:: + + .. code-tab:: gdscript + + var node = Node2D.new() + node.rotation = 1.5 + var a = node.get("rotation") # a is 1.5 + + .. code-tab:: csharp + + var node = new Node2D(); + node.Rotation = 1.5f; + var a = node.Get("rotation"); // a is 1.5 + + + +\ **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` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_class: -- :ref:`String` **get_class** **(** **)** |const| +.. rst-class:: classref-method -Returns the object's class as a :ref:`String`. See also :ref:`is_class`. +:ref:`String` **get_class** **(** **)** |const| -\ **Note:** :ref:`get_class` does not take ``class_name`` declarations into account. If the object has a ``class_name`` defined, the base class name will be returned instead. +Returns the object's built-in class name, as a :ref:`String`. See also :ref:`is_class`. + +\ **Note:** This method ignores ``class_name`` declarations. If this object's script has defined a ``class_name``, the base, built-in class name is returned instead. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_incoming_connections: -- :ref:`Dictionary[]` **get_incoming_connections** **(** **)** |const| +.. rst-class:: classref-method -Returns an :ref:`Array` of dictionaries with information about signals that are connected to the object. +:ref:`Dictionary[]` **get_incoming_connections** **(** **)** |const| -Each :ref:`Dictionary` contains three String entries: +Returns an :ref:`Array` of signal connections received by this object. Each connection is represented as a :ref:`Dictionary` that contains three entries: -- ``source`` is a reference to the signal emitter. +- ``signal`` is a reference to the :ref:`Signal`; -- ``signal_name`` is the name of the connected signal. +- ``callable`` is a reference to the :ref:`Callable`; -- ``method_name`` is the name of the method to which the signal is connected. +- ``flags`` is a combination of :ref:`ConnectFlags`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_indexed: -- :ref:`Variant` **get_indexed** **(** :ref:`NodePath` property_path **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_indexed** **(** :ref:`NodePath` property_path **)** |const| Gets the object's property indexed by the given ``property_path``. The path should be a :ref:`NodePath` relative to the current object and can use the colon character (``:``) to access nested properties. \ **Examples:** ``"position:x"`` or ``"material:next_pass:blend_mode"``. -\ **Note:** Even though the method takes :ref:`NodePath` argument, it doesn't support actual paths to :ref:`Node`\ s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use :ref:`Node.get_node_and_resource` instead. + +.. tabs:: + + .. code-tab:: gdscript + + var node = Node2D.new() + node.position = Vector2(5, -10) + var a = node.get_indexed("position") # a is Vector2(5, -10) + var b = node.get_indexed("position:y") # b is -10 + + .. code-tab:: csharp + + var node = new Node2D(); + node.Position = new Vector2(5, -10); + var a = node.GetIndexed("position"); // a is Vector2(5, -10) + var b = node.GetIndexed("position:y"); // b is -10 + + + +\ **Note:** In C#, ``property_path`` must be in snake_case when referring to built-in Godot properties. + +\ **Note:** This method does not support actual paths to nodes in the :ref:`SceneTree`, only sub-property paths. In the context of nodes, use :ref:`Node.get_node_and_resource` instead. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_instance_id: -- :ref:`int` **get_instance_id** **(** **)** |const| +.. rst-class:: classref-method -Returns the object's unique instance ID. +:ref:`int` **get_instance_id** **(** **)** |const| -This ID can be saved in :ref:`EncodedObjectAsID`, and can be used to retrieve the object instance with :ref:`@GlobalScope.instance_from_id`. +Returns the object's unique instance ID. This ID can be saved in :ref:`EncodedObjectAsID`, and can be used to retrieve this object instance with :ref:`@GlobalScope.instance_from_id`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_meta: -- :ref:`Variant` **get_meta** **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| +.. rst-class:: classref-method -Returns the object's metadata entry for the given ``name``. +:ref:`Variant` **get_meta** **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| -Throws error if the entry does not exist, unless ``default`` is not ``null`` (in which case the default value will be returned). See also :ref:`has_meta`, :ref:`set_meta` and :ref:`remove_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:** 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. +\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_meta_list: -- :ref:`PackedStringArray` **get_meta_list** **(** **)** |const| +.. rst-class:: classref-method -Returns the object's metadata as a :ref:`PackedStringArray`. +:ref:`PackedStringArray` **get_meta_list** **(** **)** |const| + +Returns the object's metadata entry names as a :ref:`PackedStringArray`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_method_list: -- :ref:`Dictionary[]` **get_method_list** **(** **)** |const| +.. rst-class:: classref-method -Returns the object's methods and their signatures as an :ref:`Array`. +:ref:`Dictionary[]` **get_method_list** **(** **)** |const| + +Returns this object's methods and their signatures as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` contains the following entries: + +- ``name`` is the name of the method, as a :ref:`String`; + +- ``args`` is an :ref:`Array` of dictionaries representing the arguments; + +- ``default_args`` is the default arguments as an :ref:`Array` of variants; + +- ``flags`` is a combination of :ref:`MethodFlags`; + +- ``id`` is the method's internal identifier :ref:`int`; + +- ``return`` is the returned value, as a :ref:`Dictionary`; + +\ **Note:** The dictionaries of ``args`` and ``return`` are formatted identically to the results of :ref:`get_property_list`, although not all entries are used. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_property_list: -- :ref:`Dictionary[]` **get_property_list** **(** **)** |const| +.. rst-class:: classref-method -Returns the object's property list as an :ref:`Array` of dictionaries. +:ref:`Dictionary[]` **get_property_list** **(** **)** |const| -Each property's :ref:`Dictionary` contain at least ``name: String`` and ``type: int`` (see :ref:`Variant.Type`) entries. Optionally, it can also include ``hint: int`` (see :ref:`PropertyHint`), ``hint_string: String``, and ``usage: int`` (see :ref:`PropertyUsageFlags`). +Returns the object's property list as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` contains the following entries: + +- ``name`` is the property's name, as a :ref:`String`; + +- ``class_name`` is an empty :ref:`StringName`, unless the property is :ref:`@GlobalScope.TYPE_OBJECT` and it inherits from a class; + +- ``type`` is the property's type, as an :ref:`int` (see :ref:`Variant.Type`); + +- ``hint`` is *how* the property is meant to be edited (see :ref:`PropertyHint`); + +- ``hint_string`` depends on the hint (see :ref:`PropertyHint`); + +- ``usage`` is a combination of :ref:`PropertyUsageFlags`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_script: -- :ref:`Variant` **get_script** **(** **)** |const| +.. rst-class:: classref-method -Returns the object's :ref:`Script` instance, or ``null`` if none is assigned. +:ref:`Variant` **get_script** **(** **)** |const| + +Returns the object's :ref:`Script` instance, or ``null`` if no script is attached. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_signal_connection_list: -- :ref:`Dictionary[]` **get_signal_connection_list** **(** :ref:`StringName` signal **)** |const| +.. rst-class:: classref-method -Returns an :ref:`Array` of connections for the given ``signal``. +:ref:`Dictionary[]` **get_signal_connection_list** **(** :ref:`StringName` signal **)** |const| + +Returns an :ref:`Array` of connections for the given ``signal`` name. Each connection is represented as a :ref:`Dictionary` that contains three entries: + +- ``signal`` is a reference to the :ref:`Signal`; + +- ``callable`` is a reference to the :ref:`Callable`; + +- ``flags`` is a combination of :ref:`ConnectFlags`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_get_signal_list: -- :ref:`Dictionary[]` **get_signal_list** **(** **)** |const| +.. rst-class:: classref-method -Returns the list of signals as an :ref:`Array` of dictionaries. +:ref:`Dictionary[]` **get_signal_list** **(** **)** |const| + +Returns the list of existing signals as an :ref:`Array` of dictionaries. + +\ **Note:** Due of the implementation, each :ref:`Dictionary` is formatted very similarly to the returned values of :ref:`get_method_list`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_has_meta: -- :ref:`bool` **has_meta** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_meta** **(** :ref:`StringName` name **)** |const| Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`get_meta`, :ref:`set_meta` and :ref:`remove_meta`. -\ **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. +\ **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_has_method: -- :ref:`bool` **has_method** **(** :ref:`StringName` method **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the object contains the given ``method``. +:ref:`bool` **has_method** **(** :ref:`StringName` method **)** |const| + +Returns ``true`` if the the given ``method`` name exists in the object. + +\ **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` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_has_signal: -- :ref:`bool` **has_signal** **(** :ref:`StringName` signal **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the given ``signal`` exists. +:ref:`bool` **has_signal** **(** :ref:`StringName` signal **)** |const| + +Returns ``true`` if the given ``signal`` name exists in the object. + +\ **Note:** In C#, ``signal`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``SignalName`` class to avoid allocating a new :ref:`StringName` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_has_user_signal: -- :ref:`bool` **has_user_signal** **(** :ref:`StringName` signal **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the given user-defined ``signal`` exists. Only signals added using :ref:`add_user_signal` are taken into account. +:ref:`bool` **has_user_signal** **(** :ref:`StringName` signal **)** |const| + +Returns ``true`` if the given user-defined ``signal`` name exists. Only signals added with :ref:`add_user_signal` are included. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_is_blocking_signals: -- :ref:`bool` **is_blocking_signals** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if signal emission blocking is enabled. +:ref:`bool` **is_blocking_signals** **(** **)** |const| + +Returns ``true`` if the object is blocking its signals from being emitted. See :ref:`set_block_signals`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_is_class: -- :ref:`bool` **is_class** **(** :ref:`String` class **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_class** **(** :ref:`String` class **)** |const| Returns ``true`` if the object inherits from the given ``class``. See also :ref:`get_class`. -\ **Note:** :ref:`is_class` does not take ``class_name`` declarations into account. If the object has a ``class_name`` defined, :ref:`is_class` will return ``false`` for that name. + +.. tabs:: + + .. code-tab:: gdscript + + var sprite2d = Sprite2D.new() + sprite2d.is_class("Sprite2D") # Returns true + sprite2d.is_class("Node") # Returns true + sprite2d.is_class("Node3D") # Returns false + + .. code-tab:: csharp + + var sprite2d = new Sprite2D(); + sprite2d.IsClass("Sprite2D"); // Returns true + sprite2d.IsClass("Node"); // Returns true + sprite2d.IsClass("Node3D"); // Returns false + + + +\ **Note:** This method ignores ``class_name`` declarations in the object's script. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_is_connected: -- :ref:`bool` **is_connected** **(** :ref:`StringName` signal, :ref:`Callable` callable **)** |const| +.. rst-class:: classref-method -Returns ``true`` if a connection exists for a given ``signal`` and ``callable``. +:ref:`bool` **is_connected** **(** :ref:`StringName` signal, :ref:`Callable` callable **)** |const| + +Returns ``true`` if a connection exists between the given ``signal`` name and ``callable``. + +\ **Note:** In C#, ``signal`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``SignalName`` class to avoid allocating a new :ref:`StringName` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_is_queued_for_deletion: -- :ref:`bool` **is_queued_for_deletion** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_queued_for_deletion** **(** **)** |const| Returns ``true`` if the :ref:`Node.queue_free` method was called for the object. +.. rst-class:: classref-item-separator + ---- .. _class_Object_method_notification: -- void **notification** **(** :ref:`int` what, :ref:`bool` reversed=false **)** +.. rst-class:: classref-method -Send a given notification to the object, which will also trigger a call to the :ref:`_notification` method of all classes that the object inherits from. +void **notification** **(** :ref:`int` what, :ref:`bool` reversed=false **)** -If ``reversed`` is ``true``, :ref:`_notification` is called first on the object's own class, and then up to its successive parent classes. If ``reversed`` is ``false``, :ref:`_notification` is called first on the highest ancestor (``Object`` itself), and then down to its successive inheriting classes. +Sends the given ``what`` notification to all classes inherited by the object, triggering calls to :ref:`_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. + + +.. tabs:: + + .. code-tab:: gdscript + + var player = Node2D.new() + player.set_script(load("res://player.gd")) + + player.notification(NOTIFICATION_ENTER_TREE) + # The call order is Object -> Node -> Node2D -> player.gd. + + player.notification(NOTIFICATION_ENTER_TREE, true) + # The call order is player.gd -> Node2D -> Node -> Object. + + .. code-tab:: csharp + + var player = new Node2D(); + player.SetScript(GD.Load("res://player.gd")); + + player.Notification(NotificationEnterTree); + // The call order is Object -> Node -> Node2D -> player.gd. + + player.notification(NotificationEnterTree, true); + // The call order is player.gd -> Node2D -> Node -> Object. + + + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_notify_property_list_changed: -- void **notify_property_list_changed** **(** **)** +.. rst-class:: classref-method -Notify the editor that the property list has changed by emitting the :ref:`property_list_changed` signal, so that editor plugins can take the new values into account. +void **notify_property_list_changed** **(** **)** + +Emits the :ref:`property_list_changed` signal. This is mainly used to refresh the editor, so that the Inspector and editor plugins are properly updated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Object_method_property_can_revert: + +.. rst-class:: classref-method + +:ref:`bool` **property_can_revert** **(** :ref:`StringName` property **)** |const| + +Returns ``true`` if the given ``property`` has a custom default value. Use :ref:`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` to customize the default value. If :ref:`_property_can_revert` is not implemented, this method returns ``false``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Object_method_property_get_revert: + +.. rst-class:: classref-method + +:ref:`Variant` **property_get_revert** **(** :ref:`StringName` property **)** |const| + +Returns the custom default value of the given ``property``. Use :ref:`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` to customize the default value. If :ref:`_property_get_revert` is not implemented, this method returns ``null``. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_remove_meta: -- void **remove_meta** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method -Removes a given entry from the object's metadata. See also :ref:`has_meta`, :ref:`get_meta` and :ref:`set_meta`. +void **remove_meta** **(** :ref:`StringName` name **)** + +Removes the given entry ``name`` from the object's metadata. See also :ref:`has_meta`, :ref:`get_meta` and :ref:`set_meta`. \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Object_method_set: -- void **set** **(** :ref:`StringName` property, :ref:`Variant` value **)** +.. rst-class:: classref-method -Assigns a new value to the given property. If the ``property`` does not exist or the given value's type doesn't match, nothing will happen. +void **set** **(** :ref:`StringName` property, :ref:`Variant` value **)** -\ **Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). +Assigns ``value`` to the given ``property``. If the property does not exist or the given ``value``'s type doesn't match, nothing happens. + + +.. tabs:: + + .. code-tab:: gdscript + + var node = Node2D.new() + node.set("global_scale", Vector2(8, 2.5)) + print(node.global_scale) # Prints (8, 2.5) + + .. code-tab:: csharp + + var node = new Node2D(); + node.Set("global_scale", new Vector2(8, 2.5)); + GD.Print(node.GlobalScale); // Prints Vector2(8, 2.5) + + + +\ **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` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_set_block_signals: -- void **set_block_signals** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method -If set to ``true``, signal emission is blocked. +void **set_block_signals** **(** :ref:`bool` enable **)** + +If set to ``true``, the object becomes unable to emit signals. As such, :ref:`emit_signal` and signal connections will not work, until it is set to ``false``. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_set_deferred: -- void **set_deferred** **(** :ref:`StringName` property, :ref:`Variant` value **)** +.. rst-class:: classref-method -Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling :ref:`set` via :ref:`call_deferred`, i.e. ``call_deferred("set", property, value)``. +void **set_deferred** **(** :ref:`StringName` property, :ref:`Variant` value **)** -\ **Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). +Assigns ``value`` to the given ``property``, after the current frame's physics step. This is equivalent to calling :ref:`set` through :ref:`call_deferred`. + + +.. tabs:: + + .. code-tab:: gdscript + + var node = Node2D.new() + add_child(node) + + node.rotation = 45.0 + node.set_deferred("rotation", 90.0) + print(node.rotation) # Prints 45.0 + + await get_tree().process_frame + print(node.rotation) # Prints 90.0 + + .. code-tab:: csharp + + var node = new Node2D(); + node.Rotation = 45f; + node.SetDeferred("rotation", 90f); + GD.Print(node.Rotation); // Prints 45.0 + + await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame); + GD.Print(node.Rotation); // Prints 90.0 + + + +\ **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` on each call. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_set_indexed: -- void **set_indexed** **(** :ref:`NodePath` property_path, :ref:`Variant` value **)** +.. rst-class:: classref-method -Assigns a new value to the property identified by the ``property_path``. The path should be a :ref:`NodePath` relative to the current object and can use the colon character (``:``) to access nested properties. +void **set_indexed** **(** :ref:`NodePath` property_path, :ref:`Variant` value **)** -\ **Example:**\ +Assigns a new ``value`` to the property identified by the ``property_path``. The path should be a :ref:`NodePath` relative to this object, and can use the colon character (``:``) to access nested properties. .. tabs:: @@ -861,84 +1502,108 @@ Assigns a new value to the property identified by the ``property_path``. The pat var node = Node2D.new() node.set_indexed("position", Vector2(42, 0)) node.set_indexed("position:y", -10) - print(node.position) # (42, -10) + print(node.position) # Prints (42, -10) .. code-tab:: csharp var node = new Node2D(); node.SetIndexed("position", new Vector2(42, 0)); node.SetIndexed("position:y", -10); - GD.Print(node.Position); // (42, -10) + GD.Print(node.Position); // Prints (42, -10) +\ **Note:** In C#, ``property_path`` must be in snake_case when referring to built-in Godot properties. + +.. rst-class:: classref-item-separator + ---- .. _class_Object_method_set_message_translation: -- void **set_message_translation** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method -Defines whether the object can translate strings (with calls to :ref:`tr`). Enabled by default. +void **set_message_translation** **(** :ref:`bool` enable **)** + +If set to ``true``, allows the object to translate messages with :ref:`tr` and :ref:`tr_n`. Enabled by default. See also :ref:`can_translate_messages`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_set_meta: -- void **set_meta** **(** :ref:`StringName` name, :ref:`Variant` value **)** +.. rst-class:: classref-method -Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any :ref:`Variant` value. +void **set_meta** **(** :ref:`StringName` name, :ref:`Variant` value **)** -To remove a given entry from the object's metadata, use :ref:`remove_meta`. Metadata is also removed if its value is set to ``null``. This means you can also use ``set_meta("name", null)`` to remove metadata for ``"name"``. See also :ref:`has_meta` and :ref:`get_meta`. +Adds or changes the entry ``name`` inside the object's metadata. The metadata ``value`` can be any :ref:`Variant`, although some types cannot be serialised correctly. -\ **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. +If ``value`` is ``null``, the entry is removed. This is the equivalent of using :ref:`remove_meta`. See also :ref:`has_meta` and :ref:`get_meta`. + +\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_set_script: -- void **set_script** **(** :ref:`Variant` script **)** +.. rst-class:: classref-method -Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. +void **set_script** **(** :ref:`Variant` script **)** -If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's :ref:`_init` method will be called. +Attaches ``script`` to the object, and instantiates it. As a result, the script's :ref:`_init` is called. A :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_to_string: -- :ref:`String` **to_string** **(** **)** +.. rst-class:: classref-method -Returns a :ref:`String` representing the object. If not overridden, defaults to ``"[ClassName:RID]"``. +:ref:`String` **to_string** **(** **)** -Override the method :ref:`_to_string` to customize the :ref:`String` representation. +Returns a :ref:`String` representing the object. Defaults to ``""``. Override :ref:`_to_string` to customize the string representation of the object. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_tr: -- :ref:`String` **tr** **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| +.. rst-class:: classref-method -Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. +:ref:`String` **tr** **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| -Only works if message translation is enabled (which it is by default), otherwise it returns the ``message`` unchanged. See :ref:`set_message_translation`. +Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. -See :doc:`Internationalizing games <../tutorials/i18n/internationalizing_games>` for examples of the usage of this method. +If :ref:`can_translate_messages` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`set_message_translation`. + +For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/internationalizing_games>`. + +.. rst-class:: classref-item-separator ---- .. _class_Object_method_tr_n: -- :ref:`String` **tr_n** **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| +.. rst-class:: classref-method -Translates a message involving plurals using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. +:ref:`String` **tr_n** **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| -Only works if message translation is enabled (which it is by default), otherwise it returns the ``message`` or ``plural_message`` unchanged. See :ref:`set_message_translation`. +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. -The number ``n`` is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. +If :ref:`can_translate_messages` is ``false``, or no translation is available, this method returns ``message`` or ``plural_message``, without changes. See :ref:`set_message_translation`. -\ **Note:** Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, use :ref:`tr`. +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. -See :doc:`Localization using gettext <../tutorials/i18n/localization_using_gettext>` for examples of the usage of this method. +For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/localization_using_gettext>`. + +\ **Note:** Negative and :ref:`float` numbers may not properly apply to some countable subjects. It's recommended handling these cases with :ref:`tr`. .. |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.)` diff --git a/classes/class_occluder3d.rst b/classes/class_occluder3d.rst index 1caf9bdae..16f399b85 100644 --- a/classes/class_occluder3d.rst +++ b/classes/class_occluder3d.rst @@ -16,36 +16,55 @@ Occluder3D Occluder shape resource for use with occlusion culling in :ref:`OccluderInstance3D`. +.. rst-class:: classref-introduction-group + Description ----------- -``Occluder3D`` stores an occluder shape that can be used by the engine's occlusion culling system. +**Occluder3D** stores an occluder shape that can be used by the engine's occlusion culling system. See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_indices` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_vertices` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_indices` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_vertices` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Occluder3D_method_get_indices: -- :ref:`PackedInt32Array` **get_indices** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_indices** **(** **)** |const| Returns the occluder shape's vertex indices. +.. rst-class:: classref-item-separator + ---- .. _class_Occluder3D_method_get_vertices: -- :ref:`PackedVector3Array` **get_vertices** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_vertices** **(** **)** |const| Returns the occluder shape's vertex positions. diff --git a/classes/class_occluderinstance3d.rst b/classes/class_occluderinstance3d.rst index 94fb9c65a..c50fffa6e 100644 --- a/classes/class_occluderinstance3d.rst +++ b/classes/class_occluderinstance3d.rst @@ -14,71 +14,89 @@ OccluderInstance3D Provides occlusion culling for 3D nodes, which improves performance in closed areas. +.. rst-class:: classref-introduction-group + Description ----------- Occlusion culling can improve rendering performance in closed/semi-open areas by hiding geometry that is occluded by other objects. -The occlusion culling system is mostly static. ``OccluderInstance3D``\ s can be moved or hidden at run-time, but doing so will trigger a background recomputation that can take several frames. It is recommended to only move ``OccluderInstance3D``\ s sporadically (e.g. for procedural generation purposes), rather than doing so every frame. +The occlusion culling system is mostly static. **OccluderInstance3D**\ s can be moved or hidden at run-time, but doing so will trigger a background recomputation that can take several frames. It is recommended to only move **OccluderInstance3D**\ s sporadically (e.g. for procedural generation purposes), rather than doing so every frame. The occlusion culling system works by rendering the occluders on the CPU in parallel using `Embree `__, drawing the result to a low-resolution buffer then using this to cull 3D nodes individually. In the 3D editor, you can preview the occlusion culling buffer by choosing **Perspective > Debug Advanced... > Occlusion Culling Buffer** in the top-left corner of the 3D viewport. The occlusion culling buffer quality can be adjusted in the Project Settings. -\ **Baking:** Select an ``OccluderInstance3D`` node, then use the **Bake Occluders** button at the top of the 3D editor. Only opaque materials will be taken into account; transparent materials (alpha-blended or alpha-tested) will be ignored by the occluder generation. +\ **Baking:** Select an **OccluderInstance3D** node, then use the **Bake Occluders** button at the top of the 3D editor. Only opaque materials will be taken into account; transparent materials (alpha-blended or alpha-tested) will be ignored by the occluder generation. \ **Note:** Occlusion culling is only effective if :ref:`ProjectSettings.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` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ -| :ref:`int` | :ref:`bake_mask` | ``4294967295`` | -+-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`bake_simplification_distance` | ``0.1`` | -+-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ -| :ref:`Occluder3D` | :ref:`occluder` | | -+-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ +.. table:: + :widths: auto + + +-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`bake_mask` | ``4294967295`` | + +-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`bake_simplification_distance` | ``0.1`` | + +-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ + | :ref:`Occluder3D` | :ref:`occluder` | | + +-------------------------------------+-----------------------------------------------------------------------------------------------------+----------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_bake_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bake_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_bake_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bake_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OccluderInstance3D_property_bake_mask: -- :ref:`int` **bake_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4294967295`` | -+-----------+----------------------+ -| *Setter* | set_bake_mask(value) | -+-----------+----------------------+ -| *Getter* | get_bake_mask() | -+-----------+----------------------+ +:ref:`int` **bake_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_bake_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_bake_mask** **(** **)** The visual layers to account for when baking for occluders. Only :ref:`MeshInstance3D`\ s whose :ref:`VisualInstance3D.layers` match with this :ref:`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. To improve performance and avoid artifacts, it is recommended to exclude dynamic objects, small objects and fixtures from the baking process by moving them to a separate visual layer and excluding this layer in :ref:`bake_mask`. +.. rst-class:: classref-item-separator + ---- .. _class_OccluderInstance3D_property_bake_simplification_distance: -- :ref:`float` **bake_simplification_distance** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``0.1`` | -+-----------+-----------------------------------------+ -| *Setter* | set_bake_simplification_distance(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_bake_simplification_distance() | -+-----------+-----------------------------------------+ +:ref:`float` **bake_simplification_distance** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_bake_simplification_distance** **(** :ref:`float` value **)** +- :ref:`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. @@ -88,38 +106,53 @@ Setting this to ``0.0`` disables simplification entirely, but vertices in the ex \ **Note:** This uses the `meshoptimizer `__ library under the hood, similar to LOD generation. +.. rst-class:: classref-item-separator + ---- .. _class_OccluderInstance3D_property_occluder: -- :ref:`Occluder3D` **occluder** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_occluder(value) | -+----------+---------------------+ -| *Getter* | get_occluder() | -+----------+---------------------+ +:ref:`Occluder3D` **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. +.. rst-class:: classref-property-setget + +- void **set_occluder** **(** :ref:`Occluder3D` value **)** +- :ref:`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. You can also draw your own 2D occluder polygon by adding a new :ref:`PolygonOccluder3D` resource to the :ref:`occluder` property in the Inspector. Alternatively, you can select a primitive occluder to use: :ref:`QuadOccluder3D`, :ref:`BoxOccluder3D` or :ref:`SphereOccluder3D`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OccluderInstance3D_method_get_bake_mask_value: -- :ref:`bool` **get_bake_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_bake_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`bake_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_OccluderInstance3D_method_set_bake_mask_value: -- void **set_bake_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_bake_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`bake_mask`, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst index be1c3f54e..69472117c 100644 --- a/classes/class_occluderpolygon2d.rst +++ b/classes/class_occluderpolygon2d.rst @@ -14,87 +14,121 @@ OccluderPolygon2D Defines a 2D polygon for LightOccluder2D. +.. rst-class:: classref-introduction-group + Description ----------- Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`closed` | ``true`` | -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ -| :ref:`CullMode` | :ref:`cull_mode` | ``0`` | -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | -+-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`closed` | ``true`` | + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + | :ref:`CullMode` | :ref:`cull_mode` | ``0`` | + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | + +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_OccluderPolygon2D_CullMode: -.. _class_OccluderPolygon2D_constant_CULL_DISABLED: - -.. _class_OccluderPolygon2D_constant_CULL_CLOCKWISE: - -.. _class_OccluderPolygon2D_constant_CULL_COUNTER_CLOCKWISE: +.. rst-class:: classref-enumeration enum **CullMode**: -- **CULL_DISABLED** = **0** --- Culling is disabled. See :ref:`cull_mode`. +.. _class_OccluderPolygon2D_constant_CULL_DISABLED: -- **CULL_CLOCKWISE** = **1** --- Culling is performed in the clockwise direction. See :ref:`cull_mode`. +.. rst-class:: classref-enumeration-constant -- **CULL_COUNTER_CLOCKWISE** = **2** --- Culling is performed in the counterclockwise direction. See :ref:`cull_mode`. +:ref:`CullMode` **CULL_DISABLED** = ``0`` + +Culling is disabled. See :ref:`cull_mode`. + +.. _class_OccluderPolygon2D_constant_CULL_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CullMode` **CULL_CLOCKWISE** = ``1`` + +Culling is performed in the clockwise direction. See :ref:`cull_mode`. + +.. _class_OccluderPolygon2D_constant_CULL_COUNTER_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CullMode` **CULL_COUNTER_CLOCKWISE** = ``2`` + +Culling is performed in the counterclockwise direction. See :ref:`cull_mode`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OccluderPolygon2D_property_closed: -- :ref:`bool` **closed** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_closed(value) | -+-----------+-------------------+ -| *Getter* | is_closed() | -+-----------+-------------------+ +:ref:`bool` **closed** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_closed** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_OccluderPolygon2D_property_cull_mode: -- :ref:`CullMode` **cull_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_cull_mode(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mode() | -+-----------+----------------------+ +:ref:`CullMode` **cull_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mode** **(** :ref:`CullMode` value **)** +- :ref:`CullMode` **get_cull_mode** **(** **)** The culling mode to use. +.. rst-class:: classref-item-separator + ---- .. _class_OccluderPolygon2D_property_polygon: -- :ref:`PackedVector2Array` **polygon** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_polygon(value) | -+-----------+--------------------------+ -| *Getter* | get_polygon() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** +- :ref:`PackedVector2Array` **get_polygon** **(** **)** A :ref:`Vector2` array with the index for polygon's vertices positions. diff --git a/classes/class_offlinemultiplayerpeer.rst b/classes/class_offlinemultiplayerpeer.rst new file mode 100644 index 000000000..3ff641ae3 --- /dev/null +++ b/classes/class_offlinemultiplayerpeer.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/OfflineMultiplayerPeer.xml. + +.. _class_OfflineMultiplayerPeer: + +OfflineMultiplayerPeer +====================== + +**Inherits:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` + +A :ref:`MultiplayerPeer` which is always connected and acts as a server. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is the default :ref:`MultiplayerAPI.multiplayer_peer` for the :ref:`Node.multiplayer`. It mimics the behavior of a server with no peers connected. + +This means that the :ref:`SceneTree` will act as the multiplayer authority by default. Calls to :ref:`MultiplayerAPI.is_server` will return ``true``, and calls to :ref:`MultiplayerAPI.get_unique_id` will return :ref:`MultiplayerPeer.TARGET_PEER_SERVER`. + +.. |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.)` diff --git a/classes/class_oggpacketsequence.rst b/classes/class_oggpacketsequence.rst index 5b81edf07..65b2bc5de 100644 --- a/classes/class_oggpacketsequence.rst +++ b/classes/class_oggpacketsequence.rst @@ -14,84 +14,111 @@ OggPacketSequence A sequence of Ogg packets. +.. rst-class:: classref-introduction-group + Description ----------- A sequence of Ogg packets. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ -| :ref:`PackedInt64Array` | :ref:`granule_positions` | ``PackedInt64Array()`` | -+-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ -| :ref:`Array[]` | :ref:`packet_data` | ``[]`` | -+-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ -| :ref:`float` | :ref:`sampling_rate` | ``0.0`` | -+-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt64Array` | :ref:`granule_positions` | ``PackedInt64Array()`` | + +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + | :ref:`Array[]` | :ref:`packet_data` | ``[]`` | + +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + | :ref:`float` | :ref:`sampling_rate` | ``0.0`` | + +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+----------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_length` **(** **)** |const| | -+---------------------------+----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_length` **(** **)** |const| | + +---------------------------+----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OggPacketSequence_property_granule_positions: -- :ref:`PackedInt64Array` **granule_positions** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``PackedInt64Array()`` | -+-----------+-------------------------------------+ -| *Setter* | set_packet_granule_positions(value) | -+-----------+-------------------------------------+ -| *Getter* | get_packet_granule_positions() | -+-----------+-------------------------------------+ +:ref:`PackedInt64Array` **granule_positions** = ``PackedInt64Array()`` + +.. rst-class:: classref-property-setget + +- void **set_packet_granule_positions** **(** :ref:`PackedInt64Array` value **)** +- :ref:`PackedInt64Array` **get_packet_granule_positions** **(** **)** Contains the granule positions for each page in this packet sequence. +.. rst-class:: classref-item-separator + ---- .. _class_OggPacketSequence_property_packet_data: -- :ref:`Array[]` **packet_data** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``[]`` | -+-----------+------------------------+ -| *Setter* | set_packet_data(value) | -+-----------+------------------------+ -| *Getter* | get_packet_data() | -+-----------+------------------------+ +:ref:`Array[]` **packet_data** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_packet_data** **(** :ref:`Array[]` value **)** +- :ref:`Array[]` **get_packet_data** **(** **)** Contains the raw packets that make up this OggPacketSequence. +.. rst-class:: classref-item-separator + ---- .. _class_OggPacketSequence_property_sampling_rate: -- :ref:`float` **sampling_rate** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_sampling_rate(value) | -+-----------+--------------------------+ -| *Getter* | get_sampling_rate() | -+-----------+--------------------------+ +:ref:`float` **sampling_rate** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_sampling_rate** **(** :ref:`float` value **)** +- :ref:`float` **get_sampling_rate** **(** **)** Holds sample rate information about this sequence. Must be set by another class that actually understands the codec. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OggPacketSequence_method_get_length: -- :ref:`float` **get_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_length** **(** **)** |const| The length of this stream, in seconds. diff --git a/classes/class_omnilight3d.rst b/classes/class_omnilight3d.rst index 385e97125..e1ca547be 100644 --- a/classes/class_omnilight3d.rst +++ b/classes/class_omnilight3d.rst @@ -14,92 +14,124 @@ OmniLight3D Omnidirectional light, such as a light bulb or a candle. +.. rst-class:: classref-introduction-group + Description ----------- An Omnidirectional light is a type of :ref:`Light3D` that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`3D lights and shadows <../tutorials/3d/lights_and_shadows>` +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`omni_attenuation` | ``1.0`` | -+------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`omni_range` | ``5.0`` | -+------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`ShadowMode` | :ref:`omni_shadow_mode` | ``1`` | -+------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | shadow_bias | ``0.2`` (overrides :ref:`Light3D`) | -+------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ + | :ref:`float` | :ref:`omni_attenuation` | ``1.0`` | + +------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ + | :ref:`float` | :ref:`omni_range` | ``5.0`` | + +------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ + | :ref:`ShadowMode` | :ref:`omni_shadow_mode` | ``1`` | + +------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ + | :ref:`float` | shadow_bias | ``0.2`` (overrides :ref:`Light3D`) | + +------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_OmniLight3D_ShadowMode: -.. _class_OmniLight3D_constant_SHADOW_DUAL_PARABOLOID: - -.. _class_OmniLight3D_constant_SHADOW_CUBE: +.. rst-class:: classref-enumeration enum **ShadowMode**: -- **SHADOW_DUAL_PARABOLOID** = **0** --- Shadows are rendered to a dual-paraboloid texture. Faster than :ref:`SHADOW_CUBE`, but lower-quality. +.. _class_OmniLight3D_constant_SHADOW_DUAL_PARABOLOID: -- **SHADOW_CUBE** = **1** --- Shadows are rendered to a cubemap. Slower than :ref:`SHADOW_DUAL_PARABOLOID`, but higher-quality. +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowMode` **SHADOW_DUAL_PARABOLOID** = ``0`` + +Shadows are rendered to a dual-paraboloid texture. Faster than :ref:`SHADOW_CUBE`, but lower-quality. + +.. _class_OmniLight3D_constant_SHADOW_CUBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowMode` **SHADOW_CUBE** = ``1`` + +Shadows are rendered to a cubemap. Slower than :ref:`SHADOW_DUAL_PARABOLOID`, but higher-quality. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OmniLight3D_property_omni_attenuation: -- :ref:`float` **omni_attenuation** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **omni_attenuation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :ref:`float` **get_param** **(** **)** The light's attenuation (drop-off) curve. A number of presets are available in the **Inspector** by right-clicking the curve. +.. rst-class:: classref-item-separator + ---- .. _class_OmniLight3D_property_omni_range: -- :ref:`float` **omni_range** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``5.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **omni_range** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :ref:`float` **get_param** **(** **)** The light's radius. Note that the effectively lit area may appear to be smaller depending on the :ref:`omni_attenuation` in use. No matter the :ref:`omni_attenuation` in use, the light will never reach anything outside this radius. \ **Note:** :ref:`omni_range` is not affected by :ref:`Node3D.scale` (the light's scale or its parent's scale). +.. rst-class:: classref-item-separator + ---- .. _class_OmniLight3D_property_omni_shadow_mode: -- :ref:`ShadowMode` **omni_shadow_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_shadow_mode(value) | -+-----------+------------------------+ -| *Getter* | get_shadow_mode() | -+-----------+------------------------+ +:ref:`ShadowMode` **omni_shadow_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_mode** **(** :ref:`ShadowMode` value **)** +- :ref:`ShadowMode` **get_shadow_mode** **(** **)** See :ref:`ShadowMode`. diff --git a/classes/class_openxraction.rst b/classes/class_openxraction.rst index 8437c966f..d94482cca 100644 --- a/classes/class_openxraction.rst +++ b/classes/class_openxraction.rst @@ -14,6 +14,8 @@ OpenXRAction An OpenXR action. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,86 +27,122 @@ Actions are not directly bound to specific devices, instead OpenXR recognizes a Note that the name of the resource is used to register the action with. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ -| :ref:`ActionType` | :ref:`action_type` | ``1`` | -+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ -| :ref:`String` | :ref:`localized_name` | ``""`` | -+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`toplevel_paths` | ``PackedStringArray()`` | -+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ + | :ref:`ActionType` | :ref:`action_type` | ``1`` | + +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ + | :ref:`String` | :ref:`localized_name` | ``""`` | + +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`toplevel_paths` | ``PackedStringArray()`` | + +---------------------------------------------------+-------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_OpenXRAction_ActionType: -.. _class_OpenXRAction_constant_OPENXR_ACTION_BOOL: - -.. _class_OpenXRAction_constant_OPENXR_ACTION_FLOAT: - -.. _class_OpenXRAction_constant_OPENXR_ACTION_VECTOR2: - -.. _class_OpenXRAction_constant_OPENXR_ACTION_POSE: +.. rst-class:: classref-enumeration enum **ActionType**: -- **OPENXR_ACTION_BOOL** = **0** --- This action provides a boolean value. +.. _class_OpenXRAction_constant_OPENXR_ACTION_BOOL: -- **OPENXR_ACTION_FLOAT** = **1** --- This action provides a float value between ``0.0`` and ``1.0`` for any analogue input such as triggers. +.. rst-class:: classref-enumeration-constant -- **OPENXR_ACTION_VECTOR2** = **2** --- This action provides a vector2 value and can be bound to embedded trackpads and joysticks +:ref:`ActionType` **OPENXR_ACTION_BOOL** = ``0`` -- **OPENXR_ACTION_POSE** = **3** +This action provides a boolean value. + +.. _class_OpenXRAction_constant_OPENXR_ACTION_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ActionType` **OPENXR_ACTION_FLOAT** = ``1`` + +This action provides a float value between ``0.0`` and ``1.0`` for any analogue input such as triggers. + +.. _class_OpenXRAction_constant_OPENXR_ACTION_VECTOR2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ActionType` **OPENXR_ACTION_VECTOR2** = ``2`` + +This action provides a vector2 value and can be bound to embedded trackpads and joysticks + +.. _class_OpenXRAction_constant_OPENXR_ACTION_POSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ActionType` **OPENXR_ACTION_POSE** = ``3`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OpenXRAction_property_action_type: -- :ref:`ActionType` **action_type** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_action_type(value) | -+-----------+------------------------+ -| *Getter* | get_action_type() | -+-----------+------------------------+ +:ref:`ActionType` **action_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_action_type** **(** :ref:`ActionType` value **)** +- :ref:`ActionType` **get_action_type** **(** **)** The type of action. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRAction_property_localized_name: -- :ref:`String` **localized_name** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``""`` | -+-----------+---------------------------+ -| *Setter* | set_localized_name(value) | -+-----------+---------------------------+ -| *Getter* | get_localized_name() | -+-----------+---------------------------+ +:ref:`String` **localized_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_localized_name** **(** :ref:`String` value **)** +- :ref:`String` **get_localized_name** **(** **)** The localized description of this action. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRAction_property_toplevel_paths: -- :ref:`PackedStringArray` **toplevel_paths** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+---------------------------+ -| *Setter* | set_toplevel_paths(value) | -+-----------+---------------------------+ -| *Getter* | get_toplevel_paths() | -+-----------+---------------------------+ +:ref:`PackedStringArray` **toplevel_paths** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_toplevel_paths** **(** :ref:`PackedStringArray` value **)** +- :ref:`PackedStringArray` **get_toplevel_paths** **(** **)** A collections of toplevel paths to which this action can be bound. diff --git a/classes/class_openxractionmap.rst b/classes/class_openxractionmap.rst index de428b60d..ab282f1b4 100644 --- a/classes/class_openxractionmap.rst +++ b/classes/class_openxractionmap.rst @@ -14,6 +14,8 @@ OpenXRActionMap Collection of :ref:`OpenXRActionSet` and :ref:`OpenXRInteractionProfile` resources for the OpenXR module. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,161 +25,225 @@ Another important distinction is that OpenXR offers no control over these bindin The action map therefore needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------------------------+--------+ -| :ref:`Array` | :ref:`action_sets` | ``[]`` | -+---------------------------+----------------------------------------------------------------------------------+--------+ -| :ref:`Array` | :ref:`interaction_profiles` | ``[]`` | -+---------------------------+----------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------+--------+ + | :ref:`Array` | :ref:`action_sets` | ``[]`` | + +---------------------------+----------------------------------------------------------------------------------+--------+ + | :ref:`Array` | :ref:`interaction_profiles` | ``[]`` | + +---------------------------+----------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_default_action_sets` **(** **)** | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`OpenXRActionSet` | :ref:`find_action_set` **(** :ref:`String` name **)** |const| | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`OpenXRInteractionProfile` | :ref:`find_interaction_profile` **(** :ref:`String` name **)** |const| | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`OpenXRActionSet` | :ref:`get_action_set` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_action_set_count` **(** **)** |const| | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`OpenXRInteractionProfile` | :ref:`get_interaction_profile` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_interaction_profile_count` **(** **)** |const| | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | -+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_default_action_sets` **(** **)** | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRActionSet` | :ref:`find_action_set` **(** :ref:`String` name **)** |const| | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRInteractionProfile` | :ref:`find_interaction_profile` **(** :ref:`String` name **)** |const| | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRActionSet` | :ref:`get_action_set` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_action_set_count` **(** **)** |const| | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRInteractionProfile` | :ref:`get_interaction_profile` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_interaction_profile_count` **(** **)** |const| | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | + +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OpenXRActionMap_property_action_sets: -- :ref:`Array` **action_sets** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``[]`` | -+-----------+------------------------+ -| *Setter* | set_action_sets(value) | -+-----------+------------------------+ -| *Getter* | get_action_sets() | -+-----------+------------------------+ +:ref:`Array` **action_sets** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_action_sets** **(** :ref:`Array` value **)** +- :ref:`Array` **get_action_sets** **(** **)** Collection of :ref:`OpenXRActionSet`\ s that are part of this action map. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_property_interaction_profiles: -- :ref:`Array` **interaction_profiles** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``[]`` | -+-----------+---------------------------------+ -| *Setter* | set_interaction_profiles(value) | -+-----------+---------------------------------+ -| *Getter* | get_interaction_profiles() | -+-----------+---------------------------------+ +:ref:`Array` **interaction_profiles** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_interaction_profiles** **(** :ref:`Array` value **)** +- :ref:`Array` **get_interaction_profiles** **(** **)** Collection of :ref:`OpenXRInteractionProfile`\ s that are part of this action map. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OpenXRActionMap_method_add_action_set: -- void **add_action_set** **(** :ref:`OpenXRActionSet` action_set **)** +.. rst-class:: classref-method + +void **add_action_set** **(** :ref:`OpenXRActionSet` action_set **)** Add an action set. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_add_interaction_profile: -- void **add_interaction_profile** **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** +.. rst-class:: classref-method + +void **add_interaction_profile** **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** Add an interaction profile. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_create_default_action_sets: -- void **create_default_action_sets** **(** **)** +.. rst-class:: classref-method + +void **create_default_action_sets** **(** **)** Setup this action set with our default actions. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_find_action_set: -- :ref:`OpenXRActionSet` **find_action_set** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`OpenXRActionSet` **find_action_set** **(** :ref:`String` name **)** |const| Retrieve an action set by name. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_find_interaction_profile: -- :ref:`OpenXRInteractionProfile` **find_interaction_profile** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`OpenXRInteractionProfile` **find_interaction_profile** **(** :ref:`String` name **)** |const| Find an interaction profile by its name (path). +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_get_action_set: -- :ref:`OpenXRActionSet` **get_action_set** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`OpenXRActionSet` **get_action_set** **(** :ref:`int` idx **)** |const| Retrieve the action set at this index. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_get_action_set_count: -- :ref:`int` **get_action_set_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_action_set_count** **(** **)** |const| Retrieve the number of actions sets in our action map. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_get_interaction_profile: -- :ref:`OpenXRInteractionProfile` **get_interaction_profile** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`OpenXRInteractionProfile` **get_interaction_profile** **(** :ref:`int` idx **)** |const| Get the interaction profile at this index. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_get_interaction_profile_count: -- :ref:`int` **get_interaction_profile_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_interaction_profile_count** **(** **)** |const| Retrieve the number of interaction profiles in our action map. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_remove_action_set: -- void **remove_action_set** **(** :ref:`OpenXRActionSet` action_set **)** +.. rst-class:: classref-method + +void **remove_action_set** **(** :ref:`OpenXRActionSet` action_set **)** Remove an action set. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionMap_method_remove_interaction_profile: -- void **remove_interaction_profile** **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** +.. rst-class:: classref-method + +void **remove_interaction_profile** **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** Remove an interaction profile. diff --git a/classes/class_openxractionset.rst b/classes/class_openxractionset.rst index 12e874373..6916c3896 100644 --- a/classes/class_openxractionset.rst +++ b/classes/class_openxractionset.rst @@ -14,6 +14,8 @@ OpenXRActionSet Collection of :ref:`OpenXRAction` resources that make up an action set. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,99 +23,132 @@ Action sets in OpenXR define a collection of actions that can be activated in un Action sets can contain the same action with the same name, if such action sets are active at the same time the action set with the highest priority defines which binding is active. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+----------------------------------------------------------------------+--------+ -| :ref:`Array` | :ref:`actions` | ``[]`` | -+-----------------------------+----------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`localized_name` | ``""`` | -+-----------------------------+----------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`priority` | ``0`` | -+-----------------------------+----------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------------+--------+ + | :ref:`Array` | :ref:`actions` | ``[]`` | + +-----------------------------+----------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`localized_name` | ``""`` | + +-----------------------------+----------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`priority` | ``0`` | + +-----------------------------+----------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_action` **(** :ref:`OpenXRAction` action **)** | -+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_action_count` **(** **)** |const| | -+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_action` **(** :ref:`OpenXRAction` action **)** | -+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_action` **(** :ref:`OpenXRAction` action **)** | + +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_action_count` **(** **)** |const| | + +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_action` **(** :ref:`OpenXRAction` action **)** | + +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OpenXRActionSet_property_actions: -- :ref:`Array` **actions** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_actions(value) | -+-----------+--------------------+ -| *Getter* | get_actions() | -+-----------+--------------------+ +:ref:`Array` **actions** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_actions** **(** :ref:`Array` value **)** +- :ref:`Array` **get_actions** **(** **)** Collection of actions for this action set. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionSet_property_localized_name: -- :ref:`String` **localized_name** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``""`` | -+-----------+---------------------------+ -| *Setter* | set_localized_name(value) | -+-----------+---------------------------+ -| *Getter* | get_localized_name() | -+-----------+---------------------------+ +:ref:`String` **localized_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_localized_name** **(** :ref:`String` value **)** +- :ref:`String` **get_localized_name** **(** **)** The localized name of this action set. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionSet_property_priority: -- :ref:`int` **priority** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_priority(value) | -+-----------+---------------------+ -| *Getter* | get_priority() | -+-----------+---------------------+ +:ref:`int` **priority** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_priority** **(** **)** The priority for this action set. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OpenXRActionSet_method_add_action: -- void **add_action** **(** :ref:`OpenXRAction` action **)** +.. rst-class:: classref-method + +void **add_action** **(** :ref:`OpenXRAction` action **)** Add an action to this action set. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionSet_method_get_action_count: -- :ref:`int` **get_action_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_action_count** **(** **)** |const| Retrieve the number of actions in our action set. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRActionSet_method_remove_action: -- void **remove_action** **(** :ref:`OpenXRAction` action **)** +.. rst-class:: classref-method + +void **remove_action** **(** :ref:`OpenXRAction` action **)** Remove an action from this action set. diff --git a/classes/class_openxrhand.rst b/classes/class_openxrhand.rst index 4b7656580..7613e0f4d 100644 --- a/classes/class_openxrhand.rst +++ b/classes/class_openxrhand.rst @@ -14,105 +14,155 @@ OpenXRHand Node supporting 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` 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. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+---------------------------------------------------------------+------------------+ -| :ref:`Hands` | :ref:`hand` | ``0`` | -+-------------------------------------------------+---------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`hand_skeleton` | ``NodePath("")`` | -+-------------------------------------------------+---------------------------------------------------------------+------------------+ -| :ref:`MotionRange` | :ref:`motion_range` | ``0`` | -+-------------------------------------------------+---------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------------------+------------------+ + | :ref:`Hands` | :ref:`hand` | ``0`` | + +-------------------------------------------------+---------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`hand_skeleton` | ``NodePath("")`` | + +-------------------------------------------------+---------------------------------------------------------------+------------------+ + | :ref:`MotionRange` | :ref:`motion_range` | ``0`` | + +-------------------------------------------------+---------------------------------------------------------------+------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_OpenXRHand_Hands: -.. _class_OpenXRHand_constant_HAND_LEFT: - -.. _class_OpenXRHand_constant_HAND_RIGHT: - -.. _class_OpenXRHand_constant_HAND_MAX: +.. rst-class:: classref-enumeration enum **Hands**: -- **HAND_LEFT** = **0** --- Tracking the player's left hand. +.. _class_OpenXRHand_constant_HAND_LEFT: -- **HAND_RIGHT** = **1** --- Tracking the player's right hand. +.. rst-class:: classref-enumeration-constant -- **HAND_MAX** = **2** --- Maximum supported hands. +:ref:`Hands` **HAND_LEFT** = ``0`` + +Tracking the player's left hand. + +.. _class_OpenXRHand_constant_HAND_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hands` **HAND_RIGHT** = ``1`` + +Tracking the player's right hand. + +.. _class_OpenXRHand_constant_HAND_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hands` **HAND_MAX** = ``2`` + +Maximum supported hands. + +.. rst-class:: classref-item-separator ---- .. _enum_OpenXRHand_MotionRange: -.. _class_OpenXRHand_constant_MOTION_RANGE_UNOBSTRUCTED: - -.. _class_OpenXRHand_constant_MOTION_RANGE_CONFORM_TO_CONTROLLER: - -.. _class_OpenXRHand_constant_MOTION_RANGE_MAX: +.. rst-class:: classref-enumeration enum **MotionRange**: -- **MOTION_RANGE_UNOBSTRUCTED** = **0** --- When player grips, hand skeleton will form a full fist. +.. _class_OpenXRHand_constant_MOTION_RANGE_UNOBSTRUCTED: -- **MOTION_RANGE_CONFORM_TO_CONTROLLER** = **1** --- When player grips, hand skeleton conforms to the controller the player is holding. +.. rst-class:: classref-enumeration-constant -- **MOTION_RANGE_MAX** = **2** --- Maximum supported motion ranges. +:ref:`MotionRange` **MOTION_RANGE_UNOBSTRUCTED** = ``0`` + +When player grips, hand skeleton will form a full fist. + +.. _class_OpenXRHand_constant_MOTION_RANGE_CONFORM_TO_CONTROLLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`MotionRange` **MOTION_RANGE_CONFORM_TO_CONTROLLER** = ``1`` + +When player grips, hand skeleton conforms to the controller the player is holding. + +.. _class_OpenXRHand_constant_MOTION_RANGE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`MotionRange` **MOTION_RANGE_MAX** = ``2`` + +Maximum supported motion ranges. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OpenXRHand_property_hand: -- :ref:`Hands` **hand** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_hand(value) | -+-----------+-----------------+ -| *Getter* | get_hand() | -+-----------+-----------------+ +:ref:`Hands` **hand** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_hand** **(** :ref:`Hands` value **)** +- :ref:`Hands` **get_hand** **(** **)** Specifies whether this node tracks the left or right hand of the player. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRHand_property_hand_skeleton: -- :ref:`NodePath` **hand_skeleton** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+--------------------------+ -| *Setter* | set_hand_skeleton(value) | -+-----------+--------------------------+ -| *Getter* | get_hand_skeleton() | -+-----------+--------------------------+ +:ref:`NodePath` **hand_skeleton** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_hand_skeleton** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_hand_skeleton** **(** **)** Set a :ref:`Skeleton3D` node for which the pose positions will be updated. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRHand_property_motion_range: -- :ref:`MotionRange` **motion_range** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_motion_range(value) | -+-----------+-------------------------+ -| *Getter* | get_motion_range() | -+-----------+-------------------------+ +:ref:`MotionRange` **motion_range** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_motion_range** **(** :ref:`MotionRange` value **)** +- :ref:`MotionRange` **get_motion_range** **(** **)** Set the motion range (if supported) limiting the hand motion. diff --git a/classes/class_openxrinteractionprofile.rst b/classes/class_openxrinteractionprofile.rst index 5157ff479..19673ef82 100644 --- a/classes/class_openxrinteractionprofile.rst +++ b/classes/class_openxrinteractionprofile.rst @@ -14,6 +14,8 @@ OpenXRInteractionProfile Suggested bindings object for OpenXR. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,71 +23,99 @@ This object stores suggested bindings for an interaction profile. Interaction pr For more information see the `interaction profiles info in the OpenXR specification `__. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`Array` | :ref:`bindings` | ``[]`` | -+-----------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`interaction_profile_path` | ``""`` | -+-----------------------------+---------------------------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`Array` | :ref:`bindings` | ``[]`` | + +-----------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`interaction_profile_path` | ``""`` | + +-----------------------------+---------------------------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`OpenXRIPBinding` | :ref:`get_binding` **(** :ref:`int` index **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_binding_count` **(** **)** |const| | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRIPBinding` | :ref:`get_binding` **(** :ref:`int` index **)** |const| | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_binding_count` **(** **)** |const| | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OpenXRInteractionProfile_property_bindings: -- :ref:`Array` **bindings** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``[]`` | -+-----------+---------------------+ -| *Setter* | set_bindings(value) | -+-----------+---------------------+ -| *Getter* | get_bindings() | -+-----------+---------------------+ +:ref:`Array` **bindings** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_bindings** **(** :ref:`Array` value **)** +- :ref:`Array` **get_bindings** **(** **)** Action bindings for this interaction profile. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRInteractionProfile_property_interaction_profile_path: -- :ref:`String` **interaction_profile_path** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------------------+ -| *Setter* | set_interaction_profile_path(value) | -+-----------+-------------------------------------+ -| *Getter* | get_interaction_profile_path() | -+-----------+-------------------------------------+ +:ref:`String` **interaction_profile_path** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_interaction_profile_path** **(** :ref:`String` value **)** +- :ref:`String` **get_interaction_profile_path** **(** **)** The interaction profile path identifying the XR device. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OpenXRInteractionProfile_method_get_binding: -- :ref:`OpenXRIPBinding` **get_binding** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`OpenXRIPBinding` **get_binding** **(** :ref:`int` index **)** |const| Retrieve the binding at this index. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRInteractionProfile_method_get_binding_count: -- :ref:`int` **get_binding_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_binding_count** **(** **)** |const| Get the number of bindings in this interaction profile. diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index 2e742f00f..8fdf94b52 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -14,6 +14,8 @@ OpenXRInterface Our OpenXR interface. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,89 +23,138 @@ The OpenXR interface allows Godot to interact with OpenXR runtimes and make it p Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Godot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Godot to know which render result should be output to the headset. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Setting up XR <../tutorials/xr/setting_up_xr>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | -+---------------------------+----------------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_OpenXRInterface_signal_pose_recentered: -- **pose_recentered** **(** **)** +.. rst-class:: classref-signal + +**pose_recentered** **(** **)** Informs the user queued a recenter of the player position. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRInterface_signal_session_begun: -- **session_begun** **(** **)** +.. rst-class:: classref-signal + +**session_begun** **(** **)** Informs our OpenXR session has been started. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRInterface_signal_session_focussed: -- **session_focussed** **(** **)** +.. rst-class:: classref-signal + +**session_focussed** **(** **)** Informs our OpenXR session now has focus. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRInterface_signal_session_stopping: -- **session_stopping** **(** **)** +.. rst-class:: classref-signal + +**session_stopping** **(** **)** Informs our OpenXR session is stopping. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRInterface_signal_session_visible: -- **session_visible** **(** **)** +.. rst-class:: classref-signal + +**session_visible** **(** **)** Informs our OpenXR session is now visible (output is being sent to the HMD). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_OpenXRInterface_property_display_refresh_rate: -- :ref:`float` **display_refresh_rate** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_display_refresh_rate(value) | -+-----------+---------------------------------+ -| *Getter* | get_display_refresh_rate() | -+-----------+---------------------------------+ +:ref:`float` **display_refresh_rate** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_display_refresh_rate** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OpenXRInterface_method_get_available_display_refresh_rates: -- :ref:`Array` **get_available_display_refresh_rates** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_available_display_refresh_rates** **(** **)** |const| 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. diff --git a/classes/class_openxripbinding.rst b/classes/class_openxripbinding.rst index 63456d3fc..820ed72e2 100644 --- a/classes/class_openxripbinding.rst +++ b/classes/class_openxripbinding.rst @@ -14,94 +14,134 @@ OpenXRIPBinding Defines a binding between an :ref:`OpenXRAction` and an XR input or output. +.. rst-class:: classref-introduction-group + Description ----------- This binding resource binds an :ref:`OpenXRAction` to inputs or outputs. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+------------------------------------------------------+-------------------------+ -| :ref:`OpenXRAction` | :ref:`action` | | -+---------------------------------------------------+------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`paths` | ``PackedStringArray()`` | -+---------------------------------------------------+------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------+-------------------------+ + | :ref:`OpenXRAction` | :ref:`action` | | + +---------------------------------------------------+------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`paths` | ``PackedStringArray()`` | + +---------------------------------------------------+------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_path` **(** :ref:`String` path **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_path_count` **(** **)** |const| | -+-------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_path` **(** :ref:`String` path **)** |const| | -+-------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_path` **(** :ref:`String` path **)** | -+-------------------------+-------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_path` **(** :ref:`String` path **)** | + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_path_count` **(** **)** |const| | + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_path` **(** :ref:`String` path **)** |const| | + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_path` **(** :ref:`String` path **)** | + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OpenXRIPBinding_property_action: -- :ref:`OpenXRAction` **action** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_action(value) | -+----------+-------------------+ -| *Getter* | get_action() | -+----------+-------------------+ +:ref:`OpenXRAction` **action** + +.. rst-class:: classref-property-setget + +- void **set_action** **(** :ref:`OpenXRAction` value **)** +- :ref:`OpenXRAction` **get_action** **(** **)** :ref:`OpenXRAction` that is bound to these paths. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRIPBinding_property_paths: -- :ref:`PackedStringArray` **paths** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+-------------------------+ -| *Setter* | set_paths(value) | -+-----------+-------------------------+ -| *Getter* | get_paths() | -+-----------+-------------------------+ +:ref:`PackedStringArray` **paths** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_paths** **(** :ref:`PackedStringArray` value **)** +- :ref:`PackedStringArray` **get_paths** **(** **)** Paths that define the inputs or outputs bound on the device. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OpenXRIPBinding_method_add_path: -- void **add_path** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_path** **(** :ref:`String` path **)** Add an input/output path to this binding. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRIPBinding_method_get_path_count: -- :ref:`int` **get_path_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_path_count** **(** **)** |const| Get the number of input/output paths in this binding. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRIPBinding_method_has_path: -- :ref:`bool` **has_path** **(** :ref:`String` path **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_path** **(** :ref:`String` path **)** |const| Returns ``true`` if this input/output path is part of this binding. +.. rst-class:: classref-item-separator + ---- .. _class_OpenXRIPBinding_method_remove_path: -- void **remove_path** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **remove_path** **(** :ref:`String` path **)** Removes this input/output path from this binding. diff --git a/classes/class_optimizedtranslation.rst b/classes/class_optimizedtranslation.rst index b77cf2a00..9d7b87ad5 100644 --- a/classes/class_optimizedtranslation.rst +++ b/classes/class_optimizedtranslation.rst @@ -14,24 +14,39 @@ OptimizedTranslation Optimized translation. +.. rst-class:: classref-introduction-group + Description ----------- Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. +.. rst-class:: classref-reftable-group + Methods ------- -+------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generate` **(** :ref:`Translation` from **)** | -+------+--------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generate` **(** :ref:`Translation` from **)** | + +------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_OptimizedTranslation_method_generate: -- void **generate** **(** :ref:`Translation` from **)** +.. rst-class:: classref-method + +void **generate** **(** :ref:`Translation` from **)** Generates and sets an optimized translation from the given :ref:`Translation` resource. diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 57ea2b818..10c35d69d 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -14,6 +14,8 @@ OptionButton Button control that provides selectable options when pressed. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,646 +25,841 @@ See also :ref:`BaseButton` which contains common properties an \ **Note:** Properties :ref:`Button.text` and :ref:`Button.icon` are automatically set based on the selected item. They shouldn't be changed manually. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`ActionMode` | action_mode | ``0`` (overrides :ref:`BaseButton`) | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`fit_to_longest_item` | ``true`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`item_count` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`selected` | ``-1`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ -| :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`ActionMode` | action_mode | ``0`` (overrides :ref:`BaseButton`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`fit_to_longest_item` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`item_count` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`selected` | ``-1`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1 **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1 **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_separator` **(** :ref:`String` text="" **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_id` **(** :ref:`int` idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_popup` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selectable_item` **(** :ref:`bool` from_last=false **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selected_id` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_selected_metadata` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_selectable_items` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` idx **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` idx **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture2D` texture **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_id` **(** :ref:`int` idx, :ref:`int` id **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`show_popup` **(** **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_icon_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1 **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1 **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_separator` **(** :ref:`String` text="" **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_id` **(** :ref:`int` idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_popup` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selectable_item` **(** :ref:`bool` from_last=false **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selected_id` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_selected_metadata` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_selectable_items` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_item` **(** :ref:`int` idx **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select` **(** :ref:`int` idx **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture2D` texture **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_id` **(** :ref:`int` idx, :ref:`int` id **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show_popup` **(** **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :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:`arrow_margin` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`h_separation` | ``2`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`modulate_arrow` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`arrow` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :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:`normal` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`normal_mirrored` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`pressed` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`pressed_mirrored` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +.. 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:`arrow_margin` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``2`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`modulate_arrow` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`arrow` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :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:`normal` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`pressed_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_OptionButton_signal_item_focused: -- **item_focused** **(** :ref:`int` index **)** +.. rst-class:: classref-signal + +**item_focused** **(** :ref:`int` index **)** Emitted when the user navigates to an item using the :ref:`ProjectSettings.input/ui_up` or :ref:`ProjectSettings.input/ui_down` input actions. The index of the item selected is passed as argument. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_signal_item_selected: -- **item_selected** **(** :ref:`int` index **)** +.. rst-class:: classref-signal + +**item_selected** **(** :ref:`int` index **)** Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_OptionButton_property_fit_to_longest_item: -- :ref:`bool` **fit_to_longest_item** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_fit_to_longest_item(value) | -+-----------+--------------------------------+ -| *Getter* | is_fit_to_longest_item() | -+-----------+--------------------------------+ +:ref:`bool` **fit_to_longest_item** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_fit_to_longest_item** **(** :ref:`bool` value **)** +- :ref:`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. \ **Note:** For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_property_item_count: -- :ref:`int` **item_count** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_item_count(value) | -+-----------+-----------------------+ -| *Getter* | get_item_count() | -+-----------+-----------------------+ +:ref:`int` **item_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_item_count** **(** :ref:`int` value **)** +- :ref:`int` **get_item_count** **(** **)** The number of items to select from. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_property_selected: -- :ref:`int` **selected** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``-1`` | -+-----------+----------------+ -| *Getter* | get_selected() | -+-----------+----------------+ +:ref:`int` **selected** = ``-1`` + +.. rst-class:: classref-property-setget + +- :ref:`int` **get_selected** **(** **)** The index of the currently selected item, or ``-1`` if no item is selected. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OptionButton_method_add_icon_item: -- void **add_icon_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1 **)** +.. rst-class:: classref-method + +void **add_icon_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_add_item: -- void **add_item** **(** :ref:`String` label, :ref:`int` id=-1 **)** +.. rst-class:: classref-method + +void **add_item** **(** :ref:`String` label, :ref:`int` id=-1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_add_separator: -- void **add_separator** **(** :ref:`String` text="" **)** +.. rst-class:: classref-method + +void **add_separator** **(** :ref:`String` text="" **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method -Clears all the items in the ``OptionButton``. +void **clear** **(** **)** + +Clears all the items in the **OptionButton**. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_method_get_item_icon: -- :ref:`Texture2D` **get_item_icon** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_item_icon** **(** :ref:`int` idx **)** |const| Returns the icon of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_item_id: -- :ref:`int` **get_item_id** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_item_id** **(** :ref:`int` idx **)** |const| Returns the ID of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_item_index: -- :ref:`int` **get_item_index** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_item_index** **(** :ref:`int` id **)** |const| Returns the index of the item with the given ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_item_metadata: -- :ref:`Variant` **get_item_metadata** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_item_metadata** **(** :ref:`int` idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_item_text: -- :ref:`String` **get_item_text** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_text** **(** :ref:`int` idx **)** |const| Returns the text of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_item_tooltip: -- :ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** |const| Returns the tooltip of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_popup: -- :ref:`PopupMenu` **get_popup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PopupMenu` **get_popup** **(** **)** |const| Returns the :ref:`PopupMenu` contained in this button. \ **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:`Window.visible` property. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_selectable_item: -- :ref:`int` **get_selectable_item** **(** :ref:`bool` from_last=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selectable_item** **(** :ref:`bool` from_last=false **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_selected_id: -- :ref:`int` **get_selected_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selected_id** **(** **)** |const| Returns the ID of the selected item, or ``-1`` if no item is selected. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_get_selected_metadata: -- :ref:`Variant` **get_selected_metadata** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_selected_metadata** **(** **)** |const| Gets the metadata of the selected item. Metadata for items can be set using :ref:`set_item_metadata`. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_has_selectable_items: -- :ref:`bool` **has_selectable_items** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_selectable_items** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_is_item_disabled: -- :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** |const| Returns ``true`` if the item at index ``idx`` is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_is_item_separator: -- :ref:`bool` **is_item_separator** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_separator** **(** :ref:`int` idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_remove_item: -- void **remove_item** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **remove_item** **(** :ref:`int` idx **)** Removes the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_select: -- void **select** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **select** **(** :ref:`int` idx **)** Selects an item by index and makes it the current item. This will work even if the item is disabled. Passing ``-1`` as the index deselects any currently selected item. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_set_item_disabled: -- void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** Sets whether the item at index ``idx`` is disabled. Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_set_item_icon: -- void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture2D` texture **)** Sets the icon of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_set_item_id: -- void **set_item_id** **(** :ref:`int` idx, :ref:`int` id **)** +.. rst-class:: classref-method + +void **set_item_id** **(** :ref:`int` idx, :ref:`int` id **)** Sets the ID of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_set_item_metadata: -- void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` metadata **)** +.. rst-class:: classref-method + +void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` 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. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_set_item_text: -- void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** +.. rst-class:: classref-method + +void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** Sets the text of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_set_item_tooltip: -- void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** +.. rst-class:: classref-method + +void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** Sets the tooltip of the item at index ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_method_show_popup: -- void **show_popup** **(** **)** +.. rst-class:: classref-method -Adjusts popup position and sizing for the ``OptionButton``, then shows the :ref:`PopupMenu`. Prefer this over using ``get_popup().popup()``. +void **show_popup** **(** **)** + +Adjusts popup position and sizing for the **OptionButton**, then shows the :ref:`PopupMenu`. Prefer this over using ``get_popup().popup()``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_OptionButton_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` -Default text :ref:`Color` of the ``OptionButton``. +Default text :ref:`Color` of the **OptionButton**. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` -Text :ref:`Color` used when the ``OptionButton`` is disabled. +Text :ref:`Color` used when the **OptionButton** is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_color_font_focus_color: -- :ref:`Color` **font_focus_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Text :ref:`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. +Text :ref:`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: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` -Text :ref:`Color` used when the ``OptionButton`` is being hovered. +Text :ref:`Color` used when the **OptionButton** is being hovered. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_color_font_hover_pressed_color: -- :ref:`Color` **font_hover_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` used when the ``OptionButton`` is being hovered and pressed. +Text :ref:`Color` used when the **OptionButton** is being hovered and pressed. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``OptionButton``. +The tint of text outline of the **OptionButton**. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_color_font_pressed_color: -- :ref:`Color` **font_pressed_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` -Text :ref:`Color` used when the ``OptionButton`` is being pressed. +Text :ref:`Color` used when the **OptionButton** is being pressed. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_constant_arrow_margin: -- :ref:`int` **arrow_margin** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **arrow_margin** = ``4`` The horizontal space between the arrow icon and the right edge of the button. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``2`` -The horizontal space between ``OptionButton``'s icon and text. Negative values will be treated as ``0`` when used. +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: -- :ref:`int` **modulate_arrow** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **modulate_arrow** = ``0`` If different than ``0``, the arrow icon will be modulated to the font color. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty -:ref:`Font` of the ``OptionButton``'s text. +:ref:`Font` **font** + +:ref:`Font` of the **OptionButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty -Font size of the ``OptionButton``'s text. +:ref:`int` **font_size** + +Font size of the **OptionButton**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_icon_arrow: -- :ref:`Texture2D` **arrow** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **arrow** The arrow icon to be drawn on the right end of the button. +.. rst-class:: classref-item-separator + ---- .. _class_OptionButton_theme_style_disabled: -- :ref:`StyleBox` **disabled** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``OptionButton`` is disabled (for left-to-right layouts). +:ref:`StyleBox` **disabled** + +:ref:`StyleBox` used when the **OptionButton** is disabled (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_style_disabled_mirrored: -- :ref:`StyleBox` **disabled_mirrored** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``OptionButton`` is disabled (for right-to-left layouts). +:ref:`StyleBox` **disabled_mirrored** + +:ref:`StyleBox` used when the **OptionButton** is disabled (for right-to-left layouts). + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``OptionButton`` 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` **focus** + +:ref:`StyleBox` used when the **OptionButton** 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_OptionButton_theme_style_hover: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``OptionButton`` is being hovered (for left-to-right layouts). +:ref:`StyleBox` **hover** + +:ref:`StyleBox` used when the **OptionButton** is being hovered (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_style_hover_mirrored: -- :ref:`StyleBox` **hover_mirrored** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``OptionButton`` is being hovered (for right-to-left layouts). +:ref:`StyleBox` **hover_mirrored** + +:ref:`StyleBox` used when the **OptionButton** is being hovered (for right-to-left layouts). + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -Default :ref:`StyleBox` for the ``OptionButton`` (for left-to-right layouts). +:ref:`StyleBox` **normal** + +Default :ref:`StyleBox` for the **OptionButton** (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_style_normal_mirrored: -- :ref:`StyleBox` **normal_mirrored** +.. rst-class:: classref-themeproperty -Default :ref:`StyleBox` for the ``OptionButton`` (for right-to-left layouts). +:ref:`StyleBox` **normal_mirrored** + +Default :ref:`StyleBox` for the **OptionButton** (for right-to-left layouts). + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_style_pressed: -- :ref:`StyleBox` **pressed** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``OptionButton`` is being pressed (for left-to-right layouts). +:ref:`StyleBox` **pressed** + +:ref:`StyleBox` used when the **OptionButton** is being pressed (for left-to-right layouts). + +.. rst-class:: classref-item-separator ---- .. _class_OptionButton_theme_style_pressed_mirrored: -- :ref:`StyleBox` **pressed_mirrored** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``OptionButton`` is being pressed (for right-to-left layouts). +:ref:`StyleBox` **pressed_mirrored** + +:ref:`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.)` diff --git a/classes/class_ormmaterial3d.rst b/classes/class_ormmaterial3d.rst index d4f002b88..93104b939 100644 --- a/classes/class_ormmaterial3d.rst +++ b/classes/class_ormmaterial3d.rst @@ -14,11 +14,15 @@ ORMMaterial3D Physically based rendering (PBR) material that can be applied to 3D objects, can use an ORM texture. +.. rst-class:: classref-introduction-group + Description ----------- ORMMaterial3D's properties are inherited from :ref:`BaseMaterial3D`. Unlike :ref:`StandardMaterial3D`, ORMMaterial3D uses a single texture for ambient occlusion, roughness and metallic maps, known as an ORM texture. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_os.rst b/classes/class_os.rst index d4ae84ddb..a0a126771 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -14,354 +14,532 @@ OS Operating System functions. +.. rst-class:: classref-introduction-group + Description ----------- -Operating System functions. ``OS`` wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. +Operating System functions. **OS** wraps the most common functionality to communicate with the host operating system, such as the clipboard, 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` singleton. +\ **Note:** In Godot 4, **OS** functions related to window management were moved to the :ref:`DisplayServer` singleton. + +.. rst-class:: classref-introduction-group Tutorials --------- - `OS Test Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`low_processor_usage_mode` | ``false`` | -+-------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`low_processor_usage_mode_sleep_usec` | ``6900`` | -+-------------------------+---------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`low_processor_usage_mode` | ``false`` | + +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`low_processor_usage_mode_sleep_usec` | ``6900`` | + +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`alert` **(** :ref:`String` text, :ref:`String` title="Alert!" **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close_midi_inputs` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`crash` **(** :ref:`String` message **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_instance` **(** :ref:`PackedStringArray` arguments **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_process` **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`bool` open_console=false **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delay_msec` **(** :ref:`int` msec **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delay_usec` **(** :ref:`int` usec **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`execute` **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`Array` output=[], :ref:`bool` read_stderr=false, :ref:`bool` open_console=false **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Key` | :ref:`find_keycode_from_string` **(** :ref:`String` string **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_cache_dir` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_cmdline_args` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_cmdline_user_args` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_config_dir` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_connected_midi_inputs` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_data_dir` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_distribution_name` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_environment` **(** :ref:`String` variable **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_executable_path` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_granted_permissions` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_keycode_string` **(** :ref:`Key` code **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_locale` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_locale_language` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_main_thread_id` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_model_name` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_process_id` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_processor_count` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_processor_name` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_restart_on_exit_arguments` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_static_memory_peak_usage` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_static_memory_usage` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_system_dir` **(** :ref:`SystemDir` dir, :ref:`bool` shared_storage=true **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_system_font_path` **(** :ref:`String` font_name, :ref:`bool` bold=false, :ref:`bool` italic=false **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_system_fonts` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_thread_caller_id` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_unique_id` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_user_data_dir` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_version` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_video_adapter_driver_info` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_environment` **(** :ref:`String` variable **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_feature` **(** :ref:`String` tag_name **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_debug_build` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_keycode_unicode` **(** :ref:`int` code **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_process_running` **(** :ref:`int` pid **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_restart_on_exit_set` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_stdout_verbose` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_userfs_persistent` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`kill` **(** :ref:`int` pid **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`move_to_trash` **(** :ref:`String` path **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`open_midi_inputs` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`read_string_from_stdin` **(** :ref:`bool` block=true **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`request_permission` **(** :ref:`String` name **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`request_permissions` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`set_environment` **(** :ref:`String` variable, :ref:`String` value **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_restart_on_exit` **(** :ref:`bool` restart, :ref:`PackedStringArray` arguments=PackedStringArray() **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`set_thread_name` **(** :ref:`String` name **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_file_access_save_and_swap` **(** :ref:`bool` enabled **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`shell_open` **(** :ref:`String` uri **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`alert` **(** :ref:`String` text, :ref:`String` title="Alert!" **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close_midi_inputs` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`crash` **(** :ref:`String` message **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_instance` **(** :ref:`PackedStringArray` arguments **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_process` **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`bool` open_console=false **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`delay_msec` **(** :ref:`int` msec **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`delay_usec` **(** :ref:`int` usec **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`execute` **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`Array` output=[], :ref:`bool` read_stderr=false, :ref:`bool` open_console=false **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`find_keycode_from_string` **(** :ref:`String` string **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_cache_dir` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_cmdline_args` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_cmdline_user_args` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_config_dir` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_connected_midi_inputs` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_data_dir` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_distribution_name` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_environment` **(** :ref:`String` variable **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_executable_path` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_granted_permissions` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_keycode_string` **(** :ref:`Key` code **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_locale` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_locale_language` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_main_thread_id` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_model_name` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_name` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_process_id` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_processor_count` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_processor_name` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_restart_on_exit_arguments` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_static_memory_peak_usage` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_static_memory_usage` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_system_dir` **(** :ref:`SystemDir` dir, :ref:`bool` shared_storage=true **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_system_font_path` **(** :ref:`String` font_name, :ref:`int` weight=400, :ref:`int` stretch=100, :ref:`bool` italic=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_system_font_path_for_text` **(** :ref:`String` font_name, :ref:`String` text, :ref:`String` locale="", :ref:`String` script="", :ref:`int` weight=400, :ref:`int` stretch=100, :ref:`bool` italic=false **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_system_fonts` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_thread_caller_id` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_unique_id` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_user_data_dir` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_version` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_video_adapter_driver_info` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_environment` **(** :ref:`String` variable **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_feature` **(** :ref:`String` tag_name **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_debug_build` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_keycode_unicode` **(** :ref:`int` code **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_process_running` **(** :ref:`int` pid **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_restart_on_exit_set` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_stdout_verbose` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_userfs_persistent` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`kill` **(** :ref:`int` pid **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`move_to_trash` **(** :ref:`String` path **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`open_midi_inputs` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`read_string_from_stdin` **(** :ref:`bool` block=true **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`request_permission` **(** :ref:`String` name **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`request_permissions` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set_environment` **(** :ref:`String` variable, :ref:`String` value **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_restart_on_exit` **(** :ref:`bool` restart, :ref:`PackedStringArray` arguments=PackedStringArray() **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`set_thread_name` **(** :ref:`String` name **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_file_access_save_and_swap` **(** :ref:`bool` enabled **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`shell_open` **(** :ref:`String` uri **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_OS_RenderingDriver: -.. _class_OS_constant_RENDERING_DRIVER_VULKAN: - -.. _class_OS_constant_RENDERING_DRIVER_OPENGL3: +.. rst-class:: classref-enumeration enum **RenderingDriver**: -- **RENDERING_DRIVER_VULKAN** = **0** --- The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available. +.. _class_OS_constant_RENDERING_DRIVER_VULKAN: -- **RENDERING_DRIVER_OPENGL3** = **1** --- 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. +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingDriver` **RENDERING_DRIVER_VULKAN** = ``0`` + +The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available. + +.. _class_OS_constant_RENDERING_DRIVER_OPENGL3: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingDriver` **RENDERING_DRIVER_OPENGL3** = ``1`` + +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. + +.. rst-class:: classref-item-separator ---- .. _enum_OS_Weekday: -.. _class_OS_constant_DAY_SUNDAY: - -.. _class_OS_constant_DAY_MONDAY: - -.. _class_OS_constant_DAY_TUESDAY: - -.. _class_OS_constant_DAY_WEDNESDAY: - -.. _class_OS_constant_DAY_THURSDAY: - -.. _class_OS_constant_DAY_FRIDAY: - -.. _class_OS_constant_DAY_SATURDAY: +.. rst-class:: classref-enumeration enum **Weekday**: -- **DAY_SUNDAY** = **0** --- Sunday. +.. _class_OS_constant_DAY_SUNDAY: -- **DAY_MONDAY** = **1** --- Monday. +.. rst-class:: classref-enumeration-constant -- **DAY_TUESDAY** = **2** --- Tuesday. +:ref:`Weekday` **DAY_SUNDAY** = ``0`` -- **DAY_WEDNESDAY** = **3** --- Wednesday. +Sunday. -- **DAY_THURSDAY** = **4** --- Thursday. +.. _class_OS_constant_DAY_MONDAY: -- **DAY_FRIDAY** = **5** --- Friday. +.. rst-class:: classref-enumeration-constant -- **DAY_SATURDAY** = **6** --- Saturday. +:ref:`Weekday` **DAY_MONDAY** = ``1`` + +Monday. + +.. _class_OS_constant_DAY_TUESDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **DAY_TUESDAY** = ``2`` + +Tuesday. + +.. _class_OS_constant_DAY_WEDNESDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **DAY_WEDNESDAY** = ``3`` + +Wednesday. + +.. _class_OS_constant_DAY_THURSDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **DAY_THURSDAY** = ``4`` + +Thursday. + +.. _class_OS_constant_DAY_FRIDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **DAY_FRIDAY** = ``5`` + +Friday. + +.. _class_OS_constant_DAY_SATURDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **DAY_SATURDAY** = ``6`` + +Saturday. + +.. rst-class:: classref-item-separator ---- .. _enum_OS_Month: -.. _class_OS_constant_MONTH_JANUARY: - -.. _class_OS_constant_MONTH_FEBRUARY: - -.. _class_OS_constant_MONTH_MARCH: - -.. _class_OS_constant_MONTH_APRIL: - -.. _class_OS_constant_MONTH_MAY: - -.. _class_OS_constant_MONTH_JUNE: - -.. _class_OS_constant_MONTH_JULY: - -.. _class_OS_constant_MONTH_AUGUST: - -.. _class_OS_constant_MONTH_SEPTEMBER: - -.. _class_OS_constant_MONTH_OCTOBER: - -.. _class_OS_constant_MONTH_NOVEMBER: - -.. _class_OS_constant_MONTH_DECEMBER: +.. rst-class:: classref-enumeration enum **Month**: -- **MONTH_JANUARY** = **1** --- January. +.. _class_OS_constant_MONTH_JANUARY: -- **MONTH_FEBRUARY** = **2** --- February. +.. rst-class:: classref-enumeration-constant -- **MONTH_MARCH** = **3** --- March. +:ref:`Month` **MONTH_JANUARY** = ``1`` -- **MONTH_APRIL** = **4** --- April. +January. -- **MONTH_MAY** = **5** --- May. +.. _class_OS_constant_MONTH_FEBRUARY: -- **MONTH_JUNE** = **6** --- June. +.. rst-class:: classref-enumeration-constant -- **MONTH_JULY** = **7** --- July. +:ref:`Month` **MONTH_FEBRUARY** = ``2`` -- **MONTH_AUGUST** = **8** --- August. +February. -- **MONTH_SEPTEMBER** = **9** --- September. +.. _class_OS_constant_MONTH_MARCH: -- **MONTH_OCTOBER** = **10** --- October. +.. rst-class:: classref-enumeration-constant -- **MONTH_NOVEMBER** = **11** --- November. +:ref:`Month` **MONTH_MARCH** = ``3`` -- **MONTH_DECEMBER** = **12** --- December. +March. + +.. _class_OS_constant_MONTH_APRIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_APRIL** = ``4`` + +April. + +.. _class_OS_constant_MONTH_MAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_MAY** = ``5`` + +May. + +.. _class_OS_constant_MONTH_JUNE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_JUNE** = ``6`` + +June. + +.. _class_OS_constant_MONTH_JULY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_JULY** = ``7`` + +July. + +.. _class_OS_constant_MONTH_AUGUST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_AUGUST** = ``8`` + +August. + +.. _class_OS_constant_MONTH_SEPTEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_SEPTEMBER** = ``9`` + +September. + +.. _class_OS_constant_MONTH_OCTOBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_OCTOBER** = ``10`` + +October. + +.. _class_OS_constant_MONTH_NOVEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_NOVEMBER** = ``11`` + +November. + +.. _class_OS_constant_MONTH_DECEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_DECEMBER** = ``12`` + +December. + +.. rst-class:: classref-item-separator ---- .. _enum_OS_SystemDir: -.. _class_OS_constant_SYSTEM_DIR_DESKTOP: - -.. _class_OS_constant_SYSTEM_DIR_DCIM: - -.. _class_OS_constant_SYSTEM_DIR_DOCUMENTS: - -.. _class_OS_constant_SYSTEM_DIR_DOWNLOADS: - -.. _class_OS_constant_SYSTEM_DIR_MOVIES: - -.. _class_OS_constant_SYSTEM_DIR_MUSIC: - -.. _class_OS_constant_SYSTEM_DIR_PICTURES: - -.. _class_OS_constant_SYSTEM_DIR_RINGTONES: +.. rst-class:: classref-enumeration enum **SystemDir**: -- **SYSTEM_DIR_DESKTOP** = **0** --- Desktop directory path. +.. _class_OS_constant_SYSTEM_DIR_DESKTOP: -- **SYSTEM_DIR_DCIM** = **1** --- DCIM (Digital Camera Images) directory path. +.. rst-class:: classref-enumeration-constant -- **SYSTEM_DIR_DOCUMENTS** = **2** --- Documents directory path. +:ref:`SystemDir` **SYSTEM_DIR_DESKTOP** = ``0`` -- **SYSTEM_DIR_DOWNLOADS** = **3** --- Downloads directory path. +Desktop directory path. -- **SYSTEM_DIR_MOVIES** = **4** --- Movies directory path. +.. _class_OS_constant_SYSTEM_DIR_DCIM: -- **SYSTEM_DIR_MUSIC** = **5** --- Music directory path. +.. rst-class:: classref-enumeration-constant -- **SYSTEM_DIR_PICTURES** = **6** --- Pictures directory path. +:ref:`SystemDir` **SYSTEM_DIR_DCIM** = ``1`` -- **SYSTEM_DIR_RINGTONES** = **7** --- Ringtones directory path. +DCIM (Digital Camera Images) directory path. + +.. _class_OS_constant_SYSTEM_DIR_DOCUMENTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemDir` **SYSTEM_DIR_DOCUMENTS** = ``2`` + +Documents directory path. + +.. _class_OS_constant_SYSTEM_DIR_DOWNLOADS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemDir` **SYSTEM_DIR_DOWNLOADS** = ``3`` + +Downloads directory path. + +.. _class_OS_constant_SYSTEM_DIR_MOVIES: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemDir` **SYSTEM_DIR_MOVIES** = ``4`` + +Movies directory path. + +.. _class_OS_constant_SYSTEM_DIR_MUSIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemDir` **SYSTEM_DIR_MUSIC** = ``5`` + +Music directory path. + +.. _class_OS_constant_SYSTEM_DIR_PICTURES: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemDir` **SYSTEM_DIR_PICTURES** = ``6`` + +Pictures directory path. + +.. _class_OS_constant_SYSTEM_DIR_RINGTONES: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemDir` **SYSTEM_DIR_RINGTONES** = ``7`` + +Ringtones directory path. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OS_property_low_processor_usage_mode: -- :ref:`bool` **low_processor_usage_mode** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------+ -| *Setter* | set_low_processor_usage_mode(value) | -+-----------+-------------------------------------+ -| *Getter* | is_in_low_processor_usage_mode() | -+-----------+-------------------------------------+ +:ref:`bool` **low_processor_usage_mode** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_low_processor_usage_mode** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_OS_property_low_processor_usage_mode_sleep_usec: -- :ref:`int` **low_processor_usage_mode_sleep_usec** +.. rst-class:: classref-property -+-----------+------------------------------------------------+ -| *Default* | ``6900`` | -+-----------+------------------------------------------------+ -| *Setter* | set_low_processor_usage_mode_sleep_usec(value) | -+-----------+------------------------------------------------+ -| *Getter* | get_low_processor_usage_mode_sleep_usec() | -+-----------+------------------------------------------------+ +:ref:`int` **low_processor_usage_mode_sleep_usec** = ``6900`` + +.. rst-class:: classref-property-setget + +- void **set_low_processor_usage_mode_sleep_usec** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_OS_method_alert: -- void **alert** **(** :ref:`String` text, :ref:`String` title="Alert!" **)** +.. rst-class:: classref-method + +void **alert** **(** :ref:`String` text, :ref:`String` title="Alert!" **)** Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_close_midi_inputs: -- void **close_midi_inputs** **(** **)** +.. rst-class:: classref-method + +void **close_midi_inputs** **(** **)** Shuts down system MIDI driver. \ **Note:** This method is implemented on Linux, macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_crash: -- void **crash** **(** :ref:`String` message **)** +.. rst-class:: classref-method + +void **crash** **(** :ref:`String` message **)** 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`, :ref:`@GlobalScope.push_error` or :ref:`alert`. See also :ref:`kill`. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_create_instance: -- :ref:`int` **create_instance** **(** :ref:`PackedStringArray` arguments **)** +.. rst-class:: classref-method + +:ref:`int` **create_instance** **(** :ref:`PackedStringArray` arguments **)** Creates a new instance of Godot that runs independently. The ``arguments`` are used in the given order and separated by a space. @@ -369,11 +547,15 @@ If the process creation succeeds, the method will return the new process ID, whi \ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_create_process: -- :ref:`int` **create_process** **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`bool` open_console=false **)** +.. rst-class:: classref-method + +:ref:`int` **create_process** **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`bool` open_console=false **)** 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. @@ -402,11 +584,15 @@ See :ref:`execute` if you wish to run an external comma \ **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 + ---- .. _class_OS_method_delay_msec: -- void **delay_msec** **(** :ref:`int` msec **)** |const| +.. rst-class:: classref-method + +void **delay_msec** **(** :ref:`int` msec **)** |const| Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_msec` will do nothing and will print an error message. @@ -414,11 +600,15 @@ Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must b \ **Note:** When :ref:`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` as part of an :ref:`EditorPlugin` or :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_delay_usec: -- void **delay_usec** **(** :ref:`int` usec **)** |const| +.. rst-class:: classref-method + +void **delay_usec** **(** :ref:`int` usec **)** |const| Delays execution of the current thread by ``usec`` microseconds. ``usec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_usec` will do nothing and will print an error message. @@ -426,11 +616,15 @@ Delays execution of the current thread by ``usec`` microseconds. ``usec`` must b \ **Note:** When :ref:`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` as part of an :ref:`EditorPlugin` or :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_execute: -- :ref:`int` **execute** **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`Array` output=[], :ref:`bool` read_stderr=false, :ref:`bool` open_console=false **)** +.. rst-class:: classref-method + +:ref:`int` **execute** **(** :ref:`String` path, :ref:`PackedStringArray` arguments, :ref:`Array` output=[], :ref:`bool` read_stderr=false, :ref:`bool` open_console=false **)** 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 and separated by a space. If an ``output`` :ref:`Array` is provided, the complete shell output of the process will be appended as a single :ref:`String` element in ``output``. If ``read_stderr`` is ``true``, the output to the standard error stream will be included too. @@ -484,29 +678,41 @@ 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. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_find_keycode_from_string: -- :ref:`Key` **find_keycode_from_string** **(** :ref:`String` string **)** |const| +.. rst-class:: classref-method + +:ref:`Key` **find_keycode_from_string** **(** :ref:`String` string **)** |const| Returns the keycode of the given string (e.g. "Escape"). +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_cache_dir: -- :ref:`String` **get_cache_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_cache_dir** **(** **)** |const| 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` and :ref:`get_data_dir`. Not to be confused with :ref:`get_user_data_dir`, which returns the *project-specific* user data path. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_cmdline_args: -- :ref:`PackedStringArray` **get_cmdline_args** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_cmdline_args** **(** **)** Returns the command-line arguments passed to the engine. @@ -555,35 +761,49 @@ Here's a minimal example on how to parse command-line arguments into a dictionar \ **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`. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_cmdline_user_args: -- :ref:`PackedStringArray` **get_cmdline_user_args** **(** **)** +.. rst-class:: classref-method -Similar to :ref:`get_cmdline_args`, but this returns the user arguments (any argument passed after the double dash ``--`` argument). These are left untouched by Godot for the user. +:ref:`PackedStringArray` **get_cmdline_user_args** **(** **)** + +Similar to :ref:`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``). For example, in the command line below, ``--fullscreen`` will not be returned in :ref:`get_cmdline_user_args` and ``--level 1`` will only be returned in :ref:`get_cmdline_user_args`: :: godot --fullscreen -- --level 1 + # Or: + godot --fullscreen ++ --level 1 + +.. rst-class:: classref-item-separator ---- .. _class_OS_method_get_config_dir: -- :ref:`String` **get_config_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_config_dir** **(** **)** |const| 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` and :ref:`get_data_dir`. Not to be confused with :ref:`get_user_data_dir`, which returns the *project-specific* user data path. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_connected_midi_inputs: -- :ref:`PackedStringArray` **get_connected_midi_inputs** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_connected_midi_inputs** **(** **)** Returns an array of MIDI device names. @@ -591,21 +811,29 @@ The returned array will be empty if the system MIDI driver has not previously be \ **Note:** This method is implemented on Linux, macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_data_dir: -- :ref:`String` **get_data_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_data_dir** **(** **)** |const| 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` and :ref:`get_config_dir`. Not to be confused with :ref:`get_user_data_dir`, which returns the *project-specific* user data path. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_distribution_name: -- :ref:`String` **get_distribution_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_distribution_name** **(** **)** |const| Returns the name of the distribution for Linux and BSD platforms (e.g. Ubuntu, Manjaro, OpenBSD, etc.). @@ -615,51 +843,71 @@ Returns the same value as :ref:`get_name` for other pl \ **Note:** This method is not supported on the web platform. It returns an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_environment: -- :ref:`String` **get_environment** **(** :ref:`String` variable **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_environment** **(** :ref:`String` variable **)** |const| Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist. \ **Note:** Double-check the casing of ``variable``. Environment variable names are case-sensitive on all platforms except Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_executable_path: -- :ref:`String` **get_executable_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_executable_path** **(** **)** |const| Returns the path to the current engine executable. \ **Note:** On macOS, always use :ref:`create_instance` instead of relying on executable path. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_granted_permissions: -- :ref:`PackedStringArray` **get_granted_permissions** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_granted_permissions** **(** **)** |const| With this function, you can get the list of dangerous permissions that have been granted to the Android application. \ **Note:** This method is implemented on Android. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_keycode_string: -- :ref:`String` **get_keycode_string** **(** :ref:`Key` code **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_keycode_string** **(** :ref:`Key` code **)** |const| Returns the given keycode as a string (e.g. Return values: ``"Escape"``, ``"Shift+Escape"``). See also :ref:`InputEventKey.keycode` and :ref:`InputEventKey.get_keycode_with_modifiers`. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_locale: -- :ref:`String` **get_locale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_locale** **(** **)** |const| 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`. @@ -673,41 +921,57 @@ Returns the host OS locale as a string of the form ``language_Script_COUNTRY_VAR \ ``extra`` - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_locale_language: -- :ref:`String` **get_locale_language** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_locale_language** **(** **)** |const| Returns the host OS locale's 2 or 3-letter `language code `__ as a string which should be consistent on all platforms. This is equivalent to extracting the ``language`` part of the :ref:`get_locale` string. This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with ``fr_CA`` locale, this would return ``fr``. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_main_thread_id: -- :ref:`int` **get_main_thread_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_main_thread_id** **(** **)** |const| Returns the ID of the main thread. See :ref:`get_thread_caller_id`. \ **Note:** Thread IDs are not deterministic and may be reused across application restarts. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_model_name: -- :ref:`String` **get_model_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_model_name** **(** **)** |const| Returns the model name of the current device. \ **Note:** This method is implemented on Android and iOS. Returns ``"GenericDevice"`` on unsupported platforms. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_name: -- :ref:`String` **get_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_name** **(** **)** |const| Returns the name of the host OS. @@ -777,63 +1041,91 @@ On the web, this is ``"Web"``. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_process_id: -- :ref:`int` **get_process_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_process_id** **(** **)** |const| Returns the project's process ID. \ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_processor_count: -- :ref:`int` **get_processor_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_processor_count** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_processor_name: -- :ref:`String` **get_processor_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_processor_name** **(** **)** |const| Returns the 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` returns an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_restart_on_exit_arguments: -- :ref:`PackedStringArray` **get_restart_on_exit_arguments** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_restart_on_exit_arguments** **(** **)** |const| Returns the list of command line arguments that will be used when the project automatically restarts using :ref:`set_restart_on_exit`. See also :ref:`is_restart_on_exit_set`. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_static_memory_peak_usage: -- :ref:`int` **get_static_memory_peak_usage** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_static_memory_peak_usage** **(** **)** |const| Returns the maximum amount of static memory used (only works in debug). +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_static_memory_usage: -- :ref:`int` **get_static_memory_usage** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_static_memory_usage** **(** **)** |const| Returns the amount of static memory being used by the program in bytes (only works in debug). +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_system_dir: -- :ref:`String` **get_system_dir** **(** :ref:`SystemDir` dir, :ref:`bool` shared_storage=true **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_system_dir** **(** :ref:`SystemDir` dir, :ref:`bool` shared_storage=true **)** |const| Returns the actual path to commonly used folders across different platforms. Available locations are specified in :ref:`SystemDir`. @@ -841,41 +1133,81 @@ Returns the actual path to commonly used folders across different platforms. Ava \ **Note:** Shared storage is implemented on Android and allows to differentiate between app specific and shared directories. Shared directories have additional restrictions on Android. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_system_font_path: -- :ref:`String` **get_system_font_path** **(** :ref:`String` font_name, :ref:`bool` bold=false, :ref:`bool` italic=false **)** |const| +.. rst-class:: classref-method -Returns path to the system font file with ``font_name`` and style. Return empty string if no matching fonts found. +:ref:`String` **get_system_font_path** **(** :ref:`String` font_name, :ref:`int` weight=400, :ref:`int` stretch=100, :ref:`bool` italic=false **)** |const| -\ **Note:** This method is implemented on iOS, Linux, macOS and Windows. +Returns path to the system font file with ``font_name`` and style. Returns empty string if no matching fonts found. + +The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". + +\ **Note:** Returned font might have different style if the requested style is not available. + +\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OS_method_get_system_font_path_for_text: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_system_font_path_for_text** **(** :ref:`String` font_name, :ref:`String` text, :ref:`String` locale="", :ref:`String` script="", :ref:`int` weight=400, :ref:`int` stretch=100, :ref:`bool` italic=false **)** |const| + +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. + +The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". + +\ **Note:** Depending on OS, it's not guaranteed that any of the returned fonts is suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used. + +\ **Note:** Returned fonts might have different style if the requested style is not available or belong to a different font family. + +\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + +.. rst-class:: classref-item-separator ---- .. _class_OS_method_get_system_fonts: -- :ref:`PackedStringArray` **get_system_fonts** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_system_fonts** **(** **)** |const| Returns list of font family names available. -\ **Note:** This method is implemented on iOS, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + +.. rst-class:: classref-item-separator ---- .. _class_OS_method_get_thread_caller_id: -- :ref:`int` **get_thread_caller_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_thread_caller_id** **(** **)** |const| Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. \ **Note:** Thread IDs are not deterministic and may be reused across application restarts. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_unique_id: -- :ref:`String` **get_unique_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_unique_id** **(** **)** |const| Returns a string that is unique to the device. @@ -883,11 +1215,15 @@ Returns a string that is unique to the device. \ **Note:** Returns an empty string on Web and UWP, as this method isn't implemented on those platforms yet. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_user_data_dir: -- :ref:`String` **get_user_data_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_user_data_dir** **(** **)** |const| Returns the absolute directory path where user data is written (``user://``). @@ -905,11 +1241,15 @@ If the project name is empty, ``[project_name]`` falls back to ``[unnamed projec Not to be confused with :ref:`get_data_dir`, which returns the *global* (non-project-specific) user home directory. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_version: -- :ref:`String` **get_version** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_version** **(** **)** |const| 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. @@ -925,11 +1265,15 @@ For Android, the SDK version and the incremental build number are returned. If i \ **Note:** This method is not supported on the web platform. It returns an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_get_video_adapter_driver_info: -- :ref:`PackedStringArray` **get_video_adapter_driver_info** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_video_adapter_driver_info** **(** **)** |const| Returns the video adapter driver name and version for the user's currently active graphics card. @@ -939,31 +1283,43 @@ The second element holds the driver version. For e.g. the ``nvidia`` driver on a \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_has_environment: -- :ref:`bool` **has_environment** **(** :ref:`String` variable **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_environment** **(** :ref:`String` variable **)** |const| Returns ``true`` if the environment variable with the name ``variable`` exists. \ **Note:** Double-check the casing of ``variable``. Environment variable names are case-sensitive on all platforms except Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_has_feature: -- :ref:`bool` **has_feature** **(** :ref:`String` tag_name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_feature** **(** :ref:`String` tag_name **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_is_debug_build: -- :ref:`bool` **is_debug_build** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_debug_build** **(** **)** |const| Returns ``true`` if the Godot binary used to run the project is a *debug* export template, or when running in the editor. @@ -971,19 +1327,27 @@ Returns ``false`` if the Godot binary used to run the project is a *release* exp To check whether the Godot binary used to run the project is an export template (debug or release), use ``OS.has_feature("standalone")`` instead. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_is_keycode_unicode: -- :ref:`bool` **is_keycode_unicode** **(** :ref:`int` code **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_keycode_unicode** **(** :ref:`int` code **)** |const| Returns ``true`` if the input keycode corresponds to a Unicode character. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_is_process_running: -- :ref:`bool` **is_process_running** **(** :ref:`int` pid **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_process_running** **(** :ref:`int` pid **)** |const| Returns ``true`` if the child process ID (``pid``) is still running or ``false`` if it has terminated. @@ -991,35 +1355,51 @@ Must be a valid ID generated from :ref:`create_process` **is_restart_on_exit_set** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_restart_on_exit_set** **(** **)** |const| Returns ``true`` if the project will automatically restart when it exits for any reason, ``false`` otherwise. See also :ref:`set_restart_on_exit` and :ref:`get_restart_on_exit_arguments`. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_is_stdout_verbose: -- :ref:`bool` **is_stdout_verbose** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_stdout_verbose** **(** **)** |const| Returns ``true`` if the engine was executed with the ``--verbose`` or ``-v`` command line argument, or if :ref:`ProjectSettings.debug/settings/stdout/verbose_stdout` is ``true``. See also :ref:`@GlobalScope.print_verbose`. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_is_userfs_persistent: -- :ref:`bool` **is_userfs_persistent** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_userfs_persistent** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_kill: -- :ref:`Error` **kill** **(** :ref:`int` pid **)** +.. rst-class:: classref-method + +:ref:`Error` **kill** **(** :ref:`int` pid **)** Kill (terminate) the process identified by the given process ID (``pid``), e.g. the one returned by :ref:`execute` in non-blocking mode. See also :ref:`crash`. @@ -1027,11 +1407,15 @@ Kill (terminate) the process identified by the given process ID (``pid``), e.g. \ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_move_to_trash: -- :ref:`Error` **move_to_trash** **(** :ref:`String` path **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **move_to_trash** **(** :ref:`String` path **)** |const| Moves the file or directory to the system's recycle bin. See also :ref:`DirAccess.remove`. @@ -1054,59 +1438,83 @@ The method takes only global paths, so you may need to use :ref:`ProjectSettings +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_open_midi_inputs: -- void **open_midi_inputs** **(** **)** +.. rst-class:: classref-method + +void **open_midi_inputs** **(** **)** Initialises the singleton for the system MIDI driver. \ **Note:** This method is implemented on Linux, macOS and Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_read_string_from_stdin: -- :ref:`String` **read_string_from_stdin** **(** :ref:`bool` block=true **)** +.. rst-class:: classref-method + +:ref:`String` **read_string_from_stdin** **(** :ref:`bool` block=true **)** Reads a user input string from the standard input (usually the terminal). \ **Note:** This method is implemented on Linux, macOS and Windows. Non-blocking reads are not currently supported on any platform. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_request_permission: -- :ref:`bool` **request_permission** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +:ref:`bool` **request_permission** **(** :ref:`String` name **)** At the moment this function is only used by ``AudioDriverOpenSL`` to request permission for ``RECORD_AUDIO`` on Android. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_request_permissions: -- :ref:`bool` **request_permissions** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **request_permissions** **(** **)** With this function, you can request dangerous permissions since normal permissions are automatically granted at install time in Android applications. \ **Note:** This method is implemented on Android. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_set_environment: -- :ref:`bool` **set_environment** **(** :ref:`String` variable, :ref:`String` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **set_environment** **(** :ref:`String` variable, :ref:`String` value **)** |const| 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` after running :ref:`set_environment`. The environment variable will *not* persist to processes run after the Godot process was terminated. \ **Note:** Double-check the casing of ``variable``. Environment variable names are case-sensitive on all platforms except Windows. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_set_restart_on_exit: -- void **set_restart_on_exit** **(** :ref:`bool` restart, :ref:`PackedStringArray` arguments=PackedStringArray() **)** +.. rst-class:: classref-method + +void **set_restart_on_exit** **(** :ref:`bool` restart, :ref:`PackedStringArray` arguments=PackedStringArray() **)** If ``restart`` is ``true``, restarts the project automatically when it is exited with :ref:`SceneTree.quit` or :ref:`Node.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` as the value for ``arguments``. @@ -1116,27 +1524,39 @@ If ``restart`` is ``true``, restarts the project automatically when it is exited \ **Note:** If the project process crashes or is *killed* by the user (by sending ``SIGKILL`` instead of the usual ``SIGTERM``), the project won't restart automatically. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_set_thread_name: -- :ref:`Error` **set_thread_name** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +:ref:`Error` **set_thread_name** **(** :ref:`String` name **)** Sets the name of the current thread. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_set_use_file_access_save_and_swap: -- void **set_use_file_access_save_and_swap** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_use_file_access_save_and_swap** **(** :ref:`bool` enabled **)** Enables backup saves if ``enabled`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_OS_method_shell_open: -- :ref:`Error` **shell_open** **(** :ref:`String` uri **)** +.. rst-class:: classref-method + +:ref:`Error` **shell_open** **(** :ref:`String` uri **)** Requests the OS to open a resource with the most appropriate program. For example: diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index 510511e60..6447bac4b 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -12,527 +12,736 @@ PackedByteArray A packed array of bytes. +.. rst-class:: classref-introduction-group + Description ----------- An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. -\ ``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. +\ **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. + +.. rst-class:: classref-reftable-group Constructors ------------ -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`PackedByteArray` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`PackedByteArray` **(** :ref:`PackedByteArray` from **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`PackedByteArray` **(** :ref:`Array` from **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`PackedByteArray` **(** **)** | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`PackedByteArray` **(** :ref:`PackedByteArray` from **)** | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`PackedByteArray` **(** :ref:`Array` from **)** | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedByteArray` array **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`compress` **(** :ref:`int` compression_mode=0 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`decode_double` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`decode_float` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`decode_half` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_s16` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_s32` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_s64` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_s8` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_u16` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_u32` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_u64` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_u8` **(** :ref:`int` byte_offset **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`decode_var` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`decode_var_size` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`decompress` **(** :ref:`int` buffer_size, :ref:`int` compression_mode=0 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`decompress_dynamic` **(** :ref:`int` max_output_size, :ref:`int` compression_mode=0 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`duplicate` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_double` **(** :ref:`int` byte_offset, :ref:`float` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_float` **(** :ref:`int` byte_offset, :ref:`float` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_half` **(** :ref:`int` byte_offset, :ref:`float` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_s16` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_s32` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_s64` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_s8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_u16` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_u32` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_u64` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`encode_u8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`encode_var` **(** :ref:`int` byte_offset, :ref:`Variant` value, :ref:`bool` allow_objects=false **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string_from_ascii` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string_from_utf16` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string_from_utf32` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string_from_utf8` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_encoded_var` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`hex_encode` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`to_float32_array` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat64Array` | :ref:`to_float64_array` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`to_int32_array` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`to_int64_array` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedByteArray` array **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`compress` **(** :ref:`int` compression_mode=0 **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`decode_double` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`decode_float` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`decode_half` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_s16` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_s32` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_s64` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_s8` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_u16` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_u32` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_u64` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_u8` **(** :ref:`int` byte_offset **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`decode_var` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`decode_var_size` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`decompress` **(** :ref:`int` buffer_size, :ref:`int` compression_mode=0 **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`decompress_dynamic` **(** :ref:`int` max_output_size, :ref:`int` compression_mode=0 **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`duplicate` **(** **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_double` **(** :ref:`int` byte_offset, :ref:`float` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_float` **(** :ref:`int` byte_offset, :ref:`float` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_half` **(** :ref:`int` byte_offset, :ref:`float` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_s16` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_s32` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_s64` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_s8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_u16` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_u32` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_u64` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`encode_u8` **(** :ref:`int` byte_offset, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`encode_var` **(** :ref:`int` byte_offset, :ref:`Variant` value, :ref:`bool` allow_objects=false **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string_from_ascii` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string_from_utf16` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string_from_utf32` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string_from_utf8` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_encoded_var` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`hex_encode` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`to_float32_array` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`to_float64_array` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`to_int32_array` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`to_int64_array` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedByteArray` right **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`operator +` **(** :ref:`PackedByteArray` right **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedByteArray` right **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedByteArray` right **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`operator +` **(** :ref:`PackedByteArray` right **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedByteArray` right **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedByteArray_constructor_PackedByteArray: -- :ref:`PackedByteArray` **PackedByteArray** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedByteArray``. +:ref:`PackedByteArray` **PackedByteArray** **(** **)** + +Constructs an empty **PackedByteArray**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedByteArray` **PackedByteArray** **(** :ref:`PackedByteArray` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedByteArray`` as a copy of the given ``PackedByteArray``. +:ref:`PackedByteArray` **PackedByteArray** **(** :ref:`PackedByteArray` from **)** + +Constructs a **PackedByteArray** as a copy of the given **PackedByteArray**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedByteArray` **PackedByteArray** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedByteArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedByteArray` **PackedByteArray** **(** :ref:`Array` from **)** + +Constructs a new **PackedByteArray**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedByteArray_method_append: -- :ref:`bool` **append** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`int` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_append_array: -- void **append_array** **(** :ref:`PackedByteArray` array **)** +.. rst-class:: classref-method -Appends a ``PackedByteArray`` at the end of this array. +void **append_array** **(** :ref:`PackedByteArray` array **)** + +Appends a **PackedByteArray** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedByteArray_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`int` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`int` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_compress: -- :ref:`PackedByteArray` **compress** **(** :ref:`int` compression_mode=0 **)** |const| +.. rst-class:: classref-method -Returns a new ``PackedByteArray`` with the data compressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. +:ref:`PackedByteArray` **compress** **(** :ref:`int` compression_mode=0 **)** |const| + +Returns a new **PackedByteArray** with the data compressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. + +.. rst-class:: classref-item-separator ---- .. _class_PackedByteArray_method_count: -- :ref:`int` **count** **(** :ref:`int` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`int` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_double: -- :ref:`float` **decode_double** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`float` **decode_double** **(** :ref:`int` byte_offset **)** |const| 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 + ---- .. _class_PackedByteArray_method_decode_float: -- :ref:`float` **decode_float** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`float` **decode_float** **(** :ref:`int` byte_offset **)** |const| 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 + ---- .. _class_PackedByteArray_method_decode_half: -- :ref:`float` **decode_half** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`float` **decode_half** **(** :ref:`int` byte_offset **)** |const| 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 + ---- .. _class_PackedByteArray_method_decode_s16: -- :ref:`int` **decode_s16** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_s16** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_s32: -- :ref:`int` **decode_s32** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_s32** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_s64: -- :ref:`int` **decode_s64** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_s64** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_s8: -- :ref:`int` **decode_s8** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_s8** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_u16: -- :ref:`int` **decode_u16** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_u16** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_u32: -- :ref:`int` **decode_u32** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_u32** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_u64: -- :ref:`int` **decode_u64** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_u64** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_u8: -- :ref:`int` **decode_u8** **(** :ref:`int` byte_offset **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_u8** **(** :ref:`int` byte_offset **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_var: -- :ref:`Variant` **decode_var** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **decode_var** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| Decodes a :ref:`Variant` from the bytes starting at ``byte_offset``. Returns ``null`` if a valid variant can't be decoded or the value is :ref:`Object`-derived and ``allow_objects`` is ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decode_var_size: -- :ref:`int` **decode_var_size** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **decode_var_size** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| Decodes a size of a :ref:`Variant` from the bytes starting at ``byte_offset``. Requires at least 4 bytes of data starting at the offset, otherwise fails. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_decompress: -- :ref:`PackedByteArray` **decompress** **(** :ref:`int` buffer_size, :ref:`int` compression_mode=0 **)** |const| +.. rst-class:: classref-method -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`'s constants. +:ref:`PackedByteArray` **decompress** **(** :ref:`int` buffer_size, :ref:`int` compression_mode=0 **)** |const| + +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`'s constants. + +.. rst-class:: classref-item-separator ---- .. _class_PackedByteArray_method_decompress_dynamic: -- :ref:`PackedByteArray` **decompress_dynamic** **(** :ref:`int` max_output_size, :ref:`int` compression_mode=0 **)** |const| +.. rst-class:: classref-method -Returns a new ``PackedByteArray`` with the data decompressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. **This method only accepts gzip and deflate compression modes.**\ +:ref:`PackedByteArray` **decompress_dynamic** **(** :ref:`int` max_output_size, :ref:`int` compression_mode=0 **)** |const| + +Returns a new **PackedByteArray** with the data decompressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. **This method only accepts 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. 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_duplicate: -- :ref:`PackedByteArray` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_double: -- void **encode_double** **(** :ref:`int` byte_offset, :ref:`float` value **)** +.. rst-class:: classref-method + +void **encode_double** **(** :ref:`int` byte_offset, :ref:`float` value **)** 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 + ---- .. _class_PackedByteArray_method_encode_float: -- void **encode_float** **(** :ref:`int` byte_offset, :ref:`float` value **)** +.. rst-class:: classref-method + +void **encode_float** **(** :ref:`int` byte_offset, :ref:`float` value **)** 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 + ---- .. _class_PackedByteArray_method_encode_half: -- void **encode_half** **(** :ref:`int` byte_offset, :ref:`float` value **)** +.. rst-class:: classref-method + +void **encode_half** **(** :ref:`int` byte_offset, :ref:`float` value **)** 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 + ---- .. _class_PackedByteArray_method_encode_s16: -- void **encode_s16** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_s16** **(** :ref:`int` byte_offset, :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_s32: -- void **encode_s32** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_s32** **(** :ref:`int` byte_offset, :ref:`int` value **)** Encodes a 32-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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_s64: -- void **encode_s64** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_s64** **(** :ref:`int` byte_offset, :ref:`int` value **)** Encodes a 64-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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_s8: -- void **encode_s8** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_s8** **(** :ref:`int` byte_offset, :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_u16: -- void **encode_u16** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_u16** **(** :ref:`int` byte_offset, :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_u32: -- void **encode_u32** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_u32** **(** :ref:`int` byte_offset, :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_u64: -- void **encode_u64** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_u64** **(** :ref:`int` byte_offset, :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_u8: -- void **encode_u8** **(** :ref:`int` byte_offset, :ref:`int` value **)** +.. rst-class:: classref-method + +void **encode_u8** **(** :ref:`int` byte_offset, :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_encode_var: -- :ref:`int` **encode_var** **(** :ref:`int` byte_offset, :ref:`Variant` value, :ref:`bool` allow_objects=false **)** +.. rst-class:: classref-method + +:ref:`int` **encode_var** **(** :ref:`int` byte_offset, :ref:`Variant` value, :ref:`bool` allow_objects=false **)** Encodes a :ref:`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`-derived values are not permitted and will instead be serialized as ID-only. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_fill: -- void **fill** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_find: -- :ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_get_string_from_ascii: -- :ref:`String` **get_string_from_ascii** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_string_from_ascii** **(** **)** |const| Converts ASCII/Latin-1 encoded array to :ref:`String`. Fast alternative to :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_get_string_from_utf16: -- :ref:`String` **get_string_from_utf16** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_string_from_utf16** **(** **)** |const| Converts UTF-16 encoded array to :ref:`String`. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_get_string_from_utf32: -- :ref:`String` **get_string_from_utf32** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_string_from_utf32** **(** **)** |const| Converts UTF-32 encoded array to :ref:`String`. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_get_string_from_utf8: -- :ref:`String` **get_string_from_utf8** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_string_from_utf8** **(** **)** |const| Converts UTF-8 encoded array to :ref:`String`. Slower than :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_has: -- :ref:`bool` **has** **(** :ref:`int` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`int` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_has_encoded_var: -- :ref:`bool` **has_encoded_var** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_encoded_var** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| Returns ``true`` if a valid :ref:`Variant` value can be decoded at the ``byte_offset``. Returns ``false`` othewrise or when the value is :ref:`Object`-derived and ``allow_objects`` is ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_hex_encode: -- :ref:`String` **hex_encode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **hex_encode** **(** **)** |const| Returns a hexadecimal representation of this array as a :ref:`String`. @@ -551,103 +760,151 @@ Returns a hexadecimal representation of this array as a :ref:`String` **insert** **(** :ref:`int` at_index, :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`int` value **)** 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_PackedByteArray_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`int` value **)** Appends an element at the end of the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_rfind: -- :ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_set: -- void **set** **(** :ref:`int` index, :ref:`int` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`int` value **)** Changes the byte at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_slice: -- :ref:`PackedByteArray` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedByteArray``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedByteArray``. +:ref:`PackedByteArray` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedByteArray**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedByteArray**. 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_PackedByteArray_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_to_float32_array: -- :ref:`PackedFloat32Array` **to_float32_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **to_float32_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedFloat32Array`, where each block of 4 bytes has been converted to a 32-bit float (C++ ``float``). @@ -655,11 +912,15 @@ The size of the input array must be a multiple of 4 (size of 32-bit float). The If the original data can't be converted to 32-bit floats, the resulting data is undefined. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_to_float64_array: -- :ref:`PackedFloat64Array` **to_float64_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedFloat64Array` **to_float64_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedFloat64Array`, where each block of 8 bytes has been converted to a 64-bit float (C++ ``double``, Godot :ref:`float`). @@ -667,11 +928,15 @@ The size of the input array must be a multiple of 8 (size of 64-bit double). The If the original data can't be converted to 64-bit floats, the resulting data is undefined. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_to_int32_array: -- :ref:`PackedInt32Array` **to_int32_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **to_int32_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedInt32Array`, where each block of 4 bytes has been converted to a signed 32-bit integer (C++ ``int32_t``). @@ -679,11 +944,15 @@ The size of the input array must be a multiple of 4 (size of 32-bit integer). Th If the original data can't be converted to signed 32-bit integers, the resulting data is undefined. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_method_to_int64_array: -- :ref:`PackedInt64Array` **to_int64_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **to_int64_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedInt64Array`, where each block of 8 bytes has been converted to a signed 64-bit integer (C++ ``int64_t``, Godot :ref:`int`). @@ -691,36 +960,56 @@ The size of the input array must be a multiple of 8 (size of 64-bit integer). Th If the original data can't be converted to signed 64-bit integers, the resulting data is undefined. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedByteArray_operator_neq_bool: +.. _class_PackedByteArray_operator_neq_PackedByteArray: -- :ref:`bool` **operator !=** **(** :ref:`PackedByteArray` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedByteArray` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_operator_sum_PackedByteArray: -- :ref:`PackedByteArray` **operator +** **(** :ref:`PackedByteArray` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedByteArray`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedByteArray` **operator +** **(** :ref:`PackedByteArray` right **)** + +Returns a new **PackedByteArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedByteArray_operator_eq_bool: +.. _class_PackedByteArray_operator_eq_PackedByteArray: -- :ref:`bool` **operator ==** **(** :ref:`PackedByteArray` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedByteArray` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices. +.. rst-class:: classref-item-separator + ---- .. _class_PackedByteArray_operator_idx_int: -- :ref:`int` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`int` **operator []** **(** :ref:`int` index **)** 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. diff --git a/classes/class_packedcolorarray.rst b/classes/class_packedcolorarray.rst index 27bdfa483..c0ac209a6 100644 --- a/classes/class_packedcolorarray.rst +++ b/classes/class_packedcolorarray.rst @@ -12,308 +12,449 @@ PackedColorArray A packed array of :ref:`Color`\ s. +.. rst-class:: classref-introduction-group + Description ----------- An array specifically designed to hold :ref:`Color`. Packs data tightly, so it saves memory for large array sizes. +.. rst-class:: classref-reftable-group + Constructors ------------ -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`PackedColorArray` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`PackedColorArray` **(** :ref:`PackedColorArray` from **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`PackedColorArray` **(** :ref:`Array` from **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`PackedColorArray` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`PackedColorArray` **(** :ref:`PackedColorArray` from **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`PackedColorArray` **(** :ref:`Array` from **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`Color` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedColorArray` array **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`Color` value, :ref:`bool` before=true **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`Color` value **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`duplicate` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`Color` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`Color` value, :ref:`int` from=0 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`Color` value **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Color` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`Color` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`Color` value, :ref:`int` from=-1 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`Color` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`Color` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedColorArray` array **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`Color` value, :ref:`bool` before=true **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`Color` value **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`duplicate` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`Color` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`Color` value, :ref:`int` from=0 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`Color` value **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Color` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`Color` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`Color` value, :ref:`int` from=-1 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`Color` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedColorArray` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`operator +` **(** :ref:`PackedColorArray` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedColorArray` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedColorArray` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`operator +` **(** :ref:`PackedColorArray` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedColorArray` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedColorArray_constructor_PackedColorArray: -- :ref:`PackedColorArray` **PackedColorArray** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedColorArray``. +:ref:`PackedColorArray` **PackedColorArray** **(** **)** + +Constructs an empty **PackedColorArray**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedColorArray` **PackedColorArray** **(** :ref:`PackedColorArray` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedColorArray`` as a copy of the given ``PackedColorArray``. +:ref:`PackedColorArray` **PackedColorArray** **(** :ref:`PackedColorArray` from **)** + +Constructs a **PackedColorArray** as a copy of the given **PackedColorArray**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedColorArray` **PackedColorArray** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedColorArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedColorArray` **PackedColorArray** **(** :ref:`Array` from **)** + +Constructs a new **PackedColorArray**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedColorArray_method_append: -- :ref:`bool` **append** **(** :ref:`Color` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`Color` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_append_array: -- void **append_array** **(** :ref:`PackedColorArray` array **)** +.. rst-class:: classref-method -Appends a ``PackedColorArray`` at the end of this array. +void **append_array** **(** :ref:`PackedColorArray` array **)** + +Appends a **PackedColorArray** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedColorArray_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`Color` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`Color` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_count: -- :ref:`int` **count** **(** :ref:`Color` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`Color` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_duplicate: -- :ref:`PackedColorArray` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedColorArray` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_fill: -- void **fill** **(** :ref:`Color` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`Color` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_find: -- :ref:`int` **find** **(** :ref:`Color` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`Color` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_has: -- :ref:`bool` **has** **(** :ref:`Color` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`Color` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`Color` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`Color` value **)** 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_PackedColorArray_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`Color` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`Color` value **)** Appends a value to the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_rfind: -- :ref:`int` **rfind** **(** :ref:`Color` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`Color` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_set: -- void **set** **(** :ref:`int` index, :ref:`Color` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`Color` value **)** Changes the :ref:`Color` at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_slice: -- :ref:`PackedColorArray` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedColorArray``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedColorArray``. +:ref:`PackedColorArray` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedColorArray**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedColorArray**. 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_PackedColorArray_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a :ref:`PackedByteArray` with each color encoded as bytes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedColorArray_operator_neq_bool: +.. _class_PackedColorArray_operator_neq_PackedColorArray: -- :ref:`bool` **operator !=** **(** :ref:`PackedColorArray` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedColorArray` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- .. _class_PackedColorArray_operator_sum_PackedColorArray: -- :ref:`PackedColorArray` **operator +** **(** :ref:`PackedColorArray` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedColorArray`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedColorArray` **operator +** **(** :ref:`PackedColorArray` right **)** + +Returns a new **PackedColorArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedColorArray_operator_eq_bool: +.. _class_PackedColorArray_operator_eq_PackedColorArray: -- :ref:`bool` **operator ==** **(** :ref:`PackedColorArray` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedColorArray` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Color`\ s at the corresponding indices. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedColorArray_operator_idx_Color: +.. _class_PackedColorArray_operator_idx_int: -- :ref:`Color` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`Color` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packeddatacontainer.rst b/classes/class_packeddatacontainer.rst index af237f81d..c147cf73d 100644 --- a/classes/class_packeddatacontainer.rst +++ b/classes/class_packeddatacontainer.rst @@ -16,53 +16,79 @@ PackedDataContainer There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+--------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`__data__` | ``PackedByteArray()`` | -+-----------------------------------------------+--------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+--------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`__data__` | ``PackedByteArray()`` | + +-----------------------------------------------+--------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`pack` **(** :ref:`Variant` value **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`pack` **(** :ref:`Variant` value **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PackedDataContainer_property___data__: -- :ref:`PackedByteArray` **__data__** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+-----------------------+ +:ref:`PackedByteArray` **__data__** = ``PackedByteArray()`` .. 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 ------------------- .. _class_PackedDataContainer_method_pack: -- :ref:`Error` **pack** **(** :ref:`Variant` value **)** +.. rst-class:: classref-method + +:ref:`Error` **pack** **(** :ref:`Variant` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PackedDataContainer_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| .. container:: contribute diff --git a/classes/class_packeddatacontainerref.rst b/classes/class_packeddatacontainerref.rst index f7811ff46..a178d3ff7 100644 --- a/classes/class_packeddatacontainerref.rst +++ b/classes/class_packeddatacontainerref.rst @@ -14,19 +14,32 @@ PackedDataContainerRef Reference-counted version of :ref:`PackedDataContainer`. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-----------------------+---------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-----------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedDataContainerRef_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| .. container:: contribute diff --git a/classes/class_packedfloat32array.rst b/classes/class_packedfloat32array.rst index 775d26843..94a276d80 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -12,6 +12,8 @@ PackedFloat32Array A packed array of 32-bit floating-point values. +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,305 +21,444 @@ 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`. +.. rst-class:: classref-reftable-group + Constructors ------------ -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`PackedFloat32Array` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`PackedFloat32Array` **(** :ref:`PackedFloat32Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`PackedFloat32Array` **(** :ref:`Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`PackedFloat32Array` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`PackedFloat32Array` **(** :ref:`PackedFloat32Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`PackedFloat32Array` **(** :ref:`Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedFloat32Array` array **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`duplicate` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`float` value, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`float` value **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedFloat32Array` array **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`duplicate` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`float` value, :ref:`int` from=0 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`float` value **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedFloat32Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`operator +` **(** :ref:`PackedFloat32Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedFloat32Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedFloat32Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`operator +` **(** :ref:`PackedFloat32Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedFloat32Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedFloat32Array_constructor_PackedFloat32Array: -- :ref:`PackedFloat32Array` **PackedFloat32Array** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedFloat32Array``. +:ref:`PackedFloat32Array` **PackedFloat32Array** **(** **)** + +Constructs an empty **PackedFloat32Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedFloat32Array` **PackedFloat32Array** **(** :ref:`PackedFloat32Array` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedFloat32Array`` as a copy of the given ``PackedFloat32Array``. +:ref:`PackedFloat32Array` **PackedFloat32Array** **(** :ref:`PackedFloat32Array` from **)** + +Constructs a **PackedFloat32Array** as a copy of the given **PackedFloat32Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedFloat32Array` **PackedFloat32Array** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedFloat32Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedFloat32Array` **PackedFloat32Array** **(** :ref:`Array` from **)** + +Constructs a new **PackedFloat32Array**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedFloat32Array_method_append: -- :ref:`bool` **append** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`float` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_append_array: -- void **append_array** **(** :ref:`PackedFloat32Array` array **)** +.. rst-class:: classref-method -Appends a ``PackedFloat32Array`` at the end of this array. +void **append_array** **(** :ref:`PackedFloat32Array` array **)** + +Appends a **PackedFloat32Array** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedFloat32Array_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`float` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`float` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_count: -- :ref:`int` **count** **(** :ref:`float` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`float` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_duplicate: -- :ref:`PackedFloat32Array` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_fill: -- void **fill** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`float` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_find: -- :ref:`int` **find** **(** :ref:`float` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`float` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_has: -- :ref:`bool` **has** **(** :ref:`float` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`float` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`float` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`float` value **)** 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_PackedFloat32Array_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`float` value **)** Appends an element at the end of the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_rfind: -- :ref:`int` **rfind** **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_set: -- void **set** **(** :ref:`int` index, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`float` value **)** Changes the float at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_slice: -- :ref:`PackedFloat32Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedFloat32Array``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedFloat32Array``. +:ref:`PackedFloat32Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedFloat32Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedFloat32Array**. 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_PackedFloat32Array_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 4 bytes. The size of the new array will be ``float32_array.size() * 4``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedFloat32Array_operator_neq_bool: +.. _class_PackedFloat32Array_operator_neq_PackedFloat32Array: -- :ref:`bool` **operator !=** **(** :ref:`PackedFloat32Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedFloat32Array` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat32Array_operator_sum_PackedFloat32Array: -- :ref:`PackedFloat32Array` **operator +** **(** :ref:`PackedFloat32Array` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedFloat32Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedFloat32Array` **operator +** **(** :ref:`PackedFloat32Array` right **)** + +Returns a new **PackedFloat32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedFloat32Array_operator_eq_bool: +.. _class_PackedFloat32Array_operator_eq_PackedFloat32Array: -- :ref:`bool` **operator ==** **(** :ref:`PackedFloat32Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedFloat32Array` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedFloat32Array_operator_idx_float: +.. _class_PackedFloat32Array_operator_idx_int: -- :ref:`float` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`float` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index 595f80135..36ee060d7 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -12,6 +12,8 @@ PackedFloat64Array A packed array of 64-bit floating-point values. +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,305 +21,444 @@ 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` for a more memory-friendly alternative. +.. rst-class:: classref-reftable-group + Constructors ------------ -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat64Array` | :ref:`PackedFloat64Array` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat64Array` | :ref:`PackedFloat64Array` **(** :ref:`PackedFloat64Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat64Array` | :ref:`PackedFloat64Array` **(** :ref:`Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`PackedFloat64Array` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`PackedFloat64Array` **(** :ref:`PackedFloat64Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`PackedFloat64Array` **(** :ref:`Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedFloat64Array` array **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat64Array` | :ref:`duplicate` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`float` value, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`float` value **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`float` value **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat64Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedFloat64Array` array **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`duplicate` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`float` value, :ref:`int` from=0 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`float` value **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`float` value **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedFloat64Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat64Array` | :ref:`operator +` **(** :ref:`PackedFloat64Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedFloat64Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedFloat64Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`operator +` **(** :ref:`PackedFloat64Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedFloat64Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedFloat64Array_constructor_PackedFloat64Array: -- :ref:`PackedFloat64Array` **PackedFloat64Array** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedFloat64Array``. +:ref:`PackedFloat64Array` **PackedFloat64Array** **(** **)** + +Constructs an empty **PackedFloat64Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedFloat64Array` **PackedFloat64Array** **(** :ref:`PackedFloat64Array` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedFloat64Array`` as a copy of the given ``PackedFloat64Array``. +:ref:`PackedFloat64Array` **PackedFloat64Array** **(** :ref:`PackedFloat64Array` from **)** + +Constructs a **PackedFloat64Array** as a copy of the given **PackedFloat64Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedFloat64Array` **PackedFloat64Array** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedFloat64Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedFloat64Array` **PackedFloat64Array** **(** :ref:`Array` from **)** + +Constructs a new **PackedFloat64Array**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedFloat64Array_method_append: -- :ref:`bool` **append** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`float` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_append_array: -- void **append_array** **(** :ref:`PackedFloat64Array` array **)** +.. rst-class:: classref-method -Appends a ``PackedFloat64Array`` at the end of this array. +void **append_array** **(** :ref:`PackedFloat64Array` array **)** + +Appends a **PackedFloat64Array** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedFloat64Array_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`float` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`float` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_count: -- :ref:`int` **count** **(** :ref:`float` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`float` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_duplicate: -- :ref:`PackedFloat64Array` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedFloat64Array` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_fill: -- void **fill** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`float` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_find: -- :ref:`int` **find** **(** :ref:`float` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`float` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_has: -- :ref:`bool` **has** **(** :ref:`float` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`float` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`float` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`float` value **)** 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_PackedFloat64Array_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`float` value **)** Appends an element at the end of the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_rfind: -- :ref:`int` **rfind** **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_set: -- void **set** **(** :ref:`int` index, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`float` value **)** Changes the float at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_slice: -- :ref:`PackedFloat64Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedFloat64Array``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedFloat64Array``. +:ref:`PackedFloat64Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedFloat64Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedFloat64Array**. 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_PackedFloat64Array_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 8 bytes. The size of the new array will be ``float64_array.size() * 8``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedFloat64Array_operator_neq_bool: +.. _class_PackedFloat64Array_operator_neq_PackedFloat64Array: -- :ref:`bool` **operator !=** **(** :ref:`PackedFloat64Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedFloat64Array` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- .. _class_PackedFloat64Array_operator_sum_PackedFloat64Array: -- :ref:`PackedFloat64Array` **operator +** **(** :ref:`PackedFloat64Array` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedFloat64Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedFloat64Array` **operator +** **(** :ref:`PackedFloat64Array` right **)** + +Returns a new **PackedFloat64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedFloat64Array_operator_eq_bool: +.. _class_PackedFloat64Array_operator_eq_PackedFloat64Array: -- :ref:`bool` **operator ==** **(** :ref:`PackedFloat64Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedFloat64Array` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedFloat64Array_operator_idx_float: +.. _class_PackedFloat64Array_operator_idx_int: -- :ref:`float` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`float` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index c7dd6cdca..5962bfc77 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -12,6 +12,8 @@ PackedInt32Array A packed array of 32-bit integers. +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,305 +21,444 @@ 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` uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see :ref:`PackedInt64Array`. +.. rst-class:: classref-reftable-group + Constructors ------------ -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`PackedInt32Array` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`PackedInt32Array` **(** :ref:`PackedInt32Array` from **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`PackedInt32Array` **(** :ref:`Array` from **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`PackedInt32Array` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`PackedInt32Array` **(** :ref:`PackedInt32Array` from **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`PackedInt32Array` **(** :ref:`Array` from **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedInt32Array` array **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`duplicate` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedInt32Array` array **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`duplicate` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedInt32Array` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`operator +` **(** :ref:`PackedInt32Array` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedInt32Array` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedInt32Array` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`operator +` **(** :ref:`PackedInt32Array` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedInt32Array` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedInt32Array_constructor_PackedInt32Array: -- :ref:`PackedInt32Array` **PackedInt32Array** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedInt32Array``. +:ref:`PackedInt32Array` **PackedInt32Array** **(** **)** + +Constructs an empty **PackedInt32Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedInt32Array` **PackedInt32Array** **(** :ref:`PackedInt32Array` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedInt32Array`` as a copy of the given ``PackedInt32Array``. +:ref:`PackedInt32Array` **PackedInt32Array** **(** :ref:`PackedInt32Array` from **)** + +Constructs a **PackedInt32Array** as a copy of the given **PackedInt32Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedInt32Array` **PackedInt32Array** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedInt32Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedInt32Array` **PackedInt32Array** **(** :ref:`Array` from **)** + +Constructs a new **PackedInt32Array**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedInt32Array_method_append: -- :ref:`bool` **append** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`int` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_append_array: -- void **append_array** **(** :ref:`PackedInt32Array` array **)** +.. rst-class:: classref-method -Appends a ``PackedInt32Array`` at the end of this array. +void **append_array** **(** :ref:`PackedInt32Array` array **)** + +Appends a **PackedInt32Array** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedInt32Array_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`int` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`int` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_count: -- :ref:`int` **count** **(** :ref:`int` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`int` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_duplicate: -- :ref:`PackedInt32Array` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_fill: -- void **fill** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_find: -- :ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_has: -- :ref:`bool` **has** **(** :ref:`int` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`int` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`int` value **)** 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()``). +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`int` value **)** Appends a value to the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_rfind: -- :ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_set: -- void **set** **(** :ref:`int` index, :ref:`int` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`int` value **)** Changes the integer at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_slice: -- :ref:`PackedInt32Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedInt32Array``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedInt32Array``. +:ref:`PackedInt32Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedInt32Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedInt32Array**. 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_PackedInt32Array_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 4 bytes. The size of the new array will be ``int32_array.size() * 4``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedInt32Array_operator_neq_bool: +.. _class_PackedInt32Array_operator_neq_PackedInt32Array: -- :ref:`bool` **operator !=** **(** :ref:`PackedInt32Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedInt32Array` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_operator_sum_PackedInt32Array: -- :ref:`PackedInt32Array` **operator +** **(** :ref:`PackedInt32Array` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedInt32Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedInt32Array` **operator +** **(** :ref:`PackedInt32Array` right **)** + +Returns a new **PackedInt32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedInt32Array_operator_eq_bool: +.. _class_PackedInt32Array_operator_eq_PackedInt32Array: -- :ref:`bool` **operator ==** **(** :ref:`PackedInt32Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedInt32Array` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt32Array_operator_idx_int: -- :ref:`int` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`int` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index d9108a285..7ce219733 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -12,6 +12,8 @@ PackedInt64Array A packed array of 64-bit integers. +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,305 +21,444 @@ 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` for a more memory-friendly alternative. +.. rst-class:: classref-reftable-group + Constructors ------------ -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`PackedInt64Array` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`PackedInt64Array` **(** :ref:`PackedInt64Array` from **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`PackedInt64Array` **(** :ref:`Array` from **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`PackedInt64Array` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`PackedInt64Array` **(** :ref:`PackedInt64Array` from **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`PackedInt64Array` **(** :ref:`Array` from **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedInt64Array` array **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`duplicate` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedInt64Array` array **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`duplicate` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedInt64Array` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`operator +` **(** :ref:`PackedInt64Array` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedInt64Array` right **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedInt64Array` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`operator +` **(** :ref:`PackedInt64Array` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedInt64Array` right **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedInt64Array_constructor_PackedInt64Array: -- :ref:`PackedInt64Array` **PackedInt64Array** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedInt64Array``. +:ref:`PackedInt64Array` **PackedInt64Array** **(** **)** + +Constructs an empty **PackedInt64Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedInt64Array` **PackedInt64Array** **(** :ref:`PackedInt64Array` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedInt64Array`` as a copy of the given ``PackedInt64Array``. +:ref:`PackedInt64Array` **PackedInt64Array** **(** :ref:`PackedInt64Array` from **)** + +Constructs a **PackedInt64Array** as a copy of the given **PackedInt64Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedInt64Array` **PackedInt64Array** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedInt64Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedInt64Array` **PackedInt64Array** **(** :ref:`Array` from **)** + +Constructs a new **PackedInt64Array**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedInt64Array_method_append: -- :ref:`bool` **append** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`int` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_append_array: -- void **append_array** **(** :ref:`PackedInt64Array` array **)** +.. rst-class:: classref-method -Appends a ``PackedInt64Array`` at the end of this array. +void **append_array** **(** :ref:`PackedInt64Array` array **)** + +Appends a **PackedInt64Array** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedInt64Array_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`int` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`int` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_count: -- :ref:`int` **count** **(** :ref:`int` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`int` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_duplicate: -- :ref:`PackedInt64Array` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_fill: -- void **fill** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`int` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_find: -- :ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_has: -- :ref:`bool` **has** **(** :ref:`int` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`int` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`int` value **)** 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()``). +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`int` value **)** Appends a value to the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_rfind: -- :ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_set: -- void **set** **(** :ref:`int` index, :ref:`int` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`int` value **)** Changes the integer at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_slice: -- :ref:`PackedInt64Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedInt64Array``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedInt64Array``. +:ref:`PackedInt64Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedInt64Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedInt64Array**. 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_PackedInt64Array_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 8 bytes. The size of the new array will be ``int64_array.size() * 8``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedInt64Array_operator_neq_bool: +.. _class_PackedInt64Array_operator_neq_PackedInt64Array: -- :ref:`bool` **operator !=** **(** :ref:`PackedInt64Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedInt64Array` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_operator_sum_PackedInt64Array: -- :ref:`PackedInt64Array` **operator +** **(** :ref:`PackedInt64Array` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedInt64Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedInt64Array` **operator +** **(** :ref:`PackedInt64Array` right **)** + +Returns a new **PackedInt64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedInt64Array_operator_eq_bool: +.. _class_PackedInt64Array_operator_eq_PackedInt64Array: -- :ref:`bool` **operator ==** **(** :ref:`PackedInt64Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedInt64Array` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. +.. rst-class:: classref-item-separator + ---- .. _class_PackedInt64Array_operator_idx_int: -- :ref:`int` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`int` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index b559a99bc..fc01d3d5f 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -14,6 +14,8 @@ PackedScene An abstraction of a serialized scene. +.. rst-class:: classref-introduction-group + Description ----------- @@ -99,105 +101,165 @@ Can be used to save a node to a file. When saving, the node as well as all the n +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Role Playing Game Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_bundled` | ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 2 }`` | -+-------------------------------------+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_bundled` | ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 2 }`` | + +-------------------------------------+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_instantiate` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SceneState` | :ref:`get_state` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`instantiate` **(** :ref:`GenEditState` edit_state=0 **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`pack` **(** :ref:`Node` path **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_instantiate` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SceneState` | :ref:`get_state` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`instantiate` **(** :ref:`GenEditState` edit_state=0 **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`pack` **(** :ref:`Node` path **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PackedScene_GenEditState: -.. _class_PackedScene_constant_GEN_EDIT_STATE_DISABLED: - -.. _class_PackedScene_constant_GEN_EDIT_STATE_INSTANCE: - -.. _class_PackedScene_constant_GEN_EDIT_STATE_MAIN: - -.. _class_PackedScene_constant_GEN_EDIT_STATE_MAIN_INHERITED: +.. rst-class:: classref-enumeration enum **GenEditState**: -- **GEN_EDIT_STATE_DISABLED** = **0** --- If passed to :ref:`instantiate`, blocks edits to the scene state. +.. _class_PackedScene_constant_GEN_EDIT_STATE_DISABLED: -- **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`instantiate`, provides local scene resources to the local scene. +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_DISABLED** = ``0`` + +If passed to :ref:`instantiate`, blocks edits to the scene state. + +.. _class_PackedScene_constant_GEN_EDIT_STATE_INSTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_INSTANCE** = ``1`` + +If passed to :ref:`instantiate`, provides local scene resources to the local scene. \ **Note:** Only available in editor builds. -- **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`instantiate`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. +.. _class_PackedScene_constant_GEN_EDIT_STATE_MAIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_MAIN** = ``2`` + +If passed to :ref:`instantiate`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. \ **Note:** Only available in editor builds. -- **GEN_EDIT_STATE_MAIN_INHERITED** = **3** --- It's similar to :ref:`GEN_EDIT_STATE_MAIN`, but for the case where the scene is being instantiated to be the base of another one. +.. _class_PackedScene_constant_GEN_EDIT_STATE_MAIN_INHERITED: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_MAIN_INHERITED** = ``3`` + +It's similar to :ref:`GEN_EDIT_STATE_MAIN`, but for the case where the scene is being instantiated to be the base of another one. \ **Note:** Only available in editor builds. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_PackedScene_property__bundled: -- :ref:`Dictionary` **_bundled** +.. rst-class:: classref-property -+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| *Default* | ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 2 }`` | -+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +:ref:`Dictionary` **_bundled** = ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 2 }`` 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PackedScene_method_can_instantiate: -- :ref:`bool` **can_instantiate** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_instantiate** **(** **)** |const| Returns ``true`` if the scene file has nodes. +.. rst-class:: classref-item-separator + ---- .. _class_PackedScene_method_get_state: -- :ref:`SceneState` **get_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SceneState` **get_state** **(** **)** |const| Returns the ``SceneState`` representing the scene file contents. +.. rst-class:: classref-item-separator + ---- .. _class_PackedScene_method_instantiate: -- :ref:`Node` **instantiate** **(** :ref:`GenEditState` edit_state=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **instantiate** **(** :ref:`GenEditState` edit_state=0 **)** |const| Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a :ref:`Node.NOTIFICATION_SCENE_INSTANTIATED` notification on the root node. +.. rst-class:: classref-item-separator + ---- .. _class_PackedScene_method_pack: -- :ref:`Error` **pack** **(** :ref:`Node` path **)** +.. rst-class:: classref-method + +:ref:`Error` **pack** **(** :ref:`Node` path **)** Pack will ignore any sub-nodes not owned by given node. See :ref:`Node.owner`. diff --git a/classes/class_packedstringarray.rst b/classes/class_packedstringarray.rst index b189bab7a..647b2f3d3 100644 --- a/classes/class_packedstringarray.rst +++ b/classes/class_packedstringarray.rst @@ -12,6 +12,8 @@ PackedStringArray A packed array of :ref:`String`\ s. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,308 +27,449 @@ If you want to join the strings in the array, use :ref:`String.join`__ +.. rst-class:: classref-reftable-group + Constructors ------------ -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`PackedStringArray` **(** **)** | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`PackedStringArray` **(** :ref:`PackedStringArray` from **)** | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`PackedStringArray` **(** :ref:`Array` from **)** | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`PackedStringArray` **(** **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`PackedStringArray` **(** :ref:`PackedStringArray` from **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`PackedStringArray` **(** :ref:`Array` from **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`String` value **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedStringArray` array **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`String` value, :ref:`bool` before=true **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`String` value **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`duplicate` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`String` value **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`String` value, :ref:`int` from=0 **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`String` value **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`String` value **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`String` value **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`String` value, :ref:`int` from=-1 **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`String` value **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`String` value **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedStringArray` array **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`String` value, :ref:`bool` before=true **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`String` value **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`duplicate` **(** **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`String` value **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`String` value, :ref:`int` from=0 **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`String` value **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`String` value **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`String` value **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`String` value, :ref:`int` from=-1 **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`String` value **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedStringArray` right **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`operator +` **(** :ref:`PackedStringArray` right **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedStringArray` right **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`operator []` **(** :ref:`int` index **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedStringArray` right **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`operator +` **(** :ref:`PackedStringArray` right **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedStringArray` right **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`operator []` **(** :ref:`int` index **)** | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedStringArray_constructor_PackedStringArray: -- :ref:`PackedStringArray` **PackedStringArray** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedStringArray``. +:ref:`PackedStringArray` **PackedStringArray** **(** **)** + +Constructs an empty **PackedStringArray**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedStringArray` **PackedStringArray** **(** :ref:`PackedStringArray` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedStringArray`` as a copy of the given ``PackedStringArray``. +:ref:`PackedStringArray` **PackedStringArray** **(** :ref:`PackedStringArray` from **)** + +Constructs a **PackedStringArray** as a copy of the given **PackedStringArray**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedStringArray` **PackedStringArray** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedStringArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedStringArray` **PackedStringArray** **(** :ref:`Array` from **)** + +Constructs a new **PackedStringArray**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedStringArray_method_append: -- :ref:`bool` **append** **(** :ref:`String` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`String` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_append_array: -- void **append_array** **(** :ref:`PackedStringArray` array **)** +.. rst-class:: classref-method -Appends a ``PackedStringArray`` at the end of this array. +void **append_array** **(** :ref:`PackedStringArray` array **)** + +Appends a **PackedStringArray** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedStringArray_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`String` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`String` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_count: -- :ref:`int` **count** **(** :ref:`String` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`String` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_duplicate: -- :ref:`PackedStringArray` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_fill: -- void **fill** **(** :ref:`String` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`String` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_find: -- :ref:`int` **find** **(** :ref:`String` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`String` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_has: -- :ref:`bool` **has** **(** :ref:`String` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`String` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`String` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`String` value **)** 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_PackedStringArray_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`String` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`String` value **)** Appends a string element at end of the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_rfind: -- :ref:`int` **rfind** **(** :ref:`String` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`String` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_set: -- void **set** **(** :ref:`int` index, :ref:`String` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`String` value **)** Changes the :ref:`String` at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_slice: -- :ref:`PackedStringArray` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedStringArray``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedStringArray``. +:ref:`PackedStringArray` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedStringArray**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedStringArray**. 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_PackedStringArray_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a :ref:`PackedByteArray` with each string encoded as bytes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedStringArray_operator_neq_bool: +.. _class_PackedStringArray_operator_neq_PackedStringArray: -- :ref:`bool` **operator !=** **(** :ref:`PackedStringArray` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedStringArray` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- .. _class_PackedStringArray_operator_sum_PackedStringArray: -- :ref:`PackedStringArray` **operator +** **(** :ref:`PackedStringArray` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedStringArray`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedStringArray` **operator +** **(** :ref:`PackedStringArray` right **)** + +Returns a new **PackedStringArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedStringArray_operator_eq_bool: +.. _class_PackedStringArray_operator_eq_PackedStringArray: -- :ref:`bool` **operator ==** **(** :ref:`PackedStringArray` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedStringArray` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`String`\ s at the corresponding indices. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedStringArray_operator_idx_String: +.. _class_PackedStringArray_operator_idx_int: -- :ref:`String` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`String` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index 1084a6cbf..6ce6d0908 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -12,323 +12,470 @@ PackedVector2Array A packed array of :ref:`Vector2`\ s. +.. rst-class:: classref-introduction-group + Description ----------- An array specifically designed to hold :ref:`Vector2`. Packs data tightly, so it saves memory for large array sizes. +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Navigation Astar Demo `__ +.. rst-class:: classref-reftable-group + Constructors ------------ -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`PackedVector2Array` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`PackedVector2Array` **(** :ref:`PackedVector2Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`PackedVector2Array` **(** :ref:`Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`PackedVector2Array` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`PackedVector2Array` **(** :ref:`PackedVector2Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`PackedVector2Array` **(** :ref:`Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`Vector2` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedVector2Array` array **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`Vector2` value, :ref:`bool` before=true **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`Vector2` value **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`duplicate` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`Vector2` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`Vector2` value, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`Vector2` value **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Vector2` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`Vector2` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`Vector2` value, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`Vector2` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`Vector2` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedVector2Array` array **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`Vector2` value, :ref:`bool` before=true **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`Vector2` value **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`duplicate` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`Vector2` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`Vector2` value, :ref:`int` from=0 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`Vector2` value **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Vector2` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`Vector2` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`Vector2` value, :ref:`int` from=-1 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`Vector2` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedVector2Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`operator +` **(** :ref:`PackedVector2Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedVector2Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator []` **(** :ref:`int` index **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedVector2Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`operator +` **(** :ref:`PackedVector2Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedVector2Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator []` **(** :ref:`int` index **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedVector2Array_constructor_PackedVector2Array: -- :ref:`PackedVector2Array` **PackedVector2Array** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedVector2Array``. +:ref:`PackedVector2Array` **PackedVector2Array** **(** **)** + +Constructs an empty **PackedVector2Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedVector2Array` **PackedVector2Array** **(** :ref:`PackedVector2Array` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedVector2Array`` as a copy of the given ``PackedVector2Array``. +:ref:`PackedVector2Array` **PackedVector2Array** **(** :ref:`PackedVector2Array` from **)** + +Constructs a **PackedVector2Array** as a copy of the given **PackedVector2Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedVector2Array` **PackedVector2Array** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedVector2Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedVector2Array` **PackedVector2Array** **(** :ref:`Array` from **)** + +Constructs a new **PackedVector2Array**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedVector2Array_method_append: -- :ref:`bool` **append** **(** :ref:`Vector2` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`Vector2` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_append_array: -- void **append_array** **(** :ref:`PackedVector2Array` array **)** +.. rst-class:: classref-method -Appends a ``PackedVector2Array`` at the end of this array. +void **append_array** **(** :ref:`PackedVector2Array` array **)** + +Appends a **PackedVector2Array** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedVector2Array_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`Vector2` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`Vector2` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_count: -- :ref:`int` **count** **(** :ref:`Vector2` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`Vector2` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_duplicate: -- :ref:`PackedVector2Array` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_fill: -- void **fill** **(** :ref:`Vector2` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`Vector2` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_find: -- :ref:`int` **find** **(** :ref:`Vector2` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`Vector2` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_has: -- :ref:`bool` **has** **(** :ref:`Vector2` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`Vector2` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`Vector2` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`Vector2` value **)** 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_PackedVector2Array_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`Vector2` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`Vector2` value **)** Inserts a :ref:`Vector2` at the end. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_rfind: -- :ref:`int` **rfind** **(** :ref:`Vector2` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`Vector2` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_set: -- void **set** **(** :ref:`int` index, :ref:`Vector2` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`Vector2` value **)** Changes the :ref:`Vector2` at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_slice: -- :ref:`PackedVector2Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedVector2Array``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedVector2Array``. +:ref:`PackedVector2Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedVector2Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedVector2Array**. 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_PackedVector2Array_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a :ref:`PackedByteArray` with each vector encoded as bytes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedVector2Array_operator_neq_bool: +.. _class_PackedVector2Array_operator_neq_PackedVector2Array: -- :ref:`bool` **operator !=** **(** :ref:`PackedVector2Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedVector2Array` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedVector2Array_operator_mul_PackedVector2Array: +.. _class_PackedVector2Array_operator_mul_Transform2D: -- :ref:`PackedVector2Array` **operator *** **(** :ref:`Transform2D` right **)** +.. rst-class:: classref-operator + +:ref:`PackedVector2Array` **operator *** **(** :ref:`Transform2D` right **)** Transforms (multiplies) all vectors in the array by the :ref:`Transform2D` matrix. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector2Array_operator_sum_PackedVector2Array: -- :ref:`PackedVector2Array` **operator +** **(** :ref:`PackedVector2Array` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedVector2Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedVector2Array` **operator +** **(** :ref:`PackedVector2Array` right **)** + +Returns a new **PackedVector2Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedVector2Array_operator_eq_bool: +.. _class_PackedVector2Array_operator_eq_PackedVector2Array: -- :ref:`bool` **operator ==** **(** :ref:`PackedVector2Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedVector2Array` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Vector2`\ s at the corresponding indices. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedVector2Array_operator_idx_Vector2: +.. _class_PackedVector2Array_operator_idx_int: -- :ref:`Vector2` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`Vector2` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index 1fed5bafc..d51d69160 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -12,318 +12,463 @@ PackedVector3Array A packed array of :ref:`Vector3`\ s. +.. rst-class:: classref-introduction-group + Description ----------- An array specifically designed to hold :ref:`Vector3`. Packs data tightly, so it saves memory for large array sizes. +.. rst-class:: classref-reftable-group + Constructors ------------ -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`PackedVector3Array` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`PackedVector3Array` **(** :ref:`PackedVector3Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`PackedVector3Array` **(** :ref:`Array` from **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`PackedVector3Array` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`PackedVector3Array` **(** :ref:`PackedVector3Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`PackedVector3Array` **(** :ref:`Array` from **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`append` **(** :ref:`Vector3` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_array` **(** :ref:`PackedVector3Array` array **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bsearch` **(** :ref:`Vector3` value, :ref:`bool` before=true **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`Vector3` value **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`duplicate` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fill` **(** :ref:`Vector3` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`Vector3` value, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`Vector3` value **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Vector3` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`push_back` **(** :ref:`Vector3` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_at` **(** :ref:`int` index **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reverse` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`Vector3` value, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` index, :ref:`Vector3` value **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort` **(** **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`append` **(** :ref:`Vector3` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_array` **(** :ref:`PackedVector3Array` array **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch` **(** :ref:`Vector3` value, :ref:`bool` before=true **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`Vector3` value **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`duplicate` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`Vector3` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`Vector3` value, :ref:`int` from=0 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`Vector3` value **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Vector3` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_back` **(** :ref:`Vector3` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_at` **(** :ref:`int` index **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize` **(** :ref:`int` new_size **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reverse` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`Vector3` value, :ref:`int` from=-1 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set` **(** :ref:`int` index, :ref:`Vector3` value **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sort` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_byte_array` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedVector3Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`operator +` **(** :ref:`PackedVector3Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedVector3Array` right **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator []` **(** :ref:`int` index **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedVector3Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`operator +` **(** :ref:`PackedVector3Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedVector3Array` right **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator []` **(** :ref:`int` index **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_PackedVector3Array_constructor_PackedVector3Array: -- :ref:`PackedVector3Array` **PackedVector3Array** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``PackedVector3Array``. +:ref:`PackedVector3Array` **PackedVector3Array** **(** **)** + +Constructs an empty **PackedVector3Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedVector3Array` **PackedVector3Array** **(** :ref:`PackedVector3Array` from **)** +.. rst-class:: classref-constructor -Constructs a ``PackedVector3Array`` as a copy of the given ``PackedVector3Array``. +:ref:`PackedVector3Array` **PackedVector3Array** **(** :ref:`PackedVector3Array` from **)** + +Constructs a **PackedVector3Array** as a copy of the given **PackedVector3Array**. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedVector3Array` **PackedVector3Array** **(** :ref:`Array` from **)** +.. rst-class:: classref-constructor -Constructs a new ``PackedVector3Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. +:ref:`PackedVector3Array` **PackedVector3Array** **(** :ref:`Array` from **)** + +Constructs a new **PackedVector3Array**. Optionally, you can pass in a generic :ref:`Array` that will be converted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PackedVector3Array_method_append: -- :ref:`bool` **append** **(** :ref:`Vector3` value **)** +.. rst-class:: classref-method + +:ref:`bool` **append** **(** :ref:`Vector3` value **)** Appends an element at the end of the array (alias of :ref:`push_back`). +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_append_array: -- void **append_array** **(** :ref:`PackedVector3Array` array **)** +.. rst-class:: classref-method -Appends a ``PackedVector3Array`` at the end of this array. +void **append_array** **(** :ref:`PackedVector3Array` array **)** + +Appends a **PackedVector3Array** at the end of this array. + +.. rst-class:: classref-item-separator ---- .. _class_PackedVector3Array_method_bsearch: -- :ref:`int` **bsearch** **(** :ref:`Vector3` value, :ref:`bool` before=true **)** +.. rst-class:: classref-method + +:ref:`int` **bsearch** **(** :ref:`Vector3` value, :ref:`bool` before=true **)** 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` on an unsorted array results in unexpected behavior. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_count: -- :ref:`int` **count** **(** :ref:`Vector3` value **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`Vector3` value **)** |const| Returns the number of times an element is in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_duplicate: -- :ref:`PackedVector3Array` **duplicate** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **duplicate** **(** **)** Creates a copy of the array, and returns it. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_fill: -- void **fill** **(** :ref:`Vector3` value **)** +.. rst-class:: classref-method + +void **fill** **(** :ref:`Vector3` value **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_find: -- :ref:`int` **find** **(** :ref:`Vector3` value, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`Vector3` value, :ref:`int` from=0 **)** |const| Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_has: -- :ref:`bool` **has** **(** :ref:`Vector3` value **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`Vector3` value **)** |const| Returns ``true`` if the array contains ``value``. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_insert: -- :ref:`int` **insert** **(** :ref:`int` at_index, :ref:`Vector3` value **)** +.. rst-class:: classref-method + +:ref:`int` **insert** **(** :ref:`int` at_index, :ref:`Vector3` value **)** 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_PackedVector3Array_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the array is empty. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_push_back: -- :ref:`bool` **push_back** **(** :ref:`Vector3` value **)** +.. rst-class:: classref-method + +:ref:`bool` **push_back** **(** :ref:`Vector3` value **)** Inserts a :ref:`Vector3` at the end. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_remove_at: -- void **remove_at** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_at** **(** :ref:`int` index **)** Removes an element from the array by index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_resize: -- :ref:`int` **resize** **(** :ref:`int` new_size **)** +.. rst-class:: classref-method + +:ref:`int` **resize** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_reverse: -- void **reverse** **(** **)** +.. rst-class:: classref-method + +void **reverse** **(** **)** Reverses the order of the elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_rfind: -- :ref:`int` **rfind** **(** :ref:`Vector3` value, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`Vector3` value, :ref:`int` from=-1 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_set: -- void **set** **(** :ref:`int` index, :ref:`Vector3` value **)** +.. rst-class:: classref-method + +void **set** **(** :ref:`int` index, :ref:`Vector3` value **)** Changes the :ref:`Vector3` at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_size: -- :ref:`int` **size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **size** **(** **)** |const| Returns the number of elements in the array. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_slice: -- :ref:`PackedVector3Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| +.. rst-class:: classref-method -Returns the slice of the ``PackedVector3Array``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedVector3Array``. +:ref:`PackedVector3Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647 **)** |const| + +Returns the slice of the **PackedVector3Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedVector3Array**. 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_PackedVector3Array_method_sort: -- void **sort** **(** **)** +.. rst-class:: classref-method + +void **sort** **(** **)** Sorts the elements of the array in ascending order. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_method_to_byte_array: -- :ref:`PackedByteArray` **to_byte_array** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_byte_array** **(** **)** |const| Returns a :ref:`PackedByteArray` with each vector encoded as bytes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_PackedVector3Array_operator_neq_bool: +.. _class_PackedVector3Array_operator_neq_PackedVector3Array: -- :ref:`bool` **operator !=** **(** :ref:`PackedVector3Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`PackedVector3Array` right **)** Returns ``true`` if contents of the arrays differ. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedVector3Array_operator_mul_PackedVector3Array: +.. _class_PackedVector3Array_operator_mul_Transform3D: -- :ref:`PackedVector3Array` **operator *** **(** :ref:`Transform3D` right **)** +.. rst-class:: classref-operator + +:ref:`PackedVector3Array` **operator *** **(** :ref:`Transform3D` right **)** Transforms (multiplies) all vectors in the array by the :ref:`Transform3D` matrix. +.. rst-class:: classref-item-separator + ---- .. _class_PackedVector3Array_operator_sum_PackedVector3Array: -- :ref:`PackedVector3Array` **operator +** **(** :ref:`PackedVector3Array` right **)** +.. rst-class:: classref-operator -Returns a new ``PackedVector3Array`` with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. +:ref:`PackedVector3Array` **operator +** **(** :ref:`PackedVector3Array` right **)** + +Returns a new **PackedVector3Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array` instead. + +.. rst-class:: classref-item-separator ---- -.. _class_PackedVector3Array_operator_eq_bool: +.. _class_PackedVector3Array_operator_eq_PackedVector3Array: -- :ref:`bool` **operator ==** **(** :ref:`PackedVector3Array` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`PackedVector3Array` right **)** Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Vector3`\ s at the corresponding indices. +.. rst-class:: classref-item-separator + ---- -.. _class_PackedVector3Array_operator_idx_Vector3: +.. _class_PackedVector3Array_operator_idx_int: -- :ref:`Vector3` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`Vector3` **operator []** **(** :ref:`int` index **)** Returns the :ref:`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. diff --git a/classes/class_packetpeer.rst b/classes/class_packetpeer.rst index 46102f962..568fa4ee9 100644 --- a/classes/class_packetpeer.rst +++ b/classes/class_packetpeer.rst @@ -16,6 +16,8 @@ PacketPeer Abstraction and base class for packet-based protocols. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,97 +25,140 @@ PacketPeer is an abstraction and base class for packet-based protocols (such as \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+---------------------------------------------------------------------------------+-------------+ -| :ref:`int` | :ref:`encode_buffer_max_size` | ``8388608`` | -+-----------------------+---------------------------------------------------------------------------------+-------------+ +.. table:: + :widths: auto + + +-----------------------+---------------------------------------------------------------------------------+-------------+ + | :ref:`int` | :ref:`encode_buffer_max_size` | ``8388608`` | + +-----------------------+---------------------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_available_packet_count` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`get_packet` **(** **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`get_packet_error` **(** **)** |const| | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`put_packet` **(** :ref:`PackedByteArray` buffer **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`put_var` **(** :ref:`Variant` var, :ref:`bool` full_objects=false **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_available_packet_count` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_packet` **(** **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`get_packet_error` **(** **)** |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`put_packet` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`put_var` **(** :ref:`Variant` var, :ref:`bool` full_objects=false **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PacketPeer_property_encode_buffer_max_size: -- :ref:`int` **encode_buffer_max_size** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``8388608`` | -+-----------+-----------------------------------+ -| *Setter* | set_encode_buffer_max_size(value) | -+-----------+-----------------------------------+ -| *Getter* | get_encode_buffer_max_size() | -+-----------+-----------------------------------+ +:ref:`int` **encode_buffer_max_size** = ``8388608`` + +.. rst-class:: classref-property-setget + +- void **set_encode_buffer_max_size** **(** :ref:`int` value **)** +- :ref:`int` **get_encode_buffer_max_size** **(** **)** Maximum buffer size allowed when encoding :ref:`Variant`\ s. Raise this value to support heavier memory allocations. The :ref:`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`. If the :ref:`Variant` is bigger than ``encode_buffer_max_size``, the method will error out with :ref:`@GlobalScope.ERR_OUT_OF_MEMORY`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PacketPeer_method_get_available_packet_count: -- :ref:`int` **get_available_packet_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_available_packet_count** **(** **)** |const| Returns the number of packets currently available in the ring-buffer. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeer_method_get_packet: -- :ref:`PackedByteArray` **get_packet** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_packet** **(** **)** Gets a raw packet. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeer_method_get_packet_error: -- :ref:`Error` **get_packet_error** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Error` **get_packet_error** **(** **)** |const| Returns the error state of the last packet received (via :ref:`get_packet` and :ref:`get_var`). +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeer_method_get_var: -- :ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** +.. rst-class:: classref-method + +:ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** Gets a Variant. If ``allow_objects`` is ``true``, decoding objects is allowed. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeer_method_put_packet: -- :ref:`Error` **put_packet** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +:ref:`Error` **put_packet** **(** :ref:`PackedByteArray` buffer **)** Sends a raw packet. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeer_method_put_var: -- :ref:`Error` **put_var** **(** :ref:`Variant` var, :ref:`bool` full_objects=false **)** +.. rst-class:: classref-method + +:ref:`Error` **put_var** **(** :ref:`Variant` var, :ref:`bool` full_objects=false **)** Sends a :ref:`Variant` as a packet. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). diff --git a/classes/class_packetpeerdtls.rst b/classes/class_packetpeerdtls.rst index b03b6a41e..d9a67f563 100644 --- a/classes/class_packetpeerdtls.rst +++ b/classes/class_packetpeerdtls.rst @@ -14,6 +14,8 @@ PacketPeerDTLS DTLS packet peer. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,76 +25,129 @@ This class represents a DTLS peer connection. It can be used to connect to a DTL \ **Warning:** TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_to_peer` **(** :ref:`PacketPeerUDP` packet_peer, :ref:`bool` validate_certs=true, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** | -+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_from_peer` **(** **)** | -+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Status` | :ref:`get_status` **(** **)** |const| | -+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`poll` **(** **)** | -+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_to_peer` **(** :ref:`PacketPeerUDP` packet_peer, :ref:`bool` validate_certs=true, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect_from_peer` **(** **)** | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`get_status` **(** **)** |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`poll` **(** **)** | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PacketPeerDTLS_Status: -.. _class_PacketPeerDTLS_constant_STATUS_DISCONNECTED: - -.. _class_PacketPeerDTLS_constant_STATUS_HANDSHAKING: - -.. _class_PacketPeerDTLS_constant_STATUS_CONNECTED: - -.. _class_PacketPeerDTLS_constant_STATUS_ERROR: - -.. _class_PacketPeerDTLS_constant_STATUS_ERROR_HOSTNAME_MISMATCH: +.. rst-class:: classref-enumeration enum **Status**: -- **STATUS_DISCONNECTED** = **0** --- A status representing a ``PacketPeerDTLS`` that is disconnected. +.. _class_PacketPeerDTLS_constant_STATUS_DISCONNECTED: -- **STATUS_HANDSHAKING** = **1** --- A status representing a ``PacketPeerDTLS`` that is currently performing the handshake with a remote peer. +.. rst-class:: classref-enumeration-constant -- **STATUS_CONNECTED** = **2** --- A status representing a ``PacketPeerDTLS`` that is connected to a remote peer. +:ref:`Status` **STATUS_DISCONNECTED** = ``0`` -- **STATUS_ERROR** = **3** --- A status representing a ``PacketPeerDTLS`` in a generic error state. +A status representing a **PacketPeerDTLS** that is disconnected. -- **STATUS_ERROR_HOSTNAME_MISMATCH** = **4** --- An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation. +.. _class_PacketPeerDTLS_constant_STATUS_HANDSHAKING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_HANDSHAKING** = ``1`` + +A status representing a **PacketPeerDTLS** that is currently performing the handshake with a remote peer. + +.. _class_PacketPeerDTLS_constant_STATUS_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CONNECTED** = ``2`` + +A status representing a **PacketPeerDTLS** that is connected to a remote peer. + +.. _class_PacketPeerDTLS_constant_STATUS_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_ERROR** = ``3`` + +A status representing a **PacketPeerDTLS** in a generic error state. + +.. _class_PacketPeerDTLS_constant_STATUS_ERROR_HOSTNAME_MISMATCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_ERROR_HOSTNAME_MISMATCH** = ``4`` + +An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PacketPeerDTLS_method_connect_to_peer: -- :ref:`Error` **connect_to_peer** **(** :ref:`PacketPeerUDP` packet_peer, :ref:`bool` validate_certs=true, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** +.. rst-class:: classref-method -Connects a ``packet_peer`` beginning the DTLS handshake using the underlying :ref:`PacketPeerUDP` which must be connected (see :ref:`PacketPeerUDP.connect_to_host`). If ``validate_certs`` is ``true``, ``PacketPeerDTLS`` will validate that the certificate presented by the remote peer and match it with the ``for_hostname`` argument. You can specify a custom :ref:`X509Certificate` to use for validation via the ``valid_certificate`` argument. +:ref:`Error` **connect_to_peer** **(** :ref:`PacketPeerUDP` packet_peer, :ref:`bool` validate_certs=true, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** + +Connects a ``packet_peer`` beginning the DTLS handshake using the underlying :ref:`PacketPeerUDP` which must be connected (see :ref:`PacketPeerUDP.connect_to_host`). If ``validate_certs`` is ``true``, **PacketPeerDTLS** will validate that the certificate presented by the remote peer and match it with the ``for_hostname`` argument. You can specify a custom :ref:`X509Certificate` to use for validation via the ``valid_certificate`` argument. + +.. rst-class:: classref-item-separator ---- .. _class_PacketPeerDTLS_method_disconnect_from_peer: -- void **disconnect_from_peer** **(** **)** +.. rst-class:: classref-method + +void **disconnect_from_peer** **(** **)** Disconnects this peer, terminating the DTLS session. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerDTLS_method_get_status: -- :ref:`Status` **get_status** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Status` **get_status** **(** **)** |const| Returns the status of the connection. See :ref:`Status` for values. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerDTLS_method_poll: -- void **poll** **(** **)** +.. rst-class:: classref-method + +void **poll** **(** **)** Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working. diff --git a/classes/class_packetpeerextension.rst b/classes/class_packetpeerextension.rst index b05f7806f..777ccc7bc 100644 --- a/classes/class_packetpeerextension.rst +++ b/classes/class_packetpeerextension.rst @@ -16,55 +16,80 @@ PacketPeerExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PacketPeerExtension_method__get_available_packet_count: -- :ref:`int` **_get_available_packet_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_available_packet_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerExtension_method__get_max_packet_size: -- :ref:`int` **_get_max_packet_size** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_max_packet_size** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerExtension_method__get_packet: -- :ref:`Error` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerExtension_method__put_packet: -- :ref:`Error` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| .. container:: contribute diff --git a/classes/class_packetpeerstream.rst b/classes/class_packetpeerstream.rst index 81498e30a..f64954672 100644 --- a/classes/class_packetpeerstream.rst +++ b/classes/class_packetpeerstream.rst @@ -14,6 +14,8 @@ PacketPeerStream Wrapper to use a PacketPeer over a StreamPeer. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,65 +23,79 @@ PacketStreamPeer provides a wrapper for working using packets over a stream. Thi \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`input_buffer_max_size` | ``65532`` | -+-------------------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`output_buffer_max_size` | ``65532`` | -+-------------------------------------+---------------------------------------------------------------------------------------+-----------+ -| :ref:`StreamPeer` | :ref:`stream_peer` | | -+-------------------------------------+---------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`input_buffer_max_size` | ``65532`` | + +-------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`output_buffer_max_size` | ``65532`` | + +-------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`StreamPeer` | :ref:`stream_peer` | | + +-------------------------------------+---------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PacketPeerStream_property_input_buffer_max_size: -- :ref:`int` **input_buffer_max_size** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``65532`` | -+-----------+----------------------------------+ -| *Setter* | set_input_buffer_max_size(value) | -+-----------+----------------------------------+ -| *Getter* | get_input_buffer_max_size() | -+-----------+----------------------------------+ +:ref:`int` **input_buffer_max_size** = ``65532`` + +.. rst-class:: classref-property-setget + +- void **set_input_buffer_max_size** **(** :ref:`int` value **)** +- :ref:`int` **get_input_buffer_max_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerStream_property_output_buffer_max_size: -- :ref:`int` **output_buffer_max_size** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``65532`` | -+-----------+-----------------------------------+ -| *Setter* | set_output_buffer_max_size(value) | -+-----------+-----------------------------------+ -| *Getter* | get_output_buffer_max_size() | -+-----------+-----------------------------------+ +:ref:`int` **output_buffer_max_size** = ``65532`` + +.. rst-class:: classref-property-setget + +- void **set_output_buffer_max_size** **(** :ref:`int` value **)** +- :ref:`int` **get_output_buffer_max_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerStream_property_stream_peer: -- :ref:`StreamPeer` **stream_peer** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_stream_peer(value) | -+----------+------------------------+ -| *Getter* | get_stream_peer() | -+----------+------------------------+ +:ref:`StreamPeer` **stream_peer** + +.. rst-class:: classref-property-setget + +- void **set_stream_peer** **(** :ref:`StreamPeer` value **)** +- :ref:`StreamPeer` **get_stream_peer** **(** **)** The wrapped :ref:`StreamPeer` object. diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index df37dd372..0f97d6d05 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -14,6 +14,8 @@ PacketPeerUDP UDP packet peer. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,45 +23,58 @@ UDP packet peer. Can be used to send raw UDP packets as well as :ref:`Variant` | :ref:`bind` **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`int` recv_buf_size=65536 **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_to_host` **(** :ref:`String` host, :ref:`int` port **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_local_port` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_packet_ip` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_packet_port` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_bound` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_socket_connected` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`join_multicast_group` **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`leave_multicast_group` **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_broadcast_enabled` **(** :ref:`bool` enabled **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`set_dest_address` **(** :ref:`String` host, :ref:`int` port **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`wait` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`bind` **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`int` recv_buf_size=65536 **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_to_host` **(** :ref:`String` host, :ref:`int` port **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_local_port` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_packet_ip` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_packet_port` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bound` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_socket_connected` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`join_multicast_group` **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`leave_multicast_group` **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_broadcast_enabled` **(** :ref:`bool` enabled **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`set_dest_address` **(** :ref:`String` host, :ref:`int` port **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`wait` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PacketPeerUDP_method_bind: -- :ref:`Error` **bind** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`int` recv_buf_size=65536 **)** +.. rst-class:: classref-method -Binds this ``PacketPeerUDP`` to the specified ``port`` and ``bind_address`` with a buffer size ``recv_buf_size``, allowing it to receive incoming packets. +:ref:`Error` **bind** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`int` recv_buf_size=65536 **)** + +Binds this **PacketPeerUDP** to the specified ``port`` and ``bind_address`` with a buffer size ``recv_buf_size``, allowing it to receive incoming packets. If ``bind_address`` is set to ``"*"`` (default), the peer will be bound on all available addresses (both IPv4 and IPv6). @@ -67,69 +82,101 @@ If ``bind_address`` is set to ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), t 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). +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_close: -- void **close** **(** **)** +.. rst-class:: classref-method -Closes the ``PacketPeerUDP``'s underlying UDP socket. +void **close** **(** **)** + +Closes the **PacketPeerUDP**'s underlying UDP socket. + +.. rst-class:: classref-item-separator ---- .. _class_PacketPeerUDP_method_connect_to_host: -- :ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port **)** 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` are not allowed). This method does not send any data to the remote peer, to do that, use :ref:`PacketPeer.put_var` or :ref:`PacketPeer.put_packet` as usual. See also :ref:`UDPServer`. \ **Note:** Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like TLS or DTLS if you feel like your application is transferring sensitive information. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_get_local_port: -- :ref:`int` **get_local_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_local_port** **(** **)** |const| Returns the local port to which this peer is bound. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_get_packet_ip: -- :ref:`String` **get_packet_ip** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_packet_ip** **(** **)** |const| Returns the IP of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet` or :ref:`PacketPeer.get_var`). +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_get_packet_port: -- :ref:`int` **get_packet_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_packet_port** **(** **)** |const| Returns the port of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet` or :ref:`PacketPeer.get_var`). +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_is_bound: -- :ref:`bool` **is_bound** **(** **)** |const| +.. rst-class:: classref-method -Returns whether this ``PacketPeerUDP`` is bound to an address and can receive packets. +:ref:`bool` **is_bound** **(** **)** |const| + +Returns whether this **PacketPeerUDP** is bound to an address and can receive packets. + +.. rst-class:: classref-item-separator ---- .. _class_PacketPeerUDP_method_is_socket_connected: -- :ref:`bool` **is_socket_connected** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_socket_connected** **(** **)** |const| Returns ``true`` if the UDP socket is open and has been connected to a remote address. See :ref:`connect_to_host`. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_join_multicast_group: -- :ref:`Error` **join_multicast_group** **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** +.. rst-class:: classref-method + +:ref:`Error` **join_multicast_group** **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** Joins the multicast group specified by ``multicast_address`` using the interface identified by ``interface_name``. @@ -137,39 +184,55 @@ You can join the same multicast group with multiple interfaces. Use :ref:`IP.get \ **Note:** Some Android devices might require the ``CHANGE_WIFI_MULTICAST_STATE`` permission for multicast to work. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_leave_multicast_group: -- :ref:`Error` **leave_multicast_group** **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** +.. rst-class:: classref-method + +:ref:`Error` **leave_multicast_group** **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** Removes the interface identified by ``interface_name`` from the multicast group specified by ``multicast_address``. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_set_broadcast_enabled: -- void **set_broadcast_enabled** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_broadcast_enabled** **(** :ref:`bool` enabled **)** Enable or disable sending of broadcast packets (e.g. ``set_dest_address("255.255.255.255", 4343)``. This option is disabled by default. \ **Note:** Some Android devices might require the ``CHANGE_WIFI_MULTICAST_STATE`` permission and this option to be enabled to receive broadcast packets too. +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_set_dest_address: -- :ref:`Error` **set_dest_address** **(** :ref:`String` host, :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`Error` **set_dest_address** **(** :ref:`String` host, :ref:`int` port **)** Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. \ **Note:** :ref:`set_broadcast_enabled` must be enabled before sending packets to a broadcast address (e.g. ``255.255.255.255``). +.. rst-class:: classref-item-separator + ---- .. _class_PacketPeerUDP_method_wait: -- :ref:`Error` **wait** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **wait** **(** **)** Waits for a packet to arrive on the bound address. See :ref:`bind`. diff --git a/classes/class_panel.rst b/classes/class_panel.rst index 553cfb277..9525e0497 100644 --- a/classes/class_panel.rst +++ b/classes/class_panel.rst @@ -14,11 +14,15 @@ Panel Provides an opaque background for :ref:`Control` children. +.. rst-class:: classref-introduction-group + Description ----------- Panel is a :ref:`Control` that displays an opaque background. It's commonly used as a parent and container for other types of :ref:`Control` nodes. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,21 +32,34 @@ Tutorials - `3D Inverse Kinematics Demo `__ +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+---------------------------------+---------------------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | -+---------------------------------+---------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | + +---------------------------------+---------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_Panel_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty -The style of this ``Panel``. +:ref:`StyleBox` **panel** + +The style of this **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.)` diff --git a/classes/class_panelcontainer.rst b/classes/class_panelcontainer.rst index a04c952df..68f7f4106 100644 --- a/classes/class_panelcontainer.rst +++ b/classes/class_panelcontainer.rst @@ -16,11 +16,15 @@ PanelContainer Panel container type. +.. rst-class:: classref-introduction-group + Description ----------- Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,28 +32,46 @@ Tutorials - `2D Role Playing Game Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------+--------------+-----------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | -+----------------------------------------------+--------------+-----------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------+--------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | + +----------------------------------------------+--------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | -+---------------------------------+------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | + +---------------------------------+------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_PanelContainer_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty -The style of ``PanelContainer``'s background. +:ref:`StyleBox` **panel** + +The style of **PanelContainer**'s background. .. |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.)` diff --git a/classes/class_panoramaskymaterial.rst b/classes/class_panoramaskymaterial.rst index 21660803e..e912440b7 100644 --- a/classes/class_panoramaskymaterial.rst +++ b/classes/class_panoramaskymaterial.rst @@ -14,6 +14,8 @@ PanoramaSkyMaterial A :ref:`Material` used with :ref:`Sky` to draw a background texture. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,45 +25,58 @@ Using an HDR panorama is strongly recommended for accurate, high-quality reflect You can use `this tool `__ to convert a cubemap to an equirectangular sky map. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+--------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`filter` | ``true`` | -+-----------------------------------+--------------------------------------------------------------+----------+ -| :ref:`Texture2D` | :ref:`panorama` | | -+-----------------------------------+--------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`filter` | ``true`` | + +-----------------------------------+--------------------------------------------------------------+----------+ + | :ref:`Texture2D` | :ref:`panorama` | | + +-----------------------------------+--------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PanoramaSkyMaterial_property_filter: -- :ref:`bool` **filter** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_filtering_enabled(value) | -+-----------+------------------------------+ -| *Getter* | is_filtering_enabled() | -+-----------+------------------------------+ +:ref:`bool` **filter** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_filtering_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_filtering_enabled** **(** **)** A boolean value to determine if the background texture should be filtered or not. +.. rst-class:: classref-item-separator + ---- .. _class_PanoramaSkyMaterial_property_panorama: -- :ref:`Texture2D` **panorama** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_panorama(value) | -+----------+---------------------+ -| *Getter* | get_panorama() | -+----------+---------------------+ +:ref:`Texture2D` **panorama** -:ref:`Texture2D` to be applied to the ``PanoramaSkyMaterial``. +.. rst-class:: classref-property-setget + +- void **set_panorama** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_panorama** **(** **)** + +:ref:`Texture2D` to be applied to the **PanoramaSkyMaterial**. .. |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.)` diff --git a/classes/class_parallaxbackground.rst b/classes/class_parallaxbackground.rst index 4ca760b4b..8094a7fbe 100644 --- a/classes/class_parallaxbackground.rst +++ b/classes/class_parallaxbackground.rst @@ -14,124 +14,141 @@ ParallaxBackground A node used to create a parallax scrolling background. +.. rst-class:: classref-introduction-group + Description ----------- A ParallaxBackground uses one or more :ref:`ParallaxLayer` child nodes to create a parallax effect. Each :ref:`ParallaxLayer` can move at a different speed using :ref:`ParallaxLayer.motion_offset`. This creates an illusion of depth in a 2D game. If not used with a :ref:`Camera2D`, you must manually calculate the :ref:`scroll_offset`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | layer | ``-100`` (overrides :ref:`CanvasLayer`) | -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`scroll_base_offset` | ``Vector2(0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`scroll_base_scale` | ``Vector2(1, 1)`` | -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_ignore_camera_zoom` | ``false`` | -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`scroll_limit_begin` | ``Vector2(0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`scroll_limit_end` | ``Vector2(0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | layer | ``-100`` (overrides :ref:`CanvasLayer`) | + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_base_offset` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_base_scale` | ``Vector2(1, 1)`` | + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_ignore_camera_zoom` | ``false`` | + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_limit_begin` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_limit_end` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ParallaxBackground_property_scroll_base_offset: -- :ref:`Vector2` **scroll_base_offset** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------------------+ -| *Setter* | set_scroll_base_offset(value) | -+-----------+-------------------------------+ -| *Getter* | get_scroll_base_offset() | -+-----------+-------------------------------+ +:ref:`Vector2` **scroll_base_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_base_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_scroll_base_offset** **(** **)** The base position offset for all :ref:`ParallaxLayer` children. +.. rst-class:: classref-item-separator + ---- .. _class_ParallaxBackground_property_scroll_base_scale: -- :ref:`Vector2` **scroll_base_scale** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+------------------------------+ -| *Setter* | set_scroll_base_scale(value) | -+-----------+------------------------------+ -| *Getter* | get_scroll_base_scale() | -+-----------+------------------------------+ +:ref:`Vector2` **scroll_base_scale** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_base_scale** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_scroll_base_scale** **(** **)** The base motion scale for all :ref:`ParallaxLayer` children. +.. rst-class:: classref-item-separator + ---- .. _class_ParallaxBackground_property_scroll_ignore_camera_zoom: -- :ref:`bool` **scroll_ignore_camera_zoom** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_ignore_camera_zoom(value) | -+-----------+-------------------------------+ -| *Getter* | is_ignore_camera_zoom() | -+-----------+-------------------------------+ +:ref:`bool` **scroll_ignore_camera_zoom** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_ignore_camera_zoom** **(** :ref:`bool` value **)** +- :ref:`bool` **is_ignore_camera_zoom** **(** **)** If ``true``, elements in :ref:`ParallaxLayer` child aren't affected by the zoom level of the camera. +.. rst-class:: classref-item-separator + ---- .. _class_ParallaxBackground_property_scroll_limit_begin: -- :ref:`Vector2` **scroll_limit_begin** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+------------------------+ -| *Setter* | set_limit_begin(value) | -+-----------+------------------------+ -| *Getter* | get_limit_begin() | -+-----------+------------------------+ +:ref:`Vector2` **scroll_limit_begin** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_limit_begin** **(** :ref:`Vector2` value **)** +- :ref:`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` to work. +.. rst-class:: classref-item-separator + ---- .. _class_ParallaxBackground_property_scroll_limit_end: -- :ref:`Vector2` **scroll_limit_end** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_limit_end(value) | -+-----------+----------------------+ -| *Getter* | get_limit_end() | -+-----------+----------------------+ +:ref:`Vector2` **scroll_limit_end** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_limit_end** **(** :ref:`Vector2` value **)** +- :ref:`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` to work. +.. rst-class:: classref-item-separator + ---- .. _class_ParallaxBackground_property_scroll_offset: -- :ref:`Vector2` **scroll_offset** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_scroll_offset(value) | -+-----------+--------------------------+ -| *Getter* | get_scroll_offset() | -+-----------+--------------------------+ +:ref:`Vector2` **scroll_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_scroll_offset** **(** **)** The ParallaxBackground's scroll value. Calculated automatically when using a :ref:`Camera2D`, but can be used to manually manage scrolling when no camera is present. diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index 50fad40ba..38dc746d5 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -14,6 +14,8 @@ ParallaxLayer A parallax scrolling layer to be used with :ref:`ParallaxBackground`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,65 +25,77 @@ This node's children will be affected by its scroll offset. \ **Note:** Any changes to this node's position and scale made after it enters the scene will be ignored. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`motion_mirroring` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`motion_offset` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`motion_scale` | ``Vector2(1, 1)`` | -+-------------------------------+------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`motion_mirroring` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`motion_offset` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`motion_scale` | ``Vector2(1, 1)`` | + +-------------------------------+------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ParallaxLayer_property_motion_mirroring: -- :ref:`Vector2` **motion_mirroring** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_mirroring(value) | -+-----------+----------------------+ -| *Getter* | get_mirroring() | -+-----------+----------------------+ +:ref:`Vector2` **motion_mirroring** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_mirroring** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_mirroring** **(** **)** The ParallaxLayer's :ref:`Texture2D` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture2D` will not be mirrored. If the length of the viewport axis is bigger than twice the mirrored axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any one time. +.. rst-class:: classref-item-separator + ---- .. _class_ParallaxLayer_property_motion_offset: -- :ref:`Vector2` **motion_offset** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_motion_offset(value) | -+-----------+--------------------------+ -| *Getter* | get_motion_offset() | -+-----------+--------------------------+ +:ref:`Vector2` **motion_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_motion_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_motion_offset** **(** **)** The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset`. +.. rst-class:: classref-item-separator + ---- .. _class_ParallaxLayer_property_motion_scale: -- :ref:`Vector2` **motion_scale** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------------+ -| *Setter* | set_motion_scale(value) | -+-----------+-------------------------+ -| *Getter* | get_motion_scale() | -+-----------+-------------------------+ +:ref:`Vector2` **motion_scale** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_motion_scale** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_motion_scale** **(** **)** Multiplies the ParallaxLayer's motion. If an axis is set to ``0``, it will not scroll. diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index bfe4ba57a..71e1f2f3d 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -14,6 +14,8 @@ ParticleProcessMaterial Particle properties for :ref:`GPUParticles3D` and :ref:`GPUParticles2D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,1638 +25,1999 @@ Some of this material's properties are applied to each particle when emitted, wh Particle animation is available only in :ref:`GPUParticles2D`. To use it, attach a :ref:`CanvasItemMaterial`, with :ref:`CanvasItemMaterial.particles_animation` enabled, to the particles node. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`angle_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`angle_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`angle_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`angular_velocity_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`anim_offset_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`anim_speed_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`collision_bounce` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`collision_friction` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`collision_use_scale` | ``false`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`color_initial_ramp` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`color_ramp` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :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:`Vector3` | :ref:`emission_box_extents` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`emission_color_texture` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`emission_normal_texture` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`int` | :ref:`emission_point_count` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`emission_point_texture` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :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:`float` | :ref:`flatness` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :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_randomness` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`linear_accel_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :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:`Texture2D` | :ref:`radial_accel_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`scale_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`scale_max` | ``1.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`scale_min` | ``1.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`spread` | ``45.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`int` | :ref:`sub_emitter_amount_at_collision` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`int` | :ref:`sub_emitter_amount_at_end` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`sub_emitter_frequency` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`tangential_accel_curve` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`turbulence_enabled` | ``false`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`turbulence_influence_max` | ``0.1`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`turbulence_influence_min` | ``0.1`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Texture2D` | :ref:`turbulence_influence_over_life` | | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`turbulence_initial_displacement_max` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`turbulence_initial_displacement_min` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`turbulence_noise_scale` | ``9.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`Vector3` | :ref:`turbulence_noise_speed` | ``Vector3(0.5, 0.5, 0.5)`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`turbulence_noise_speed_random` | ``0.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | -+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`angle_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angle_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angle_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`angular_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`anim_offset_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`anim_speed_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`collision_bounce` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`collision_friction` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`collision_use_scale` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`color_initial_ramp` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`color_ramp` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :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:`Vector3` | :ref:`emission_box_extents` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`emission_color_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`emission_normal_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`emission_point_count` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`emission_point_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :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:`float` | :ref:`flatness` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :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_randomness` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`linear_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :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:`Texture2D` | :ref:`radial_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`scale_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`scale_max` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`scale_min` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`spread` | ``45.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`sub_emitter_amount_at_collision` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`sub_emitter_amount_at_end` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`sub_emitter_frequency` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`tangential_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`turbulence_enabled` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`turbulence_influence_max` | ``0.1`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`turbulence_influence_min` | ``0.1`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Texture2D` | :ref:`turbulence_influence_over_life` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`turbulence_initial_displacement_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`turbulence_initial_displacement_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`turbulence_noise_scale` | ``9.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Vector3` | :ref:`turbulence_noise_speed` | ``Vector3(0.5, 0.5, 0.5)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`turbulence_noise_speed_random` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param_max` **(** :ref:`Parameter` param **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param_min` **(** :ref:`Parameter` param **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_param_texture` **(** :ref:`Parameter` param **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_particle_flag` **(** :ref:`ParticleFlags` particle_flag **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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_param_texture` **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_particle_flag` **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_max` **(** :ref:`Parameter` param **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_min` **(** :ref:`Parameter` param **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_param_texture` **(** :ref:`Parameter` param **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_particle_flag` **(** :ref:`ParticleFlags` particle_flag **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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_param_texture` **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_particle_flag` **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ParticleProcessMaterial_Parameter: -.. _class_ParticleProcessMaterial_constant_PARAM_INITIAL_LINEAR_VELOCITY: - -.. _class_ParticleProcessMaterial_constant_PARAM_ANGULAR_VELOCITY: - -.. _class_ParticleProcessMaterial_constant_PARAM_ORBIT_VELOCITY: - -.. _class_ParticleProcessMaterial_constant_PARAM_LINEAR_ACCEL: - -.. _class_ParticleProcessMaterial_constant_PARAM_RADIAL_ACCEL: - -.. _class_ParticleProcessMaterial_constant_PARAM_TANGENTIAL_ACCEL: - -.. _class_ParticleProcessMaterial_constant_PARAM_DAMPING: - -.. _class_ParticleProcessMaterial_constant_PARAM_ANGLE: - -.. _class_ParticleProcessMaterial_constant_PARAM_SCALE: - -.. _class_ParticleProcessMaterial_constant_PARAM_HUE_VARIATION: - -.. _class_ParticleProcessMaterial_constant_PARAM_ANIM_SPEED: - -.. _class_ParticleProcessMaterial_constant_PARAM_ANIM_OFFSET: - -.. _class_ParticleProcessMaterial_constant_PARAM_MAX: - -.. _class_ParticleProcessMaterial_constant_PARAM_TURB_VEL_INFLUENCE: - -.. _class_ParticleProcessMaterial_constant_PARAM_TURB_INIT_DISPLACEMENT: - -.. _class_ParticleProcessMaterial_constant_PARAM_TURB_INFLUENCE_OVER_LIFE: +.. rst-class:: classref-enumeration enum **Parameter**: -- **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set initial velocity properties. +.. _class_ParticleProcessMaterial_constant_PARAM_INITIAL_LINEAR_VELOCITY: -- **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angular velocity properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set orbital velocity properties. +:ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -- **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set linear acceleration properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set initial velocity properties. -- **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set radial acceleration properties. +.. _class_ParticleProcessMaterial_constant_PARAM_ANGULAR_VELOCITY: -- **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set tangential acceleration properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_DAMPING** = **6** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set damping properties. +:ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -- **PARAM_ANGLE** = **7** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angle properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angular velocity properties. -- **PARAM_SCALE** = **8** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set scale properties. +.. _class_ParticleProcessMaterial_constant_PARAM_ORBIT_VELOCITY: -- **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set hue variation properties. +.. rst-class:: classref-enumeration-constant -- **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation speed properties. +:ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -- **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation offset properties. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set orbital velocity properties. -- **PARAM_MAX** = **15** --- Represents the size of the :ref:`Parameter` enum. +.. _class_ParticleProcessMaterial_constant_PARAM_LINEAR_ACCEL: -- **PARAM_TURB_VEL_INFLUENCE** = **13** --- Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum und maximum influence on each particles velocity. +.. rst-class:: classref-enumeration-constant -- **PARAM_TURB_INIT_DISPLACEMENT** = **14** --- Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum and maximum displacement of the particles spawn position. +:ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` -- **PARAM_TURB_INFLUENCE_OVER_LIFE** = **12** --- Use with :ref:`set_param_texture` to set the turbulence influence over the particles life time. +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set linear acceleration properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_RADIAL_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set radial acceleration properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_TANGENTIAL_ACCEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set tangential acceleration properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_DAMPING** = ``6`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set damping properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANGLE** = ``7`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set angle properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_SCALE** = ``8`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set scale properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_HUE_VARIATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set hue variation properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_ANIM_SPEED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation speed properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_ANIM_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` + +Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_texture` to set animation offset properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_MAX** = ``15`` + +Represents the size of the :ref:`Parameter` enum. + +.. _class_ParticleProcessMaterial_constant_PARAM_TURB_VEL_INFLUENCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_TURB_VEL_INFLUENCE** = ``13`` + +Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum und maximum influence on each particles velocity. + +.. _class_ParticleProcessMaterial_constant_PARAM_TURB_INIT_DISPLACEMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_TURB_INIT_DISPLACEMENT** = ``14`` + +Use with :ref:`set_param_min` and :ref:`set_param_max` to set the turbulence minimum and maximum displacement of the particles spawn position. + +.. _class_ParticleProcessMaterial_constant_PARAM_TURB_INFLUENCE_OVER_LIFE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_TURB_INFLUENCE_OVER_LIFE** = ``12`` + +Use with :ref:`set_param_texture` to set the turbulence influence over the particles life time. + +.. rst-class:: classref-item-separator ---- .. _enum_ParticleProcessMaterial_ParticleFlags: -.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: - -.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ROTATE_Y: - -.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_DISABLE_Z: - -.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_MAX: +.. rst-class:: classref-enumeration enum **ParticleFlags**: -- **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: -- **PARTICLE_FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. +.. rst-class:: classref-enumeration-constant -- **PARTICLE_FLAG_DISABLE_Z** = **2** --- Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. +:ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -- **PARTICLE_FLAG_MAX** = **3** --- Represents the size of the :ref:`ParticleFlags` enum. +Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. + +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ROTATE_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_ROTATE_Y** = ``1`` + +Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. + +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_DISABLE_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_DISABLE_Z** = ``2`` + +Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. + +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_MAX** = ``3`` + +Represents the size of the :ref:`ParticleFlags` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_ParticleProcessMaterial_EmissionShape: -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINT: - -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE: - -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE_SURFACE: - -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_BOX: - -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINTS: - -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS: - -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_RING: - -.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_MAX: +.. rst-class:: classref-enumeration enum **EmissionShape**: -- **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINT: -- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere. +.. rst-class:: classref-enumeration-constant -- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere. +:ref:`EmissionShape` **EMISSION_SHAPE_POINT** = ``0`` -- **EMISSION_SHAPE_BOX** = **3** --- Particles will be emitted in the volume of a box. +All particles will be emitted from a single point. -- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle color will be modulated by :ref:`emission_color_texture`. +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE: -- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture`. Particle color will be modulated by :ref:`emission_color_texture`. +.. rst-class:: classref-enumeration-constant -- **EMISSION_SHAPE_RING** = **6** --- Particles will be emitted in a ring or cylinder. +:ref:`EmissionShape` **EMISSION_SHAPE_SPHERE** = ``1`` -- **EMISSION_SHAPE_MAX** = **7** --- Represents the size of the :ref:`EmissionShape` enum. +Particles will be emitted in the volume of a sphere. + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE_SURFACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_SPHERE_SURFACE** = ``2`` + +Particles will be emitted on the surface of a sphere. + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_BOX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_BOX** = ``3`` + +Particles will be emitted in the volume of a box. + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_POINTS** = ``4`` + +Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle color will be modulated by :ref:`emission_color_texture`. + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_DIRECTED_POINTS** = ``5`` + +Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture`. Particle color will be modulated by :ref:`emission_color_texture`. + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_RING: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_RING** = ``6`` + +Particles will be emitted in a ring or cylinder. + +.. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmissionShape` **EMISSION_SHAPE_MAX** = ``7`` + +Represents the size of the :ref:`EmissionShape` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_ParticleProcessMaterial_SubEmitterMode: -.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_DISABLED: - -.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_CONSTANT: - -.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_END: - -.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_COLLISION: - -.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_MAX: +.. rst-class:: classref-enumeration enum **SubEmitterMode**: -- **SUB_EMITTER_DISABLED** = **0** +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_DISABLED: -- **SUB_EMITTER_CONSTANT** = **1** +.. rst-class:: classref-enumeration-constant -- **SUB_EMITTER_AT_END** = **2** +:ref:`SubEmitterMode` **SUB_EMITTER_DISABLED** = ``0`` -- **SUB_EMITTER_AT_COLLISION** = **3** -- **SUB_EMITTER_MAX** = **4** --- Represents the size of the :ref:`SubEmitterMode` enum. + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_CONSTANT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubEmitterMode` **SUB_EMITTER_CONSTANT** = ``1`` + + + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubEmitterMode` **SUB_EMITTER_AT_END** = ``2`` + + + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_COLLISION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubEmitterMode` **SUB_EMITTER_AT_COLLISION** = ``3`` + + + +.. _class_ParticleProcessMaterial_constant_SUB_EMITTER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubEmitterMode` **SUB_EMITTER_MAX** = ``4`` + +Represents the size of the :ref:`SubEmitterMode` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_ParticleProcessMaterial_CollisionMode: -.. _class_ParticleProcessMaterial_constant_COLLISION_DISABLED: - -.. _class_ParticleProcessMaterial_constant_COLLISION_RIGID: - -.. _class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT: - -.. _class_ParticleProcessMaterial_constant_COLLISION_MAX: +.. rst-class:: classref-enumeration enum **CollisionMode**: -- **COLLISION_DISABLED** = **0** --- No collision for particles. Particles will go through :ref:`GPUParticlesCollision3D` nodes. +.. _class_ParticleProcessMaterial_constant_COLLISION_DISABLED: -- **COLLISION_RIGID** = **1** --- :ref:`RigidBody3D`-style collision for particles using :ref:`GPUParticlesCollision3D` nodes. +.. rst-class:: classref-enumeration-constant -- **COLLISION_HIDE_ON_CONTACT** = **2** --- Hide particles instantly when colliding with a :ref:`GPUParticlesCollision3D` node. This can be combined with a subemitter that uses the :ref:`COLLISION_RIGID` collision mode to "replace" the parent particle with the subemitter on impact. +:ref:`CollisionMode` **COLLISION_DISABLED** = ``0`` -- **COLLISION_MAX** = **3** --- Represents the size of the :ref:`CollisionMode` enum. +No collision for particles. Particles will go through :ref:`GPUParticlesCollision3D` nodes. + +.. _class_ParticleProcessMaterial_constant_COLLISION_RIGID: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **COLLISION_RIGID** = ``1`` + +:ref:`RigidBody3D`-style collision for particles using :ref:`GPUParticlesCollision3D` nodes. + +.. _class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **COLLISION_HIDE_ON_CONTACT** = ``2`` + +Hide particles instantly when colliding with a :ref:`GPUParticlesCollision3D` node. This can be combined with a subemitter that uses the :ref:`COLLISION_RIGID` collision mode to "replace" the parent particle with the subemitter on impact. + +.. _class_ParticleProcessMaterial_constant_COLLISION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **COLLISION_MAX** = ``3`` + +Represents the size of the :ref:`CollisionMode` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ParticleProcessMaterial_property_angle_curve: -- :ref:`Texture2D` **angle_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **angle_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's rotation will be animated along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_angle_max: -- :ref:`float` **angle_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **angle_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial rotation applied to each particle, in degrees. Only applied when :ref:`particle_flag_disable_z` or :ref:`particle_flag_rotate_y` are ``true`` or the :ref:`BaseMaterial3D` being used to draw the particle is using :ref:`BaseMaterial3D.BILLBOARD_PARTICLES`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_angle_min: -- :ref:`float` **angle_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **angle_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`angle_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_angular_velocity_curve: -- :ref:`Texture2D` **angular_velocity_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **angular_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's angular velocity (rotation speed) will vary along this :ref:`CurveTexture` over its lifetime. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_angular_velocity_max: -- :ref:`float` **angular_velocity_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **angular_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. Only applied when :ref:`particle_flag_disable_z` or :ref:`particle_flag_rotate_y` are ``true`` or the :ref:`BaseMaterial3D` being used to draw the particle is using :ref:`BaseMaterial3D.BILLBOARD_PARTICLES`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_angular_velocity_min: -- :ref:`float` **angular_velocity_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **angular_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`angular_velocity_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_anim_offset_curve: -- :ref:`Texture2D` **anim_offset_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **anim_offset_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's animation offset will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_anim_offset_max: -- :ref:`float` **anim_offset_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **anim_offset_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |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`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_anim_offset_min: -- :ref:`float` **anim_offset_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **anim_offset_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`anim_offset_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_anim_speed_curve: -- :ref:`Texture2D` **anim_speed_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **anim_speed_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's animation speed will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_anim_speed_max: -- :ref:`float` **anim_speed_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **anim_speed_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |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. With animation speed greater than ``1``, remember to enable :ref:`CanvasItemMaterial.particles_anim_loop` property if you want the animation to repeat. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_anim_speed_min: -- :ref:`float` **anim_speed_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **anim_speed_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`anim_speed_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_attractor_interaction_enabled: -- :ref:`bool` **attractor_interaction_enabled** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------------------+ -| *Setter* | set_attractor_interaction_enabled(value) | -+-----------+------------------------------------------+ -| *Getter* | is_attractor_interaction_enabled() | -+-----------+------------------------------------------+ +:ref:`bool` **attractor_interaction_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_attractor_interaction_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_attractor_interaction_enabled** **(** **)** True if the interaction with particle attractors is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_collision_bounce: -- :ref:`float` **collision_bounce** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_collision_bounce(value) | -+----------+-----------------------------+ -| *Getter* | get_collision_bounce() | -+----------+-----------------------------+ +:ref:`float` **collision_bounce** + +.. rst-class:: classref-property-setget + +- void **set_collision_bounce** **(** :ref:`float` value **)** +- :ref:`float` **get_collision_bounce** **(** **)** The particles' bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). Only effective if :ref:`collision_mode` is :ref:`COLLISION_RIGID`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_collision_friction: -- :ref:`float` **collision_friction** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_collision_friction(value) | -+----------+-------------------------------+ -| *Getter* | get_collision_friction() | -+----------+-------------------------------+ +:ref:`float` **collision_friction** + +.. rst-class:: classref-property-setget + +- void **set_collision_friction** **(** :ref:`float` value **)** +- :ref:`float` **get_collision_friction** **(** **)** The particles' friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction). Only effective if :ref:`collision_mode` is :ref:`COLLISION_RIGID`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_collision_mode: -- :ref:`CollisionMode` **collision_mode** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mode() | -+-----------+---------------------------+ +:ref:`CollisionMode` **collision_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mode** **(** :ref:`CollisionMode` value **)** +- :ref:`CollisionMode` **get_collision_mode** **(** **)** The particles' collision mode. \ **Note:** Particles can only collide with :ref:`GPUParticlesCollision3D` nodes, not :ref:`PhysicsBody3D` nodes. To make particles collide with various objects, you can add :ref:`GPUParticlesCollision3D` nodes as children of :ref:`PhysicsBody3D` nodes. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_collision_use_scale: -- :ref:`bool` **collision_use_scale** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_collision_use_scale(value) | -+-----------+--------------------------------+ -| *Getter* | is_collision_using_scale() | -+-----------+--------------------------------+ +:ref:`bool` **collision_use_scale** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collision_use_scale** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collision_using_scale** **(** **)** Should collision take scale into account. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** Each particle's initial color. If the :ref:`GPUParticles2D`'s ``texture`` is defined, it will be multiplied by this color. \ **Note:** :ref:`color` 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:`color` will have no visible effect. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_color_initial_ramp: -- :ref:`Texture2D` **color_initial_ramp** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_color_initial_ramp(value) | -+----------+-------------------------------+ -| *Getter* | get_color_initial_ramp() | -+----------+-------------------------------+ +:ref:`Texture2D` **color_initial_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_initial_ramp** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_color_initial_ramp** **(** **)** Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). \ **Note:** :ref:`color_initial_ramp` 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:`color_initial_ramp` will have no visible effect. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_color_ramp: -- :ref:`Texture2D` **color_ramp** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_color_ramp(value) | -+----------+-----------------------+ -| *Getter* | get_color_ramp() | -+----------+-----------------------+ +:ref:`Texture2D` **color_ramp** + +.. rst-class:: classref-property-setget + +- void **set_color_ramp** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_color_ramp** **(** **)** Each particle's color will vary along this :ref:`GradientTexture1D` over its lifetime (multiplied with :ref:`color`). \ **Note:** :ref:`color_ramp` 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:`color_ramp` will have no visible effect. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_damping_curve: -- :ref:`Texture2D` **damping_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **damping_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Damping will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_damping_max: -- :ref:`float` **damping_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **damping_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_damping_min: -- :ref:`float` **damping_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **damping_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`damping_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_direction: -- :ref:`Vector3` **direction** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_direction(value) | -+-----------+----------------------+ -| *Getter* | get_direction() | -+-----------+----------------------+ +:ref:`Vector3` **direction** = ``Vector3(1, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_direction** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_direction** **(** **)** Unit vector specifying the particles' emission direction. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_box_extents: -- :ref:`Vector3` **emission_box_extents** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_emission_box_extents(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_box_extents() | -+----------+---------------------------------+ +:ref:`Vector3` **emission_box_extents** + +.. rst-class:: classref-property-setget + +- void **set_emission_box_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_emission_box_extents** **(** **)** The box's extents if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_BOX`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_color_texture: -- :ref:`Texture2D` **emission_color_texture** +.. rst-class:: classref-property -+----------+-----------------------------------+ -| *Setter* | set_emission_color_texture(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_color_texture() | -+----------+-----------------------------------+ +:ref:`Texture2D` **emission_color_texture** + +.. rst-class:: classref-property-setget + +- void **set_emission_color_texture** **(** :ref:`Texture2D` value **)** +- :ref:`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`. \ **Note:** :ref:`emission_color_texture` 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_color_texture` will have no visible effect. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_normal_texture: -- :ref:`Texture2D` **emission_normal_texture** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_emission_normal_texture(value) | -+----------+------------------------------------+ -| *Getter* | get_emission_normal_texture() | -+----------+------------------------------------+ +:ref:`Texture2D` **emission_normal_texture** + +.. rst-class:: classref-property-setget + +- void **set_emission_normal_texture** **(** :ref:`Texture2D` value **)** +- :ref:`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`. Used only in :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_point_count: -- :ref:`int` **emission_point_count** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_emission_point_count(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_point_count() | -+----------+---------------------------------+ +:ref:`int` **emission_point_count** + +.. rst-class:: classref-property-setget + +- void **set_emission_point_count** **(** :ref:`int` value **)** +- :ref:`int` **get_emission_point_count** **(** **)** The number of emission points if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_point_texture: -- :ref:`Texture2D` **emission_point_texture** +.. rst-class:: classref-property -+----------+-----------------------------------+ -| *Setter* | set_emission_point_texture(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_point_texture() | -+----------+-----------------------------------+ +:ref:`Texture2D` **emission_point_texture** + +.. rst-class:: classref-property-setget + +- void **set_emission_point_texture** **(** :ref:`Texture2D` value **)** +- :ref:`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` and :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_ring_axis: -- :ref:`Vector3` **emission_ring_axis** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_emission_ring_axis(value) | -+----------+-------------------------------+ -| *Getter* | get_emission_ring_axis() | -+----------+-------------------------------+ +:ref:`Vector3` **emission_ring_axis** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_axis** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_emission_ring_axis** **(** **)** The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_ring_height: -- :ref:`float` **emission_ring_height** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_emission_ring_height(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_ring_height() | -+----------+---------------------------------+ +:ref:`float` **emission_ring_height** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_height** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_ring_height** **(** **)** The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_ring_inner_radius: -- :ref:`float` **emission_ring_inner_radius** +.. rst-class:: classref-property -+----------+---------------------------------------+ -| *Setter* | set_emission_ring_inner_radius(value) | -+----------+---------------------------------------+ -| *Getter* | get_emission_ring_inner_radius() | -+----------+---------------------------------------+ +:ref:`float` **emission_ring_inner_radius** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_inner_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_ring_inner_radius** **(** **)** The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_ring_radius: -- :ref:`float` **emission_ring_radius** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_emission_ring_radius(value) | -+----------+---------------------------------+ -| *Getter* | get_emission_ring_radius() | -+----------+---------------------------------+ +:ref:`float` **emission_ring_radius** + +.. rst-class:: classref-property-setget + +- void **set_emission_ring_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_ring_radius** **(** **)** The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_shape: -- :ref:`EmissionShape` **emission_shape** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_emission_shape(value) | -+-----------+---------------------------+ -| *Getter* | get_emission_shape() | -+-----------+---------------------------+ +:ref:`EmissionShape` **emission_shape** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_emission_shape** **(** :ref:`EmissionShape` value **)** +- :ref:`EmissionShape` **get_emission_shape** **(** **)** Particles will be emitted inside this region. Use :ref:`EmissionShape` constants for values. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_emission_sphere_radius: -- :ref:`float` **emission_sphere_radius** +.. rst-class:: classref-property -+----------+-----------------------------------+ -| *Setter* | set_emission_sphere_radius(value) | -+----------+-----------------------------------+ -| *Getter* | get_emission_sphere_radius() | -+----------+-----------------------------------+ +:ref:`float` **emission_sphere_radius** + +.. rst-class:: classref-property-setget + +- void **set_emission_sphere_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_emission_sphere_radius** **(** **)** The sphere's radius if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_SPHERE`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_flatness: -- :ref:`float` **flatness** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_flatness(value) | -+-----------+---------------------+ -| *Getter* | get_flatness() | -+-----------+---------------------+ +:ref:`float` **flatness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_flatness** **(** :ref:`float` value **)** +- :ref:`float` **get_flatness** **(** **)** Amount of :ref:`spread` along the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_gravity: -- :ref:`Vector3` **gravity** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector3(0, -9.8, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_gravity(value) | -+-----------+-------------------------+ -| *Getter* | get_gravity() | -+-----------+-------------------------+ +:ref:`Vector3` **gravity** = ``Vector3(0, -9.8, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_gravity** **(** **)** Gravity applied to every particle. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_hue_variation_curve: -- :ref:`Texture2D` **hue_variation_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **hue_variation_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's hue will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_hue_variation_max: -- :ref:`float` **hue_variation_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **hue_variation_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial hue variation applied to each particle. It will shift the particle color's hue. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_hue_variation_min: -- :ref:`float` **hue_variation_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **hue_variation_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`hue_variation_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_initial_velocity_max: -- :ref:`float` **initial_velocity_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **initial_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial velocity magnitude for each particle. Direction comes from :ref:`direction` and :ref:`spread`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_initial_velocity_min: -- :ref:`float` **initial_velocity_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **initial_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`initial_velocity_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_lifetime_randomness: -- :ref:`float` **lifetime_randomness** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_lifetime_randomness(value) | -+-----------+--------------------------------+ -| *Getter* | get_lifetime_randomness() | -+-----------+--------------------------------+ +:ref:`float` **lifetime_randomness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_lifetime_randomness** **(** :ref:`float` value **)** +- :ref:`float` **get_lifetime_randomness** **(** **)** Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between ``1.0`` and a random number less than one. For example a random ratio of ``0.4`` would scale the original lifetime between ``0.4-1.0`` of its original value. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_linear_accel_curve: -- :ref:`Texture2D` **linear_accel_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **linear_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's linear acceleration will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_linear_accel_max: -- :ref:`float` **linear_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **linear_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum linear acceleration applied to each particle in the direction of motion. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_linear_accel_min: -- :ref:`float` **linear_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **linear_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`linear_accel_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_orbit_velocity_curve: -- :ref:`Texture2D` **orbit_velocity_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **orbit_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's orbital velocity will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_orbit_velocity_max: -- :ref:`float` **orbit_velocity_max** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_param_max(value) | -+----------+----------------------+ -| *Getter* | get_param_max() | -+----------+----------------------+ +:ref:`float` **orbit_velocity_max** + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |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` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_orbit_velocity_min: -- :ref:`float` **orbit_velocity_min** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_param_min(value) | -+----------+----------------------+ -| *Getter* | get_param_min() | -+----------+----------------------+ +:ref:`float` **orbit_velocity_min** + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`orbit_velocity_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_particle_flag_align_y: -- :ref:`bool` **particle_flag_align_y** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ +:ref:`bool` **particle_flag_align_y** = ``false`` + +.. 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| Align Y axis of particle with the direction of its velocity. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_particle_flag_disable_z: -- :ref:`bool` **particle_flag_disable_z** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ +:ref:`bool` **particle_flag_disable_z** = ``false`` + +.. 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| If ``true``, particles will not move on the z axis. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_particle_flag_rotate_y: -- :ref:`bool` **particle_flag_rotate_y** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_particle_flag(value) | -+-----------+--------------------------+ -| *Getter* | get_particle_flag() | -+-----------+--------------------------+ +:ref:`bool` **particle_flag_rotate_y** = ``false`` + +.. 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| If ``true``, particles rotate around Y axis by :ref:`angle_min`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_radial_accel_curve: -- :ref:`Texture2D` **radial_accel_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **radial_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's radial acceleration will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_radial_accel_max: -- :ref:`float` **radial_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **radial_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_radial_accel_min: -- :ref:`float` **radial_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **radial_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`radial_accel_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_scale_curve: -- :ref:`Texture2D` **scale_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **scale_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's scale will vary along this :ref:`CurveTexture`. If a :ref:`CurveXYZTexture` is supplied instead, the scale will be separated per-axis. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_scale_max: -- :ref:`float` **scale_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **scale_max** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum initial scale applied to each particle. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_scale_min: -- :ref:`float` **scale_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **scale_min** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`scale_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_spread: -- :ref:`float` **spread** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``45.0`` | -+-----------+-------------------+ -| *Setter* | set_spread(value) | -+-----------+-------------------+ -| *Getter* | get_spread() | -+-----------+-------------------+ +:ref:`float` **spread** = ``45.0`` + +.. rst-class:: classref-property-setget + +- void **set_spread** **(** :ref:`float` value **)** +- :ref:`float` **get_spread** **(** **)** Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_sub_emitter_amount_at_collision: -- :ref:`int` **sub_emitter_amount_at_collision** +.. rst-class:: classref-property -+----------+--------------------------------------------+ -| *Setter* | set_sub_emitter_amount_at_collision(value) | -+----------+--------------------------------------------+ -| *Getter* | get_sub_emitter_amount_at_collision() | -+----------+--------------------------------------------+ +:ref:`int` **sub_emitter_amount_at_collision** + +.. rst-class:: classref-property-setget + +- void **set_sub_emitter_amount_at_collision** **(** :ref:`int` value **)** +- :ref:`int` **get_sub_emitter_amount_at_collision** **(** **)** Sub particle amount on collision. Maximum amount set in the sub particles emitter. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_sub_emitter_amount_at_end: -- :ref:`int` **sub_emitter_amount_at_end** +.. rst-class:: classref-property -+----------+--------------------------------------+ -| *Setter* | set_sub_emitter_amount_at_end(value) | -+----------+--------------------------------------+ -| *Getter* | get_sub_emitter_amount_at_end() | -+----------+--------------------------------------+ +:ref:`int` **sub_emitter_amount_at_end** + +.. rst-class:: classref-property-setget + +- void **set_sub_emitter_amount_at_end** **(** :ref:`int` value **)** +- :ref:`int` **get_sub_emitter_amount_at_end** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_sub_emitter_frequency: -- :ref:`float` **sub_emitter_frequency** +.. rst-class:: classref-property -+----------+----------------------------------+ -| *Setter* | set_sub_emitter_frequency(value) | -+----------+----------------------------------+ -| *Getter* | get_sub_emitter_frequency() | -+----------+----------------------------------+ +:ref:`float` **sub_emitter_frequency** + +.. rst-class:: classref-property-setget + +- void **set_sub_emitter_frequency** **(** :ref:`float` value **)** +- :ref:`float` **get_sub_emitter_frequency** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_sub_emitter_keep_velocity: -- :ref:`bool` **sub_emitter_keep_velocity** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------+ -| *Setter* | set_sub_emitter_keep_velocity(value) | -+-----------+--------------------------------------+ -| *Getter* | get_sub_emitter_keep_velocity() | -+-----------+--------------------------------------+ +:ref:`bool` **sub_emitter_keep_velocity** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_sub_emitter_keep_velocity** **(** :ref:`bool` value **)** +- :ref:`bool` **get_sub_emitter_keep_velocity** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_sub_emitter_mode: -- :ref:`SubEmitterMode` **sub_emitter_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_sub_emitter_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_sub_emitter_mode() | -+-----------+-----------------------------+ +:ref:`SubEmitterMode` **sub_emitter_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sub_emitter_mode** **(** :ref:`SubEmitterMode` value **)** +- :ref:`SubEmitterMode` **get_sub_emitter_mode** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_tangential_accel_curve: -- :ref:`Texture2D` **tangential_accel_curve** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **tangential_accel_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's tangential acceleration will vary along this :ref:`CurveTexture`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_tangential_accel_max: -- :ref:`float` **tangential_accel_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **tangential_accel_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_tangential_accel_min: -- :ref:`float` **tangential_accel_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **tangential_accel_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum equivalent of :ref:`tangential_accel_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_enabled: -- :ref:`bool` **turbulence_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_turbulence_enabled(value) | -+-----------+-------------------------------+ -| *Getter* | get_turbulence_enabled() | -+-----------+-------------------------------+ +:ref:`bool` **turbulence_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_turbulence_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_turbulence_enabled** **(** **)** Enables and disables Turbulence for the particle system. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_influence_max: -- :ref:`float` **turbulence_influence_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.1`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **turbulence_influence_max** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Minimum turbulence influence on each particle. The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_influence_min: -- :ref:`float` **turbulence_influence_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.1`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **turbulence_influence_min** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Maximum turbulence influence on each particle. The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_influence_over_life: -- :ref:`Texture2D` **turbulence_influence_over_life** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_param_texture(value) | -+----------+--------------------------+ -| *Getter* | get_param_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **turbulence_influence_over_life** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Each particle's amount of turbulence will be influenced along this :ref:`CurveTexture` over its life time. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_initial_displacement_max: -- :ref:`float` **turbulence_initial_displacement_max** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_max(value) | -+-----------+----------------------+ -| *Getter* | get_param_max() | -+-----------+----------------------+ +:ref:`float` **turbulence_initial_displacement_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Maximum displacement of each particles spawn position by the turbulence. The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between :ref:`turbulence_initial_displacement_min` and :ref:`turbulence_initial_displacement_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_initial_displacement_min: -- :ref:`float` **turbulence_initial_displacement_min** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_param_min(value) | -+-----------+----------------------+ -| *Getter* | get_param_min() | -+-----------+----------------------+ +:ref:`float` **turbulence_initial_displacement_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Minimum displacement of each particles spawn position by the turbulence. The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between :ref:`turbulence_initial_displacement_min` and :ref:`turbulence_initial_displacement_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_noise_scale: -- :ref:`float` **turbulence_noise_scale** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``9.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_turbulence_noise_scale(value) | -+-----------+-----------------------------------+ -| *Getter* | get_turbulence_noise_scale() | -+-----------+-----------------------------------+ +:ref:`float` **turbulence_noise_scale** = ``9.0`` + +.. rst-class:: classref-property-setget + +- void **set_turbulence_noise_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_turbulence_noise_scale** **(** **)** This value controls the overall scale/frequency of the turbulence noise pattern. A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_noise_speed: -- :ref:`Vector3` **turbulence_noise_speed** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``Vector3(0.5, 0.5, 0.5)`` | -+-----------+-----------------------------------+ -| *Setter* | set_turbulence_noise_speed(value) | -+-----------+-----------------------------------+ -| *Getter* | get_turbulence_noise_speed() | -+-----------+-----------------------------------+ +:ref:`Vector3` **turbulence_noise_speed** = ``Vector3(0.5, 0.5, 0.5)`` + +.. rst-class:: classref-property-setget + +- void **set_turbulence_noise_speed** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_turbulence_noise_speed** **(** **)** The movement speed of the turbulence pattern. This changes how quickly the noise changes over time. A value of ``Vector3(0.0, 0.0, 0.0)`` will freeze the turbulence pattern in place. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_noise_speed_random: -- :ref:`float` **turbulence_noise_speed_random** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_turbulence_noise_speed_random(value) | -+-----------+------------------------------------------+ -| *Getter* | get_turbulence_noise_speed_random() | -+-----------+------------------------------------------+ +:ref:`float` **turbulence_noise_speed_random** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_turbulence_noise_speed_random** **(** :ref:`float` value **)** +- :ref:`float` **get_turbulence_noise_speed_random** **(** **)** Use to influence the noise speed in a random pattern. This helps to break up visible movement patterns. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_property_turbulence_noise_strength: -- :ref:`float` **turbulence_noise_strength** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------------------+ -| *Setter* | set_turbulence_noise_strength(value) | -+-----------+--------------------------------------+ -| *Getter* | get_turbulence_noise_strength() | -+-----------+--------------------------------------+ +:ref:`float` **turbulence_noise_strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_turbulence_noise_strength** **(** :ref:`float` value **)** +- :ref:`float` **get_turbulence_noise_strength** **(** **)** The turbulence noise strength. Increasing this will result in a stronger, more contrasting, noise pattern. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ParticleProcessMaterial_method_get_param_max: -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| Returns the maximum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_method_get_param_min: -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| Returns the minimum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_method_get_param_texture: -- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| Returns the :ref:`Texture2D` used by the specified parameter. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_method_get_particle_flag: -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| Returns ``true`` if the specified particle flag is enabled. See :ref:`ParticleFlags` for options. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_method_set_param_max: -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** Sets the maximum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_method_set_param_min: -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** Sets the minimum value range for the given parameter. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_method_set_param_texture: -- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** Sets the :ref:`Texture2D` for the specified :ref:`Parameter`. +.. rst-class:: classref-item-separator + ---- .. _class_ParticleProcessMaterial_method_set_particle_flag: -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** If ``true``, enables the specified particle flag. See :ref:`ParticleFlags` for options. diff --git a/classes/class_path2d.rst b/classes/class_path2d.rst index e6ec0b704..3a25bab61 100644 --- a/classes/class_path2d.rst +++ b/classes/class_path2d.rst @@ -14,6 +14,8 @@ Path2D Contains a :ref:`Curve2D` path for :ref:`PathFollow2D` nodes to follow. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,25 +23,37 @@ Can have :ref:`PathFollow2D` child nodes moving along the :r \ **Note:** The path is considered as relative to the moved nodes (children of :ref:`PathFollow2D`). As such, the curve should usually start with a zero vector (``(0, 0)``). +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------+ -| :ref:`Curve2D` | :ref:`curve` | -+-------------------------------+-------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------+ + | :ref:`Curve2D` | :ref:`curve` | + +-------------------------------+-------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Path2D_property_curve: -- :ref:`Curve2D` **curve** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_curve(value) | -+----------+------------------+ -| *Getter* | get_curve() | -+----------+------------------+ +:ref:`Curve2D` **curve** + +.. rst-class:: classref-property-setget + +- void **set_curve** **(** :ref:`Curve2D` value **)** +- :ref:`Curve2D` **get_curve** **(** **)** A :ref:`Curve2D` describing the path. diff --git a/classes/class_path3d.rst b/classes/class_path3d.rst index 00781bdce..6cbe34526 100644 --- a/classes/class_path3d.rst +++ b/classes/class_path3d.rst @@ -14,6 +14,8 @@ Path3D Contains a :ref:`Curve3D` path for :ref:`PathFollow3D` nodes to follow. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,34 +23,54 @@ Can have :ref:`PathFollow3D` child nodes moving along the :r Note that the path is considered as relative to the moved nodes (children of :ref:`PathFollow3D`). As such, the curve should usually start with a zero vector ``(0, 0, 0)``. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------+ -| :ref:`Curve3D` | :ref:`curve` | -+-------------------------------+-------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------+ + | :ref:`Curve3D` | :ref:`curve` | + +-------------------------------+-------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Path3D_signal_curve_changed: -- **curve_changed** **(** **)** +.. rst-class:: classref-signal + +**curve_changed** **(** **)** Emitted when the :ref:`curve` changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Path3D_property_curve: -- :ref:`Curve3D` **curve** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_curve(value) | -+----------+------------------+ -| *Getter* | get_curve() | -+----------+------------------+ +:ref:`Curve3D` **curve** + +.. rst-class:: classref-property-setget + +- void **set_curve** **(** :ref:`Curve3D` value **)** +- :ref:`Curve3D` **get_curve** **(** **)** A :ref:`Curve3D` describing the path. diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index 5f1c52dc1..e03a035fb 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -14,6 +14,8 @@ PathFollow2D Point sampler for a :ref:`Path2D`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,41 +23,51 @@ This node takes its parent :ref:`Path2D`, and returns the coordina It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the :ref:`progress` in this node. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`cubic_interp` | ``true`` | -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`h_offset` | ``0.0`` | -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`lookahead` | ``4.0`` | -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`loop` | ``true`` | -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`progress` | ``0.0`` | -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`progress_ratio` | ``0.0`` | -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`rotates` | ``true`` | -+---------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`v_offset` | ``0.0`` | -+---------------------------+-------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`cubic_interp` | ``true`` | + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`h_offset` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`lookahead` | ``4.0`` | + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`loop` | ``true`` | + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`progress` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`progress_ratio` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`rotates` | ``true`` | + +---------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`v_offset` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PathFollow2D_property_cubic_interp: -- :ref:`bool` **cubic_interp** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_cubic_interpolation(value) | -+-----------+--------------------------------+ -| *Getter* | get_cubic_interpolation() | -+-----------+--------------------------------+ +:ref:`bool` **cubic_interp** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_cubic_interpolation** **(** :ref:`bool` value **)** +- :ref:`bool` **get_cubic_interpolation** **(** **)** If ``true``, the position between two cached points is interpolated cubically, and linearly otherwise. @@ -63,115 +75,122 @@ The points along the :ref:`Curve2D` of the :ref:`Path2D` **h_offset** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_h_offset(value) | -+-----------+---------------------+ -| *Getter* | get_h_offset() | -+-----------+---------------------+ +:ref:`float` **h_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_h_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_h_offset** **(** **)** The node's offset along the curve. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow2D_property_lookahead: -- :ref:`float` **lookahead** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4.0`` | -+-----------+----------------------+ -| *Setter* | set_lookahead(value) | -+-----------+----------------------+ -| *Getter* | get_lookahead() | -+-----------+----------------------+ +:ref:`float` **lookahead** = ``4.0`` + +.. rst-class:: classref-property-setget + +- void **set_lookahead** **(** :ref:`float` value **)** +- :ref:`float` **get_lookahead** **(** **)** How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow2D_property_loop: -- :ref:`bool` **loop** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``true`` | -+-----------+-----------------+ -| *Setter* | set_loop(value) | -+-----------+-----------------+ -| *Getter* | has_loop() | -+-----------+-----------------+ +:ref:`bool` **loop** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_loop** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow2D_property_progress: -- :ref:`float` **progress** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_progress(value) | -+-----------+---------------------+ -| *Getter* | get_progress() | -+-----------+---------------------+ +:ref:`float` **progress** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_progress** **(** :ref:`float` value **)** +- :ref:`float` **get_progress** **(** **)** The distance along the path, in pixels. Changing this value sets this node's position to a point within the path. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow2D_property_progress_ratio: -- :ref:`float` **progress_ratio** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------+ -| *Setter* | set_progress_ratio(value) | -+-----------+---------------------------+ -| *Getter* | get_progress_ratio() | -+-----------+---------------------------+ +:ref:`float` **progress_ratio** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_progress_ratio** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow2D_property_rotates: -- :ref:`bool` **rotates** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_rotates(value) | -+-----------+--------------------+ -| *Getter* | is_rotating() | -+-----------+--------------------+ +:ref:`bool` **rotates** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_rotates** **(** :ref:`bool` value **)** +- :ref:`bool` **is_rotating** **(** **)** If ``true``, this node rotates to follow the path, with the +X direction facing forward on the path. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow2D_property_v_offset: -- :ref:`float` **v_offset** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_v_offset(value) | -+-----------+---------------------+ -| *Getter* | get_v_offset() | -+-----------+---------------------+ +:ref:`float` **v_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_v_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_v_offset** **(** **)** The node's offset perpendicular to the curve. diff --git a/classes/class_pathfollow3d.rst b/classes/class_pathfollow3d.rst index 25a803d38..e8a687b96 100644 --- a/classes/class_pathfollow3d.rst +++ b/classes/class_pathfollow3d.rst @@ -14,6 +14,8 @@ PathFollow3D Point sampler for a :ref:`Path3D`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,66 +23,118 @@ This node takes its parent :ref:`Path3D`, and returns the coordina It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the :ref:`progress` in this node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`cubic_interp` | ``true`` | -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`h_offset` | ``0.0`` | -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`loop` | ``true`` | -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`progress` | ``0.0`` | -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`progress_ratio` | ``0.0`` | -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ -| :ref:`RotationMode` | :ref:`rotation_mode` | ``3`` | -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`v_offset` | ``0.0`` | -+-----------------------------------------------------+-------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`cubic_interp` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`h_offset` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`loop` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`progress` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`progress_ratio` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`RotationMode` | :ref:`rotation_mode` | ``3`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`tilt_enabled` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`v_offset` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`correct_posture` **(** :ref:`Transform3D` transform, :ref:`RotationMode` rotation_mode **)** |static| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PathFollow3D_RotationMode: -.. _class_PathFollow3D_constant_ROTATION_NONE: - -.. _class_PathFollow3D_constant_ROTATION_Y: - -.. _class_PathFollow3D_constant_ROTATION_XY: - -.. _class_PathFollow3D_constant_ROTATION_XYZ: - -.. _class_PathFollow3D_constant_ROTATION_ORIENTED: +.. rst-class:: classref-enumeration enum **RotationMode**: -- **ROTATION_NONE** = **0** --- Forbids the PathFollow3D to rotate. +.. _class_PathFollow3D_constant_ROTATION_NONE: -- **ROTATION_Y** = **1** --- Allows the PathFollow3D to rotate in the Y axis only. +.. rst-class:: classref-enumeration-constant -- **ROTATION_XY** = **2** --- Allows the PathFollow3D to rotate in both the X, and Y axes. +:ref:`RotationMode` **ROTATION_NONE** = ``0`` -- **ROTATION_XYZ** = **3** --- Allows the PathFollow3D to rotate in any axis. +Forbids the PathFollow3D to rotate. -- **ROTATION_ORIENTED** = **4** --- Uses the up vector information in a :ref:`Curve3D` to enforce orientation. This rotation mode requires the :ref:`Path3D`'s :ref:`Curve3D.up_vector_enabled` property to be set to ``true``. +.. _class_PathFollow3D_constant_ROTATION_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationMode` **ROTATION_Y** = ``1`` + +Allows the PathFollow3D to rotate in the Y axis only. + +.. _class_PathFollow3D_constant_ROTATION_XY: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationMode` **ROTATION_XY** = ``2`` + +Allows the PathFollow3D to rotate in both the X, and Y axes. + +.. _class_PathFollow3D_constant_ROTATION_XYZ: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationMode` **ROTATION_XYZ** = ``3`` + +Allows the PathFollow3D to rotate in any axis. + +.. _class_PathFollow3D_constant_ROTATION_ORIENTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationMode` **ROTATION_ORIENTED** = ``4`` + +Uses the up vector information in a :ref:`Curve3D` to enforce orientation. This rotation mode requires the :ref:`Path3D`'s :ref:`Curve3D.up_vector_enabled` property to be set to ``true``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PathFollow3D_property_cubic_interp: -- :ref:`bool` **cubic_interp** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_cubic_interpolation(value) | -+-----------+--------------------------------+ -| *Getter* | get_cubic_interpolation() | -+-----------+--------------------------------+ +:ref:`bool` **cubic_interp** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_cubic_interpolation** **(** :ref:`bool` value **)** +- :ref:`bool` **get_cubic_interpolation** **(** **)** If ``true``, the position between two cached points is interpolated cubically, and linearly otherwise. @@ -88,102 +142,142 @@ The points along the :ref:`Curve3D` of the :ref:`Path3D` **h_offset** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_h_offset(value) | -+-----------+---------------------+ -| *Getter* | get_h_offset() | -+-----------+---------------------+ +:ref:`float` **h_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_h_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_h_offset** **(** **)** The node's offset along the curve. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow3D_property_loop: -- :ref:`bool` **loop** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``true`` | -+-----------+-----------------+ -| *Setter* | set_loop(value) | -+-----------+-----------------+ -| *Getter* | has_loop() | -+-----------+-----------------+ +:ref:`bool` **loop** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_loop** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow3D_property_progress: -- :ref:`float` **progress** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_progress(value) | -+-----------+---------------------+ -| *Getter* | get_progress() | -+-----------+---------------------+ +:ref:`float` **progress** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_progress** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow3D_property_progress_ratio: -- :ref:`float` **progress_ratio** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------+ -| *Setter* | set_progress_ratio(value) | -+-----------+---------------------------+ -| *Getter* | get_progress_ratio() | -+-----------+---------------------------+ +:ref:`float` **progress_ratio** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_progress_ratio** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow3D_property_rotation_mode: -- :ref:`RotationMode` **rotation_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``3`` | -+-----------+--------------------------+ -| *Setter* | set_rotation_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_rotation_mode() | -+-----------+--------------------------+ +:ref:`RotationMode` **rotation_mode** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_rotation_mode** **(** :ref:`RotationMode` value **)** +- :ref:`RotationMode` **get_rotation_mode** **(** **)** Allows or forbids rotation on one or more axes, depending on the :ref:`RotationMode` constants being used. +.. rst-class:: classref-item-separator + +---- + +.. _class_PathFollow3D_property_tilt_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **tilt_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_tilt_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_tilt_enabled** **(** **)** + +If ``true``, the tilt property of :ref:`Curve3D` takes effect. + +.. rst-class:: classref-item-separator + ---- .. _class_PathFollow3D_property_v_offset: -- :ref:`float` **v_offset** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_v_offset(value) | -+-----------+---------------------+ -| *Getter* | get_v_offset() | -+-----------+---------------------+ +:ref:`float` **v_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_v_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_v_offset** **(** **)** The node's offset perpendicular to the curve. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_PathFollow3D_method_correct_posture: + +.. rst-class:: classref-method + +:ref:`Transform3D` **correct_posture** **(** :ref:`Transform3D` transform, :ref:`RotationMode` rotation_mode **)** |static| + +Correct the ``transform``. ``rotation_mode`` implicitly specifies how posture (forward, up and sideway direction) is caculated. + .. |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.)` diff --git a/classes/class_pckpacker.rst b/classes/class_pckpacker.rst index 40bfa3000..6ef0705b5 100644 --- a/classes/class_pckpacker.rst +++ b/classes/class_pckpacker.rst @@ -14,10 +14,12 @@ PCKPacker Creates packages that can be loaded into a running project. +.. rst-class:: classref-introduction-group + Description ----------- -The ``PCKPacker`` is used to create packages that can be loaded into a running project using :ref:`ProjectSettings.load_resource_pack`. +The **PCKPacker** is used to create packages that can be loaded into a running project using :ref:`ProjectSettings.load_resource_pack`. .. tabs:: @@ -38,41 +40,62 @@ The ``PCKPacker`` is used to create packages that can be loaded into a running p -The above ``PCKPacker`` creates package ``test.pck``, then adds a file named ``text.txt`` at the root of the package. +The above **PCKPacker** creates package ``test.pck``, then adds a file named ``text.txt`` at the root of the package. + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`add_file` **(** :ref:`String` pck_path, :ref:`String` source_path, :ref:`bool` encrypt=false **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`flush` **(** :ref:`bool` verbose=false **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`pck_start` **(** :ref:`String` pck_name, :ref:`int` alignment=32, :ref:`String` key="0000000000000000000000000000000000000000000000000000000000000000", :ref:`bool` encrypt_directory=false **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_file` **(** :ref:`String` pck_path, :ref:`String` source_path, :ref:`bool` encrypt=false **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`flush` **(** :ref:`bool` verbose=false **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`pck_start` **(** :ref:`String` pck_name, :ref:`int` alignment=32, :ref:`String` key="0000000000000000000000000000000000000000000000000000000000000000", :ref:`bool` encrypt_directory=false **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PCKPacker_method_add_file: -- :ref:`Error` **add_file** **(** :ref:`String` pck_path, :ref:`String` source_path, :ref:`bool` encrypt=false **)** +.. rst-class:: classref-method + +:ref:`Error` **add_file** **(** :ref:`String` pck_path, :ref:`String` source_path, :ref:`bool` encrypt=false **)** Adds the ``source_path`` file to the current PCK package at the ``pck_path`` internal path (should start with ``res://``). +.. rst-class:: classref-item-separator + ---- .. _class_PCKPacker_method_flush: -- :ref:`Error` **flush** **(** :ref:`bool` verbose=false **)** +.. rst-class:: classref-method + +:ref:`Error` **flush** **(** :ref:`bool` verbose=false **)** Writes the files specified using all :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PCKPacker_method_pck_start: -- :ref:`Error` **pck_start** **(** :ref:`String` pck_name, :ref:`int` alignment=32, :ref:`String` key="0000000000000000000000000000000000000000000000000000000000000000", :ref:`bool` encrypt_directory=false **)** +.. rst-class:: classref-method + +:ref:`Error` **pck_start** **(** :ref:`String` pck_name, :ref:`int` alignment=32, :ref:`String` key="0000000000000000000000000000000000000000000000000000000000000000", :ref:`bool` encrypt_directory=false **)** 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). diff --git a/classes/class_performance.rst b/classes/class_performance.rst index cce81d4bd..07712c92c 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -14,6 +14,8 @@ Performance Exposes performance-related data. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,134 +29,251 @@ You can add custom monitors using the :ref:`add_custom_monitor` **(** :ref:`StringName` id, :ref:`Callable` callable, :ref:`Array` arguments=[] **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_custom_monitor` **(** :ref:`StringName` id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName[]` | :ref:`get_custom_monitor_names` **(** **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_monitor` **(** :ref:`Monitor` monitor **)** |const| | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_monitor_modification_time` **(** **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_custom_monitor` **(** :ref:`StringName` id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_monitor` **(** :ref:`StringName` id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_custom_monitor` **(** :ref:`StringName` id, :ref:`Callable` callable, :ref:`Array` arguments=[] **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_monitor` **(** :ref:`StringName` id **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_custom_monitor_names` **(** **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_monitor` **(** :ref:`Monitor` monitor **)** |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_monitor_modification_time` **(** **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_custom_monitor` **(** :ref:`StringName` id **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_custom_monitor` **(** :ref:`StringName` id **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Performance_Monitor: -.. _class_Performance_constant_TIME_FPS: - -.. _class_Performance_constant_TIME_PROCESS: - -.. _class_Performance_constant_TIME_PHYSICS_PROCESS: - -.. _class_Performance_constant_MEMORY_STATIC: - -.. _class_Performance_constant_MEMORY_STATIC_MAX: - -.. _class_Performance_constant_MEMORY_MESSAGE_BUFFER_MAX: - -.. _class_Performance_constant_OBJECT_COUNT: - -.. _class_Performance_constant_OBJECT_RESOURCE_COUNT: - -.. _class_Performance_constant_OBJECT_NODE_COUNT: - -.. _class_Performance_constant_OBJECT_ORPHAN_NODE_COUNT: - -.. _class_Performance_constant_RENDER_TOTAL_OBJECTS_IN_FRAME: - -.. _class_Performance_constant_RENDER_TOTAL_PRIMITIVES_IN_FRAME: - -.. _class_Performance_constant_RENDER_TOTAL_DRAW_CALLS_IN_FRAME: - -.. _class_Performance_constant_RENDER_VIDEO_MEM_USED: - -.. _class_Performance_constant_RENDER_TEXTURE_MEM_USED: - -.. _class_Performance_constant_RENDER_BUFFER_MEM_USED: - -.. _class_Performance_constant_PHYSICS_2D_ACTIVE_OBJECTS: - -.. _class_Performance_constant_PHYSICS_2D_COLLISION_PAIRS: - -.. _class_Performance_constant_PHYSICS_2D_ISLAND_COUNT: - -.. _class_Performance_constant_PHYSICS_3D_ACTIVE_OBJECTS: - -.. _class_Performance_constant_PHYSICS_3D_COLLISION_PAIRS: - -.. _class_Performance_constant_PHYSICS_3D_ISLAND_COUNT: - -.. _class_Performance_constant_AUDIO_OUTPUT_LATENCY: - -.. _class_Performance_constant_MONITOR_MAX: +.. rst-class:: classref-enumeration enum **Monitor**: -- **TIME_FPS** = **0** --- The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. *Higher is better.* +.. _class_Performance_constant_TIME_FPS: -- **TIME_PROCESS** = **1** --- Time it took to complete one frame, in seconds. *Lower is better.* +.. rst-class:: classref-enumeration-constant -- **TIME_PHYSICS_PROCESS** = **2** --- Time it took to complete one physics frame, in seconds. *Lower is better.* +:ref:`Monitor` **TIME_FPS** = ``0`` -- **MEMORY_STATIC** = **3** --- Static memory currently used, in bytes. Not available in release builds. *Lower is better.* +The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. *Higher is better.* -- **MEMORY_STATIC_MAX** = **4** --- Available static memory. Not available in release builds. *Lower is better.* +.. _class_Performance_constant_TIME_PROCESS: -- **MEMORY_MESSAGE_BUFFER_MAX** = **5** --- Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. *Lower is better.* +.. rst-class:: classref-enumeration-constant -- **OBJECT_COUNT** = **6** --- Number of objects currently instantiated (including nodes). *Lower is better.* +:ref:`Monitor` **TIME_PROCESS** = ``1`` -- **OBJECT_RESOURCE_COUNT** = **7** --- Number of resources currently used. *Lower is better.* +Time it took to complete one frame, in seconds. *Lower is better.* -- **OBJECT_NODE_COUNT** = **8** --- Number of nodes currently instantiated in the scene tree. This also includes the root node. *Lower is better.* +.. _class_Performance_constant_TIME_PHYSICS_PROCESS: -- **OBJECT_ORPHAN_NODE_COUNT** = **9** --- Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. *Lower is better.* +.. rst-class:: classref-enumeration-constant -- **RENDER_TOTAL_OBJECTS_IN_FRAME** = **10** --- The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). *Lower is better.* +:ref:`Monitor` **TIME_PHYSICS_PROCESS** = ``2`` -- **RENDER_TOTAL_PRIMITIVES_IN_FRAME** = **11** --- The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). *Lower is better.* +Time it took to complete one physics frame, in seconds. *Lower is better.* -- **RENDER_TOTAL_DRAW_CALLS_IN_FRAME** = **12** --- The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. *Lower is better.* +.. _class_Performance_constant_MEMORY_STATIC: -- **RENDER_VIDEO_MEM_USED** = **13** --- The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of :ref:`RENDER_TEXTURE_MEM_USED` and :ref:`RENDER_BUFFER_MEM_USED`. *Lower is better.* +.. rst-class:: classref-enumeration-constant -- **RENDER_TEXTURE_MEM_USED** = **14** --- The amount of texture memory used (in bytes). *Lower is better.* +:ref:`Monitor` **MEMORY_STATIC** = ``3`` -- **RENDER_BUFFER_MEM_USED** = **15** --- The amount of render buffer memory used (in bytes). *Lower is better.* +Static memory currently used, in bytes. Not available in release builds. *Lower is better.* -- **PHYSICS_2D_ACTIVE_OBJECTS** = **16** --- Number of active :ref:`RigidBody2D` nodes in the game. *Lower is better.* +.. _class_Performance_constant_MEMORY_STATIC_MAX: -- **PHYSICS_2D_COLLISION_PAIRS** = **17** --- Number of collision pairs in the 2D physics engine. *Lower is better.* +.. rst-class:: classref-enumeration-constant -- **PHYSICS_2D_ISLAND_COUNT** = **18** --- Number of islands in the 2D physics engine. *Lower is better.* +:ref:`Monitor` **MEMORY_STATIC_MAX** = ``4`` -- **PHYSICS_3D_ACTIVE_OBJECTS** = **19** --- Number of active :ref:`RigidBody3D` and :ref:`VehicleBody3D` nodes in the game. *Lower is better.* +Available static memory. Not available in release builds. *Lower is better.* -- **PHYSICS_3D_COLLISION_PAIRS** = **20** --- Number of collision pairs in the 3D physics engine. *Lower is better.* +.. _class_Performance_constant_MEMORY_MESSAGE_BUFFER_MAX: -- **PHYSICS_3D_ISLAND_COUNT** = **21** --- Number of islands in the 3D physics engine. *Lower is better.* +.. rst-class:: classref-enumeration-constant -- **AUDIO_OUTPUT_LATENCY** = **22** --- Output latency of the :ref:`AudioServer`. *Lower is better.* +:ref:`Monitor` **MEMORY_MESSAGE_BUFFER_MAX** = ``5`` -- **MONITOR_MAX** = **23** --- Represents the size of the :ref:`Monitor` enum. +Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. *Lower is better.* + +.. _class_Performance_constant_OBJECT_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **OBJECT_COUNT** = ``6`` + +Number of objects currently instantiated (including nodes). *Lower is better.* + +.. _class_Performance_constant_OBJECT_RESOURCE_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **OBJECT_RESOURCE_COUNT** = ``7`` + +Number of resources currently used. *Lower is better.* + +.. _class_Performance_constant_OBJECT_NODE_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **OBJECT_NODE_COUNT** = ``8`` + +Number of nodes currently instantiated in the scene tree. This also includes the root node. *Lower is better.* + +.. _class_Performance_constant_OBJECT_ORPHAN_NODE_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **OBJECT_ORPHAN_NODE_COUNT** = ``9`` + +Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. *Lower is better.* + +.. _class_Performance_constant_RENDER_TOTAL_OBJECTS_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **RENDER_TOTAL_OBJECTS_IN_FRAME** = ``10`` + +The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). *Lower is better.* + +.. _class_Performance_constant_RENDER_TOTAL_PRIMITIVES_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **RENDER_TOTAL_PRIMITIVES_IN_FRAME** = ``11`` + +The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). *Lower is better.* + +.. _class_Performance_constant_RENDER_TOTAL_DRAW_CALLS_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **RENDER_TOTAL_DRAW_CALLS_IN_FRAME** = ``12`` + +The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. *Lower is better.* + +.. _class_Performance_constant_RENDER_VIDEO_MEM_USED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **RENDER_VIDEO_MEM_USED** = ``13`` + +The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of :ref:`RENDER_TEXTURE_MEM_USED` and :ref:`RENDER_BUFFER_MEM_USED`. *Lower is better.* + +.. _class_Performance_constant_RENDER_TEXTURE_MEM_USED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **RENDER_TEXTURE_MEM_USED** = ``14`` + +The amount of texture memory used (in bytes). *Lower is better.* + +.. _class_Performance_constant_RENDER_BUFFER_MEM_USED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **RENDER_BUFFER_MEM_USED** = ``15`` + +The amount of render buffer memory used (in bytes). *Lower is better.* + +.. _class_Performance_constant_PHYSICS_2D_ACTIVE_OBJECTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PHYSICS_2D_ACTIVE_OBJECTS** = ``16`` + +Number of active :ref:`RigidBody2D` nodes in the game. *Lower is better.* + +.. _class_Performance_constant_PHYSICS_2D_COLLISION_PAIRS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PHYSICS_2D_COLLISION_PAIRS** = ``17`` + +Number of collision pairs in the 2D physics engine. *Lower is better.* + +.. _class_Performance_constant_PHYSICS_2D_ISLAND_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PHYSICS_2D_ISLAND_COUNT** = ``18`` + +Number of islands in the 2D physics engine. *Lower is better.* + +.. _class_Performance_constant_PHYSICS_3D_ACTIVE_OBJECTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PHYSICS_3D_ACTIVE_OBJECTS** = ``19`` + +Number of active :ref:`RigidBody3D` and :ref:`VehicleBody3D` nodes in the game. *Lower is better.* + +.. _class_Performance_constant_PHYSICS_3D_COLLISION_PAIRS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PHYSICS_3D_COLLISION_PAIRS** = ``20`` + +Number of collision pairs in the 3D physics engine. *Lower is better.* + +.. _class_Performance_constant_PHYSICS_3D_ISLAND_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PHYSICS_3D_ISLAND_COUNT** = ``21`` + +Number of islands in the 3D physics engine. *Lower is better.* + +.. _class_Performance_constant_AUDIO_OUTPUT_LATENCY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **AUDIO_OUTPUT_LATENCY** = ``22`` + +Output latency of the :ref:`AudioServer`. *Lower is better.* + +.. _class_Performance_constant_MONITOR_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **MONITOR_MAX** = ``23`` + +Represents the size of the :ref:`Monitor` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Performance_method_add_custom_monitor: -- void **add_custom_monitor** **(** :ref:`StringName` id, :ref:`Callable` callable, :ref:`Array` arguments=[] **)** +.. rst-class:: classref-method + +void **add_custom_monitor** **(** :ref:`StringName` id, :ref:`Callable` callable, :ref:`Array` arguments=[] **)** 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. @@ -214,27 +333,39 @@ The debugger calls the callable to get the value of custom monitor. The callable Callables are called with arguments supplied in argument array. +.. rst-class:: classref-item-separator + ---- .. _class_Performance_method_get_custom_monitor: -- :ref:`Variant` **get_custom_monitor** **(** :ref:`StringName` id **)** +.. rst-class:: classref-method + +:ref:`Variant` **get_custom_monitor** **(** :ref:`StringName` id **)** 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`. Prints an error if the given ``id`` is absent. +.. rst-class:: classref-item-separator + ---- .. _class_Performance_method_get_custom_monitor_names: -- :ref:`StringName[]` **get_custom_monitor_names** **(** **)** +.. rst-class:: classref-method + +:ref:`StringName[]` **get_custom_monitor_names** **(** **)** Returns the names of active custom monitors in an :ref:`Array`. +.. rst-class:: classref-item-separator + ---- .. _class_Performance_method_get_monitor: -- :ref:`float` **get_monitor** **(** :ref:`Monitor` monitor **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_monitor** **(** :ref:`Monitor` monitor **)** |const| Returns the value of one of the available built-in monitors. You should provide one of the :ref:`Monitor` constants as the argument, like this: @@ -253,27 +384,39 @@ Returns the value of one of the available built-in monitors. You should provide See :ref:`get_custom_monitor` to query custom performance monitors' values. +.. rst-class:: classref-item-separator + ---- .. _class_Performance_method_get_monitor_modification_time: -- :ref:`int` **get_monitor_modification_time** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **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` when the monitor is updated. +.. rst-class:: classref-item-separator + ---- .. _class_Performance_method_has_custom_monitor: -- :ref:`bool` **has_custom_monitor** **(** :ref:`StringName` id **)** +.. rst-class:: classref-method + +:ref:`bool` **has_custom_monitor** **(** :ref:`StringName` id **)** Returns ``true`` if custom monitor with the given ``id`` is present, ``false`` otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_Performance_method_remove_custom_monitor: -- void **remove_custom_monitor** **(** :ref:`StringName` id **)** +.. rst-class:: classref-method + +void **remove_custom_monitor** **(** :ref:`StringName` id **)** Removes the custom monitor with given ``id``. Prints an error if the given ``id`` is already absent. diff --git a/classes/class_physicalbone2d.rst b/classes/class_physicalbone2d.rst index e2350525a..4e25cc88b 100644 --- a/classes/class_physicalbone2d.rst +++ b/classes/class_physicalbone2d.rst @@ -14,6 +14,8 @@ PhysicalBone2D A 2D node that can be used for physically aware bones in 2D. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,127 +25,158 @@ The ``PhysicalBone2D`` node is a :ref:`RigidBody2D`-based nod \ **Note:** The PhysicalBone2D node does not automatically create a :ref:`Joint2D` node to keep ``PhysicalBone2D`` nodes together. You will need to create these manually. For most cases, you want to use a :ref:`PinJoint2D` node. The ``PhysicalBone2D`` node can automatically configure the :ref:`Joint2D` node once it's been created as a child node. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`auto_configure_joint` | ``true`` | -+---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`bone2d_index` | ``-1`` | -+---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`bone2d_nodepath` | ``NodePath("")`` | -+---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`follow_bone_when_simulating` | ``false`` | -+---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`simulate_physics` | ``false`` | -+---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`auto_configure_joint` | ``true`` | + +---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`bone2d_index` | ``-1`` | + +---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`bone2d_nodepath` | ``NodePath("")`` | + +---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`follow_bone_when_simulating` | ``false`` | + +---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`simulate_physics` | ``false`` | + +---------------------------------+-----------------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`Joint2D` | :ref:`get_joint` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_simulating_physics` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`Joint2D` | :ref:`get_joint` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_simulating_physics` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicalBone2D_property_auto_configure_joint: -- :ref:`bool` **auto_configure_joint** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_auto_configure_joint(value) | -+-----------+---------------------------------+ -| *Getter* | get_auto_configure_joint() | -+-----------+---------------------------------+ +:ref:`bool` **auto_configure_joint** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_auto_configure_joint** **(** :ref:`bool` value **)** +- :ref:`bool` **get_auto_configure_joint** **(** **)** If ``true``, the ``PhysicalBone2D`` node will automatically configure the first :ref:`Joint2D` child node. The automatic configuration is limited to setting up the node properties and positioning the :ref:`Joint2D`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone2D_property_bone2d_index: -- :ref:`int` **bone2d_index** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``-1`` | -+-----------+-------------------------+ -| *Setter* | set_bone2d_index(value) | -+-----------+-------------------------+ -| *Getter* | get_bone2d_index() | -+-----------+-------------------------+ +:ref:`int` **bone2d_index** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_bone2d_index** **(** :ref:`int` value **)** +- :ref:`int` **get_bone2d_index** **(** **)** The index of the :ref:`Bone2D` node that this ``PhysicalBone2D`` node is supposed to be simulating. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone2D_property_bone2d_nodepath: -- :ref:`NodePath` **bone2d_nodepath** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+----------------------------+ -| *Setter* | set_bone2d_nodepath(value) | -+-----------+----------------------------+ -| *Getter* | get_bone2d_nodepath() | -+-----------+----------------------------+ +:ref:`NodePath` **bone2d_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_bone2d_nodepath** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_bone2d_nodepath** **(** **)** The :ref:`NodePath` to the :ref:`Bone2D` node that this ``PhysicalBone2D`` node is supposed to be simulating. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone2D_property_follow_bone_when_simulating: -- :ref:`bool` **follow_bone_when_simulating** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------------+ -| *Setter* | set_follow_bone_when_simulating(value) | -+-----------+----------------------------------------+ -| *Getter* | get_follow_bone_when_simulating() | -+-----------+----------------------------------------+ +:ref:`bool` **follow_bone_when_simulating** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_follow_bone_when_simulating** **(** :ref:`bool` value **)** +- :ref:`bool` **get_follow_bone_when_simulating** **(** **)** If ``true``, the ``PhysicalBone2D`` will keep the transform of the bone it is bound to when simulating physics. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone2D_property_simulate_physics: -- :ref:`bool` **simulate_physics** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_simulate_physics(value) | -+-----------+-----------------------------+ -| *Getter* | get_simulate_physics() | -+-----------+-----------------------------+ +:ref:`bool` **simulate_physics** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_simulate_physics** **(** :ref:`bool` value **)** +- :ref:`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` node. \ **Note:** To have the Bone2D nodes visually follow the ``PhysicalBone2D`` node, use a :ref:`SkeletonModification2DPhysicalBones` modification on the :ref:`Skeleton2D` node with the :ref:`Bone2D` nodes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PhysicalBone2D_method_get_joint: -- :ref:`Joint2D` **get_joint** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Joint2D` **get_joint** **(** **)** |const| Returns the first :ref:`Joint2D` child node, if one exists. This is mainly a helper function to make it easier to get the :ref:`Joint2D` that the ``PhysicalBone2D`` is autoconfiguring. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone2D_method_is_simulating_physics: -- :ref:`bool` **is_simulating_physics** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_simulating_physics** **(** **)** |const| Returns a boolean that indicates whether the ``PhysicalBone2D`` node is running and simulating using the Godot 2D physics engine. When ``true``, the PhysicalBone2D node is using physics. diff --git a/classes/class_physicalbone3d.rst b/classes/class_physicalbone3d.rst index ebf6f8aa2..7b9fd5f94 100644 --- a/classes/class_physicalbone3d.rst +++ b/classes/class_physicalbone3d.rst @@ -16,420 +16,522 @@ PhysicalBone3D There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`angular_damp` | ``0.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`body_offset` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`bounce` | ``0.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`can_sleep` | ``true`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`custom_integrator` | ``false`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`friction` | ``1.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`gravity_scale` | ``1.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`joint_offset` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`joint_rotation` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`JointType` | :ref:`joint_type` | ``0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`linear_damp` | ``0.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`mass` | ``1.0`` | -+-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`angular_damp` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`body_offset` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`bounce` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`can_sleep` | ``true`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`custom_integrator` | ``false`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`friction` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`gravity_scale` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`joint_offset` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`joint_rotation` | ``Vector3(0, 0, 0)`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`JointType` | :ref:`joint_type` | ``0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`linear_damp` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`mass` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bone_id` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_simulate_physics` **(** **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_simulating_physics` **(** **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_id` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_simulate_physics` **(** **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_simulating_physics` **(** **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PhysicalBone3D_DampMode: -.. _class_PhysicalBone3D_constant_DAMP_MODE_COMBINE: - -.. _class_PhysicalBone3D_constant_DAMP_MODE_REPLACE: +.. rst-class:: classref-enumeration enum **DampMode**: -- **DAMP_MODE_COMBINE** = **0** --- In this mode, the body's damping value is added to any value set in areas or the default value. +.. _class_PhysicalBone3D_constant_DAMP_MODE_COMBINE: -- **DAMP_MODE_REPLACE** = **1** --- In this mode, the body's damping value replaces any value set in areas or the default value. +.. rst-class:: classref-enumeration-constant + +:ref:`DampMode` **DAMP_MODE_COMBINE** = ``0`` + +In this mode, the body's damping value is added to any value set in areas or the default value. + +.. _class_PhysicalBone3D_constant_DAMP_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DampMode` **DAMP_MODE_REPLACE** = ``1`` + +In this mode, the body's damping value replaces any value set in areas or the default value. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicalBone3D_JointType: -.. _class_PhysicalBone3D_constant_JOINT_TYPE_NONE: - -.. _class_PhysicalBone3D_constant_JOINT_TYPE_PIN: - -.. _class_PhysicalBone3D_constant_JOINT_TYPE_CONE: - -.. _class_PhysicalBone3D_constant_JOINT_TYPE_HINGE: - -.. _class_PhysicalBone3D_constant_JOINT_TYPE_SLIDER: - -.. _class_PhysicalBone3D_constant_JOINT_TYPE_6DOF: +.. rst-class:: classref-enumeration enum **JointType**: -- **JOINT_TYPE_NONE** = **0** +.. _class_PhysicalBone3D_constant_JOINT_TYPE_NONE: -- **JOINT_TYPE_PIN** = **1** +.. rst-class:: classref-enumeration-constant -- **JOINT_TYPE_CONE** = **2** +:ref:`JointType` **JOINT_TYPE_NONE** = ``0`` -- **JOINT_TYPE_HINGE** = **3** -- **JOINT_TYPE_SLIDER** = **4** -- **JOINT_TYPE_6DOF** = **5** +.. _class_PhysicalBone3D_constant_JOINT_TYPE_PIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_PIN** = ``1`` + + + +.. _class_PhysicalBone3D_constant_JOINT_TYPE_CONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_CONE** = ``2`` + + + +.. _class_PhysicalBone3D_constant_JOINT_TYPE_HINGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_HINGE** = ``3`` + + + +.. _class_PhysicalBone3D_constant_JOINT_TYPE_SLIDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_SLIDER** = ``4`` + + + +.. _class_PhysicalBone3D_constant_JOINT_TYPE_6DOF: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_6DOF** = ``5`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicalBone3D_property_angular_damp: -- :ref:`float` **angular_damp** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_angular_damp(value) | -+-----------+-------------------------+ -| *Getter* | get_angular_damp() | -+-----------+-------------------------+ +:ref:`float` **angular_damp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp** **(** :ref:`float` value **)** +- :ref:`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` the body is in. Depending on :ref:`angular_damp_mode`, you can set :ref:`angular_damp` to be added to or to replace the body's damping value. See :ref:`ProjectSettings.physics/3d/default_angular_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_angular_damp_mode: -- :ref:`DampMode` **angular_damp_mode** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_angular_damp_mode(value) | -+-----------+------------------------------+ -| *Getter* | get_angular_damp_mode() | -+-----------+------------------------------+ +:ref:`DampMode` **angular_damp_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp_mode** **(** :ref:`DampMode` value **)** +- :ref:`DampMode` **get_angular_damp_mode** **(** **)** Defines how :ref:`angular_damp` is applied. See :ref:`DampMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_angular_velocity: -- :ref:`Vector3` **angular_velocity** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+-----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+-----------+-----------------------------+ +:ref:`Vector3` **angular_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_angular_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_angular_velocity** **(** **)** The PhysicalBone3D's rotational velocity in *radians* per second. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_body_offset: -- :ref:`Transform3D` **body_offset** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_body_offset(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_body_offset() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **body_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_body_offset** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_body_offset** **(** **)** Sets the body's transform. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_bounce: -- :ref:`float` **bounce** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_bounce(value) | -+-----------+-------------------+ -| *Getter* | get_bounce() | -+-----------+-------------------+ +:ref:`float` **bounce** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_bounce** **(** :ref:`float` value **)** +- :ref:`float` **get_bounce** **(** **)** The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_can_sleep: -- :ref:`bool` **can_sleep** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_can_sleep(value) | -+-----------+----------------------+ -| *Getter* | is_able_to_sleep() | -+-----------+----------------------+ +:ref:`bool` **can_sleep** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_can_sleep** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_custom_integrator: -- :ref:`bool` **custom_integrator** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_custom_integrator(value) | -+-----------+----------------------------------+ -| *Getter* | is_using_custom_integrator() | -+-----------+----------------------------------+ +:ref:`bool` **custom_integrator** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_custom_integrator** **(** :ref:`bool` value **)** +- :ref:`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` function, if defined. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_friction: -- :ref:`float` **friction** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_friction(value) | -+-----------+---------------------+ -| *Getter* | get_friction() | -+-----------+---------------------+ +:ref:`float` **friction** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_friction** **(** :ref:`float` value **)** +- :ref:`float` **get_friction** **(** **)** The body's friction, from ``0`` (frictionless) to ``1`` (max friction). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_gravity_scale: -- :ref:`float` **gravity_scale** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_gravity_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_gravity_scale() | -+-----------+--------------------------+ +:ref:`float` **gravity_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_scale** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_joint_offset: -- :ref:`Transform3D` **joint_offset** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_joint_offset(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_joint_offset() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **joint_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_joint_offset** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_joint_offset** **(** **)** Sets the joint's transform. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_joint_rotation: -- :ref:`Vector3` **joint_rotation** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_joint_rotation(value) | -+-----------+---------------------------+ -| *Getter* | get_joint_rotation() | -+-----------+---------------------------+ +:ref:`Vector3` **joint_rotation** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_joint_rotation** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_joint_rotation** **(** **)** Sets the joint's rotation in radians. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_joint_type: -- :ref:`JointType` **joint_type** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_joint_type(value) | -+-----------+-----------------------+ -| *Getter* | get_joint_type() | -+-----------+-----------------------+ +:ref:`JointType` **joint_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_joint_type** **(** :ref:`JointType` value **)** +- :ref:`JointType` **get_joint_type** **(** **)** Sets the joint type. See :ref:`JointType` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_linear_damp: -- :ref:`float` **linear_damp** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_linear_damp(value) | -+-----------+------------------------+ -| *Getter* | get_linear_damp() | -+-----------+------------------------+ +:ref:`float` **linear_damp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp** **(** :ref:`float` value **)** +- :ref:`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` the body is in. Depending on :ref:`linear_damp_mode`, you can set :ref:`linear_damp` to be added to or to replace the body's damping value. See :ref:`ProjectSettings.physics/3d/default_linear_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_linear_damp_mode: -- :ref:`DampMode` **linear_damp_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_linear_damp_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_linear_damp_mode() | -+-----------+-----------------------------+ +:ref:`DampMode` **linear_damp_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp_mode** **(** :ref:`DampMode` value **)** +- :ref:`DampMode` **get_linear_damp_mode** **(** **)** Defines how :ref:`linear_damp` is applied. See :ref:`DampMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_linear_velocity: -- :ref:`Vector3` **linear_velocity** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+-----------+----------------------------+ +:ref:`Vector3` **linear_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_linear_velocity** **(** :ref:`Vector3` value **)** +- :ref:`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` as your process loop for precise control of the body state. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_property_mass: -- :ref:`float` **mass** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_mass(value) | -+-----------+-----------------+ -| *Getter* | get_mass() | -+-----------+-----------------+ +:ref:`float` **mass** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_mass** **(** :ref:`float` value **)** +- :ref:`float` **get_mass** **(** **)** The body's mass. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PhysicalBone3D_method__integrate_forces: -- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| +.. rst-class:: classref-method + +void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| 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` property allows you to disable the default behavior and do fully custom force integration for a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_method_apply_central_impulse: -- void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** +.. rst-class:: classref-method + +void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_method_apply_impulse: -- void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_method_get_bone_id: -- :ref:`int` **get_bone_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bone_id** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_method_get_simulate_physics: -- :ref:`bool` **get_simulate_physics** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **get_simulate_physics** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalBone3D_method_is_simulating_physics: -- :ref:`bool` **is_simulating_physics** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_simulating_physics** **(** **)** .. container:: contribute diff --git a/classes/class_physicalskymaterial.rst b/classes/class_physicalskymaterial.rst index f6a3bd60e..395255a49 100644 --- a/classes/class_physicalskymaterial.rst +++ b/classes/class_physicalskymaterial.rst @@ -14,216 +14,238 @@ PhysicalSkyMaterial :ref:`Sky` :ref:`Material` used for a physically based sky. +.. rst-class:: classref-introduction-group + Description ----------- -The ``PhysicalSkyMaterial`` uses the Preetham analytic daylight model to draw a sky based on physical properties. This results in a substantially more realistic sky than the :ref:`ProceduralSkyMaterial`, but it is slightly slower and less flexible. +The **PhysicalSkyMaterial** uses the Preetham analytic daylight model to draw a sky based on physical properties. This results in a substantially more realistic sky than the :ref:`ProceduralSkyMaterial`, but it is slightly slower and less flexible. -The ``PhysicalSkyMaterial`` only supports one sun. The color, energy, and direction of the sun are taken from the first :ref:`DirectionalLight3D` in the scene tree. +The **PhysicalSkyMaterial** only supports one sun. The color, energy, and direction of the sun are taken from the first :ref:`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` and adding a night sky directly into the resulting shader. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`float` | :ref:`energy_multiplier` | ``1.0`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`Color` | :ref:`ground_color` | ``Color(0.1, 0.07, 0.034, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`float` | :ref:`mie_coefficient` | ``0.005`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`Color` | :ref:`mie_color` | ``Color(0.69, 0.729, 0.812, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`float` | :ref:`mie_eccentricity` | ``0.8`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`Texture2D` | :ref:`night_sky` | | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`float` | :ref:`rayleigh_coefficient` | ``2.0`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`Color` | :ref:`rayleigh_color` | ``Color(0.3, 0.405, 0.6, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`float` | :ref:`sun_disk_scale` | ``1.0`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`float` | :ref:`turbidity` | ``10.0`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`bool` | :ref:`use_debanding` | ``true`` | -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`float` | :ref:`energy_multiplier` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`Color` | :ref:`ground_color` | ``Color(0.1, 0.07, 0.034, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`float` | :ref:`mie_coefficient` | ``0.005`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`Color` | :ref:`mie_color` | ``Color(0.69, 0.729, 0.812, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`float` | :ref:`mie_eccentricity` | ``0.8`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`Texture2D` | :ref:`night_sky` | | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`float` | :ref:`rayleigh_coefficient` | ``2.0`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`Color` | :ref:`rayleigh_color` | ``Color(0.3, 0.405, 0.6, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`float` | :ref:`sun_disk_scale` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`float` | :ref:`turbidity` | ``10.0`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + | :ref:`bool` | :ref:`use_debanding` | ``true`` | + +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicalSkyMaterial_property_energy_multiplier: -- :ref:`float` **energy_multiplier** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------------+ -| *Setter* | set_energy_multiplier(value) | -+-----------+------------------------------+ -| *Getter* | get_energy_multiplier() | -+-----------+------------------------------+ +:ref:`float` **energy_multiplier** = ``1.0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_energy_multiplier** **(** **)** + +The sky's overall brightness multiplier. Higher values result in a brighter sky. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_ground_color: -- :ref:`Color` **ground_color** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``Color(0.1, 0.07, 0.034, 1)`` | -+-----------+--------------------------------+ -| *Setter* | set_ground_color(value) | -+-----------+--------------------------------+ -| *Getter* | get_ground_color() | -+-----------+--------------------------------+ +:ref:`Color` **ground_color** = ``Color(0.1, 0.07, 0.034, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_ground_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_ground_color** **(** **)** Modulates the :ref:`Color` on the bottom half of the sky to represent the ground. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalSkyMaterial_property_mie_coefficient: -- :ref:`float` **mie_coefficient** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.005`` | -+-----------+----------------------------+ -| *Setter* | set_mie_coefficient(value) | -+-----------+----------------------------+ -| *Getter* | get_mie_coefficient() | -+-----------+----------------------------+ +:ref:`float` **mie_coefficient** = ``0.005`` -Controls the strength of 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. +.. rst-class:: classref-property-setget + +- void **set_mie_coefficient** **(** :ref:`float` value **)** +- :ref:`float` **get_mie_coefficient** **(** **)** + +Controls the strength of `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. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_mie_color: -- :ref:`Color` **mie_color** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``Color(0.69, 0.729, 0.812, 1)`` | -+-----------+----------------------------------+ -| *Setter* | set_mie_color(value) | -+-----------+----------------------------------+ -| *Getter* | get_mie_color() | -+-----------+----------------------------------+ +:ref:`Color` **mie_color** = ``Color(0.69, 0.729, 0.812, 1)`` -Controls the :ref:`Color` of the mie scattering effect. While not physically accurate, this allows for the creation of alien-looking planets. +.. rst-class:: classref-property-setget + +- void **set_mie_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_mie_color** **(** **)** + +Controls the :ref:`Color` of the `Mie scattering `__ effect. While not physically accurate, this allows for the creation of alien-looking planets. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_mie_eccentricity: -- :ref:`float` **mie_eccentricity** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.8`` | -+-----------+-----------------------------+ -| *Setter* | set_mie_eccentricity(value) | -+-----------+-----------------------------+ -| *Getter* | get_mie_eccentricity() | -+-----------+-----------------------------+ +:ref:`float` **mie_eccentricity** = ``0.8`` -Controls the direction of the 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. +.. rst-class:: classref-property-setget + +- void **set_mie_eccentricity** **(** :ref:`float` value **)** +- :ref:`float` **get_mie_eccentricity** **(** **)** + +Controls the direction of the `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. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_night_sky: -- :ref:`Texture2D` **night_sky** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_night_sky(value) | -+----------+----------------------+ -| *Getter* | get_night_sky() | -+----------+----------------------+ +:ref:`Texture2D` **night_sky** + +.. rst-class:: classref-property-setget + +- void **set_night_sky** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_night_sky** **(** **)** :ref:`Texture2D` for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalSkyMaterial_property_rayleigh_coefficient: -- :ref:`float` **rayleigh_coefficient** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``2.0`` | -+-----------+---------------------------------+ -| *Setter* | set_rayleigh_coefficient(value) | -+-----------+---------------------------------+ -| *Getter* | get_rayleigh_coefficient() | -+-----------+---------------------------------+ +:ref:`float` **rayleigh_coefficient** = ``2.0`` -Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. +.. rst-class:: classref-property-setget + +- void **set_rayleigh_coefficient** **(** :ref:`float` value **)** +- :ref:`float` **get_rayleigh_coefficient** **(** **)** + +Controls the strength of the `Rayleigh scattering `__. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_rayleigh_color: -- :ref:`Color` **rayleigh_color** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``Color(0.3, 0.405, 0.6, 1)`` | -+-----------+-------------------------------+ -| *Setter* | set_rayleigh_color(value) | -+-----------+-------------------------------+ -| *Getter* | get_rayleigh_color() | -+-----------+-------------------------------+ +:ref:`Color` **rayleigh_color** = ``Color(0.3, 0.405, 0.6, 1)`` -Controls the :ref:`Color` of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red :ref:`Color` results in a Mars-looking atmosphere with a corresponding blue sunset. +.. rst-class:: classref-property-setget + +- void **set_rayleigh_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_rayleigh_color** **(** **)** + +Controls the :ref:`Color` of the `Rayleigh scattering `__. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red :ref:`Color` results in a Mars-looking atmosphere with a corresponding blue sunset. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_sun_disk_scale: -- :ref:`float` **sun_disk_scale** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------+ -| *Setter* | set_sun_disk_scale(value) | -+-----------+---------------------------+ -| *Getter* | get_sun_disk_scale() | -+-----------+---------------------------+ +:ref:`float` **sun_disk_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_sun_disk_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_sun_disk_scale** **(** **)** Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalSkyMaterial_property_turbidity: -- :ref:`float` **turbidity** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``10.0`` | -+-----------+----------------------+ -| *Setter* | set_turbidity(value) | -+-----------+----------------------+ -| *Getter* | get_turbidity() | -+-----------+----------------------+ +:ref:`float` **turbidity** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_turbidity** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicalSkyMaterial_property_use_debanding: -- :ref:`bool` **use_debanding** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_use_debanding(value) | -+-----------+--------------------------+ -| *Getter* | get_use_debanding() | -+-----------+--------------------------+ +:ref:`bool` **use_debanding** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_debanding** **(** :ref:`bool` value **)** +- :ref:`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. diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index 03bf57a58..b6e4ebd05 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -16,62 +16,92 @@ PhysicsBody2D Base class for all objects affected by physics in 2D space. +.. rst-class:: classref-introduction-group + Description ----------- PhysicsBody2D is an abstract base class for implementing a physics body. All \*Body2D types inherit from it. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+----------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | input_pickable | ``false`` (overrides :ref:`CollisionObject2D`) | -+-------------------------+----------------+-------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool` | input_pickable | ``false`` (overrides :ref:`CollisionObject2D`) | + +-------------------------+----------------+-------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsBody2D[]` | :ref:`get_collision_exceptions` **(** **)** | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`KinematicCollision2D` | :ref:`move_and_collide` **(** :ref:`Vector2` distance, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`test_move` **(** :ref:`Transform2D` from, :ref:`Vector2` distance, :ref:`KinematicCollision2D` collision=null, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** | -+---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsBody2D[]` | :ref:`get_collision_exceptions` **(** **)** | + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision2D` | :ref:`move_and_collide` **(** :ref:`Vector2` motion, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** | + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`test_move` **(** :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`KinematicCollision2D` collision=null, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** | + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsBody2D_method_add_collision_exception_with: -- void **add_collision_exception_with** **(** :ref:`Node` body **)** +.. rst-class:: classref-method + +void **add_collision_exception_with** **(** :ref:`Node` body **)** Adds a body to the list of bodies that this body can't collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody2D_method_get_collision_exceptions: -- :ref:`PhysicsBody2D[]` **get_collision_exceptions** **(** **)** +.. rst-class:: classref-method + +:ref:`PhysicsBody2D[]` **get_collision_exceptions** **(** **)** Returns an array of nodes that were added as collision exceptions for this body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody2D_method_move_and_collide: -- :ref:`KinematicCollision2D` **move_and_collide** **(** :ref:`Vector2` distance, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** +.. rst-class:: classref-method -Moves the body along the vector ``distance``. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``distance`` should be computed using ``delta``. +:ref:`KinematicCollision2D` **move_and_collide** **(** :ref:`Vector2` motion, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** + +Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. Returns a :ref:`KinematicCollision2D`, which contains information about the collision when stopped, or when touching another body along the motion. @@ -81,23 +111,31 @@ If ``test_only`` is ``true``, the body does not move but the would-be collision If ``recovery_as_collision`` is ``true``, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by :ref:`CharacterBody2D` for improving floor detection during floor snapping. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody2D_method_remove_collision_exception_with: -- void **remove_collision_exception_with** **(** :ref:`Node` body **)** +.. rst-class:: classref-method + +void **remove_collision_exception_with** **(** :ref:`Node` body **)** Removes a body from the list of bodies that this body can't collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody2D_method_test_move: -- :ref:`bool` **test_move** **(** :ref:`Transform2D` from, :ref:`Vector2` distance, :ref:`KinematicCollision2D` collision=null, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** +.. rst-class:: classref-method -Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``distance`` should be computed using ``delta``. +:ref:`bool` **test_move** **(** :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`KinematicCollision2D` collision=null, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** -Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform2D`, then tries to move the body along the vector ``distance``. Returns ``true`` if a collision would stop the body from moving along the whole path. +Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. + +Virtually sets the node's position, scale and rotation to that of the given :ref:`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. \ ``collision`` is an optional object of type :ref:`KinematicCollision2D`, which contains additional information about the collision when stopped, or when touching another body along the motion. diff --git a/classes/class_physicsbody3d.rst b/classes/class_physicsbody3d.rst index 487fb2f8e..afa9653fb 100644 --- a/classes/class_physicsbody3d.rst +++ b/classes/class_physicsbody3d.rst @@ -16,181 +16,225 @@ PhysicsBody3D Base class for all objects affected by physics in 3D space. +.. rst-class:: classref-introduction-group + Description ----------- PhysicsBody3D is an abstract base class for implementing a physics body. All \*Body types inherit from it. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`axis_lock_angular_x` | ``false`` | -+-------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`axis_lock_angular_y` | ``false`` | -+-------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`axis_lock_angular_z` | ``false`` | -+-------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`axis_lock_linear_x` | ``false`` | -+-------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`axis_lock_linear_y` | ``false`` | -+-------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`axis_lock_linear_z` | ``false`` | -+-------------------------+------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`axis_lock_angular_x` | ``false`` | + +-------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`axis_lock_angular_y` | ``false`` | + +-------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`axis_lock_angular_z` | ``false`` | + +-------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`axis_lock_linear_x` | ``false`` | + +-------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`axis_lock_linear_y` | ``false`` | + +-------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`axis_lock_linear_z` | ``false`` | + +-------------------------+------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_axis_lock` **(** :ref:`BodyAxis` axis **)** |const| | -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsBody3D[]` | :ref:`get_collision_exceptions` **(** **)** | -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`KinematicCollision3D` | :ref:`move_and_collide` **(** :ref:`Vector3` distance, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** | -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_axis_lock` **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** | -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`test_move` **(** :ref:`Transform3D` from, :ref:`Vector3` distance, :ref:`KinematicCollision3D` collision=null, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** | -+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_axis_lock` **(** :ref:`BodyAxis` axis **)** |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsBody3D[]` | :ref:`get_collision_exceptions` **(** **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision3D` | :ref:`move_and_collide` **(** :ref:`Vector3` motion, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_axis_lock` **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`test_move` **(** :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`KinematicCollision3D` collision=null, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsBody3D_property_axis_lock_angular_x: -- :ref:`bool` **axis_lock_angular_x** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_axis_lock(value) | -+-----------+----------------------+ -| *Getter* | get_axis_lock() | -+-----------+----------------------+ +:ref:`bool` **axis_lock_angular_x** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +- :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| Lock the body's rotation in the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_property_axis_lock_angular_y: -- :ref:`bool` **axis_lock_angular_y** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_axis_lock(value) | -+-----------+----------------------+ -| *Getter* | get_axis_lock() | -+-----------+----------------------+ +:ref:`bool` **axis_lock_angular_y** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +- :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| Lock the body's rotation in the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_property_axis_lock_angular_z: -- :ref:`bool` **axis_lock_angular_z** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_axis_lock(value) | -+-----------+----------------------+ -| *Getter* | get_axis_lock() | -+-----------+----------------------+ +:ref:`bool` **axis_lock_angular_z** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +- :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| Lock the body's rotation in the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_property_axis_lock_linear_x: -- :ref:`bool` **axis_lock_linear_x** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_axis_lock(value) | -+-----------+----------------------+ -| *Getter* | get_axis_lock() | -+-----------+----------------------+ +:ref:`bool` **axis_lock_linear_x** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +- :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| Lock the body's linear movement in the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_property_axis_lock_linear_y: -- :ref:`bool` **axis_lock_linear_y** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_axis_lock(value) | -+-----------+----------------------+ -| *Getter* | get_axis_lock() | -+-----------+----------------------+ +:ref:`bool` **axis_lock_linear_y** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +- :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| Lock the body's linear movement in the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_property_axis_lock_linear_z: -- :ref:`bool` **axis_lock_linear_z** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_axis_lock(value) | -+-----------+----------------------+ -| *Getter* | get_axis_lock() | -+-----------+----------------------+ +:ref:`bool` **axis_lock_linear_z** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +- :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| Lock the body's linear movement in the Z axis. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PhysicsBody3D_method_add_collision_exception_with: -- void **add_collision_exception_with** **(** :ref:`Node` body **)** +.. rst-class:: classref-method + +void **add_collision_exception_with** **(** :ref:`Node` body **)** Adds a body to the list of bodies that this body can't collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_method_get_axis_lock: -- :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** |const| Returns ``true`` if the specified linear or rotational ``axis`` is locked. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_method_get_collision_exceptions: -- :ref:`PhysicsBody3D[]` **get_collision_exceptions** **(** **)** +.. rst-class:: classref-method + +:ref:`PhysicsBody3D[]` **get_collision_exceptions** **(** **)** Returns an array of nodes that were added as collision exceptions for this body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_method_move_and_collide: -- :ref:`KinematicCollision3D` **move_and_collide** **(** :ref:`Vector3` distance, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** +.. rst-class:: classref-method -Moves the body along the vector ``distance``. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``distance`` should be computed using ``delta``. +:ref:`KinematicCollision3D` **move_and_collide** **(** :ref:`Vector3` motion, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** + +Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. The body will stop if it collides. Returns a :ref:`KinematicCollision3D`, which contains information about the collision when stopped, or when touching another body along the motion. @@ -202,31 +246,43 @@ If ``recovery_as_collision`` is ``true``, any depenetration from the recovery ph \ ``max_collisions`` allows to retrieve more than one collision result. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_method_remove_collision_exception_with: -- void **remove_collision_exception_with** **(** :ref:`Node` body **)** +.. rst-class:: classref-method + +void **remove_collision_exception_with** **(** :ref:`Node` body **)** Removes a body from the list of bodies that this body can't collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_method_set_axis_lock: -- void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +.. rst-class:: classref-method + +void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** Locks or unlocks the specified linear or rotational ``axis`` depending on the value of ``lock``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsBody3D_method_test_move: -- :ref:`bool` **test_move** **(** :ref:`Transform3D` from, :ref:`Vector3` distance, :ref:`KinematicCollision3D` collision=null, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** +.. rst-class:: classref-method -Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``distance`` should be computed using ``delta``. +:ref:`bool` **test_move** **(** :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`KinematicCollision3D` collision=null, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** -Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform3D`, then tries to move the body along the vector ``distance``. Returns ``true`` if a collision would stop the body from moving along the whole path. +Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process` or :ref:`Node._process`, ``motion`` should be computed using ``delta``. + +Virtually sets the node's position, scale and rotation to that of the given :ref:`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. \ ``collision`` is an optional object of type :ref:`KinematicCollision3D`, which contains additional information about the collision when stopped, or when touching another body along the motion. diff --git a/classes/class_physicsdirectbodystate2d.rst b/classes/class_physicsdirectbodystate2d.rst index 462445802..bebb6f615 100644 --- a/classes/class_physicsdirectbodystate2d.rst +++ b/classes/class_physicsdirectbodystate2d.rst @@ -16,11 +16,15 @@ PhysicsDirectBodyState2D Direct access object to a physics body in the :ref:`PhysicsServer2D`. +.. rst-class:: classref-introduction-group + Description ----------- Provides direct access to a physics body in the :ref:`PhysicsServer2D`, allowing safe changes to physics properties. This object is passed via the direct state callback of rigid bodies, and is intended for changing the direct state of that body. See :ref:`RigidBody2D._integrate_forces`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,289 +32,371 @@ Tutorials - :doc:`Ray-casting <../tutorials/physics/ray-casting>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angular_velocity` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`center_of_mass` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`center_of_mass_local` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`inverse_inertia` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`inverse_mass` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`linear_velocity` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`sleeping` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`step` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`total_angular_damp` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`total_gravity` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`total_linear_damp` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`transform` | -+---------------------------------------+-------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angular_velocity` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`center_of_mass` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`center_of_mass_local` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`inverse_inertia` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`inverse_mass` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`linear_velocity` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`sleeping` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`step` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`total_angular_damp` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`total_gravity` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`total_linear_damp` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`transform` | + +---------------------------------------+-------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_central_force` **(** :ref:`Vector2` force=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_torque` **(** :ref:`float` torque **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_force` **(** :ref:`Vector2` force=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_impulse` **(** :ref:`Vector2` impulse **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque` **(** :ref:`float` torque **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque_impulse` **(** :ref:`float` impulse **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_constant_force` **(** **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_constant_torque` **(** **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_contact_collider` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_collider_id` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_contact_collider_object` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_contact_collider_position` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_contact_local_normal` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_contact_local_position` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState2D` | :ref:`get_space_state` **(** **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |const| | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`integrate_forces` **(** **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constant_force` **(** :ref:`Vector2` force **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constant_torque` **(** :ref:`float` torque **)** | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_central_force` **(** :ref:`Vector2` force=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_torque` **(** :ref:`float` torque **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_force` **(** :ref:`Vector2` force=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_impulse` **(** :ref:`Vector2` impulse **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque` **(** :ref:`float` torque **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque_impulse` **(** :ref:`float` impulse **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_constant_force` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_constant_torque` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_contact_collider` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_collider_id` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_contact_collider_object` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contact_collider_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contact_local_normal` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contact_local_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D` | :ref:`get_space_state` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`integrate_forces` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_force` **(** :ref:`Vector2` force **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_torque` **(** :ref:`float` torque **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsDirectBodyState2D_property_angular_velocity: -- :ref:`float` **angular_velocity** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+----------+-----------------------------+ +:ref:`float` **angular_velocity** + +.. rst-class:: classref-property-setget + +- void **set_angular_velocity** **(** :ref:`float` value **)** +- :ref:`float` **get_angular_velocity** **(** **)** The body's rotational velocity in *radians* per second. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_center_of_mass: -- :ref:`Vector2` **center_of_mass** +.. rst-class:: classref-property -+----------+----------------------+ -| *Getter* | get_center_of_mass() | -+----------+----------------------+ +:ref:`Vector2` **center_of_mass** + +.. rst-class:: classref-property-setget + +- :ref:`Vector2` **get_center_of_mass** **(** **)** The body's center of mass position relative to the body's center in the global coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_center_of_mass_local: -- :ref:`Vector2` **center_of_mass_local** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Getter* | get_center_of_mass_local() | -+----------+----------------------------+ +:ref:`Vector2` **center_of_mass_local** + +.. rst-class:: classref-property-setget + +- :ref:`Vector2` **get_center_of_mass_local** **(** **)** The body's center of mass position in the body's local coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_inverse_inertia: -- :ref:`float` **inverse_inertia** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Getter* | get_inverse_inertia() | -+----------+-----------------------+ +:ref:`float` **inverse_inertia** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_inverse_inertia** **(** **)** The inverse of the inertia of the body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_inverse_mass: -- :ref:`float` **inverse_mass** +.. rst-class:: classref-property -+----------+--------------------+ -| *Getter* | get_inverse_mass() | -+----------+--------------------+ +:ref:`float` **inverse_mass** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_inverse_mass** **(** **)** The inverse of the mass of the body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_linear_velocity: -- :ref:`Vector2` **linear_velocity** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+----------+----------------------------+ +:ref:`Vector2` **linear_velocity** + +.. rst-class:: classref-property-setget + +- void **set_linear_velocity** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_linear_velocity** **(** **)** The body's linear velocity in pixels per second. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_sleeping: -- :ref:`bool` **sleeping** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_sleep_state(value) | -+----------+------------------------+ -| *Getter* | is_sleeping() | -+----------+------------------------+ +:ref:`bool` **sleeping** + +.. rst-class:: classref-property-setget + +- void **set_sleep_state** **(** :ref:`bool` value **)** +- :ref:`bool` **is_sleeping** **(** **)** If ``true``, this body is currently sleeping (not active). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_step: -- :ref:`float` **step** +.. rst-class:: classref-property -+----------+------------+ -| *Getter* | get_step() | -+----------+------------+ +:ref:`float` **step** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_step** **(** **)** The timestep (delta) used for the simulation. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_total_angular_damp: -- :ref:`float` **total_angular_damp** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Getter* | get_total_angular_damp() | -+----------+--------------------------+ +:ref:`float` **total_angular_damp** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_total_angular_damp** **(** **)** The rate at which the body stops rotating, if there are not any other forces moving it. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_total_gravity: -- :ref:`Vector2` **total_gravity** +.. rst-class:: classref-property -+----------+---------------------+ -| *Getter* | get_total_gravity() | -+----------+---------------------+ +:ref:`Vector2` **total_gravity** + +.. rst-class:: classref-property-setget + +- :ref:`Vector2` **get_total_gravity** **(** **)** The total gravity vector being currently applied to this body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_total_linear_damp: -- :ref:`float` **total_linear_damp** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Getter* | get_total_linear_damp() | -+----------+-------------------------+ +:ref:`float` **total_linear_damp** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_total_linear_damp** **(** **)** The rate at which the body stops moving, if there are not any other forces moving it. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_property_transform: -- :ref:`Transform2D` **transform** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_transform(value) | -+----------+----------------------+ -| *Getter* | get_transform() | -+----------+----------------------+ +:ref:`Transform2D` **transform** + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_transform** **(** **)** The body's transformation matrix. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PhysicsDirectBodyState2D_method_add_constant_central_force: -- void **add_constant_central_force** **(** :ref:`Vector2` force=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **add_constant_central_force** **(** :ref:`Vector2` force=Vector2(0, 0) **)** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_add_constant_force: -- void **add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_add_constant_torque: -- void **add_constant_torque** **(** :ref:`float` torque **)** +.. rst-class:: classref-method + +void **add_constant_torque** **(** :ref:`float` torque **)** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = 0``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_apply_central_force: -- void **apply_central_force** **(** :ref:`Vector2` force=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **apply_central_force** **(** :ref:`Vector2` force=Vector2(0, 0) **)** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using :ref:`apply_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_apply_central_impulse: -- void **apply_central_impulse** **(** :ref:`Vector2` impulse **)** +.. rst-class:: classref-method + +void **apply_central_impulse** **(** :ref:`Vector2` impulse **)** Applies a directional impulse without affecting rotation. @@ -318,21 +404,29 @@ An impulse is time-independent! Applying an impulse every frame would result in This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_apply_force: -- void **apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_apply_impulse: -- void **apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** Applies a positioned impulse to the body. @@ -340,21 +434,29 @@ An impulse is time-independent! Applying an impulse every frame would result in \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_apply_torque: -- void **apply_torque** **(** :ref:`float` torque **)** +.. rst-class:: classref-method + +void **apply_torque** **(** :ref:`float` torque **)** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. \ **Note:** :ref:`inverse_inertia` is required for this to work. To have :ref:`inverse_inertia`, an active :ref:`CollisionShape2D` must be a child of the node, or you can manually set :ref:`inverse_inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_apply_torque_impulse: -- void **apply_torque_impulse** **(** :ref:`float` impulse **)** +.. rst-class:: classref-method + +void **apply_torque_impulse** **(** :ref:`float` impulse **)** Applies a rotational impulse to the body without affecting the position. @@ -362,147 +464,215 @@ An impulse is time-independent! Applying an impulse every frame would result in \ **Note:** :ref:`inverse_inertia` is required for this to work. To have :ref:`inverse_inertia`, an active :ref:`CollisionShape2D` must be a child of the node, or you can manually set :ref:`inverse_inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_constant_force: -- :ref:`Vector2` **get_constant_force** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_constant_force** **(** **)** |const| Returns the body's total constant positional forces applied during each physics update. See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_constant_torque: -- :ref:`float` **get_constant_torque** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_constant_torque** **(** **)** |const| Returns the body's total constant rotational forces applied during each physics update. See :ref:`add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_collider: -- :ref:`RID` **get_contact_collider** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_contact_collider** **(** :ref:`int` contact_idx **)** |const| Returns the collider's :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_collider_id: -- :ref:`int` **get_contact_collider_id** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_collider_id** **(** :ref:`int` contact_idx **)** |const| Returns the collider's object id. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_collider_object: -- :ref:`Object` **get_contact_collider_object** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_contact_collider_object** **(** :ref:`int` contact_idx **)** |const| Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_collider_position: -- :ref:`Vector2` **get_contact_collider_position** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_contact_collider_position** **(** :ref:`int` contact_idx **)** |const| Returns the contact position in the collider. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_collider_shape: -- :ref:`int` **get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |const| Returns the collider's shape index. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_collider_velocity_at_position: -- :ref:`Vector2` **get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| Returns the linear velocity vector at the collider's contact point. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_count: -- :ref:`int` **get_contact_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_count** **(** **)** |const| Returns the number of contacts this body has with other bodies. \ **Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See :ref:`RigidBody2D.contact_monitor`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_local_normal: -- :ref:`Vector2` **get_contact_local_normal** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_contact_local_normal** **(** :ref:`int` contact_idx **)** |const| Returns the local normal at the contact point. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_local_position: -- :ref:`Vector2` **get_contact_local_position** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_contact_local_position** **(** :ref:`int` contact_idx **)** |const| Returns the local position of the contact point. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_contact_local_shape: -- :ref:`int` **get_contact_local_shape** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_local_shape** **(** :ref:`int` contact_idx **)** |const| Returns the local shape index of the collision. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_space_state: -- :ref:`PhysicsDirectSpaceState2D` **get_space_state** **(** **)** +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState2D` **get_space_state** **(** **)** Returns the current state of the space, useful for queries. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_get_velocity_at_local_position: -- :ref:`Vector2` **get_velocity_at_local_position** **(** :ref:`Vector2` local_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_velocity_at_local_position** **(** :ref:`Vector2` local_position **)** |const| Returns the body's velocity at the given relative position, including both translation and rotation. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_integrate_forces: -- void **integrate_forces** **(** **)** +.. rst-class:: classref-method + +void **integrate_forces** **(** **)** Calls the built-in force integration code. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_set_constant_force: -- void **set_constant_force** **(** :ref:`Vector2` force **)** +.. rst-class:: classref-method + +void **set_constant_force** **(** :ref:`Vector2` force **)** Sets the body's total constant positional forces applied during each physics update. See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2D_method_set_constant_torque: -- void **set_constant_torque** **(** :ref:`float` torque **)** +.. rst-class:: classref-method + +void **set_constant_torque** **(** :ref:`float` torque **)** Sets the body's total constant rotational forces applied during each physics update. diff --git a/classes/class_physicsdirectbodystate2dextension.rst b/classes/class_physicsdirectbodystate2dextension.rst index f9ddd23ef..3a91f037b 100644 --- a/classes/class_physicsdirectbodystate2dextension.rst +++ b/classes/class_physicsdirectbodystate2dextension.rst @@ -16,511 +16,688 @@ PhysicsDirectBodyState2DExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_constant_central_force` **(** :ref:`Vector2` force **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_constant_torque` **(** :ref:`float` torque **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_central_force` **(** :ref:`Vector2` force **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_central_impulse` **(** :ref:`Vector2` impulse **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_torque` **(** :ref:`float` torque **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_torque_impulse` **(** :ref:`float` impulse **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState2D` | :ref:`_get_space_state` **(** **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`_get_transform` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_integrate_forces` **(** **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_angular_velocity` **(** :ref:`float` velocity **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_constant_force` **(** :ref:`Vector2` force **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_constant_torque` **(** :ref:`float` torque **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_linear_velocity` **(** :ref:`Vector2` velocity **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_transform` **(** :ref:`Transform2D` transform **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_central_force` **(** :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_torque` **(** :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_force` **(** :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_impulse` **(** :ref:`Vector2` impulse **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque` **(** :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque_impulse` **(** :ref:`float` impulse **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D` | :ref:`_get_space_state` **(** **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_get_transform` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_angular_velocity` **(** :ref:`float` velocity **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_force` **(** :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_torque` **(** :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_linear_velocity` **(** :ref:`Vector2` velocity **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transform` **(** :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsDirectBodyState2DExtension_method__add_constant_central_force: -- void **_add_constant_central_force** **(** :ref:`Vector2` force **)** |virtual| +.. rst-class:: classref-method + +void **_add_constant_central_force** **(** :ref:`Vector2` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__add_constant_force: -- void **_add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| +.. rst-class:: classref-method + +void **_add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__add_constant_torque: -- void **_add_constant_torque** **(** :ref:`float` torque **)** |virtual| +.. rst-class:: classref-method + +void **_add_constant_torque** **(** :ref:`float` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__apply_central_force: -- void **_apply_central_force** **(** :ref:`Vector2` force **)** |virtual| +.. rst-class:: classref-method + +void **_apply_central_force** **(** :ref:`Vector2` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__apply_central_impulse: -- void **_apply_central_impulse** **(** :ref:`Vector2` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_apply_central_impulse** **(** :ref:`Vector2` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__apply_force: -- void **_apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| +.. rst-class:: classref-method + +void **_apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__apply_impulse: -- void **_apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| +.. rst-class:: classref-method + +void **_apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__apply_torque: -- void **_apply_torque** **(** :ref:`float` torque **)** |virtual| +.. rst-class:: classref-method + +void **_apply_torque** **(** :ref:`float` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__apply_torque_impulse: -- void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_angular_velocity: -- :ref:`float` **_get_angular_velocity** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_angular_velocity** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass: -- :ref:`Vector2` **_get_center_of_mass** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_center_of_mass** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass_local: -- :ref:`Vector2` **_get_center_of_mass_local** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_center_of_mass_local** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_constant_force: -- :ref:`Vector2` **_get_constant_force** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_constant_force** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_constant_torque: -- :ref:`float` **_get_constant_torque** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_constant_torque** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider: -- :ref:`RID` **_get_contact_collider** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_get_contact_collider** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_id: -- :ref:`int` **_get_contact_collider_id** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_collider_id** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_object: -- :ref:`Object` **_get_contact_collider_object** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Object` **_get_contact_collider_object** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_position: -- :ref:`Vector2` **_get_contact_collider_position** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_contact_collider_position** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_shape: -- :ref:`int` **_get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_velocity_at_position: -- :ref:`Vector2` **_get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_count: -- :ref:`int` **_get_contact_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_normal: -- :ref:`Vector2` **_get_contact_local_normal** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_contact_local_normal** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_position: -- :ref:`Vector2` **_get_contact_local_position** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_contact_local_position** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_shape: -- :ref:`int` **_get_contact_local_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_local_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_inertia: -- :ref:`float` **_get_inverse_inertia** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_inverse_inertia** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_mass: -- :ref:`float` **_get_inverse_mass** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_inverse_mass** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_linear_velocity: -- :ref:`Vector2` **_get_linear_velocity** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_linear_velocity** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_space_state: -- :ref:`PhysicsDirectSpaceState2D` **_get_space_state** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState2D` **_get_space_state** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_step: -- :ref:`float` **_get_step** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_step** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_total_angular_damp: -- :ref:`float` **_get_total_angular_damp** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_total_angular_damp** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_total_gravity: -- :ref:`Vector2` **_get_total_gravity** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_total_gravity** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_total_linear_damp: -- :ref:`float` **_get_total_linear_damp** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_total_linear_damp** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_transform: -- :ref:`Transform2D` **_get_transform** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **_get_transform** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__get_velocity_at_local_position: -- :ref:`Vector2` **_get_velocity_at_local_position** **(** :ref:`Vector2` local_position **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_velocity_at_local_position** **(** :ref:`Vector2` local_position **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__integrate_forces: -- void **_integrate_forces** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_integrate_forces** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__is_sleeping: -- :ref:`bool` **_is_sleeping** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_sleeping** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__set_angular_velocity: -- void **_set_angular_velocity** **(** :ref:`float` velocity **)** |virtual| +.. rst-class:: classref-method + +void **_set_angular_velocity** **(** :ref:`float` velocity **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__set_constant_force: -- void **_set_constant_force** **(** :ref:`Vector2` force **)** |virtual| +.. rst-class:: classref-method + +void **_set_constant_force** **(** :ref:`Vector2` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__set_constant_torque: -- void **_set_constant_torque** **(** :ref:`float` torque **)** |virtual| +.. rst-class:: classref-method + +void **_set_constant_torque** **(** :ref:`float` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__set_linear_velocity: -- void **_set_linear_velocity** **(** :ref:`Vector2` velocity **)** |virtual| +.. rst-class:: classref-method + +void **_set_linear_velocity** **(** :ref:`Vector2` velocity **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__set_sleep_state: -- void **_set_sleep_state** **(** :ref:`bool` enabled **)** |virtual| +.. rst-class:: classref-method + +void **_set_sleep_state** **(** :ref:`bool` enabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState2DExtension_method__set_transform: -- void **_set_transform** **(** :ref:`Transform2D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_set_transform** **(** :ref:`Transform2D` transform **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index 54ef2e316..0c4483db2 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -16,11 +16,15 @@ PhysicsDirectBodyState3D Direct access object to a physics body in the :ref:`PhysicsServer3D`. +.. rst-class:: classref-introduction-group + Description ----------- Provides direct access to a physics body in the :ref:`PhysicsServer3D`, allowing safe changes to physics properties. This object is passed via the direct state callback of rigid bodies, and is intended for changing the direct state of that body. See :ref:`RigidBody3D._integrate_forces`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,321 +32,411 @@ Tutorials - :doc:`Ray-casting <../tutorials/physics/ray-casting>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`angular_velocity` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`center_of_mass` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`center_of_mass_local` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`inverse_inertia` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`inverse_inertia_tensor` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`inverse_mass` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`linear_velocity` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`principal_inertia_axes` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`sleeping` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`step` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`total_angular_damp` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`total_gravity` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`total_linear_damp` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`transform` | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`angular_velocity` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`center_of_mass` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`center_of_mass_local` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`inverse_inertia` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`inverse_inertia_tensor` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`inverse_mass` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`linear_velocity` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`principal_inertia_axes` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`sleeping` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`step` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`total_angular_damp` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`total_gravity` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`total_linear_damp` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`transform` | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_central_force` **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_torque` **(** :ref:`Vector3` torque **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_force` **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque` **(** :ref:`Vector3` torque **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque_impulse` **(** :ref:`Vector3` impulse **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_constant_force` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_constant_torque` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_contact_collider` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_collider_id` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_contact_collider_object` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_contact_collider_position` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_contact_impulse` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_contact_local_normal` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_contact_local_position` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState3D` | :ref:`get_space_state` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`integrate_forces` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constant_force` **(** :ref:`Vector3` force **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constant_torque` **(** :ref:`Vector3` torque **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_central_force` **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_torque` **(** :ref:`Vector3` torque **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_force` **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque` **(** :ref:`Vector3` torque **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque_impulse` **(** :ref:`Vector3` impulse **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_constant_force` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_constant_torque` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_contact_collider` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_collider_id` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_contact_collider_object` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_collider_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_contact_impulse` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_local_normal` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_local_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`get_space_state` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`integrate_forces` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_force` **(** :ref:`Vector3` force **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_torque` **(** :ref:`Vector3` torque **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsDirectBodyState3D_property_angular_velocity: -- :ref:`Vector3` **angular_velocity** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+----------+-----------------------------+ +:ref:`Vector3` **angular_velocity** + +.. rst-class:: classref-property-setget + +- void **set_angular_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_angular_velocity** **(** **)** The body's rotational velocity in *radians* per second. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_center_of_mass: -- :ref:`Vector3` **center_of_mass** +.. rst-class:: classref-property -+----------+----------------------+ -| *Getter* | get_center_of_mass() | -+----------+----------------------+ +:ref:`Vector3` **center_of_mass** + +.. rst-class:: classref-property-setget + +- :ref:`Vector3` **get_center_of_mass** **(** **)** The body's center of mass position relative to the body's center in the global coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_center_of_mass_local: -- :ref:`Vector3` **center_of_mass_local** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Getter* | get_center_of_mass_local() | -+----------+----------------------------+ +:ref:`Vector3` **center_of_mass_local** + +.. rst-class:: classref-property-setget + +- :ref:`Vector3` **get_center_of_mass_local** **(** **)** The body's center of mass position in the body's local coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_inverse_inertia: -- :ref:`Vector3` **inverse_inertia** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Getter* | get_inverse_inertia() | -+----------+-----------------------+ +:ref:`Vector3` **inverse_inertia** + +.. rst-class:: classref-property-setget + +- :ref:`Vector3` **get_inverse_inertia** **(** **)** The inverse of the inertia of the body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_inverse_inertia_tensor: -- :ref:`Basis` **inverse_inertia_tensor** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Getter* | get_inverse_inertia_tensor() | -+----------+------------------------------+ +:ref:`Basis` **inverse_inertia_tensor** + +.. rst-class:: classref-property-setget + +- :ref:`Basis` **get_inverse_inertia_tensor** **(** **)** The inverse of the inertia tensor of the body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_inverse_mass: -- :ref:`float` **inverse_mass** +.. rst-class:: classref-property -+----------+--------------------+ -| *Getter* | get_inverse_mass() | -+----------+--------------------+ +:ref:`float` **inverse_mass** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_inverse_mass** **(** **)** The inverse of the mass of the body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_linear_velocity: -- :ref:`Vector3` **linear_velocity** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+----------+----------------------------+ +:ref:`Vector3` **linear_velocity** + +.. rst-class:: classref-property-setget + +- void **set_linear_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_linear_velocity** **(** **)** The body's linear velocity in units per second. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_principal_inertia_axes: -- :ref:`Basis` **principal_inertia_axes** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Getter* | get_principal_inertia_axes() | -+----------+------------------------------+ +:ref:`Basis` **principal_inertia_axes** + +.. rst-class:: classref-property-setget + +- :ref:`Basis` **get_principal_inertia_axes** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_sleeping: -- :ref:`bool` **sleeping** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_sleep_state(value) | -+----------+------------------------+ -| *Getter* | is_sleeping() | -+----------+------------------------+ +:ref:`bool` **sleeping** + +.. rst-class:: classref-property-setget + +- void **set_sleep_state** **(** :ref:`bool` value **)** +- :ref:`bool` **is_sleeping** **(** **)** If ``true``, this body is currently sleeping (not active). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_step: -- :ref:`float` **step** +.. rst-class:: classref-property -+----------+------------+ -| *Getter* | get_step() | -+----------+------------+ +:ref:`float` **step** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_step** **(** **)** The timestep (delta) used for the simulation. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_total_angular_damp: -- :ref:`float` **total_angular_damp** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Getter* | get_total_angular_damp() | -+----------+--------------------------+ +:ref:`float` **total_angular_damp** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_total_angular_damp** **(** **)** The rate at which the body stops rotating, if there are not any other forces moving it. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_total_gravity: -- :ref:`Vector3` **total_gravity** +.. rst-class:: classref-property -+----------+---------------------+ -| *Getter* | get_total_gravity() | -+----------+---------------------+ +:ref:`Vector3` **total_gravity** + +.. rst-class:: classref-property-setget + +- :ref:`Vector3` **get_total_gravity** **(** **)** The total gravity vector being currently applied to this body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_total_linear_damp: -- :ref:`float` **total_linear_damp** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Getter* | get_total_linear_damp() | -+----------+-------------------------+ +:ref:`float` **total_linear_damp** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_total_linear_damp** **(** **)** The rate at which the body stops moving, if there are not any other forces moving it. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_property_transform: -- :ref:`Transform3D` **transform** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_transform(value) | -+----------+----------------------+ -| *Getter* | get_transform() | -+----------+----------------------+ +:ref:`Transform3D` **transform** + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_transform** **(** **)** The body's transformation matrix. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PhysicsDirectBodyState3D_method_add_constant_central_force: -- void **add_constant_central_force** **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **add_constant_central_force** **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_add_constant_force: -- void **add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_add_constant_torque: -- void **add_constant_torque** **(** :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **add_constant_torque** **(** :ref:`Vector3` torque **)** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = Vector3(0, 0, 0)``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_apply_central_force: -- void **apply_central_force** **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **apply_central_force** **(** :ref:`Vector3` force=Vector3(0, 0, 0) **)** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using :ref:`apply_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_apply_central_impulse: -- void **apply_central_impulse** **(** :ref:`Vector3` impulse=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **apply_central_impulse** **(** :ref:`Vector3` impulse=Vector3(0, 0, 0) **)** Applies a directional impulse without affecting rotation. @@ -350,21 +444,29 @@ An impulse is time-independent! Applying an impulse every frame would result in This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_apply_force: -- void **apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_apply_impulse: -- void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Applies a positioned impulse to the body. @@ -372,21 +474,29 @@ An impulse is time-independent! Applying an impulse every frame would result in \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_apply_torque: -- void **apply_torque** **(** :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **apply_torque** **(** :ref:`Vector3` torque **)** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. \ **Note:** :ref:`inverse_inertia` is required for this to work. To have :ref:`inverse_inertia`, an active :ref:`CollisionShape3D` must be a child of the node, or you can manually set :ref:`inverse_inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_apply_torque_impulse: -- void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** +.. rst-class:: classref-method + +void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** Applies a rotational impulse to the body without affecting the position. @@ -394,155 +504,227 @@ An impulse is time-independent! Applying an impulse every frame would result in \ **Note:** :ref:`inverse_inertia` is required for this to work. To have :ref:`inverse_inertia`, an active :ref:`CollisionShape3D` must be a child of the node, or you can manually set :ref:`inverse_inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_constant_force: -- :ref:`Vector3` **get_constant_force** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_constant_force** **(** **)** |const| Returns the body's total constant positional forces applied during each physics update. See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_constant_torque: -- :ref:`Vector3` **get_constant_torque** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_constant_torque** **(** **)** |const| Returns the body's total constant rotational forces applied during each physics update. See :ref:`add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_collider: -- :ref:`RID` **get_contact_collider** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_contact_collider** **(** :ref:`int` contact_idx **)** |const| Returns the collider's :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_collider_id: -- :ref:`int` **get_contact_collider_id** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_collider_id** **(** :ref:`int` contact_idx **)** |const| Returns the collider's object id. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_collider_object: -- :ref:`Object` **get_contact_collider_object** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_contact_collider_object** **(** :ref:`int` contact_idx **)** |const| Returns the collider object. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_collider_position: -- :ref:`Vector3` **get_contact_collider_position** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_collider_position** **(** :ref:`int` contact_idx **)** |const| Returns the contact position in the collider. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_collider_shape: -- :ref:`int` **get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |const| Returns the collider's shape index. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_collider_velocity_at_position: -- :ref:`Vector3` **get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| Returns the linear velocity vector at the collider's contact point. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_count: -- :ref:`int` **get_contact_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_count** **(** **)** |const| Returns the number of contacts this body has with other bodies. \ **Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See :ref:`RigidBody3D.contact_monitor`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_impulse: -- :ref:`float` **get_contact_impulse** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_contact_impulse** **(** :ref:`int` contact_idx **)** |const| Impulse created by the contact. Only implemented for Bullet physics. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_local_normal: -- :ref:`Vector3` **get_contact_local_normal** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_local_normal** **(** :ref:`int` contact_idx **)** |const| Returns the local normal at the contact point. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_local_position: -- :ref:`Vector3` **get_contact_local_position** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_local_position** **(** :ref:`int` contact_idx **)** |const| Returns the local position of the contact point. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_contact_local_shape: -- :ref:`int` **get_contact_local_shape** **(** :ref:`int` contact_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_local_shape** **(** :ref:`int` contact_idx **)** |const| Returns the local shape index of the collision. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_space_state: -- :ref:`PhysicsDirectSpaceState3D` **get_space_state** **(** **)** +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState3D` **get_space_state** **(** **)** Returns the current state of the space, useful for queries. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_get_velocity_at_local_position: -- :ref:`Vector3` **get_velocity_at_local_position** **(** :ref:`Vector3` local_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_velocity_at_local_position** **(** :ref:`Vector3` local_position **)** |const| Returns the body's velocity at the given relative position, including both translation and rotation. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_integrate_forces: -- void **integrate_forces** **(** **)** +.. rst-class:: classref-method + +void **integrate_forces** **(** **)** Calls the built-in force integration code. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_set_constant_force: -- void **set_constant_force** **(** :ref:`Vector3` force **)** +.. rst-class:: classref-method + +void **set_constant_force** **(** :ref:`Vector3` force **)** Sets the body's total constant positional forces applied during each physics update. See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3D_method_set_constant_torque: -- void **set_constant_torque** **(** :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **set_constant_torque** **(** :ref:`Vector3` torque **)** Sets the body's total constant rotational forces applied during each physics update. diff --git a/classes/class_physicsdirectbodystate3dextension.rst b/classes/class_physicsdirectbodystate3dextension.rst index f63d9e46f..1f6356c72 100644 --- a/classes/class_physicsdirectbodystate3dextension.rst +++ b/classes/class_physicsdirectbodystate3dextension.rst @@ -16,547 +16,736 @@ PhysicsDirectBodyState3DExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_constant_central_force` **(** :ref:`Vector3` force **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_central_force` **(** :ref:`Vector3` force **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_central_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_torque` **(** :ref:`Vector3` torque **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_apply_torque_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_contact_impulse` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`_get_inverse_inertia_tensor` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`_get_principal_inertia_axes` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState3D` | :ref:`_get_space_state` **(** **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`_get_transform` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_integrate_forces` **(** **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_angular_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_constant_force` **(** :ref:`Vector3` force **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_linear_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_transform` **(** :ref:`Transform3D` transform **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_central_force` **(** :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_force` **(** :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque` **(** :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_contact_impulse` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`_get_inverse_inertia_tensor` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`_get_principal_inertia_axes` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`_get_space_state` **(** **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_get_transform` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_angular_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_force` **(** :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_linear_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transform` **(** :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsDirectBodyState3DExtension_method__add_constant_central_force: -- void **_add_constant_central_force** **(** :ref:`Vector3` force **)** |virtual| +.. rst-class:: classref-method + +void **_add_constant_central_force** **(** :ref:`Vector3` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__add_constant_force: -- void **_add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| +.. rst-class:: classref-method + +void **_add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__add_constant_torque: -- void **_add_constant_torque** **(** :ref:`Vector3` torque **)** |virtual| +.. rst-class:: classref-method + +void **_add_constant_torque** **(** :ref:`Vector3` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__apply_central_force: -- void **_apply_central_force** **(** :ref:`Vector3` force **)** |virtual| +.. rst-class:: classref-method + +void **_apply_central_force** **(** :ref:`Vector3` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__apply_central_impulse: -- void **_apply_central_impulse** **(** :ref:`Vector3` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_apply_central_impulse** **(** :ref:`Vector3` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__apply_force: -- void **_apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| +.. rst-class:: classref-method + +void **_apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__apply_impulse: -- void **_apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| +.. rst-class:: classref-method + +void **_apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__apply_torque: -- void **_apply_torque** **(** :ref:`Vector3` torque **)** |virtual| +.. rst-class:: classref-method + +void **_apply_torque** **(** :ref:`Vector3` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__apply_torque_impulse: -- void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_angular_velocity: -- :ref:`Vector3` **_get_angular_velocity** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_angular_velocity** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass: -- :ref:`Vector3` **_get_center_of_mass** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_center_of_mass** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass_local: -- :ref:`Vector3` **_get_center_of_mass_local** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_center_of_mass_local** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_constant_force: -- :ref:`Vector3` **_get_constant_force** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_constant_force** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_constant_torque: -- :ref:`Vector3` **_get_constant_torque** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_constant_torque** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider: -- :ref:`RID` **_get_contact_collider** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_get_contact_collider** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_id: -- :ref:`int` **_get_contact_collider_id** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_collider_id** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_object: -- :ref:`Object` **_get_contact_collider_object** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Object` **_get_contact_collider_object** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_position: -- :ref:`Vector3` **_get_contact_collider_position** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_contact_collider_position** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_shape: -- :ref:`int` **_get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_velocity_at_position: -- :ref:`Vector3` **_get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_count: -- :ref:`int` **_get_contact_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_impulse: -- :ref:`float` **_get_contact_impulse** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_contact_impulse** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_normal: -- :ref:`Vector3` **_get_contact_local_normal** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_contact_local_normal** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_position: -- :ref:`Vector3` **_get_contact_local_position** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_contact_local_position** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_shape: -- :ref:`int` **_get_contact_local_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_contact_local_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia: -- :ref:`Vector3` **_get_inverse_inertia** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_inverse_inertia** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia_tensor: -- :ref:`Basis` **_get_inverse_inertia_tensor** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Basis` **_get_inverse_inertia_tensor** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_mass: -- :ref:`float` **_get_inverse_mass** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_inverse_mass** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_linear_velocity: -- :ref:`Vector3` **_get_linear_velocity** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_linear_velocity** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_principal_inertia_axes: -- :ref:`Basis` **_get_principal_inertia_axes** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Basis` **_get_principal_inertia_axes** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_space_state: -- :ref:`PhysicsDirectSpaceState3D` **_get_space_state** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState3D` **_get_space_state** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_step: -- :ref:`float` **_get_step** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_step** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_total_angular_damp: -- :ref:`float` **_get_total_angular_damp** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_total_angular_damp** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_total_gravity: -- :ref:`Vector3` **_get_total_gravity** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_total_gravity** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_total_linear_damp: -- :ref:`float` **_get_total_linear_damp** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_total_linear_damp** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_transform: -- :ref:`Transform3D` **_get_transform** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **_get_transform** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__get_velocity_at_local_position: -- :ref:`Vector3` **_get_velocity_at_local_position** **(** :ref:`Vector3` local_position **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_velocity_at_local_position** **(** :ref:`Vector3` local_position **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__integrate_forces: -- void **_integrate_forces** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_integrate_forces** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__is_sleeping: -- :ref:`bool` **_is_sleeping** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_sleeping** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__set_angular_velocity: -- void **_set_angular_velocity** **(** :ref:`Vector3` velocity **)** |virtual| +.. rst-class:: classref-method + +void **_set_angular_velocity** **(** :ref:`Vector3` velocity **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__set_constant_force: -- void **_set_constant_force** **(** :ref:`Vector3` force **)** |virtual| +.. rst-class:: classref-method + +void **_set_constant_force** **(** :ref:`Vector3` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__set_constant_torque: -- void **_set_constant_torque** **(** :ref:`Vector3` torque **)** |virtual| +.. rst-class:: classref-method + +void **_set_constant_torque** **(** :ref:`Vector3` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__set_linear_velocity: -- void **_set_linear_velocity** **(** :ref:`Vector3` velocity **)** |virtual| +.. rst-class:: classref-method + +void **_set_linear_velocity** **(** :ref:`Vector3` velocity **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__set_sleep_state: -- void **_set_sleep_state** **(** :ref:`bool` enabled **)** |virtual| +.. rst-class:: classref-method + +void **_set_sleep_state** **(** :ref:`bool` enabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectBodyState3DExtension_method__set_transform: -- void **_set_transform** **(** :ref:`Transform3D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_set_transform** **(** :ref:`Transform3D` transform **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsdirectspacestate2d.rst b/classes/class_physicsdirectspacestate2d.rst index 2b948dff0..9eb74269c 100644 --- a/classes/class_physicsdirectspacestate2d.rst +++ b/classes/class_physicsdirectspacestate2d.rst @@ -16,11 +16,15 @@ PhysicsDirectSpaceState2D Direct access object to a space in the :ref:`PhysicsServer2D`. +.. rst-class:: classref-introduction-group + Description ----------- Direct access object to a space in the :ref:`PhysicsServer2D`. It's used mainly to do queries against objects and areas residing in a given space. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,29 +32,42 @@ Tutorials - :doc:`Ray-casting <../tutorials/physics/ray-casting>` +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsDirectSpaceState2D_method_cast_motion: -- :ref:`PackedFloat32Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** Checks how far a :ref:`Shape2D` can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a :ref:`PhysicsShapeQueryParameters2D` object. @@ -58,21 +75,29 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m \ **Note:** Any :ref:`Shape2D`\ s that the shape is already colliding with e.g. inside of, will be ignored. Use :ref:`collide_shape` to determine the :ref:`Shape2D`\ s that the shape is already colliding with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2D_method_collide_shape: -- :ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in :ref:`PhysicsShapeQueryParameters2D` object, second one is in the collided shape from the physics space. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2D_method_get_rest_info: -- :ref:`Dictionary` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** Checks the intersections of a shape, given through a :ref:`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. @@ -90,11 +115,15 @@ Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryPara \ ``shape``: The shape index of the colliding shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2D_method_intersect_point: -- :ref:`Dictionary[]` **intersect_point** **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +.. rst-class:: classref-method + +:ref:`Dictionary[]` **intersect_point** **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** Checks whether a point is inside any solid shape. Position and other parameters are defined through :ref:`PhysicsPointQueryParameters2D`. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: @@ -110,11 +139,15 @@ The number of intersections can be limited with the ``max_results`` parameter, t \ **Note:** :ref:`ConcavePolygonShape2D`\ s and :ref:`CollisionPolygon2D`\ s in ``Segments`` build mode are not solid shapes. Therefore, they will not be detected. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2D_method_intersect_ray: -- :ref:`Dictionary` **intersect_ray** **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **intersect_ray** **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** Intersects a ray in a given space. Ray position and other parameters are defined through :ref:`PhysicsRayQueryParameters2D`. The returned object is a dictionary with the following fields: @@ -132,11 +165,15 @@ Intersects a ray in a given space. Ray position and other parameters are defined If the ray did not intersect anything, then an empty dictionary is returned instead. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2D_method_intersect_shape: -- :ref:`Dictionary[]` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +.. rst-class:: classref-method + +:ref:`Dictionary[]` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: diff --git a/classes/class_physicsdirectspacestate2dextension.rst b/classes/class_physicsdirectspacestate2dextension.rst index 546091f94..23ea21bd3 100644 --- a/classes/class_physicsdirectspacestate2dextension.rst +++ b/classes/class_physicsdirectspacestate2dextension.rst @@ -16,79 +16,112 @@ PhysicsDirectSpaceState2DExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector2` position, :ref:`int` canvas_instance_id, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int` max_results **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| | -+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector2` position, :ref:`int` canvas_instance_id, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int` max_results **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsDirectSpaceState2DExtension_method__cast_motion: -- :ref:`bool` **_cast_motion** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_cast_motion** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2DExtension_method__collide_shape: -- :ref:`bool` **_collide_shape** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_collide_shape** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2DExtension_method__intersect_point: -- :ref:`int` **_intersect_point** **(** :ref:`Vector2` position, :ref:`int` canvas_instance_id, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_intersect_point** **(** :ref:`Vector2` position, :ref:`int` canvas_instance_id, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2DExtension_method__intersect_ray: -- :ref:`bool` **_intersect_ray** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_intersect_ray** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2DExtension_method__intersect_shape: -- :ref:`int` **_intersect_shape** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int` max_results **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_intersect_shape** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int` max_results **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState2DExtension_method__rest_info: -- :ref:`bool` **_rest_info** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_rest_info** **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index 0f596fef1..b475bb390 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -16,11 +16,15 @@ PhysicsDirectSpaceState3D Direct access object to a space in the :ref:`PhysicsServer3D`. +.. rst-class:: classref-introduction-group + Description ----------- Direct access object to a space in the :ref:`PhysicsServer3D`. It's used mainly to do queries against objects and areas residing in a given space. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,29 +32,42 @@ Tutorials - :doc:`Ray-casting <../tutorials/physics/ray-casting>` +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsDirectSpaceState3D_method_cast_motion: -- :ref:`PackedFloat32Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** Checks how far a :ref:`Shape3D` can move without colliding. All the parameters for the query, including the shape, are supplied through a :ref:`PhysicsShapeQueryParameters3D` object. @@ -58,11 +75,15 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m \ **Note:** Any :ref:`Shape3D`\ s that the shape is already colliding with e.g. inside of, will be ignored. Use :ref:`collide_shape` to determine the :ref:`Shape3D`\ s that the shape is already colliding with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3D_method_collide_shape: -- :ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. @@ -70,11 +91,15 @@ Returned points are a list of pairs of contact points. For each pair the first o \ **Note:** This method does not take into account the ``motion`` property of the object. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3D_method_get_rest_info: -- :ref:`Dictionary` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** Checks the intersections of a shape, given through a :ref:`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: @@ -94,11 +119,15 @@ If the shape did not intersect anything, then an empty dictionary is returned in \ **Note:** This method does not take into account the ``motion`` property of the object. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3D_method_intersect_point: -- :ref:`Dictionary[]` **intersect_point** **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +.. rst-class:: classref-method + +:ref:`Dictionary[]` **intersect_point** **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** Checks whether a point is inside any solid shape. Position and other parameters are defined through :ref:`PhysicsPointQueryParameters3D`. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: @@ -112,11 +141,15 @@ Checks whether a point is inside any solid shape. Position and other parameters The number of intersections can be limited with the ``max_results`` parameter, to reduce the processing time. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3D_method_intersect_ray: -- :ref:`Dictionary` **intersect_ray** **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **intersect_ray** **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** Intersects a ray in a given space. Ray position and other parameters are defined through :ref:`PhysicsRayQueryParameters3D`. The returned object is a dictionary with the following fields: @@ -134,11 +167,15 @@ Intersects a ray in a given space. Ray position and other parameters are defined If the ray did not intersect anything, then an empty dictionary is returned instead. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3D_method_intersect_shape: -- :ref:`Dictionary[]` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +.. rst-class:: classref-method + +:ref:`Dictionary[]` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: diff --git a/classes/class_physicsdirectspacestate3dextension.rst b/classes/class_physicsdirectspacestate3dextension.rst index fe72bb9e4..2214889d4 100644 --- a/classes/class_physicsdirectspacestate3dextension.rst +++ b/classes/class_physicsdirectspacestate3dextension.rst @@ -16,91 +16,128 @@ PhysicsDirectSpaceState3DExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_get_closest_point_to_object_volume` **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_closest_point_to_object_volume` **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsDirectSpaceState3DExtension_method__cast_motion: -- :ref:`bool` **_cast_motion** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_cast_motion** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3DExtension_method__collide_shape: -- :ref:`bool` **_collide_shape** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_collide_shape** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3DExtension_method__get_closest_point_to_object_volume: -- :ref:`Vector3` **_get_closest_point_to_object_volume** **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_get_closest_point_to_object_volume** **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3DExtension_method__intersect_point: -- :ref:`int` **_intersect_point** **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_intersect_point** **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3DExtension_method__intersect_ray: -- :ref:`bool` **_intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3DExtension_method__intersect_shape: -- :ref:`int` **_intersect_shape** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_intersect_shape** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsDirectSpaceState3DExtension_method__rest_info: -- :ref:`bool` **_rest_info** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_rest_info** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsmaterial.rst b/classes/class_physicsmaterial.rst index 490da4eec..969224b30 100644 --- a/classes/class_physicsmaterial.rst +++ b/classes/class_physicsmaterial.rst @@ -14,86 +14,101 @@ PhysicsMaterial A material for physics properties. +.. rst-class:: classref-introduction-group + Description ----------- Provides a means of modifying the collision properties of a :ref:`PhysicsBody3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`absorbent` | ``false`` | -+---------------------------+------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`bounce` | ``0.0`` | -+---------------------------+------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`friction` | ``1.0`` | -+---------------------------+------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`rough` | ``false`` | -+---------------------------+------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`absorbent` | ``false`` | + +---------------------------+------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`bounce` | ``0.0`` | + +---------------------------+------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`friction` | ``1.0`` | + +---------------------------+------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`rough` | ``false`` | + +---------------------------+------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsMaterial_property_absorbent: -- :ref:`bool` **absorbent** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_absorbent(value) | -+-----------+----------------------+ -| *Getter* | is_absorbent() | -+-----------+----------------------+ +:ref:`bool` **absorbent** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_absorbent** **(** :ref:`bool` value **)** +- :ref:`bool` **is_absorbent** **(** **)** If ``true``, subtracts the bounciness from the colliding object's bounciness instead of adding it. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsMaterial_property_bounce: -- :ref:`float` **bounce** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_bounce(value) | -+-----------+-------------------+ -| *Getter* | get_bounce() | -+-----------+-------------------+ +:ref:`float` **bounce** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_bounce** **(** :ref:`float` value **)** +- :ref:`float` **get_bounce** **(** **)** The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsMaterial_property_friction: -- :ref:`float` **friction** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_friction(value) | -+-----------+---------------------+ -| *Getter* | get_friction() | -+-----------+---------------------+ +:ref:`float` **friction** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_friction** **(** :ref:`float` value **)** +- :ref:`float` **get_friction** **(** **)** The body's friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsMaterial_property_rough: -- :ref:`bool` **rough** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``false`` | -+-----------+------------------+ -| *Setter* | set_rough(value) | -+-----------+------------------+ -| *Getter* | is_rough() | -+-----------+------------------+ +:ref:`bool` **rough** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_rough** **(** :ref:`bool` value **)** +- :ref:`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. diff --git a/classes/class_physicspointqueryparameters2d.rst b/classes/class_physicspointqueryparameters2d.rst index 671a978d2..efae4f15f 100644 --- a/classes/class_physicspointqueryparameters2d.rst +++ b/classes/class_physicspointqueryparameters2d.rst @@ -14,122 +14,139 @@ PhysicsPointQueryParameters2D Parameters to be sent to a 2D point physics query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the position and other parameters to be used for :ref:`PhysicsDirectSpaceState2D.intersect_point`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`canvas_instance_id` | ``0`` | -+-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`collision_mask` | ``4294967295`` | -+-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`RID[]` | :ref:`exclude` | ``[]`` | -+-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`canvas_instance_id` | ``0`` | + +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`collision_mask` | ``4294967295`` | + +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`RID[]` | :ref:`exclude` | ``[]`` | + +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsPointQueryParameters2D_property_canvas_instance_id: -- :ref:`int` **canvas_instance_id** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_canvas_instance_id(value) | -+-----------+-------------------------------+ -| *Getter* | get_canvas_instance_id() | -+-----------+-------------------------------+ +:ref:`int` **canvas_instance_id** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_canvas_instance_id** **(** :ref:`int` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsPointQueryParameters2D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, the query will take :ref:`Area2D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsPointQueryParameters2D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, the query will take :ref:`PhysicsBody2D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsPointQueryParameters2D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4294967295`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsPointQueryParameters2D_property_exclude: -- :ref:`RID[]` **exclude** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_exclude(value) | -+-----------+--------------------+ -| *Getter* | get_exclude() | -+-----------+--------------------+ +:ref:`RID[]` **exclude** = ``[]`` -The list of objects or object :ref:`RID`\ s that will be excluded from collisions. +.. rst-class:: classref-property-setget + +- void **set_exclude** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude** **(** **)** + +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsPointQueryParameters2D_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_position(value) | -+-----------+---------------------+ -| *Getter* | get_position() | -+-----------+---------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position** **(** **)** The position being queried for, in global coordinates. diff --git a/classes/class_physicspointqueryparameters3d.rst b/classes/class_physicspointqueryparameters3d.rst index 490416af8..d895d3424 100644 --- a/classes/class_physicspointqueryparameters3d.rst +++ b/classes/class_physicspointqueryparameters3d.rst @@ -14,104 +14,120 @@ PhysicsPointQueryParameters3D Parameters to be sent to a 3D point physics query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the position and other parameters to be used for :ref:`PhysicsDirectSpaceState3D.intersect_point`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`collision_mask` | ``4294967295`` | -+-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Array` | :ref:`exclude` | ``[]`` | -+-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | -+-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`collision_mask` | ``4294967295`` | + +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`RID[]` | :ref:`exclude` | ``[]`` | + +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`position` | ``Vector3(0, 0, 0)`` | + +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsPointQueryParameters3D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, the query will take :ref:`Area3D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsPointQueryParameters3D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, the query will take :ref:`PhysicsBody3D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsPointQueryParameters3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4294967295`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsPointQueryParameters3D_property_exclude: -- :ref:`Array` **exclude** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_exclude(value) | -+-----------+--------------------+ -| *Getter* | get_exclude() | -+-----------+--------------------+ +:ref:`RID[]` **exclude** = ``[]`` -The list of objects or object :ref:`RID`\ s that will be excluded from collisions. +.. rst-class:: classref-property-setget + +- void **set_exclude** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude** **(** **)** + +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsPointQueryParameters3D_property_position: -- :ref:`Vector3` **position** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_position(value) | -+-----------+----------------------+ -| *Getter* | get_position() | -+-----------+----------------------+ +:ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_position** **(** **)** The position being queried for, in global coordinates. diff --git a/classes/class_physicsrayqueryparameters2d.rst b/classes/class_physicsrayqueryparameters2d.rst index 08b5c6454..9e3c2402b 100644 --- a/classes/class_physicsrayqueryparameters2d.rst +++ b/classes/class_physicsrayqueryparameters2d.rst @@ -14,158 +14,189 @@ PhysicsRayQueryParameters2D Parameters to be sent to a 2D ray physics query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the ray position and other parameters to be used for :ref:`PhysicsDirectSpaceState2D.intersect_ray`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`collision_mask` | ``4294967295`` | -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ -| :ref:`RID[]` | :ref:`exclude` | ``[]`` | -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`from` | ``Vector2(0, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`hit_from_inside` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`to` | ``Vector2(0, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`collision_mask` | ``4294967295`` | + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`RID[]` | :ref:`exclude` | ``[]`` | + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`from` | ``Vector2(0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`hit_from_inside` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`to` | ``Vector2(0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsRayQueryParameters2D` | :ref:`create` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask=4294967295, :ref:`RID[]` exclude=[] **)** |static| | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsRayQueryParameters2D` | :ref:`create` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask=4294967295, :ref:`RID[]` exclude=[] **)** |static| | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsRayQueryParameters2D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, the query will take :ref:`Area2D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters2D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, the query will take :ref:`PhysicsBody2D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters2D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4294967295`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters2D_property_exclude: -- :ref:`RID[]` **exclude** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_exclude(value) | -+-----------+--------------------+ -| *Getter* | get_exclude() | -+-----------+--------------------+ +:ref:`RID[]` **exclude** = ``[]`` -The list of objects or object :ref:`RID`\ s that will be excluded from collisions. +.. rst-class:: classref-property-setget + +- void **set_exclude** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude** **(** **)** + +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsRayQueryParameters2D_property_from: -- :ref:`Vector2` **from** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_from(value) | -+-----------+-------------------+ -| *Getter* | get_from() | -+-----------+-------------------+ +:ref:`Vector2` **from** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_from** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_from** **(** **)** The starting point of the ray being queried for, in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters2D_property_hit_from_inside: -- :ref:`bool` **hit_from_inside** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_hit_from_inside(value) | -+-----------+------------------------------+ -| *Getter* | is_hit_from_inside_enabled() | -+-----------+------------------------------+ +:ref:`bool` **hit_from_inside** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_hit_from_inside** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters2D_property_to: -- :ref:`Vector2` **to** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_to(value) | -+-----------+-------------------+ -| *Getter* | get_to() | -+-----------+-------------------+ +:ref:`Vector2` **to** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_to** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_to** **(** **)** The ending point of the ray being queried for, in global coordinates. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PhysicsRayQueryParameters2D_method_create: -- :ref:`PhysicsRayQueryParameters2D` **create** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask=4294967295, :ref:`RID[]` exclude=[] **)** |static| +.. rst-class:: classref-method -Returns a new, pre-configured ``PhysicsRayQueryParameters2D`` object. Use it to quickly create query parameters using the most common options. +:ref:`PhysicsRayQueryParameters2D` **create** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask=4294967295, :ref:`RID[]` exclude=[] **)** |static| + +Returns a new, pre-configured **PhysicsRayQueryParameters2D** object. Use it to quickly create query parameters using the most common options. :: diff --git a/classes/class_physicsrayqueryparameters3d.rst b/classes/class_physicsrayqueryparameters3d.rst index acd31a974..d7ce44742 100644 --- a/classes/class_physicsrayqueryparameters3d.rst +++ b/classes/class_physicsrayqueryparameters3d.rst @@ -14,176 +14,208 @@ PhysicsRayQueryParameters3D Parameters to be sent to a 3D ray physics query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the ray position and other parameters to be used for :ref:`PhysicsDirectSpaceState3D.intersect_ray`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`collision_mask` | ``4294967295`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Array` | :ref:`exclude` | ``[]`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`from` | ``Vector3(0, 0, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`hit_back_faces` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`hit_from_inside` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`to` | ``Vector3(0, 0, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`collision_mask` | ``4294967295`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`RID[]` | :ref:`exclude` | ``[]`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`from` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`hit_back_faces` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`hit_from_inside` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`to` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsRayQueryParameters3D` | :ref:`create` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask=4294967295, :ref:`Array` exclude=[] **)** |static| | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsRayQueryParameters3D` | :ref:`create` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask=4294967295, :ref:`RID[]` exclude=[] **)** |static| | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsRayQueryParameters3D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, the query will take :ref:`Area3D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters3D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, the query will take :ref:`PhysicsBody3D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4294967295`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters3D_property_exclude: -- :ref:`Array` **exclude** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_exclude(value) | -+-----------+--------------------+ -| *Getter* | get_exclude() | -+-----------+--------------------+ +:ref:`RID[]` **exclude** = ``[]`` -The list of objects or object :ref:`RID`\ s that will be excluded from collisions. +.. rst-class:: classref-property-setget + +- void **set_exclude** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude** **(** **)** + +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsRayQueryParameters3D_property_from: -- :ref:`Vector3` **from** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_from(value) | -+-----------+----------------------+ -| *Getter* | get_from() | -+-----------+----------------------+ +:ref:`Vector3` **from** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_from** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_from** **(** **)** The starting point of the ray being queried for, in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters3D_property_hit_back_faces: -- :ref:`bool` **hit_back_faces** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_hit_back_faces(value) | -+-----------+-----------------------------+ -| *Getter* | is_hit_back_faces_enabled() | -+-----------+-----------------------------+ +:ref:`bool` **hit_back_faces** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_hit_back_faces** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters3D_property_hit_from_inside: -- :ref:`bool` **hit_from_inside** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_hit_from_inside(value) | -+-----------+------------------------------+ -| *Getter* | is_hit_from_inside_enabled() | -+-----------+------------------------------+ +:ref:`bool` **hit_from_inside** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_hit_from_inside** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsRayQueryParameters3D_property_to: -- :ref:`Vector3` **to** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_to(value) | -+-----------+----------------------+ -| *Getter* | get_to() | -+-----------+----------------------+ +:ref:`Vector3` **to** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_to** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_to** **(** **)** The ending point of the ray being queried for, in global coordinates. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PhysicsRayQueryParameters3D_method_create: -- :ref:`PhysicsRayQueryParameters3D` **create** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask=4294967295, :ref:`Array` exclude=[] **)** |static| +.. rst-class:: classref-method -Returns a new, pre-configured ``PhysicsRayQueryParameters3D`` object. Use it to quickly create query parameters using the most common options. +:ref:`PhysicsRayQueryParameters3D` **create** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask=4294967295, :ref:`RID[]` exclude=[] **)** |static| + +Returns a new, pre-configured **PhysicsRayQueryParameters3D** object. Use it to quickly create query parameters using the most common options. :: diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 0d8d8a122..6fc44dec4 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -16,795 +16,1250 @@ PhysicsServer2D Server interface for low-level 2D physics access. +.. rst-class:: classref-introduction-group + Description ----------- PhysicsServer2D is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_attach_canvas_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_canvas_instance_id` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_collision_layer` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_collision_mask` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_object_instance_id` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`area_get_transform` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Transform2D` transform **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_torque` **(** :ref:`RID` body, :ref:`float` torque **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`float` impulse **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_attach_canvas_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_canvas_instance_id` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_collision_layer` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`body_get_collision_priority` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`body_get_constant_force` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`body_get_constant_torque` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CCDMode` | :ref:`body_get_continuous_collision_detection_mode` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectBodyState2D` | :ref:`body_get_direct_state` **(** :ref:`RID` body **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BodyMode` | :ref:`body_get_mode` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_object_instance_id` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_reset_mass_properties` **(** :ref:`RID` body **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`CCDMode` mode **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape_as_one_way_collision` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_test_motion` **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters2D` parameters, :ref:`PhysicsTestMotionResult2D` result=null **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`capsule_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`circle_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`concave_polygon_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`convex_polygon_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`damped_spring_joint_get_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`damped_spring_joint_set_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_process_info` **(** :ref:`ProcessInfo` process_info **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_clear` **(** :ref:`RID` joint **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`joint_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`joint_get_param` **(** :ref:`RID` joint, :ref:`JointParam` param **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`JointType` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_damped_spring` **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_groove` **(** :ref:`RID` joint, :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_pin` **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_set_param` **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`rectangle_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`segment_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`separation_ray_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_active` **(** :ref:`bool` active **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`shape_get_data` **(** :ref:`RID` shape **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ShapeType` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`space_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState2D` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`world_boundary_shape_create` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_attach_canvas_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`area_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_canvas_instance_id` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_collision_layer` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_collision_mask` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_object_instance_id` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`area_get_transform` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Transform2D` transform **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_torque` **(** :ref:`RID` body, :ref:`float` torque **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`float` impulse **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_attach_canvas_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`body_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_canvas_instance_id` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_collision_layer` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`body_get_collision_priority` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`body_get_constant_force` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`body_get_constant_torque` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CCDMode` | :ref:`body_get_continuous_collision_detection_mode` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState2D` | :ref:`body_get_direct_state` **(** :ref:`RID` body **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`body_get_mode` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_object_instance_id` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_reset_mass_properties` **(** :ref:`RID` body **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`CCDMode` mode **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_shape_as_one_way_collision` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion` **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters2D` parameters, :ref:`PhysicsTestMotionResult2D` result=null **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`capsule_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`circle_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`concave_polygon_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`convex_polygon_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`damped_spring_joint_get_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`damped_spring_joint_set_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_process_info` **(** :ref:`ProcessInfo` process_info **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_clear` **(** :ref:`RID` joint **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`joint_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`joint_get_param` **(** :ref:`RID` joint, :ref:`JointParam` param **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_damped_spring` **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_groove` **(** :ref:`RID` joint, :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_pin` **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_set_param` **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`rectangle_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`segment_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`separation_ray_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_active` **(** :ref:`bool` active **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`shape_get_data` **(** :ref:`RID` shape **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`space_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`world_boundary_shape_create` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PhysicsServer2D_SpaceParameter: -.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_MAX_SEPARATION: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_DEFAULT_BIAS: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_BODY_TIME_TO_SLEEP: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: - -.. _class_PhysicsServer2D_constant_SPACE_PARAM_SOLVER_ITERATIONS: +.. rst-class:: classref-enumeration enum **SpaceParameter**: -- **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. +.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS: -- **SPACE_PARAM_CONTACT_MAX_SEPARATION** = **1** --- Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. +.. rst-class:: classref-enumeration-constant -- **SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION** = **2** --- Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = ``0`` -- **SPACE_PARAM_CONTACT_DEFAULT_BIAS** = **3** --- Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. +Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. -- **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **4** --- Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. +.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_MAX_SEPARATION: -- **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **5** --- Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. +.. rst-class:: classref-enumeration-constant -- **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **6** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_MAX_SEPARATION** = ``1`` -- **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **7** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. +Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. -- **SPACE_PARAM_SOLVER_ITERATIONS** = **8** --- Constant to set/get the 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. +.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION** = ``2`` + +Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + +.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_DEFAULT_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_DEFAULT_BIAS** = ``3`` + +Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. + +.. _class_PhysicsServer2D_constant_SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = ``4`` + +Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + +.. _class_PhysicsServer2D_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = ``5`` + +Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + +.. _class_PhysicsServer2D_constant_SPACE_PARAM_BODY_TIME_TO_SLEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_BODY_TIME_TO_SLEEP** = ``6`` + +Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + +.. _class_PhysicsServer2D_constant_SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = ``7`` + +Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. + +.. _class_PhysicsServer2D_constant_SPACE_PARAM_SOLVER_ITERATIONS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_SOLVER_ITERATIONS** = ``8`` + +Constant to set/get the 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. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_ShapeType: -.. _class_PhysicsServer2D_constant_SHAPE_WORLD_BOUNDARY: - -.. _class_PhysicsServer2D_constant_SHAPE_SEPARATION_RAY: - -.. _class_PhysicsServer2D_constant_SHAPE_SEGMENT: - -.. _class_PhysicsServer2D_constant_SHAPE_CIRCLE: - -.. _class_PhysicsServer2D_constant_SHAPE_RECTANGLE: - -.. _class_PhysicsServer2D_constant_SHAPE_CAPSULE: - -.. _class_PhysicsServer2D_constant_SHAPE_CONVEX_POLYGON: - -.. _class_PhysicsServer2D_constant_SHAPE_CONCAVE_POLYGON: - -.. _class_PhysicsServer2D_constant_SHAPE_CUSTOM: +.. rst-class:: classref-enumeration enum **ShapeType**: -- **SHAPE_WORLD_BOUNDARY** = **0** --- This is the constant for creating world boundary shapes. A world boundary shape is an *infinite* line with an origin point, and a normal. Thus, it can be used for front/behind checks. +.. _class_PhysicsServer2D_constant_SHAPE_WORLD_BOUNDARY: -- **SHAPE_SEPARATION_RAY** = **1** --- This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers. +.. rst-class:: classref-enumeration-constant -- **SHAPE_SEGMENT** = **2** --- This is the constant for creating segment shapes. A segment shape is a *finite* line from a point A to a point B. It can be checked for intersections. +:ref:`ShapeType` **SHAPE_WORLD_BOUNDARY** = ``0`` -- **SHAPE_CIRCLE** = **3** --- This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. +This is the constant for creating world boundary shapes. A world boundary shape is an *infinite* line with an origin point, and a normal. Thus, it can be used for front/behind checks. -- **SHAPE_RECTANGLE** = **4** --- This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. +.. _class_PhysicsServer2D_constant_SHAPE_SEPARATION_RAY: -- **SHAPE_CAPSULE** = **5** --- This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. +.. rst-class:: classref-enumeration-constant -- **SHAPE_CONVEX_POLYGON** = **6** --- This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the :ref:`CollisionPolygon2D.polygon` property, polygons modified with :ref:`shape_set_data` do not verify that the points supplied form is a convex polygon. +:ref:`ShapeType` **SHAPE_SEPARATION_RAY** = ``1`` -- **SHAPE_CONCAVE_POLYGON** = **7** --- This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. +This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers. -- **SHAPE_CUSTOM** = **8** --- This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. +.. _class_PhysicsServer2D_constant_SHAPE_SEGMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_SEGMENT** = ``2`` + +This is the constant for creating segment shapes. A segment shape is a *finite* line from a point A to a point B. It can be checked for intersections. + +.. _class_PhysicsServer2D_constant_SHAPE_CIRCLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CIRCLE** = ``3`` + +This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. + +.. _class_PhysicsServer2D_constant_SHAPE_RECTANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_RECTANGLE** = ``4`` + +This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. + +.. _class_PhysicsServer2D_constant_SHAPE_CAPSULE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CAPSULE** = ``5`` + +This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. + +.. _class_PhysicsServer2D_constant_SHAPE_CONVEX_POLYGON: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CONVEX_POLYGON** = ``6`` + +This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the :ref:`CollisionPolygon2D.polygon` property, polygons modified with :ref:`shape_set_data` do not verify that the points supplied form is a convex polygon. + +.. _class_PhysicsServer2D_constant_SHAPE_CONCAVE_POLYGON: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CONCAVE_POLYGON** = ``7`` + +This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. + +.. _class_PhysicsServer2D_constant_SHAPE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CUSTOM** = ``8`` + +This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_AreaParameter: -.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_OVERRIDE_MODE: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_VECTOR: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_IS_POINT: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_POINT_ATTENUATION: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_LINEAR_DAMP: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_ANGULAR_DAMP: - -.. _class_PhysicsServer2D_constant_AREA_PARAM_PRIORITY: +.. rst-class:: classref-enumeration enum **AreaParameter**: -- **AREA_PARAM_GRAVITY_OVERRIDE_MODE** = **0** --- Constant to set/get gravity override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. +.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_OVERRIDE_MODE: -- **AREA_PARAM_GRAVITY** = **1** --- Constant to set/get gravity strength in an area. +.. rst-class:: classref-enumeration-constant -- **AREA_PARAM_GRAVITY_VECTOR** = **2** --- Constant to set/get gravity vector/center in an area. +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_OVERRIDE_MODE** = ``0`` -- **AREA_PARAM_GRAVITY_IS_POINT** = **3** --- Constant to set/get whether the gravity vector of an area is a direction, or a center point. +Constant to set/get gravity override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. -- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **4** --- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. +.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY: -- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **5** --- This constant was used to set/get the falloff factor for point gravity. It has been superseded by :ref:`AREA_PARAM_GRAVITY_DISTANCE_SCALE`. +.. rst-class:: classref-enumeration-constant -- **AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE** = **6** --- Constant to set/get linear damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. +:ref:`AreaParameter` **AREA_PARAM_GRAVITY** = ``1`` -- **AREA_PARAM_LINEAR_DAMP** = **7** --- Constant to set/get the linear damping factor of an area. +Constant to set/get gravity strength in an area. -- **AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE** = **8** --- Constant to set/get angular damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. +.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_VECTOR: -- **AREA_PARAM_ANGULAR_DAMP** = **9** --- Constant to set/get the angular damping factor of an area. +.. rst-class:: classref-enumeration-constant -- **AREA_PARAM_PRIORITY** = **10** --- Constant to set/get the priority (order of processing) of an area. +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_VECTOR** = ``2`` + +Constant to set/get gravity vector/center in an area. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_IS_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_IS_POINT** = ``3`` + +Constant to set/get whether the gravity vector of an area is a direction, or a center point. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = ``4`` + +Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_POINT_ATTENUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = ``5`` + +This constant was used to set/get the falloff factor for point gravity. It has been superseded by :ref:`AREA_PARAM_GRAVITY_DISTANCE_SCALE`. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE** = ``6`` + +Constant to set/get linear damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_LINEAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_LINEAR_DAMP** = ``7`` + +Constant to set/get the linear damping factor of an area. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE** = ``8`` + +Constant to set/get angular damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_ANGULAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_ANGULAR_DAMP** = ``9`` + +Constant to set/get the angular damping factor of an area. + +.. _class_PhysicsServer2D_constant_AREA_PARAM_PRIORITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_PRIORITY** = ``10`` + +Constant to set/get the priority (order of processing) of an area. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_AreaSpaceOverrideMode: -.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_DISABLED: - -.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_COMBINE: - -.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_COMBINE_REPLACE: - -.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_REPLACE: - -.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_REPLACE_COMBINE: +.. rst-class:: classref-enumeration enum **AreaSpaceOverrideMode**: -- **AREA_SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. +.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_DISABLED: -- **AREA_SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. +.. rst-class:: classref-enumeration-constant -- **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_DISABLED** = ``0`` -- **AREA_SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. +This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. -- **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. +.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_COMBINE** = ``1`` + +This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + +.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_COMBINE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = ``2`` + +This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + +.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_REPLACE** = ``3`` + +This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + +.. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_REPLACE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = ``4`` + +This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_BodyMode: -.. _class_PhysicsServer2D_constant_BODY_MODE_STATIC: - -.. _class_PhysicsServer2D_constant_BODY_MODE_KINEMATIC: - -.. _class_PhysicsServer2D_constant_BODY_MODE_RIGID: - -.. _class_PhysicsServer2D_constant_BODY_MODE_RIGID_LINEAR: +.. rst-class:: classref-enumeration enum **BodyMode**: -- **BODY_MODE_STATIC** = **0** --- Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. +.. _class_PhysicsServer2D_constant_BODY_MODE_STATIC: -- **BODY_MODE_KINEMATIC** = **1** --- Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. +.. rst-class:: classref-enumeration-constant -- **BODY_MODE_RIGID** = **2** --- Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. +:ref:`BodyMode` **BODY_MODE_STATIC** = ``0`` -- **BODY_MODE_RIGID_LINEAR** = **3** --- Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. +Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. + +.. _class_PhysicsServer2D_constant_BODY_MODE_KINEMATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyMode` **BODY_MODE_KINEMATIC** = ``1`` + +Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. + +.. _class_PhysicsServer2D_constant_BODY_MODE_RIGID: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyMode` **BODY_MODE_RIGID** = ``2`` + +Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. + +.. _class_PhysicsServer2D_constant_BODY_MODE_RIGID_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyMode` **BODY_MODE_RIGID_LINEAR** = ``3`` + +Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_BodyParameter: -.. _class_PhysicsServer2D_constant_BODY_PARAM_BOUNCE: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_FRICTION: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_MASS: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_INERTIA: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_CENTER_OF_MASS: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_GRAVITY_SCALE: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_LINEAR_DAMP_MODE: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_ANGULAR_DAMP_MODE: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_LINEAR_DAMP: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_ANGULAR_DAMP: - -.. _class_PhysicsServer2D_constant_BODY_PARAM_MAX: +.. rst-class:: classref-enumeration enum **BodyParameter**: -- **BODY_PARAM_BOUNCE** = **0** --- Constant to set/get a body's bounce factor. +.. _class_PhysicsServer2D_constant_BODY_PARAM_BOUNCE: -- **BODY_PARAM_FRICTION** = **1** --- Constant to set/get a body's friction. +.. rst-class:: classref-enumeration-constant -- **BODY_PARAM_MASS** = **2** --- Constant to set/get a body's mass. +:ref:`BodyParameter` **BODY_PARAM_BOUNCE** = ``0`` -- **BODY_PARAM_INERTIA** = **3** --- Constant to set/get a body's inertia. +Constant to set/get a body's bounce factor. -- **BODY_PARAM_CENTER_OF_MASS** = **4** --- Constant to set/get a body's center of mass position in the body's local coordinate system. +.. _class_PhysicsServer2D_constant_BODY_PARAM_FRICTION: -- **BODY_PARAM_GRAVITY_SCALE** = **5** --- Constant to set/get a body's gravity multiplier. +.. rst-class:: classref-enumeration-constant -- **BODY_PARAM_LINEAR_DAMP_MODE** = **6** --- Constant to set/get a body's linear dampening mode. See :ref:`BodyDampMode` for possible values. +:ref:`BodyParameter` **BODY_PARAM_FRICTION** = ``1`` -- **BODY_PARAM_ANGULAR_DAMP_MODE** = **7** --- Constant to set/get a body's angular dampening mode. See :ref:`BodyDampMode` for possible values. +Constant to set/get a body's friction. -- **BODY_PARAM_LINEAR_DAMP** = **8** --- Constant to set/get a body's linear dampening factor. +.. _class_PhysicsServer2D_constant_BODY_PARAM_MASS: -- **BODY_PARAM_ANGULAR_DAMP** = **9** --- Constant to set/get a body's angular dampening factor. +.. rst-class:: classref-enumeration-constant -- **BODY_PARAM_MAX** = **10** --- Represents the size of the :ref:`BodyParameter` enum. +:ref:`BodyParameter` **BODY_PARAM_MASS** = ``2`` + +Constant to set/get a body's mass. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_INERTIA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_INERTIA** = ``3`` + +Constant to set/get a body's inertia. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_CENTER_OF_MASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_CENTER_OF_MASS** = ``4`` + +Constant to set/get a body's center of mass position in the body's local coordinate system. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_GRAVITY_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_GRAVITY_SCALE** = ``5`` + +Constant to set/get a body's gravity multiplier. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_LINEAR_DAMP_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_LINEAR_DAMP_MODE** = ``6`` + +Constant to set/get a body's linear dampening mode. See :ref:`BodyDampMode` for possible values. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_ANGULAR_DAMP_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_ANGULAR_DAMP_MODE** = ``7`` + +Constant to set/get a body's angular dampening mode. See :ref:`BodyDampMode` for possible values. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_LINEAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_LINEAR_DAMP** = ``8`` + +Constant to set/get a body's linear dampening factor. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_ANGULAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_ANGULAR_DAMP** = ``9`` + +Constant to set/get a body's angular dampening factor. + +.. _class_PhysicsServer2D_constant_BODY_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_MAX** = ``10`` + +Represents the size of the :ref:`BodyParameter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_BodyDampMode: -.. _class_PhysicsServer2D_constant_BODY_DAMP_MODE_COMBINE: - -.. _class_PhysicsServer2D_constant_BODY_DAMP_MODE_REPLACE: +.. rst-class:: classref-enumeration enum **BodyDampMode**: -- **BODY_DAMP_MODE_COMBINE** = **0** --- The body's damping value is added to any value set in areas or the default value. +.. _class_PhysicsServer2D_constant_BODY_DAMP_MODE_COMBINE: -- **BODY_DAMP_MODE_REPLACE** = **1** --- The body's damping value replaces any value set in areas or the default value. +.. rst-class:: classref-enumeration-constant + +:ref:`BodyDampMode` **BODY_DAMP_MODE_COMBINE** = ``0`` + +The body's damping value is added to any value set in areas or the default value. + +.. _class_PhysicsServer2D_constant_BODY_DAMP_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyDampMode` **BODY_DAMP_MODE_REPLACE** = ``1`` + +The body's damping value replaces any value set in areas or the default value. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_BodyState: -.. _class_PhysicsServer2D_constant_BODY_STATE_TRANSFORM: - -.. _class_PhysicsServer2D_constant_BODY_STATE_LINEAR_VELOCITY: - -.. _class_PhysicsServer2D_constant_BODY_STATE_ANGULAR_VELOCITY: - -.. _class_PhysicsServer2D_constant_BODY_STATE_SLEEPING: - -.. _class_PhysicsServer2D_constant_BODY_STATE_CAN_SLEEP: +.. rst-class:: classref-enumeration enum **BodyState**: -- **BODY_STATE_TRANSFORM** = **0** --- Constant to set/get the current transform matrix of the body. +.. _class_PhysicsServer2D_constant_BODY_STATE_TRANSFORM: -- **BODY_STATE_LINEAR_VELOCITY** = **1** --- Constant to set/get the current linear velocity of the body. +.. rst-class:: classref-enumeration-constant -- **BODY_STATE_ANGULAR_VELOCITY** = **2** --- Constant to set/get the current angular velocity of the body. +:ref:`BodyState` **BODY_STATE_TRANSFORM** = ``0`` -- **BODY_STATE_SLEEPING** = **3** --- Constant to sleep/wake up a body, or to get whether it is sleeping. +Constant to set/get the current transform matrix of the body. -- **BODY_STATE_CAN_SLEEP** = **4** --- Constant to set/get whether the body can sleep. +.. _class_PhysicsServer2D_constant_BODY_STATE_LINEAR_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_LINEAR_VELOCITY** = ``1`` + +Constant to set/get the current linear velocity of the body. + +.. _class_PhysicsServer2D_constant_BODY_STATE_ANGULAR_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_ANGULAR_VELOCITY** = ``2`` + +Constant to set/get the current angular velocity of the body. + +.. _class_PhysicsServer2D_constant_BODY_STATE_SLEEPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_SLEEPING** = ``3`` + +Constant to sleep/wake up a body, or to get whether it is sleeping. + +.. _class_PhysicsServer2D_constant_BODY_STATE_CAN_SLEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_CAN_SLEEP** = ``4`` + +Constant to set/get whether the body can sleep. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_JointType: -.. _class_PhysicsServer2D_constant_JOINT_TYPE_PIN: - -.. _class_PhysicsServer2D_constant_JOINT_TYPE_GROOVE: - -.. _class_PhysicsServer2D_constant_JOINT_TYPE_DAMPED_SPRING: - -.. _class_PhysicsServer2D_constant_JOINT_TYPE_MAX: +.. rst-class:: classref-enumeration enum **JointType**: -- **JOINT_TYPE_PIN** = **0** --- Constant to create pin joints. +.. _class_PhysicsServer2D_constant_JOINT_TYPE_PIN: -- **JOINT_TYPE_GROOVE** = **1** --- Constant to create groove joints. +.. rst-class:: classref-enumeration-constant -- **JOINT_TYPE_DAMPED_SPRING** = **2** --- Constant to create damped spring joints. +:ref:`JointType` **JOINT_TYPE_PIN** = ``0`` -- **JOINT_TYPE_MAX** = **3** --- Represents the size of the :ref:`JointType` enum. +Constant to create pin joints. + +.. _class_PhysicsServer2D_constant_JOINT_TYPE_GROOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_GROOVE** = ``1`` + +Constant to create groove joints. + +.. _class_PhysicsServer2D_constant_JOINT_TYPE_DAMPED_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_DAMPED_SPRING** = ``2`` + +Constant to create damped spring joints. + +.. _class_PhysicsServer2D_constant_JOINT_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_MAX** = ``3`` + +Represents the size of the :ref:`JointType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_JointParam: -.. _class_PhysicsServer2D_constant_JOINT_PARAM_BIAS: - -.. _class_PhysicsServer2D_constant_JOINT_PARAM_MAX_BIAS: - -.. _class_PhysicsServer2D_constant_JOINT_PARAM_MAX_FORCE: +.. rst-class:: classref-enumeration enum **JointParam**: -- **JOINT_PARAM_BIAS** = **0** +.. _class_PhysicsServer2D_constant_JOINT_PARAM_BIAS: -- **JOINT_PARAM_MAX_BIAS** = **1** +.. rst-class:: classref-enumeration-constant -- **JOINT_PARAM_MAX_FORCE** = **2** +:ref:`JointParam` **JOINT_PARAM_BIAS** = ``0`` + + + +.. _class_PhysicsServer2D_constant_JOINT_PARAM_MAX_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointParam` **JOINT_PARAM_MAX_BIAS** = ``1`` + + + +.. _class_PhysicsServer2D_constant_JOINT_PARAM_MAX_FORCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointParam` **JOINT_PARAM_MAX_FORCE** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_PinJointParam: -.. _class_PhysicsServer2D_constant_PIN_JOINT_SOFTNESS: +.. rst-class:: classref-enumeration enum **PinJointParam**: -- **PIN_JOINT_SOFTNESS** = **0** +.. _class_PhysicsServer2D_constant_PIN_JOINT_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam` **PIN_JOINT_SOFTNESS** = ``0`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_DampedSpringParam: -.. _class_PhysicsServer2D_constant_DAMPED_SPRING_REST_LENGTH: - -.. _class_PhysicsServer2D_constant_DAMPED_SPRING_STIFFNESS: - -.. _class_PhysicsServer2D_constant_DAMPED_SPRING_DAMPING: +.. rst-class:: classref-enumeration enum **DampedSpringParam**: -- **DAMPED_SPRING_REST_LENGTH** = **0** --- Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. +.. _class_PhysicsServer2D_constant_DAMPED_SPRING_REST_LENGTH: -- **DAMPED_SPRING_STIFFNESS** = **1** --- Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. +.. rst-class:: classref-enumeration-constant -- **DAMPED_SPRING_DAMPING** = **2** --- Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). +:ref:`DampedSpringParam` **DAMPED_SPRING_REST_LENGTH** = ``0`` + +Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + +.. _class_PhysicsServer2D_constant_DAMPED_SPRING_STIFFNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DampedSpringParam` **DAMPED_SPRING_STIFFNESS** = ``1`` + +Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. + +.. _class_PhysicsServer2D_constant_DAMPED_SPRING_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`DampedSpringParam` **DAMPED_SPRING_DAMPING** = ``2`` + +Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_CCDMode: -.. _class_PhysicsServer2D_constant_CCD_MODE_DISABLED: - -.. _class_PhysicsServer2D_constant_CCD_MODE_CAST_RAY: - -.. _class_PhysicsServer2D_constant_CCD_MODE_CAST_SHAPE: +.. rst-class:: classref-enumeration enum **CCDMode**: -- **CCD_MODE_DISABLED** = **0** --- Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. +.. _class_PhysicsServer2D_constant_CCD_MODE_DISABLED: -- **CCD_MODE_CAST_RAY** = **1** --- Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. +.. rst-class:: classref-enumeration-constant -- **CCD_MODE_CAST_SHAPE** = **2** --- Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. +:ref:`CCDMode` **CCD_MODE_DISABLED** = ``0`` + +Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + +.. _class_PhysicsServer2D_constant_CCD_MODE_CAST_RAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CCDMode` **CCD_MODE_CAST_RAY** = ``1`` + +Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. + +.. _class_PhysicsServer2D_constant_CCD_MODE_CAST_SHAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CCDMode` **CCD_MODE_CAST_SHAPE** = ``2`` + +Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_AreaBodyStatus: -.. _class_PhysicsServer2D_constant_AREA_BODY_ADDED: - -.. _class_PhysicsServer2D_constant_AREA_BODY_REMOVED: +.. rst-class:: classref-enumeration enum **AreaBodyStatus**: -- **AREA_BODY_ADDED** = **0** --- The value of the first parameter and area callback function receives, when an object enters one of its shapes. +.. _class_PhysicsServer2D_constant_AREA_BODY_ADDED: -- **AREA_BODY_REMOVED** = **1** --- The value of the first parameter and area callback function receives, when an object exits one of its shapes. +.. rst-class:: classref-enumeration-constant + +:ref:`AreaBodyStatus` **AREA_BODY_ADDED** = ``0`` + +The value of the first parameter and area callback function receives, when an object enters one of its shapes. + +.. _class_PhysicsServer2D_constant_AREA_BODY_REMOVED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaBodyStatus` **AREA_BODY_REMOVED** = ``1`` + +The value of the first parameter and area callback function receives, when an object exits one of its shapes. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer2D_ProcessInfo: -.. _class_PhysicsServer2D_constant_INFO_ACTIVE_OBJECTS: - -.. _class_PhysicsServer2D_constant_INFO_COLLISION_PAIRS: - -.. _class_PhysicsServer2D_constant_INFO_ISLAND_COUNT: +.. rst-class:: classref-enumeration enum **ProcessInfo**: -- **INFO_ACTIVE_OBJECTS** = **0** --- Constant to get the number of objects that are not sleeping. +.. _class_PhysicsServer2D_constant_INFO_ACTIVE_OBJECTS: -- **INFO_COLLISION_PAIRS** = **1** --- Constant to get the number of possible collisions. +.. rst-class:: classref-enumeration-constant -- **INFO_ISLAND_COUNT** = **2** --- Constant to get the number of space regions where a collision could occur. +:ref:`ProcessInfo` **INFO_ACTIVE_OBJECTS** = ``0`` + +Constant to get the number of objects that are not sleeping. + +.. _class_PhysicsServer2D_constant_INFO_COLLISION_PAIRS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessInfo` **INFO_COLLISION_PAIRS** = ``1`` + +Constant to get the number of possible collisions. + +.. _class_PhysicsServer2D_constant_INFO_ISLAND_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessInfo` **INFO_ISLAND_COUNT** = ``2`` + +Constant to get the number of space regions where a collision could occur. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsServer2D_method_area_add_shape: -- void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** +.. rst-class:: classref-method + +void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_attach_canvas_instance_id: -- void **area_attach_canvas_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** +.. rst-class:: classref-method + +void **area_attach_canvas_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_attach_object_instance_id: -- void **area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** +.. rst-class:: classref-method + +void **area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_clear_shapes: -- void **area_clear_shapes** **(** :ref:`RID` area **)** +.. rst-class:: classref-method + +void **area_clear_shapes** **(** :ref:`RID` area **)** Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_create: -- :ref:`RID` **area_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **area_create** **(** **)** Creates an :ref:`Area2D`. After creating an :ref:`Area2D` with this method, assign it to a space using :ref:`area_set_space` to use the created :ref:`Area2D` in the physics world. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_canvas_instance_id: -- :ref:`int` **area_get_canvas_instance_id** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_canvas_instance_id** **(** :ref:`RID` area **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_collision_layer: -- :ref:`int` **area_get_collision_layer** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_collision_layer** **(** :ref:`RID` area **)** |const| Returns the physics layer or layers an area belongs to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_collision_mask: -- :ref:`int` **area_get_collision_mask** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_collision_mask** **(** :ref:`RID` area **)** |const| Returns the physics layer or layers an area can contact with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_object_instance_id: -- :ref:`int` **area_get_object_instance_id** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_object_instance_id** **(** :ref:`RID` area **)** |const| Gets the instance ID of the object the area is assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_param: -- :ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| Returns an area parameter value. See :ref:`AreaParameter` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_shape: -- :ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| Returns the :ref:`RID` of the nth shape of an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_shape_count: -- :ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** |const| Returns the number of shapes assigned to an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_shape_transform: -- :ref:`Transform2D` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| Returns the transform matrix of a shape within an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_space: -- :ref:`RID` **area_get_space** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **area_get_space** **(** :ref:`RID` area **)** |const| Returns the space assigned to the area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_get_transform: -- :ref:`Transform2D` **area_get_transform** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **area_get_transform** **(** :ref:`RID` area **)** |const| Returns the transform matrix for an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_remove_shape: -- void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** +.. rst-class:: classref-method + +void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** Removes a shape from an area. It does not delete the shape, so it can be reassigned later. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_area_monitor_callback: -- void **area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** +.. rst-class:: classref-method + +void **area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_collision_layer: -- void **area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** +.. rst-class:: classref-method + +void **area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** Assigns the area to one or many physics layers. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_collision_mask: -- void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** Sets which physics layers the area will monitor. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_monitor_callback: -- void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** +.. rst-class:: classref-method + +void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: @@ -818,123 +1273,179 @@ Sets the function to call when any body/area enters or exits the area. This call 5: The shape index of the area where the object entered/exited. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_monitorable: -- void **area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** +.. rst-class:: classref-method + +void **area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_param: -- void **area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** Sets the value for an area parameter. See :ref:`AreaParameter` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_shape: -- void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** +.. rst-class:: classref-method + +void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** Substitutes a given area shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_shape_disabled: -- void **area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** Disables a given shape in an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_shape_transform: -- void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** Sets the transform matrix for an area shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_space: -- void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** +.. rst-class:: classref-method + +void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** Assigns a space to the area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_area_set_transform: -- void **area_set_transform** **(** :ref:`RID` area, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **area_set_transform** **(** :ref:`RID` area, :ref:`Transform2D` transform **)** Sets the transform matrix for an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_add_collision_exception: -- void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** +.. rst-class:: classref-method + +void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** Adds a body to the list of bodies exempt from collisions. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_add_constant_central_force: -- void **body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** +.. rst-class:: classref-method + +void **body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``body_set_constant_force(body, Vector2(0, 0))``. This is equivalent to using :ref:`body_add_constant_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_add_constant_force: -- void **body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** Adds a constant positioned force to the body that keeps being applied over time until cleared with ``body_set_constant_force(body, Vector2(0, 0))``. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_add_constant_torque: -- void **body_add_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** +.. rst-class:: classref-method + +void **body_add_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``body_set_constant_torque(body, 0)``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_add_shape: -- void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** +.. rst-class:: classref-method + +void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool` disabled=false **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_apply_central_force: -- void **body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** +.. rst-class:: classref-method + +void **body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using :ref:`body_apply_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_apply_central_impulse: -- void **body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse **)** +.. rst-class:: classref-method + +void **body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse **)** Applies a directional impulse without affecting rotation. @@ -942,21 +1453,29 @@ An impulse is time-independent! Applying an impulse every frame would result in This is equivalent to using :ref:`body_apply_impulse` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_apply_force: -- void **body_apply_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **body_apply_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_apply_impulse: -- void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** Applies a positioned impulse to the body. @@ -964,299 +1483,439 @@ An impulse is time-independent! Applying an impulse every frame would result in \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_apply_torque: -- void **body_apply_torque** **(** :ref:`RID` body, :ref:`float` torque **)** +.. rst-class:: classref-method + +void **body_apply_torque** **(** :ref:`RID` body, :ref:`float` torque **)** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_apply_torque_impulse: -- void **body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`float` impulse **)** +.. rst-class:: classref-method + +void **body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`float` impulse **)** Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_attach_canvas_instance_id: -- void **body_attach_canvas_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** +.. rst-class:: classref-method + +void **body_attach_canvas_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_attach_object_instance_id: -- void **body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** +.. rst-class:: classref-method + +void **body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_clear_shapes: -- void **body_clear_shapes** **(** :ref:`RID` body **)** +.. rst-class:: classref-method + +void **body_clear_shapes** **(** :ref:`RID` body **)** Removes all shapes from a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_create: -- :ref:`RID` **body_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **body_create** **(** **)** Creates a physics body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_canvas_instance_id: -- :ref:`int` **body_get_canvas_instance_id** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_canvas_instance_id** **(** :ref:`RID` body **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_collision_layer: -- :ref:`int` **body_get_collision_layer** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_collision_layer** **(** :ref:`RID` body **)** |const| Returns the physics layer or layers a body belongs to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_collision_mask: -- :ref:`int` **body_get_collision_mask** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_collision_mask** **(** :ref:`RID` body **)** |const| Returns the physics layer or layers a body can collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_collision_priority: -- :ref:`float` **body_get_collision_priority** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`float` **body_get_collision_priority** **(** :ref:`RID` body **)** |const| Returns the body's collision priority. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_constant_force: -- :ref:`Vector2` **body_get_constant_force** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **body_get_constant_force** **(** :ref:`RID` body **)** |const| Returns the body's total constant positional forces applied during each physics update. See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_constant_torque: -- :ref:`float` **body_get_constant_torque** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`float` **body_get_constant_torque** **(** :ref:`RID` body **)** |const| Returns the body's total constant rotational forces applied during each physics update. See :ref:`body_add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_continuous_collision_detection_mode: -- :ref:`CCDMode` **body_get_continuous_collision_detection_mode** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`CCDMode` **body_get_continuous_collision_detection_mode** **(** :ref:`RID` body **)** |const| Returns the continuous collision detection mode. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_direct_state: -- :ref:`PhysicsDirectBodyState2D` **body_get_direct_state** **(** :ref:`RID` body **)** +.. rst-class:: classref-method + +:ref:`PhysicsDirectBodyState2D` **body_get_direct_state** **(** :ref:`RID` body **)** Returns the :ref:`PhysicsDirectBodyState2D` of the body. Returns ``null`` if the body is destroyed or removed from the physics space. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_max_contacts_reported: -- :ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** |const| Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_mode: -- :ref:`BodyMode` **body_get_mode** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`BodyMode` **body_get_mode** **(** :ref:`RID` body **)** |const| Returns the body mode. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_object_instance_id: -- :ref:`int` **body_get_object_instance_id** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_object_instance_id** **(** :ref:`RID` body **)** |const| Gets the instance ID of the object the area is assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_param: -- :ref:`Variant` **body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| Returns the value of a body parameter. See :ref:`BodyParameter` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_shape: -- :ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| Returns the :ref:`RID` of the nth shape of a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_shape_count: -- :ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** |const| Returns the number of shapes assigned to a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_shape_transform: -- :ref:`Transform2D` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| Returns the transform matrix of a body shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_space: -- :ref:`RID` **body_get_space** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **body_get_space** **(** :ref:`RID` body **)** |const| Returns the :ref:`RID` of the space assigned to a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_get_state: -- :ref:`Variant` **body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| Returns a body state. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_is_omitting_force_integration: -- :ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** |const| Returns whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_remove_collision_exception: -- void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** +.. rst-class:: classref-method + +void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** Removes a body from the list of bodies exempt from collisions. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_remove_shape: -- void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** +.. rst-class:: classref-method + +void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_reset_mass_properties: -- void **body_reset_mass_properties** **(** :ref:`RID` body **)** +.. rst-class:: classref-method + +void **body_reset_mass_properties** **(** :ref:`RID` body **)** Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using :ref:`body_set_param`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_axis_velocity: -- void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** +.. rst-class:: classref-method + +void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector2` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_collision_layer: -- void **body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** +.. rst-class:: classref-method + +void **body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** Sets the physics layer or layers a body belongs to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_collision_mask: -- void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** Sets the physics layer or layers a body can collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_collision_priority: -- void **body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** +.. rst-class:: classref-method + +void **body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** Sets the body's collision priority. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_constant_force: -- void **body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** +.. rst-class:: classref-method + +void **body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** Sets the body's total constant positional forces applied during each physics update. See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_constant_torque: -- void **body_set_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** +.. rst-class:: classref-method + +void **body_set_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** Sets the body's total constant rotational forces applied during each physics update. See :ref:`body_add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_continuous_collision_detection_mode: -- void **body_set_continuous_collision_detection_mode** **(** :ref:`RID` body, :ref:`CCDMode` mode **)** +.. rst-class:: classref-method + +void **body_set_continuous_collision_detection_mode** **(** :ref:`RID` body, :ref:`CCDMode` mode **)** Sets the continuous collision detection mode using one of the :ref:`CCDMode` constants. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_force_integration_callback: -- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** +.. rst-class:: classref-method + +void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** Sets the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force_integration`). @@ -1266,357 +1925,521 @@ The force integration function takes 2 arguments: \ ``userdata:`` Optional user data, if it was passed when calling ``body_set_force_integration_callback``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_max_contacts_reported: -- void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** +.. rst-class:: classref-method + +void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_mode: -- void **body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** +.. rst-class:: classref-method + +void **body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** Sets the body mode using one of the :ref:`BodyMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_omit_force_integration: -- void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** Sets whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_param: -- void **body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** Sets a body parameter. See :ref:`BodyParameter` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_shape: -- void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** +.. rst-class:: classref-method + +void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** Substitutes a given body shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_shape_as_one_way_collision: -- void **body_set_shape_as_one_way_collision** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** +.. rst-class:: classref-method + +void **body_set_shape_as_one_way_collision** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** Enables one way collision on body if ``enable`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_shape_disabled: -- void **body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** Disables shape in body if ``disabled`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_shape_transform: -- void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** Sets the transform matrix for a body shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_space: -- void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** +.. rst-class:: classref-method + +void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** Assigns a space to the body (see :ref:`space_create`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_set_state: -- void **body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** Sets a body state using one of the :ref:`BodyState` constants. Note that the method doesn't take effect immediately. The state will change on the next physics frame. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_body_test_motion: -- :ref:`bool` **body_test_motion** **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters2D` parameters, :ref:`PhysicsTestMotionResult2D` result=null **)** +.. rst-class:: classref-method + +:ref:`bool` **body_test_motion** **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters2D` parameters, :ref:`PhysicsTestMotionResult2D` result=null **)** Returns ``true`` if a collision would result from moving along a motion vector from a given point in space. :ref:`PhysicsTestMotionParameters2D` is passed to set motion parameters. :ref:`PhysicsTestMotionResult2D` can be passed to return additional information. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_capsule_shape_create: -- :ref:`RID` **capsule_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **capsule_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_circle_shape_create: -- :ref:`RID` **circle_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **circle_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_concave_polygon_shape_create: -- :ref:`RID` **concave_polygon_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **concave_polygon_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_convex_polygon_shape_create: -- :ref:`RID` **convex_polygon_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **convex_polygon_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_damped_spring_joint_get_param: -- :ref:`float` **damped_spring_joint_get_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **damped_spring_joint_get_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |const| Returns the value of a damped spring joint parameter. See :ref:`DampedSpringParam` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_damped_spring_joint_set_param: -- void **damped_spring_joint_set_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **damped_spring_joint_set_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** Sets a damped spring joint parameter. See :ref:`DampedSpringParam` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_free_rid: -- void **free_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **free_rid** **(** :ref:`RID` rid **)** Destroys any of the objects created by PhysicsServer2D. If the :ref:`RID` passed is not one of the objects that can be created by PhysicsServer2D, an error will be sent to the console. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_get_process_info: -- :ref:`int` **get_process_info** **(** :ref:`ProcessInfo` process_info **)** +.. rst-class:: classref-method + +:ref:`int` **get_process_info** **(** :ref:`ProcessInfo` process_info **)** Returns information about the current state of the 2D physics engine. See :ref:`ProcessInfo` for a list of available states. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_clear: -- void **joint_clear** **(** :ref:`RID` joint **)** +.. rst-class:: classref-method + +void **joint_clear** **(** :ref:`RID` joint **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_create: -- :ref:`RID` **joint_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **joint_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_get_param: -- :ref:`float` **joint_get_param** **(** :ref:`RID` joint, :ref:`JointParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **joint_get_param** **(** :ref:`RID` joint, :ref:`JointParam` param **)** |const| Returns the value of a joint parameter. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_get_type: -- :ref:`JointType` **joint_get_type** **(** :ref:`RID` joint **)** |const| +.. rst-class:: classref-method + +:ref:`JointType` **joint_get_type** **(** :ref:`RID` joint **)** |const| Returns a joint's type (see :ref:`JointType`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_make_damped_spring: -- void **joint_make_damped_spring** **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** +.. rst-class:: classref-method + +void **joint_make_damped_spring** **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_make_groove: -- void **joint_make_groove** **(** :ref:`RID` joint, :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** +.. rst-class:: classref-method + +void **joint_make_groove** **(** :ref:`RID` joint, :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_make_pin: -- void **joint_make_pin** **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** +.. rst-class:: classref-method + +void **joint_make_pin** **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_joint_set_param: -- void **joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** Sets a joint parameter. See :ref:`JointParam` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_rectangle_shape_create: -- :ref:`RID` **rectangle_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **rectangle_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_segment_shape_create: -- :ref:`RID` **segment_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **segment_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_separation_ray_shape_create: -- :ref:`RID` **separation_ray_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **separation_ray_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_set_active: -- void **set_active** **(** :ref:`bool` active **)** +.. rst-class:: classref-method + +void **set_active** **(** :ref:`bool` active **)** Activates or deactivates the 2D physics engine. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_shape_get_data: -- :ref:`Variant` **shape_get_data** **(** :ref:`RID` shape **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **shape_get_data** **(** :ref:`RID` shape **)** |const| Returns the shape data. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_shape_get_type: -- :ref:`ShapeType` **shape_get_type** **(** :ref:`RID` shape **)** |const| +.. rst-class:: classref-method + +:ref:`ShapeType` **shape_get_type** **(** :ref:`RID` shape **)** |const| Returns a shape's type (see :ref:`ShapeType`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_shape_set_data: -- void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** +.. rst-class:: classref-method + +void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_space_create: -- :ref:`RID` **space_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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`, or to a body with :ref:`body_set_space`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_space_get_direct_state: -- :ref:`PhysicsDirectSpaceState2D` **space_get_direct_state** **(** :ref:`RID` space **)** +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState2D` **space_get_direct_state** **(** :ref:`RID` space **)** Returns the state of a space, a :ref:`PhysicsDirectSpaceState2D`. This object can be used to make collision/intersection queries. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_space_get_param: -- :ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| Returns the value of a space parameter. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_space_is_active: -- :ref:`bool` **space_is_active** **(** :ref:`RID` space **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **space_is_active** **(** :ref:`RID` space **)** |const| Returns whether the space is active. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_space_set_active: -- void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** +.. rst-class:: classref-method + +void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** Marks a space as active. It will not have an effect, unless it is assigned to an area or body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_space_set_param: -- void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** Sets the value for a space parameter. See :ref:`SpaceParameter` for a list of available parameters. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2D_method_world_boundary_shape_create: -- :ref:`RID` **world_boundary_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **world_boundary_shape_create** **(** **)** .. container:: contribute diff --git a/classes/class_physicsserver2dextension.rst b/classes/class_physicsserver2dextension.rst index 4b619b790..796d0f38a 100644 --- a/classes/class_physicsserver2dextension.rst +++ b/classes/class_physicsserver2dextension.rst @@ -16,1639 +16,2192 @@ PhysicsServer2DExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_attach_canvas_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_canvas_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_pickable` **(** :ref:`RID` area, :ref:`bool` pickable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform2D` transform **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`float` impulse **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_attach_canvas_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_body_collide_shape` **(** :ref:`RID` body, :ref:`int` body_shape, :ref:`RID` shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` motion, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_canvas_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CCDMode` | :ref:`_body_get_continuous_collision_detection_mode` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectBodyState2D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`CCDMode` mode **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_pickable` **(** :ref:`RID` body, :ref:`bool` pickable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_shape_as_one_way_collision` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`float` margin, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_circle_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_damped_spring_joint_get_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_damped_spring_joint_set_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_end_sync` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_finish` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_flush_queries` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_init` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_joint_get_param` **(** :ref:`RID` joint, :ref:`JointParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_damped_spring` **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_groove` **(** :ref:`RID` joint, :ref:`Vector2` a_groove1, :ref:`Vector2` a_groove2, :ref:`Vector2` b_anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_set_param` **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_rectangle_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_segment_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shape_collide` **(** :ref:`RID` shape_A, :ref:`Transform2D` xform_A, :ref:`Vector2` motion_A, :ref:`RID` shape_B, :ref:`Transform2D` xform_B, :ref:`Vector2` motion_B, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState2D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_sync` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_canvas_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_canvas_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_pickable` **(** :ref:`RID` area, :ref:`bool` pickable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`float` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_canvas_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_collide_shape` **(** :ref:`RID` body, :ref:`int` body_shape, :ref:`RID` shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` motion, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_canvas_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CCDMode` | :ref:`_body_get_continuous_collision_detection_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState2D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`CCDMode` mode **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_pickable` **(** :ref:`RID` body, :ref:`bool` pickable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_as_one_way_collision` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`float` margin, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_circle_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_damped_spring_joint_get_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_damped_spring_joint_set_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_flush_queries` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_joint_get_param` **(** :ref:`RID` joint, :ref:`JointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_damped_spring` **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_groove` **(** :ref:`RID` joint, :ref:`Vector2` a_groove1, :ref:`Vector2` a_groove2, :ref:`Vector2` b_anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_set_param` **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_rectangle_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_segment_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shape_collide` **(** :ref:`RID` shape_A, :ref:`Transform2D` xform_A, :ref:`Vector2` motion_A, :ref:`RID` shape_B, :ref:`Transform2D` xform_B, :ref:`Vector2` motion_B, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsServer2DExtension_method__area_add_shape: -- void **_area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_attach_canvas_instance_id: -- void **_area_attach_canvas_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** |virtual| +.. rst-class:: classref-method + +void **_area_attach_canvas_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_attach_object_instance_id: -- void **_area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** |virtual| +.. rst-class:: classref-method + +void **_area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_clear_shapes: -- void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| +.. rst-class:: classref-method + +void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_create: -- :ref:`RID` **_area_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_area_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_canvas_instance_id: -- :ref:`int` **_area_get_canvas_instance_id** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_canvas_instance_id** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_collision_layer: -- :ref:`int` **_area_get_collision_layer** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_collision_layer** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_collision_mask: -- :ref:`int` **_area_get_collision_mask** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_collision_mask** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_object_instance_id: -- :ref:`int` **_area_get_object_instance_id** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_object_instance_id** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_param: -- :ref:`Variant` **_area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_shape: -- :ref:`RID` **_area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_shape_count: -- :ref:`int` **_area_get_shape_count** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_shape_count** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_shape_transform: -- :ref:`Transform2D` **_area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **_area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_space: -- :ref:`RID` **_area_get_space** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_area_get_space** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_get_transform: -- :ref:`Transform2D` **_area_get_transform** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **_area_get_transform** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_remove_shape: -- void **_area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_area_monitor_callback: -- void **_area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_collision_layer: -- void **_area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_collision_mask: -- void **_area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_monitor_callback: -- void **_area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_monitorable: -- void **_area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_param: -- void **_area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_pickable: -- void **_area_set_pickable** **(** :ref:`RID` area, :ref:`bool` pickable **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_pickable** **(** :ref:`RID` area, :ref:`bool` pickable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_shape: -- void **_area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_shape_disabled: -- void **_area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_shape_transform: -- void **_area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_space: -- void **_area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__area_set_transform: -- void **_area_set_transform** **(** :ref:`RID` area, :ref:`Transform2D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_transform** **(** :ref:`RID` area, :ref:`Transform2D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_add_collision_exception: -- void **_body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_add_constant_central_force: -- void **_body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_add_constant_force: -- void **_body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_add_constant_torque: -- void **_body_add_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_add_shape: -- void **_body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_apply_central_force: -- void **_body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_apply_central_impulse: -- void **_body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_apply_force: -- void **_body_apply_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_force** **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_apply_impulse: -- void **_body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_apply_torque: -- void **_body_apply_torque** **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_torque** **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_apply_torque_impulse: -- void **_body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`float` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`float` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_attach_canvas_instance_id: -- void **_body_attach_canvas_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** |virtual| +.. rst-class:: classref-method + +void **_body_attach_canvas_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_attach_object_instance_id: -- void **_body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** |virtual| +.. rst-class:: classref-method + +void **_body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_clear_shapes: -- void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| +.. rst-class:: classref-method + +void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_collide_shape: -- :ref:`bool` **_body_collide_shape** **(** :ref:`RID` body, :ref:`int` body_shape, :ref:`RID` shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` motion, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_body_collide_shape** **(** :ref:`RID` body, :ref:`int` body_shape, :ref:`RID` shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` motion, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_create: -- :ref:`RID` **_body_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_body_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_canvas_instance_id: -- :ref:`int` **_body_get_canvas_instance_id** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_canvas_instance_id** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_collision_exceptions: -- :ref:`RID[]` **_body_get_collision_exceptions** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID[]` **_body_get_collision_exceptions** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_collision_layer: -- :ref:`int` **_body_get_collision_layer** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_collision_layer** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_collision_mask: -- :ref:`int` **_body_get_collision_mask** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_collision_mask** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_collision_priority: -- :ref:`float` **_body_get_collision_priority** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_body_get_collision_priority** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_constant_force: -- :ref:`Vector2` **_body_get_constant_force** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_body_get_constant_force** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_constant_torque: -- :ref:`float` **_body_get_constant_torque** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_body_get_constant_torque** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_contacts_reported_depth_threshold: -- :ref:`float` **_body_get_contacts_reported_depth_threshold** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_body_get_contacts_reported_depth_threshold** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_continuous_collision_detection_mode: -- :ref:`CCDMode` **_body_get_continuous_collision_detection_mode** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`CCDMode` **_body_get_continuous_collision_detection_mode** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_direct_state: -- :ref:`PhysicsDirectBodyState2D` **_body_get_direct_state** **(** :ref:`RID` body **)** |virtual| +.. rst-class:: classref-method + +:ref:`PhysicsDirectBodyState2D` **_body_get_direct_state** **(** :ref:`RID` body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_max_contacts_reported: -- :ref:`int` **_body_get_max_contacts_reported** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_max_contacts_reported** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_mode: -- :ref:`BodyMode` **_body_get_mode** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`BodyMode` **_body_get_mode** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_object_instance_id: -- :ref:`int` **_body_get_object_instance_id** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_object_instance_id** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_param: -- :ref:`Variant` **_body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_shape: -- :ref:`RID` **_body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_shape_count: -- :ref:`int` **_body_get_shape_count** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_shape_count** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_shape_transform: -- :ref:`Transform2D` **_body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **_body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_space: -- :ref:`RID` **_body_get_space** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_body_get_space** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_get_state: -- :ref:`Variant` **_body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_is_omitting_force_integration: -- :ref:`bool` **_body_is_omitting_force_integration** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_body_is_omitting_force_integration** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_remove_collision_exception: -- void **_body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| +.. rst-class:: classref-method + +void **_body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_remove_shape: -- void **_body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_reset_mass_properties: -- void **_body_reset_mass_properties** **(** :ref:`RID` body **)** |virtual| +.. rst-class:: classref-method + +void **_body_reset_mass_properties** **(** :ref:`RID` body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_axis_velocity: -- void **_body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_collision_layer: -- void **_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_collision_mask: -- void **_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_collision_priority: -- void **_body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_constant_force: -- void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_constant_torque: -- void **_body_set_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_constant_torque** **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_contacts_reported_depth_threshold: -- void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_continuous_collision_detection_mode: -- void **_body_set_continuous_collision_detection_mode** **(** :ref:`RID` body, :ref:`CCDMode` mode **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_continuous_collision_detection_mode** **(** :ref:`RID` body, :ref:`CCDMode` mode **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_force_integration_callback: -- void **_body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_max_contacts_reported: -- void **_body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_mode: -- void **_body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_omit_force_integration: -- void **_body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_param: -- void **_body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_pickable: -- void **_body_set_pickable** **(** :ref:`RID` body, :ref:`bool` pickable **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_pickable** **(** :ref:`RID` body, :ref:`bool` pickable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_shape: -- void **_body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_shape_as_one_way_collision: -- void **_body_set_shape_as_one_way_collision** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_shape_as_one_way_collision** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_shape_disabled: -- void **_body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_shape_transform: -- void **_body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_space: -- void **_body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_state: -- void **_body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_set_state_sync_callback: -- void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__body_test_motion: -- :ref:`bool` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`float` margin, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`float` margin, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__capsule_shape_create: -- :ref:`RID` **_capsule_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_capsule_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__circle_shape_create: -- :ref:`RID` **_circle_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_circle_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__concave_polygon_shape_create: -- :ref:`RID` **_concave_polygon_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_concave_polygon_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__convex_polygon_shape_create: -- :ref:`RID` **_convex_polygon_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_convex_polygon_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__damped_spring_joint_get_param: -- :ref:`float` **_damped_spring_joint_get_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_damped_spring_joint_get_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__damped_spring_joint_set_param: -- void **_damped_spring_joint_set_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_damped_spring_joint_set_param** **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__end_sync: -- void **_end_sync** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_end_sync** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__finish: -- void **_finish** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_finish** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__flush_queries: -- void **_flush_queries** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_flush_queries** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__free_rid: -- void **_free_rid** **(** :ref:`RID` rid **)** |virtual| +.. rst-class:: classref-method + +void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__get_process_info: -- :ref:`int` **_get_process_info** **(** :ref:`ProcessInfo` process_info **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_get_process_info** **(** :ref:`ProcessInfo` process_info **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__init: -- void **_init** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_init** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__is_flushing_queries: -- :ref:`bool` **_is_flushing_queries** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_flushing_queries** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_clear: -- void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| +.. rst-class:: classref-method + +void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_create: -- :ref:`RID` **_joint_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_joint_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_disable_collisions_between_bodies: -- void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| +.. rst-class:: classref-method + +void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_get_param: -- :ref:`float` **_joint_get_param** **(** :ref:`RID` joint, :ref:`JointParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_joint_get_param** **(** :ref:`RID` joint, :ref:`JointParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_get_type: -- :ref:`JointType` **_joint_get_type** **(** :ref:`RID` joint **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`JointType` **_joint_get_type** **(** :ref:`RID` joint **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_is_disabled_collisions_between_bodies: -- :ref:`bool` **_joint_is_disabled_collisions_between_bodies** **(** :ref:`RID` joint **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_joint_is_disabled_collisions_between_bodies** **(** :ref:`RID` joint **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_make_damped_spring: -- void **_joint_make_damped_spring** **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_damped_spring** **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_make_groove: -- void **_joint_make_groove** **(** :ref:`RID` joint, :ref:`Vector2` a_groove1, :ref:`Vector2` a_groove2, :ref:`Vector2` b_anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_groove** **(** :ref:`RID` joint, :ref:`Vector2` a_groove1, :ref:`Vector2` a_groove2, :ref:`Vector2` b_anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_make_pin: -- void **_joint_make_pin** **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_pin** **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__joint_set_param: -- void **_joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__pin_joint_get_param: -- :ref:`float` **_pin_joint_get_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_pin_joint_get_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__pin_joint_set_param: -- void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__rectangle_shape_create: -- :ref:`RID` **_rectangle_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_rectangle_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__segment_shape_create: -- :ref:`RID` **_segment_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_segment_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__separation_ray_shape_create: -- :ref:`RID` **_separation_ray_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_separation_ray_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__set_active: -- void **_set_active** **(** :ref:`bool` active **)** |virtual| +.. rst-class:: classref-method + +void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__shape_collide: -- :ref:`bool` **_shape_collide** **(** :ref:`RID` shape_A, :ref:`Transform2D` xform_A, :ref:`Vector2` motion_A, :ref:`RID` shape_B, :ref:`Transform2D` xform_B, :ref:`Vector2` motion_B, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shape_collide** **(** :ref:`RID` shape_A, :ref:`Transform2D` xform_A, :ref:`Vector2` motion_A, :ref:`RID` shape_B, :ref:`Transform2D` xform_B, :ref:`Vector2` motion_B, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__shape_get_custom_solver_bias: -- :ref:`float` **_shape_get_custom_solver_bias** **(** :ref:`RID` shape **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shape_get_custom_solver_bias** **(** :ref:`RID` shape **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__shape_get_data: -- :ref:`Variant` **_shape_get_data** **(** :ref:`RID` shape **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_shape_get_data** **(** :ref:`RID` shape **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__shape_get_type: -- :ref:`ShapeType` **_shape_get_type** **(** :ref:`RID` shape **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`ShapeType` **_shape_get_type** **(** :ref:`RID` shape **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__shape_set_custom_solver_bias: -- void **_shape_set_custom_solver_bias** **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| +.. rst-class:: classref-method + +void **_shape_set_custom_solver_bias** **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__shape_set_data: -- void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| +.. rst-class:: classref-method + +void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_create: -- :ref:`RID` **_space_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_space_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_get_contact_count: -- :ref:`int` **_space_get_contact_count** **(** :ref:`RID` space **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_space_get_contact_count** **(** :ref:`RID` space **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_get_contacts: -- :ref:`PackedVector2Array` **_space_get_contacts** **(** :ref:`RID` space **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **_space_get_contacts** **(** :ref:`RID` space **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_get_direct_state: -- :ref:`PhysicsDirectSpaceState2D` **_space_get_direct_state** **(** :ref:`RID` space **)** |virtual| +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState2D` **_space_get_direct_state** **(** :ref:`RID` space **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_get_param: -- :ref:`float` **_space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_is_active: -- :ref:`bool` **_space_is_active** **(** :ref:`RID` space **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_space_is_active** **(** :ref:`RID` space **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_set_active: -- void **_space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| +.. rst-class:: classref-method + +void **_space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_set_debug_contacts: -- void **_space_set_debug_contacts** **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| +.. rst-class:: classref-method + +void **_space_set_debug_contacts** **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__space_set_param: -- void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__step: -- void **_step** **(** :ref:`float` step **)** |virtual| +.. rst-class:: classref-method + +void **_step** **(** :ref:`float` step **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__sync: -- void **_sync** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_sync** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DExtension_method__world_boundary_shape_create: -- :ref:`RID` **_world_boundary_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_world_boundary_shape_create** **(** **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsserver2dmanager.rst b/classes/class_physicsserver2dmanager.rst index 5d8abf3fc..7586385fc 100644 --- a/classes/class_physicsserver2dmanager.rst +++ b/classes/class_physicsserver2dmanager.rst @@ -14,36 +14,55 @@ PhysicsServer2DManager Manager for 2D physics server implementations. +.. rst-class:: classref-introduction-group + Description ----------- -``PhysicsServer2DManager`` is the API for registering :ref:`PhysicsServer2D` implementations, and for setting the default implementation. +**PhysicsServer2DManager** is the API for registering :ref:`PhysicsServer2D` implementations, and for setting the default implementation. \ **Note:** It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions. +.. rst-class:: classref-reftable-group + Methods ------- -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_server` **(** :ref:`String` name, :ref:`Callable` create_callback **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_server` **(** :ref:`String` name, :ref:`int` priority **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_server` **(** :ref:`String` name, :ref:`Callable` create_callback **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_server` **(** :ref:`String` name, :ref:`int` priority **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsServer2DManager_method_register_server: -- void **register_server** **(** :ref:`String` name, :ref:`Callable` create_callback **)** +.. rst-class:: classref-method + +void **register_server** **(** :ref:`String` name, :ref:`Callable` create_callback **)** Register a :ref:`PhysicsServer2D` implementation by passing a ``name`` and a :ref:`Callable` that returns a :ref:`PhysicsServer2D` object. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer2DManager_method_set_default_server: -- void **set_default_server** **(** :ref:`String` name, :ref:`int` priority **)** +.. rst-class:: classref-method + +void **set_default_server** **(** :ref:`String` name, :ref:`int` priority **)** Set the default :ref:`PhysicsServer2D` implementation to the one identified by ``name``, if ``priority`` is greater than the priority of the current default implementation. diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index f07df96c9..f3d5a0f34 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -16,500 +16,699 @@ PhysicsServer3D Server interface for low-level physics access. +.. rst-class:: classref-introduction-group + Description ----------- PhysicsServer3D is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_collision_layer` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_collision_mask` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_object_instance_id` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`area_get_transform` **(** :ref:`RID` area **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_collision_layer` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`body_get_collision_priority` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`body_get_constant_force` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`body_get_constant_torque` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectBodyState3D` | :ref:`body_get_direct_state` **(** :ref:`RID` body **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BodyMode` | :ref:`body_get_mode` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_object_instance_id` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_reset_mass_properties` **(** :ref:`RID` body **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_test_motion` **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters3D` parameters, :ref:`PhysicsTestMotionResult3D` result=null **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`box_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`capsule_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`concave_polygon_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`convex_polygon_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`custom_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`cylinder_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_process_info` **(** :ref:`ProcessInfo` process_info **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`heightmap_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_clear` **(** :ref:`RID` joint **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`joint_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`joint_get_solver_priority` **(** :ref:`RID` joint **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`JointType` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`pin_joint_get_local_a` **(** :ref:`RID` joint **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`pin_joint_get_local_b` **(** :ref:`RID` joint **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`separation_ray_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_active` **(** :ref:`bool` active **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`shape_get_data` **(** :ref:`RID` shape **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ShapeType` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`soft_body_get_bounds` **(** :ref:`RID` body **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`space_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState3D` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** |const| | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`sphere_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`world_boundary_shape_create` **(** **)** | -+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`area_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_collision_layer` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_collision_mask` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_object_instance_id` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`area_get_transform` **(** :ref:`RID` area **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`body_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_collision_layer` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`body_get_collision_priority` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`body_get_constant_force` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`body_get_constant_torque` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState3D` | :ref:`body_get_direct_state` **(** :ref:`RID` body **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`body_get_mode` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_object_instance_id` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_reset_mass_properties` **(** :ref:`RID` body **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion` **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters3D` parameters, :ref:`PhysicsTestMotionResult3D` result=null **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`box_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`capsule_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`concave_polygon_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`convex_polygon_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`custom_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`cylinder_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_process_info` **(** :ref:`ProcessInfo` process_info **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`heightmap_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_clear` **(** :ref:`RID` joint **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`joint_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`joint_get_solver_priority` **(** :ref:`RID` joint **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`pin_joint_get_local_a` **(** :ref:`RID` joint **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`pin_joint_get_local_b` **(** :ref:`RID` joint **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`separation_ray_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_active` **(** :ref:`bool` active **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`shape_get_data` **(** :ref:`RID` shape **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`soft_body_get_bounds` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`space_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`sphere_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`world_boundary_shape_create` **(** **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PhysicsServer3D_JointType: -.. _class_PhysicsServer3D_constant_JOINT_TYPE_PIN: - -.. _class_PhysicsServer3D_constant_JOINT_TYPE_HINGE: - -.. _class_PhysicsServer3D_constant_JOINT_TYPE_SLIDER: - -.. _class_PhysicsServer3D_constant_JOINT_TYPE_CONE_TWIST: - -.. _class_PhysicsServer3D_constant_JOINT_TYPE_6DOF: - -.. _class_PhysicsServer3D_constant_JOINT_TYPE_MAX: +.. rst-class:: classref-enumeration enum **JointType**: -- **JOINT_TYPE_PIN** = **0** --- The :ref:`Joint3D` is a :ref:`PinJoint3D`. +.. _class_PhysicsServer3D_constant_JOINT_TYPE_PIN: -- **JOINT_TYPE_HINGE** = **1** --- The :ref:`Joint3D` is a :ref:`HingeJoint3D`. +.. rst-class:: classref-enumeration-constant -- **JOINT_TYPE_SLIDER** = **2** --- The :ref:`Joint3D` is a :ref:`SliderJoint3D`. +:ref:`JointType` **JOINT_TYPE_PIN** = ``0`` -- **JOINT_TYPE_CONE_TWIST** = **3** --- The :ref:`Joint3D` is a :ref:`ConeTwistJoint3D`. +The :ref:`Joint3D` is a :ref:`PinJoint3D`. -- **JOINT_TYPE_6DOF** = **4** --- The :ref:`Joint3D` is a :ref:`Generic6DOFJoint3D`. +.. _class_PhysicsServer3D_constant_JOINT_TYPE_HINGE: -- **JOINT_TYPE_MAX** = **5** --- Represents the size of the :ref:`JointType` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_HINGE** = ``1`` + +The :ref:`Joint3D` is a :ref:`HingeJoint3D`. + +.. _class_PhysicsServer3D_constant_JOINT_TYPE_SLIDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_SLIDER** = ``2`` + +The :ref:`Joint3D` is a :ref:`SliderJoint3D`. + +.. _class_PhysicsServer3D_constant_JOINT_TYPE_CONE_TWIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_CONE_TWIST** = ``3`` + +The :ref:`Joint3D` is a :ref:`ConeTwistJoint3D`. + +.. _class_PhysicsServer3D_constant_JOINT_TYPE_6DOF: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_6DOF** = ``4`` + +The :ref:`Joint3D` is a :ref:`Generic6DOFJoint3D`. + +.. _class_PhysicsServer3D_constant_JOINT_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointType` **JOINT_TYPE_MAX** = ``5`` + +Represents the size of the :ref:`JointType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_PinJointParam: -.. _class_PhysicsServer3D_constant_PIN_JOINT_BIAS: - -.. _class_PhysicsServer3D_constant_PIN_JOINT_DAMPING: - -.. _class_PhysicsServer3D_constant_PIN_JOINT_IMPULSE_CLAMP: +.. rst-class:: classref-enumeration enum **PinJointParam**: -- **PIN_JOINT_BIAS** = **0** --- The strength with which the pinned objects try to stay in positional relation to each other. +.. _class_PhysicsServer3D_constant_PIN_JOINT_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam` **PIN_JOINT_BIAS** = ``0`` + +The strength with which the pinned objects try to stay in positional relation to each other. The higher, the stronger. -- **PIN_JOINT_DAMPING** = **1** --- The strength with which the pinned objects try to stay in velocity relation to each other. +.. _class_PhysicsServer3D_constant_PIN_JOINT_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam` **PIN_JOINT_DAMPING** = ``1`` + +The strength with which the pinned objects try to stay in velocity relation to each other. The higher, the stronger. -- **PIN_JOINT_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends. +.. _class_PhysicsServer3D_constant_PIN_JOINT_IMPULSE_CLAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam` **PIN_JOINT_IMPULSE_CLAMP** = ``2`` + +If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_HingeJointParam: -.. _class_PhysicsServer3D_constant_HINGE_JOINT_BIAS: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_UPPER: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_LOWER: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_BIAS: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_SOFTNESS: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_RELAXATION: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_MOTOR_TARGET_VELOCITY: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_MOTOR_MAX_IMPULSE: +.. rst-class:: classref-enumeration enum **HingeJointParam**: -- **HINGE_JOINT_BIAS** = **0** --- The speed with which the two bodies get pulled together when they move in different directions. +.. _class_PhysicsServer3D_constant_HINGE_JOINT_BIAS: -- **HINGE_JOINT_LIMIT_UPPER** = **1** --- The maximum rotation across the Hinge. +.. rst-class:: classref-enumeration-constant -- **HINGE_JOINT_LIMIT_LOWER** = **2** --- The minimum rotation across the Hinge. +:ref:`HingeJointParam` **HINGE_JOINT_BIAS** = ``0`` -- **HINGE_JOINT_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected. +The speed with which the two bodies get pulled together when they move in different directions. -- **HINGE_JOINT_LIMIT_SOFTNESS** = **4** +.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_UPPER: -- **HINGE_JOINT_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down. +.. rst-class:: classref-enumeration-constant -- **HINGE_JOINT_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor. +:ref:`HingeJointParam` **HINGE_JOINT_LIMIT_UPPER** = ``1`` -- **HINGE_JOINT_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor. +The maximum rotation across the Hinge. + +.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointParam` **HINGE_JOINT_LIMIT_LOWER** = ``2`` + +The minimum rotation across the Hinge. + +.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointParam` **HINGE_JOINT_LIMIT_BIAS** = ``3`` + +The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + +.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointParam` **HINGE_JOINT_LIMIT_SOFTNESS** = ``4`` + + + +.. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_RELAXATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointParam` **HINGE_JOINT_LIMIT_RELAXATION** = ``5`` + +The lower this value, the more the rotation gets slowed down. + +.. _class_PhysicsServer3D_constant_HINGE_JOINT_MOTOR_TARGET_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointParam` **HINGE_JOINT_MOTOR_TARGET_VELOCITY** = ``6`` + +Target speed for the motor. + +.. _class_PhysicsServer3D_constant_HINGE_JOINT_MOTOR_MAX_IMPULSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointParam` **HINGE_JOINT_MOTOR_MAX_IMPULSE** = ``7`` + +Maximum acceleration for the motor. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_HingeJointFlag: -.. _class_PhysicsServer3D_constant_HINGE_JOINT_FLAG_USE_LIMIT: - -.. _class_PhysicsServer3D_constant_HINGE_JOINT_FLAG_ENABLE_MOTOR: +.. rst-class:: classref-enumeration enum **HingeJointFlag**: -- **HINGE_JOINT_FLAG_USE_LIMIT** = **0** --- If ``true``, the Hinge has a maximum and a minimum rotation. +.. _class_PhysicsServer3D_constant_HINGE_JOINT_FLAG_USE_LIMIT: -- **HINGE_JOINT_FLAG_ENABLE_MOTOR** = **1** --- If ``true``, a motor turns the Hinge. +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointFlag` **HINGE_JOINT_FLAG_USE_LIMIT** = ``0`` + +If ``true``, the Hinge has a maximum and a minimum rotation. + +.. _class_PhysicsServer3D_constant_HINGE_JOINT_FLAG_ENABLE_MOTOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`HingeJointFlag` **HINGE_JOINT_FLAG_ENABLE_MOTOR** = ``1`` + +If ``true``, a motor turns the Hinge. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_SliderJointParam: -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_UPPER: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_LOWER: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_DAMPING: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_MOTION_SOFTNESS: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_MOTION_RESTITUTION: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_MOTION_DAMPING: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_UPPER: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_LOWER: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_DAMPING: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_MOTION_DAMPING: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING: - -.. _class_PhysicsServer3D_constant_SLIDER_JOINT_MAX: +.. rst-class:: classref-enumeration enum **SliderJointParam**: -- **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their X axis before damping happens. +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_UPPER: -- **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their X axis before damping happens. +.. rst-class:: classref-enumeration-constant -- **SLIDER_JOINT_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. +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = ``0`` -- **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. +The maximum difference between the pivot points on their X axis before damping happens. -- **SLIDER_JOINT_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed. +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_LOWER: -- **SLIDER_JOINT_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. +.. rst-class:: classref-enumeration-constant -- **SLIDER_JOINT_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits. +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = ``1`` -- **SLIDER_JOINT_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits. +The minimum difference between the pivot points on their X axis before damping happens. -- **SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement across axes orthogonal to the slider. +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS: -- **SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is across axes orthogonal to the slider. +.. rst-class:: classref-enumeration-constant -- **SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is across axes orthogonal to the slider. +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS** = ``2`` -- **SLIDER_JOINT_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider. +A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. -- **SLIDER_JOINT_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider. +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION: -- **SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed. +.. rst-class:: classref-enumeration-constant -- **SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed. +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = ``3`` -- **SLIDER_JOINT_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed. +The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. -- **SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor that gets applied to the all rotation in the limits. +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_DAMPING: -- **SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits. +.. rst-class:: classref-enumeration-constant -- **SLIDER_JOINT_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits. +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_LIMIT_DAMPING** = ``4`` -- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor that gets applied to the all rotation across axes orthogonal to the slider. +The amount of damping once the slider limits are surpassed. -- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider. +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_MOTION_SOFTNESS: -- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. +.. rst-class:: classref-enumeration-constant -- **SLIDER_JOINT_MAX** = **22** --- Represents the size of the :ref:`SliderJointParam` enum. +:ref:`SliderJointParam` **SLIDER_JOINT_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. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_MOTION_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_MOTION_RESTITUTION** = ``6`` + +The amount of restitution inside the slider limits. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_MOTION_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_MOTION_DAMPING** = ``7`` + +The amount of damping inside the slider limits. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS** = ``8`` + +A factor applied to the movement across axes orthogonal to the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION** = ``9`` + +The amount of restitution when movement is across axes orthogonal to the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING** = ``10`` + +The amount of damping when movement is across axes orthogonal to the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_LIMIT_UPPER** = ``11`` + +The upper limit of rotation in the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_LIMIT_LOWER** = ``12`` + +The lower limit of rotation in the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS** = ``13`` + +A factor applied to the all rotation once the limit is surpassed. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION** = ``14`` + +The amount of restitution of the rotation when the limit is surpassed. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_LIMIT_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_LIMIT_DAMPING** = ``15`` + +The amount of damping of the rotation when the limit is surpassed. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS** = ``16`` + +A factor that gets applied to the all rotation in the limits. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION** = ``17`` + +The amount of restitution of the rotation in the limits. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_MOTION_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_MOTION_DAMPING** = ``18`` + +The amount of damping of the rotation in the limits. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS** = ``19`` + +A factor that gets applied to the all rotation across axes orthogonal to the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION** = ``20`` + +The amount of restitution of the rotation across axes orthogonal to the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = ``21`` + +The amount of damping of the rotation across axes orthogonal to the slider. + +.. _class_PhysicsServer3D_constant_SLIDER_JOINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SliderJointParam` **SLIDER_JOINT_MAX** = ``22`` + +Represents the size of the :ref:`SliderJointParam` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_ConeTwistJointParam: -.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_SWING_SPAN: - -.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_TWIST_SPAN: - -.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_BIAS: - -.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_SOFTNESS: - -.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_RELAXATION: +.. rst-class:: classref-enumeration enum **ConeTwistJointParam**: -- **CONE_TWIST_JOINT_SWING_SPAN** = **0** --- Swing is rotation from side to side, around the axis perpendicular to the twist axis. +.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_SWING_SPAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConeTwistJointParam` **CONE_TWIST_JOINT_SWING_SPAN** = ``0`` + +Swing is rotation from side to side, around the axis perpendicular to the twist axis. The swing span defines, how much rotation will not get corrected along the swing axis. @@ -517,608 +716,1128 @@ Could be defined as looseness in the :ref:`ConeTwistJoint3D` **CONE_TWIST_JOINT_TWIST_SPAN** = ``1`` + +Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. -- **CONE_TWIST_JOINT_BIAS** = **2** --- The speed with which the swing or twist will take place. +.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConeTwistJointParam` **CONE_TWIST_JOINT_BIAS** = ``2`` + +The speed with which the swing or twist will take place. The higher, the faster. -- **CONE_TWIST_JOINT_SOFTNESS** = **3** --- The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint. +.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_SOFTNESS: -- **CONE_TWIST_JOINT_RELAXATION** = **4** --- Defines, how fast the swing- and twist-speed-difference on both sides gets synced. +.. rst-class:: classref-enumeration-constant + +:ref:`ConeTwistJointParam` **CONE_TWIST_JOINT_SOFTNESS** = ``3`` + +The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint. + +.. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_RELAXATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConeTwistJointParam` **CONE_TWIST_JOINT_RELAXATION** = ``4`` + +Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_G6DOFJointAxisParam: -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_LOWER_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_UPPER_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_RESTITUTION: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_DAMPING: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_LOWER_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_UPPER_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_DAMPING: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_RESTITUTION: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_FORCE_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_ERP: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT: +.. rst-class:: classref-enumeration enum **G6DOFJointAxisParam**: -- **G6DOF_JOINT_LINEAR_LOWER_LIMIT** = **0** --- The minimum difference between the pivot points' axes. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_LOWER_LIMIT: -- **G6DOF_JOINT_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes. +.. rst-class:: classref-enumeration-constant -- **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor that gets applied to the movement across the axes. The lower, the slower the movement. +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_LOWER_LIMIT** = ``0`` -- **G6DOF_JOINT_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. +The minimum difference between the pivot points' axes. -- **G6DOF_JOINT_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_UPPER_LIMIT: -- **G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY** = **5** --- The velocity that the joint's linear motor will attempt to reach. +.. rst-class:: classref-enumeration-constant -- **G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT** = **6** --- The maximum force that the linear motor can apply while trying to reach the target velocity. +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_UPPER_LIMIT** = ``1`` -- **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = **10** --- The minimum rotation in negative direction to break loose and rotate around the axes. +The maximum difference between the pivot points' axes. -- **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = **11** --- The minimum rotation in positive direction to break loose and rotate around the axes. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS: -- **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = **12** --- A factor that gets multiplied onto all rotations across the axes. +.. rst-class:: classref-enumeration-constant -- **G6DOF_JOINT_ANGULAR_DAMPING** = **13** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = ``2`` -- **G6DOF_JOINT_ANGULAR_RESTITUTION** = **14** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. +A factor that gets applied to the movement across the axes. The lower, the slower the movement. -- **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = **15** --- The maximum amount of force that can occur, when rotating around the axes. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_RESTITUTION: -- **G6DOF_JOINT_ANGULAR_ERP** = **16** --- When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +.. rst-class:: classref-enumeration-constant -- **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = **17** --- Target speed for the motor at the axes. +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_RESTITUTION** = ``3`` -- **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = **18** --- Maximum acceleration for the motor at the axes. +The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_DAMPING** = ``4`` + +The amount of damping that happens at the linear motion across the axes. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY** = ``5`` + +The velocity that the joint's linear motor will attempt to reach. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT** = ``6`` + +The maximum force that the linear motor can apply while trying to reach the target velocity. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_LOWER_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = ``10`` + +The minimum rotation in negative direction to break loose and rotate around the axes. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_UPPER_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = ``11`` + +The minimum rotation in positive direction to break loose and rotate around the axes. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = ``12`` + +A factor that gets multiplied onto all rotations across the axes. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_DAMPING** = ``13`` + +The amount of rotational damping across the axes. The lower, the more dampening occurs. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_RESTITUTION** = ``14`` + +The amount of rotational restitution across the axes. The lower, the more restitution occurs. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_FORCE_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = ``15`` + +The maximum amount of force that can occur, when rotating around the axes. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_ERP: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_ERP** = ``16`` + +When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = ``17`` + +Target speed for the motor at the axes. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam` **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = ``18`` + +Maximum acceleration for the motor at the axes. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_G6DOFJointAxisFlag: -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_MOTOR: - -.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR: +.. rst-class:: classref-enumeration enum **G6DOFJointAxisFlag**: -- **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If set, linear motion is possible within the given limits. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT: -- **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If set, rotational motion is possible. +.. rst-class:: classref-enumeration-constant -- **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = **4** --- If set, there is a rotational motor across these axes. +:ref:`G6DOFJointAxisFlag` **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = ``0`` -- **G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR** = **5** --- If set, there is a linear motor on this axis that targets a specific velocity. +If set, linear motion is possible within the given limits. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag` **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = ``1`` + +If set, rotational motion is possible. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_MOTOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag` **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = ``4`` + +If set, there is a rotational motor across these axes. + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag` **G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR** = ``5`` + +If set, there is a linear motor on this axis that targets a specific velocity. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_ShapeType: -.. _class_PhysicsServer3D_constant_SHAPE_WORLD_BOUNDARY: - -.. _class_PhysicsServer3D_constant_SHAPE_SEPARATION_RAY: - -.. _class_PhysicsServer3D_constant_SHAPE_SPHERE: - -.. _class_PhysicsServer3D_constant_SHAPE_BOX: - -.. _class_PhysicsServer3D_constant_SHAPE_CAPSULE: - -.. _class_PhysicsServer3D_constant_SHAPE_CYLINDER: - -.. _class_PhysicsServer3D_constant_SHAPE_CONVEX_POLYGON: - -.. _class_PhysicsServer3D_constant_SHAPE_CONCAVE_POLYGON: - -.. _class_PhysicsServer3D_constant_SHAPE_HEIGHTMAP: - -.. _class_PhysicsServer3D_constant_SHAPE_SOFT_BODY: - -.. _class_PhysicsServer3D_constant_SHAPE_CUSTOM: +.. rst-class:: classref-enumeration enum **ShapeType**: -- **SHAPE_WORLD_BOUNDARY** = **0** --- The :ref:`Shape3D` is a :ref:`WorldBoundaryShape3D`. +.. _class_PhysicsServer3D_constant_SHAPE_WORLD_BOUNDARY: -- **SHAPE_SEPARATION_RAY** = **1** --- The :ref:`Shape3D` is a :ref:`SeparationRayShape3D`. +.. rst-class:: classref-enumeration-constant -- **SHAPE_SPHERE** = **2** --- The :ref:`Shape3D` is a :ref:`SphereShape3D`. +:ref:`ShapeType` **SHAPE_WORLD_BOUNDARY** = ``0`` -- **SHAPE_BOX** = **3** --- The :ref:`Shape3D` is a :ref:`BoxShape3D`. +The :ref:`Shape3D` is a :ref:`WorldBoundaryShape3D`. -- **SHAPE_CAPSULE** = **4** --- The :ref:`Shape3D` is a :ref:`CapsuleShape3D`. +.. _class_PhysicsServer3D_constant_SHAPE_SEPARATION_RAY: -- **SHAPE_CYLINDER** = **5** --- The :ref:`Shape3D` is a :ref:`CylinderShape3D`. +.. rst-class:: classref-enumeration-constant -- **SHAPE_CONVEX_POLYGON** = **6** --- The :ref:`Shape3D` is a :ref:`ConvexPolygonShape3D`. +:ref:`ShapeType` **SHAPE_SEPARATION_RAY** = ``1`` -- **SHAPE_CONCAVE_POLYGON** = **7** --- The :ref:`Shape3D` is a :ref:`ConcavePolygonShape3D`. +The :ref:`Shape3D` is a :ref:`SeparationRayShape3D`. -- **SHAPE_HEIGHTMAP** = **8** --- The :ref:`Shape3D` is a :ref:`HeightMapShape3D`. +.. _class_PhysicsServer3D_constant_SHAPE_SPHERE: -- **SHAPE_SOFT_BODY** = **9** --- The :ref:`Shape3D` is used internally for a soft body. Any attempt to create this kind of shape results in an error. +.. rst-class:: classref-enumeration-constant -- **SHAPE_CUSTOM** = **10** --- This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. +:ref:`ShapeType` **SHAPE_SPHERE** = ``2`` + +The :ref:`Shape3D` is a :ref:`SphereShape3D`. + +.. _class_PhysicsServer3D_constant_SHAPE_BOX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_BOX** = ``3`` + +The :ref:`Shape3D` is a :ref:`BoxShape3D`. + +.. _class_PhysicsServer3D_constant_SHAPE_CAPSULE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CAPSULE** = ``4`` + +The :ref:`Shape3D` is a :ref:`CapsuleShape3D`. + +.. _class_PhysicsServer3D_constant_SHAPE_CYLINDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CYLINDER** = ``5`` + +The :ref:`Shape3D` is a :ref:`CylinderShape3D`. + +.. _class_PhysicsServer3D_constant_SHAPE_CONVEX_POLYGON: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CONVEX_POLYGON** = ``6`` + +The :ref:`Shape3D` is a :ref:`ConvexPolygonShape3D`. + +.. _class_PhysicsServer3D_constant_SHAPE_CONCAVE_POLYGON: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CONCAVE_POLYGON** = ``7`` + +The :ref:`Shape3D` is a :ref:`ConcavePolygonShape3D`. + +.. _class_PhysicsServer3D_constant_SHAPE_HEIGHTMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_HEIGHTMAP** = ``8`` + +The :ref:`Shape3D` is a :ref:`HeightMapShape3D`. + +.. _class_PhysicsServer3D_constant_SHAPE_SOFT_BODY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_SOFT_BODY** = ``9`` + +The :ref:`Shape3D` is used internally for a soft body. Any attempt to create this kind of shape results in an error. + +.. _class_PhysicsServer3D_constant_SHAPE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShapeType` **SHAPE_CUSTOM** = ``10`` + +This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_AreaParameter: -.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_OVERRIDE_MODE: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_VECTOR: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_IS_POINT: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_POINT_ATTENUATION: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_LINEAR_DAMP: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_ANGULAR_DAMP: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_PRIORITY: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_FORCE_MAGNITUDE: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_SOURCE: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_DIRECTION: - -.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_ATTENUATION_FACTOR: +.. rst-class:: classref-enumeration enum **AreaParameter**: -- **AREA_PARAM_GRAVITY_OVERRIDE_MODE** = **0** --- Constant to set/get gravity override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. +.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_OVERRIDE_MODE: -- **AREA_PARAM_GRAVITY** = **1** --- Constant to set/get gravity strength in an area. +.. rst-class:: classref-enumeration-constant -- **AREA_PARAM_GRAVITY_VECTOR** = **2** --- Constant to set/get gravity vector/center in an area. +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_OVERRIDE_MODE** = ``0`` -- **AREA_PARAM_GRAVITY_IS_POINT** = **3** --- Constant to set/get whether the gravity vector of an area is a direction, or a center point. +Constant to set/get gravity override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. -- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **4** --- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. +.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY: -- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **5** --- This constant was used to set/get the falloff factor for point gravity. It has been superseded by :ref:`AREA_PARAM_GRAVITY_DISTANCE_SCALE`. +.. rst-class:: classref-enumeration-constant -- **AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE** = **6** --- Constant to set/get linear damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. +:ref:`AreaParameter` **AREA_PARAM_GRAVITY** = ``1`` -- **AREA_PARAM_LINEAR_DAMP** = **7** --- Constant to set/get the linear damping factor of an area. +Constant to set/get gravity strength in an area. -- **AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE** = **8** --- Constant to set/get angular damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. +.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_VECTOR: -- **AREA_PARAM_ANGULAR_DAMP** = **9** --- Constant to set/get the angular damping factor of an area. +.. rst-class:: classref-enumeration-constant -- **AREA_PARAM_PRIORITY** = **10** --- Constant to set/get the priority (order of processing) of an area. +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_VECTOR** = ``2`` -- **AREA_PARAM_WIND_FORCE_MAGNITUDE** = **11** --- Constant to set/get the magnitude of area-specific wind force. +Constant to set/get gravity vector/center in an area. -- **AREA_PARAM_WIND_SOURCE** = **12** --- Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows. +.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_IS_POINT: -- **AREA_PARAM_WIND_DIRECTION** = **13** --- Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows. +.. rst-class:: classref-enumeration-constant -- **AREA_PARAM_WIND_ATTENUATION_FACTOR** = **14** --- Constant to set/get the exponential rate at which wind force decreases with distance from its origin. +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_IS_POINT** = ``3`` + +Constant to set/get whether the gravity vector of an area is a direction, or a center point. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = ``4`` + +Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_POINT_ATTENUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = ``5`` + +This constant was used to set/get the falloff factor for point gravity. It has been superseded by :ref:`AREA_PARAM_GRAVITY_DISTANCE_SCALE`. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE** = ``6`` + +Constant to set/get linear damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_LINEAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_LINEAR_DAMP** = ``7`` + +Constant to set/get the linear damping factor of an area. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE** = ``8`` + +Constant to set/get angular damping override mode in an area. See :ref:`AreaSpaceOverrideMode` for possible values. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_ANGULAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_ANGULAR_DAMP** = ``9`` + +Constant to set/get the angular damping factor of an area. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_PRIORITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_PRIORITY** = ``10`` + +Constant to set/get the priority (order of processing) of an area. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_FORCE_MAGNITUDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_WIND_FORCE_MAGNITUDE** = ``11`` + +Constant to set/get the magnitude of area-specific wind force. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_SOURCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_WIND_SOURCE** = ``12`` + +Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_DIRECTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_WIND_DIRECTION** = ``13`` + +Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows. + +.. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_ATTENUATION_FACTOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaParameter` **AREA_PARAM_WIND_ATTENUATION_FACTOR** = ``14`` + +Constant to set/get the exponential rate at which wind force decreases with distance from its origin. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_AreaSpaceOverrideMode: -.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_DISABLED: - -.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_COMBINE: - -.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_COMBINE_REPLACE: - -.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_REPLACE: - -.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_REPLACE_COMBINE: +.. rst-class:: classref-enumeration enum **AreaSpaceOverrideMode**: -- **AREA_SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. +.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_DISABLED: -- **AREA_SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. +.. rst-class:: classref-enumeration-constant -- **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_DISABLED** = ``0`` -- **AREA_SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. +This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. -- **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. +.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_COMBINE** = ``1`` + +This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + +.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_COMBINE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = ``2`` + +This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + +.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_REPLACE** = ``3`` + +This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + +.. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_REPLACE_COMBINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaSpaceOverrideMode` **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = ``4`` + +This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_BodyMode: -.. _class_PhysicsServer3D_constant_BODY_MODE_STATIC: - -.. _class_PhysicsServer3D_constant_BODY_MODE_KINEMATIC: - -.. _class_PhysicsServer3D_constant_BODY_MODE_RIGID: - -.. _class_PhysicsServer3D_constant_BODY_MODE_RIGID_LINEAR: +.. rst-class:: classref-enumeration enum **BodyMode**: -- **BODY_MODE_STATIC** = **0** --- Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. +.. _class_PhysicsServer3D_constant_BODY_MODE_STATIC: -- **BODY_MODE_KINEMATIC** = **1** --- Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. +.. rst-class:: classref-enumeration-constant -- **BODY_MODE_RIGID** = **2** --- Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. +:ref:`BodyMode` **BODY_MODE_STATIC** = ``0`` -- **BODY_MODE_RIGID_LINEAR** = **3** --- Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. +Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. + +.. _class_PhysicsServer3D_constant_BODY_MODE_KINEMATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyMode` **BODY_MODE_KINEMATIC** = ``1`` + +Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. + +.. _class_PhysicsServer3D_constant_BODY_MODE_RIGID: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyMode` **BODY_MODE_RIGID** = ``2`` + +Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. + +.. _class_PhysicsServer3D_constant_BODY_MODE_RIGID_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyMode` **BODY_MODE_RIGID_LINEAR** = ``3`` + +Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_BodyParameter: -.. _class_PhysicsServer3D_constant_BODY_PARAM_BOUNCE: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_FRICTION: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_MASS: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_INERTIA: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_CENTER_OF_MASS: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_GRAVITY_SCALE: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_LINEAR_DAMP_MODE: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_ANGULAR_DAMP_MODE: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_LINEAR_DAMP: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_ANGULAR_DAMP: - -.. _class_PhysicsServer3D_constant_BODY_PARAM_MAX: +.. rst-class:: classref-enumeration enum **BodyParameter**: -- **BODY_PARAM_BOUNCE** = **0** --- Constant to set/get a body's bounce factor. +.. _class_PhysicsServer3D_constant_BODY_PARAM_BOUNCE: -- **BODY_PARAM_FRICTION** = **1** --- Constant to set/get a body's friction. +.. rst-class:: classref-enumeration-constant -- **BODY_PARAM_MASS** = **2** --- Constant to set/get a body's mass. +:ref:`BodyParameter` **BODY_PARAM_BOUNCE** = ``0`` -- **BODY_PARAM_INERTIA** = **3** --- Constant to set/get a body's inertia. +Constant to set/get a body's bounce factor. -- **BODY_PARAM_CENTER_OF_MASS** = **4** --- Constant to set/get a body's center of mass position in the body's local coordinate system. +.. _class_PhysicsServer3D_constant_BODY_PARAM_FRICTION: -- **BODY_PARAM_GRAVITY_SCALE** = **5** --- Constant to set/get a body's gravity multiplier. +.. rst-class:: classref-enumeration-constant -- **BODY_PARAM_LINEAR_DAMP_MODE** = **6** --- Constant to set/get a body's linear dampening mode. See :ref:`BodyDampMode` for possible values. +:ref:`BodyParameter` **BODY_PARAM_FRICTION** = ``1`` -- **BODY_PARAM_ANGULAR_DAMP_MODE** = **7** --- Constant to set/get a body's angular dampening mode. See :ref:`BodyDampMode` for possible values. +Constant to set/get a body's friction. -- **BODY_PARAM_LINEAR_DAMP** = **8** --- Constant to set/get a body's linear dampening factor. +.. _class_PhysicsServer3D_constant_BODY_PARAM_MASS: -- **BODY_PARAM_ANGULAR_DAMP** = **9** --- Constant to set/get a body's angular dampening factor. +.. rst-class:: classref-enumeration-constant -- **BODY_PARAM_MAX** = **10** --- Represents the size of the :ref:`BodyParameter` enum. +:ref:`BodyParameter` **BODY_PARAM_MASS** = ``2`` + +Constant to set/get a body's mass. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_INERTIA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_INERTIA** = ``3`` + +Constant to set/get a body's inertia. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_CENTER_OF_MASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_CENTER_OF_MASS** = ``4`` + +Constant to set/get a body's center of mass position in the body's local coordinate system. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_GRAVITY_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_GRAVITY_SCALE** = ``5`` + +Constant to set/get a body's gravity multiplier. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_LINEAR_DAMP_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_LINEAR_DAMP_MODE** = ``6`` + +Constant to set/get a body's linear dampening mode. See :ref:`BodyDampMode` for possible values. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_ANGULAR_DAMP_MODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_ANGULAR_DAMP_MODE** = ``7`` + +Constant to set/get a body's angular dampening mode. See :ref:`BodyDampMode` for possible values. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_LINEAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_LINEAR_DAMP** = ``8`` + +Constant to set/get a body's linear dampening factor. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_ANGULAR_DAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_ANGULAR_DAMP** = ``9`` + +Constant to set/get a body's angular dampening factor. + +.. _class_PhysicsServer3D_constant_BODY_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyParameter` **BODY_PARAM_MAX** = ``10`` + +Represents the size of the :ref:`BodyParameter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_BodyDampMode: -.. _class_PhysicsServer3D_constant_BODY_DAMP_MODE_COMBINE: - -.. _class_PhysicsServer3D_constant_BODY_DAMP_MODE_REPLACE: +.. rst-class:: classref-enumeration enum **BodyDampMode**: -- **BODY_DAMP_MODE_COMBINE** = **0** --- The body's damping value is added to any value set in areas or the default value. +.. _class_PhysicsServer3D_constant_BODY_DAMP_MODE_COMBINE: -- **BODY_DAMP_MODE_REPLACE** = **1** --- The body's damping value replaces any value set in areas or the default value. +.. rst-class:: classref-enumeration-constant + +:ref:`BodyDampMode` **BODY_DAMP_MODE_COMBINE** = ``0`` + +The body's damping value is added to any value set in areas or the default value. + +.. _class_PhysicsServer3D_constant_BODY_DAMP_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyDampMode` **BODY_DAMP_MODE_REPLACE** = ``1`` + +The body's damping value replaces any value set in areas or the default value. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_BodyState: -.. _class_PhysicsServer3D_constant_BODY_STATE_TRANSFORM: - -.. _class_PhysicsServer3D_constant_BODY_STATE_LINEAR_VELOCITY: - -.. _class_PhysicsServer3D_constant_BODY_STATE_ANGULAR_VELOCITY: - -.. _class_PhysicsServer3D_constant_BODY_STATE_SLEEPING: - -.. _class_PhysicsServer3D_constant_BODY_STATE_CAN_SLEEP: +.. rst-class:: classref-enumeration enum **BodyState**: -- **BODY_STATE_TRANSFORM** = **0** --- Constant to set/get the current transform matrix of the body. +.. _class_PhysicsServer3D_constant_BODY_STATE_TRANSFORM: -- **BODY_STATE_LINEAR_VELOCITY** = **1** --- Constant to set/get the current linear velocity of the body. +.. rst-class:: classref-enumeration-constant -- **BODY_STATE_ANGULAR_VELOCITY** = **2** --- Constant to set/get the current angular velocity of the body. +:ref:`BodyState` **BODY_STATE_TRANSFORM** = ``0`` -- **BODY_STATE_SLEEPING** = **3** --- Constant to sleep/wake up a body, or to get whether it is sleeping. +Constant to set/get the current transform matrix of the body. -- **BODY_STATE_CAN_SLEEP** = **4** --- Constant to set/get whether the body can sleep. +.. _class_PhysicsServer3D_constant_BODY_STATE_LINEAR_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_LINEAR_VELOCITY** = ``1`` + +Constant to set/get the current linear velocity of the body. + +.. _class_PhysicsServer3D_constant_BODY_STATE_ANGULAR_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_ANGULAR_VELOCITY** = ``2`` + +Constant to set/get the current angular velocity of the body. + +.. _class_PhysicsServer3D_constant_BODY_STATE_SLEEPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_SLEEPING** = ``3`` + +Constant to sleep/wake up a body, or to get whether it is sleeping. + +.. _class_PhysicsServer3D_constant_BODY_STATE_CAN_SLEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyState` **BODY_STATE_CAN_SLEEP** = ``4`` + +Constant to set/get whether the body can sleep. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_AreaBodyStatus: -.. _class_PhysicsServer3D_constant_AREA_BODY_ADDED: - -.. _class_PhysicsServer3D_constant_AREA_BODY_REMOVED: +.. rst-class:: classref-enumeration enum **AreaBodyStatus**: -- **AREA_BODY_ADDED** = **0** --- The value of the first parameter and area callback function receives, when an object enters one of its shapes. +.. _class_PhysicsServer3D_constant_AREA_BODY_ADDED: -- **AREA_BODY_REMOVED** = **1** --- The value of the first parameter and area callback function receives, when an object exits one of its shapes. +.. rst-class:: classref-enumeration-constant + +:ref:`AreaBodyStatus` **AREA_BODY_ADDED** = ``0`` + +The value of the first parameter and area callback function receives, when an object enters one of its shapes. + +.. _class_PhysicsServer3D_constant_AREA_BODY_REMOVED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AreaBodyStatus` **AREA_BODY_REMOVED** = ``1`` + +The value of the first parameter and area callback function receives, when an object exits one of its shapes. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_ProcessInfo: -.. _class_PhysicsServer3D_constant_INFO_ACTIVE_OBJECTS: - -.. _class_PhysicsServer3D_constant_INFO_COLLISION_PAIRS: - -.. _class_PhysicsServer3D_constant_INFO_ISLAND_COUNT: +.. rst-class:: classref-enumeration enum **ProcessInfo**: -- **INFO_ACTIVE_OBJECTS** = **0** --- Constant to get the number of objects that are not sleeping. +.. _class_PhysicsServer3D_constant_INFO_ACTIVE_OBJECTS: -- **INFO_COLLISION_PAIRS** = **1** --- Constant to get the number of possible collisions. +.. rst-class:: classref-enumeration-constant -- **INFO_ISLAND_COUNT** = **2** --- Constant to get the number of space regions where a collision could occur. +:ref:`ProcessInfo` **INFO_ACTIVE_OBJECTS** = ``0`` + +Constant to get the number of objects that are not sleeping. + +.. _class_PhysicsServer3D_constant_INFO_COLLISION_PAIRS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessInfo` **INFO_COLLISION_PAIRS** = ``1`` + +Constant to get the number of possible collisions. + +.. _class_PhysicsServer3D_constant_INFO_ISLAND_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessInfo` **INFO_ISLAND_COUNT** = ``2`` + +Constant to get the number of space regions where a collision could occur. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_SpaceParameter: -.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS: - -.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_MAX_SEPARATION: - -.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION: - -.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_DEFAULT_BIAS: - -.. _class_PhysicsServer3D_constant_SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD: - -.. _class_PhysicsServer3D_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD: - -.. _class_PhysicsServer3D_constant_SPACE_PARAM_BODY_TIME_TO_SLEEP: - -.. _class_PhysicsServer3D_constant_SPACE_PARAM_SOLVER_ITERATIONS: +.. rst-class:: classref-enumeration enum **SpaceParameter**: -- **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. +.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS: -- **SPACE_PARAM_CONTACT_MAX_SEPARATION** = **1** --- Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. +.. rst-class:: classref-enumeration-constant -- **SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION** = **2** --- Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = ``0`` -- **SPACE_PARAM_CONTACT_DEFAULT_BIAS** = **3** --- Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. +Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. -- **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **4** --- Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. +.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_MAX_SEPARATION: -- **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **5** --- Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. +.. rst-class:: classref-enumeration-constant -- **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **6** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_MAX_SEPARATION** = ``1`` -- **SPACE_PARAM_SOLVER_ITERATIONS** = **7** --- Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance. +Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. + +.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION** = ``2`` + +Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + +.. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_DEFAULT_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_CONTACT_DEFAULT_BIAS** = ``3`` + +Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. + +.. _class_PhysicsServer3D_constant_SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = ``4`` + +Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + +.. _class_PhysicsServer3D_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = ``5`` + +Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + +.. _class_PhysicsServer3D_constant_SPACE_PARAM_BODY_TIME_TO_SLEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_BODY_TIME_TO_SLEEP** = ``6`` + +Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + +.. _class_PhysicsServer3D_constant_SPACE_PARAM_SOLVER_ITERATIONS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpaceParameter` **SPACE_PARAM_SOLVER_ITERATIONS** = ``7`` + +Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance. + +.. rst-class:: classref-item-separator ---- .. _enum_PhysicsServer3D_BodyAxis: -.. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_X: - -.. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_Y: - -.. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_Z: - -.. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_X: - -.. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_Y: - -.. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_Z: +.. rst-class:: classref-enumeration enum **BodyAxis**: -- **BODY_AXIS_LINEAR_X** = **1** +.. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_X: -- **BODY_AXIS_LINEAR_Y** = **2** +.. rst-class:: classref-enumeration-constant -- **BODY_AXIS_LINEAR_Z** = **4** +:ref:`BodyAxis` **BODY_AXIS_LINEAR_X** = ``1`` -- **BODY_AXIS_ANGULAR_X** = **8** -- **BODY_AXIS_ANGULAR_Y** = **16** -- **BODY_AXIS_ANGULAR_Z** = **32** +.. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyAxis` **BODY_AXIS_LINEAR_Y** = ``2`` + + + +.. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyAxis` **BODY_AXIS_LINEAR_Z** = ``4`` + + + +.. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyAxis` **BODY_AXIS_ANGULAR_X** = ``8`` + + + +.. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyAxis` **BODY_AXIS_ANGULAR_Y** = ``16`` + + + +.. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyAxis` **BODY_AXIS_ANGULAR_Z** = ``32`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsServer3D_method_area_add_shape: -- void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** +.. rst-class:: classref-method + +void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_attach_object_instance_id: -- void **area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** +.. rst-class:: classref-method + +void **area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_clear_shapes: -- void **area_clear_shapes** **(** :ref:`RID` area **)** +.. rst-class:: classref-method + +void **area_clear_shapes** **(** :ref:`RID` area **)** Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_create: -- :ref:`RID` **area_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **area_create** **(** **)** Creates an :ref:`Area3D`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_collision_layer: -- :ref:`int` **area_get_collision_layer** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_collision_layer** **(** :ref:`RID` area **)** |const| Returns the physics layer or layers an area belongs to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_collision_mask: -- :ref:`int` **area_get_collision_mask** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_collision_mask** **(** :ref:`RID` area **)** |const| Returns the physics layer or layers an area can contact with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_object_instance_id: -- :ref:`int` **area_get_object_instance_id** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_object_instance_id** **(** :ref:`RID` area **)** |const| Gets the instance ID of the object the area is assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_param: -- :ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |const| Returns an area parameter value. A list of available parameters is on the :ref:`AreaParameter` constants. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_shape: -- :ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| Returns the :ref:`RID` of the nth shape of an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_shape_count: -- :ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** |const| Returns the number of shapes assigned to an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_shape_transform: -- :ref:`Transform3D` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |const| Returns the transform matrix of a shape within an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_space: -- :ref:`RID` **area_get_space** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **area_get_space** **(** :ref:`RID` area **)** |const| Returns the space assigned to the area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_get_transform: -- :ref:`Transform3D` **area_get_transform** **(** :ref:`RID` area **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **area_get_transform** **(** :ref:`RID` area **)** |const| Returns the transform matrix for an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_remove_shape: -- void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** +.. rst-class:: classref-method + +void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** Removes a shape from an area. It does not delete the shape, so it can be reassigned later. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_area_monitor_callback: -- void **area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** +.. rst-class:: classref-method + +void **area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_collision_layer: -- void **area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** +.. rst-class:: classref-method + +void **area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** Assigns the area to one or many physics layers. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_collision_mask: -- void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** Sets which physics layers the area will monitor. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_monitor_callback: -- void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** +.. rst-class:: classref-method + +void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: @@ -1132,133 +1851,193 @@ Sets the function to call when any body/area enters or exits the area. This call 5: The shape index of the area where the object entered/exited. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_monitorable: -- void **area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** +.. rst-class:: classref-method + +void **area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_param: -- void **area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** Sets the value for an area parameter. A list of available parameters is on the :ref:`AreaParameter` constants. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_ray_pickable: -- void **area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool` enable **)** Sets object pickable with rays. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_shape: -- void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** +.. rst-class:: classref-method + +void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** Substitutes a given area shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_shape_disabled: -- void **area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_shape_transform: -- void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** Sets the transform matrix for an area shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_space: -- void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** +.. rst-class:: classref-method + +void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** Assigns a space to the area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_area_set_transform: -- void **area_set_transform** **(** :ref:`RID` area, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **area_set_transform** **(** :ref:`RID` area, :ref:`Transform3D` transform **)** Sets the transform matrix for an area. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_add_collision_exception: -- void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** +.. rst-class:: classref-method + +void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** Adds a body to the list of bodies exempt from collisions. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_add_constant_central_force: -- void **body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** +.. rst-class:: classref-method + +void **body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector3` 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))``. This is equivalent to using :ref:`body_add_constant_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_add_constant_force: -- void **body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** 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))``. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_add_constant_torque: -- void **body_add_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **body_add_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` 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))``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_add_shape: -- void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** +.. rst-class:: classref-method + +void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool` disabled=false **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_apply_central_force: -- void **body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** +.. rst-class:: classref-method + +void **body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using :ref:`body_apply_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_apply_central_impulse: -- void **body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** +.. rst-class:: classref-method + +void **body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** Applies a directional impulse without affecting rotation. @@ -1266,21 +2045,29 @@ An impulse is time-independent! Applying an impulse every frame would result in This is equivalent to using :ref:`body_apply_impulse` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_apply_force: -- void **body_apply_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **body_apply_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_apply_impulse: -- void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Applies a positioned impulse to the body. @@ -1288,303 +2075,443 @@ An impulse is time-independent! Applying an impulse every frame would result in \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_apply_torque: -- void **body_apply_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **body_apply_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_apply_torque_impulse: -- void **body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** +.. rst-class:: classref-method + +void **body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_attach_object_instance_id: -- void **body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** +.. rst-class:: classref-method + +void **body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_clear_shapes: -- void **body_clear_shapes** **(** :ref:`RID` body **)** +.. rst-class:: classref-method + +void **body_clear_shapes** **(** :ref:`RID` body **)** Removes all shapes from a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_create: -- :ref:`RID` **body_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **body_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_collision_layer: -- :ref:`int` **body_get_collision_layer** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_collision_layer** **(** :ref:`RID` body **)** |const| Returns the physics layer or layers a body belongs to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_collision_mask: -- :ref:`int` **body_get_collision_mask** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_collision_mask** **(** :ref:`RID` body **)** |const| Returns the physics layer or layers a body can collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_collision_priority: -- :ref:`float` **body_get_collision_priority** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`float` **body_get_collision_priority** **(** :ref:`RID` body **)** |const| Returns the body's collision priority. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_constant_force: -- :ref:`Vector3` **body_get_constant_force** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **body_get_constant_force** **(** :ref:`RID` body **)** |const| Returns the body's total constant positional forces applied during each physics update. See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_constant_torque: -- :ref:`Vector3` **body_get_constant_torque** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **body_get_constant_torque** **(** :ref:`RID` body **)** |const| Returns the body's total constant rotational forces applied during each physics update. See :ref:`body_add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_direct_state: -- :ref:`PhysicsDirectBodyState3D` **body_get_direct_state** **(** :ref:`RID` body **)** +.. rst-class:: classref-method + +:ref:`PhysicsDirectBodyState3D` **body_get_direct_state** **(** :ref:`RID` body **)** Returns the :ref:`PhysicsDirectBodyState3D` of the body. Returns ``null`` if the body is destroyed or removed from the physics space. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_max_contacts_reported: -- :ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** |const| Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_mode: -- :ref:`BodyMode` **body_get_mode** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`BodyMode` **body_get_mode** **(** :ref:`RID` body **)** |const| Returns the body mode. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_object_instance_id: -- :ref:`int` **body_get_object_instance_id** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_object_instance_id** **(** :ref:`RID` body **)** |const| Gets the instance ID of the object the area is assigned to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_param: -- :ref:`Variant` **body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |const| Returns the value of a body parameter. A list of available parameters is on the :ref:`BodyParameter` constants. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_shape: -- :ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| Returns the :ref:`RID` of the nth shape of a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_shape_count: -- :ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** |const| Returns the number of shapes assigned to a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_shape_transform: -- :ref:`Transform3D` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |const| Returns the transform matrix of a body shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_space: -- :ref:`RID` **body_get_space** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **body_get_space** **(** :ref:`RID` body **)** |const| Returns the :ref:`RID` of the space assigned to a body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_get_state: -- :ref:`Variant` **body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |const| Returns a body state. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_is_axis_locked: -- :ref:`bool` **body_is_axis_locked** **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **body_is_axis_locked** **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_is_continuous_collision_detection_enabled: -- :ref:`bool` **body_is_continuous_collision_detection_enabled** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **body_is_continuous_collision_detection_enabled** **(** :ref:`RID` body **)** |const| If ``true``, the continuous collision detection mode is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_is_omitting_force_integration: -- :ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** |const| Returns whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_remove_collision_exception: -- void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** +.. rst-class:: classref-method + +void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** Removes a body from the list of bodies exempt from collisions. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_remove_shape: -- void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** +.. rst-class:: classref-method + +void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_reset_mass_properties: -- void **body_reset_mass_properties** **(** :ref:`RID` body **)** +.. rst-class:: classref-method + +void **body_reset_mass_properties** **(** :ref:`RID` body **)** Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using :ref:`body_set_param`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_axis_lock: -- void **body_set_axis_lock** **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** +.. rst-class:: classref-method + +void **body_set_axis_lock** **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_axis_velocity: -- void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** +.. rst-class:: classref-method + +void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_collision_layer: -- void **body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** +.. rst-class:: classref-method + +void **body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** Sets the physics layer or layers a body belongs to. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_collision_mask: -- void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** Sets the physics layer or layers a body can collide with. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_collision_priority: -- void **body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** +.. rst-class:: classref-method + +void **body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** Sets the body's collision priority. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_constant_force: -- void **body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** +.. rst-class:: classref-method + +void **body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** Sets the body's total constant positional forces applied during each physics update. See :ref:`body_add_constant_force` and :ref:`body_add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_constant_torque: -- void **body_set_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **body_set_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** Sets the body's total constant rotational forces applied during each physics update. See :ref:`body_add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_enable_continuous_collision_detection: -- void **body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** If ``true``, the continuous collision detection mode is enabled. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_force_integration_callback: -- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** +.. rst-class:: classref-method + +void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** Sets the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force_integration`). @@ -1594,535 +2521,783 @@ The force integration function takes 2 arguments: \ ``userdata:`` Optional user data, if it was passed when calling ``body_set_force_integration_callback``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_max_contacts_reported: -- void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** +.. rst-class:: classref-method + +void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_mode: -- void **body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** +.. rst-class:: classref-method + +void **body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** Sets the body mode, from one of the :ref:`BodyMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_omit_force_integration: -- void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** Sets whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_param: -- void **body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** Sets a body parameter. A list of available parameters is on the :ref:`BodyParameter` constants. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_ray_pickable: -- void **body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** Sets the body pickable with rays if ``enable`` is set. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_shape: -- void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** +.. rst-class:: classref-method + +void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** Substitutes a given body shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_shape_disabled: -- void **body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_shape_transform: -- void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** Sets the transform matrix for a body shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_space: -- void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** +.. rst-class:: classref-method + +void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** Assigns a space to the body (see :ref:`space_create`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_set_state: -- void **body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** Sets a body state (see :ref:`BodyState` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_body_test_motion: -- :ref:`bool` **body_test_motion** **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters3D` parameters, :ref:`PhysicsTestMotionResult3D` result=null **)** +.. rst-class:: classref-method + +:ref:`bool` **body_test_motion** **(** :ref:`RID` body, :ref:`PhysicsTestMotionParameters3D` parameters, :ref:`PhysicsTestMotionResult3D` result=null **)** Returns ``true`` if a collision would result from moving along a motion vector from a given point in space. :ref:`PhysicsTestMotionParameters3D` is passed to set motion parameters. :ref:`PhysicsTestMotionResult3D` can be passed to return additional information. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_box_shape_create: -- :ref:`RID` **box_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **box_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_capsule_shape_create: -- :ref:`RID` **capsule_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **capsule_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_concave_polygon_shape_create: -- :ref:`RID` **concave_polygon_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **concave_polygon_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_cone_twist_joint_get_param: -- :ref:`float` **cone_twist_joint_get_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **cone_twist_joint_get_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |const| Gets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_cone_twist_joint_set_param: -- void **cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** Sets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_convex_polygon_shape_create: -- :ref:`RID` **convex_polygon_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **convex_polygon_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_custom_shape_create: -- :ref:`RID` **custom_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **custom_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_cylinder_shape_create: -- :ref:`RID` **cylinder_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **cylinder_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_free_rid: -- void **free_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **free_rid** **(** :ref:`RID` rid **)** Destroys any of the objects created by PhysicsServer3D. If the :ref:`RID` passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_generic_6dof_joint_get_flag: -- :ref:`bool` **generic_6dof_joint_get_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **generic_6dof_joint_get_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |const| Gets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_generic_6dof_joint_get_param: -- :ref:`float` **generic_6dof_joint_get_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **generic_6dof_joint_get_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |const| Gets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_generic_6dof_joint_set_flag: -- void **generic_6dof_joint_set_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **generic_6dof_joint_set_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** Sets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_generic_6dof_joint_set_param: -- void **generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** Sets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_get_process_info: -- :ref:`int` **get_process_info** **(** :ref:`ProcessInfo` process_info **)** +.. rst-class:: classref-method + +:ref:`int` **get_process_info** **(** :ref:`ProcessInfo` process_info **)** Returns information about the current state of the 3D physics engine. See :ref:`ProcessInfo` for a list of available states. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_heightmap_shape_create: -- :ref:`RID` **heightmap_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **heightmap_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_hinge_joint_get_flag: -- :ref:`bool` **hinge_joint_get_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **hinge_joint_get_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |const| Gets a hinge_joint flag (see :ref:`HingeJointFlag` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_hinge_joint_get_param: -- :ref:`float` **hinge_joint_get_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **hinge_joint_get_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |const| Gets a hinge_joint parameter (see :ref:`HingeJointParam`). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_hinge_joint_set_flag: -- void **hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** Sets a hinge_joint flag (see :ref:`HingeJointFlag` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_hinge_joint_set_param: -- void **hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** Sets a hinge_joint parameter (see :ref:`HingeJointParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_clear: -- void **joint_clear** **(** :ref:`RID` joint **)** +.. rst-class:: classref-method + +void **joint_clear** **(** :ref:`RID` joint **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_create: -- :ref:`RID` **joint_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **joint_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_get_solver_priority: -- :ref:`int` **joint_get_solver_priority** **(** :ref:`RID` joint **)** |const| +.. rst-class:: classref-method + +:ref:`int` **joint_get_solver_priority** **(** :ref:`RID` joint **)** |const| Gets the priority value of the Joint3D. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_get_type: -- :ref:`JointType` **joint_get_type** **(** :ref:`RID` joint **)** |const| +.. rst-class:: classref-method + +:ref:`JointType` **joint_get_type** **(** :ref:`RID` joint **)** |const| Returns the type of the Joint3D. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_make_cone_twist: -- void **joint_make_cone_twist** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** +.. rst-class:: classref-method + +void **joint_make_cone_twist** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_make_generic_6dof: -- void **joint_make_generic_6dof** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** +.. rst-class:: classref-method + +void **joint_make_generic_6dof** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_make_hinge: -- void **joint_make_hinge** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** +.. rst-class:: classref-method + +void **joint_make_hinge** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_make_pin: -- void **joint_make_pin** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** +.. rst-class:: classref-method + +void **joint_make_pin** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_make_slider: -- void **joint_make_slider** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** +.. rst-class:: classref-method + +void **joint_make_slider** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_joint_set_solver_priority: -- void **joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int` priority **)** +.. rst-class:: classref-method + +void **joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int` priority **)** Sets the priority value of the Joint3D. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_pin_joint_get_local_a: -- :ref:`Vector3` **pin_joint_get_local_a** **(** :ref:`RID` joint **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **pin_joint_get_local_a** **(** :ref:`RID` joint **)** |const| Returns position of the joint in the local space of body a of the joint. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_pin_joint_get_local_b: -- :ref:`Vector3` **pin_joint_get_local_b** **(** :ref:`RID` joint **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **pin_joint_get_local_b** **(** :ref:`RID` joint **)** |const| Returns position of the joint in the local space of body b of the joint. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_pin_joint_get_param: -- :ref:`float` **pin_joint_get_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **pin_joint_get_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |const| Gets a pin_joint parameter (see :ref:`PinJointParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_pin_joint_set_local_a: -- void **pin_joint_set_local_a** **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** +.. rst-class:: classref-method + +void **pin_joint_set_local_a** **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** Sets position of the joint in the local space of body a of the joint. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_pin_joint_set_local_b: -- void **pin_joint_set_local_b** **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** +.. rst-class:: classref-method + +void **pin_joint_set_local_b** **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** Sets position of the joint in the local space of body b of the joint. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_pin_joint_set_param: -- void **pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** Sets a pin_joint parameter (see :ref:`PinJointParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_separation_ray_shape_create: -- :ref:`RID` **separation_ray_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **separation_ray_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_set_active: -- void **set_active** **(** :ref:`bool` active **)** +.. rst-class:: classref-method + +void **set_active** **(** :ref:`bool` active **)** Activates or deactivates the 3D physics engine. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_shape_get_data: -- :ref:`Variant` **shape_get_data** **(** :ref:`RID` shape **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **shape_get_data** **(** :ref:`RID` shape **)** |const| Returns the shape data. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_shape_get_type: -- :ref:`ShapeType` **shape_get_type** **(** :ref:`RID` shape **)** |const| +.. rst-class:: classref-method + +:ref:`ShapeType` **shape_get_type** **(** :ref:`RID` shape **)** |const| Returns the type of shape (see :ref:`ShapeType` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_shape_set_data: -- void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** +.. rst-class:: classref-method + +void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_slider_joint_get_param: -- :ref:`float` **slider_joint_get_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **slider_joint_get_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |const| Gets a slider_joint parameter (see :ref:`SliderJointParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_slider_joint_set_param: -- void **slider_joint_set_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **slider_joint_set_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** Gets a slider_joint parameter (see :ref:`SliderJointParam` constants). +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_soft_body_get_bounds: -- :ref:`AABB` **soft_body_get_bounds** **(** :ref:`RID` body **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **soft_body_get_bounds** **(** :ref:`RID` body **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_space_create: -- :ref:`RID` **space_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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`, or to a body with :ref:`body_set_space`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_space_get_direct_state: -- :ref:`PhysicsDirectSpaceState3D` **space_get_direct_state** **(** :ref:`RID` space **)** +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState3D` **space_get_direct_state** **(** :ref:`RID` space **)** Returns the state of a space, a :ref:`PhysicsDirectSpaceState3D`. This object can be used to make collision/intersection queries. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_space_get_param: -- :ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |const| Returns the value of a space parameter. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_space_is_active: -- :ref:`bool` **space_is_active** **(** :ref:`RID` space **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **space_is_active** **(** :ref:`RID` space **)** |const| Returns whether the space is active. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_space_set_active: -- void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** +.. rst-class:: classref-method + +void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** Marks a space as active. It will not have an effect, unless it is assigned to an area or body. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_space_set_param: -- void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** Sets the value for a space parameter. A list of available parameters is on the :ref:`SpaceParameter` constants. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_sphere_shape_create: -- :ref:`RID` **sphere_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **sphere_shape_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3D_method_world_boundary_shape_create: -- :ref:`RID` **world_boundary_shape_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **world_boundary_shape_create** **(** **)** .. container:: contribute diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index 13ad17c0b..36a73c5e3 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -16,2239 +16,2992 @@ PhysicsServer3DExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_end_sync` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_finish` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_flush_queries` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_init` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_sync` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_flush_queries` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsServer3DExtension_method__area_add_shape: -- void **_area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_attach_object_instance_id: -- void **_area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** |virtual| +.. rst-class:: classref-method + +void **_area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_clear_shapes: -- void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| +.. rst-class:: classref-method + +void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_create: -- :ref:`RID` **_area_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_area_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_collision_layer: -- :ref:`int` **_area_get_collision_layer** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_collision_layer** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_collision_mask: -- :ref:`int` **_area_get_collision_mask** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_collision_mask** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_object_instance_id: -- :ref:`int` **_area_get_object_instance_id** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_object_instance_id** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_param: -- :ref:`Variant` **_area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_shape: -- :ref:`RID` **_area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_shape_count: -- :ref:`int` **_area_get_shape_count** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_area_get_shape_count** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_shape_transform: -- :ref:`Transform3D` **_area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **_area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_space: -- :ref:`RID` **_area_get_space** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_area_get_space** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_get_transform: -- :ref:`Transform3D` **_area_get_transform** **(** :ref:`RID` area **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **_area_get_transform** **(** :ref:`RID` area **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_remove_shape: -- void **_area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_area_monitor_callback: -- void **_area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_collision_layer: -- void **_area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_collision_mask: -- void **_area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_monitor_callback: -- void **_area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_monitorable: -- void **_area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_param: -- void **_area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_ray_pickable: -- void **_area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_shape: -- void **_area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_shape_disabled: -- void **_area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_shape_transform: -- void **_area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_space: -- void **_area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__area_set_transform: -- void **_area_set_transform** **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_area_set_transform** **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_add_collision_exception: -- void **_body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_add_constant_central_force: -- void **_body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_add_constant_force: -- void **_body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_add_constant_torque: -- void **_body_add_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_add_shape: -- void **_body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_apply_central_force: -- void **_body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_apply_central_impulse: -- void **_body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_apply_force: -- void **_body_apply_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_apply_impulse: -- void **_body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_apply_torque: -- void **_body_apply_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_apply_torque_impulse: -- void **_body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| +.. rst-class:: classref-method + +void **_body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_attach_object_instance_id: -- void **_body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** |virtual| +.. rst-class:: classref-method + +void **_body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_clear_shapes: -- void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| +.. rst-class:: classref-method + +void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_create: -- :ref:`RID` **_body_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_body_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_collision_exceptions: -- :ref:`RID[]` **_body_get_collision_exceptions** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID[]` **_body_get_collision_exceptions** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_collision_layer: -- :ref:`int` **_body_get_collision_layer** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_collision_layer** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_collision_mask: -- :ref:`int` **_body_get_collision_mask** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_collision_mask** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_collision_priority: -- :ref:`float` **_body_get_collision_priority** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_body_get_collision_priority** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_constant_force: -- :ref:`Vector3` **_body_get_constant_force** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_body_get_constant_force** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_constant_torque: -- :ref:`Vector3` **_body_get_constant_torque** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_body_get_constant_torque** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_contacts_reported_depth_threshold: -- :ref:`float` **_body_get_contacts_reported_depth_threshold** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_body_get_contacts_reported_depth_threshold** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_direct_state: -- :ref:`PhysicsDirectBodyState3D` **_body_get_direct_state** **(** :ref:`RID` body **)** |virtual| +.. rst-class:: classref-method + +:ref:`PhysicsDirectBodyState3D` **_body_get_direct_state** **(** :ref:`RID` body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_max_contacts_reported: -- :ref:`int` **_body_get_max_contacts_reported** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_max_contacts_reported** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_mode: -- :ref:`BodyMode` **_body_get_mode** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`BodyMode` **_body_get_mode** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_object_instance_id: -- :ref:`int` **_body_get_object_instance_id** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_object_instance_id** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_param: -- :ref:`Variant` **_body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_shape: -- :ref:`RID` **_body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_shape_count: -- :ref:`int` **_body_get_shape_count** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_shape_count** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_shape_transform: -- :ref:`Transform3D` **_body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **_body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_space: -- :ref:`RID` **_body_get_space** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_body_get_space** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_state: -- :ref:`Variant` **_body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_get_user_flags: -- :ref:`int` **_body_get_user_flags** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_body_get_user_flags** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_is_axis_locked: -- :ref:`bool` **_body_is_axis_locked** **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_body_is_axis_locked** **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_is_continuous_collision_detection_enabled: -- :ref:`bool` **_body_is_continuous_collision_detection_enabled** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_body_is_continuous_collision_detection_enabled** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_is_omitting_force_integration: -- :ref:`bool` **_body_is_omitting_force_integration** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_body_is_omitting_force_integration** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_remove_collision_exception: -- void **_body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| +.. rst-class:: classref-method + +void **_body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_remove_shape: -- void **_body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| +.. rst-class:: classref-method + +void **_body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_reset_mass_properties: -- void **_body_reset_mass_properties** **(** :ref:`RID` body **)** |virtual| +.. rst-class:: classref-method + +void **_body_reset_mass_properties** **(** :ref:`RID` body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_axis_lock: -- void **_body_set_axis_lock** **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_axis_lock** **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_axis_velocity: -- void **_body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_collision_layer: -- void **_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_collision_mask: -- void **_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_collision_priority: -- void **_body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_collision_priority** **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_constant_force: -- void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_constant_torque: -- void **_body_set_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_contacts_reported_depth_threshold: -- void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_enable_continuous_collision_detection: -- void **_body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_force_integration_callback: -- void **_body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_max_contacts_reported: -- void **_body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_mode: -- void **_body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_omit_force_integration: -- void **_body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_param: -- void **_body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_ray_pickable: -- void **_body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_shape: -- void **_body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_shape_disabled: -- void **_body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_shape_transform: -- void **_body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_space: -- void **_body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_state: -- void **_body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_state_sync_callback: -- void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_set_user_flags: -- void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| +.. rst-class:: classref-method + +void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__body_test_motion: -- :ref:`bool` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__box_shape_create: -- :ref:`RID` **_box_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_box_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__capsule_shape_create: -- :ref:`RID` **_capsule_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_capsule_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__concave_polygon_shape_create: -- :ref:`RID` **_concave_polygon_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_concave_polygon_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__cone_twist_joint_get_param: -- :ref:`float` **_cone_twist_joint_get_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_cone_twist_joint_get_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__cone_twist_joint_set_param: -- void **_cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__convex_polygon_shape_create: -- :ref:`RID` **_convex_polygon_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_convex_polygon_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__custom_shape_create: -- :ref:`RID` **_custom_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_custom_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__cylinder_shape_create: -- :ref:`RID` **_cylinder_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_cylinder_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__end_sync: -- void **_end_sync** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_end_sync** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__finish: -- void **_finish** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_finish** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__flush_queries: -- void **_flush_queries** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_flush_queries** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__free_rid: -- void **_free_rid** **(** :ref:`RID` rid **)** |virtual| +.. rst-class:: classref-method + +void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_flag: -- :ref:`bool` **_generic_6dof_joint_get_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_generic_6dof_joint_get_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_param: -- :ref:`float` **_generic_6dof_joint_get_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_generic_6dof_joint_get_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_flag: -- void **_generic_6dof_joint_set_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| +.. rst-class:: classref-method + +void **_generic_6dof_joint_set_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_param: -- void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__get_process_info: -- :ref:`int` **_get_process_info** **(** :ref:`ProcessInfo` process_info **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_get_process_info** **(** :ref:`ProcessInfo` process_info **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__heightmap_shape_create: -- :ref:`RID` **_heightmap_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_heightmap_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__hinge_joint_get_flag: -- :ref:`bool` **_hinge_joint_get_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_hinge_joint_get_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__hinge_joint_get_param: -- :ref:`float` **_hinge_joint_get_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_hinge_joint_get_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__hinge_joint_set_flag: -- void **_hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| +.. rst-class:: classref-method + +void **_hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__hinge_joint_set_param: -- void **_hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__init: -- void **_init** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_init** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__is_flushing_queries: -- :ref:`bool` **_is_flushing_queries** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_flushing_queries** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_clear: -- void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| +.. rst-class:: classref-method + +void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_create: -- :ref:`RID` **_joint_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_joint_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_get_solver_priority: -- :ref:`int` **_joint_get_solver_priority** **(** :ref:`RID` joint **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_joint_get_solver_priority** **(** :ref:`RID` joint **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_get_type: -- :ref:`JointType` **_joint_get_type** **(** :ref:`RID` joint **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`JointType` **_joint_get_type** **(** :ref:`RID` joint **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_make_cone_twist: -- void **_joint_make_cone_twist** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_cone_twist** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_make_generic_6dof: -- void **_joint_make_generic_6dof** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_generic_6dof** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_make_hinge: -- void **_joint_make_hinge** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_hinge** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_make_hinge_simple: -- void **_joint_make_hinge_simple** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_hinge_simple** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_make_pin: -- void **_joint_make_pin** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_pin** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_make_slider: -- void **_joint_make_slider** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| +.. rst-class:: classref-method + +void **_joint_make_slider** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__joint_set_solver_priority: -- void **_joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| +.. rst-class:: classref-method + +void **_joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__pin_joint_get_local_a: -- :ref:`Vector3` **_pin_joint_get_local_a** **(** :ref:`RID` joint **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_pin_joint_get_local_a** **(** :ref:`RID` joint **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__pin_joint_get_local_b: -- :ref:`Vector3` **_pin_joint_get_local_b** **(** :ref:`RID` joint **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_pin_joint_get_local_b** **(** :ref:`RID` joint **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__pin_joint_get_param: -- :ref:`float` **_pin_joint_get_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_pin_joint_get_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__pin_joint_set_local_a: -- void **_pin_joint_set_local_a** **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| +.. rst-class:: classref-method + +void **_pin_joint_set_local_a** **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__pin_joint_set_local_b: -- void **_pin_joint_set_local_b** **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| +.. rst-class:: classref-method + +void **_pin_joint_set_local_b** **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__pin_joint_set_param: -- void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__separation_ray_shape_create: -- :ref:`RID` **_separation_ray_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_separation_ray_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__set_active: -- void **_set_active** **(** :ref:`bool` active **)** |virtual| +.. rst-class:: classref-method + +void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__shape_get_custom_solver_bias: -- :ref:`float` **_shape_get_custom_solver_bias** **(** :ref:`RID` shape **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shape_get_custom_solver_bias** **(** :ref:`RID` shape **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__shape_get_data: -- :ref:`Variant` **_shape_get_data** **(** :ref:`RID` shape **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_shape_get_data** **(** :ref:`RID` shape **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__shape_get_margin: -- :ref:`float` **_shape_get_margin** **(** :ref:`RID` shape **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shape_get_margin** **(** :ref:`RID` shape **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__shape_get_type: -- :ref:`ShapeType` **_shape_get_type** **(** :ref:`RID` shape **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`ShapeType` **_shape_get_type** **(** :ref:`RID` shape **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__shape_set_custom_solver_bias: -- void **_shape_set_custom_solver_bias** **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| +.. rst-class:: classref-method + +void **_shape_set_custom_solver_bias** **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__shape_set_data: -- void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| +.. rst-class:: classref-method + +void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__shape_set_margin: -- void **_shape_set_margin** **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| +.. rst-class:: classref-method + +void **_shape_set_margin** **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__slider_joint_get_param: -- :ref:`float` **_slider_joint_get_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_slider_joint_get_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__slider_joint_set_param: -- void **_slider_joint_set_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_slider_joint_set_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_add_collision_exception: -- void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_create: -- :ref:`RID` **_soft_body_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_soft_body_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_bounds: -- :ref:`AABB` **_soft_body_get_bounds** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`AABB` **_soft_body_get_bounds** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_collision_exceptions: -- :ref:`RID[]` **_soft_body_get_collision_exceptions** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID[]` **_soft_body_get_collision_exceptions** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_collision_layer: -- :ref:`int` **_soft_body_get_collision_layer** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_soft_body_get_collision_layer** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_collision_mask: -- :ref:`int` **_soft_body_get_collision_mask** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_soft_body_get_collision_mask** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_damping_coefficient: -- :ref:`float` **_soft_body_get_damping_coefficient** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_soft_body_get_damping_coefficient** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_drag_coefficient: -- :ref:`float` **_soft_body_get_drag_coefficient** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_soft_body_get_drag_coefficient** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_linear_stiffness: -- :ref:`float` **_soft_body_get_linear_stiffness** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_soft_body_get_linear_stiffness** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_point_global_position: -- :ref:`Vector3` **_soft_body_get_point_global_position** **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector3` **_soft_body_get_point_global_position** **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_pressure_coefficient: -- :ref:`float` **_soft_body_get_pressure_coefficient** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_soft_body_get_pressure_coefficient** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_simulation_precision: -- :ref:`int` **_soft_body_get_simulation_precision** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_soft_body_get_simulation_precision** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_space: -- :ref:`RID` **_soft_body_get_space** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_soft_body_get_space** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_state: -- :ref:`Variant` **_soft_body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_soft_body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_get_total_mass: -- :ref:`float` **_soft_body_get_total_mass** **(** :ref:`RID` body **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_soft_body_get_total_mass** **(** :ref:`RID` body **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_is_point_pinned: -- :ref:`bool` **_soft_body_is_point_pinned** **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_soft_body_is_point_pinned** **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_move_point: -- void **_soft_body_move_point** **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_move_point** **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_pin_point: -- void **_soft_body_pin_point** **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_pin_point** **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_remove_all_pinned_points: -- void **_soft_body_remove_all_pinned_points** **(** :ref:`RID` body **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_remove_all_pinned_points** **(** :ref:`RID` body **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_remove_collision_exception: -- void **_soft_body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_collision_layer: -- void **_soft_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_collision_mask: -- void **_soft_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_damping_coefficient: -- void **_soft_body_set_damping_coefficient** **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_damping_coefficient** **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_drag_coefficient: -- void **_soft_body_set_drag_coefficient** **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_drag_coefficient** **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_linear_stiffness: -- void **_soft_body_set_linear_stiffness** **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_linear_stiffness** **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_mesh: -- void **_soft_body_set_mesh** **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_mesh** **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_pressure_coefficient: -- void **_soft_body_set_pressure_coefficient** **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_pressure_coefficient** **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_ray_pickable: -- void **_soft_body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_simulation_precision: -- void **_soft_body_set_simulation_precision** **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_simulation_precision** **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_space: -- void **_soft_body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_state: -- void **_soft_body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_total_mass: -- void **_soft_body_set_total_mass** **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_total_mass** **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_set_transform: -- void **_soft_body_set_transform** **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_set_transform** **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__soft_body_update_rendering_server: -- void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| +.. rst-class:: classref-method + +void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_create: -- :ref:`RID` **_space_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_space_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_get_contact_count: -- :ref:`int` **_space_get_contact_count** **(** :ref:`RID` space **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_space_get_contact_count** **(** :ref:`RID` space **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_get_contacts: -- :ref:`PackedVector3Array` **_space_get_contacts** **(** :ref:`RID` space **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **_space_get_contacts** **(** :ref:`RID` space **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_get_direct_state: -- :ref:`PhysicsDirectSpaceState3D` **_space_get_direct_state** **(** :ref:`RID` space **)** |virtual| +.. rst-class:: classref-method + +:ref:`PhysicsDirectSpaceState3D` **_space_get_direct_state** **(** :ref:`RID` space **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_get_param: -- :ref:`float` **_space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_is_active: -- :ref:`bool` **_space_is_active** **(** :ref:`RID` space **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_space_is_active** **(** :ref:`RID` space **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_set_active: -- void **_space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| +.. rst-class:: classref-method + +void **_space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_set_debug_contacts: -- void **_space_set_debug_contacts** **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| +.. rst-class:: classref-method + +void **_space_set_debug_contacts** **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__space_set_param: -- void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| +.. rst-class:: classref-method + +void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__sphere_shape_create: -- :ref:`RID` **_sphere_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_sphere_shape_create** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__step: -- void **_step** **(** :ref:`float` step **)** |virtual| +.. rst-class:: classref-method + +void **_step** **(** :ref:`float` step **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__sync: -- void **_sync** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_sync** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DExtension_method__world_boundary_shape_create: -- :ref:`RID` **_world_boundary_shape_create** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_world_boundary_shape_create** **(** **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsserver3dmanager.rst b/classes/class_physicsserver3dmanager.rst index 3a9c2e0a3..2e67fc3d7 100644 --- a/classes/class_physicsserver3dmanager.rst +++ b/classes/class_physicsserver3dmanager.rst @@ -14,36 +14,55 @@ PhysicsServer3DManager Manager for 3D physics server implementations. +.. rst-class:: classref-introduction-group + Description ----------- -``PhysicsServer3DManager`` is the API for registering :ref:`PhysicsServer3D` implementations, and for setting the default implementation. +**PhysicsServer3DManager** is the API for registering :ref:`PhysicsServer3D` implementations, and for setting the default implementation. \ **Note:** It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions. +.. rst-class:: classref-reftable-group + Methods ------- -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_server` **(** :ref:`String` name, :ref:`Callable` create_callback **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_server` **(** :ref:`String` name, :ref:`int` priority **)** | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_server` **(** :ref:`String` name, :ref:`Callable` create_callback **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_server` **(** :ref:`String` name, :ref:`int` priority **)** | + +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsServer3DManager_method_register_server: -- void **register_server** **(** :ref:`String` name, :ref:`Callable` create_callback **)** +.. rst-class:: classref-method + +void **register_server** **(** :ref:`String` name, :ref:`Callable` create_callback **)** Register a :ref:`PhysicsServer3D` implementation by passing a ``name`` and a :ref:`Callable` that returns a :ref:`PhysicsServer2D` object. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DManager_method_set_default_server: -- void **set_default_server** **(** :ref:`String` name, :ref:`int` priority **)** +.. rst-class:: classref-method + +void **set_default_server** **(** :ref:`String` name, :ref:`int` priority **)** Set the default :ref:`PhysicsServer3D` implementation to the one identified by ``name``, if ``priority`` is greater than the priority of the current default implementation. diff --git a/classes/class_physicsserver3drenderingserverhandler.rst b/classes/class_physicsserver3drenderingserverhandler.rst index 3bdff493a..fd2b278b3 100644 --- a/classes/class_physicsserver3drenderingserverhandler.rst +++ b/classes/class_physicsserver3drenderingserverhandler.rst @@ -16,43 +16,64 @@ PhysicsServer3DRenderingServerHandler There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_aabb` **(** :ref:`AABB` aabb **)** |virtual| | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_normal` **(** :ref:`int` vertex_id, const void* normals **)** |virtual| | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_vertex` **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| | -+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_aabb` **(** :ref:`AABB` aabb **)** |virtual| | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_normal` **(** :ref:`int` vertex_id, const void* normals **)** |virtual| | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_vertex` **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsServer3DRenderingServerHandler_method__set_aabb: -- void **_set_aabb** **(** :ref:`AABB` aabb **)** |virtual| +.. rst-class:: classref-method + +void **_set_aabb** **(** :ref:`AABB` aabb **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DRenderingServerHandler_method__set_normal: -- void **_set_normal** **(** :ref:`int` vertex_id, const void* normals **)** |virtual| +.. rst-class:: classref-method + +void **_set_normal** **(** :ref:`int` vertex_id, const void* normals **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsServer3DRenderingServerHandler_method__set_vertex: -- void **_set_vertex** **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| +.. rst-class:: classref-method + +void **_set_vertex** **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsshapequeryparameters2d.rst b/classes/class_physicsshapequeryparameters2d.rst index 2a56d02dc..3d7646466 100644 --- a/classes/class_physicsshapequeryparameters2d.rst +++ b/classes/class_physicsshapequeryparameters2d.rst @@ -14,156 +14,179 @@ PhysicsShapeQueryParameters2D Parameters to be sent to a 2D shape physics query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the shape and other parameters for :ref:`PhysicsDirectSpaceState2D` intersection/collision queries. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`collision_mask` | ``4294967295`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`RID[]` | :ref:`exclude` | ``[]`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`margin` | ``0.0`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector2` | :ref:`motion` | ``Vector2(0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Resource` | :ref:`shape` | | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`RID` | :ref:`shape_rid` | | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`collision_mask` | ``4294967295`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`RID[]` | :ref:`exclude` | ``[]`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`margin` | ``0.0`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`motion` | ``Vector2(0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Resource` | :ref:`shape` | | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`RID` | :ref:`shape_rid` | | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsShapeQueryParameters2D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, the query will take :ref:`Area2D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters2D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, the query will take :ref:`PhysicsBody2D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters2D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4294967295`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters2D_property_exclude: -- :ref:`RID[]` **exclude** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_exclude(value) | -+-----------+--------------------+ -| *Getter* | get_exclude() | -+-----------+--------------------+ +:ref:`RID[]` **exclude** = ``[]`` -The list of objects or object :ref:`RID`\ s that will be excluded from collisions. +.. rst-class:: classref-property-setget + +- void **set_exclude** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude** **(** **)** + +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsShapeQueryParameters2D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** The collision margin for the shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters2D_property_motion: -- :ref:`Vector2` **motion** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_motion(value) | -+-----------+-------------------+ -| *Getter* | get_motion() | -+-----------+-------------------+ +:ref:`Vector2` **motion** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_motion** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_motion** **(** **)** The motion of the shape being queried for. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters2D_property_shape: -- :ref:`Resource` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Resource` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Resource` value **)** +- :ref:`Resource` **get_shape** **(** **)** The :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters2D_property_shape_rid: -- :ref:`RID` **shape_rid** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_shape_rid(value) | -+----------+----------------------+ -| *Getter* | get_shape_rid() | -+----------+----------------------+ +:ref:`RID` **shape_rid** + +.. rst-class:: classref-property-setget + +- void **set_shape_rid** **(** :ref:`RID` value **)** +- :ref:`RID` **get_shape_rid** **(** **)** The queried shape's :ref:`RID` that will be used for collision/intersection queries. Use this over :ref:`shape` if you want to optimize for performance using the Servers API: @@ -200,19 +223,20 @@ The queried shape's :ref:`RID` that will be used for collision/inters +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters2D_property_transform: -- :ref:`Transform2D` **transform** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+-----------+-----------------------------------+ -| *Setter* | set_transform(value) | -+-----------+-----------------------------------+ -| *Getter* | get_transform() | -+-----------+-----------------------------------+ +:ref:`Transform2D` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_transform** **(** **)** The queried shape's transform matrix. diff --git a/classes/class_physicsshapequeryparameters3d.rst b/classes/class_physicsshapequeryparameters3d.rst index 387750425..630338ecd 100644 --- a/classes/class_physicsshapequeryparameters3d.rst +++ b/classes/class_physicsshapequeryparameters3d.rst @@ -14,156 +14,179 @@ PhysicsShapeQueryParameters3D Parameters to be sent to a 3D shape physics query. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the shape and other parameters for :ref:`PhysicsDirectSpaceState3D` intersection/collision queries. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`collision_mask` | ``4294967295`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Array` | :ref:`exclude` | ``[]`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`margin` | ``0.0`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`motion` | ``Vector3(0, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Resource` | :ref:`shape` | | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`RID` | :ref:`shape_rid` | | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`collision_mask` | ``4294967295`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`RID[]` | :ref:`exclude` | ``[]`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`margin` | ``0.0`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`motion` | ``Vector3(0, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Resource` | :ref:`shape` | | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`RID` | :ref:`shape_rid` | | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsShapeQueryParameters3D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, the query will take :ref:`Area3D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters3D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, the query will take :ref:`PhysicsBody3D`\ s into account. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``4294967295`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters3D_property_exclude: -- :ref:`Array` **exclude** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_exclude(value) | -+-----------+--------------------+ -| *Getter* | get_exclude() | -+-----------+--------------------+ +:ref:`RID[]` **exclude** = ``[]`` -The list of objects or object :ref:`RID`\ s that will be excluded from collisions. +.. rst-class:: classref-property-setget + +- void **set_exclude** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude** **(** **)** + +The list of object :ref:`RID`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsShapeQueryParameters3D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** The collision margin for the shape. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters3D_property_motion: -- :ref:`Vector3` **motion** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_motion(value) | -+-----------+----------------------+ -| *Getter* | get_motion() | -+-----------+----------------------+ +:ref:`Vector3` **motion** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_motion** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_motion** **(** **)** The motion of the shape being queried for. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters3D_property_shape: -- :ref:`Resource` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Resource` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Resource` value **)** +- :ref:`Resource` **get_shape** **(** **)** The :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters3D_property_shape_rid: -- :ref:`RID` **shape_rid** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_shape_rid(value) | -+----------+----------------------+ -| *Getter* | get_shape_rid() | -+----------+----------------------+ +:ref:`RID` **shape_rid** + +.. rst-class:: classref-property-setget + +- void **set_shape_rid** **(** :ref:`RID` value **)** +- :ref:`RID` **get_shape_rid** **(** **)** The queried shape's :ref:`RID` that will be used for collision/intersection queries. Use this over :ref:`shape` if you want to optimize for performance using the Servers API: @@ -200,19 +223,20 @@ The queried shape's :ref:`RID` that will be used for collision/inters +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsShapeQueryParameters3D_property_transform: -- :ref:`Transform3D` **transform** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_transform(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_transform() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_transform** **(** **)** The queried shape's transform matrix. diff --git a/classes/class_physicstestmotionparameters2d.rst b/classes/class_physicstestmotionparameters2d.rst index 9f284f8df..055c98444 100644 --- a/classes/class_physicstestmotionparameters2d.rst +++ b/classes/class_physicstestmotionparameters2d.rst @@ -14,142 +14,160 @@ PhysicsTestMotionParameters2D Parameters to be sent to a 2D body motion test. +.. rst-class:: classref-introduction-group + Description ----------- This class contains parameters used in :ref:`PhysicsServer2D.body_test_motion`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`collide_separation_ray` | ``false`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`RID[]` | :ref:`exclude_bodies` | ``[]`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Array` | :ref:`exclude_objects` | ``[]`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Transform2D` | :ref:`from` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`float` | :ref:`margin` | ``0.08`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Vector2` | :ref:`motion` | ``Vector2(0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`bool` | :ref:`recovery_as_collision` | ``false`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`collide_separation_ray` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`RID[]` | :ref:`exclude_bodies` | ``[]`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int[]` | :ref:`exclude_objects` | ``[]`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`from` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`margin` | ``0.08`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`motion` | ``Vector2(0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`recovery_as_collision` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsTestMotionParameters2D_property_collide_separation_ray: -- :ref:`bool` **collide_separation_ray** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------------+ -| *Setter* | set_collide_separation_ray_enabled(value) | -+-----------+-------------------------------------------+ -| *Getter* | is_collide_separation_ray_enabled() | -+-----------+-------------------------------------------+ +:ref:`bool` **collide_separation_ray** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_separation_ray_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_separation_ray_enabled** **(** **)** If set to ``true``, shapes of type :ref:`PhysicsServer2D.SHAPE_SEPARATION_RAY` are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. If set to ``false``, shapes of type :ref:`PhysicsServer2D.SHAPE_SEPARATION_RAY` are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters2D_property_exclude_bodies: -- :ref:`RID[]` **exclude_bodies** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``[]`` | -+-----------+---------------------------+ -| *Setter* | set_exclude_bodies(value) | -+-----------+---------------------------+ -| *Getter* | get_exclude_bodies() | -+-----------+---------------------------+ +:ref:`RID[]` **exclude_bodies** = ``[]`` -Optional array of body :ref:`RID` to exclude from collision. +.. rst-class:: classref-property-setget + +- void **set_exclude_bodies** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude_bodies** **(** **)** + +Optional array of body :ref:`RID` to exclude from collision. Use :ref:`CollisionObject2D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject2D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsTestMotionParameters2D_property_exclude_objects: -- :ref:`Array` **exclude_objects** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``[]`` | -+-----------+----------------------------+ -| *Setter* | set_exclude_objects(value) | -+-----------+----------------------------+ -| *Getter* | get_exclude_objects() | -+-----------+----------------------------+ +:ref:`int[]` **exclude_objects** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_objects** **(** :ref:`int[]` value **)** +- :ref:`int[]` **get_exclude_objects** **(** **)** Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters2D_property_from: -- :ref:`Transform2D` **from** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``Transform2D(1, 0, 0, 1, 0, 0)`` | -+-----------+-----------------------------------+ -| *Setter* | set_from(value) | -+-----------+-----------------------------------+ -| *Getter* | get_from() | -+-----------+-----------------------------------+ +:ref:`Transform2D` **from** = ``Transform2D(1, 0, 0, 1, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_from** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_from** **(** **)** Transform in global space where the motion should start. Usually set to :ref:`Node2D.global_transform` for the current body's transform. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters2D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.08`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.08`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** Increases the size of the shapes involved in the collision detection. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters2D_property_motion: -- :ref:`Vector2` **motion** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_motion(value) | -+-----------+-------------------+ -| *Getter* | get_motion() | -+-----------+-------------------+ +:ref:`Vector2` **motion** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_motion** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_motion** **(** **)** Motion vector to define the length and direction of the motion to test. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters2D_property_recovery_as_collision: -- :ref:`bool` **recovery_as_collision** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------------+ -| *Setter* | set_recovery_as_collision_enabled(value) | -+-----------+------------------------------------------+ -| *Getter* | is_recovery_as_collision_enabled() | -+-----------+------------------------------------------+ +:ref:`bool` **recovery_as_collision** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_recovery_as_collision_enabled** **(** :ref:`bool` value **)** +- :ref:`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` for improving floor detection during floor snapping. diff --git a/classes/class_physicstestmotionparameters3d.rst b/classes/class_physicstestmotionparameters3d.rst index b4478932d..571d898b1 100644 --- a/classes/class_physicstestmotionparameters3d.rst +++ b/classes/class_physicstestmotionparameters3d.rst @@ -14,160 +14,179 @@ PhysicsTestMotionParameters3D Parameters to be sent to a 3D body motion test. +.. rst-class:: classref-introduction-group + Description ----------- This class contains parameters used in :ref:`PhysicsServer3D.body_test_motion`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`collide_separation_ray` | ``false`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Array` | :ref:`exclude_bodies` | ``[]`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Array` | :ref:`exclude_objects` | ``[]`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`from` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`margin` | ``0.001`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`max_collisions` | ``1`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`motion` | ``Vector3(0, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`recovery_as_collision` | ``false`` | -+---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`collide_separation_ray` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`RID[]` | :ref:`exclude_bodies` | ``[]`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int[]` | :ref:`exclude_objects` | ``[]`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`from` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`margin` | ``0.001`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`max_collisions` | ``1`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`motion` | ``Vector3(0, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`recovery_as_collision` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicsTestMotionParameters3D_property_collide_separation_ray: -- :ref:`bool` **collide_separation_ray** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------------+ -| *Setter* | set_collide_separation_ray_enabled(value) | -+-----------+-------------------------------------------+ -| *Getter* | is_collide_separation_ray_enabled() | -+-----------+-------------------------------------------+ +:ref:`bool` **collide_separation_ray** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_separation_ray_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_separation_ray_enabled** **(** **)** If set to ``true``, shapes of type :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY` are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. If set to ``false``, shapes of type :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY` are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters3D_property_exclude_bodies: -- :ref:`Array` **exclude_bodies** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``[]`` | -+-----------+---------------------------+ -| *Setter* | set_exclude_bodies(value) | -+-----------+---------------------------+ -| *Getter* | get_exclude_bodies() | -+-----------+---------------------------+ +:ref:`RID[]` **exclude_bodies** = ``[]`` -Optional array of body :ref:`RID` to exclude from collision. +.. rst-class:: classref-property-setget + +- void **set_exclude_bodies** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_exclude_bodies** **(** **)** + +Optional array of body :ref:`RID` to exclude from collision. Use :ref:`CollisionObject3D.get_rid` to get the :ref:`RID` associated with a :ref:`CollisionObject3D`-derived node. + +.. rst-class:: classref-item-separator ---- .. _class_PhysicsTestMotionParameters3D_property_exclude_objects: -- :ref:`Array` **exclude_objects** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``[]`` | -+-----------+----------------------------+ -| *Setter* | set_exclude_objects(value) | -+-----------+----------------------------+ -| *Getter* | get_exclude_objects() | -+-----------+----------------------------+ +:ref:`int[]` **exclude_objects** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_objects** **(** :ref:`int[]` value **)** +- :ref:`int[]` **get_exclude_objects** **(** **)** Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters3D_property_from: -- :ref:`Transform3D` **from** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_from(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_from() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **from** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_from** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_from** **(** **)** Transform in global space where the motion should start. Usually set to :ref:`Node3D.global_transform` for the current body's transform. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters3D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.001`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.001`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** Increases the size of the shapes involved in the collision detection. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters3D_property_max_collisions: -- :ref:`int` **max_collisions** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_max_collisions(value) | -+-----------+---------------------------+ -| *Getter* | get_max_collisions() | -+-----------+---------------------------+ +:ref:`int` **max_collisions** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_collisions** **(** :ref:`int` value **)** +- :ref:`int` **get_max_collisions** **(** **)** Maximum number of returned collisions, between ``1`` and ``32``. Always returns the deepest detected collisions. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters3D_property_motion: -- :ref:`Vector3` **motion** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_motion(value) | -+-----------+----------------------+ -| *Getter* | get_motion() | -+-----------+----------------------+ +:ref:`Vector3` **motion** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_motion** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_motion** **(** **)** Motion vector to define the length and direction of the motion to test. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionParameters3D_property_recovery_as_collision: -- :ref:`bool` **recovery_as_collision** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------------+ -| *Setter* | set_recovery_as_collision_enabled(value) | -+-----------+------------------------------------------+ -| *Getter* | is_recovery_as_collision_enabled() | -+-----------+------------------------------------------+ +:ref:`bool` **recovery_as_collision** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_recovery_as_collision_enabled** **(** :ref:`bool` value **)** +- :ref:`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` for improving floor detection during floor snapping. diff --git a/classes/class_physicstestmotionresult2d.rst b/classes/class_physicstestmotionresult2d.rst index b59bdcce3..9571f339f 100644 --- a/classes/class_physicstestmotionresult2d.rst +++ b/classes/class_physicstestmotionresult2d.rst @@ -14,144 +14,207 @@ PhysicsTestMotionResult2D Result from a 2D body motion test. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the motion and collision result from :ref:`PhysicsServer2D.body_test_motion`. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_id` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collider_velocity` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_collision_depth` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_local_shape` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_point` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_collision_safe_fraction` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_collision_unsafe_fraction` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_remainder` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_travel` **(** **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_id` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collider_velocity` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_depth` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_local_shape` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collision_point` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_safe_fraction` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_unsafe_fraction` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_remainder` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_travel` **(** **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsTestMotionResult2D_method_get_collider: -- :ref:`Object` **get_collider** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** **)** |const| Returns the colliding body's attached :ref:`Object`, if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collider_id: -- :ref:`int` **get_collider_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_id** **(** **)** |const| Returns the unique instance ID of the colliding body's attached :ref:`Object`, if a collision occurred. See :ref:`Object.get_instance_id`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** **)** |const| Returns the colliding body's :ref:`RID` used by the :ref:`PhysicsServer2D`, if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collider_shape: -- :ref:`int` **get_collider_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape** **(** **)** |const| Returns the colliding body's shape index, if a collision occurred. See :ref:`CollisionObject2D`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collider_velocity: -- :ref:`Vector2` **get_collider_velocity** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collider_velocity** **(** **)** |const| Returns the colliding body's velocity, if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collision_depth: -- :ref:`float` **get_collision_depth** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_collision_depth** **(** **)** |const| Returns the length of overlap along the collision normal, if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collision_local_shape: -- :ref:`int` **get_collision_local_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_local_shape** **(** **)** |const| Returns the moving object's colliding shape, if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collision_normal: -- :ref:`Vector2` **get_collision_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collision_normal** **(** **)** |const| Returns the colliding body's shape's normal at the point of collision, if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collision_point: -- :ref:`Vector2` **get_collision_point** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collision_point** **(** **)** |const| Returns the point of collision in global coordinates, if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collision_safe_fraction: -- :ref:`float` **get_collision_safe_fraction** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_collision_safe_fraction** **(** **)** |const| Returns the maximum fraction of the motion that can occur without a collision, between ``0`` and ``1``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_collision_unsafe_fraction: -- :ref:`float` **get_collision_unsafe_fraction** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_collision_unsafe_fraction** **(** **)** |const| Returns the minimum fraction of the motion needed to collide, if a collision occurred, between ``0`` and ``1``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_remainder: -- :ref:`Vector2` **get_remainder** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_remainder** **(** **)** |const| Returns the moving object's remaining movement vector. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult2D_method_get_travel: -- :ref:`Vector2` **get_travel** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_travel** **(** **)** |const| Returns the moving object's travel before collision. diff --git a/classes/class_physicstestmotionresult3d.rst b/classes/class_physicstestmotionresult3d.rst index 7a174fadb..6e30efd18 100644 --- a/classes/class_physicstestmotionresult3d.rst +++ b/classes/class_physicstestmotionresult3d.rst @@ -14,154 +14,221 @@ PhysicsTestMotionResult3D Result from a 3D body motion test. +.. rst-class:: classref-introduction-group + Description ----------- This class contains the motion and collision result from :ref:`PhysicsServer3D.body_test_motion`. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_id` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collider_velocity` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_collision_depth` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_local_shape` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_normal` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_point` **(** :ref:`int` collision_index=0 **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_collision_safe_fraction` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_collision_unsafe_fraction` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_remainder` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_travel` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_id` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collider_velocity` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_depth` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_local_shape` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collision_normal` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collision_point` **(** :ref:`int` collision_index=0 **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_safe_fraction` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_unsafe_fraction` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_remainder` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_travel` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PhysicsTestMotionResult3D_method_get_collider: -- :ref:`Object` **get_collider** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default), if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collider_id: -- :ref:`int` **get_collider_id** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_id** **(** :ref:`int` collision_index=0 **)** |const| Returns the unique instance ID of the colliding body's attached :ref:`Object` given a collision index (the deepest collision by default), if a collision occurred. See :ref:`Object.get_instance_id`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's :ref:`RID` used by the :ref:`PhysicsServer3D` given a collision index (the deepest collision by default), if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collider_shape: -- :ref:`int` **get_collider_shape** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See :ref:`CollisionObject3D`. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collider_velocity: -- :ref:`Vector3` **get_collider_velocity** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collider_velocity** **(** :ref:`int` collision_index=0 **)** |const| Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collision_count: -- :ref:`int` **get_collision_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_count** **(** **)** |const| Returns the number of detected collisions. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collision_depth: -- :ref:`float` **get_collision_depth** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_collision_depth** **(** :ref:`int` collision_index=0 **)** |const| Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collision_local_shape: -- :ref:`int` **get_collision_local_shape** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_local_shape** **(** :ref:`int` collision_index=0 **)** |const| Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collision_normal: -- :ref:`Vector3` **get_collision_normal** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collision_normal** **(** :ref:`int` collision_index=0 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collision_point: -- :ref:`Vector3` **get_collision_point** **(** :ref:`int` collision_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collision_point** **(** :ref:`int` collision_index=0 **)** |const| Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction: -- :ref:`float` **get_collision_safe_fraction** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_collision_safe_fraction** **(** **)** |const| Returns the maximum fraction of the motion that can occur without a collision, between ``0`` and ``1``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction: -- :ref:`float` **get_collision_unsafe_fraction** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_collision_unsafe_fraction** **(** **)** |const| Returns the minimum fraction of the motion needed to collide, if a collision occurred, between ``0`` and ``1``. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_remainder: -- :ref:`Vector3` **get_remainder** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_remainder** **(** **)** |const| Returns the moving object's remaining movement vector. +.. rst-class:: classref-item-separator + ---- .. _class_PhysicsTestMotionResult3D_method_get_travel: -- :ref:`Vector3` **get_travel** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_travel** **(** **)** |const| Returns the moving object's travel before collision. diff --git a/classes/class_pinjoint2d.rst b/classes/class_pinjoint2d.rst index efb821eab..8166dda49 100644 --- a/classes/class_pinjoint2d.rst +++ b/classes/class_pinjoint2d.rst @@ -14,32 +14,44 @@ PinJoint2D Pin joint for 2D shapes. +.. rst-class:: classref-introduction-group + Description ----------- Pin joint for 2D rigid bodies. It pins two bodies (dynamic or static) together. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------+---------+ -| :ref:`float` | :ref:`softness` | ``0.0`` | -+---------------------------+-----------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------+---------+ + | :ref:`float` | :ref:`softness` | ``0.0`` | + +---------------------------+-----------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PinJoint2D_property_softness: -- :ref:`float` **softness** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_softness(value) | -+-----------+---------------------+ -| *Getter* | get_softness() | -+-----------+---------------------+ +:ref:`float` **softness** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_softness** **(** :ref:`float` value **)** +- :ref:`float` **get_softness** **(** **)** The higher this value, the more the bond to the pinned partner can flex. diff --git a/classes/class_pinjoint3d.rst b/classes/class_pinjoint3d.rst index 7c6896455..b831402d8 100644 --- a/classes/class_pinjoint3d.rst +++ b/classes/class_pinjoint3d.rst @@ -14,113 +14,164 @@ PinJoint3D Pin joint for 3D PhysicsBodies. +.. rst-class:: classref-introduction-group + Description ----------- Pin joint for 3D rigid bodies. It pins 2 bodies (dynamic or static) together. See also :ref:`Generic6DOFJoint3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`params/bias` | ``0.3`` | -+---------------------------+-----------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`params/damping` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`params/impulse_clamp` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`params/bias` | ``0.3`` | + +---------------------------+-----------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`params/damping` | ``1.0`` | + +---------------------------+-----------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`params/impulse_clamp` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PinJoint3D_Param: -.. _class_PinJoint3D_constant_PARAM_BIAS: - -.. _class_PinJoint3D_constant_PARAM_DAMPING: - -.. _class_PinJoint3D_constant_PARAM_IMPULSE_CLAMP: +.. rst-class:: classref-enumeration enum **Param**: -- **PARAM_BIAS** = **0** --- The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. +.. _class_PinJoint3D_constant_PARAM_BIAS: -- **PARAM_DAMPING** = **1** --- The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. +.. rst-class:: classref-enumeration-constant -- **PARAM_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint3D produces. +:ref:`Param` **PARAM_BIAS** = ``0`` + +The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. + +.. _class_PinJoint3D_constant_PARAM_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_DAMPING** = ``1`` + +The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. + +.. _class_PinJoint3D_constant_PARAM_IMPULSE_CLAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_IMPULSE_CLAMP** = ``2`` + +If above 0, this value is the maximum value for an impulse that this Joint3D produces. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PinJoint3D_property_params/bias: -- :ref:`float` **params/bias** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.3`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **params/bias** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. +.. rst-class:: classref-item-separator + ---- .. _class_PinJoint3D_property_params/damping: -- :ref:`float` **params/damping** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **params/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. +.. rst-class:: classref-item-separator + ---- .. _class_PinJoint3D_property_params/impulse_clamp: -- :ref:`float` **params/impulse_clamp** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **params/impulse_clamp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| If above 0, this value is the maximum value for an impulse that this Joint3D produces. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PinJoint3D_method_get_param: -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param** **(** :ref:`Param` param **)** |const| Returns the value of the specified parameter. +.. rst-class:: classref-item-separator + ---- .. _class_PinJoint3D_method_set_param: -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** Sets the value of the specified parameter. diff --git a/classes/class_placeholdercubemap.rst b/classes/class_placeholdercubemap.rst index 5eaec7a38..777f5908a 100644 --- a/classes/class_placeholdercubemap.rst +++ b/classes/class_placeholdercubemap.rst @@ -14,6 +14,8 @@ PlaceholderCubemap Placeholder class for a cubemap texture. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_placeholdercubemaparray.rst b/classes/class_placeholdercubemaparray.rst index 56efe64ac..f47fbef19 100644 --- a/classes/class_placeholdercubemaparray.rst +++ b/classes/class_placeholdercubemaparray.rst @@ -14,6 +14,8 @@ PlaceholderCubemapArray Placeholder class for a cubemap texture array. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_placeholdermaterial.rst b/classes/class_placeholdermaterial.rst index 81dc9a7b4..bbe6cf692 100644 --- a/classes/class_placeholdermaterial.rst +++ b/classes/class_placeholdermaterial.rst @@ -14,6 +14,8 @@ PlaceholderMaterial Placeholder class for a material. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_placeholdermesh.rst b/classes/class_placeholdermesh.rst index c6c21d863..9c29ed7a0 100644 --- a/classes/class_placeholdermesh.rst +++ b/classes/class_placeholdermesh.rst @@ -14,6 +14,8 @@ PlaceholderMesh Placeholder class for a mesh. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,27 +25,37 @@ This class is used when loading a project that uses a :ref:`Mesh` su - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+--------------------------------------------------+----------------------------+ -| :ref:`AABB` | :ref:`aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | -+-------------------------+--------------------------------------------------+----------------------------+ +.. table:: + :widths: auto + + +-------------------------+--------------------------------------------------+----------------------------+ + | :ref:`AABB` | :ref:`aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | + +-------------------------+--------------------------------------------------+----------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PlaceholderMesh_property_aabb: -- :ref:`AABB` **aabb** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``AABB(0, 0, 0, 0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_aabb(value) | -+-----------+----------------------------+ -| *Getter* | get_aabb() | -+-----------+----------------------------+ +:ref:`AABB` **aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_aabb** **(** :ref:`AABB` value **)** +- :ref:`AABB` **get_aabb** **(** **)** The smallest :ref:`AABB` enclosing this mesh in local space. diff --git a/classes/class_placeholdertexture2d.rst b/classes/class_placeholdertexture2d.rst index 0057b17ed..d563be8fa 100644 --- a/classes/class_placeholdertexture2d.rst +++ b/classes/class_placeholdertexture2d.rst @@ -14,6 +14,8 @@ PlaceholderTexture2D Placeholder class for a 2-dimensional texture. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,29 +25,39 @@ This class is used when loading a project that uses a :ref:`Texture2D` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(1, 1)`` | -+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(1, 1)`` | + +-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PlaceholderTexture2D_property_size: -- :ref:`Vector2` **size** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------+ -| *Setter* | set_size(value) | -+-----------+-------------------+ -| *Getter* | get_size() | -+-----------+-------------------+ +:ref:`Vector2` **size** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_size** **(** **)** The texture's size (in pixels). diff --git a/classes/class_placeholdertexture2darray.rst b/classes/class_placeholdertexture2darray.rst index 15ff226e0..0da77080b 100644 --- a/classes/class_placeholdertexture2darray.rst +++ b/classes/class_placeholdertexture2darray.rst @@ -14,6 +14,8 @@ PlaceholderTexture2DArray Placeholder class for a 2-dimensional texture array. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_placeholdertexture3d.rst b/classes/class_placeholdertexture3d.rst index 82705c0c2..8f766f3a3 100644 --- a/classes/class_placeholdertexture3d.rst +++ b/classes/class_placeholdertexture3d.rst @@ -14,6 +14,8 @@ PlaceholderTexture3D Placeholder class for a 3-dimensional texture. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,27 +25,37 @@ This class is used when loading a project that uses a :ref:`Texture3D` | :ref:`size` | ``Vector3i(1, 1, 1)`` | -+---------------------------------+-------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------+-----------------------+ + | :ref:`Vector3i` | :ref:`size` | ``Vector3i(1, 1, 1)`` | + +---------------------------------+-------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PlaceholderTexture3D_property_size: -- :ref:`Vector3i` **size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector3i(1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_size(value) | -+-----------+-----------------------+ -| *Getter* | get_size() | -+-----------+-----------------------+ +:ref:`Vector3i` **size** = ``Vector3i(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector3i` value **)** +- :ref:`Vector3i` **get_size** **(** **)** The texture's size (in pixels). diff --git a/classes/class_placeholdertexturelayered.rst b/classes/class_placeholdertexturelayered.rst index b2c898b7f..d81992ff9 100644 --- a/classes/class_placeholdertexturelayered.rst +++ b/classes/class_placeholdertexturelayered.rst @@ -16,6 +16,8 @@ PlaceholderTextureLayered Placeholder class for a 2-dimensional texture array. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,45 +27,56 @@ This class is used when loading a project that uses a :ref:`TextureLayered` | :ref:`layers` | ``1`` | -+---------------------------------+----------------------------------------------------------------+--------------------+ -| :ref:`Vector2i` | :ref:`size` | ``Vector2i(1, 1)`` | -+---------------------------------+----------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`layers` | ``1`` | + +---------------------------------+----------------------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`size` | ``Vector2i(1, 1)`` | + +---------------------------------+----------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PlaceholderTextureLayered_property_layers: -- :ref:`int` **layers** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1`` | -+-----------+-------------------+ -| *Setter* | set_layers(value) | -+-----------+-------------------+ -| *Getter* | get_layers() | -+-----------+-------------------+ +:ref:`int` **layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_layers** **(** **)** The number of layers in the texture array. +.. rst-class:: classref-item-separator + ---- .. _class_PlaceholderTextureLayered_property_size: -- :ref:`Vector2i` **size** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2i(1, 1)`` | -+-----------+--------------------+ -| *Setter* | set_size(value) | -+-----------+--------------------+ -| *Getter* | get_size() | -+-----------+--------------------+ +:ref:`Vector2i` **size** = ``Vector2i(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_size** **(** **)** The size of each texture layer (in pixels). diff --git a/classes/class_plane.rst b/classes/class_plane.rst index 29e6e98ec..29ea782eb 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -12,350 +12,500 @@ Plane Plane in hessian form. +.. rst-class:: classref-introduction-group + Description ----------- Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Math documentation index <../tutorials/math/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------+----------------------+ -| :ref:`float` | :ref:`d` | ``0.0`` | -+-------------------------------+--------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`normal` | ``Vector3(0, 0, 0)`` | -+-------------------------------+--------------------------------------------+----------------------+ -| :ref:`float` | :ref:`x` | ``0.0`` | -+-------------------------------+--------------------------------------------+----------------------+ -| :ref:`float` | :ref:`y` | ``0.0`` | -+-------------------------------+--------------------------------------------+----------------------+ -| :ref:`float` | :ref:`z` | ``0.0`` | -+-------------------------------+--------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------+----------------------+ + | :ref:`float` | :ref:`d` | ``0.0`` | + +-------------------------------+--------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`normal` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------+----------------------+ + | :ref:`float` | :ref:`x` | ``0.0`` | + +-------------------------------+--------------------------------------------+----------------------+ + | :ref:`float` | :ref:`y` | ``0.0`` | + +-------------------------------+--------------------------------------------+----------------------+ + | :ref:`float` | :ref:`z` | ``0.0`` | + +-------------------------------+--------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`Plane` **(** **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`Plane` **(** :ref:`Plane` from **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`Plane` **(** :ref:`float` a, :ref:`float` b, :ref:`float` c, :ref:`float` d **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` normal **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` normal, :ref:`float` d **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` normal, :ref:`Vector3` point **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` point1, :ref:`Vector3` point2, :ref:`Vector3` point3 **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`Plane` **(** **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`Plane` **(** :ref:`Plane` from **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`Plane` **(** :ref:`float` a, :ref:`float` b, :ref:`float` c, :ref:`float` d **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` normal **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` normal, :ref:`float` d **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` normal, :ref:`Vector3` point **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` point1, :ref:`Vector3` point2, :ref:`Vector3` point3 **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`center` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` point **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_point` **(** :ref:`Vector3` point, :ref:`float` tolerance=1e-05 **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`intersect_3` **(** :ref:`Plane` b, :ref:`Plane` c **)** |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:`Plane` to_plane **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_over` **(** :ref:`Vector3` point **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`normalized` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`project` **(** :ref:`Vector3` point **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`center` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` point **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_point` **(** :ref:`Vector3` point, :ref:`float` tolerance=1e-05 **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`intersect_3` **(** :ref:`Plane` b, :ref:`Plane` c **)** |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:`Plane` to_plane **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_over` **(** :ref:`Vector3` point **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`normalized` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`project` **(** :ref:`Vector3` point **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Plane` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Plane` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`operator unary+` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`operator unary-` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Plane` right **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Plane` right **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`operator unary+` **(** **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`operator unary-` **(** **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Plane_constant_PLANE_YZ: +.. rst-class:: classref-constant + +**PLANE_YZ** = ``Plane(1, 0, 0, 0)`` + +A plane that extends in the Y and Z axes (normal vector points +X). + .. _class_Plane_constant_PLANE_XZ: +.. rst-class:: classref-constant + +**PLANE_XZ** = ``Plane(0, 1, 0, 0)`` + +A plane that extends in the X and Z axes (normal vector points +Y). + .. _class_Plane_constant_PLANE_XY: -- **PLANE_YZ** = **Plane(1, 0, 0, 0)** --- 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)** --- A plane that extends in the X and Z axes (normal vector points +Y). +**PLANE_XY** = ``Plane(0, 0, 1, 0)`` -- **PLANE_XY** = **Plane(0, 0, 1, 0)** --- A plane that extends in the X and Y axes (normal vector points +Z). +A plane that extends in the X and Y axes (normal vector points +Z). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Plane_property_d: -- :ref:`float` **d** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **d** = ``0.0`` The distance from the origin to the plane, in the direction of :ref:`normal`. This value is typically non-negative. In the scalar equation of the plane ``ax + by + cz = d``, this is ``d``, while the ``(a, b, c)`` coordinates are represented by the :ref:`normal` property. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_property_normal: -- :ref:`Vector3` **normal** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ +:ref:`Vector3` **normal** = ``Vector3(0, 0, 0)`` The normal of the plane, which must be normalized. In the scalar equation of the plane ``ax + by + cz = d``, this is the vector ``(a, b, c)``, where ``d`` is the :ref:`d` property. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_property_x: -- :ref:`float` **x** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **x** = ``0.0`` The X component of the plane's :ref:`normal` vector. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_property_y: -- :ref:`float` **y** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **y** = ``0.0`` The Y component of the plane's :ref:`normal` vector. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_property_z: -- :ref:`float` **z** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **z** = ``0.0`` The Z component of the plane's :ref:`normal` vector. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Plane_constructor_Plane: -- :ref:`Plane` **Plane** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Plane`` with all components set to ``0``. +:ref:`Plane` **Plane** **(** **)** + +Constructs a default-initialized **Plane** with all components set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Plane` **Plane** **(** :ref:`Plane` from **)** +.. rst-class:: classref-constructor -Constructs a ``Plane`` as a copy of the given ``Plane``. +:ref:`Plane` **Plane** **(** :ref:`Plane` from **)** + +Constructs a **Plane** as a copy of the given **Plane**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Plane` **Plane** **(** :ref:`float` a, :ref:`float` b, :ref:`float` c, :ref:`float` d **)** +.. rst-class:: classref-constructor + +:ref:`Plane` **Plane** **(** :ref:`float` a, :ref:`float` b, :ref:`float` c, :ref:`float` d **)** Creates a plane from the four parameters. The three components of the resulting plane's :ref:`normal` are ``a``, ``b`` and ``c``, and the plane has a distance of ``d`` from the origin. +.. rst-class:: classref-item-separator + ---- -- :ref:`Plane` **Plane** **(** :ref:`Vector3` normal **)** +.. rst-class:: classref-constructor + +:ref:`Plane` **Plane** **(** :ref:`Vector3` normal **)** Creates a plane from the normal vector. The plane will intersect the origin. +.. rst-class:: classref-item-separator + ---- -- :ref:`Plane` **Plane** **(** :ref:`Vector3` normal, :ref:`float` d **)** +.. rst-class:: classref-constructor + +:ref:`Plane` **Plane** **(** :ref:`Vector3` normal, :ref:`float` d **)** Creates a plane from the normal vector and the plane's distance from the origin. +.. rst-class:: classref-item-separator + ---- -- :ref:`Plane` **Plane** **(** :ref:`Vector3` normal, :ref:`Vector3` point **)** +.. rst-class:: classref-constructor + +:ref:`Plane` **Plane** **(** :ref:`Vector3` normal, :ref:`Vector3` point **)** Creates a plane from the normal vector and a point on the plane. +.. rst-class:: classref-item-separator + ---- -- :ref:`Plane` **Plane** **(** :ref:`Vector3` point1, :ref:`Vector3` point2, :ref:`Vector3` point3 **)** +.. rst-class:: classref-constructor + +:ref:`Plane` **Plane** **(** :ref:`Vector3` point1, :ref:`Vector3` point2, :ref:`Vector3` point3 **)** Creates a plane from the three points, given in clockwise order. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Plane_method_center: -- :ref:`Vector3` **center** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **center** **(** **)** |const| Returns the center of the plane. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_distance_to: -- :ref:`float` **distance_to** **(** :ref:`Vector3` point **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_to** **(** :ref:`Vector3` point **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_has_point: -- :ref:`bool` **has_point** **(** :ref:`Vector3` point, :ref:`float` tolerance=1e-05 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_point** **(** :ref:`Vector3` point, :ref:`float` tolerance=1e-05 **)** |const| Returns ``true`` if ``point`` is inside the plane. Comparison uses a custom minimum ``tolerance`` threshold. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_intersect_3: -- :ref:`Variant` **intersect_3** **(** :ref:`Plane` b, :ref:`Plane` c **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **intersect_3** **(** :ref:`Plane` b, :ref:`Plane` c **)** |const| Returns the intersection point of the three planes ``b``, ``c`` and this plane. If no intersection is found, ``null`` is returned. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_intersects_ray: -- :ref:`Variant` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_intersects_segment: -- :ref:`Variant` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| Returns the intersection point of a segment from position ``from`` to position ``to`` with this plane. If no intersection is found, ``null`` is returned. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Plane` to_plane **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Plane` to_plane **)** |const| Returns ``true`` if this plane and ``to_plane`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this plane is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_is_point_over: -- :ref:`bool` **is_point_over** **(** :ref:`Vector3` point **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_point_over** **(** :ref:`Vector3` point **)** |const| Returns ``true`` if ``point`` is located above the plane. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_normalized: -- :ref:`Plane` **normalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Plane` **normalized** **(** **)** |const| Returns a copy of the plane, normalized. +.. rst-class:: classref-item-separator + ---- .. _class_Plane_method_project: -- :ref:`Vector3` **project** **(** :ref:`Vector3` point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **project** **(** :ref:`Vector3` point **)** |const| Returns the orthogonal projection of ``point`` into a point in the plane. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_Plane_operator_neq_bool: +.. _class_Plane_operator_neq_Plane: -- :ref:`bool` **operator !=** **(** :ref:`Plane` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Plane` right **)** Returns ``true`` if the planes are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. ----- - -.. _class_Plane_operator_mul_Plane: - -- :ref:`Plane` **operator *** **(** :ref:`Transform3D` right **)** - -Inversely transforms (multiplies) the ``Plane`` by the given :ref:`Transform3D` transformation matrix. +.. rst-class:: classref-item-separator ---- -.. _class_Plane_operator_eq_bool: +.. _class_Plane_operator_mul_Transform3D: -- :ref:`bool` **operator ==** **(** :ref:`Plane` right **)** +.. rst-class:: classref-operator + +:ref:`Plane` **operator *** **(** :ref:`Transform3D` right **)** + +Inversely transforms (multiplies) the **Plane** by the given :ref:`Transform3D` transformation matrix. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Plane_operator_eq_Plane: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Plane` right **)** Returns ``true`` if the planes are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- -.. _class_Plane_operator_unplus_Plane: +.. _class_Plane_operator_unplus: -- :ref:`Plane` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Plane` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Plane_operator_unminus_Plane: +.. _class_Plane_operator_unminus: -- :ref:`Plane` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Plane` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_planemesh.rst b/classes/class_planemesh.rst index 581efdf4a..8317612b2 100644 --- a/classes/class_planemesh.rst +++ b/classes/class_planemesh.rst @@ -16,125 +16,161 @@ PlaneMesh Class representing a planar :ref:`PrimitiveMesh`. +.. rst-class:: classref-introduction-group + Description ----------- Class representing a planar :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, change :ref:`orientation` to :ref:`FACE_Z`. -\ **Note:** When using a large textured ``PlaneMesh`` (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase :ref:`subdivide_depth` and :ref:`subdivide_width` until you no longer notice UV jittering. +\ **Note:** When using a large textured **PlaneMesh** (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase :ref:`subdivide_depth` and :ref:`subdivide_width` until you no longer notice UV jittering. + +.. rst-class:: classref-reftable-group Properties ---------- -+------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`center_offset` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`Orientation` | :ref:`orientation` | ``1`` | -+------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(2, 2)`` | -+------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_depth` | ``0`` | -+------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_width` | ``0`` | -+------------------------------------------------+------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`center_offset` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`Orientation` | :ref:`orientation` | ``1`` | + +------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(2, 2)`` | + +------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_depth` | ``0`` | + +------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_width` | ``0`` | + +------------------------------------------------+------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PlaneMesh_Orientation: -.. _class_PlaneMesh_constant_FACE_X: - -.. _class_PlaneMesh_constant_FACE_Y: - -.. _class_PlaneMesh_constant_FACE_Z: +.. rst-class:: classref-enumeration enum **Orientation**: -- **FACE_X** = **0** --- ``PlaneMesh`` will face the positive X-axis. +.. _class_PlaneMesh_constant_FACE_X: -- **FACE_Y** = **1** --- ``PlaneMesh`` will face the positive Y-axis. This matches the behavior of the ``PlaneMesh`` in Godot 3.x. +.. rst-class:: classref-enumeration-constant -- **FACE_Z** = **2** --- ``PlaneMesh`` will face the positive Z-axis. This matches the behavior of the QuadMesh in Godot 3.x. +:ref:`Orientation` **FACE_X** = ``0`` + +**PlaneMesh** will face the positive X-axis. + +.. _class_PlaneMesh_constant_FACE_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`Orientation` **FACE_Y** = ``1`` + +**PlaneMesh** will face the positive Y-axis. This matches the behavior of the **PlaneMesh** in Godot 3.x. + +.. _class_PlaneMesh_constant_FACE_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`Orientation` **FACE_Z** = ``2`` + +**PlaneMesh** will face the positive Z-axis. This matches the behavior of the QuadMesh in Godot 3.x. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PlaneMesh_property_center_offset: -- :ref:`Vector3` **center_offset** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_center_offset(value) | -+-----------+--------------------------+ -| *Getter* | get_center_offset() | -+-----------+--------------------------+ +:ref:`Vector3` **center_offset** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_center_offset** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_center_offset** **(** **)** Offset of the generated plane. Useful for particles. +.. rst-class:: classref-item-separator + ---- .. _class_PlaneMesh_property_orientation: -- :ref:`Orientation` **orientation** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_orientation(value) | -+-----------+------------------------+ -| *Getter* | get_orientation() | -+-----------+------------------------+ +:ref:`Orientation` **orientation** = ``1`` -Direction that the ``PlaneMesh`` is facing. See :ref:`Orientation` for options. +.. rst-class:: classref-property-setget + +- void **set_orientation** **(** :ref:`Orientation` value **)** +- :ref:`Orientation` **get_orientation** **(** **)** + +Direction that the **PlaneMesh** is facing. See :ref:`Orientation` for options. + +.. rst-class:: classref-item-separator ---- .. _class_PlaneMesh_property_size: -- :ref:`Vector2` **size** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(2, 2)`` | -+-----------+-------------------+ -| *Setter* | set_size(value) | -+-----------+-------------------+ -| *Getter* | get_size() | -+-----------+-------------------+ +:ref:`Vector2` **size** = ``Vector2(2, 2)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_size** **(** **)** Size of the generated plane. +.. rst-class:: classref-item-separator + ---- .. _class_PlaneMesh_property_subdivide_depth: -- :ref:`int` **subdivide_depth** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_subdivide_depth(value) | -+-----------+----------------------------+ -| *Getter* | get_subdivide_depth() | -+-----------+----------------------------+ +:ref:`int` **subdivide_depth** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_depth** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_depth** **(** **)** Number of subdivision along the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_PlaneMesh_property_subdivide_width: -- :ref:`int` **subdivide_width** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_subdivide_width(value) | -+-----------+----------------------------+ -| *Getter* | get_subdivide_width() | -+-----------+----------------------------+ +:ref:`int` **subdivide_width** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_width** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_width** **(** **)** Number of subdivision along the X axis. diff --git a/classes/class_pointlight2d.rst b/classes/class_pointlight2d.rst index 3b66f7a1e..2cb36c393 100644 --- a/classes/class_pointlight2d.rst +++ b/classes/class_pointlight2d.rst @@ -12,83 +12,110 @@ PointLight2D **Inherits:** :ref:`Light2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -.. container:: contribute +Positional 2D light source. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Casts light in a 2D environment. This light's shape is defined by a (usually grayscale) texture + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>` + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`height` | ``0.0`` | -+-----------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+-----------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+-----------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`texture_scale` | ``1.0`` | -+-----------------------------------+-----------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`height` | ``0.0`` | + +-----------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +-----------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +-----------------------------------+-----------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`texture_scale` | ``1.0`` | + +-----------------------------------+-----------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PointLight2D_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_PointLight2D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_texture_offset(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_offset() | -+-----------+---------------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_texture_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_texture_offset** **(** **)** The offset of the light's :ref:`texture`. +.. rst-class:: classref-item-separator + ---- .. _class_PointLight2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** :ref:`Texture2D` used for the light's appearance. +.. rst-class:: classref-item-separator + ---- .. _class_PointLight2D_property_texture_scale: -- :ref:`float` **texture_scale** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_texture_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_texture_scale() | -+-----------+--------------------------+ +:ref:`float` **texture_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_texture_scale** **(** **)** The :ref:`texture`'s scale factor. diff --git a/classes/class_pointmesh.rst b/classes/class_pointmesh.rst index 14949430e..9be5aa545 100644 --- a/classes/class_pointmesh.rst +++ b/classes/class_pointmesh.rst @@ -14,6 +14,8 @@ PointMesh Mesh with a single Point primitive. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index ef888178a..2035a93fc 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -14,390 +14,459 @@ Polygon2D A 2D polygon. +.. rst-class:: classref-introduction-group + Description ----------- A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`antialiased` | ``false`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Array` | :ref:`bones` | ``[]`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`internal_vertex_count` | ``0`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`float` | :ref:`invert_border` | ``100.0`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`bool` | :ref:`invert_enabled` | ``false`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Array` | :ref:`polygons` | ``[]`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`NodePath` | :ref:`skeleton` | ``NodePath("")`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Vector2` | :ref:`texture_offset` | ``Vector2(0, 0)`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`float` | :ref:`texture_rotation` | ``0.0`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`Vector2` | :ref:`texture_scale` | ``Vector2(1, 1)`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`uv` | ``PackedVector2Array()`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ -| :ref:`PackedColorArray` | :ref:`vertex_colors` | ``PackedColorArray()`` | -+-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`antialiased` | ``false`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Array` | :ref:`bones` | ``[]`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`internal_vertex_count` | ``0`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`invert_border` | ``100.0`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`invert_enabled` | ``false`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Array` | :ref:`polygons` | ``[]`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`NodePath` | :ref:`skeleton` | ``NodePath("")`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector2` | :ref:`texture_offset` | ``Vector2(0, 0)`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`texture_rotation` | ``0.0`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector2` | :ref:`texture_scale` | ``Vector2(1, 1)`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`uv` | ``PackedVector2Array()`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedColorArray` | :ref:`vertex_colors` | ``PackedColorArray()`` | + +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_bone` **(** :ref:`NodePath` path, :ref:`PackedFloat32Array` weights **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_bones` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_bone` **(** :ref:`int` index **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_bone_path` **(** :ref:`int` index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`get_bone_weights` **(** :ref:`int` index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_path` **(** :ref:`int` index, :ref:`NodePath` path **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_weights` **(** :ref:`int` index, :ref:`PackedFloat32Array` weights **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_bone` **(** :ref:`NodePath` path, :ref:`PackedFloat32Array` weights **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_bones` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_bone` **(** :ref:`int` index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_bone_path` **(** :ref:`int` index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_bone_weights` **(** :ref:`int` index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_path` **(** :ref:`int` index, :ref:`NodePath` path **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_weights` **(** :ref:`int` index, :ref:`PackedFloat32Array` weights **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Polygon2D_property_antialiased: -- :ref:`bool` **antialiased** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_antialiased(value) | -+-----------+------------------------+ -| *Getter* | get_antialiased() | -+-----------+------------------------+ +:ref:`bool` **antialiased** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_antialiased** **(** :ref:`bool` value **)** +- :ref:`bool` **get_antialiased** **(** **)** If ``true``, polygon edges will be anti-aliased. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_bones: -- :ref:`Array` **bones** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``[]`` | -+-----------+--------+ +:ref:`Array` **bones** = ``[]`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`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``. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_internal_vertex_count: -- :ref:`int` **internal_vertex_count** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_internal_vertex_count(value) | -+-----------+----------------------------------+ -| *Getter* | get_internal_vertex_count() | -+-----------+----------------------------------+ +:ref:`int` **internal_vertex_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_internal_vertex_count** **(** :ref:`int` value **)** +- :ref:`int` **get_internal_vertex_count** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_invert_border: -- :ref:`float` **invert_border** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``100.0`` | -+-----------+--------------------------+ -| *Setter* | set_invert_border(value) | -+-----------+--------------------------+ -| *Getter* | get_invert_border() | -+-----------+--------------------------+ +:ref:`float` **invert_border** = ``100.0`` + +.. rst-class:: classref-property-setget + +- void **set_invert_border** **(** :ref:`float` value **)** +- :ref:`float` **get_invert_border** **(** **)** Added padding applied to the bounding box when :ref:`invert_enabled` is set to ``true``. Setting this value too small may result in a "Bad Polygon" error. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_invert_enabled: -- :ref:`bool` **invert_enabled** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_invert_enabled(value) | -+-----------+---------------------------+ -| *Getter* | get_invert_enabled() | -+-----------+---------------------------+ +:ref:`bool` **invert_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_invert_enabled** **(** :ref:`bool` value **)** +- :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The offset applied to each vertex. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_polygon: -- :ref:`PackedVector2Array` **polygon** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_polygon(value) | -+-----------+--------------------------+ -| *Getter* | get_polygon() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** +- :ref:`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` rather than a reference. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_polygons: -- :ref:`Array` **polygons** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``[]`` | -+-----------+---------------------+ -| *Setter* | set_polygons(value) | -+-----------+---------------------+ -| *Getter* | get_polygons() | -+-----------+---------------------+ +:ref:`Array` **polygons** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_polygons** **(** :ref:`Array` value **)** +- :ref:`Array` **get_polygons** **(** **)** The list of polygons, in case more than one is being represented. Every individual polygon is stored as a :ref:`PackedInt32Array` where each :ref:`int` is an index to a point in :ref:`polygon`. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in :ref:`polygon`, using the order they are stored in. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_skeleton: -- :ref:`NodePath` **skeleton** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------+ -| *Setter* | set_skeleton(value) | -+-----------+---------------------+ -| *Getter* | get_skeleton() | -+-----------+---------------------+ +:ref:`NodePath` **skeleton** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_skeleton** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_skeleton** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The polygon's fill texture. Use ``uv`` to set texture coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_texture_offset: -- :ref:`Vector2` **texture_offset** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_texture_offset(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_offset() | -+-----------+---------------------------+ +:ref:`Vector2` **texture_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_texture_offset** **(** :ref:`Vector2` value **)** +- :ref:`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``. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_texture_rotation: -- :ref:`float` **texture_rotation** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_texture_rotation(value) | -+-----------+-----------------------------+ -| *Getter* | get_texture_rotation() | -+-----------+-----------------------------+ +:ref:`float` **texture_rotation** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_rotation** **(** :ref:`float` value **)** +- :ref:`float` **get_texture_rotation** **(** **)** The texture's rotation in radians. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_texture_scale: -- :ref:`Vector2` **texture_scale** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_texture_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_texture_scale() | -+-----------+--------------------------+ +:ref:`Vector2` **texture_scale** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_texture_scale** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_texture_scale** **(** **)** Amount to multiply the ``uv`` coordinates when using a ``texture``. Larger values make the texture smaller, and vice versa. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_uv: -- :ref:`PackedVector2Array` **uv** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_uv(value) | -+-----------+--------------------------+ -| *Getter* | get_uv() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **uv** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_uv** **(** :ref:`PackedVector2Array` value **)** +- :ref:`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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_property_vertex_colors: -- :ref:`PackedColorArray` **vertex_colors** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedColorArray()`` | -+-----------+--------------------------+ -| *Setter* | set_vertex_colors(value) | -+-----------+--------------------------+ -| *Getter* | get_vertex_colors() | -+-----------+--------------------------+ +:ref:`PackedColorArray` **vertex_colors** = ``PackedColorArray()`` + +.. rst-class:: classref-property-setget + +- void **set_vertex_colors** **(** :ref:`PackedColorArray` value **)** +- :ref:`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 ``color``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Polygon2D_method_add_bone: -- void **add_bone** **(** :ref:`NodePath` path, :ref:`PackedFloat32Array` weights **)** +.. rst-class:: classref-method + +void **add_bone** **(** :ref:`NodePath` path, :ref:`PackedFloat32Array` weights **)** Adds a bone with the specified ``path`` and ``weights``. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_method_clear_bones: -- void **clear_bones** **(** **)** +.. rst-class:: classref-method -Removes all bones from this ``Polygon2D``. +void **clear_bones** **(** **)** + +Removes all bones from this **Polygon2D**. + +.. rst-class:: classref-item-separator ---- .. _class_Polygon2D_method_erase_bone: -- void **erase_bone** **(** :ref:`int` index **)** +.. rst-class:: classref-method -Removes the specified bone from this ``Polygon2D``. +void **erase_bone** **(** :ref:`int` index **)** + +Removes the specified bone from this **Polygon2D**. + +.. rst-class:: classref-item-separator ---- .. _class_Polygon2D_method_get_bone_count: -- :ref:`int` **get_bone_count** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of bones in this ``Polygon2D``. +:ref:`int` **get_bone_count** **(** **)** |const| + +Returns the number of bones in this **Polygon2D**. + +.. rst-class:: classref-item-separator ---- .. _class_Polygon2D_method_get_bone_path: -- :ref:`NodePath` **get_bone_path** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_bone_path** **(** :ref:`int` index **)** |const| Returns the path to the node associated with the specified bone. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_method_get_bone_weights: -- :ref:`PackedFloat32Array` **get_bone_weights** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **get_bone_weights** **(** :ref:`int` index **)** |const| Returns the height values of the specified bone. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_method_set_bone_path: -- void **set_bone_path** **(** :ref:`int` index, :ref:`NodePath` path **)** +.. rst-class:: classref-method + +void **set_bone_path** **(** :ref:`int` index, :ref:`NodePath` path **)** Sets the path to the node associated with the specified bone. +.. rst-class:: classref-item-separator + ---- .. _class_Polygon2D_method_set_bone_weights: -- void **set_bone_weights** **(** :ref:`int` index, :ref:`PackedFloat32Array` weights **)** +.. rst-class:: classref-method + +void **set_bone_weights** **(** :ref:`int` index, :ref:`PackedFloat32Array` weights **)** Sets the weight values for the specified bone. diff --git a/classes/class_polygonoccluder3d.rst b/classes/class_polygonoccluder3d.rst index bc9b46504..9512fc643 100644 --- a/classes/class_polygonoccluder3d.rst +++ b/classes/class_polygonoccluder3d.rst @@ -14,34 +14,46 @@ PolygonOccluder3D Flat 2D polygon shape for use with occlusion culling in :ref:`OccluderInstance3D`. +.. rst-class:: classref-introduction-group + Description ----------- -``PolygonOccluder3D`` stores a polygon shape that can be used by the engine's occlusion culling system. When an :ref:`OccluderInstance3D` with a ``PolygonOccluder3D`` is selected in the editor, an editor will appear at the top of the 3D viewport so you can add/remove points. All points must be placed on the same 2D plane, which means it is not possible to create arbitrary 3D shapes with a single ``PolygonOccluder3D``. To use arbitrary 3D shapes as occluders, use :ref:`ArrayOccluder3D` or :ref:`OccluderInstance3D`'s baking feature instead. +**PolygonOccluder3D** stores a polygon shape that can be used by the engine's occlusion culling system. When an :ref:`OccluderInstance3D` with a **PolygonOccluder3D** is selected in the editor, an editor will appear at the top of the 3D viewport so you can add/remove points. All points must be placed on the same 2D plane, which means it is not possible to create arbitrary 3D shapes with a single **PolygonOccluder3D**. To use arbitrary 3D shapes as occluders, use :ref:`ArrayOccluder3D` or :ref:`OccluderInstance3D`'s baking feature instead. See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+----------------------------------------------------------+--------------------------+ -| :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | -+-----------------------------------------------------+----------------------------------------------------------+--------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | + +-----------------------------------------------------+----------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PolygonOccluder3D_property_polygon: -- :ref:`PackedVector2Array` **polygon** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``PackedVector2Array()`` | -+-----------+--------------------------+ -| *Setter* | set_polygon(value) | -+-----------+--------------------------+ -| *Getter* | get_polygon() | -+-----------+--------------------------+ +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` + +.. rst-class:: classref-property-setget + +- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** +- :ref:`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. diff --git a/classes/class_polygonpathfinder.rst b/classes/class_polygonpathfinder.rst index e818327ac..24e694f3a 100644 --- a/classes/class_polygonpathfinder.rst +++ b/classes/class_polygonpathfinder.rst @@ -16,103 +16,144 @@ PolygonPathFinder There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`find_path` **(** :ref:`Vector2` from, :ref:`Vector2` to **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_bounds` **(** **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` point **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_intersections` **(** :ref:`Vector2` from, :ref:`Vector2` to **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_penalty` **(** :ref:`int` idx **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_inside` **(** :ref:`Vector2` point **)** |const| | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_penalty` **(** :ref:`int` idx, :ref:`float` penalty **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`setup` **(** :ref:`PackedVector2Array` points, :ref:`PackedInt32Array` connections **)** | -+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`find_path` **(** :ref:`Vector2` from, :ref:`Vector2` to **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_bounds` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` point **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_intersections` **(** :ref:`Vector2` from, :ref:`Vector2` to **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_penalty` **(** :ref:`int` idx **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_inside` **(** :ref:`Vector2` point **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_penalty` **(** :ref:`int` idx, :ref:`float` penalty **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`setup` **(** :ref:`PackedVector2Array` points, :ref:`PackedInt32Array` connections **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PolygonPathFinder_method_find_path: -- :ref:`PackedVector2Array` **find_path** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **find_path** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PolygonPathFinder_method_get_bounds: -- :ref:`Rect2` **get_bounds** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_bounds** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PolygonPathFinder_method_get_closest_point: -- :ref:`Vector2` **get_closest_point** **(** :ref:`Vector2` point **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_closest_point** **(** :ref:`Vector2` point **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PolygonPathFinder_method_get_intersections: -- :ref:`PackedVector2Array` **get_intersections** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_intersections** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PolygonPathFinder_method_get_point_penalty: -- :ref:`float` **get_point_penalty** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_point_penalty** **(** :ref:`int` idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PolygonPathFinder_method_is_point_inside: -- :ref:`bool` **is_point_inside** **(** :ref:`Vector2` point **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_point_inside** **(** :ref:`Vector2` point **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PolygonPathFinder_method_set_point_penalty: -- void **set_point_penalty** **(** :ref:`int` idx, :ref:`float` penalty **)** +.. rst-class:: classref-method + +void **set_point_penalty** **(** :ref:`int` idx, :ref:`float` penalty **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PolygonPathFinder_method_setup: -- void **setup** **(** :ref:`PackedVector2Array` points, :ref:`PackedInt32Array` connections **)** +.. rst-class:: classref-method + +void **setup** **(** :ref:`PackedVector2Array` points, :ref:`PackedInt32Array` connections **)** .. container:: contribute diff --git a/classes/class_popup.rst b/classes/class_popup.rst index 1d3e66e1c..f8c9f3f7b 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -16,34 +16,49 @@ Popup Popup is a base window container for popup-like subwindows. +.. rst-class:: classref-introduction-group + Description ----------- -Popup is a base window container for popup-like subwindows. It's a modal by default (see :ref:`popup_window`) and has helpers for custom popup behavior. +Popup is a base window container for popup-like subwindows. It's a modal by default (see :ref:`Window.popup_window`) and has helpers for custom popup behavior. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------+---------------+-------------------------------------------------------------------------+ -| :ref:`bool` | borderless | ``true`` (overrides :ref:`Window`) | -+-------------------------+---------------+-------------------------------------------------------------------------+ -| :ref:`bool` | popup_window | ``true`` (overrides :ref:`Window`) | -+-------------------------+---------------+-------------------------------------------------------------------------+ -| :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | -+-------------------------+---------------+-------------------------------------------------------------------------+ -| :ref:`bool` | unresizable | ``true`` (overrides :ref:`Window`) | -+-------------------------+---------------+-------------------------------------------------------------------------+ -| :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | -+-------------------------+---------------+-------------------------------------------------------------------------+ -| :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | -+-------------------------+---------------+-------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------+-------------------------------------------------------------------------+ + | :ref:`bool` | borderless | ``true`` (overrides :ref:`Window`) | + +-------------------------+---------------+-------------------------------------------------------------------------+ + | :ref:`bool` | popup_window | ``true`` (overrides :ref:`Window`) | + +-------------------------+---------------+-------------------------------------------------------------------------+ + | :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | + +-------------------------+---------------+-------------------------------------------------------------------------+ + | :ref:`bool` | unresizable | ``true`` (overrides :ref:`Window`) | + +-------------------------+---------------+-------------------------------------------------------------------------+ + | :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | + +-------------------------+---------------+-------------------------------------------------------------------------+ + | :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | + +-------------------------+---------------+-------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Popup_signal_popup_hide: -- **popup_hide** **(** **)** +.. rst-class:: classref-signal + +**popup_hide** **(** **)** Emitted when the popup is hidden. diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 2ec1f3436..2f7f03d31 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -14,366 +14,423 @@ PopupMenu PopupMenu displays a list of options. +.. rst-class:: classref-introduction-group + Description ----------- -``PopupMenu`` is a modal window used to display a list of options. They are popular in toolbars or context menus. +**PopupMenu** is a modal window used to display a list of options. They are popular in toolbars or context menus. -The size of a ``PopupMenu`` can be limited by using :ref:`Window.max_size`. If the height of the list of items is larger than the maximum height of the ``PopupMenu``, a :ref:`ScrollContainer` within the popup will allow the user to scroll the contents. +The size of a **PopupMenu** can be limited by using :ref:`Window.max_size`. If the height of the list of items is larger than the maximum height of the **PopupMenu**, a :ref:`ScrollContainer` within the popup will allow the user to scroll the contents. -If no maximum size is set, or if it is set to 0, the ``PopupMenu`` height will be limited by its parent rect. +If no maximum size is set, or if it is set to 0, the **PopupMenu** height will be limited by its parent rect. All ``set_*`` methods allow negative item index, which makes the item accessed from the last one. -\ **Incremental search:** Like :ref:`ItemList` and :ref:`Tree`, ``PopupMenu`` supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec`. +\ **Incremental search:** Like :ref:`ItemList` and :ref:`Tree`, **PopupMenu** supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec`. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`allow_search` | ``true`` | -+---------------------------+----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`hide_on_checkable_item_selection` | ``true`` | -+---------------------------+----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`hide_on_item_selection` | ``true`` | -+---------------------------+----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`hide_on_state_item_selection` | ``false`` | -+---------------------------+----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`item_count` | ``0`` | -+---------------------------+----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`submenu_popup_delay` | ``0.3`` | -+---------------------------+----------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`allow_search` | ``true`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`hide_on_checkable_item_selection` | ``true`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`hide_on_item_selection` | ``true`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`hide_on_state_item_selection` | ``false`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`item_count` | ``0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`submenu_popup_delay` | ``0.3`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_check_shortcut` **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_check_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_check_shortcut` **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_radio_check_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_radio_check_shortcut` **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_shortcut` **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_multistate_item` **(** :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state=0, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_radio_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_radio_check_shortcut` **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_separator` **(** :ref:`String` label="", :ref:`int` id=-1 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_shortcut` **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_focused_item` **(** **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Key` | :ref:`get_item_accelerator` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_id` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_indent` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_language` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shortcut` | :ref:`get_item_shortcut` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_submenu` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`get_item_text_direction` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_checkable` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_checked` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_radio_checkable` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_shortcut_disabled` **(** :ref:`int` index **)** |const| | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` index **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scroll_to_item` **(** :ref:`int` index **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_focused_item` **(** :ref:`int` index **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_accelerator` **(** :ref:`int` index, :ref:`Key` accel **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_checkable` **(** :ref:`int` index, :ref:`bool` enable **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_radio_checkable` **(** :ref:`int` index, :ref:`bool` enable **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_separator` **(** :ref:`int` index, :ref:`bool` enable **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_checked` **(** :ref:`int` index, :ref:`bool` checked **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_disabled` **(** :ref:`int` index, :ref:`bool` disabled **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon` **(** :ref:`int` index, :ref:`Texture2D` icon **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_id` **(** :ref:`int` index, :ref:`int` id **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_indent` **(** :ref:`int` index, :ref:`int` indent **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_language` **(** :ref:`int` index, :ref:`String` language **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` index, :ref:`Variant` metadata **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_multistate` **(** :ref:`int` index, :ref:`int` state **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_shortcut` **(** :ref:`int` index, :ref:`Shortcut` shortcut, :ref:`bool` global=false **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_shortcut_disabled` **(** :ref:`int` index, :ref:`bool` disabled **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_submenu` **(** :ref:`int` index, :ref:`String` submenu **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text` **(** :ref:`int` index, :ref:`String` text **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text_direction` **(** :ref:`int` index, :ref:`TextDirection` direction **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_tooltip` **(** :ref:`int` index, :ref:`String` tooltip **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`toggle_item_checked` **(** :ref:`int` index **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`toggle_item_multistate` **(** :ref:`int` index **)** | -+--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_check_shortcut` **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_icon_check_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_icon_check_shortcut` **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_icon_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_icon_radio_check_item` **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_icon_radio_check_shortcut` **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_icon_shortcut` **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_multistate_item` **(** :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state=0, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_radio_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_radio_check_shortcut` **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_separator` **(** :ref:`String` label="", :ref:`int` id=-1 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_shortcut` **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_focused_item` **(** **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`get_item_accelerator` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_id` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_indent` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_language` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shortcut` | :ref:`get_item_shortcut` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_submenu` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_text` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_item_text_direction` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_checkable` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_checked` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_radio_checkable` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_shortcut_disabled` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_item` **(** :ref:`int` index **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_item` **(** :ref:`int` index **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_focused_item` **(** :ref:`int` index **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_accelerator` **(** :ref:`int` index, :ref:`Key` accel **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_as_checkable` **(** :ref:`int` index, :ref:`bool` enable **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_as_radio_checkable` **(** :ref:`int` index, :ref:`bool` enable **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_as_separator` **(** :ref:`int` index, :ref:`bool` enable **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_checked` **(** :ref:`int` index, :ref:`bool` checked **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_disabled` **(** :ref:`int` index, :ref:`bool` disabled **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon` **(** :ref:`int` index, :ref:`Texture2D` icon **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_id` **(** :ref:`int` index, :ref:`int` id **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_indent` **(** :ref:`int` index, :ref:`int` indent **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_language` **(** :ref:`int` index, :ref:`String` language **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_metadata` **(** :ref:`int` index, :ref:`Variant` metadata **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_multistate` **(** :ref:`int` index, :ref:`int` state **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_shortcut` **(** :ref:`int` index, :ref:`Shortcut` shortcut, :ref:`bool` global=false **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_shortcut_disabled` **(** :ref:`int` index, :ref:`bool` disabled **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_submenu` **(** :ref:`int` index, :ref:`String` submenu **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_text` **(** :ref:`int` index, :ref:`String` text **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_text_direction` **(** :ref:`int` index, :ref:`TextDirection` direction **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_tooltip` **(** :ref:`int` index, :ref:`String` tooltip **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`toggle_item_checked` **(** :ref:`int` index **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`toggle_item_multistate` **(** :ref:`int` index **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_accelerator_color` | ``Color(0.7, 0.7, 0.7, 0.8)`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.4, 0.4, 0.4, 0.8)`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_hover_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_separator_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_separator_outline_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`indent` | ``10`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`item_end_padding` | ``2`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`item_start_padding` | ``2`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`separator_outline_size` | ``0`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`v_separation` | ``4`` | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`font_separator` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`font_separator_size` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :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:`submenu` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`submenu_mirrored` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`unchecked` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`unchecked_disabled` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`hover` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`labeled_separator_left` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`labeled_separator_right` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`panel_disabled` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`separator` | | -+-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_accelerator_color` | ``Color(0.7, 0.7, 0.7, 0.8)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.4, 0.4, 0.4, 0.8)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_separator_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_separator_outline_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`indent` | ``10`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`item_end_padding` | ``2`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`item_start_padding` | ``2`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`separator_outline_size` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`font_separator` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`font_separator_size` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :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:`submenu` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`submenu_mirrored` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`hover` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`labeled_separator_left` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`labeled_separator_right` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`panel_disabled` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`separator` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_PopupMenu_signal_id_focused: -- **id_focused** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**id_focused** **(** :ref:`int` id **)** Emitted when the user navigated to an item of some ``id`` using the :ref:`ProjectSettings.input/ui_up` or :ref:`ProjectSettings.input/ui_down` input action. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_signal_id_pressed: -- **id_pressed** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**id_pressed** **(** :ref:`int` id **)** Emitted when an item of some ``id`` is pressed or its accelerator is activated. \ **Note:** If ``id`` is negative (either explicitly or due to overflow), this will return the corresponding index instead. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_signal_index_pressed: -- **index_pressed** **(** :ref:`int` index **)** +.. rst-class:: classref-signal + +**index_pressed** **(** :ref:`int` index **)** Emitted when an item of some ``index`` is pressed or its accelerator is activated. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_signal_menu_changed: -- **menu_changed** **(** **)** +.. rst-class:: classref-signal + +**menu_changed** **(** **)** + +Emitted when any item is added, modified or removed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PopupMenu_property_allow_search: -- :ref:`bool` **allow_search** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_allow_search(value) | -+-----------+-------------------------+ -| *Getter* | get_allow_search() | -+-----------+-------------------------+ +:ref:`bool` **allow_search** = ``true`` -If ``true``, allows navigating ``PopupMenu`` with letter keys. +.. rst-class:: classref-property-setget + +- void **set_allow_search** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_search** **(** **)** + +If ``true``, allows navigating **PopupMenu** with letter keys. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_property_hide_on_checkable_item_selection: -- :ref:`bool` **hide_on_checkable_item_selection** +.. rst-class:: classref-property -+-----------+---------------------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------------------+ -| *Setter* | set_hide_on_checkable_item_selection(value) | -+-----------+---------------------------------------------+ -| *Getter* | is_hide_on_checkable_item_selection() | -+-----------+---------------------------------------------+ +:ref:`bool` **hide_on_checkable_item_selection** = ``true`` -If ``true``, hides the ``PopupMenu`` when a checkbox or radio button is selected. +.. rst-class:: classref-property-setget + +- void **set_hide_on_checkable_item_selection** **(** :ref:`bool` value **)** +- :ref:`bool` **is_hide_on_checkable_item_selection** **(** **)** + +If ``true``, hides the **PopupMenu** when a checkbox or radio button is selected. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_property_hide_on_item_selection: -- :ref:`bool` **hide_on_item_selection** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------+ -| *Setter* | set_hide_on_item_selection(value) | -+-----------+-----------------------------------+ -| *Getter* | is_hide_on_item_selection() | -+-----------+-----------------------------------+ +:ref:`bool` **hide_on_item_selection** = ``true`` -If ``true``, hides the ``PopupMenu`` when an item is selected. +.. rst-class:: classref-property-setget + +- void **set_hide_on_item_selection** **(** :ref:`bool` value **)** +- :ref:`bool` **is_hide_on_item_selection** **(** **)** + +If ``true``, hides the **PopupMenu** when an item is selected. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_property_hide_on_state_item_selection: -- :ref:`bool` **hide_on_state_item_selection** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------+ -| *Setter* | set_hide_on_state_item_selection(value) | -+-----------+-----------------------------------------+ -| *Getter* | is_hide_on_state_item_selection() | -+-----------+-----------------------------------------+ +:ref:`bool` **hide_on_state_item_selection** = ``false`` -If ``true``, hides the ``PopupMenu`` when a state item is selected. +.. rst-class:: classref-property-setget + +- void **set_hide_on_state_item_selection** **(** :ref:`bool` value **)** +- :ref:`bool` **is_hide_on_state_item_selection** **(** **)** + +If ``true``, hides the **PopupMenu** when a state item is selected. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_property_item_count: -- :ref:`int` **item_count** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_item_count(value) | -+-----------+-----------------------+ -| *Getter* | get_item_count() | -+-----------+-----------------------+ +:ref:`int` **item_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_item_count** **(** :ref:`int` value **)** +- :ref:`int` **get_item_count** **(** **)** The number of items currently in the list. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_property_submenu_popup_delay: -- :ref:`float` **submenu_popup_delay** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.3`` | -+-----------+--------------------------------+ -| *Setter* | set_submenu_popup_delay(value) | -+-----------+--------------------------------+ -| *Getter* | get_submenu_popup_delay() | -+-----------+--------------------------------+ +:ref:`float` **submenu_popup_delay** = ``0.3`` + +.. rst-class:: classref-property-setget + +- void **set_submenu_popup_delay** **(** :ref:`float` value **)** +- :ref:`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-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PopupMenu_method_add_check_item: -- void **add_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** +.. rst-class:: classref-method + +void **add_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** Adds a new checkable item with text ``label``. @@ -381,11 +438,15 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If \ **Note:** 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` for more info on how to control it. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_check_shortcut: -- void **add_check_shortcut** **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +.. rst-class:: classref-method + +void **add_check_shortcut** **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** Adds a new checkable item and assigns the specified :ref:`Shortcut` to it. Sets the label of the checkbox to the :ref:`Shortcut`'s name. @@ -393,11 +454,15 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea \ **Note:** 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` for more info on how to control it. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_icon_check_item: -- void **add_icon_check_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** +.. rst-class:: classref-method + +void **add_icon_check_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** Adds a new checkable item with text ``label`` and icon ``texture``. @@ -405,11 +470,15 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If \ **Note:** 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` for more info on how to control it. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_icon_check_shortcut: -- void **add_icon_check_shortcut** **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +.. rst-class:: classref-method + +void **add_icon_check_shortcut** **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** Adds a new checkable item and assigns the specified :ref:`Shortcut` and icon ``texture`` to it. Sets the label of the checkbox to the :ref:`Shortcut`'s name. @@ -417,47 +486,67 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea \ **Note:** 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` for more info on how to control it. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_icon_item: -- void **add_icon_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** +.. rst-class:: classref-method + +void **add_icon_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** Adds a new item with text ``label`` and icon ``texture``. 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 ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_icon_radio_check_item: -- void **add_icon_radio_check_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** +.. rst-class:: classref-method + +void **add_icon_radio_check_item** **(** :ref:`Texture2D` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** Same as :ref:`add_icon_check_item`, but uses a radio check button. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_icon_radio_check_shortcut: -- void **add_icon_radio_check_shortcut** **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +.. rst-class:: classref-method + +void **add_icon_radio_check_shortcut** **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** Same as :ref:`add_icon_check_shortcut`, but uses a radio check button. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_icon_shortcut: -- void **add_icon_shortcut** **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +.. rst-class:: classref-method + +void **add_icon_shortcut** **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** Adds a new item and assigns the specified :ref:`Shortcut` and icon ``texture`` to it. Sets the label of the checkbox to the :ref:`Shortcut`'s name. 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_item: -- void **add_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** +.. rst-class:: classref-method + +void **add_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** Adds a new item with text ``label``. @@ -465,11 +554,15 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If \ **Note:** The provided ``id`` is used only in :ref:`id_pressed` and :ref:`id_focused` signals. It's not related to the ``index`` arguments in e.g. :ref:`set_item_checked`. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_multistate_item: -- void **add_multistate_item** **(** :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state=0, :ref:`int` id=-1, :ref:`Key` accel=0 **)** +.. rst-class:: classref-method + +void **add_multistate_item** **(** :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state=0, :ref:`int` id=-1, :ref:`Key` accel=0 **)** Adds a new multistate item with text ``label``. @@ -477,11 +570,15 @@ Contrarily to normal binary items, multistate items can have more than two 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 ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_radio_check_item: -- void **add_radio_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** +.. rst-class:: classref-method + +void **add_radio_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`Key` accel=0 **)** Adds a new radio check button with text ``label``. @@ -489,11 +586,15 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If \ **Note:** 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` for more info on how to control it. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_radio_check_shortcut: -- void **add_radio_check_shortcut** **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +.. rst-class:: classref-method + +void **add_radio_check_shortcut** **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** Adds a new radio check button and assigns a :ref:`Shortcut` to it. Sets the label of the checkbox to the :ref:`Shortcut`'s name. @@ -501,724 +602,988 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea \ **Note:** 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` for more info on how to control it. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_separator: -- void **add_separator** **(** :ref:`String` label="", :ref:`int` id=-1 **)** +.. rst-class:: classref-method + +void **add_separator** **(** :ref:`String` label="", :ref:`int` id=-1 **)** Adds a separator between items. Separators also occupy an index, which you can set by using the ``id`` parameter. A ``label`` can optionally be provided, which will appear at the center of the separator. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_add_shortcut: -- void **add_shortcut** **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** +.. rst-class:: classref-method + +void **add_shortcut** **(** :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** Adds a :ref:`Shortcut`. 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_item: -- void **add_submenu_item** **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** +.. rst-class:: classref-method -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. +void **add_submenu_item** **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** + +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. 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_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method -Removes all items from the ``PopupMenu``. +void **clear** **(** **)** + +Removes all items from the **PopupMenu**. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_method_get_focused_item: -- :ref:`int` **get_focused_item** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_focused_item** **(** **)** |const| Returns the index of the currently focused item. Returns ``-1`` if no item is focused. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_accelerator: -- :ref:`Key` **get_item_accelerator** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Key` **get_item_accelerator** **(** :ref:`int` index **)** |const| Returns the accelerator of the item at the given ``index``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_icon: -- :ref:`Texture2D` **get_item_icon** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_item_icon** **(** :ref:`int` index **)** |const| Returns the icon of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_id: -- :ref:`int` **get_item_id** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_item_id** **(** :ref:`int` index **)** |const| Returns the id of the item at the given ``index``. ``id`` can be manually assigned, while index can not. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_indent: -- :ref:`int` **get_item_indent** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_item_indent** **(** :ref:`int` index **)** |const| Returns the horizontal offset of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_index: -- :ref:`int` **get_item_index** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_item_index** **(** :ref:`int` id **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_language: -- :ref:`String` **get_item_language** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_language** **(** :ref:`int` index **)** |const| Returns item's text language code. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_metadata: -- :ref:`Variant` **get_item_metadata** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_item_metadata** **(** :ref:`int` index **)** |const| Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_metadata`, which provides a simple way of assigning context data to items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_shortcut: -- :ref:`Shortcut` **get_item_shortcut** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Shortcut` **get_item_shortcut** **(** :ref:`int` index **)** |const| Returns the :ref:`Shortcut` associated with the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_submenu: -- :ref:`String` **get_item_submenu** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_submenu** **(** :ref:`int` index **)** |const| Returns the submenu name of the item at the given ``index``. See :ref:`add_submenu_item` for more info on how to add a submenu. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_text: -- :ref:`String` **get_item_text** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_text** **(** :ref:`int` index **)** |const| Returns the text of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_text_direction: -- :ref:`TextDirection` **get_item_text_direction** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`TextDirection` **get_item_text_direction** **(** :ref:`int` index **)** |const| Returns item's text base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_get_item_tooltip: -- :ref:`String` **get_item_tooltip** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_item_tooltip** **(** :ref:`int` index **)** |const| Returns the tooltip associated with the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_is_item_checkable: -- :ref:`bool` **is_item_checkable** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_checkable** **(** :ref:`int` index **)** |const| Returns ``true`` if the item at the given ``index`` is checkable in some way, i.e. if it has a checkbox or radio button. \ **Note:** Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_is_item_checked: -- :ref:`bool` **is_item_checked** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_checked** **(** :ref:`int` index **)** |const| Returns ``true`` if the item at the given ``index`` is checked. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_is_item_disabled: -- :ref:`bool` **is_item_disabled** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_disabled** **(** :ref:`int` index **)** |const| Returns ``true`` if the item at the given ``index`` is disabled. When it is disabled it can't be selected, or its action invoked. See :ref:`set_item_disabled` for more info on how to disable an item. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_is_item_radio_checkable: -- :ref:`bool` **is_item_radio_checkable** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_radio_checkable** **(** :ref:`int` index **)** |const| Returns ``true`` if the item at the given ``index`` has radio button-style checkability. \ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_is_item_separator: -- :ref:`bool` **is_item_separator** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_separator** **(** :ref:`int` index **)** |const| Returns ``true`` if the item is a separator. If it is, it will be displayed as a line. See :ref:`add_separator` for more info on how to add a separator. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_is_item_shortcut_disabled: -- :ref:`bool` **is_item_shortcut_disabled** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_item_shortcut_disabled** **(** :ref:`int` index **)** |const| Returns ``true`` if the specified item's shortcut is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_remove_item: -- void **remove_item** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_item** **(** :ref:`int` index **)** Removes the item at the given ``index`` from the menu. \ **Note:** The indices of items after the removed item will be shifted by one. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_scroll_to_item: -- void **scroll_to_item** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **scroll_to_item** **(** :ref:`int` index **)** Moves the scroll view to make the item at the given ``index`` visible. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_focused_item: -- void **set_focused_item** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **set_focused_item** **(** :ref:`int` index **)** Sets the currently focused item as the given ``index``. Passing ``-1`` as the index makes so that no item is focused. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_accelerator: -- void **set_item_accelerator** **(** :ref:`int` index, :ref:`Key` accel **)** +.. rst-class:: classref-method + +void **set_item_accelerator** **(** :ref:`int` index, :ref:`Key` accel **)** Sets the accelerator of the item at the given ``index``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_as_checkable: -- void **set_item_as_checkable** **(** :ref:`int` index, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_item_as_checkable** **(** :ref:`int` index, :ref:`bool` enable **)** Sets whether the item at the given ``index`` has a checkbox. If ``false``, sets the type of the item to plain text. \ **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_as_radio_checkable: -- void **set_item_as_radio_checkable** **(** :ref:`int` index, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_item_as_radio_checkable** **(** :ref:`int` index, :ref:`bool` enable **)** Sets the type of the item at the given ``index`` to radio button. If ``false``, sets the type of the item to plain text. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_as_separator: -- void **set_item_as_separator** **(** :ref:`int` index, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_item_as_separator** **(** :ref:`int` index, :ref:`bool` enable **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_checked: -- void **set_item_checked** **(** :ref:`int` index, :ref:`bool` checked **)** +.. rst-class:: classref-method + +void **set_item_checked** **(** :ref:`int` index, :ref:`bool` checked **)** Sets the checkstate status of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_disabled: -- void **set_item_disabled** **(** :ref:`int` index, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_item_disabled** **(** :ref:`int` index, :ref:`bool` 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. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_icon: -- void **set_item_icon** **(** :ref:`int` index, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **set_item_icon** **(** :ref:`int` index, :ref:`Texture2D` icon **)** Replaces the :ref:`Texture2D` icon of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_id: -- void **set_item_id** **(** :ref:`int` index, :ref:`int` id **)** +.. rst-class:: classref-method + +void **set_item_id** **(** :ref:`int` index, :ref:`int` id **)** Sets the ``id`` of the item at the given ``index``. The ``id`` is used in :ref:`id_pressed` and :ref:`id_focused` signals. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_indent: -- void **set_item_indent** **(** :ref:`int` index, :ref:`int` indent **)** +.. rst-class:: classref-method + +void **set_item_indent** **(** :ref:`int` index, :ref:`int` indent **)** Sets the horizontal offset of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_language: -- void **set_item_language** **(** :ref:`int` index, :ref:`String` language **)** +.. rst-class:: classref-method + +void **set_item_language** **(** :ref:`int` index, :ref:`String` language **)** Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_metadata: -- void **set_item_metadata** **(** :ref:`int` index, :ref:`Variant` metadata **)** +.. rst-class:: classref-method + +void **set_item_metadata** **(** :ref:`int` index, :ref:`Variant` metadata **)** Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_metadata`, which provides a simple way of assigning context data to items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_multistate: -- void **set_item_multistate** **(** :ref:`int` index, :ref:`int` state **)** +.. rst-class:: classref-method + +void **set_item_multistate** **(** :ref:`int` index, :ref:`int` state **)** Sets the state of a multistate item. See :ref:`add_multistate_item` for details. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_shortcut: -- void **set_item_shortcut** **(** :ref:`int` index, :ref:`Shortcut` shortcut, :ref:`bool` global=false **)** +.. rst-class:: classref-method + +void **set_item_shortcut** **(** :ref:`int` index, :ref:`Shortcut` shortcut, :ref:`bool` global=false **)** Sets a :ref:`Shortcut` for the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_shortcut_disabled: -- void **set_item_shortcut_disabled** **(** :ref:`int` index, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_item_shortcut_disabled** **(** :ref:`int` index, :ref:`bool` disabled **)** Disables the :ref:`Shortcut` of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_submenu: -- void **set_item_submenu** **(** :ref:`int` index, :ref:`String` submenu **)** +.. rst-class:: classref-method -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. +void **set_item_submenu** **(** :ref:`int` index, :ref:`String` submenu **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_method_set_item_text: -- void **set_item_text** **(** :ref:`int` index, :ref:`String` text **)** +.. rst-class:: classref-method + +void **set_item_text** **(** :ref:`int` index, :ref:`String` text **)** Sets the text of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_text_direction: -- void **set_item_text_direction** **(** :ref:`int` index, :ref:`TextDirection` direction **)** +.. rst-class:: classref-method + +void **set_item_text_direction** **(** :ref:`int` index, :ref:`TextDirection` direction **)** Sets item's text base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_set_item_tooltip: -- void **set_item_tooltip** **(** :ref:`int` index, :ref:`String` tooltip **)** +.. rst-class:: classref-method + +void **set_item_tooltip** **(** :ref:`int` index, :ref:`String` tooltip **)** Sets the :ref:`String` tooltip of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_toggle_item_checked: -- void **toggle_item_checked** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **toggle_item_checked** **(** :ref:`int` index **)** Toggles the check state of the item at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_method_toggle_item_multistate: -- void **toggle_item_multistate** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **toggle_item_multistate** **(** :ref:`int` index **)** Cycle to the next state of a multistate item. See :ref:`add_multistate_item` for details. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_PopupMenu_theme_color_font_accelerator_color: -- :ref:`Color` **font_accelerator_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``Color(0.7, 0.7, 0.7, 0.8)`` | -+-----------+-------------------------------+ +:ref:`Color` **font_accelerator_color** = ``Color(0.7, 0.7, 0.7, 0.8)`` The text :ref:`Color` used for shortcuts and accelerators that show next to the menu item name when defined. See :ref:`get_item_accelerator` for more info on accelerators. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` The default text :ref:`Color` for menu items' names. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``Color(0.4, 0.4, 0.4, 0.8)`` | -+-----------+-------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.4, 0.4, 0.4, 0.8)`` :ref:`Color` used for disabled menu items' text. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_color_font_hover_color: -- :ref:`Color` **font_hover_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_hover_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`Color` used for the hovered text. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` The tint of text outline of the menu item. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_color_font_separator_color: -- :ref:`Color` **font_separator_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_separator_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`Color` used for labeled separators' text. See :ref:`add_separator`. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_color_font_separator_outline_color: -- :ref:`Color` **font_separator_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_separator_outline_color** = ``Color(1, 1, 1, 1)`` The tint of text outline of the labeled separator. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal space between the item's elements. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_constant_indent: -- :ref:`int` **indent** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``10`` | -+-----------+--------+ +:ref:`int` **indent** = ``10`` Width of the single indentation level. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_constant_item_end_padding: -- :ref:`int` **item_end_padding** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **item_end_padding** = ``2`` -.. container:: contribute +Horizontal padding to the right of the items (or left, in RTL layout). - There is currently no description for this theme property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_theme_constant_item_start_padding: -- :ref:`int` **item_start_padding** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **item_start_padding** = ``2`` -.. container:: contribute +Horizontal padding to the left of the items (or right, in RTL layout). - There is currently no description for this theme property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the item text outline. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_constant_separator_outline_size: -- :ref:`int` **separator_outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **separator_outline_size** = ``0`` The size of the labeled separator text outline. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_constant_v_separation: -- :ref:`int` **v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **v_separation** = ``4`` The vertical space between each menu item. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** :ref:`Font` used for the menu items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_font_font_separator: -- :ref:`Font` **font_separator** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font_separator** :ref:`Font` used for the labeled separator. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_font_size_font_separator_size: -- :ref:`int` **font_separator_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_separator_size** Font size of the labeled separator. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Font size of the menu items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_checked: -- :ref:`Texture2D` **checked** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **checked** :ref:`Texture2D` icon for the checked checkbox items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_checked_disabled: -- :ref:`Texture2D` **checked_disabled** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **checked_disabled** :ref:`Texture2D` icon for the checked checkbox items when they are disabled. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_radio_checked: -- :ref:`Texture2D` **radio_checked** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **radio_checked** :ref:`Texture2D` icon for the checked radio button items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_radio_checked_disabled: -- :ref:`Texture2D` **radio_checked_disabled** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **radio_checked_disabled** :ref:`Texture2D` icon for the checked radio button items when they are disabled. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_radio_unchecked: -- :ref:`Texture2D` **radio_unchecked** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **radio_unchecked** :ref:`Texture2D` icon for the unchecked radio button items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_radio_unchecked_disabled: -- :ref:`Texture2D` **radio_unchecked_disabled** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **radio_unchecked_disabled** :ref:`Texture2D` icon for the unchecked radio button items when they are disabled. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_submenu: -- :ref:`Texture2D` **submenu** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **submenu** :ref:`Texture2D` icon for the submenu arrow (for left-to-right layouts). +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_submenu_mirrored: -- :ref:`Texture2D` **submenu_mirrored** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **submenu_mirrored** :ref:`Texture2D` icon for the submenu arrow (for right-to-left layouts). +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_unchecked: -- :ref:`Texture2D` **unchecked** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **unchecked** :ref:`Texture2D` icon for the unchecked checkbox items. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_icon_unchecked_disabled: -- :ref:`Texture2D` **unchecked_disabled** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **unchecked_disabled** :ref:`Texture2D` icon for the unchecked checkbox items when they are disabled. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_style_hover: -- :ref:`StyleBox` **hover** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` displayed when the ``PopupMenu`` item is hovered. +:ref:`StyleBox` **hover** + +:ref:`StyleBox` displayed when the **PopupMenu** item is hovered. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_theme_style_labeled_separator_left: -- :ref:`StyleBox` **labeled_separator_left** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **labeled_separator_left** :ref:`StyleBox` for the left side of labeled separator. See :ref:`add_separator`. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_style_labeled_separator_right: -- :ref:`StyleBox` **labeled_separator_right** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **labeled_separator_right** :ref:`StyleBox` for the right side of labeled separator. See :ref:`add_separator`. +.. rst-class:: classref-item-separator + ---- .. _class_PopupMenu_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty -Default :ref:`StyleBox` of the ``PopupMenu`` items. +:ref:`StyleBox` **panel** + +Default :ref:`StyleBox` of the **PopupMenu** items. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_theme_style_panel_disabled: -- :ref:`StyleBox` **panel_disabled** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used when the ``PopupMenu`` item is disabled. +:ref:`StyleBox` **panel_disabled** + +:ref:`StyleBox` used when the **PopupMenu** item is disabled. + +.. rst-class:: classref-item-separator ---- .. _class_PopupMenu_theme_style_separator: -- :ref:`StyleBox` **separator** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **separator** :ref:`StyleBox` used for the separators. See :ref:`add_separator`. diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst index bd5ebbd1e..5f43de45d 100644 --- a/classes/class_popuppanel.rst +++ b/classes/class_popuppanel.rst @@ -14,28 +14,43 @@ PopupPanel Class for displaying popups with a panel background. +.. rst-class:: classref-introduction-group + Description ----------- Class for displaying popups with a panel background. In some cases it might be simpler to use than :ref:`Popup`, since it provides a configurable background. If you are making windows, better check :ref:`Window`. -If any :ref:`Control` node is added as a child of this ``PopupPanel``, it will be stretched to fit the panel's size (similar to how :ref:`PanelContainer` works). +If any :ref:`Control` node is added as a child of this **PopupPanel**, it will be stretched to fit the panel's size (similar to how :ref:`PanelContainer` works). + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+--------------------------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | -+---------------------------------+--------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | + +---------------------------------+--------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_PopupPanel_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty -The background panel style of this ``PopupPanel``. +:ref:`StyleBox` **panel** + +The background panel style of this **PopupPanel**. .. |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.)` diff --git a/classes/class_portablecompressedtexture2d.rst b/classes/class_portablecompressedtexture2d.rst index a6932cb45..3cdea822c 100644 --- a/classes/class_portablecompressedtexture2d.rst +++ b/classes/class_portablecompressedtexture2d.rst @@ -14,6 +14,8 @@ PortableCompressedTexture2D Provides a compressed texture for disk and/or VRAM in a way that is portable. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,120 +29,176 @@ For portable, self contained 3D textures that work on both desktop and mobile, B This resource is intended to be created from code. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`_data` | ``PackedByteArray()`` | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`keep_compressed_buffer` | ``false`` | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`size_override` | ``Vector2(0, 0)`` | -+-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_data` | ``PackedByteArray()`` | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`keep_compressed_buffer` | ``false`` | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`size_override` | ``Vector2(0, 0)`` | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_from_image` **(** :ref:`Image` image, :ref:`CompressionMode` compression_mode, :ref:`bool` normal_map=false, :ref:`float` lossy_quality=0.8 **)** | -+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CompressionMode` | :ref:`get_compression_mode` **(** **)** |const| | -+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`get_format` **(** **)** |const| | -+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_keeping_all_compressed_buffers` **(** **)** |static| | -+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_keep_all_compressed_buffers` **(** :ref:`bool` keep **)** |static| | -+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_from_image` **(** :ref:`Image` image, :ref:`CompressionMode` compression_mode, :ref:`bool` normal_map=false, :ref:`float` lossy_quality=0.8 **)** | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CompressionMode` | :ref:`get_compression_mode` **(** **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_keeping_all_compressed_buffers` **(** **)** |static| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_keep_all_compressed_buffers` **(** :ref:`bool` keep **)** |static| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_PortableCompressedTexture2D_CompressionMode: -.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSLESS: - -.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSY: - -.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BASIS_UNIVERSAL: - -.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_S3TC: - -.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_ETC2: - -.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BPTC: +.. rst-class:: classref-enumeration enum **CompressionMode**: -- **COMPRESSION_MODE_LOSSLESS** = **0** +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSLESS: -- **COMPRESSION_MODE_LOSSY** = **1** +.. rst-class:: classref-enumeration-constant -- **COMPRESSION_MODE_BASIS_UNIVERSAL** = **2** +:ref:`CompressionMode` **COMPRESSION_MODE_LOSSLESS** = ``0`` -- **COMPRESSION_MODE_S3TC** = **3** -- **COMPRESSION_MODE_ETC2** = **4** -- **COMPRESSION_MODE_BPTC** = **5** +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_MODE_LOSSY** = ``1`` + + + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BASIS_UNIVERSAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_MODE_BASIS_UNIVERSAL** = ``2`` + + + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_S3TC: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_MODE_S3TC** = ``3`` + + + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_ETC2: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_MODE_ETC2** = ``4`` + + + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BPTC: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressionMode` **COMPRESSION_MODE_BPTC** = ``5`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PortableCompressedTexture2D_property__data: -- :ref:`PackedByteArray` **_data** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+-----------------------+ +:ref:`PackedByteArray` **_data** = ``PackedByteArray()`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PortableCompressedTexture2D_property_keep_compressed_buffer: -- :ref:`bool` **keep_compressed_buffer** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_keep_compressed_buffer(value) | -+-----------+-----------------------------------+ -| *Getter* | is_keeping_compressed_buffer() | -+-----------+-----------------------------------+ +:ref:`bool` **keep_compressed_buffer** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_keep_compressed_buffer** **(** :ref:`bool` value **)** +- :ref:`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. This flag allows to keep the compressed data in memory if you intend it to persist after loading. +.. rst-class:: classref-item-separator + ---- .. _class_PortableCompressedTexture2D_property_size_override: -- :ref:`Vector2` **size_override** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_size_override(value) | -+-----------+--------------------------+ -| *Getter* | get_size_override() | -+-----------+--------------------------+ +:ref:`Vector2` **size_override** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_size_override** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_size_override** **(** **)** Allow overriding the texture size (for 2D only). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PortableCompressedTexture2D_method_create_from_image: -- void **create_from_image** **(** :ref:`Image` image, :ref:`CompressionMode` compression_mode, :ref:`bool` normal_map=false, :ref:`float` lossy_quality=0.8 **)** +.. rst-class:: classref-method + +void **create_from_image** **(** :ref:`Image` image, :ref:`CompressionMode` compression_mode, :ref:`bool` normal_map=false, :ref:`float` lossy_quality=0.8 **)** Initializes the compressed texture from a base image. The compression mode must be provided. @@ -148,35 +206,51 @@ Initializes the compressed texture from a base image. The compression mode must If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality. +.. rst-class:: classref-item-separator + ---- .. _class_PortableCompressedTexture2D_method_get_compression_mode: -- :ref:`CompressionMode` **get_compression_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`CompressionMode` **get_compression_mode** **(** **)** |const| Return the compression mode used (valid after initialized). +.. rst-class:: classref-item-separator + ---- .. _class_PortableCompressedTexture2D_method_get_format: -- :ref:`Format` **get_format** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Format` **get_format** **(** **)** |const| Return the image format used (valid after initialized). +.. rst-class:: classref-item-separator + ---- .. _class_PortableCompressedTexture2D_method_is_keeping_all_compressed_buffers: -- :ref:`bool` **is_keeping_all_compressed_buffers** **(** **)** |static| +.. rst-class:: classref-method + +:ref:`bool` **is_keeping_all_compressed_buffers** **(** **)** |static| Return whether the flag is overridden for all textures of this type. +.. rst-class:: classref-item-separator + ---- .. _class_PortableCompressedTexture2D_method_set_keep_all_compressed_buffers: -- void **set_keep_all_compressed_buffers** **(** :ref:`bool` keep **)** |static| +.. rst-class:: classref-method + +void **set_keep_all_compressed_buffers** **(** :ref:`bool` keep **)** |static| Overrides the flag globally for all textures of this type. This is used primarily by the editor. diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index 42abc935f..073dae6f9 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -16,132 +16,167 @@ PrimitiveMesh Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. +.. rst-class:: classref-introduction-group + Description ----------- Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. Examples include :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PrismMesh`, and :ref:`SphereMesh`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+--------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`add_uv2` | ``false`` | -+---------------------------------+--------------------------------------------------------------+----------------------------+ -| :ref:`AABB` | :ref:`custom_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | -+---------------------------------+--------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`flip_faces` | ``false`` | -+---------------------------------+--------------------------------------------------------------+----------------------------+ -| :ref:`Material` | :ref:`material` | | -+---------------------------------+--------------------------------------------------------------+----------------------------+ -| :ref:`float` | :ref:`uv2_padding` | ``2.0`` | -+---------------------------------+--------------------------------------------------------------+----------------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`add_uv2` | ``false`` | + +---------------------------------+--------------------------------------------------------------+----------------------------+ + | :ref:`AABB` | :ref:`custom_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | + +---------------------------------+--------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`flip_faces` | ``false`` | + +---------------------------------+--------------------------------------------------------------+----------------------------+ + | :ref:`Material` | :ref:`material` | | + +---------------------------------+--------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`uv2_padding` | ``2.0`` | + +---------------------------------+--------------------------------------------------------------+----------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_create_mesh_array` **(** **)** |virtual| |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_mesh_arrays` **(** **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_create_mesh_array` **(** **)** |virtual| |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_mesh_arrays` **(** **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PrimitiveMesh_property_add_uv2: -- :ref:`bool` **add_uv2** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_add_uv2(value) | -+-----------+--------------------+ -| *Getter* | get_add_uv2() | -+-----------+--------------------+ +:ref:`bool` **add_uv2** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_add_uv2** **(** :ref:`bool` value **)** +- :ref:`bool` **get_add_uv2** **(** **)** If set, generates UV2 UV coordinates applying a padding using the :ref:`uv2_padding` setting. UV2 is needed for lightmapping. +.. rst-class:: classref-item-separator + ---- .. _class_PrimitiveMesh_property_custom_aabb: -- :ref:`AABB` **custom_aabb** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``AABB(0, 0, 0, 0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_custom_aabb(value) | -+-----------+----------------------------+ -| *Getter* | get_custom_aabb() | -+-----------+----------------------------+ +:ref:`AABB` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_custom_aabb** **(** :ref:`AABB` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_PrimitiveMesh_property_flip_faces: -- :ref:`bool` **flip_faces** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_flip_faces(value) | -+-----------+-----------------------+ -| *Getter* | get_flip_faces() | -+-----------+-----------------------+ +:ref:`bool` **flip_faces** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_faces** **(** :ref:`bool` value **)** +- :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. This gives the same result as using :ref:`BaseMaterial3D.CULL_FRONT` in :ref:`BaseMaterial3D.cull_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_PrimitiveMesh_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** The current :ref:`Material` of the primitive mesh. +.. rst-class:: classref-item-separator + ---- .. _class_PrimitiveMesh_property_uv2_padding: -- :ref:`float` **uv2_padding** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``2.0`` | -+-----------+------------------------+ -| *Setter* | set_uv2_padding(value) | -+-----------+------------------------+ -| *Getter* | get_uv2_padding() | -+-----------+------------------------+ +:ref:`float` **uv2_padding** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_uv2_padding** **(** :ref:`float` value **)** +- :ref:`float` **get_uv2_padding** **(** **)** If :ref:`add_uv2` is set, specifies the padding in pixels applied along seams of the mesh. If at generation the size of the lightmap texture can't be determined, the UVs are calculated assuming a texture size of 1024x1024. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_PrimitiveMesh_method__create_mesh_array: -- :ref:`Array` **_create_mesh_array** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Array` **_create_mesh_array** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_PrimitiveMesh_method_get_mesh_arrays: -- :ref:`Array` **get_mesh_arrays** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_mesh_arrays** **(** **)** |const| Returns mesh arrays used to constitute surface of :ref:`Mesh`. The result can be passed to :ref:`ArrayMesh.add_surface_from_arrays` to create a new surface. For example: diff --git a/classes/class_prismmesh.rst b/classes/class_prismmesh.rst index ce6f2250d..b260d047a 100644 --- a/classes/class_prismmesh.rst +++ b/classes/class_prismmesh.rst @@ -14,104 +14,120 @@ PrismMesh Class representing a prism-shaped :ref:`PrimitiveMesh`. +.. rst-class:: classref-introduction-group + Description ----------- Class representing a prism-shaped :ref:`PrimitiveMesh`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`left_to_right` | ``0.5`` | -+-------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | -+-------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_depth` | ``0`` | -+-------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_height` | ``0`` | -+-------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`subdivide_width` | ``0`` | -+-------------------------------+--------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`left_to_right` | ``0.5`` | + +-------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | + +-------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_depth` | ``0`` | + +-------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_height` | ``0`` | + +-------------------------------+--------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`subdivide_width` | ``0`` | + +-------------------------------+--------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PrismMesh_property_left_to_right: -- :ref:`float` **left_to_right** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.5`` | -+-----------+--------------------------+ -| *Setter* | set_left_to_right(value) | -+-----------+--------------------------+ -| *Getter* | get_left_to_right() | -+-----------+--------------------------+ +:ref:`float` **left_to_right** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_left_to_right** **(** :ref:`float` value **)** +- :ref:`float` **get_left_to_right** **(** **)** Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. +.. rst-class:: classref-item-separator + ---- .. _class_PrismMesh_property_size: -- :ref:`Vector3` **size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(1, 1, 1)`` | -+-----------+----------------------+ -| *Setter* | set_size(value) | -+-----------+----------------------+ -| *Getter* | get_size() | -+-----------+----------------------+ +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_size** **(** **)** Size of the prism. +.. rst-class:: classref-item-separator + ---- .. _class_PrismMesh_property_subdivide_depth: -- :ref:`int` **subdivide_depth** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_subdivide_depth(value) | -+-----------+----------------------------+ -| *Getter* | get_subdivide_depth() | -+-----------+----------------------------+ +:ref:`int` **subdivide_depth** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_depth** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_depth** **(** **)** Number of added edge loops along the Z axis. +.. rst-class:: classref-item-separator + ---- .. _class_PrismMesh_property_subdivide_height: -- :ref:`int` **subdivide_height** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_subdivide_height(value) | -+-----------+-----------------------------+ -| *Getter* | get_subdivide_height() | -+-----------+-----------------------------+ +:ref:`int` **subdivide_height** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_height** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_height** **(** **)** Number of added edge loops along the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_PrismMesh_property_subdivide_width: -- :ref:`int` **subdivide_width** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_subdivide_width(value) | -+-----------+----------------------------+ -| *Getter* | get_subdivide_width() | -+-----------+----------------------------+ +:ref:`int` **subdivide_width** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_subdivide_width** **(** :ref:`int` value **)** +- :ref:`int` **get_subdivide_width** **(** **)** Number of added edge loops along the X axis. diff --git a/classes/class_proceduralskymaterial.rst b/classes/class_proceduralskymaterial.rst index 0eafc835e..6af9112bf 100644 --- a/classes/class_proceduralskymaterial.rst +++ b/classes/class_proceduralskymaterial.rst @@ -14,250 +14,276 @@ ProceduralSkyMaterial A :ref:`Material` used with :ref:`Sky` to generate a background based on user input parameters. +.. 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. -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` instead. +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` instead. -The ``ProceduralSkyMaterial`` supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding :ref:`DirectionalLight3D` in the scene. +The **ProceduralSkyMaterial** supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding :ref:`DirectionalLight3D` in the scene. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`ground_bottom_color` | ``Color(0.2, 0.169, 0.133, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`ground_curve` | ``0.02`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`ground_energy_multiplier` | ``1.0`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`ground_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Texture2D` | :ref:`sky_cover` | | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`sky_cover_modulate` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sky_curve` | ``0.15`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sky_energy_multiplier` | ``1.0`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`sky_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`sky_top_color` | ``Color(0.385, 0.454, 0.55, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sun_angle_max` | ``30.0`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sun_curve` | ``0.15`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`bool` | :ref:`use_debanding` | ``true`` | -+-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Color` | :ref:`ground_bottom_color` | ``Color(0.2, 0.169, 0.133, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`ground_curve` | ``0.02`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`ground_energy_multiplier` | ``1.0`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Color` | :ref:`ground_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Texture2D` | :ref:`sky_cover` | | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Color` | :ref:`sky_cover_modulate` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`sky_curve` | ``0.15`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`sky_energy_multiplier` | ``1.0`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Color` | :ref:`sky_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Color` | :ref:`sky_top_color` | ``Color(0.385, 0.454, 0.55, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`sun_angle_max` | ``30.0`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`sun_curve` | ``0.15`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`bool` | :ref:`use_debanding` | ``true`` | + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ProceduralSkyMaterial_property_ground_bottom_color: -- :ref:`Color` **ground_bottom_color** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``Color(0.2, 0.169, 0.133, 1)`` | -+-----------+---------------------------------+ -| *Setter* | set_ground_bottom_color(value) | -+-----------+---------------------------------+ -| *Getter* | get_ground_bottom_color() | -+-----------+---------------------------------+ +:ref:`Color` **ground_bottom_color** = ``Color(0.2, 0.169, 0.133, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_ground_bottom_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_ground_bottom_color** **(** **)** Color of the ground at the bottom. Blends with :ref:`ground_horizon_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_ground_curve: -- :ref:`float` **ground_curve** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.02`` | -+-----------+-------------------------+ -| *Setter* | set_ground_curve(value) | -+-----------+-------------------------+ -| *Getter* | get_ground_curve() | -+-----------+-------------------------+ +:ref:`float` **ground_curve** = ``0.02`` + +.. rst-class:: classref-property-setget + +- void **set_ground_curve** **(** :ref:`float` value **)** +- :ref:`float` **get_ground_curve** **(** **)** How quickly the :ref:`ground_horizon_color` fades into the :ref:`ground_bottom_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_ground_energy_multiplier: -- :ref:`float` **ground_energy_multiplier** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------------+ -| *Setter* | set_ground_energy_multiplier(value) | -+-----------+-------------------------------------+ -| *Getter* | get_ground_energy_multiplier() | -+-----------+-------------------------------------+ +:ref:`float` **ground_energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_ground_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_ground_energy_multiplier** **(** **)** Multiplier for ground color. A higher value will make the ground brighter. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_ground_horizon_color: -- :ref:`Color` **ground_horizon_color** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``Color(0.6463, 0.6558, 0.6708, 1)`` | -+-----------+--------------------------------------+ -| *Setter* | set_ground_horizon_color(value) | -+-----------+--------------------------------------+ -| *Getter* | get_ground_horizon_color() | -+-----------+--------------------------------------+ +:ref:`Color` **ground_horizon_color** = ``Color(0.6463, 0.6558, 0.6708, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_ground_horizon_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_ground_horizon_color** **(** **)** Color of the ground at the horizon. Blends with :ref:`ground_bottom_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sky_cover: -- :ref:`Texture2D` **sky_cover** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_sky_cover(value) | -+----------+----------------------+ -| *Getter* | get_sky_cover() | -+----------+----------------------+ +:ref:`Texture2D` **sky_cover** + +.. rst-class:: classref-property-setget + +- void **set_sky_cover** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_sky_cover** **(** **)** The sky cover texture to use. This texture must use an equirectangular projection (similar to :ref:`PanoramaSkyMaterial`). The texture's colors will be *added* to the existing sky color, and will be multiplied by :ref:`sky_energy_multiplier` and :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sky_cover_modulate: -- :ref:`Color` **sky_cover_modulate** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-------------------------------+ -| *Setter* | set_sky_cover_modulate(value) | -+-----------+-------------------------------+ -| *Getter* | get_sky_cover_modulate() | -+-----------+-------------------------------+ +:ref:`Color` **sky_cover_modulate** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_sky_cover_modulate** **(** :ref:`Color` value **)** +- :ref:`Color` **get_sky_cover_modulate** **(** **)** The tint to apply to the :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sky_curve: -- :ref:`float` **sky_curve** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.15`` | -+-----------+----------------------+ -| *Setter* | set_sky_curve(value) | -+-----------+----------------------+ -| *Getter* | get_sky_curve() | -+-----------+----------------------+ +:ref:`float` **sky_curve** = ``0.15`` + +.. rst-class:: classref-property-setget + +- void **set_sky_curve** **(** :ref:`float` value **)** +- :ref:`float` **get_sky_curve** **(** **)** How quickly the :ref:`sky_horizon_color` fades into the :ref:`sky_top_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sky_energy_multiplier: -- :ref:`float` **sky_energy_multiplier** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------------+ -| *Setter* | set_sky_energy_multiplier(value) | -+-----------+----------------------------------+ -| *Getter* | get_sky_energy_multiplier() | -+-----------+----------------------------------+ +:ref:`float` **sky_energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_sky_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_sky_energy_multiplier** **(** **)** Multiplier for sky color. A higher value will make the sky brighter. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sky_horizon_color: -- :ref:`Color` **sky_horizon_color** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``Color(0.6463, 0.6558, 0.6708, 1)`` | -+-----------+--------------------------------------+ -| *Setter* | set_sky_horizon_color(value) | -+-----------+--------------------------------------+ -| *Getter* | get_sky_horizon_color() | -+-----------+--------------------------------------+ +:ref:`Color` **sky_horizon_color** = ``Color(0.6463, 0.6558, 0.6708, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_sky_horizon_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_sky_horizon_color** **(** **)** Color of the sky at the horizon. Blends with :ref:`sky_top_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sky_top_color: -- :ref:`Color` **sky_top_color** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``Color(0.385, 0.454, 0.55, 1)`` | -+-----------+----------------------------------+ -| *Setter* | set_sky_top_color(value) | -+-----------+----------------------------------+ -| *Getter* | get_sky_top_color() | -+-----------+----------------------------------+ +:ref:`Color` **sky_top_color** = ``Color(0.385, 0.454, 0.55, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_sky_top_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_sky_top_color** **(** **)** Color of the sky at the top. Blends with :ref:`sky_horizon_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sun_angle_max: -- :ref:`float` **sun_angle_max** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``30.0`` | -+-----------+--------------------------+ -| *Setter* | set_sun_angle_max(value) | -+-----------+--------------------------+ -| *Getter* | get_sun_angle_max() | -+-----------+--------------------------+ +:ref:`float` **sun_angle_max** = ``30.0`` + +.. rst-class:: classref-property-setget + +- void **set_sun_angle_max** **(** :ref:`float` value **)** +- :ref:`float` **get_sun_angle_max** **(** **)** Distance from center of sun where it fades out completely. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_sun_curve: -- :ref:`float` **sun_curve** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.15`` | -+-----------+----------------------+ -| *Setter* | set_sun_curve(value) | -+-----------+----------------------+ -| *Getter* | get_sun_curve() | -+-----------+----------------------+ +:ref:`float` **sun_curve** = ``0.15`` + +.. rst-class:: classref-property-setget + +- void **set_sun_curve** **(** :ref:`float` value **)** +- :ref:`float` **get_sun_curve** **(** **)** How quickly the sun fades away between the edge of the sun disk and :ref:`sun_angle_max`. +.. rst-class:: classref-item-separator + ---- .. _class_ProceduralSkyMaterial_property_use_debanding: -- :ref:`bool` **use_debanding** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_use_debanding(value) | -+-----------+--------------------------+ -| *Getter* | get_use_debanding() | -+-----------+--------------------------+ +:ref:`bool` **use_debanding** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_debanding** **(** :ref:`bool` value **)** +- :ref:`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. diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index 4b6cbd296..2492fe522 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -14,175 +14,237 @@ ProgressBar General-purpose progress bar. +.. rst-class:: classref-introduction-group + Description ----------- General-purpose progress bar. Shows fill percentage from right to left. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+--------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`fill_mode` | ``0`` | -+-------------------------+--------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`show_percentage` | ``true`` | -+-------------------------+--------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+--------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`fill_mode` | ``0`` | + +-------------------------+--------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`show_percentage` | ``true`` | + +-------------------------+--------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.95, 0.95, 0.95, 1)`` | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Color` | :ref:`font_shadow_color` | ``Color(0, 0, 0, 1)`` | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`Font` | :ref:`font` | | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`background` | | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ -| :ref:`StyleBox` | :ref:`fill` | | -+---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_shadow_color` | ``Color(0, 0, 0, 1)`` | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Font` | :ref:`font` | | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`background` | | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`fill` | | + +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ProgressBar_FillMode: -.. _class_ProgressBar_constant_FILL_BEGIN_TO_END: - -.. _class_ProgressBar_constant_FILL_END_TO_BEGIN: - -.. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM: - -.. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP: +.. rst-class:: classref-enumeration enum **FillMode**: -- **FILL_BEGIN_TO_END** = **0** --- The progress bar fills from begin to end horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from left to right, and if it returns ``true``, it fills from right to left. +.. _class_ProgressBar_constant_FILL_BEGIN_TO_END: -- **FILL_END_TO_BEGIN** = **1** --- The progress bar fills from end to begin horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from right to left, and if it returns ``true``, it fills from left to right. +.. rst-class:: classref-enumeration-constant -- **FILL_TOP_TO_BOTTOM** = **2** --- The progress fills from top to bottom. +:ref:`FillMode` **FILL_BEGIN_TO_END** = ``0`` -- **FILL_BOTTOM_TO_TOP** = **3** --- The progress fills from bottom to top. +The progress bar fills from begin to end horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from left to right, and if it returns ``true``, it fills from right to left. + +.. _class_ProgressBar_constant_FILL_END_TO_BEGIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_END_TO_BEGIN** = ``1`` + +The progress bar fills from end to begin horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from right to left, and if it returns ``true``, it fills from left to right. + +.. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_TOP_TO_BOTTOM** = ``2`` + +The progress fills from top to bottom. + +.. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_BOTTOM_TO_TOP** = ``3`` + +The progress fills from bottom to top. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ProgressBar_property_fill_mode: -- :ref:`int` **fill_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_fill_mode(value) | -+-----------+----------------------+ -| *Getter* | get_fill_mode() | -+-----------+----------------------+ +:ref:`int` **fill_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fill_mode** **(** :ref:`int` value **)** +- :ref:`int` **get_fill_mode** **(** **)** The fill direction. See :ref:`FillMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_ProgressBar_property_show_percentage: -- :ref:`bool` **show_percentage** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_show_percentage(value) | -+-----------+----------------------------+ -| *Getter* | is_percentage_shown() | -+-----------+----------------------------+ +:ref:`bool` **show_percentage** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_show_percentage** **(** :ref:`bool` value **)** +- :ref:`bool` **is_percentage_shown** **(** **)** If ``true``, the fill percentage is displayed on the bar. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_ProgressBar_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_color** = ``Color(0.95, 0.95, 0.95, 1)`` The color of the text. +.. rst-class:: classref-item-separator + ---- .. _class_ProgressBar_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``ProgressBar``. +The tint of text outline of the **ProgressBar**. + +.. rst-class:: classref-item-separator ---- .. _class_ProgressBar_theme_color_font_shadow_color: -- :ref:`Color` **font_shadow_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ +:ref:`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: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_ProgressBar_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** Font used to draw the fill percentage if :ref:`show_percentage` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_ProgressBar_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Font size used to draw the fill percentage if :ref:`show_percentage` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_ProgressBar_theme_style_background: -- :ref:`StyleBox` **background** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **background** The style of the background. +.. rst-class:: classref-item-separator + ---- .. _class_ProgressBar_theme_style_fill: -- :ref:`StyleBox` **fill** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **fill** The style of the progress (i.e. the part that fills the bar). diff --git a/classes/class_projection.rst b/classes/class_projection.rst index 8863eba1a..39669c7d5 100644 --- a/classes/class_projection.rst +++ b/classes/class_projection.rst @@ -12,6 +12,8 @@ Projection 3D projection (4x4 matrix). +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,484 +23,700 @@ For purely linear transformations (translation, rotation, and scale), it is reco Used internally as :ref:`Camera3D`'s projection matrix. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+---------------------------------------+-------------------------+ -| :ref:`Vector4` | :ref:`w` | ``Vector4(0, 0, 0, 1)`` | -+-------------------------------+---------------------------------------+-------------------------+ -| :ref:`Vector4` | :ref:`x` | ``Vector4(1, 0, 0, 0)`` | -+-------------------------------+---------------------------------------+-------------------------+ -| :ref:`Vector4` | :ref:`y` | ``Vector4(0, 1, 0, 0)`` | -+-------------------------------+---------------------------------------+-------------------------+ -| :ref:`Vector4` | :ref:`z` | ``Vector4(0, 0, 1, 0)`` | -+-------------------------------+---------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------+-------------------------+ + | :ref:`Vector4` | :ref:`w` | ``Vector4(0, 0, 0, 1)`` | + +-------------------------------+---------------------------------------+-------------------------+ + | :ref:`Vector4` | :ref:`x` | ``Vector4(1, 0, 0, 0)`` | + +-------------------------------+---------------------------------------+-------------------------+ + | :ref:`Vector4` | :ref:`y` | ``Vector4(0, 1, 0, 0)`` | + +-------------------------------+---------------------------------------+-------------------------+ + | :ref:`Vector4` | :ref:`z` | ``Vector4(0, 0, 1, 0)`` | + +-------------------------------+---------------------------------------+-------------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`Projection` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`Projection` **(** :ref:`Projection` from **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`Projection` **(** :ref:`Transform3D` from **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`Projection` **(** :ref:`Vector4` x_axis, :ref:`Vector4` y_axis, :ref:`Vector4` z_axis, :ref:`Vector4` w_axis **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`Projection` **(** **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`Projection` **(** :ref:`Projection` from **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`Projection` **(** :ref:`Transform3D` from **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`Projection` **(** :ref:`Vector4` x_axis, :ref:`Vector4` y_axis, :ref:`Vector4` z_axis, :ref:`Vector4` w_axis **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_depth_correction` **(** :ref:`bool` flip_y **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_fit_aabb` **(** :ref:`AABB` aabb **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_for_hmd` **(** :ref:`int` eye, :ref:`float` aspect, :ref:`float` intraocular_dist, :ref:`float` display_width, :ref:`float` display_to_lens, :ref:`float` oversample, :ref:`float` z_near, :ref:`float` z_far **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_frustum` **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_frustum_aspect` **(** :ref:`float` size, :ref:`float` aspect, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_light_atlas_rect` **(** :ref:`Rect2` rect **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_orthogonal` **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_orthogonal_aspect` **(** :ref:`float` size, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_perspective` **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`create_perspective_hmd` **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov, :ref:`int` eye, :ref:`float` intraocular_dist, :ref:`float` convergence_dist **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`determinant` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`flipped_y` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_aspect` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_far_plane_half_extents` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_fov` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_fovy` **(** :ref:`float` fovx, :ref:`float` aspect **)** |static| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_lod_multiplier` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_pixels_per_meter` **(** :ref:`int` for_pixel_width **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`get_projection_plane` **(** :ref:`int` plane **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_viewport_half_extents` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_z_far` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_z_near` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`inverse` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_orthogonal` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`jitter_offseted` **(** :ref:`Vector2` offset **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`perspective_znear_adjusted` **(** :ref:`float` new_znear **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_depth_correction` **(** :ref:`bool` flip_y **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_fit_aabb` **(** :ref:`AABB` aabb **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_for_hmd` **(** :ref:`int` eye, :ref:`float` aspect, :ref:`float` intraocular_dist, :ref:`float` display_width, :ref:`float` display_to_lens, :ref:`float` oversample, :ref:`float` z_near, :ref:`float` z_far **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_frustum` **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_frustum_aspect` **(** :ref:`float` size, :ref:`float` aspect, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_light_atlas_rect` **(** :ref:`Rect2` rect **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_orthogonal` **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_orthogonal_aspect` **(** :ref:`float` size, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_perspective` **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`create_perspective_hmd` **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov, :ref:`int` eye, :ref:`float` intraocular_dist, :ref:`float` convergence_dist **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`determinant` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`flipped_y` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_aspect` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_far_plane_half_extents` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_fov` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_fovy` **(** :ref:`float` fovx, :ref:`float` aspect **)** |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_lod_multiplier` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_pixels_per_meter` **(** :ref:`int` for_pixel_width **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`get_projection_plane` **(** :ref:`int` plane **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_viewport_half_extents` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_z_far` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_z_near` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`inverse` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_orthogonal` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`jitter_offseted` **(** :ref:`Vector2` offset **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`perspective_znear_adjusted` **(** :ref:`float` new_znear **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Projection` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Projection` | :ref:`operator *` **(** :ref:`Projection` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Projection` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Projection` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`operator *` **(** :ref:`Projection` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Projection` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Projection_constant_PLANE_NEAR: +.. rst-class:: classref-constant + +**PLANE_NEAR** = ``0`` + +The index value of the projection's near clipping plane. + .. _class_Projection_constant_PLANE_FAR: +.. rst-class:: classref-constant + +**PLANE_FAR** = ``1`` + +The index value of the projection's far clipping plane. + .. _class_Projection_constant_PLANE_LEFT: +.. rst-class:: classref-constant + +**PLANE_LEFT** = ``2`` + +The index value of the projection's left clipping plane. + .. _class_Projection_constant_PLANE_TOP: +.. rst-class:: classref-constant + +**PLANE_TOP** = ``3`` + +The index value of the projection's top clipping plane. + .. _class_Projection_constant_PLANE_RIGHT: +.. rst-class:: classref-constant + +**PLANE_RIGHT** = ``4`` + +The index value of the projection's right clipping plane. + .. _class_Projection_constant_PLANE_BOTTOM: +.. rst-class:: classref-constant + +**PLANE_BOTTOM** = ``5`` + +The index value of the projection bottom clipping plane. + .. _class_Projection_constant_IDENTITY: +.. rst-class:: classref-constant + +**IDENTITY** = ``Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)`` + +A **Projection** with no transformation defined. When applied to other data structures, no transformation is performed. + .. _class_Projection_constant_ZERO: -- **PLANE_NEAR** = **0** --- The index value of the projection's near clipping plane. +.. rst-class:: classref-constant -- **PLANE_FAR** = **1** --- The index value of the projection's far clipping plane. +**ZERO** = ``Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)`` -- **PLANE_LEFT** = **2** --- The index value of the projection's left clipping plane. +A **Projection** with all values initialized to 0. When applied to other data structures, they will be zeroed. -- **PLANE_TOP** = **3** --- The index value of the projection's top clipping plane. +.. rst-class:: classref-section-separator -- **PLANE_RIGHT** = **4** --- The index value of the projection's right clipping plane. +---- -- **PLANE_BOTTOM** = **5** --- The index value of the projection bottom clipping plane. - -- **IDENTITY** = **Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)** --- A ``Projection`` with no transformation defined. When applied to other data structures, no transformation is performed. - -- **ZERO** = **Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)** --- A ``Projection`` with all values initialized to 0. When applied to other data structures, they will be zeroed. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Projection_property_w: -- :ref:`Vector4` **w** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector4(0, 0, 0, 1)`` | -+-----------+-------------------------+ +:ref:`Vector4` **w** = ``Vector4(0, 0, 0, 1)`` The projection matrix's W vector (column 3). Equivalent to array index ``3``. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_property_x: -- :ref:`Vector4` **x** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector4(1, 0, 0, 0)`` | -+-----------+-------------------------+ +:ref:`Vector4` **x** = ``Vector4(1, 0, 0, 0)`` The projection matrix's X vector (column 0). Equivalent to array index ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_property_y: -- :ref:`Vector4` **y** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector4(0, 1, 0, 0)`` | -+-----------+-------------------------+ +:ref:`Vector4` **y** = ``Vector4(0, 1, 0, 0)`` The projection matrix's Y vector (column 1). Equivalent to array index ``1``. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_property_z: -- :ref:`Vector4` **z** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector4(0, 0, 1, 0)`` | -+-----------+-------------------------+ +:ref:`Vector4` **z** = ``Vector4(0, 0, 1, 0)`` The projection matrix's Z vector (column 2). Equivalent to array index ``2``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Projection_constructor_Projection: -- :ref:`Projection` **Projection** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Projection`` set to :ref:`IDENTITY`. +:ref:`Projection` **Projection** **(** **)** + +Constructs a default-initialized **Projection** set to :ref:`IDENTITY`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Projection` **Projection** **(** :ref:`Projection` from **)** +.. rst-class:: classref-constructor -Constructs a ``Projection`` as a copy of the given ``Projection``. +:ref:`Projection` **Projection** **(** :ref:`Projection` from **)** + +Constructs a **Projection** as a copy of the given **Projection**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Projection` **Projection** **(** :ref:`Transform3D` from **)** +.. rst-class:: classref-constructor + +:ref:`Projection` **Projection** **(** :ref:`Transform3D` from **)** Constructs a Projection as a copy of the given :ref:`Transform3D`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Projection` **Projection** **(** :ref:`Vector4` x_axis, :ref:`Vector4` y_axis, :ref:`Vector4` z_axis, :ref:`Vector4` w_axis **)** +.. rst-class:: classref-constructor + +:ref:`Projection` **Projection** **(** :ref:`Vector4` x_axis, :ref:`Vector4` y_axis, :ref:`Vector4` z_axis, :ref:`Vector4` w_axis **)** Constructs a Projection from four :ref:`Vector4` values (matrix columns). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Projection_method_create_depth_correction: -- :ref:`Projection` **create_depth_correction** **(** :ref:`bool` flip_y **)** |static| +.. rst-class:: classref-method -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``. +:ref:`Projection` **create_depth_correction** **(** :ref:`bool` flip_y **)** |static| + +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``. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_create_fit_aabb: -- :ref:`Projection` **create_fit_aabb** **(** :ref:`AABB` aabb **)** |static| +.. rst-class:: classref-method -Creates a new ``Projection`` that scales a given projection to fit around a given :ref:`AABB` in projection space. +:ref:`Projection` **create_fit_aabb** **(** :ref:`AABB` aabb **)** |static| + +Creates a new **Projection** that scales a given projection to fit around a given :ref:`AABB` in projection space. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_create_for_hmd: -- :ref:`Projection` **create_for_hmd** **(** :ref:`int` eye, :ref:`float` aspect, :ref:`float` intraocular_dist, :ref:`float` display_width, :ref:`float` display_to_lens, :ref:`float` oversample, :ref:`float` z_near, :ref:`float` z_far **)** |static| +.. rst-class:: classref-method -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. +:ref:`Projection` **create_for_hmd** **(** :ref:`int` eye, :ref:`float` aspect, :ref:`float` intraocular_dist, :ref:`float` display_width, :ref:`float` display_to_lens, :ref:`float` oversample, :ref:`float` z_near, :ref:`float` z_far **)** |static| + +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. \ ``eye`` creates the projection for the left eye when set to 1, or the right eye when set to 2. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_create_frustum: -- :ref:`Projection` **create_frustum** **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| +.. rst-class:: classref-method -Creates a new ``Projection`` that projects positions in a frustum with the given clipping planes. +:ref:`Projection` **create_frustum** **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| + +Creates a new **Projection** that projects positions in a frustum with the given clipping planes. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_create_frustum_aspect: -- :ref:`Projection` **create_frustum_aspect** **(** :ref:`float` size, :ref:`float` aspect, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| +.. rst-class:: classref-method -Creates a new ``Projection`` that projects positions in a frustum with the given size, X:Y aspect ratio, offset, and clipping planes. +:ref:`Projection` **create_frustum_aspect** **(** :ref:`float` size, :ref:`float` aspect, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| + +Creates a new **Projection** that projects positions in a frustum with the given size, X:Y aspect ratio, offset, and clipping planes. \ ``flip_fov`` determines whether the projection's field of view is flipped over its diagonal. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_create_light_atlas_rect: -- :ref:`Projection` **create_light_atlas_rect** **(** :ref:`Rect2` rect **)** |static| +.. rst-class:: classref-method -Creates a new ``Projection`` that projects positions into the given :ref:`Rect2`. +:ref:`Projection` **create_light_atlas_rect** **(** :ref:`Rect2` rect **)** |static| + +Creates a new **Projection** that projects positions into the given :ref:`Rect2`. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_create_orthogonal: -- :ref:`Projection` **create_orthogonal** **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| +.. rst-class:: classref-method -Creates a new ``Projection`` that projects positions using an orthogonal projection with the given clipping planes. +:ref:`Projection` **create_orthogonal** **(** :ref:`float` left, :ref:`float` right, :ref:`float` bottom, :ref:`float` top, :ref:`float` z_near, :ref:`float` z_far **)** |static| + +Creates a new **Projection** that projects positions using an orthogonal projection with the given clipping planes. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_create_orthogonal_aspect: -- :ref:`Projection` **create_orthogonal_aspect** **(** :ref:`float` size, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| +.. rst-class:: classref-method -Creates a new ``Projection`` that projects positions using an orthogonal projection with the given size, X:Y aspect ratio, and clipping planes. +:ref:`Projection` **create_orthogonal_aspect** **(** :ref:`float` size, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| + +Creates a new **Projection** that projects positions using an orthogonal projection with the given size, X:Y aspect ratio, and clipping planes. \ ``flip_fov`` determines whether the projection's field of view is flipped over its diagonal. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_create_perspective: -- :ref:`Projection` **create_perspective** **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| +.. rst-class:: classref-method -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. +:ref:`Projection` **create_perspective** **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov=false **)** |static| + +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. \ ``flip_fov`` determines whether the projection's field of view is flipped over its diagonal. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_create_perspective_hmd: -- :ref:`Projection` **create_perspective_hmd** **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov, :ref:`int` eye, :ref:`float` intraocular_dist, :ref:`float` convergence_dist **)** |static| +.. rst-class:: classref-method -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. +:ref:`Projection` **create_perspective_hmd** **(** :ref:`float` fovy, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far, :ref:`bool` flip_fov, :ref:`int` eye, :ref:`float` intraocular_dist, :ref:`float` convergence_dist **)** |static| + +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. \ ``eye`` creates the projection for the left eye when set to 1, or the right eye when set to 2. \ ``flip_fov`` determines whether the projection's field of view is flipped over its diagonal. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_determinant: -- :ref:`float` **determinant** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **determinant** **(** **)** |const| 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. The determinant can be used to calculate the invertibility of a matrix or solve linear systems of equations involving the matrix, among other applications. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_flipped_y: -- :ref:`Projection` **flipped_y** **(** **)** |const| +.. rst-class:: classref-method -Returns a copy of this ``Projection`` with the signs of the values of the Y column flipped. +:ref:`Projection` **flipped_y** **(** **)** |const| + +Returns a copy of this **Projection** with the signs of the values of the Y column flipped. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_get_aspect: -- :ref:`float` **get_aspect** **(** **)** |const| +.. rst-class:: classref-method -Returns the X:Y aspect ratio of this ``Projection``'s viewport. +:ref:`float` **get_aspect** **(** **)** |const| + +Returns the X:Y aspect ratio of this **Projection**'s viewport. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_get_far_plane_half_extents: -- :ref:`Vector2` **get_far_plane_half_extents** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_far_plane_half_extents** **(** **)** |const| Returns the dimensions of the far clipping plane of the projection, divided by two. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_get_fov: -- :ref:`float` **get_fov** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_fov** **(** **)** |const| Returns the horizontal field of view of the projection (in degrees). +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_get_fovy: -- :ref:`float` **get_fovy** **(** :ref:`float` fovx, :ref:`float` aspect **)** |static| +.. rst-class:: classref-method + +:ref:`float` **get_fovy** **(** :ref:`float` fovx, :ref:`float` aspect **)** |static| Returns the vertical field of view of the projection (in degrees) associated with the given horizontal field of view (in degrees) and aspect ratio. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_get_lod_multiplier: -- :ref:`float` **get_lod_multiplier** **(** **)** |const| +.. rst-class:: classref-method -Returns the factor by which the visible level of detail is scaled by this ``Projection``. +:ref:`float` **get_lod_multiplier** **(** **)** |const| + +Returns the factor by which the visible level of detail is scaled by this **Projection**. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_get_pixels_per_meter: -- :ref:`int` **get_pixels_per_meter** **(** :ref:`int` for_pixel_width **)** |const| +.. rst-class:: classref-method -Returns the number of pixels with the given pixel width displayed per meter, after this ``Projection`` is applied. +:ref:`int` **get_pixels_per_meter** **(** :ref:`int` for_pixel_width **)** |const| + +Returns the number of pixels with the given pixel width displayed per meter, after this **Projection** is applied. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_get_projection_plane: -- :ref:`Plane` **get_projection_plane** **(** :ref:`int` plane **)** |const| +.. rst-class:: classref-method -Returns the clipping plane of this ``Projection`` whose index is given by ``plane``. +:ref:`Plane` **get_projection_plane** **(** :ref:`int` plane **)** |const| + +Returns the clipping plane of this **Projection** whose index is given by ``plane``. \ ``plane`` should be equal to one of :ref:`PLANE_NEAR`, :ref:`PLANE_FAR`, :ref:`PLANE_LEFT`, :ref:`PLANE_TOP`, :ref:`PLANE_RIGHT`, or :ref:`PLANE_BOTTOM`. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_method_get_viewport_half_extents: -- :ref:`Vector2` **get_viewport_half_extents** **(** **)** |const| +.. rst-class:: classref-method -Returns the dimensions of the viewport plane that this ``Projection`` projects positions onto, divided by two. +:ref:`Vector2` **get_viewport_half_extents** **(** **)** |const| + +Returns the dimensions of the viewport plane that this **Projection** projects positions onto, divided by two. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_get_z_far: -- :ref:`float` **get_z_far** **(** **)** |const| +.. rst-class:: classref-method -Returns the distance for this ``Projection`` beyond which positions are clipped. +:ref:`float` **get_z_far** **(** **)** |const| + +Returns the distance for this **Projection** beyond which positions are clipped. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_get_z_near: -- :ref:`float` **get_z_near** **(** **)** |const| +.. rst-class:: classref-method -Returns the distance for this ``Projection`` before which positions are clipped. +:ref:`float` **get_z_near** **(** **)** |const| + +Returns the distance for this **Projection** before which positions are clipped. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_inverse: -- :ref:`Projection` **inverse** **(** **)** |const| +.. rst-class:: classref-method -Returns a ``Projection`` that performs the inverse of this ``Projection``'s projective transformation. +:ref:`Projection` **inverse** **(** **)** |const| + +Returns a **Projection** that performs the inverse of this **Projection**'s projective transformation. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_is_orthogonal: -- :ref:`bool` **is_orthogonal** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Projection`` performs an orthogonal projection. +:ref:`bool` **is_orthogonal** **(** **)** |const| + +Returns ``true`` if this **Projection** performs an orthogonal projection. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_jitter_offseted: -- :ref:`Projection` **jitter_offseted** **(** :ref:`Vector2` offset **)** |const| +.. rst-class:: classref-method -Returns a ``Projection`` with the X and Y values from the given :ref:`Vector2` added to the first and second values of the final column respectively. +:ref:`Projection` **jitter_offseted** **(** :ref:`Vector2` offset **)** |const| + +Returns a **Projection** with the X and Y values from the given :ref:`Vector2` added to the first and second values of the final column respectively. + +.. rst-class:: classref-item-separator ---- .. _class_Projection_method_perspective_znear_adjusted: -- :ref:`Projection` **perspective_znear_adjusted** **(** :ref:`float` new_znear **)** |const| +.. rst-class:: classref-method -Returns a ``Projection`` with the near clipping distance adjusted to be ``new_znear``. +:ref:`Projection` **perspective_znear_adjusted** **(** :ref:`float` new_znear **)** |const| -\ **Note:** The original ``Projection`` must be a perspective projection. +Returns a **Projection** with the near clipping distance adjusted to be ``new_znear``. + +\ **Note:** The original **Projection** must be a perspective projection. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Projection_operator_neq_bool: +.. _class_Projection_operator_neq_Projection: -- :ref:`bool` **operator !=** **(** :ref:`Projection` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Projection` right **)** Returns ``true`` if the projections are not equal. \ **Note:** Due to floating-point precision errors, this may return ``true``, even if the projections are virtually equal. An ``is_equal_approx`` method may be added in a future version of Godot. +.. rst-class:: classref-item-separator + ---- .. _class_Projection_operator_mul_Projection: -- :ref:`Projection` **operator *** **(** :ref:`Projection` right **)** +.. rst-class:: classref-operator -Returns a ``Projection`` that applies the combined transformations of this ``Projection`` and ``right``. +:ref:`Projection` **operator *** **(** :ref:`Projection` right **)** + +Returns a **Projection** that applies the combined transformations of this **Projection** and ``right``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** +.. _class_Projection_operator_mul_Vector4: -Projects (multiplies) the given :ref:`Vector4` by this ``Projection`` matrix. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** + +Projects (multiplies) the given :ref:`Vector4` by this **Projection** matrix. + +.. rst-class:: classref-item-separator ---- -.. _class_Projection_operator_eq_bool: +.. _class_Projection_operator_eq_Projection: -- :ref:`bool` **operator ==** **(** :ref:`Projection` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Projection` right **)** Returns ``true`` if the projections are equal. \ **Note:** Due to floating-point precision errors, this may return ``false``, even if the projections are virtually equal. An ``is_equal_approx`` method may be added in a future version of Godot. +.. rst-class:: classref-item-separator + ---- -.. _class_Projection_operator_idx_Vector4: +.. _class_Projection_operator_idx_int: -- :ref:`Vector4` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator -Returns the column of the ``Projection`` with the given index. +:ref:`Vector4` **operator []** **(** :ref:`int` index **)** + +Returns the column of the **Projection** with the given index. Indices are in the following order: x, y, z, w. diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 21d8e4602..db2ba5279 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -14,6 +14,8 @@ ProjectSettings Contains global variables accessible from everywhere. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,6 +27,8 @@ When naming a Project Settings property, use the full path to the setting includ \ **Overriding:** Any project setting can be overridden by creating a file named ``override.cfg`` in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' :doc:`feature tags <../tutorials/export/feature_tags>` in account. Therefore, make sure to *also* override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,1516 +38,1534 @@ Tutorials - `OS Test Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`application/boot_splash/bg_color` | ``Color(0.14, 0.14, 0.14, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/boot_splash/fullsize` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/boot_splash/image` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`application/boot_splash/minimum_display_time` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/boot_splash/show_image` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/boot_splash/use_filter` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/config/custom_user_dir_name` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/config/description` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`application/config/features` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/config/icon` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/config/macos_native_icon` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/config/name` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`application/config/name_localized` | ``{}`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/config/project_settings_override` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/config/use_custom_user_dir` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/config/use_hidden_project_data_directory` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/config/windows_native_icon` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/run/disable_stderr` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/run/disable_stdout` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/run/flush_stdout_on_print` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/run/flush_stdout_on_print.debug` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`application/run/frame_delay_msec` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`application/run/low_processor_mode` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`application/run/low_processor_mode_sleep_usec` | ``6900`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`application/run/main_scene` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`application/run/max_fps` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`audio/buses/channel_disable_threshold_db` | ``-60.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`audio/buses/channel_disable_time` | ``2.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`audio/buses/default_bus_layout` | ``"res://default_bus_layout.tres"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`audio/driver/driver` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`audio/driver/enable_input` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`audio/driver/mix_rate` | ``44100`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`audio/driver/mix_rate.web` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`audio/driver/output_latency` | ``15`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`audio/driver/output_latency.web` | ``50`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`audio/general/2d_panning_strength` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`audio/general/3d_panning_strength` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`audio/video/video_delay_compensation_ms` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`compression/formats/gzip/compression_level` | ``-1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`compression/formats/zlib/compression_level` | ``-1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`compression/formats/zstd/compression_level` | ``3`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`compression/formats/zstd/long_distance_matching` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`compression/formats/zstd/window_log_size` | ``27`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/disable_touch` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/file_logging/enable_file_logging` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/file_logging/enable_file_logging.pc` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`debug/file_logging/log_path` | ``"user://logs/godot.log"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/file_logging/max_log_files` | ``5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/assert_always_false` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/assert_always_true` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/constant_used_as_function` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/deprecated_keyword` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/empty_file` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/enable` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/exclude_addons` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/function_used_as_property` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/incompatible_ternary` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/int_assigned_to_enum` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/integer_division` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/narrowing_conversion` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/property_used_as_function` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/redundant_await` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/return_value_discarded` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_global_identifier` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_variable` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_variable_base_class` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/standalone_expression` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/standalone_ternary` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/static_called_on_instance` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/treat_warnings_as_errors` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unassigned_variable` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unassigned_variable_op_assign` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unreachable_code` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unreachable_pattern` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_call_argument` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_cast` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_method_access` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_property_access` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unused_local_constant` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unused_parameter` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unused_private_class_variable` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unused_signal` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/unused_variable` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/gdscript/warnings/void_assignment` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`debug/settings/crash_handler/message` | ``"Please include this when reporting the bug to the project developer."`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`debug/settings/crash_handler/message.editor` | ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/settings/gdscript/max_call_stack` | ``1024`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/settings/profiler/max_functions` | ``16384`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/settings/stdout/print_fps` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/settings/stdout/print_gpu_profile` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/settings/stdout/verbose_stdout` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/collision/contact_color` | ``Color(1, 0.2, 0.1, 0.8)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/collision/draw_2d_outlines` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`debug/shapes/collision/max_contacts_displayed` | ``10000`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/collision/shape_color` | ``Color(0, 0.6, 0.7, 0.42)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/navigation/edge_connection_color` | ``Color(1, 0, 1, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_connections` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_connections_xray` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_lines` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_lines_xray` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/navigation/enable_geometry_face_random_color` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/navigation/enable_link_connections` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/shapes/navigation/enable_link_connections_xray` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_edge_color` | ``Color(0.5, 1, 1, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_edge_disabled_color` | ``Color(0.5, 0.5, 0.5, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_face_color` | ``Color(0.5, 1, 1, 0.4)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/navigation/geometry_face_disabled_color` | ``Color(0.5, 0.5, 0.5, 0.4)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/navigation/link_connection_color` | ``Color(1, 0.5, 1, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/navigation/link_connection_disabled_color` | ``Color(0.5, 0.5, 0.5, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`debug/shapes/paths/geometry_color` | ``Color(0.1, 1, 0.7, 0.4)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`debug/shapes/paths/geometry_width` | ``2.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`display/mouse_cursor/custom_image` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`display/mouse_cursor/custom_image_hotspot` | ``Vector2(0, 0)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`display/mouse_cursor/tooltip_position_offset` | ``Vector2(10, 10)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/dpi/allow_hidpi` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on.editor` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/handheld/orientation` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/ios/allow_high_refresh_rate` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/ios/hide_home_indicator` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/ios/hide_status_bar` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/ios/suppress_ui_gesture` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/per_pixel_transparency/allowed` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/size/always_on_top` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/size/borderless` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/size/extend_to_title` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/size/mode` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/size/no_focus` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/size/resizable` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`display/window/size/transparent` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/size/viewport_height` | ``648`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/size/viewport_width` | ``1152`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/size/window_height_override` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/size/window_width_override` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`display/window/vsync/vsync_mode` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editor/movie_writer/disable_vsync` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editor/movie_writer/fps` | ``60`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editor/movie_writer/mix_rate` | ``48000`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`editor/movie_writer/mjpeg_quality` | ``0.75`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`editor/movie_writer/movie_file` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editor/movie_writer/speaker_mode` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editor/node_naming/name_casing` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`editor/node_naming/name_num_separator` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`editor/run/main_run_args` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`editor/script/search_in_file_extensions` | ``PackedStringArray("gd", "gdshader")`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`editor/script/templates_search_path` | ``"res://script_templates"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/import/blender/enabled` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/import/blender/enabled.android` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/import/blender/enabled.web` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/import/fbx/enabled` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/import/fbx/enabled.android` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`filesystem/import/fbx/enabled.web` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/common/default_scroll_deadzone` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`gui/common/swap_cancel_ok` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/common/text_edit_undo_stack_max_size` | ``1024`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`gui/theme/custom` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`gui/theme/custom_font` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/theme/default_font_antialiasing` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`gui/theme/default_font_generate_mipmaps` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/theme/default_font_hinting` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`gui/theme/default_font_multichannel_signed_distance_field` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/theme/default_font_subpixel_positioning` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`gui/theme/default_theme_scale` | ``1.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/theme/lcd_subpixel_layout` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/timers/incremental_search_max_interval_msec` | ``2000`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`gui/timers/text_edit_idle_detect_sec` | ``3`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`gui/timers/tooltip_delay_sec` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_accept` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_cancel` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_copy` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_cut` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_down` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_end` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_filedialog_refresh` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_filedialog_show_hidden` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_filedialog_up_one_level` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_focus_next` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_focus_prev` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_graph_delete` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_graph_duplicate` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_home` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_left` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_menu` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_page_down` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_page_up` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_paste` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_redo` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_right` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_select` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_swap_input_direction` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_add_selection_for_next_occurrence` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_backspace` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_backspace_all_to_left` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_backspace_all_to_left.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_backspace_word` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_backspace_word.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_add_above` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_add_above.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_add_below` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_add_below.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_document_end` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_document_end.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_document_start` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_document_start.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_down` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_left` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_line_end` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_line_end.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_line_start` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_line_start.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_page_down` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_page_up` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_right` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_up` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_word_left` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_word_left.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_word_right` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_caret_word_right.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_clear_carets_and_selection` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_completion_accept` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_completion_query` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_completion_replace` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_dedent` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_delete` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_delete_all_to_right` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_delete_all_to_right.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_delete_word` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_delete_word.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_indent` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_newline` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_newline_above` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_newline_blank` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_scroll_down` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_scroll_down.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_scroll_up` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_scroll_up.macos` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_select_all` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_select_word_under_caret` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_submit` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_text_toggle_insert_mode` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_undo` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`input/ui_up` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`input_devices/buffering/agile_event_flushing` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`input_devices/pen_tablet/driver` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`input_devices/pen_tablet/driver.windows` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`input_devices/pointing/emulate_mouse_from_touch` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`input_devices/pointing/emulate_touch_from_mouse` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`input_devices/pointing/ios/touch_delay` | ``0.15`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`internationalization/locale/fallback` | ``"en"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/locale/include_text_server_data` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`internationalization/locale/test` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`internationalization/locale/translation_remaps` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`internationalization/locale/translations` | | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/pseudolocalization/double_vowels` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`internationalization/pseudolocalization/expansion_ratio` | ``0.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/pseudolocalization/fake_bidi` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/pseudolocalization/override` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`internationalization/pseudolocalization/prefix` | ``"["`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/pseudolocalization/replace_with_accents` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/pseudolocalization/skip_placeholders` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`internationalization/pseudolocalization/suffix` | ``"]"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/pseudolocalization/use_pseudolocalization` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`internationalization/rendering/force_right_to_left_layout_direction` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`internationalization/rendering/text_driver` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_1` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_10` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_11` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_12` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_13` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_14` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_15` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_16` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_17` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_18` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_19` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_2` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_20` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_21` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_22` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_23` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_24` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_25` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_26` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_27` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_28` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_29` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_3` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_30` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_31` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_32` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_4` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_5` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_6` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_7` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_8` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_navigation/layer_9` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_1` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_10` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_11` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_12` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_13` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_14` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_15` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_16` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_17` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_18` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_19` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_2` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_20` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_21` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_22` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_23` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_24` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_25` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_26` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_27` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_28` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_29` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_3` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_30` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_31` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_32` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_4` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_5` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_6` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_7` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_8` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_physics/layer_9` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_1` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_10` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_11` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_12` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_13` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_14` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_15` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_16` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_17` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_18` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_19` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_2` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_20` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_3` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_4` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_5` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_6` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_7` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_8` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/2d_render/layer_9` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_1` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_10` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_11` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_12` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_13` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_14` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_15` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_16` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_17` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_18` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_19` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_2` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_20` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_21` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_22` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_23` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_24` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_25` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_26` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_27` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_28` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_29` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_3` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_30` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_31` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_32` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_4` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_5` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_6` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_7` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_8` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_navigation/layer_9` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_1` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_10` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_11` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_12` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_13` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_14` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_15` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_16` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_17` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_18` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_19` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_2` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_20` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_21` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_22` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_23` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_24` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_25` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_26` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_27` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_28` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_29` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_3` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_30` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_31` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_32` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_4` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_5` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_6` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_7` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_8` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_physics/layer_9` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_1` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_10` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_11` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_12` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_13` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_14` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_15` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_16` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_17` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_18` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_19` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_2` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_20` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_3` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_4` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_5` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_6` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_7` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_8` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`layer_names/3d_render/layer_9` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`memory/limits/message_queue/max_size_kb` | ``4096`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`memory/limits/multithreaded_server/rid_pool_prealloc` | ``60`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`navigation/2d/default_cell_size` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`navigation/2d/default_edge_connection_margin` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`navigation/2d/default_link_connection_radius` | ``4`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`navigation/3d/default_cell_size` | ``0.25`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`navigation/3d/default_edge_connection_margin` | ``0.25`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`navigation/3d/default_link_connection_radius` | ``1.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/limits/debugger/max_chars_per_second` | ``32768`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/limits/debugger/max_errors_per_second` | ``400`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/limits/debugger/max_queued_messages` | ``2048`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/limits/debugger/max_warnings_per_second` | ``400`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/limits/packet_peer_stream/max_buffer_po2` | ``16`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/limits/tcp/connect_timeout_seconds` | ``30`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/limits/webrtc/max_channel_in_buffer_kb` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/remote_fs/page_read_ahead` | ``4`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/remote_fs/page_size` | ``65536`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`network/tls/certificate_bundle_override` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/default_angular_damp` | ``1.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/default_gravity` | ``980.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`physics/2d/default_gravity_vector` | ``Vector2(0, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/default_linear_damp` | ``0.1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`physics/2d/physics_engine` | ``"DEFAULT"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`physics/2d/run_on_separate_thread` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/sleep_threshold_angular` | ``0.139626`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/sleep_threshold_linear` | ``2.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/solver/contact_max_allowed_penetration` | ``0.3`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/solver/contact_max_separation` | ``1.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/solver/contact_recycle_radius` | ``1.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/solver/default_constraint_bias` | ``0.2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/solver/default_contact_bias` | ``0.8`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`physics/2d/solver/solver_iterations` | ``16`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/2d/time_before_sleep` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/default_angular_damp` | ``0.1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/default_gravity` | ``9.8`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`physics/3d/default_gravity_vector` | ``Vector3(0, -1, 0)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/default_linear_damp` | ``0.1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`physics/3d/physics_engine` | ``"DEFAULT"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`physics/3d/run_on_separate_thread` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/sleep_threshold_angular` | ``0.139626`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/sleep_threshold_linear` | ``0.1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/solver/contact_max_allowed_penetration` | ``0.01`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/solver/contact_max_separation` | ``0.05`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/solver/contact_recycle_radius` | ``0.01`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/solver/default_contact_bias` | ``0.8`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`physics/3d/solver/solver_iterations` | ``16`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/3d/time_before_sleep` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`physics/common/enable_object_picking` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`physics/common/max_physics_steps_per_frame` | ``8`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`physics/common/physics_jitter_fix` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`physics/common/physics_ticks_per_second` | ``60`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/sdf/oversize` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/sdf/scale` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/shadow_atlas/size` | ``2048`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/2d/snap/snap_2d_transforms_to_pixel` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/2d/snap/snap_2d_vertices_to_pixel` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/anti_aliasing/quality/msaa_2d` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/anti_aliasing/quality/msaa_3d` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/anti_aliasing/quality/screen_space_aa` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/anti_aliasing/quality/use_debanding` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/anti_aliasing/quality/use_taa` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/amount` | ``0.25`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/enabled` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/limit` | ``0.18`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/camera/depth_of_field/depth_of_field_bokeh_quality` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/camera/depth_of_field/depth_of_field_bokeh_shape` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/camera/depth_of_field/depth_of_field_use_jitter` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/driver/depth_prepass/disable_for_vendors` | ``"PowerVR,Mali,Adreno,Apple"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/driver/depth_prepass/enable` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/driver/threads/thread_model` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`rendering/environment/defaults/default_clear_color` | ``Color(0.3, 0.3, 0.3, 1)`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/environment/defaults/default_environment` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/glow/upscale_mode` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/glow/upscale_mode.mobile` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/environment/glow/use_high_quality` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/screen_space_reflection/roughness_quality` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/ssao/adaptive_target` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/ssao/blur_passes` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/ssao/fadeout_from` | ``50.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/ssao/fadeout_to` | ``300.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/environment/ssao/half_size` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/ssao/quality` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/ssil/adaptive_target` | ``0.5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/ssil/blur_passes` | ``4`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/ssil/fadeout_from` | ``50.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/ssil/fadeout_to` | ``300.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/environment/ssil/half_size` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/ssil/quality` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale` | ``0.01`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_quality` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_scale` | ``0.05`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/volumetric_fog/use_filter` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/volumetric_fog/volume_depth` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/environment/volumetric_fog/volume_size` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/gl_compatibility/driver` | ``"opengl3"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/gl_compatibility/driver.android` | ``"opengl3"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/gl_compatibility/driver.ios` | ``"opengl3"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/gl_compatibility/driver.linuxbsd` | ``"opengl3"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/gl_compatibility/driver.macos` | ``"opengl3"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/gl_compatibility/driver.web` | ``"opengl3"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/gl_compatibility/driver.windows` | ``"opengl3"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/gl_compatibility/item_buffer_size` | ``16384`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/global_illumination/gi/use_half_resolution` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/global_illumination/sdfgi/frames_to_converge` | ``5`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/global_illumination/sdfgi/frames_to_update_lights` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/global_illumination/sdfgi/probe_ray_count` | ``1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/global_illumination/voxel_gi/quality` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_performance/max_rays_per_pass` | ``32`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_performance/max_rays_per_probe_pass` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_performance/region_size` | ``512`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_probe_ray_count` | ``512`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_ray_count` | ``256`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/low_quality_probe_ray_count` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/low_quality_ray_count` | ``16`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/medium_quality_probe_ray_count` | ``256`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/medium_quality_ray_count` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count` | ``2048`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_ray_count` | ``1024`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/lightmapping/primitive_meshes/texel_size` | ``0.2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/lightmapping/probe_capture/update_speed` | ``15`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/lights_and_shadows/directional_shadow/16_bits` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/size` | ``4096`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/size.mobile` | ``2048`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_16_bits` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv` | ``3`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv` | ``4`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_size` | ``4096`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_size.mobile` | ``2048`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/lights_and_shadows/use_physical_light_units` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/limits/cluster_builder/max_clustered_elements` | ``512`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/forward_renderer/threaded_render_minimum_instances` | ``500`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/global_shader_variables/buffer_size` | ``65536`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/opengl/max_lights_per_object` | ``8`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/opengl/max_renderable_elements` | ``65536`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/opengl/max_renderable_lights` | ``32`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/spatial_indexer/threaded_cull_minimum_instances` | ``1000`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/spatial_indexer/update_iterations_per_frame` | ``10`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/limits/time/time_rollover_secs` | ``3600`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/mesh_lod/lod_change/threshold_pixels` | ``1.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/occlusion_culling/bvh_build_quality` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/occlusion_culling/occlusion_rays_per_thread` | ``512`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/occlusion_culling/use_occlusion_culling` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/reflections/reflection_atlas/reflection_count` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/reflections/reflection_atlas/reflection_size` | ``256`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/reflections/reflection_atlas/reflection_size.mobile` | ``128`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/reflections/sky_reflections/fast_filter_high_quality` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/reflections/sky_reflections/ggx_samples` | ``32`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/reflections/sky_reflections/ggx_samples.mobile` | ``16`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/reflections/sky_reflections/roughness_layers` | ``8`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/reflections/sky_reflections/texture_array_reflections` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/reflections/sky_reflections/texture_array_reflections.mobile` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/renderer/rendering_method` | ``"forward_plus"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/renderer/rendering_method.mobile` | ``"mobile"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/renderer/rendering_method.web` | ``"gl_compatibility"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/rendering_device/driver` | ``"vulkan"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/rendering_device/driver.android` | ``"vulkan"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/rendering_device/driver.ios` | ``"vulkan"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/rendering_device/driver.linuxbsd` | ``"vulkan"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/rendering_device/driver.macos` | ``"vulkan"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/rendering_device/driver.windows` | ``"vulkan"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/block_size_kb` | ``256`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/max_size_mb` | ``128`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/texture_upload_region_size_px` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/rendering_device/vulkan/max_descriptors_per_pool` | ``64`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/scaling_3d/fsr_sharpness` | ``0.2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/scaling_3d/mode` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/scaling_3d/scale` | ``1.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/compress` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/enabled` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/strip_debug` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/strip_debug.release` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/use_zstd_compression` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shading/overrides/force_lambert_over_burley` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shading/overrides/force_lambert_over_burley.mobile` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading.mobile` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/textures/decals/filter` | ``3`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/textures/default_filters/anisotropic_filtering_level` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/textures/default_filters/texture_mipmap_bias` | ``0.0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/textures/default_filters/use_nearest_mipmap_filter` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/textures/light_projectors/filter` | ``3`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/textures/lossless_compression/force_png` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/textures/vram_compression/import_bptc` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/textures/vram_compression/import_etc` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/textures/vram_compression/import_etc2` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/textures/vram_compression/import_s3tc` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/textures/webp_compression/compression_method` | ``2`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/textures/webp_compression/lossless_compression_factor` | ``25`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/transparent_background` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/vrs/mode` | ``0`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rendering/vrs/texture` | ``""`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`threading/worker_pool/low_priority_thread_ratio` | ``0.3`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`threading/worker_pool/max_threads` | ``-1`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`threading/worker_pool/use_system_threads_for_low_priority_tasks` | ``true`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`xr/openxr/default_action_map` | ``"res://openxr_action_map.tres"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`xr/openxr/enabled` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`xr/openxr/form_factor` | ``"0"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`xr/openxr/reference_space` | ``"1"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`xr/openxr/view_configuration` | ``"1"`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`xr/shaders/enabled` | ``false`` | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`application/boot_splash/bg_color` | ``Color(0.14, 0.14, 0.14, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/boot_splash/fullsize` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/boot_splash/image` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/boot_splash/minimum_display_time` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/boot_splash/show_image` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/boot_splash/use_filter` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/custom_user_dir_name` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/description` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`application/config/features` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/icon` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/macos_native_icon` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/name` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`application/config/name_localized` | ``{}`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/project_settings_override` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/config/use_custom_user_dir` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/config/use_hidden_project_data_directory` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/windows_native_icon` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/disable_stderr` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/disable_stdout` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/flush_stdout_on_print` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/flush_stdout_on_print.debug` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/run/frame_delay_msec` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/low_processor_mode` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/run/low_processor_mode_sleep_usec` | ``6900`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/run/main_scene` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/run/max_fps` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`audio/buses/channel_disable_threshold_db` | ``-60.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`audio/buses/channel_disable_time` | ``2.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`audio/buses/default_bus_layout` | ``"res://default_bus_layout.tres"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`audio/driver/driver` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`audio/driver/enable_input` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`audio/driver/mix_rate` | ``44100`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`audio/driver/mix_rate.web` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`audio/driver/output_latency` | ``15`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`audio/driver/output_latency.web` | ``50`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`audio/general/2d_panning_strength` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`audio/general/3d_panning_strength` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`audio/video/video_delay_compensation_ms` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`compression/formats/gzip/compression_level` | ``-1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`compression/formats/zlib/compression_level` | ``-1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`compression/formats/zstd/compression_level` | ``3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`compression/formats/zstd/long_distance_matching` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`compression/formats/zstd/window_log_size` | ``27`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/disable_touch` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/file_logging/enable_file_logging` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/file_logging/enable_file_logging.pc` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`debug/file_logging/log_path` | ``"user://logs/godot.log"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/file_logging/max_log_files` | ``5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/assert_always_false` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/assert_always_true` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/constant_used_as_function` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/deprecated_keyword` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/empty_file` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/gdscript/warnings/enable` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/gdscript/warnings/exclude_addons` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/function_used_as_property` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/incompatible_ternary` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/int_assigned_to_enum` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/integer_division` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/narrowing_conversion` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/property_used_as_function` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/redundant_await` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/return_value_discarded` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_global_identifier` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_variable` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_variable_base_class` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/standalone_expression` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/standalone_ternary` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/static_called_on_instance` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/gdscript/warnings/treat_warnings_as_errors` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unassigned_variable` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unassigned_variable_op_assign` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unreachable_code` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unreachable_pattern` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_call_argument` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_cast` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_method_access` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_property_access` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unused_local_constant` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unused_parameter` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unused_private_class_variable` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unused_signal` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unused_variable` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/void_assignment` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`debug/settings/crash_handler/message` | ``"Please include this when reporting the bug to the project developer."`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`debug/settings/crash_handler/message.editor` | ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/settings/gdscript/max_call_stack` | ``1024`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/settings/profiler/max_functions` | ``16384`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/settings/stdout/print_fps` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/settings/stdout/print_gpu_profile` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/settings/stdout/verbose_stdout` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/collision/contact_color` | ``Color(1, 0.2, 0.1, 0.8)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/collision/draw_2d_outlines` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/shapes/collision/max_contacts_displayed` | ``10000`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/collision/shape_color` | ``Color(0, 0.6, 0.7, 0.42)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/navigation/edge_connection_color` | ``Color(1, 0, 1, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_connections` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_connections_xray` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_lines` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/navigation/enable_edge_lines_xray` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/navigation/enable_geometry_face_random_color` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/navigation/enable_link_connections` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/shapes/navigation/enable_link_connections_xray` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/navigation/geometry_edge_color` | ``Color(0.5, 1, 1, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/navigation/geometry_edge_disabled_color` | ``Color(0.5, 0.5, 0.5, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/navigation/geometry_face_color` | ``Color(0.5, 1, 1, 0.4)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/navigation/geometry_face_disabled_color` | ``Color(0.5, 0.5, 0.5, 0.4)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/navigation/link_connection_color` | ``Color(1, 0.5, 1, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/navigation/link_connection_disabled_color` | ``Color(0.5, 0.5, 0.5, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/shapes/paths/geometry_color` | ``Color(0.1, 1, 0.7, 0.4)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`debug/shapes/paths/geometry_width` | ``2.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`display/mouse_cursor/custom_image` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`display/mouse_cursor/custom_image_hotspot` | ``Vector2(0, 0)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`display/mouse_cursor/tooltip_position_offset` | ``Vector2(10, 10)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/dpi/allow_hidpi` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on.editor` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/handheld/orientation` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/ios/allow_high_refresh_rate` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/ios/hide_home_indicator` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/ios/hide_status_bar` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/ios/suppress_ui_gesture` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/per_pixel_transparency/allowed` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/size/always_on_top` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/size/borderless` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/size/extend_to_title` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/size/mode` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/size/no_focus` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/size/resizable` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/size/transparent` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/size/viewport_height` | ``648`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/size/viewport_width` | ``1152`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/size/window_height_override` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/size/window_width_override` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/vsync/vsync_mode` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/movie_writer/disable_vsync` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editor/movie_writer/fps` | ``60`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editor/movie_writer/mix_rate` | ``48000`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editor/movie_writer/mjpeg_quality` | ``0.75`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`editor/movie_writer/movie_file` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editor/movie_writer/speaker_mode` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editor/node_naming/name_casing` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editor/node_naming/name_num_separator` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`editor/run/main_run_args` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`editor/script/search_in_file_extensions` | ``PackedStringArray("gd", "gdshader")`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`editor/script/templates_search_path` | ``"res://script_templates"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/import/blender/enabled` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/import/blender/enabled.android` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/import/blender/enabled.web` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/import/fbx/enabled` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/import/fbx/enabled.android` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/import/fbx/enabled.web` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gui/common/default_scroll_deadzone` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui/common/swap_cancel_ok` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gui/common/text_edit_undo_stack_max_size` | ``1024`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`gui/theme/custom` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`gui/theme/custom_font` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gui/theme/default_font_antialiasing` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui/theme/default_font_generate_mipmaps` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gui/theme/default_font_hinting` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui/theme/default_font_multichannel_signed_distance_field` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gui/theme/default_font_subpixel_positioning` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`gui/theme/default_theme_scale` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gui/theme/lcd_subpixel_layout` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`gui/timers/incremental_search_max_interval_msec` | ``2000`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`gui/timers/text_edit_idle_detect_sec` | ``3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`gui/timers/tooltip_delay_sec` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_accept` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_cancel` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_copy` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_cut` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_down` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_end` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_filedialog_refresh` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_filedialog_show_hidden` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_filedialog_up_one_level` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_focus_next` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_focus_prev` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_graph_delete` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_graph_duplicate` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_home` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_left` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_menu` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_page_down` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_page_up` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_paste` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_redo` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_right` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_select` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_swap_input_direction` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_add_selection_for_next_occurrence` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_backspace` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_backspace_all_to_left` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_backspace_all_to_left.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_backspace_word` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_backspace_word.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_add_above` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_add_above.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_add_below` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_add_below.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_document_end` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_document_end.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_document_start` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_document_start.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_down` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_left` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_line_end` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_line_end.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_line_start` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_line_start.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_page_down` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_page_up` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_right` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_up` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_word_left` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_word_left.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_word_right` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_caret_word_right.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_clear_carets_and_selection` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_completion_accept` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_completion_query` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_completion_replace` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_dedent` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_delete` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_delete_all_to_right` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_delete_all_to_right.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_delete_word` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_delete_word.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_indent` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_newline` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_newline_above` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_newline_blank` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_scroll_down` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_scroll_down.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_scroll_up` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_scroll_up.macos` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_select_all` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_select_word_under_caret` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_submit` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_text_toggle_insert_mode` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_undo` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_up` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/buffering/agile_event_flushing` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`input_devices/pen_tablet/driver` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`input_devices/pen_tablet/driver.windows` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/pointing/emulate_mouse_from_touch` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/pointing/emulate_touch_from_mouse` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`input_devices/pointing/ios/touch_delay` | ``0.15`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`internationalization/locale/fallback` | ``"en"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/locale/include_text_server_data` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`internationalization/locale/test` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`internationalization/locale/translation_remaps` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`internationalization/locale/translations` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/pseudolocalization/double_vowels` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`internationalization/pseudolocalization/expansion_ratio` | ``0.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/pseudolocalization/fake_bidi` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/pseudolocalization/override` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`internationalization/pseudolocalization/prefix` | ``"["`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/pseudolocalization/replace_with_accents` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/pseudolocalization/skip_placeholders` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`internationalization/pseudolocalization/suffix` | ``"]"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/pseudolocalization/use_pseudolocalization` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`internationalization/rendering/force_right_to_left_layout_direction` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`internationalization/rendering/text_driver` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_1` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_10` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_11` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_12` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_13` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_14` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_15` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_16` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_17` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_18` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_19` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_2` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_20` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_21` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_22` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_23` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_24` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_25` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_26` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_27` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_28` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_29` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_3` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_30` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_31` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_32` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_4` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_5` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_6` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_navigation/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_1` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_10` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_11` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_12` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_13` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_14` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_15` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_16` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_17` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_18` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_19` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_2` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_20` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_21` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_22` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_23` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_24` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_25` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_26` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_27` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_28` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_29` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_3` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_30` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_31` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_32` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_4` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_5` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_6` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_physics/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_1` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_10` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_11` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_12` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_13` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_14` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_15` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_16` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_17` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_18` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_19` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_2` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_20` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_3` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_4` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_5` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_6` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/2d_render/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_1` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_10` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_11` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_12` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_13` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_14` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_15` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_16` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_17` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_18` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_19` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_2` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_20` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_21` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_22` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_23` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_24` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_25` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_26` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_27` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_28` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_29` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_3` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_30` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_31` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_32` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_4` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_5` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_6` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_navigation/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_1` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_10` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_11` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_12` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_13` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_14` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_15` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_16` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_17` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_18` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_19` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_2` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_20` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_21` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_22` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_23` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_24` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_25` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_26` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_27` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_28` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_29` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_3` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_30` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_31` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_32` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_4` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_5` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_6` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_physics/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_1` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_10` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_11` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_12` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_13` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_14` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_15` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_16` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_17` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_18` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_19` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_2` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_20` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_3` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_4` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_5` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_6` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_7` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_8` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layer_names/3d_render/layer_9` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`memory/limits/message_queue/max_size_kb` | ``4096`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`memory/limits/multithreaded_server/rid_pool_prealloc` | ``60`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`navigation/2d/default_cell_size` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`navigation/2d/default_edge_connection_margin` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`navigation/2d/default_link_connection_radius` | ``4`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`navigation/3d/default_cell_size` | ``0.25`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`navigation/3d/default_edge_connection_margin` | ``0.25`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`navigation/3d/default_link_connection_radius` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/limits/debugger/max_chars_per_second` | ``32768`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/limits/debugger/max_errors_per_second` | ``400`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/limits/debugger/max_queued_messages` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/limits/debugger/max_warnings_per_second` | ``400`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/limits/packet_peer_stream/max_buffer_po2` | ``16`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/limits/tcp/connect_timeout_seconds` | ``30`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/limits/webrtc/max_channel_in_buffer_kb` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/remote_fs/page_read_ahead` | ``4`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/remote_fs/page_size` | ``65536`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`network/tls/certificate_bundle_override` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/default_angular_damp` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/default_gravity` | ``980.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`physics/2d/default_gravity_vector` | ``Vector2(0, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/default_linear_damp` | ``0.1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`physics/2d/physics_engine` | ``"DEFAULT"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/2d/run_on_separate_thread` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/sleep_threshold_angular` | ``0.139626`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/sleep_threshold_linear` | ``2.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/solver/contact_max_allowed_penetration` | ``0.3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/solver/contact_max_separation` | ``1.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/solver/contact_recycle_radius` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/solver/default_constraint_bias` | ``0.2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/solver/default_contact_bias` | ``0.8`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/2d/solver/solver_iterations` | ``16`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/time_before_sleep` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/default_angular_damp` | ``0.1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/default_gravity` | ``9.8`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`physics/3d/default_gravity_vector` | ``Vector3(0, -1, 0)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/default_linear_damp` | ``0.1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`physics/3d/physics_engine` | ``"DEFAULT"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/3d/run_on_separate_thread` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/sleep_threshold_angular` | ``0.139626`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/sleep_threshold_linear` | ``0.1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/solver/contact_max_allowed_penetration` | ``0.01`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/solver/contact_max_separation` | ``0.05`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/solver/contact_recycle_radius` | ``0.01`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/solver/default_contact_bias` | ``0.8`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/3d/solver/solver_iterations` | ``16`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/3d/time_before_sleep` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/common/enable_object_picking` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/common/max_physics_steps_per_frame` | ``8`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/common/physics_jitter_fix` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/common/physics_ticks_per_second` | ``60`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/2d/sdf/oversize` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/2d/sdf/scale` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/2d/shadow_atlas/size` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/2d/snap/snap_2d_transforms_to_pixel` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/2d/snap/snap_2d_vertices_to_pixel` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/anti_aliasing/quality/msaa_2d` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/anti_aliasing/quality/msaa_3d` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/anti_aliasing/quality/screen_space_aa` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/anti_aliasing/quality/use_debanding` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/anti_aliasing/quality/use_taa` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/amount` | ``0.25`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/enabled` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/limit` | ``0.18`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/camera/depth_of_field/depth_of_field_bokeh_quality` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/camera/depth_of_field/depth_of_field_bokeh_shape` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/camera/depth_of_field/depth_of_field_use_jitter` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/driver/depth_prepass/disable_for_vendors` | ``"PowerVR,Mali,Adreno,Apple"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/driver/depth_prepass/enable` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/driver/threads/thread_model` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`rendering/environment/defaults/default_clear_color` | ``Color(0.3, 0.3, 0.3, 1)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/environment/defaults/default_environment` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/glow/upscale_mode` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/glow/upscale_mode.mobile` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/environment/glow/use_high_quality` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/screen_space_reflection/roughness_quality` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/ssao/adaptive_target` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/ssao/blur_passes` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/ssao/fadeout_from` | ``50.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/ssao/fadeout_to` | ``300.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/environment/ssao/half_size` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/ssao/quality` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/ssil/adaptive_target` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/ssil/blur_passes` | ``4`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/ssil/fadeout_from` | ``50.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/ssil/fadeout_to` | ``300.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/environment/ssil/half_size` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/ssil/quality` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale` | ``0.01`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_quality` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_scale` | ``0.05`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/volumetric_fog/use_filter` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/volumetric_fog/volume_depth` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/environment/volumetric_fog/volume_size` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/gl_compatibility/driver` | ``"opengl3"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.android` | ``"opengl3"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.ios` | ``"opengl3"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.linuxbsd` | ``"opengl3"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.macos` | ``"opengl3"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.web` | ``"opengl3"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.windows` | ``"opengl3"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/gl_compatibility/item_buffer_size` | ``16384`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/global_illumination/gi/use_half_resolution` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/global_illumination/sdfgi/frames_to_converge` | ``5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/global_illumination/sdfgi/frames_to_update_lights` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/global_illumination/sdfgi/probe_ray_count` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/global_illumination/voxel_gi/quality` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_performance/max_rays_per_pass` | ``32`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_performance/max_rays_per_probe_pass` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_performance/region_size` | ``512`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_probe_ray_count` | ``512`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_ray_count` | ``256`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/low_quality_probe_ray_count` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/low_quality_ray_count` | ``16`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/medium_quality_probe_ray_count` | ``256`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/medium_quality_ray_count` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_ray_count` | ``1024`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/lightmapping/primitive_meshes/texel_size` | ``0.2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/lightmapping/probe_capture/update_speed` | ``15`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/lights_and_shadows/directional_shadow/16_bits` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/size` | ``4096`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/size.mobile` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_16_bits` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv` | ``3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv` | ``4`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_size` | ``4096`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/atlas_size.mobile` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/lights_and_shadows/use_physical_light_units` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/limits/cluster_builder/max_clustered_elements` | ``512`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/limits/forward_renderer/threaded_render_minimum_instances` | ``500`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/limits/global_shader_variables/buffer_size` | ``65536`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/limits/opengl/max_lights_per_object` | ``8`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/limits/opengl/max_renderable_elements` | ``65536`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/limits/opengl/max_renderable_lights` | ``32`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/limits/spatial_indexer/threaded_cull_minimum_instances` | ``1000`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/limits/spatial_indexer/update_iterations_per_frame` | ``10`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/limits/time/time_rollover_secs` | ``3600`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/mesh_lod/lod_change/threshold_pixels` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/occlusion_culling/bvh_build_quality` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/occlusion_culling/occlusion_rays_per_thread` | ``512`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/occlusion_culling/use_occlusion_culling` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/reflections/reflection_atlas/reflection_count` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/reflections/reflection_atlas/reflection_size` | ``256`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/reflections/reflection_atlas/reflection_size.mobile` | ``128`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/reflections/sky_reflections/fast_filter_high_quality` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/reflections/sky_reflections/ggx_samples` | ``32`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/reflections/sky_reflections/ggx_samples.mobile` | ``16`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/reflections/sky_reflections/roughness_layers` | ``8`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/reflections/sky_reflections/texture_array_reflections` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/reflections/sky_reflections/texture_array_reflections.mobile` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/renderer/rendering_method` | ``"forward_plus"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/renderer/rendering_method.mobile` | ``"mobile"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/renderer/rendering_method.web` | ``"gl_compatibility"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/rendering_device/driver` | ``"vulkan"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/rendering_device/driver.android` | ``"vulkan"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/rendering_device/driver.ios` | ``"vulkan"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/rendering_device/driver.linuxbsd` | ``"vulkan"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/rendering_device/driver.macos` | ``"vulkan"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/rendering_device/driver.windows` | ``"vulkan"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/block_size_kb` | ``256`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/max_size_mb` | ``128`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/texture_upload_region_size_px` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/vulkan/max_descriptors_per_pool` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/scaling_3d/fsr_sharpness` | ``0.2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/scaling_3d/mode` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/scaling_3d/scale` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/compress` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/enabled` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/strip_debug` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/strip_debug.release` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shader_compiler/shader_cache/use_zstd_compression` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shading/overrides/force_lambert_over_burley` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shading/overrides/force_lambert_over_burley.mobile` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading.mobile` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/decals/filter` | ``3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/default_filters/anisotropic_filtering_level` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/textures/default_filters/texture_mipmap_bias` | ``0.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/textures/default_filters/use_nearest_mipmap_filter` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/light_projectors/filter` | ``3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/textures/lossless_compression/force_png` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_bptc` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_etc` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_etc2` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_s3tc` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/webp_compression/compression_method` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rendering/textures/webp_compression/lossless_compression_factor` | ``25`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/transparent_background` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/vrs/mode` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rendering/vrs/texture` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`threading/worker_pool/low_priority_thread_ratio` | ``0.3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`threading/worker_pool/max_threads` | ``-1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`threading/worker_pool/use_system_threads_for_low_priority_tasks` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xr/openxr/default_action_map` | ``"res://openxr_action_map.tres"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/enabled` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr/openxr/form_factor` | ``"0"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr/openxr/reference_space` | ``"1"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr/openxr/view_configuration` | ``"1"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/shaders/enabled` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_property_info` **(** :ref:`Dictionary` hint **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** :ref:`String` name **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_order` **(** :ref:`String` name **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`globalize_path` **(** :ref:`String` path **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_setting` **(** :ref:`String` name **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`load_resource_pack` **(** :ref:`String` pack, :ref:`bool` replace_files=true, :ref:`int` offset=0 **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`localize_path` **(** :ref:`String` path **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save` **(** **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_custom` **(** :ref:`String` file **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_initial_value` **(** :ref:`String` name, :ref:`Variant` value **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_order` **(** :ref:`String` name, :ref:`int` position **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_restart_if_changed` **(** :ref:`String` name, :ref:`bool` restart **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_setting` **(** :ref:`String` name, :ref:`Variant` value **)** | -+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_property_info` **(** :ref:`Dictionary` hint **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** :ref:`String` name **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_order` **(** :ref:`String` name **)** |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`globalize_path` **(** :ref:`String` path **)** |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_setting` **(** :ref:`String` name **)** |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`load_resource_pack` **(** :ref:`String` pack, :ref:`bool` replace_files=true, :ref:`int` offset=0 **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`localize_path` **(** :ref:`String` path **)** |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save` **(** **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_custom` **(** :ref:`String` file **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_initial_value` **(** :ref:`String` name, :ref:`Variant` value **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_order` **(** :ref:`String` name, :ref:`int` position **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_restart_if_changed` **(** :ref:`String` name, :ref:`bool` restart **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_setting` **(** :ref:`String` name, :ref:`Variant` value **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ProjectSettings_property_application/boot_splash/bg_color: -- :ref:`Color` **application/boot_splash/bg_color** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``Color(0.14, 0.14, 0.14, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **application/boot_splash/bg_color** = ``Color(0.14, 0.14, 0.14, 1)`` Background color for the boot splash. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/boot_splash/fullsize: -- :ref:`bool` **application/boot_splash/fullsize** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **application/boot_splash/fullsize** = ``true`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/boot_splash/image: -- :ref:`String` **application/boot_splash/image** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/boot_splash/minimum_display_time: -- :ref:`int` **application/boot_splash/minimum_display_time** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **application/boot_splash/minimum_display_time** = ``0`` Minimum boot splash display time (in milliseconds). It is not recommended to set too high values for this setting. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/boot_splash/show_image: -- :ref:`bool` **application/boot_splash/show_image** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **application/boot_splash/show_image** = ``true`` If ``true``, displays the image specified in :ref:`application/boot_splash/image` when the engine starts. If ``false``, only displays the plain color specified in :ref:`application/boot_splash/bg_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/boot_splash/use_filter: -- :ref:`bool` **application/boot_splash/use_filter** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **application/boot_splash/use_filter** = ``true`` If ``true``, applies linear filtering when scaling the image (recommended for high-resolution artwork). If ``false``, uses nearest-neighbor interpolation (recommended for pixel art). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/custom_user_dir_name: -- :ref:`String` **application/config/custom_user_dir_name** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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`). The :ref:`application/config/use_custom_user_dir` setting must be enabled for this to take effect. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/description: -- :ref:`String` **application/config/description** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **application/config/description** = ``""`` The project's description, displayed as a tooltip in the Project Manager when hovering the project. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/features: -- :ref:`PackedStringArray` **application/config/features** +.. rst-class:: classref-property + +:ref:`PackedStringArray` **application/config/features** List of internal features associated with the project, like ``Double Precision`` or ``C#``. Not to be confused with feature tags. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/icon: -- :ref:`String` **application/config/icon** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **application/config/icon** = ``""`` Icon used for the project, set when project loads. Exporters will also use this icon when possible. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/macos_native_icon: -- :ref:`String` **application/config/macos_native_icon** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/name: -- :ref:`String` **application/config/name** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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. \ **Note:** Changing this value will also change the user data folder's path if :ref:`application/config/use_custom_user_dir` is ``false``. After renaming the project, you will no longer be able to access existing data in ``user://`` unless you rename the old folder to match the new project name. See :doc:`Data paths <../tutorials/io/data_paths>` in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/name_localized: -- :ref:`Dictionary` **application/config/name_localized** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``{}`` | -+-----------+--------+ +:ref:`Dictionary` **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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/project_settings_override: -- :ref:`String` **application/config/project_settings_override** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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. +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. \ **Note:** Regardless of this setting's value, ``res://override.cfg`` will still be read to override the project settings. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/use_custom_user_dir: -- :ref:`bool` **application/config/use_custom_user_dir** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **application/config/use_custom_user_dir** = ``false`` If ``true``, the project will save user data to its own user directory. If :ref:`application/config/custom_user_dir_name` is empty, ``/`` directory will be used. If ``false``, the project will save user data to ``/Godot/app_userdata/``. See also `File paths in Godot projects <../tutorials/io/data_paths.html#accessing-persistent-user-data-user>`__. This setting is only effective on desktop platforms. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/use_hidden_project_data_directory: -- :ref:`bool` **application/config/use_hidden_project_data_directory** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **application/config/use_hidden_project_data_directory** = ``true`` If ``true``, the project will use a hidden directory (``.godot``) for storing project-specific data (metadata, shader cache, etc.). @@ -1553,55 +1575,55 @@ If ``false``, a non-hidden directory (``godot``) will be used instead. \ **Note:** Changing this value can help on platforms or with third-party tools where hidden directory patterns are disallowed. Only modify this setting if you know that your environment requires it, as changing the default can impact compatibility with some external tools or plugins which expect the default ``.godot`` folder. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/config/windows_native_icon: -- :ref:`String` **application/config/windows_native_icon** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/disable_stderr: -- :ref:`bool` **application/run/disable_stderr** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **application/run/disable_stderr** = ``false`` If ``true``, disables printing to standard error. If ``true``, this also hides error and warning messages printed by :ref:`@GlobalScope.push_error` and :ref:`@GlobalScope.push_warning`. See also :ref:`application/run/disable_stdout`. Changes to this setting will only be applied upon restarting the application. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/disable_stdout: -- :ref:`bool` **application/run/disable_stdout** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **application/run/disable_stdout** = ``false`` 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`. Changes to this setting will only be applied upon restarting the application. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/flush_stdout_on_print: -- :ref:`bool` **application/run/flush_stdout_on_print** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **application/run/flush_stdout_on_print** = ``false`` If ``true``, flushes the standard output stream every time a line is printed. This affects both terminal logging and file logging. @@ -1611,77 +1633,77 @@ When running a project, this setting must be enabled if you want logs to be coll Changes to this setting will only be applied upon restarting the application. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/flush_stdout_on_print.debug: -- :ref:`bool` **application/run/flush_stdout_on_print.debug** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **application/run/flush_stdout_on_print.debug** = ``true`` Debug build override for :ref:`application/run/flush_stdout_on_print`, as performance is less important during debugging. Changes to this setting will only be applied upon restarting the application. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/frame_delay_msec: -- :ref:`int` **application/run/frame_delay_msec** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **application/run/frame_delay_msec** = ``0`` Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/low_processor_mode: -- :ref:`bool` **application/run/low_processor_mode** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **application/run/low_processor_mode** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/low_processor_mode_sleep_usec: -- :ref:`int` **application/run/low_processor_mode_sleep_usec** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``6900`` | -+-----------+----------+ +:ref:`int` **application/run/low_processor_mode_sleep_usec** = ``6900`` Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/main_scene: -- :ref:`String` **application/run/main_scene** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **application/run/main_scene** = ``""`` Path to the main scene file that will be loaded when the project runs. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_application/run/max_fps: -- :ref:`int` **application/run/max_fps** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **application/run/max_fps** = ``0`` 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. @@ -1697,47 +1719,51 @@ See also :ref:`physics/common/physics_ticks_per_second` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/buses/channel_disable_threshold_db: -- :ref:`float` **audio/buses/channel_disable_threshold_db** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``-60.0`` | -+-----------+-----------+ +:ref:`float` **audio/buses/channel_disable_threshold_db** = ``-60.0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/buses/channel_disable_time: -- :ref:`float` **audio/buses/channel_disable_time** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``2.0`` | -+-----------+---------+ +:ref:`float` **audio/buses/channel_disable_time** = ``2.0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/buses/default_bus_layout: -- :ref:`String` **audio/buses/default_bus_layout** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``"res://default_bus_layout.tres"`` | -+-----------+-------------------------------------+ +:ref:`String` **audio/buses/default_bus_layout** = ``"res://default_bus_layout.tres"`` Default :ref:`AudioBusLayout` resource file to use in the project, unless overridden by the scene. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/driver/driver: -- :ref:`String` **audio/driver/driver** +.. rst-class:: classref-property + +:ref:`String` **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. @@ -1745,53 +1771,53 @@ The ``Dummy`` audio driver disables all audio playback and recording, which is u \ **Note:** The driver in use can be overridden at runtime via the ``--audio-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/driver/enable_input: -- :ref:`bool` **audio/driver/enable_input** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **audio/driver/enable_input** = ``false`` If ``true``, microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. \ **Note:** If the operating system blocks access to audio input devices (due to the user's privacy settings), audio capture will only return silence. On Windows 10 and later, make sure that apps are allowed to access the microphone in the OS' privacy settings. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/driver/mix_rate: -- :ref:`int` **audio/driver/mix_rate** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``44100`` | -+-----------+-----------+ +:ref:`int` **audio/driver/mix_rate** = ``44100`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/driver/mix_rate.web: -- :ref:`int` **audio/driver/mix_rate.web** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **audio/driver/mix_rate.web** = ``0`` Safer override for :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/driver/output_latency: -- :ref:`int` **audio/driver/output_latency** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``15`` | -+-----------+--------+ +:ref:`int` **audio/driver/output_latency** = ``15`` 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. @@ -1799,1173 +1825,1173 @@ Audio output latency may be constrained by the host operating system and audio h \ **Note:** This setting is ignored on all versions of Windows prior to Windows 10. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/driver/output_latency.web: -- :ref:`int` **audio/driver/output_latency.web** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``50`` | -+-----------+--------+ +:ref:`int` **audio/driver/output_latency.web** = ``50`` Safer override for :ref:`audio/driver/output_latency` in the Web platform, to avoid audio issues especially on mobile devices. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/general/2d_panning_strength: -- :ref:`float` **audio/general/2d_panning_strength** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **audio/general/2d_panning_strength** = ``0.5`` The base strength of the panning effect for all :ref:`AudioStreamPlayer2D` nodes. The panning strength can be further scaled on each Node using :ref:`AudioStreamPlayer2D.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. The default value of ``0.5`` is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/general/3d_panning_strength: -- :ref:`float` **audio/general/3d_panning_strength** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **audio/general/3d_panning_strength** = ``0.5`` The base strength of the panning effect for all :ref:`AudioStreamPlayer3D` nodes. The panning strength can be further scaled on each Node using :ref:`AudioStreamPlayer3D.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. The default value of ``0.5`` is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_audio/video/video_delay_compensation_ms: -- :ref:`int` **audio/video/video_delay_compensation_ms** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **audio/video/video_delay_compensation_ms** = ``0`` Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_compression/formats/gzip/compression_level: -- :ref:`int` **compression/formats/gzip/compression_level** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``-1`` | -+-----------+--------+ +:ref:`int` **compression/formats/gzip/compression_level** = ``-1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_compression/formats/zlib/compression_level: -- :ref:`int` **compression/formats/zlib/compression_level** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``-1`` | -+-----------+--------+ +:ref:`int` **compression/formats/zlib/compression_level** = ``-1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_compression/formats/zstd/compression_level: -- :ref:`int` **compression/formats/zstd/compression_level** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **compression/formats/zstd/compression_level** = ``3`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_compression/formats/zstd/long_distance_matching: -- :ref:`bool` **compression/formats/zstd/long_distance_matching** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **compression/formats/zstd/long_distance_matching** = ``false`` Enables `long-distance matching `__ in Zstandard. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_compression/formats/zstd/window_log_size: -- :ref:`int` **compression/formats/zstd/window_log_size** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``27`` | -+-----------+--------+ +:ref:`int` **compression/formats/zstd/window_log_size** = ``27`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/disable_touch: -- :ref:`bool` **debug/disable_touch** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **debug/disable_touch** = ``false`` Disable touch input. Only has effect on iOS. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/file_logging/enable_file_logging: -- :ref:`bool` **debug/file_logging/enable_file_logging** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **debug/file_logging/enable_file_logging** = ``false`` If ``true``, logs all output to files. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/file_logging/enable_file_logging.pc: -- :ref:`bool` **debug/file_logging/enable_file_logging.pc** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/file_logging/enable_file_logging.pc** = ``true`` Desktop override for :ref:`debug/file_logging/enable_file_logging`, as log files are not readily accessible on mobile/Web platforms. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/file_logging/log_path: -- :ref:`String` **debug/file_logging/log_path** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``"user://logs/godot.log"`` | -+-----------+-----------------------------+ +:ref:`String` **debug/file_logging/log_path** = ``"user://logs/godot.log"`` Path at which to store log files for the project. Using a path under ``user://`` is recommended. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/file_logging/max_log_files: -- :ref:`int` **debug/file_logging/max_log_files** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``5`` | -+-----------+-------+ +:ref:`int` **debug/file_logging/max_log_files** = ``5`` Specifies the maximum number of log files allowed (used for rotation). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/assert_always_false: -- :ref:`int` **debug/gdscript/warnings/assert_always_false** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/assert_always_false** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when an ``assert`` call always evaluates to false. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/assert_always_true: -- :ref:`int` **debug/gdscript/warnings/assert_always_true** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/assert_always_true** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when an ``assert`` call always evaluates to true. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/constant_used_as_function: -- :ref:`int` **debug/gdscript/warnings/constant_used_as_function** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/constant_used_as_function** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when a constant is used as a function. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/deprecated_keyword: -- :ref:`int` **debug/gdscript/warnings/deprecated_keyword** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/deprecated_keyword** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when deprecated keywords are used. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/empty_file: -- :ref:`int` **debug/gdscript/warnings/empty_file** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/empty_file** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when an empty file is parsed. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/enable: -- :ref:`bool` **debug/gdscript/warnings/enable** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/gdscript/warnings/enable** = ``true`` If ``true``, enables specific GDScript warnings (see ``debug/gdscript/warnings/*`` settings). If ``false``, disables all GDScript warnings. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/exclude_addons: -- :ref:`bool` **debug/gdscript/warnings/exclude_addons** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/gdscript/warnings/exclude_addons** = ``true`` If ``true``, scripts in the ``res://addons`` folder will not generate warnings. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/function_used_as_property: -- :ref:`int` **debug/gdscript/warnings/function_used_as_property** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/function_used_as_property** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when using a function as if it is a property. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/incompatible_ternary: -- :ref:`int` **debug/gdscript/warnings/incompatible_ternary** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/incompatible_ternary** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when a ternary operator may emit values with incompatible types. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/int_assigned_to_enum: -- :ref:`int` **debug/gdscript/warnings/int_assigned_to_enum** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/int_assigned_to_enum** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when trying to assign an integer to a variable that expects an enum value. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/integer_division: -- :ref:`int` **debug/gdscript/warnings/integer_division** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/integer_division** = ``1`` 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). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/narrowing_conversion: -- :ref:`int` **debug/gdscript/warnings/narrowing_conversion** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/narrowing_conversion** = ``1`` 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). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/property_used_as_function: -- :ref:`int` **debug/gdscript/warnings/property_used_as_function** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/property_used_as_function** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when using a property as if it is a function. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/redundant_await: -- :ref:`int` **debug/gdscript/warnings/redundant_await** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/redundant_await** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/return_value_discarded: -- :ref:`int` **debug/gdscript/warnings/return_value_discarded** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/return_value_discarded** = ``0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/shadowed_global_identifier: -- :ref:`int` **debug/gdscript/warnings/shadowed_global_identifier** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/shadowed_global_identifier** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/shadowed_variable: -- :ref:`int` **debug/gdscript/warnings/shadowed_variable** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/shadowed_variable** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/shadowed_variable_base_class: -- :ref:`int` **debug/gdscript/warnings/shadowed_variable_base_class** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/shadowed_variable_base_class** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/standalone_expression: -- :ref:`int` **debug/gdscript/warnings/standalone_expression** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/standalone_expression** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/standalone_ternary: -- :ref:`int` **debug/gdscript/warnings/standalone_ternary** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/standalone_ternary** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/static_called_on_instance: -- :ref:`int` **debug/gdscript/warnings/static_called_on_instance** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/static_called_on_instance** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/treat_warnings_as_errors: -- :ref:`bool` **debug/gdscript/warnings/treat_warnings_as_errors** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **debug/gdscript/warnings/treat_warnings_as_errors** = ``false`` If ``true``, all warnings will be reported as if they are errors. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unassigned_variable: -- :ref:`int` **debug/gdscript/warnings/unassigned_variable** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unassigned_variable** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when using a variable that wasn't previously assigned. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unassigned_variable_op_assign: -- :ref:`int` **debug/gdscript/warnings/unassigned_variable_op_assign** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unassigned_variable_op_assign** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unreachable_code: -- :ref:`int` **debug/gdscript/warnings/unreachable_code** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unreachable_code** = ``1`` 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). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unreachable_pattern: -- :ref:`int` **debug/gdscript/warnings/unreachable_pattern** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unreachable_pattern** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when an unreachable ``match`` pattern is detected. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_call_argument: -- :ref:`int` **debug/gdscript/warnings/unsafe_call_argument** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unsafe_call_argument** = ``0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_cast: -- :ref:`int` **debug/gdscript/warnings/unsafe_cast** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unsafe_cast** = ``0`` When set to ``warn`` or ``error``, produces a warning or an error respectively when performing an unsafe cast. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_method_access: -- :ref:`int` **debug/gdscript/warnings/unsafe_method_access** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unsafe_method_access** = ``0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_property_access: -- :ref:`int` **debug/gdscript/warnings/unsafe_property_access** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unsafe_property_access** = ``0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_local_constant: -- :ref:`int` **debug/gdscript/warnings/unused_local_constant** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unused_local_constant** = ``1`` 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: -- :ref:`int` **debug/gdscript/warnings/unused_parameter** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unused_parameter** = ``1`` 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 + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_private_class_variable: -- :ref:`int` **debug/gdscript/warnings/unused_private_class_variable** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unused_private_class_variable** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when a private member variable is never used. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_signal: -- :ref:`int` **debug/gdscript/warnings/unused_signal** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unused_signal** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when a signal is declared but never emitted. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_variable: -- :ref:`int` **debug/gdscript/warnings/unused_variable** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/unused_variable** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when a local variable is unused. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/void_assignment: -- :ref:`int` **debug/gdscript/warnings/void_assignment** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **debug/gdscript/warnings/void_assignment** = ``1`` When set to ``warn`` or ``error``, produces a warning or an error respectively when assigning the result of a function that returns ``void`` to a variable. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/settings/crash_handler/message: -- :ref:`String` **debug/settings/crash_handler/message** +.. rst-class:: classref-property -+-----------+----------------------------------------------------------------------------+ -| *Default* | ``"Please include this when reporting the bug to the project developer."`` | -+-----------+----------------------------------------------------------------------------+ +:ref:`String` **debug/settings/crash_handler/message** = ``"Please include this when reporting the bug to the project developer."`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/settings/crash_handler/message.editor: -- :ref:`String` **debug/settings/crash_handler/message.editor** +.. rst-class:: classref-property -+-----------+--------------------------------------------------------------------------------------------------+ -| *Default* | ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` | -+-----------+--------------------------------------------------------------------------------------------------+ +:ref:`String` **debug/settings/crash_handler/message.editor** = ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` Editor-only override for :ref:`debug/settings/crash_handler/message`. Does not affect exported projects in debug or release mode. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/settings/gdscript/max_call_stack: -- :ref:`int` **debug/settings/gdscript/max_call_stack** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``1024`` | -+-----------+----------+ +:ref:`int` **debug/settings/gdscript/max_call_stack** = ``1024`` Maximum call stack allowed for debugging GDScript. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/settings/profiler/max_functions: -- :ref:`int` **debug/settings/profiler/max_functions** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``16384`` | -+-----------+-----------+ +:ref:`int` **debug/settings/profiler/max_functions** = ``16384`` Maximum number of functions per frame allowed when profiling. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/settings/stdout/print_fps: -- :ref:`bool` **debug/settings/stdout/print_fps** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **debug/settings/stdout/print_fps** = ``false`` Print frames per second to standard output every second. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/settings/stdout/print_gpu_profile: -- :ref:`bool` **debug/settings/stdout/print_gpu_profile** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **debug/settings/stdout/print_gpu_profile** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/settings/stdout/verbose_stdout: -- :ref:`bool` **debug/settings/stdout/verbose_stdout** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **debug/settings/stdout/verbose_stdout** = ``false`` 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` and :ref:`@GlobalScope.print_verbose`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/collision/contact_color: -- :ref:`Color` **debug/shapes/collision/contact_color** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(1, 0.2, 0.1, 0.8)`` | -+-----------+-----------------------------+ +:ref:`Color` **debug/shapes/collision/contact_color** = ``Color(1, 0.2, 0.1, 0.8)`` Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/collision/draw_2d_outlines: -- :ref:`bool` **debug/shapes/collision/draw_2d_outlines** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/collision/draw_2d_outlines** = ``true`` Sets whether 2D physics will display collision outlines in game when "Visible Collision Shapes" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/collision/max_contacts_displayed: -- :ref:`int` **debug/shapes/collision/max_contacts_displayed** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``10000`` | -+-----------+-----------+ +:ref:`int` **debug/shapes/collision/max_contacts_displayed** = ``10000`` Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/collision/shape_color: -- :ref:`Color` **debug/shapes/collision/shape_color** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``Color(0, 0.6, 0.7, 0.42)`` | -+-----------+------------------------------+ +:ref:`Color` **debug/shapes/collision/shape_color** = ``Color(0, 0.6, 0.7, 0.42)`` Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/edge_connection_color: -- :ref:`Color` **debug/shapes/navigation/edge_connection_color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 0, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **debug/shapes/navigation/edge_connection_color** = ``Color(1, 0, 1, 1)`` Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_connections: -- :ref:`bool` **debug/shapes/navigation/enable_edge_connections** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/navigation/enable_edge_connections** = ``true`` If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_connections_xray: -- :ref:`bool` **debug/shapes/navigation/enable_edge_connections_xray** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/navigation/enable_edge_connections_xray** = ``true`` If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_lines: -- :ref:`bool` **debug/shapes/navigation/enable_edge_lines** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/navigation/enable_edge_lines** = ``true`` If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/enable_edge_lines_xray: -- :ref:`bool` **debug/shapes/navigation/enable_edge_lines_xray** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/navigation/enable_edge_lines_xray** = ``true`` If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/enable_geometry_face_random_color: -- :ref:`bool` **debug/shapes/navigation/enable_geometry_face_random_color** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/navigation/enable_geometry_face_random_color** = ``true`` If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/enable_link_connections: -- :ref:`bool` **debug/shapes/navigation/enable_link_connections** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/navigation/enable_link_connections** = ``true`` If enabled, displays navigation link connections when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/enable_link_connections_xray: -- :ref:`bool` **debug/shapes/navigation/enable_link_connections_xray** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **debug/shapes/navigation/enable_link_connections_xray** = ``true`` If enabled, displays navigation link connections through geometry when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/geometry_edge_color: -- :ref:`Color` **debug/shapes/navigation/geometry_edge_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(0.5, 1, 1, 1)`` | -+-----------+-------------------------+ +:ref:`Color` **debug/shapes/navigation/geometry_edge_color** = ``Color(0.5, 1, 1, 1)`` Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/geometry_edge_disabled_color: -- :ref:`Color` **debug/shapes/navigation/geometry_edge_disabled_color** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(0.5, 0.5, 0.5, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **debug/shapes/navigation/geometry_edge_disabled_color** = ``Color(0.5, 0.5, 0.5, 1)`` Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/geometry_face_color: -- :ref:`Color` **debug/shapes/navigation/geometry_face_color** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Color(0.5, 1, 1, 0.4)`` | -+-----------+---------------------------+ +:ref:`Color` **debug/shapes/navigation/geometry_face_color** = ``Color(0.5, 1, 1, 0.4)`` Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/geometry_face_disabled_color: -- :ref:`Color` **debug/shapes/navigation/geometry_face_disabled_color** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``Color(0.5, 0.5, 0.5, 0.4)`` | -+-----------+-------------------------------+ +:ref:`Color` **debug/shapes/navigation/geometry_face_disabled_color** = ``Color(0.5, 0.5, 0.5, 0.4)`` Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/link_connection_color: -- :ref:`Color` **debug/shapes/navigation/link_connection_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(1, 0.5, 1, 1)`` | -+-----------+-------------------------+ +:ref:`Color` **debug/shapes/navigation/link_connection_color** = ``Color(1, 0.5, 1, 1)`` Color to use to display navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/navigation/link_connection_disabled_color: -- :ref:`Color` **debug/shapes/navigation/link_connection_disabled_color** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(0.5, 0.5, 0.5, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **debug/shapes/navigation/link_connection_disabled_color** = ``Color(0.5, 0.5, 0.5, 1)`` Color to use to display disabled navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/paths/geometry_color: -- :ref:`Color` **debug/shapes/paths/geometry_color** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(0.1, 1, 0.7, 0.4)`` | -+-----------+-----------------------------+ +:ref:`Color` **debug/shapes/paths/geometry_color** = ``Color(0.1, 1, 0.7, 0.4)`` Color of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_debug/shapes/paths/geometry_width: -- :ref:`float` **debug/shapes/paths/geometry_width** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``2.0`` | -+-----------+---------+ +:ref:`float` **debug/shapes/paths/geometry_width** = ``2.0`` Line width of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/mouse_cursor/custom_image: -- :ref:`String` **display/mouse_cursor/custom_image** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **display/mouse_cursor/custom_image** = ``""`` Custom image for the mouse cursor (limited to 256×256). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/mouse_cursor/custom_image_hotspot: -- :ref:`Vector2` **display/mouse_cursor/custom_image_hotspot** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ +:ref:`Vector2` **display/mouse_cursor/custom_image_hotspot** = ``Vector2(0, 0)`` Hotspot for the custom mouse cursor image. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/mouse_cursor/tooltip_position_offset: -- :ref:`Vector2` **display/mouse_cursor/tooltip_position_offset** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(10, 10)`` | -+-----------+---------------------+ +:ref:`Vector2` **display/mouse_cursor/tooltip_position_offset** = ``Vector2(10, 10)`` Position offset for tooltips, relative to the mouse cursor's hotspot. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/dpi/allow_hidpi: -- :ref:`bool` **display/window/dpi/allow_hidpi** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **display/window/dpi/allow_hidpi** = ``true`` 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. \ **Note:** This setting has no effect on Linux as DPI-awareness fallbacks are not supported there. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/energy_saving/keep_screen_on: -- :ref:`bool` **display/window/energy_saving/keep_screen_on** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **display/window/energy_saving/keep_screen_on** = ``true`` If ``true``, keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor: -- :ref:`bool` **display/window/energy_saving/keep_screen_on.editor** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **display/window/energy_saving/keep_screen_on.editor** = ``false`` Editor-only override for :ref:`display/window/energy_saving/keep_screen_on`. Does not affect exported projects in debug or release mode. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/handheld/orientation: -- :ref:`int` **display/window/handheld/orientation** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **display/window/handheld/orientation** = ``0`` The default screen orientation to use on mobile devices. See :ref:`ScreenOrientation` for possible values. \ **Note:** When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set :ref:`display/window/size/viewport_width` and :ref:`display/window/size/viewport_height` accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/ios/allow_high_refresh_rate: -- :ref:`bool` **display/window/ios/allow_high_refresh_rate** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **display/window/ios/allow_high_refresh_rate** = ``true`` If ``true``, iOS devices that support high refresh rate/"ProMotion" will be allowed to render at up to 120 frames per second. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/ios/hide_home_indicator: -- :ref:`bool` **display/window/ios/hide_home_indicator** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **display/window/ios/hide_home_indicator** = ``true`` If ``true``, the home indicator is hidden automatically. This only affects iOS devices without a physical home button. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/ios/hide_status_bar: -- :ref:`bool` **display/window/ios/hide_status_bar** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **display/window/ios/hide_status_bar** = ``true`` If ``true``, the status bar is hidden while the app is running. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/ios/suppress_ui_gesture: -- :ref:`bool` **display/window/ios/suppress_ui_gesture** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **display/window/ios/suppress_ui_gesture** = ``true`` If ``true``, it will require two swipes to access iOS UI that uses gestures. \ **Note:** This setting has no effect on the home indicator if ``hide_home_indicator`` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/per_pixel_transparency/allowed: -- :ref:`bool` **display/window/per_pixel_transparency/allowed** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **display/window/per_pixel_transparency/allowed** = ``false`` 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` and :ref:`rendering/transparent_background`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/always_on_top: -- :ref:`bool` **display/window/size/always_on_top** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **display/window/size/always_on_top** = ``false`` Forces the main window to be always on top. \ **Note:** This setting is ignored on iOS, Android, and Web. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/borderless: -- :ref:`bool` **display/window/size/borderless** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **display/window/size/borderless** = ``false`` Forces the main window to be borderless. \ **Note:** This setting is ignored on iOS, Android, and Web. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/extend_to_title: -- :ref:`bool` **display/window/size/extend_to_title** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **display/window/size/extend_to_title** = ``false`` 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. \ **Note:** This setting is implemented only on macOS. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/mode: -- :ref:`int` **display/window/size/mode** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **display/window/size/mode** = ``0`` Main window mode. See :ref:`WindowMode` for possible values and how each mode behaves. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/no_focus: -- :ref:`bool` **display/window/size/no_focus** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **display/window/size/no_focus** = ``false`` Main window can't be focused. No-focus window will ignore all input, except mouse clicks. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/resizable: -- :ref:`bool` **display/window/size/resizable** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **display/window/size/resizable** = ``true`` Allows the window to be resizable by default. \ **Note:** This setting is ignored on iOS. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/transparent: -- :ref:`bool` **display/window/size/transparent** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **display/window/size/transparent** = ``false`` 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/transparent_background`. @@ -2973,67 +2999,67 @@ If ``true``, enables a window manager hint that the main window background *can* \ **Note:** This setting has no effect if :ref:`display/window/per_pixel_transparency/allowed` is set to ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/viewport_height: -- :ref:`int` **display/window/size/viewport_height** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``648`` | -+-----------+---------+ +:ref:`int` **display/window/size/viewport_height** = ``648`` 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`, :ref:`display/window/size/window_width_override` and :ref:`display/window/size/window_height_override`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/viewport_width: -- :ref:`int` **display/window/size/viewport_width** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``1152`` | -+-----------+----------+ +:ref:`int` **display/window/size/viewport_width** = ``1152`` 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`, :ref:`display/window/size/window_width_override` and :ref:`display/window/size/window_height_override`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/window_height_override: -- :ref:`int` **display/window/size/window_height_override** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **display/window/size/window_height_override** = ``0`` On desktop platforms, overrides the game's initial window height. See also :ref:`display/window/size/window_width_override`, :ref:`display/window/size/viewport_width` and :ref:`display/window/size/viewport_height`. \ **Note:** By default, or when set to ``0``, the initial window height is the :ref:`display/window/size/viewport_height`. This setting is ignored on iOS, Android, and Web. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/size/window_width_override: -- :ref:`int` **display/window/size/window_width_override** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **display/window/size/window_width_override** = ``0`` On desktop platforms, overrides the game's initial window width. See also :ref:`display/window/size/window_height_override`, :ref:`display/window/size/viewport_width` and :ref:`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`. This setting is ignored on iOS, Android, and Web. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_display/window/vsync/vsync_mode: -- :ref:`int` **display/window/vsync/vsync_mode** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **display/window/vsync/vsync_mode** = ``1`` Sets the V-Sync mode for the main game window. @@ -3041,69 +3067,69 @@ See :ref:`VSyncMode` for possible values and how t Depending on the platform and used renderer, the engine will fall back to ``Enabled``, if the desired mode is not supported. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/movie_writer/disable_vsync: -- :ref:`bool` **editor/movie_writer/disable_vsync** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **editor/movie_writer/disable_vsync** = ``false`` If ``true``, requests V-Sync to be disabled when writing a movie (similar to setting :ref:`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. \ **Note:** :ref:`editor/movie_writer/disable_vsync` has no effect if the operating system or graphics driver forces V-Sync with no way for applications to disable it. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/movie_writer/fps: -- :ref:`int` **editor/movie_writer/fps** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``60`` | -+-----------+--------+ +:ref:`int` **editor/movie_writer/fps** = ``60`` 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` values. Certain FPS values will require you to adjust :ref:`editor/movie_writer/mix_rate` to prevent audio from desynchronizing over time. This can be specified manually on the command line using the ``--fixed-fps `` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/movie_writer/mix_rate: -- :ref:`int` **editor/movie_writer/mix_rate** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``48000`` | -+-----------+-----------+ +:ref:`int` **editor/movie_writer/mix_rate** = ``48000`` 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`, but this value must be divisible by :ref:`editor/movie_writer/fps` to prevent audio from desynchronizing over time. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/movie_writer/mjpeg_quality: -- :ref:`float` **editor/movie_writer/mjpeg_quality** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.75`` | -+-----------+----------+ +:ref:`float` **editor/movie_writer/mjpeg_quality** = ``0.75`` 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. \ **Note:** This does not affect the audio quality or writing PNG image sequences. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/movie_writer/movie_file: -- :ref:`String` **editor/movie_writer/movie_file** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **editor/movie_writer/movie_file** = ``""`` The output path for the movie. The file extension determines the :ref:`MovieWriter` that will be used. @@ -3117,51 +3143,51 @@ If you need to encode to a different format or pipe a stream through third-party When using PNG output, the frame number will be appended at the end of the file name. It starts from 0 and is padded with 8 digits to ensure correct sorting and easier processing. For example, if the output path is ``/tmp/hello.png``, the first two frames will be ``/tmp/hello00000000.png`` and ``/tmp/hello00000001.png``. The audio will be saved at ``/tmp/hello.wav``. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/movie_writer/speaker_mode: -- :ref:`int` **editor/movie_writer/speaker_mode** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **editor/movie_writer/speaker_mode** = ``0`` The speaker mode to use in the recorded audio when writing a movie. See :ref:`SpeakerMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/node_naming/name_casing: -- :ref:`int` **editor/node_naming/name_casing** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **editor/node_naming/name_casing** = ``0`` When creating node names automatically, set the type of casing in this project. This is mostly an editor setting. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/node_naming/name_num_separator: -- :ref:`int` **editor/node_naming/name_num_separator** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **editor/node_naming/name_num_separator** = ``0`` What to use to separate node name from number. This is mostly an editor setting. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/run/main_run_args: -- :ref:`String` **editor/run/main_run_args** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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. @@ -3173,185 +3199,189 @@ For example, this can be used to force the project to run on the dedicated GPU i prime-run %command% +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/script/search_in_file_extensions: -- :ref:`PackedStringArray` **editor/script/search_in_file_extensions** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``PackedStringArray("gd", "gdshader")`` | -+-----------+-----------------------------------------+ +:ref:`PackedStringArray` **editor/script/search_in_file_extensions** = ``PackedStringArray("gd", "gdshader")`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_editor/script/templates_search_path: -- :ref:`String` **editor/script/templates_search_path** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``"res://script_templates"`` | -+-----------+------------------------------+ +:ref:`String` **editor/script/templates_search_path** = ``"res://script_templates"`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_filesystem/import/blender/enabled: -- :ref:`bool` **filesystem/import/blender/enabled** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **filesystem/import/blender/enabled** = ``true`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_filesystem/import/blender/enabled.android: -- :ref:`bool` **filesystem/import/blender/enabled.android** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **filesystem/import/blender/enabled.android** = ``false`` Override for :ref:`filesystem/import/blender/enabled` on Android where Blender can't easily be accessed from Godot. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_filesystem/import/blender/enabled.web: -- :ref:`bool` **filesystem/import/blender/enabled.web** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **filesystem/import/blender/enabled.web** = ``false`` Override for :ref:`filesystem/import/blender/enabled` on the Web where Blender can't easily be accessed from Godot. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_filesystem/import/fbx/enabled: -- :ref:`bool` **filesystem/import/fbx/enabled** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **filesystem/import/fbx/enabled** = ``true`` 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``. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_filesystem/import/fbx/enabled.android: -- :ref:`bool` **filesystem/import/fbx/enabled.android** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **filesystem/import/fbx/enabled.android** = ``false`` Override for :ref:`filesystem/import/fbx/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: -- :ref:`bool` **filesystem/import/fbx/enabled.web** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **filesystem/import/fbx/enabled.web** = ``false`` Override for :ref:`filesystem/import/fbx/enabled` on the Web where FBX2glTF can't easily be accessed from Godot. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/common/default_scroll_deadzone: -- :ref:`int` **gui/common/default_scroll_deadzone** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **gui/common/default_scroll_deadzone** = ``0`` Default value for :ref:`ScrollContainer.scroll_deadzone`, which will be used for all :ref:`ScrollContainer`\ s unless overridden. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/common/swap_cancel_ok: -- :ref:`bool` **gui/common/swap_cancel_ok** +.. rst-class:: classref-property + +:ref:`bool` **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` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/common/text_edit_undo_stack_max_size: -- :ref:`int` **gui/common/text_edit_undo_stack_max_size** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``1024`` | -+-----------+----------+ +:ref:`int` **gui/common/text_edit_undo_stack_max_size** = ``1024`` Maximum undo/redo history size for :ref:`TextEdit` fields. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/custom: -- :ref:`String` **gui/theme/custom** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **gui/theme/custom** = ``""`` Path to a custom :ref:`Theme` resource file to use for the project (``.theme`` or generic ``.tres``/``.res`` extension). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/custom_font: -- :ref:`String` **gui/theme/custom_font** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **gui/theme/custom_font** = ``""`` Path to a custom :ref:`Font` resource to use as default for all GUI elements of the project. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/default_font_antialiasing: -- :ref:`int` **gui/theme/default_font_antialiasing** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **gui/theme/default_font_antialiasing** = ``1`` Font anti-aliasing mode. See :ref:`FontFile.antialiasing`, +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/default_font_generate_mipmaps: -- :ref:`bool` **gui/theme/default_font_generate_mipmaps** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **gui/theme/default_font_generate_mipmaps** = ``false`` If set to ``true``, the default font will have mipmaps generated. This prevents text from looking grainy when a :ref:`Control` is scaled down, or when a :ref:`Label3D` is viewed from a long distance (if :ref:`Label3D.texture_filter` is set to a mode that displays mipmaps). @@ -3359,27 +3389,27 @@ Enabling :ref:`gui/theme/default_font_generate_mipmaps`\ s used within the project. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/default_font_hinting: -- :ref:`int` **gui/theme/default_font_hinting** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **gui/theme/default_font_hinting** = ``1`` Default font hinting mode. See :ref:`FontFile.hinting`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/default_font_multichannel_signed_distance_field: -- :ref:`bool` **gui/theme/default_font_multichannel_signed_distance_field** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **gui/theme/default_font_multichannel_signed_distance_field** = ``false`` 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`\ s that are scaled down (or for :ref:`Label3D`\ s viewed from a long distance). @@ -3387,315 +3417,409 @@ MSDF font rendering can be combined with :ref:`gui/theme/default_font_generate_m \ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/default_font_subpixel_positioning: -- :ref:`int` **gui/theme/default_font_subpixel_positioning** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **gui/theme/default_font_subpixel_positioning** = ``1`` Default font glyph subpixel positioning mode. See :ref:`FontFile.subpixel_positioning`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/default_theme_scale: -- :ref:`float` **gui/theme/default_theme_scale** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **gui/theme/default_theme_scale** = ``1.0`` The default scale factor for :ref:`Control`\ s, when not overridden by a :ref:`Theme`. \ **Note:** This property is only read when the project starts. To change the default scale at runtime, set :ref:`ThemeDB.fallback_base_scale` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/theme/lcd_subpixel_layout: -- :ref:`int` **gui/theme/lcd_subpixel_layout** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **gui/theme/lcd_subpixel_layout** = ``1`` LCD subpixel layout used for font anti-aliasing. See :ref:`FontLCDSubpixelLayout`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec: -- :ref:`int` **gui/timers/incremental_search_max_interval_msec** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``2000`` | -+-----------+----------+ +:ref:`int` **gui/timers/incremental_search_max_interval_msec** = ``2000`` Timer setting for incremental search in :ref:`Tree`, :ref:`ItemList`, etc. controls (in milliseconds). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/timers/text_edit_idle_detect_sec: -- :ref:`float` **gui/timers/text_edit_idle_detect_sec** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`float` **gui/timers/text_edit_idle_detect_sec** = ``3`` Timer for detecting idle in :ref:`TextEdit` (in seconds). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_gui/timers/tooltip_delay_sec: -- :ref:`float` **gui/timers/tooltip_delay_sec** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **gui/timers/tooltip_delay_sec** = ``0.5`` Default delay for tooltips (in seconds). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_accept: -- :ref:`Dictionary` **input/ui_accept** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_accept** Default :ref:`InputEventAction` to confirm a focused button, menu or list item, or validate input. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_cancel: -- :ref:`Dictionary` **input/ui_cancel** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_cancel** Default :ref:`InputEventAction` to discard a modal or pending input. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_copy: -- :ref:`Dictionary` **input/ui_copy** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_copy** Default :ref:`InputEventAction` to copy a selection to the clipboard. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_cut: -- :ref:`Dictionary` **input/ui_cut** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_cut** Default :ref:`InputEventAction` to cut a selection to the clipboard. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_down: -- :ref:`Dictionary` **input/ui_down** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_down** Default :ref:`InputEventAction` to move down in the UI. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_end: -- :ref:`Dictionary` **input/ui_end** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_end** Default :ref:`InputEventAction` to go to the end position of a :ref:`Control` (e.g. last item in an :ref:`ItemList` or a :ref:`Tree`), matching the behavior of :ref:`@GlobalScope.KEY_END` on typical desktop UI systems. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_filedialog_refresh: -- :ref:`Dictionary` **input/ui_filedialog_refresh** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_filedialog_refresh** Default :ref:`InputEventAction` to refresh the contents of the current directory of a :ref:`FileDialog`. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_filedialog_show_hidden: -- :ref:`Dictionary` **input/ui_filedialog_show_hidden** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_filedialog_show_hidden** Default :ref:`InputEventAction` to toggle showing hidden files and directories in a :ref:`FileDialog`. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_filedialog_up_one_level: -- :ref:`Dictionary` **input/ui_filedialog_up_one_level** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_filedialog_up_one_level** Default :ref:`InputEventAction` to go up one directory in a :ref:`FileDialog`. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_focus_next: -- :ref:`Dictionary` **input/ui_focus_next** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_focus_next** Default :ref:`InputEventAction` to focus the next :ref:`Control` in the scene. The focus behavior can be configured via :ref:`Control.focus_next`. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_focus_prev: -- :ref:`Dictionary` **input/ui_focus_prev** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_focus_prev** Default :ref:`InputEventAction` to focus the previous :ref:`Control` in the scene. The focus behavior can be configured via :ref:`Control.focus_previous`. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_graph_delete: -- :ref:`Dictionary` **input/ui_graph_delete** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_graph_delete** Default :ref:`InputEventAction` to delete a :ref:`GraphNode` in a :ref:`GraphEdit`. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_graph_duplicate: -- :ref:`Dictionary` **input/ui_graph_duplicate** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_graph_duplicate** Default :ref:`InputEventAction` to duplicate a :ref:`GraphNode` in a :ref:`GraphEdit`. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_home: -- :ref:`Dictionary` **input/ui_home** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_home** Default :ref:`InputEventAction` to go to the start position of a :ref:`Control` (e.g. first item in an :ref:`ItemList` or a :ref:`Tree`), matching the behavior of :ref:`@GlobalScope.KEY_HOME` on typical desktop UI systems. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_left: -- :ref:`Dictionary` **input/ui_left** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_left** Default :ref:`InputEventAction` to move left in the UI. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_menu: -- :ref:`Dictionary` **input/ui_menu** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_menu** Default :ref:`InputEventAction` to open a context menu in a text field. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_page_down: -- :ref:`Dictionary` **input/ui_page_down** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_page_down** Default :ref:`InputEventAction` to go down a page in a :ref:`Control` (e.g. in an :ref:`ItemList` or a :ref:`Tree`), matching the behavior of :ref:`@GlobalScope.KEY_PAGEDOWN` on typical desktop UI systems. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_page_up: -- :ref:`Dictionary` **input/ui_page_up** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_page_up** Default :ref:`InputEventAction` to go up a page in a :ref:`Control` (e.g. in an :ref:`ItemList` or a :ref:`Tree`), matching the behavior of :ref:`@GlobalScope.KEY_PAGEUP` on typical desktop UI systems. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_paste: -- :ref:`Dictionary` **input/ui_paste** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_paste** Default :ref:`InputEventAction` to paste from the clipboard. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_redo: -- :ref:`Dictionary` **input/ui_redo** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_redo** Default :ref:`InputEventAction` to redo an undone action. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_right: -- :ref:`Dictionary` **input/ui_right** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_right** Default :ref:`InputEventAction` to move right in the UI. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_select: -- :ref:`Dictionary` **input/ui_select** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_select** Default :ref:`InputEventAction` to select an item in a :ref:`Control` (e.g. in an :ref:`ItemList` or a :ref:`Tree`). \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_swap_input_direction: -- :ref:`Dictionary` **input/ui_swap_input_direction** +.. rst-class:: classref-property -.. container:: contribute +:ref:`Dictionary` **input/ui_swap_input_direction** - There is currently no description for this property. Please help us by :ref:`contributing one `! +Default :ref:`InputEventAction` to swap input direction, i.e. change between left-to-right to right-to-left modes. Affects text-editting controls (:ref:`LineEdit`, :ref:`TextEdit`). + +.. rst-class:: classref-item-separator ---- .. _class_ProjectSettings_property_input/ui_text_add_selection_for_next_occurrence: -- :ref:`Dictionary` **input/ui_text_add_selection_for_next_occurrence** +.. rst-class:: classref-property + +:ref:`Dictionary` **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. @@ -3707,257 +3831,369 @@ 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`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_backspace: -- :ref:`Dictionary` **input/ui_text_backspace** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_backspace** Default :ref:`InputEventAction` to delete the character before the text cursor. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_backspace_all_to_left: -- :ref:`Dictionary` **input/ui_text_backspace_all_to_left** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_backspace_all_to_left** Default :ref:`InputEventAction` to delete **all** text before the text cursor. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_backspace_all_to_left.macos: -- :ref:`Dictionary` **input/ui_text_backspace_all_to_left.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_backspace_all_to_left.macos** macOS specific override for the shortcut to delete all text before the text cursor. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_backspace_word: -- :ref:`Dictionary` **input/ui_text_backspace_word** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_backspace_word** Default :ref:`InputEventAction` to delete all characters before the cursor up until a whitespace or punctuation character. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_backspace_word.macos: -- :ref:`Dictionary` **input/ui_text_backspace_word.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_backspace_word.macos** macOS specific override for the shortcut to delete a word. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_add_above: -- :ref:`Dictionary` **input/ui_text_caret_add_above** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_add_above** Default :ref:`InputEventAction` to add an additional caret above every caret of a text +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_add_above.macos: -- :ref:`Dictionary` **input/ui_text_caret_add_above.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_add_above.macos** macOS specific override for the shortcut to add a caret above every caret +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_add_below: -- :ref:`Dictionary` **input/ui_text_caret_add_below** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_add_below** Default :ref:`InputEventAction` to add an additional caret below every caret of a text +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_add_below.macos: -- :ref:`Dictionary` **input/ui_text_caret_add_below.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_add_below.macos** macOS specific override for the shortcut to add a caret below every caret +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_document_end: -- :ref:`Dictionary` **input/ui_text_caret_document_end** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_document_end** Default :ref:`InputEventAction` to move the text cursor the the end of the text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_document_end.macos: -- :ref:`Dictionary` **input/ui_text_caret_document_end.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_document_end.macos** macOS specific override for the shortcut to move the text cursor to the end of the text. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_document_start: -- :ref:`Dictionary` **input/ui_text_caret_document_start** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_document_start** Default :ref:`InputEventAction` to move the text cursor to the start of the text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_document_start.macos: -- :ref:`Dictionary` **input/ui_text_caret_document_start.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_document_start.macos** macOS specific override for the shortcut to move the text cursor to the start of the text. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_down: -- :ref:`Dictionary` **input/ui_text_caret_down** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_down** Default :ref:`InputEventAction` to move the text cursor down. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_left: -- :ref:`Dictionary` **input/ui_text_caret_left** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_left** Default :ref:`InputEventAction` to move the text cursor left. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_line_end: -- :ref:`Dictionary` **input/ui_text_caret_line_end** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_line_end** Default :ref:`InputEventAction` to move the text cursor to the end of the line. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_line_end.macos: -- :ref:`Dictionary` **input/ui_text_caret_line_end.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_line_end.macos** macOS specific override for the shortcut to move the text cursor to the end of the line. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_line_start: -- :ref:`Dictionary` **input/ui_text_caret_line_start** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_line_start** Default :ref:`InputEventAction` to move the text cursor to the start of the line. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_line_start.macos: -- :ref:`Dictionary` **input/ui_text_caret_line_start.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_line_start.macos** macOS specific override for the shortcut to move the text cursor to the start of the line. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_page_down: -- :ref:`Dictionary` **input/ui_text_caret_page_down** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_page_down** Default :ref:`InputEventAction` to move the text cursor down one page. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_page_up: -- :ref:`Dictionary` **input/ui_text_caret_page_up** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_page_up** Default :ref:`InputEventAction` to move the text cursor up one page. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_right: -- :ref:`Dictionary` **input/ui_text_caret_right** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_right** Default :ref:`InputEventAction` to move the text cursor right. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_up: -- :ref:`Dictionary` **input/ui_text_caret_up** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_up** Default :ref:`InputEventAction` to move the text cursor up. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_word_left: -- :ref:`Dictionary` **input/ui_text_caret_word_left** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_word_left** Default :ref:`InputEventAction` to move the text cursor left to the next whitespace or punctuation. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_word_left.macos: -- :ref:`Dictionary` **input/ui_text_caret_word_left.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_word_left.macos** macOS specific override for the shortcut to move the text cursor back one word. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_word_right: -- :ref:`Dictionary` **input/ui_text_caret_word_right** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_word_right** Default :ref:`InputEventAction` to move the text cursor right to the next whitespace or punctuation. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_caret_word_right.macos: -- :ref:`Dictionary` **input/ui_text_caret_word_right.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_caret_word_right.macos** macOS specific override for the shortcut to move the text cursor forward one word. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_clear_carets_and_selection: -- :ref:`Dictionary` **input/ui_text_clear_carets_and_selection** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_clear_carets_and_selection** If there's only one caret active and with a selection, clears the selection. @@ -3965,237 +4201,329 @@ In case there's more than one caret active, removes the secondary carets and cle \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_completion_accept: -- :ref:`Dictionary` **input/ui_text_completion_accept** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_completion_accept** Default :ref:`InputEventAction` to accept an autocompetion hint. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_completion_query: -- :ref:`Dictionary` **input/ui_text_completion_query** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_completion_query** Default :ref:`InputEventAction` to request autocompetion. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_completion_replace: -- :ref:`Dictionary` **input/ui_text_completion_replace** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_completion_replace** Default :ref:`InputEventAction` to accept an autocompetion hint, replacing existing text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_dedent: -- :ref:`Dictionary` **input/ui_text_dedent** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_dedent** Default :ref:`InputEventAction` to unindent text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_delete: -- :ref:`Dictionary` **input/ui_text_delete** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_delete** Default :ref:`InputEventAction` to delete the character after the text cursor. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_delete_all_to_right: -- :ref:`Dictionary` **input/ui_text_delete_all_to_right** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_delete_all_to_right** Default :ref:`InputEventAction` to delete **all** text after the text cursor. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_delete_all_to_right.macos: -- :ref:`Dictionary` **input/ui_text_delete_all_to_right.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_delete_all_to_right.macos** macOS specific override for the shortcut to delete all text after the text cursor. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_delete_word: -- :ref:`Dictionary` **input/ui_text_delete_word** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_delete_word** Default :ref:`InputEventAction` to delete all characters after the cursor up until a whitespace or punctuation character. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_delete_word.macos: -- :ref:`Dictionary` **input/ui_text_delete_word.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_delete_word.macos** macOS specific override for the shortcut to delete a word after the text cursor. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_indent: -- :ref:`Dictionary` **input/ui_text_indent** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_indent** Default :ref:`InputEventAction` to indent the current line. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_newline: -- :ref:`Dictionary` **input/ui_text_newline** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_newline** Default :ref:`InputEventAction` to insert a new line at the position of the text cursor. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_newline_above: -- :ref:`Dictionary` **input/ui_text_newline_above** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_newline_above** Default :ref:`InputEventAction` to insert a new line before the current one. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_newline_blank: -- :ref:`Dictionary` **input/ui_text_newline_blank** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_newline_blank** Default :ref:`InputEventAction` to insert a new line after the current one. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_scroll_down: -- :ref:`Dictionary` **input/ui_text_scroll_down** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_scroll_down** Default :ref:`InputEventAction` to scroll down one line of text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_scroll_down.macos: -- :ref:`Dictionary` **input/ui_text_scroll_down.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_scroll_down.macos** macOS specific override for the shortcut to scroll down one line. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_scroll_up: -- :ref:`Dictionary` **input/ui_text_scroll_up** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_scroll_up** Default :ref:`InputEventAction` to scroll up one line of text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_scroll_up.macos: -- :ref:`Dictionary` **input/ui_text_scroll_up.macos** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_scroll_up.macos** macOS specific override for the shortcut to scroll up one line. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_select_all: -- :ref:`Dictionary` **input/ui_text_select_all** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_select_all** Default :ref:`InputEventAction` to select all text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_select_word_under_caret: -- :ref:`Dictionary` **input/ui_text_select_word_under_caret** +.. rst-class:: classref-property + +:ref:`Dictionary` **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. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_submit: -- :ref:`Dictionary` **input/ui_text_submit** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_submit** Default :ref:`InputEventAction` to submit a text field. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_text_toggle_insert_mode: -- :ref:`Dictionary` **input/ui_text_toggle_insert_mode** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_text_toggle_insert_mode** Default :ref:`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. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_undo: -- :ref:`Dictionary` **input/ui_undo** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_undo** Default :ref:`InputEventAction` to undo the most recent action. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input/ui_up: -- :ref:`Dictionary` **input/ui_up** +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_up** Default :ref:`InputEventAction` to move up in the UI. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input_devices/buffering/agile_event_flushing: -- :ref:`bool` **input_devices/buffering/agile_event_flushing** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **input_devices/buffering/agile_event_flushing** = ``false`` If ``true``, key/touch/joystick events will be flushed just before every idle and physics frame. @@ -4205,81 +4533,89 @@ Enabling this can greatly improve the responsiveness to input, specially in devi \ **Note:** Currently implemented only on Android. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input_devices/pen_tablet/driver: -- :ref:`String` **input_devices/pen_tablet/driver** +.. rst-class:: classref-property + +:ref:`String` **input_devices/pen_tablet/driver** Specifies the tablet driver to use. If left empty, the default driver will be used. \ **Note:** The driver in use can be overridden at runtime via the ``--tablet-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input_devices/pen_tablet/driver.windows: -- :ref:`String` **input_devices/pen_tablet/driver.windows** +.. rst-class:: classref-property + +:ref:`String` **input_devices/pen_tablet/driver.windows** Override for :ref:`input_devices/pen_tablet/driver` on Windows. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input_devices/pointing/emulate_mouse_from_touch: -- :ref:`bool` **input_devices/pointing/emulate_mouse_from_touch** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **input_devices/pointing/emulate_mouse_from_touch** = ``true`` If ``true``, sends mouse input events when tapping or swiping on the touchscreen. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse: -- :ref:`bool` **input_devices/pointing/emulate_touch_from_mouse** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **input_devices/pointing/emulate_touch_from_mouse** = ``false`` If ``true``, sends touch input events when clicking or dragging the mouse. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_input_devices/pointing/ios/touch_delay: -- :ref:`float` **input_devices/pointing/ios/touch_delay** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.15`` | -+-----------+----------+ +:ref:`float` **input_devices/pointing/ios/touch_delay** = ``0.15`` Default delay for touch events. This only affects iOS devices. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/locale/fallback: -- :ref:`String` **internationalization/locale/fallback** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``"en"`` | -+-----------+----------+ +:ref:`String` **internationalization/locale/fallback** = ``"en"`` The locale to fall back to if a translation isn't available in a given language. If left empty, ``en`` (English) will be used. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/locale/include_text_server_data: -- :ref:`bool` **internationalization/locale/include_text_server_data** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **internationalization/locale/include_text_server_data** = ``false`` If ``true``, text server break iteration rule sets, dictionaries and other optional data are included in the exported project. @@ -4287,165 +4623,173 @@ If ``true``, text server break iteration rule sets, dictionaries and other optio \ **Note:** "Fallback" text server does not use additional data. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/locale/test: -- :ref:`String` **internationalization/locale/test** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **internationalization/locale/test** = ``""`` If non-empty, this locale will be used when running the project from the editor. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/locale/translation_remaps: -- :ref:`PackedStringArray` **internationalization/locale/translation_remaps** +.. rst-class:: classref-property + +:ref:`PackedStringArray` **internationalization/locale/translation_remaps** Locale-dependent resource remaps. Edit them in the "Localization" tab of Project Settings editor. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/locale/translations: -- :ref:`PackedStringArray` **internationalization/locale/translations** +.. rst-class:: classref-property + +:ref:`PackedStringArray` **internationalization/locale/translations** List of translation files available in the project. Edit them in the "Localization" tab of Project Settings editor. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/double_vowels: -- :ref:`bool` **internationalization/pseudolocalization/double_vowels** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **internationalization/pseudolocalization/double_vowels** = ``false`` Double vowels in strings during pseudolocalization to simulate the lengthening of text due to localization. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/expansion_ratio: -- :ref:`float` **internationalization/pseudolocalization/expansion_ratio** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **internationalization/pseudolocalization/expansion_ratio** = ``0.0`` 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%. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/fake_bidi: -- :ref:`bool` **internationalization/pseudolocalization/fake_bidi** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **internationalization/pseudolocalization/fake_bidi** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/override: -- :ref:`bool` **internationalization/pseudolocalization/override** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **internationalization/pseudolocalization/override** = ``false`` Replace all characters in the string with ``*``. Useful for finding non-localizable strings. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/prefix: -- :ref:`String` **internationalization/pseudolocalization/prefix** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``"["`` | -+-----------+---------+ +:ref:`String` **internationalization/pseudolocalization/prefix** = ``"["`` Prefix that will be prepended to the pseudolocalized string. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/replace_with_accents: -- :ref:`bool` **internationalization/pseudolocalization/replace_with_accents** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **internationalization/pseudolocalization/replace_with_accents** = ``true`` Replace all characters with their accented variants during pseudolocalization. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/skip_placeholders: -- :ref:`bool` **internationalization/pseudolocalization/skip_placeholders** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **internationalization/pseudolocalization/skip_placeholders** = ``true`` Skip placeholders for string formatting like ``%s`` or ``%f`` during pseudolocalization. Useful to identify strings which need additional control characters to display correctly. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/suffix: -- :ref:`String` **internationalization/pseudolocalization/suffix** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``"]"`` | -+-----------+---------+ +:ref:`String` **internationalization/pseudolocalization/suffix** = ``"]"`` Suffix that will be appended to the pseudolocalized string. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/pseudolocalization/use_pseudolocalization: -- :ref:`bool` **internationalization/pseudolocalization/use_pseudolocalization** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **internationalization/pseudolocalization/use_pseudolocalization** = ``false`` 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. \ **Note:** This property is only read when the project starts. To toggle pseudolocalization at run-time, use :ref:`TranslationServer.pseudolocalization_enabled` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/rendering/force_right_to_left_layout_direction: -- :ref:`bool` **internationalization/rendering/force_right_to_left_layout_direction** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **internationalization/rendering/force_right_to_left_layout_direction** = ``false`` Force layout direction and text writing direction to RTL for all locales. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_internationalization/rendering/text_driver: -- :ref:`String` **internationalization/rendering/text_driver** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **internationalization/rendering/text_driver** = ``""`` Specifies the :ref:`TextServer` to use. If left empty, the default will be used. @@ -4455,2263 +4799,2263 @@ Specifies the :ref:`TextServer` to use. If left empty, the def \ **Note:** There is an additional ``Dummy`` text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the ``--text-driver Dummy`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_1: -- :ref:`String` **layer_names/2d_navigation/layer_1** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_1** = ``""`` Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_10: -- :ref:`String` **layer_names/2d_navigation/layer_10** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_10** = ``""`` Optional name for the 2D navigation layer 10. If left empty, the layer will display as "Layer 10". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_11: -- :ref:`String` **layer_names/2d_navigation/layer_11** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_11** = ``""`` Optional name for the 2D navigation layer 11. If left empty, the layer will display as "Layer 11". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_12: -- :ref:`String` **layer_names/2d_navigation/layer_12** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_12** = ``""`` Optional name for the 2D navigation layer 12. If left empty, the layer will display as "Layer 12". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_13: -- :ref:`String` **layer_names/2d_navigation/layer_13** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_13** = ``""`` Optional name for the 2D navigation layer 13. If left empty, the layer will display as "Layer 13". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_14: -- :ref:`String` **layer_names/2d_navigation/layer_14** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_14** = ``""`` Optional name for the 2D navigation layer 14. If left empty, the layer will display as "Layer 14". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_15: -- :ref:`String` **layer_names/2d_navigation/layer_15** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_15** = ``""`` Optional name for the 2D navigation layer 15. If left empty, the layer will display as "Layer 15". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_16: -- :ref:`String` **layer_names/2d_navigation/layer_16** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_16** = ``""`` Optional name for the 2D navigation layer 16. If left empty, the layer will display as "Layer 16". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_17: -- :ref:`String` **layer_names/2d_navigation/layer_17** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_17** = ``""`` Optional name for the 2D navigation layer 17. If left empty, the layer will display as "Layer 17". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_18: -- :ref:`String` **layer_names/2d_navigation/layer_18** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_18** = ``""`` Optional name for the 2D navigation layer 18. If left empty, the layer will display as "Layer 18". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_19: -- :ref:`String` **layer_names/2d_navigation/layer_19** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_19** = ``""`` Optional name for the 2D navigation layer 19. If left empty, the layer will display as "Layer 19". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_2: -- :ref:`String` **layer_names/2d_navigation/layer_2** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_2** = ``""`` Optional name for the 2D navigation layer 2. If left empty, the layer will display as "Layer 2". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_20: -- :ref:`String` **layer_names/2d_navigation/layer_20** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_20** = ``""`` Optional name for the 2D navigation layer 20. If left empty, the layer will display as "Layer 20". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_21: -- :ref:`String` **layer_names/2d_navigation/layer_21** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_21** = ``""`` Optional name for the 2D navigation layer 21. If left empty, the layer will display as "Layer 21". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_22: -- :ref:`String` **layer_names/2d_navigation/layer_22** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_22** = ``""`` Optional name for the 2D navigation layer 22. If left empty, the layer will display as "Layer 22". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_23: -- :ref:`String` **layer_names/2d_navigation/layer_23** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_23** = ``""`` Optional name for the 2D navigation layer 23. If left empty, the layer will display as "Layer 23". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_24: -- :ref:`String` **layer_names/2d_navigation/layer_24** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_24** = ``""`` Optional name for the 2D navigation layer 24. If left empty, the layer will display as "Layer 24". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_25: -- :ref:`String` **layer_names/2d_navigation/layer_25** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_25** = ``""`` Optional name for the 2D navigation layer 25. If left empty, the layer will display as "Layer 25". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_26: -- :ref:`String` **layer_names/2d_navigation/layer_26** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_26** = ``""`` Optional name for the 2D navigation layer 26. If left empty, the layer will display as "Layer 26". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_27: -- :ref:`String` **layer_names/2d_navigation/layer_27** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_27** = ``""`` Optional name for the 2D navigation layer 27. If left empty, the layer will display as "Layer 27". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_28: -- :ref:`String` **layer_names/2d_navigation/layer_28** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_28** = ``""`` Optional name for the 2D navigation layer 28. If left empty, the layer will display as "Layer 28". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_29: -- :ref:`String` **layer_names/2d_navigation/layer_29** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_29** = ``""`` Optional name for the 2D navigation layer 29. If left empty, the layer will display as "Layer 29". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_3: -- :ref:`String` **layer_names/2d_navigation/layer_3** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_3** = ``""`` Optional name for the 2D navigation layer 3. If left empty, the layer will display as "Layer 3". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_30: -- :ref:`String` **layer_names/2d_navigation/layer_30** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_30** = ``""`` Optional name for the 2D navigation layer 30. If left empty, the layer will display as "Layer 30". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_31: -- :ref:`String` **layer_names/2d_navigation/layer_31** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_31** = ``""`` Optional name for the 2D navigation layer 31. If left empty, the layer will display as "Layer 31". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_32: -- :ref:`String` **layer_names/2d_navigation/layer_32** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_32** = ``""`` Optional name for the 2D navigation layer 32. If left empty, the layer will display as "Layer 32". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_4: -- :ref:`String` **layer_names/2d_navigation/layer_4** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_4** = ``""`` Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_5: -- :ref:`String` **layer_names/2d_navigation/layer_5** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_5** = ``""`` Optional name for the 2D navigation layer 5. If left empty, the layer will display as "Layer 5". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_6: -- :ref:`String` **layer_names/2d_navigation/layer_6** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_6** = ``""`` Optional name for the 2D navigation layer 6. If left empty, the layer will display as "Layer 6". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_7: -- :ref:`String` **layer_names/2d_navigation/layer_7** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_7** = ``""`` Optional name for the 2D navigation layer 7. If left empty, the layer will display as "Layer 7". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_8: -- :ref:`String` **layer_names/2d_navigation/layer_8** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_8** = ``""`` Optional name for the 2D navigation layer 8. If left empty, the layer will display as "Layer 8". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_navigation/layer_9: -- :ref:`String` **layer_names/2d_navigation/layer_9** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_navigation/layer_9** = ``""`` Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_1: -- :ref:`String` **layer_names/2d_physics/layer_1** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_1** = ``""`` Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_10: -- :ref:`String` **layer_names/2d_physics/layer_10** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_10** = ``""`` Optional name for the 2D physics layer 10. If left empty, the layer will display as "Layer 10". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_11: -- :ref:`String` **layer_names/2d_physics/layer_11** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_11** = ``""`` Optional name for the 2D physics layer 11. If left empty, the layer will display as "Layer 11". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_12: -- :ref:`String` **layer_names/2d_physics/layer_12** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_12** = ``""`` Optional name for the 2D physics layer 12. If left empty, the layer will display as "Layer 12". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_13: -- :ref:`String` **layer_names/2d_physics/layer_13** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_13** = ``""`` Optional name for the 2D physics layer 13. If left empty, the layer will display as "Layer 13". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_14: -- :ref:`String` **layer_names/2d_physics/layer_14** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_14** = ``""`` Optional name for the 2D physics layer 14. If left empty, the layer will display as "Layer 14". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_15: -- :ref:`String` **layer_names/2d_physics/layer_15** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_15** = ``""`` Optional name for the 2D physics layer 15. If left empty, the layer will display as "Layer 15". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_16: -- :ref:`String` **layer_names/2d_physics/layer_16** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_16** = ``""`` Optional name for the 2D physics layer 16. If left empty, the layer will display as "Layer 16". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_17: -- :ref:`String` **layer_names/2d_physics/layer_17** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_17** = ``""`` Optional name for the 2D physics layer 17. If left empty, the layer will display as "Layer 17". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_18: -- :ref:`String` **layer_names/2d_physics/layer_18** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_18** = ``""`` Optional name for the 2D physics layer 18. If left empty, the layer will display as "Layer 18". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_19: -- :ref:`String` **layer_names/2d_physics/layer_19** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_19** = ``""`` Optional name for the 2D physics layer 19. If left empty, the layer will display as "Layer 19". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_2: -- :ref:`String` **layer_names/2d_physics/layer_2** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_2** = ``""`` Optional name for the 2D physics layer 2. If left empty, the layer will display as "Layer 2". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_20: -- :ref:`String` **layer_names/2d_physics/layer_20** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_20** = ``""`` Optional name for the 2D physics layer 20. If left empty, the layer will display as "Layer 20". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_21: -- :ref:`String` **layer_names/2d_physics/layer_21** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_21** = ``""`` Optional name for the 2D physics layer 21. If left empty, the layer will display as "Layer 21". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_22: -- :ref:`String` **layer_names/2d_physics/layer_22** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_22** = ``""`` Optional name for the 2D physics layer 22. If left empty, the layer will display as "Layer 22". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_23: -- :ref:`String` **layer_names/2d_physics/layer_23** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_23** = ``""`` Optional name for the 2D physics layer 23. If left empty, the layer will display as "Layer 23". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_24: -- :ref:`String` **layer_names/2d_physics/layer_24** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_24** = ``""`` Optional name for the 2D physics layer 24. If left empty, the layer will display as "Layer 24". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_25: -- :ref:`String` **layer_names/2d_physics/layer_25** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_25** = ``""`` Optional name for the 2D physics layer 25. If left empty, the layer will display as "Layer 25". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_26: -- :ref:`String` **layer_names/2d_physics/layer_26** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_26** = ``""`` Optional name for the 2D physics layer 26. If left empty, the layer will display as "Layer 26". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_27: -- :ref:`String` **layer_names/2d_physics/layer_27** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_27** = ``""`` Optional name for the 2D physics layer 27. If left empty, the layer will display as "Layer 27". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_28: -- :ref:`String` **layer_names/2d_physics/layer_28** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_28** = ``""`` Optional name for the 2D physics layer 28. If left empty, the layer will display as "Layer 28". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_29: -- :ref:`String` **layer_names/2d_physics/layer_29** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_29** = ``""`` Optional name for the 2D physics layer 29. If left empty, the layer will display as "Layer 29". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_3: -- :ref:`String` **layer_names/2d_physics/layer_3** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_3** = ``""`` Optional name for the 2D physics layer 3. If left empty, the layer will display as "Layer 3". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_30: -- :ref:`String` **layer_names/2d_physics/layer_30** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_30** = ``""`` Optional name for the 2D physics layer 30. If left empty, the layer will display as "Layer 30". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_31: -- :ref:`String` **layer_names/2d_physics/layer_31** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_31** = ``""`` Optional name for the 2D physics layer 31. If left empty, the layer will display as "Layer 31". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_32: -- :ref:`String` **layer_names/2d_physics/layer_32** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_32** = ``""`` Optional name for the 2D physics layer 32. If left empty, the layer will display as "Layer 32". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_4: -- :ref:`String` **layer_names/2d_physics/layer_4** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_4** = ``""`` Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_5: -- :ref:`String` **layer_names/2d_physics/layer_5** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_5** = ``""`` Optional name for the 2D physics layer 5. If left empty, the layer will display as "Layer 5". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_6: -- :ref:`String` **layer_names/2d_physics/layer_6** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_6** = ``""`` Optional name for the 2D physics layer 6. If left empty, the layer will display as "Layer 6". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_7: -- :ref:`String` **layer_names/2d_physics/layer_7** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_7** = ``""`` Optional name for the 2D physics layer 7. If left empty, the layer will display as "Layer 7". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_8: -- :ref:`String` **layer_names/2d_physics/layer_8** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_8** = ``""`` Optional name for the 2D physics layer 8. If left empty, the layer will display as "Layer 8". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_physics/layer_9: -- :ref:`String` **layer_names/2d_physics/layer_9** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_physics/layer_9** = ``""`` Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_1: -- :ref:`String` **layer_names/2d_render/layer_1** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_1** = ``""`` Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_10: -- :ref:`String` **layer_names/2d_render/layer_10** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_10** = ``""`` Optional name for the 2D render layer 10. If left empty, the layer will display as "Layer 10". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_11: -- :ref:`String` **layer_names/2d_render/layer_11** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_11** = ``""`` Optional name for the 2D render layer 11. If left empty, the layer will display as "Layer 11". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_12: -- :ref:`String` **layer_names/2d_render/layer_12** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_12** = ``""`` Optional name for the 2D render layer 12. If left empty, the layer will display as "Layer 12". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_13: -- :ref:`String` **layer_names/2d_render/layer_13** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_13** = ``""`` Optional name for the 2D render layer 13. If left empty, the layer will display as "Layer 13". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_14: -- :ref:`String` **layer_names/2d_render/layer_14** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_14** = ``""`` Optional name for the 2D render layer 14. If left empty, the layer will display as "Layer 14". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_15: -- :ref:`String` **layer_names/2d_render/layer_15** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_15** = ``""`` Optional name for the 2D render layer 15. If left empty, the layer will display as "Layer 15". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_16: -- :ref:`String` **layer_names/2d_render/layer_16** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_16** = ``""`` Optional name for the 2D render layer 16. If left empty, the layer will display as "Layer 16". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_17: -- :ref:`String` **layer_names/2d_render/layer_17** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_17** = ``""`` Optional name for the 2D render layer 17. If left empty, the layer will display as "Layer 17". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_18: -- :ref:`String` **layer_names/2d_render/layer_18** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_18** = ``""`` Optional name for the 2D render layer 18. If left empty, the layer will display as "Layer 18". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_19: -- :ref:`String` **layer_names/2d_render/layer_19** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_19** = ``""`` Optional name for the 2D render layer 19. If left empty, the layer will display as "Layer 19". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_2: -- :ref:`String` **layer_names/2d_render/layer_2** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_2** = ``""`` Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_20: -- :ref:`String` **layer_names/2d_render/layer_20** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_20** = ``""`` Optional name for the 2D render layer 20. If left empty, the layer will display as "Layer 20". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_3: -- :ref:`String` **layer_names/2d_render/layer_3** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_3** = ``""`` Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_4: -- :ref:`String` **layer_names/2d_render/layer_4** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_4** = ``""`` Optional name for the 2D render layer 4. If left empty, the layer will display as "Layer 4". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_5: -- :ref:`String` **layer_names/2d_render/layer_5** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_5** = ``""`` Optional name for the 2D render layer 5. If left empty, the layer will display as "Layer 5". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_6: -- :ref:`String` **layer_names/2d_render/layer_6** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_6** = ``""`` Optional name for the 2D render layer 6. If left empty, the layer will display as "Layer 6". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_7: -- :ref:`String` **layer_names/2d_render/layer_7** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_7** = ``""`` Optional name for the 2D render layer 7. If left empty, the layer will display as "Layer 7". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_8: -- :ref:`String` **layer_names/2d_render/layer_8** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_8** = ``""`` Optional name for the 2D render layer 8. If left empty, the layer will display as "Layer 8". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/2d_render/layer_9: -- :ref:`String` **layer_names/2d_render/layer_9** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/2d_render/layer_9** = ``""`` Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_1: -- :ref:`String` **layer_names/3d_navigation/layer_1** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_1** = ``""`` Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_10: -- :ref:`String` **layer_names/3d_navigation/layer_10** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_10** = ``""`` Optional name for the 3D navigation layer 10. If left empty, the layer will display as "Layer 10". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_11: -- :ref:`String` **layer_names/3d_navigation/layer_11** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_11** = ``""`` Optional name for the 3D navigation layer 11. If left empty, the layer will display as "Layer 11". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_12: -- :ref:`String` **layer_names/3d_navigation/layer_12** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_12** = ``""`` Optional name for the 3D navigation layer 12. If left empty, the layer will display as "Layer 12". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_13: -- :ref:`String` **layer_names/3d_navigation/layer_13** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_13** = ``""`` Optional name for the 3D navigation layer 13. If left empty, the layer will display as "Layer 13". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_14: -- :ref:`String` **layer_names/3d_navigation/layer_14** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_14** = ``""`` Optional name for the 3D navigation layer 14. If left empty, the layer will display as "Layer 14". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_15: -- :ref:`String` **layer_names/3d_navigation/layer_15** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_15** = ``""`` Optional name for the 3D navigation layer 15. If left empty, the layer will display as "Layer 15". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_16: -- :ref:`String` **layer_names/3d_navigation/layer_16** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_16** = ``""`` Optional name for the 3D navigation layer 16. If left empty, the layer will display as "Layer 16". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_17: -- :ref:`String` **layer_names/3d_navigation/layer_17** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_17** = ``""`` Optional name for the 3D navigation layer 17. If left empty, the layer will display as "Layer 17". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_18: -- :ref:`String` **layer_names/3d_navigation/layer_18** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_18** = ``""`` Optional name for the 3D navigation layer 18. If left empty, the layer will display as "Layer 18". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_19: -- :ref:`String` **layer_names/3d_navigation/layer_19** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_19** = ``""`` Optional name for the 3D navigation layer 19. If left empty, the layer will display as "Layer 19". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_2: -- :ref:`String` **layer_names/3d_navigation/layer_2** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_2** = ``""`` Optional name for the 3D navigation layer 2. If left empty, the layer will display as "Layer 2". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_20: -- :ref:`String` **layer_names/3d_navigation/layer_20** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_20** = ``""`` Optional name for the 3D navigation layer 20. If left empty, the layer will display as "Layer 20". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_21: -- :ref:`String` **layer_names/3d_navigation/layer_21** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_21** = ``""`` Optional name for the 3D navigation layer 21. If left empty, the layer will display as "Layer 21". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_22: -- :ref:`String` **layer_names/3d_navigation/layer_22** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_22** = ``""`` Optional name for the 3D navigation layer 22. If left empty, the layer will display as "Layer 22". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_23: -- :ref:`String` **layer_names/3d_navigation/layer_23** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_23** = ``""`` Optional name for the 3D navigation layer 23. If left empty, the layer will display as "Layer 23". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_24: -- :ref:`String` **layer_names/3d_navigation/layer_24** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_24** = ``""`` Optional name for the 3D navigation layer 24. If left empty, the layer will display as "Layer 24". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_25: -- :ref:`String` **layer_names/3d_navigation/layer_25** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_25** = ``""`` Optional name for the 3D navigation layer 25. If left empty, the layer will display as "Layer 25". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_26: -- :ref:`String` **layer_names/3d_navigation/layer_26** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_26** = ``""`` Optional name for the 3D navigation layer 26. If left empty, the layer will display as "Layer 26". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_27: -- :ref:`String` **layer_names/3d_navigation/layer_27** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_27** = ``""`` Optional name for the 3D navigation layer 27. If left empty, the layer will display as "Layer 27". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_28: -- :ref:`String` **layer_names/3d_navigation/layer_28** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_28** = ``""`` Optional name for the 3D navigation layer 28. If left empty, the layer will display as "Layer 28". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_29: -- :ref:`String` **layer_names/3d_navigation/layer_29** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_29** = ``""`` Optional name for the 3D navigation layer 29. If left empty, the layer will display as "Layer 29". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_3: -- :ref:`String` **layer_names/3d_navigation/layer_3** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_3** = ``""`` Optional name for the 3D navigation layer 3. If left empty, the layer will display as "Layer 3". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_30: -- :ref:`String` **layer_names/3d_navigation/layer_30** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_30** = ``""`` Optional name for the 3D navigation layer 30. If left empty, the layer will display as "Layer 30". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_31: -- :ref:`String` **layer_names/3d_navigation/layer_31** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_31** = ``""`` Optional name for the 3D navigation layer 31. If left empty, the layer will display as "Layer 31". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_32: -- :ref:`String` **layer_names/3d_navigation/layer_32** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_32** = ``""`` Optional name for the 3D navigation layer 32. If left empty, the layer will display as "Layer 32". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_4: -- :ref:`String` **layer_names/3d_navigation/layer_4** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_4** = ``""`` Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_5: -- :ref:`String` **layer_names/3d_navigation/layer_5** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_5** = ``""`` Optional name for the 3D navigation layer 5. If left empty, the layer will display as "Layer 5". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_6: -- :ref:`String` **layer_names/3d_navigation/layer_6** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_6** = ``""`` Optional name for the 3D navigation layer 6. If left empty, the layer will display as "Layer 6". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_7: -- :ref:`String` **layer_names/3d_navigation/layer_7** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_7** = ``""`` Optional name for the 3D navigation layer 7. If left empty, the layer will display as "Layer 7". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_8: -- :ref:`String` **layer_names/3d_navigation/layer_8** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_8** = ``""`` Optional name for the 3D navigation layer 8. If left empty, the layer will display as "Layer 8". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_navigation/layer_9: -- :ref:`String` **layer_names/3d_navigation/layer_9** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_navigation/layer_9** = ``""`` Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_1: -- :ref:`String` **layer_names/3d_physics/layer_1** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_1** = ``""`` Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_10: -- :ref:`String` **layer_names/3d_physics/layer_10** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_10** = ``""`` Optional name for the 3D physics layer 10. If left empty, the layer will display as "Layer 10". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_11: -- :ref:`String` **layer_names/3d_physics/layer_11** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_11** = ``""`` Optional name for the 3D physics layer 11. If left empty, the layer will display as "Layer 11". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_12: -- :ref:`String` **layer_names/3d_physics/layer_12** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_12** = ``""`` Optional name for the 3D physics layer 12. If left empty, the layer will display as "Layer 12". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_13: -- :ref:`String` **layer_names/3d_physics/layer_13** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_13** = ``""`` Optional name for the 3D physics layer 13. If left empty, the layer will display as "Layer 13". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_14: -- :ref:`String` **layer_names/3d_physics/layer_14** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_14** = ``""`` Optional name for the 3D physics layer 14. If left empty, the layer will display as "Layer 14". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_15: -- :ref:`String` **layer_names/3d_physics/layer_15** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_15** = ``""`` Optional name for the 3D physics layer 15. If left empty, the layer will display as "Layer 15". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_16: -- :ref:`String` **layer_names/3d_physics/layer_16** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_16** = ``""`` Optional name for the 3D physics layer 16. If left empty, the layer will display as "Layer 16". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_17: -- :ref:`String` **layer_names/3d_physics/layer_17** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_17** = ``""`` Optional name for the 3D physics layer 17. If left empty, the layer will display as "Layer 17". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_18: -- :ref:`String` **layer_names/3d_physics/layer_18** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_18** = ``""`` Optional name for the 3D physics layer 18. If left empty, the layer will display as "Layer 18". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_19: -- :ref:`String` **layer_names/3d_physics/layer_19** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_19** = ``""`` Optional name for the 3D physics layer 19. If left empty, the layer will display as "Layer 19". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_2: -- :ref:`String` **layer_names/3d_physics/layer_2** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_2** = ``""`` Optional name for the 3D physics layer 2. If left empty, the layer will display as "Layer 2". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_20: -- :ref:`String` **layer_names/3d_physics/layer_20** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_20** = ``""`` Optional name for the 3D physics layer 20. If left empty, the layer will display as "Layer 20". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_21: -- :ref:`String` **layer_names/3d_physics/layer_21** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_21** = ``""`` Optional name for the 3D physics layer 21. If left empty, the layer will display as "Layer 21". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_22: -- :ref:`String` **layer_names/3d_physics/layer_22** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_22** = ``""`` Optional name for the 3D physics layer 22. If left empty, the layer will display as "Layer 22". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_23: -- :ref:`String` **layer_names/3d_physics/layer_23** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_23** = ``""`` Optional name for the 3D physics layer 23. If left empty, the layer will display as "Layer 23". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_24: -- :ref:`String` **layer_names/3d_physics/layer_24** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_24** = ``""`` Optional name for the 3D physics layer 24. If left empty, the layer will display as "Layer 24". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_25: -- :ref:`String` **layer_names/3d_physics/layer_25** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_25** = ``""`` Optional name for the 3D physics layer 25. If left empty, the layer will display as "Layer 25". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_26: -- :ref:`String` **layer_names/3d_physics/layer_26** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_26** = ``""`` Optional name for the 3D physics layer 26. If left empty, the layer will display as "Layer 26". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_27: -- :ref:`String` **layer_names/3d_physics/layer_27** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_27** = ``""`` Optional name for the 3D physics layer 27. If left empty, the layer will display as "Layer 27". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_28: -- :ref:`String` **layer_names/3d_physics/layer_28** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_28** = ``""`` Optional name for the 3D physics layer 28. If left empty, the layer will display as "Layer 28". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_29: -- :ref:`String` **layer_names/3d_physics/layer_29** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_29** = ``""`` Optional name for the 3D physics layer 29. If left empty, the layer will display as "Layer 29". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_3: -- :ref:`String` **layer_names/3d_physics/layer_3** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_3** = ``""`` Optional name for the 3D physics layer 3. If left empty, the layer will display as "Layer 3". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_30: -- :ref:`String` **layer_names/3d_physics/layer_30** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_30** = ``""`` Optional name for the 3D physics layer 30. If left empty, the layer will display as "Layer 30". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_31: -- :ref:`String` **layer_names/3d_physics/layer_31** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_31** = ``""`` Optional name for the 3D physics layer 31. If left empty, the layer will display as "Layer 31". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_32: -- :ref:`String` **layer_names/3d_physics/layer_32** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_32** = ``""`` Optional name for the 3D physics layer 32. If left empty, the layer will display as "Layer 32". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_4: -- :ref:`String` **layer_names/3d_physics/layer_4** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_4** = ``""`` Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_5: -- :ref:`String` **layer_names/3d_physics/layer_5** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_5** = ``""`` Optional name for the 3D physics layer 5. If left empty, the layer will display as "Layer 5". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_6: -- :ref:`String` **layer_names/3d_physics/layer_6** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_6** = ``""`` Optional name for the 3D physics layer 6. If left empty, the layer will display as "Layer 6". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_7: -- :ref:`String` **layer_names/3d_physics/layer_7** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_7** = ``""`` Optional name for the 3D physics layer 7. If left empty, the layer will display as "Layer 7". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_8: -- :ref:`String` **layer_names/3d_physics/layer_8** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_8** = ``""`` Optional name for the 3D physics layer 8. If left empty, the layer will display as "Layer 8". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_physics/layer_9: -- :ref:`String` **layer_names/3d_physics/layer_9** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_physics/layer_9** = ``""`` Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_1: -- :ref:`String` **layer_names/3d_render/layer_1** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_1** = ``""`` Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_10: -- :ref:`String` **layer_names/3d_render/layer_10** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_10** = ``""`` Optional name for the 3D render layer 10. If left empty, the layer will display as "Layer 10". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_11: -- :ref:`String` **layer_names/3d_render/layer_11** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_11** = ``""`` Optional name for the 3D render layer 11. If left empty, the layer will display as "Layer 11". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_12: -- :ref:`String` **layer_names/3d_render/layer_12** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_12** = ``""`` Optional name for the 3D render layer 12. If left empty, the layer will display as "Layer 12". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_13: -- :ref:`String` **layer_names/3d_render/layer_13** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_13** = ``""`` Optional name for the 3D render layer 13. If left empty, the layer will display as "Layer 13". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_14: -- :ref:`String` **layer_names/3d_render/layer_14** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_14** = ``""`` Optional name for the 3D render layer 14. If left empty, the layer will display as "Layer 14" +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_15: -- :ref:`String` **layer_names/3d_render/layer_15** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_15** = ``""`` Optional name for the 3D render layer 15. If left empty, the layer will display as "Layer 15". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_16: -- :ref:`String` **layer_names/3d_render/layer_16** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_16** = ``""`` Optional name for the 3D render layer 16. If left empty, the layer will display as "Layer 16". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_17: -- :ref:`String` **layer_names/3d_render/layer_17** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_17** = ``""`` Optional name for the 3D render layer 17. If left empty, the layer will display as "Layer 17". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_18: -- :ref:`String` **layer_names/3d_render/layer_18** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_18** = ``""`` Optional name for the 3D render layer 18. If left empty, the layer will display as "Layer 18". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_19: -- :ref:`String` **layer_names/3d_render/layer_19** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_19** = ``""`` Optional name for the 3D render layer 19. If left empty, the layer will display as "Layer 19". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_2: -- :ref:`String` **layer_names/3d_render/layer_2** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_2** = ``""`` Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_20: -- :ref:`String` **layer_names/3d_render/layer_20** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_20** = ``""`` Optional name for the 3D render layer 20. If left empty, the layer will display as "Layer 20". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_3: -- :ref:`String` **layer_names/3d_render/layer_3** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_3** = ``""`` Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_4: -- :ref:`String` **layer_names/3d_render/layer_4** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_4** = ``""`` Optional name for the 3D render layer 4. If left empty, the layer will display as "Layer 4". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_5: -- :ref:`String` **layer_names/3d_render/layer_5** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_5** = ``""`` Optional name for the 3D render layer 5. If left empty, the layer will display as "Layer 5". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_6: -- :ref:`String` **layer_names/3d_render/layer_6** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_6** = ``""`` Optional name for the 3D render layer 6. If left empty, the layer will display as "Layer 6". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_7: -- :ref:`String` **layer_names/3d_render/layer_7** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_7** = ``""`` Optional name for the 3D render layer 7. If left empty, the layer will display as "Layer 7". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_8: -- :ref:`String` **layer_names/3d_render/layer_8** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_8** = ``""`` Optional name for the 3D render layer 8. If left empty, the layer will display as "Layer 8". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_layer_names/3d_render/layer_9: -- :ref:`String` **layer_names/3d_render/layer_9** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **layer_names/3d_render/layer_9** = ``""`` Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9". +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_memory/limits/message_queue/max_size_kb: -- :ref:`int` **memory/limits/message_queue/max_size_kb** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``4096`` | -+-----------+----------+ +:ref:`int` **memory/limits/message_queue/max_size_kb** = ``4096`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_memory/limits/multithreaded_server/rid_pool_prealloc: -- :ref:`int` **memory/limits/multithreaded_server/rid_pool_prealloc** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``60`` | -+-----------+--------+ +:ref:`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: -- :ref:`int` **navigation/2d/default_cell_size** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **navigation/2d/default_cell_size** = ``1`` Default cell size for 2D navigation maps. See :ref:`NavigationServer2D.map_set_cell_size`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_navigation/2d/default_edge_connection_margin: -- :ref:`int` **navigation/2d/default_edge_connection_margin** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **navigation/2d/default_edge_connection_margin** = ``1`` Default edge connection margin for 2D navigation maps. See :ref:`NavigationServer2D.map_set_edge_connection_margin`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_navigation/2d/default_link_connection_radius: -- :ref:`int` **navigation/2d/default_link_connection_radius** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **navigation/2d/default_link_connection_radius** = ``4`` Default link connection radius for 2D navigation maps. See :ref:`NavigationServer2D.map_set_link_connection_radius`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_navigation/3d/default_cell_size: -- :ref:`float` **navigation/3d/default_cell_size** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.25`` | -+-----------+----------+ +:ref:`float` **navigation/3d/default_cell_size** = ``0.25`` Default cell size for 3D navigation maps. See :ref:`NavigationServer3D.map_set_cell_size`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_navigation/3d/default_edge_connection_margin: -- :ref:`float` **navigation/3d/default_edge_connection_margin** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.25`` | -+-----------+----------+ +:ref:`float` **navigation/3d/default_edge_connection_margin** = ``0.25`` Default edge connection margin for 3D navigation maps. See :ref:`NavigationServer3D.map_set_edge_connection_margin`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_navigation/3d/default_link_connection_radius: -- :ref:`float` **navigation/3d/default_link_connection_radius** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **navigation/3d/default_link_connection_radius** = ``1.0`` Default link connection radius for 3D navigation maps. See :ref:`NavigationServer3D.map_set_link_connection_radius`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/limits/debugger/max_chars_per_second: -- :ref:`int` **network/limits/debugger/max_chars_per_second** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``32768`` | -+-----------+-----------+ +:ref:`int` **network/limits/debugger/max_chars_per_second** = ``32768`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/limits/debugger/max_errors_per_second: -- :ref:`int` **network/limits/debugger/max_errors_per_second** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``400`` | -+-----------+---------+ +:ref:`int` **network/limits/debugger/max_errors_per_second** = ``400`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/limits/debugger/max_queued_messages: -- :ref:`int` **network/limits/debugger/max_queued_messages** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``2048`` | -+-----------+----------+ +:ref:`int` **network/limits/debugger/max_queued_messages** = ``2048`` Maximum number of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/limits/debugger/max_warnings_per_second: -- :ref:`int` **network/limits/debugger/max_warnings_per_second** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``400`` | -+-----------+---------+ +:ref:`int` **network/limits/debugger/max_warnings_per_second** = ``400`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/limits/packet_peer_stream/max_buffer_po2: -- :ref:`int` **network/limits/packet_peer_stream/max_buffer_po2** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``16`` | -+-----------+--------+ +:ref:`int` **network/limits/packet_peer_stream/max_buffer_po2** = ``16`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/limits/tcp/connect_timeout_seconds: -- :ref:`int` **network/limits/tcp/connect_timeout_seconds** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``30`` | -+-----------+--------+ +:ref:`int` **network/limits/tcp/connect_timeout_seconds** = ``30`` Timeout (in seconds) for connection attempts using TCP. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/limits/webrtc/max_channel_in_buffer_kb: -- :ref:`int` **network/limits/webrtc/max_channel_in_buffer_kb** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **network/limits/webrtc/max_channel_in_buffer_kb** = ``64`` Maximum size (in kiB) for the :ref:`WebRTCDataChannel` input buffer. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/remote_fs/page_read_ahead: -- :ref:`int` **network/remote_fs/page_read_ahead** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **network/remote_fs/page_read_ahead** = ``4`` Amount of read ahead used by remote filesystem. Higher values decrease the effects of latency at the cost of higher bandwidth usage. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/remote_fs/page_size: -- :ref:`int` **network/remote_fs/page_size** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``65536`` | -+-----------+-----------+ +:ref:`int` **network/remote_fs/page_size** = ``65536`` Page size used by remote filesystem (in bytes). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_network/tls/certificate_bundle_override: -- :ref:`String` **network/tls/certificate_bundle_override** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **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 `__. If left empty, the default certificate bundle will be used. If in doubt, leave this setting empty. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/default_angular_damp: -- :ref:`float` **physics/2d/default_angular_damp** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **physics/2d/default_angular_damp** = ``1.0`` The default angular damp in 2D. \ **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`, ``60`` by default) will bring the object to a stop in one iteration. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/default_gravity: -- :ref:`float` **physics/2d/default_gravity** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``980.0`` | -+-----------+-----------+ +:ref:`float` **physics/2d/default_gravity** = ``980.0`` The default gravity strength in 2D (in pixels per second squared). @@ -6732,15 +7076,15 @@ The default gravity strength in 2D (in pixels per second squared). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/default_gravity_vector: -- :ref:`Vector2` **physics/2d/default_gravity_vector** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 1)`` | -+-----------+-------------------+ +:ref:`Vector2` **physics/2d/default_gravity_vector** = ``Vector2(0, 1)`` The default gravity direction in 2D. @@ -6761,181 +7105,181 @@ The default gravity direction in 2D. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/default_linear_damp: -- :ref:`float` **physics/2d/default_linear_damp** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.1`` | -+-----------+---------+ +:ref:`float` **physics/2d/default_linear_damp** = ``0.1`` The default linear damp in 2D. \ **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`, ``60`` by default) will bring the object to a stop in one iteration. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/physics_engine: -- :ref:`String` **physics/2d/physics_engine** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"DEFAULT"`` | -+-----------+---------------+ +:ref:`String` **physics/2d/physics_engine** = ``"DEFAULT"`` Sets which physics engine to use for 2D physics. "DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/run_on_separate_thread: -- :ref:`bool` **physics/2d/run_on_separate_thread** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **physics/2d/run_on_separate_thread** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/sleep_threshold_angular: -- :ref:`float` **physics/2d/sleep_threshold_angular** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``0.139626`` | -+-----------+--------------+ +:ref:`float` **physics/2d/sleep_threshold_angular** = ``0.139626`` Threshold angular velocity under which a 2D physics body will be considered inactive. See :ref:`PhysicsServer2D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/sleep_threshold_linear: -- :ref:`float` **physics/2d/sleep_threshold_linear** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``2.0`` | -+-----------+---------+ +:ref:`float` **physics/2d/sleep_threshold_linear** = ``2.0`` Threshold linear velocity under which a 2D physics body will be considered inactive. See :ref:`PhysicsServer2D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/solver/contact_max_allowed_penetration: -- :ref:`float` **physics/2d/solver/contact_max_allowed_penetration** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.3`` | -+-----------+---------+ +:ref:`float` **physics/2d/solver/contact_max_allowed_penetration** = ``0.3`` Maximum distance a shape can penetrate another shape before it is considered a collision. See :ref:`PhysicsServer2D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/solver/contact_max_separation: -- :ref:`float` **physics/2d/solver/contact_max_separation** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.5`` | -+-----------+---------+ +:ref:`float` **physics/2d/solver/contact_max_separation** = ``1.5`` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/solver/contact_recycle_radius: -- :ref:`float` **physics/2d/solver/contact_recycle_radius** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **physics/2d/solver/contact_recycle_radius** = ``1.0`` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/solver/default_constraint_bias: -- :ref:`float` **physics/2d/solver/default_constraint_bias** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.2`` | -+-----------+---------+ +:ref:`float` **physics/2d/solver/default_constraint_bias** = ``0.2`` Default solver bias for all physics constraints. Defines how much bodies react to enforce constraints. See :ref:`PhysicsServer2D.SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS`. Individual constraints can have a specific bias value (see :ref:`Joint2D.bias`). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/solver/default_contact_bias: -- :ref:`float` **physics/2d/solver/default_contact_bias** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.8`` | -+-----------+---------+ +:ref:`float` **physics/2d/solver/default_contact_bias** = ``0.8`` Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See :ref:`PhysicsServer2D.SPACE_PARAM_CONTACT_DEFAULT_BIAS`. Individual shapes can have a specific bias value (see :ref:`Shape2D.custom_solver_bias`). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/solver/solver_iterations: -- :ref:`int` **physics/2d/solver/solver_iterations** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``16`` | -+-----------+--------+ +:ref:`int` **physics/2d/solver/solver_iterations** = ``16`` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/2d/time_before_sleep: -- :ref:`float` **physics/2d/time_before_sleep** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **physics/2d/time_before_sleep** = ``0.5`` Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See :ref:`PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/default_angular_damp: -- :ref:`float` **physics/3d/default_angular_damp** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.1`` | -+-----------+---------+ +:ref:`float` **physics/3d/default_angular_damp** = ``0.1`` The default angular damp in 3D. \ **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`, ``60`` by default) will bring the object to a stop in one iteration. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/default_gravity: -- :ref:`float` **physics/3d/default_gravity** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``9.8`` | -+-----------+---------+ +:ref:`float` **physics/3d/default_gravity** = ``9.8`` The default gravity strength in 3D (in meters per second squared). @@ -6956,15 +7300,15 @@ The default gravity strength in 3D (in meters per second squared). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/default_gravity_vector: -- :ref:`Vector3` **physics/3d/default_gravity_vector** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector3(0, -1, 0)`` | -+-----------+-----------------------+ +:ref:`Vector3` **physics/3d/default_gravity_vector** = ``Vector3(0, -1, 0)`` The default gravity direction in 3D. @@ -6985,179 +7329,179 @@ The default gravity direction in 3D. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/default_linear_damp: -- :ref:`float` **physics/3d/default_linear_damp** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.1`` | -+-----------+---------+ +:ref:`float` **physics/3d/default_linear_damp** = ``0.1`` The default linear damp in 3D. \ **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`, ``60`` by default) will bring the object to a stop in one iteration. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/physics_engine: -- :ref:`String` **physics/3d/physics_engine** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"DEFAULT"`` | -+-----------+---------------+ +:ref:`String` **physics/3d/physics_engine** = ``"DEFAULT"`` Sets which physics engine to use for 3D physics. "DEFAULT" and "GodotPhysics3D" are the same, as there is currently no alternative 3D physics server implemented. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/run_on_separate_thread: -- :ref:`bool` **physics/3d/run_on_separate_thread** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **physics/3d/run_on_separate_thread** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/sleep_threshold_angular: -- :ref:`float` **physics/3d/sleep_threshold_angular** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``0.139626`` | -+-----------+--------------+ +:ref:`float` **physics/3d/sleep_threshold_angular** = ``0.139626`` Threshold angular velocity under which a 3D physics body will be considered inactive. See :ref:`PhysicsServer3D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/sleep_threshold_linear: -- :ref:`float` **physics/3d/sleep_threshold_linear** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.1`` | -+-----------+---------+ +:ref:`float` **physics/3d/sleep_threshold_linear** = ``0.1`` Threshold linear velocity under which a 3D physics body will be considered inactive. See :ref:`PhysicsServer3D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/solver/contact_max_allowed_penetration: -- :ref:`float` **physics/3d/solver/contact_max_allowed_penetration** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.01`` | -+-----------+----------+ +:ref:`float` **physics/3d/solver/contact_max_allowed_penetration** = ``0.01`` Maximum distance a shape can penetrate another shape before it is considered a collision. See :ref:`PhysicsServer3D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/solver/contact_max_separation: -- :ref:`float` **physics/3d/solver/contact_max_separation** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.05`` | -+-----------+----------+ +:ref:`float` **physics/3d/solver/contact_max_separation** = ``0.05`` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/solver/contact_recycle_radius: -- :ref:`float` **physics/3d/solver/contact_recycle_radius** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.01`` | -+-----------+----------+ +:ref:`float` **physics/3d/solver/contact_recycle_radius** = ``0.01`` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/solver/default_contact_bias: -- :ref:`float` **physics/3d/solver/default_contact_bias** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.8`` | -+-----------+---------+ +:ref:`float` **physics/3d/solver/default_contact_bias** = ``0.8`` Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See :ref:`PhysicsServer3D.SPACE_PARAM_CONTACT_DEFAULT_BIAS`. Individual shapes can have a specific bias value (see :ref:`Shape3D.custom_solver_bias`). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/solver/solver_iterations: -- :ref:`int` **physics/3d/solver/solver_iterations** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``16`` | -+-----------+--------+ +:ref:`int` **physics/3d/solver/solver_iterations** = ``16`` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/3d/time_before_sleep: -- :ref:`float` **physics/3d/time_before_sleep** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **physics/3d/time_before_sleep** = ``0.5`` Time (in seconds) of inactivity before which a 3D physics body will put to sleep. See :ref:`PhysicsServer3D.SPACE_PARAM_BODY_TIME_TO_SLEEP`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/common/enable_object_picking: -- :ref:`bool` **physics/common/enable_object_picking** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **physics/common/enable_object_picking** = ``true`` Enables :ref:`Viewport.physics_object_picking` on the root viewport. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/common/max_physics_steps_per_frame: -- :ref:`int` **physics/common/max_physics_steps_per_frame** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``8`` | -+-----------+-------+ +:ref:`int` **physics/common/max_physics_steps_per_frame** = ``8`` 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`. This occurs even if ``delta`` is consistently used in physics calculations. To avoid this, increase :ref:`physics/common/max_physics_steps_per_frame` if you have increased :ref:`physics/common/physics_ticks_per_second` significantly above its default value. \ **Note:** This property is only read when the project starts. To change the maximum number of simulated physics steps per frame at runtime, set :ref:`Engine.max_physics_steps_per_frame` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/common/physics_jitter_fix: -- :ref:`float` **physics/common/physics_jitter_fix** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **physics/common/physics_jitter_fix** = ``0.5`` 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. @@ -7165,15 +7509,15 @@ Controls how much physics ticks are synchronized with real time. For 0 or less, \ **Note:** This property is only read when the project starts. To change the physics FPS at runtime, set :ref:`Engine.physics_jitter_fix` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_physics/common/physics_ticks_per_second: -- :ref:`int` **physics/common/physics_ticks_per_second** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``60`` | -+-----------+--------+ +:ref:`int` **physics/common/physics_ticks_per_second** = ``60`` The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process` methods are run. See also :ref:`application/run/max_fps`. @@ -7181,123 +7525,123 @@ The number of fixed iterations per second. This controls how often physics simul \ **Note:** Only :ref:`physics/common/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:`physics/common/max_physics_steps_per_frame` if increasing :ref:`physics/common/physics_ticks_per_second` significantly above its default value. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/2d/sdf/oversize: -- :ref:`int` **rendering/2d/sdf/oversize** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/2d/sdf/oversize** = ``1`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/2d/sdf/scale: -- :ref:`int` **rendering/2d/sdf/scale** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/2d/sdf/scale** = ``1`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/2d/shadow_atlas/size: -- :ref:`int` **rendering/2d/shadow_atlas/size** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``2048`` | -+-----------+----------+ +:ref:`int` **rendering/2d/shadow_atlas/size** = ``2048`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/2d/snap/snap_2d_transforms_to_pixel: -- :ref:`bool` **rendering/2d/snap/snap_2d_transforms_to_pixel** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/2d/snap/snap_2d_transforms_to_pixel** = ``false`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/2d/snap/snap_2d_vertices_to_pixel: -- :ref:`bool` **rendering/2d/snap/snap_2d_vertices_to_pixel** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/2d/snap/snap_2d_vertices_to_pixel** = ``false`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_2d: -- :ref:`int` **rendering/anti_aliasing/quality/msaa_2d** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/anti_aliasing/quality/msaa_2d** = ``0`` 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. This has no effect on shader-induced aliasing or texture aliasing. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_3d: -- :ref:`int` **rendering/anti_aliasing/quality/msaa_3d** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/anti_aliasing/quality/msaa_3d** = ``0`` 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. See also bilinear scaling 3d :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/quality/screen_space_aa: -- :ref:`int` **rendering/anti_aliasing/quality/screen_space_aa** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/anti_aliasing/quality/screen_space_aa** = ``0`` Sets the screen-space antialiasing mode for the default screen :ref:`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`). Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/quality/use_debanding: -- :ref:`bool` **rendering/anti_aliasing/quality/use_debanding** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/anti_aliasing/quality/use_debanding** = ``false`` 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` is :ref:`Environment.BG_CANVAS`. @@ -7305,791 +7649,791 @@ In some cases, debanding may introduce a slightly noticeable dithering pattern. \ **Note:** This property is only read when the project starts. To set debanding at run-time, set :ref:`Viewport.use_debanding` on the root :ref:`Viewport` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa: -- :ref:`bool` **rendering/anti_aliasing/quality/use_taa** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/anti_aliasing/quality/use_taa** = ``false`` Enables Temporal Anti-Aliasing for the default screen :ref:`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`). \ **Note:** The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/amount: -- :ref:`float` **rendering/anti_aliasing/screen_space_roughness_limiter/amount** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.25`` | -+-----------+----------+ +:ref:`float` **rendering/anti_aliasing/screen_space_roughness_limiter/amount** = ``0.25`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/enabled: -- :ref:`bool` **rendering/anti_aliasing/screen_space_roughness_limiter/enabled** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/anti_aliasing/screen_space_roughness_limiter/enabled** = ``true`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/limit: -- :ref:`float` **rendering/anti_aliasing/screen_space_roughness_limiter/limit** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.18`` | -+-----------+----------+ +:ref:`float` **rendering/anti_aliasing/screen_space_roughness_limiter/limit** = ``0.18`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/camera/depth_of_field/depth_of_field_bokeh_quality: -- :ref:`int` **rendering/camera/depth_of_field/depth_of_field_bokeh_quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/camera/depth_of_field/depth_of_field_bokeh_quality** = ``1`` Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/camera/depth_of_field/depth_of_field_bokeh_shape: -- :ref:`int` **rendering/camera/depth_of_field/depth_of_field_bokeh_shape** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/camera/depth_of_field/depth_of_field_bokeh_shape** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/camera/depth_of_field/depth_of_field_use_jitter: -- :ref:`bool` **rendering/camera/depth_of_field/depth_of_field_use_jitter** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/camera/depth_of_field/depth_of_field_use_jitter** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/driver/depth_prepass/disable_for_vendors: -- :ref:`String` **rendering/driver/depth_prepass/disable_for_vendors** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``"PowerVR,Mali,Adreno,Apple"`` | -+-----------+---------------------------------+ +:ref:`String` **rendering/driver/depth_prepass/disable_for_vendors** = ``"PowerVR,Mali,Adreno,Apple"`` Disables :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/driver/depth_prepass/enable: -- :ref:`bool` **rendering/driver/depth_prepass/enable** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/driver/depth_prepass/enable** = ``true`` 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. \ **Note:** Only supported when using the Vulkan Clustered backend or the OpenGL backend. When using Vulkan Mobile there is no depth prepass performed. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/driver/threads/thread_model: -- :ref:`int` **rendering/driver/threads/thread_model** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/driver/threads/thread_model** = ``1`` Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/defaults/default_clear_color: -- :ref:`Color` **rendering/environment/defaults/default_clear_color** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(0.3, 0.3, 0.3, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **rendering/environment/defaults/default_clear_color** = ``Color(0.3, 0.3, 0.3, 1)`` Default background clear color. Overridable per :ref:`Viewport` using its :ref:`Environment`. See :ref:`Environment.background_mode` and :ref:`Environment.background_color` in particular. To change this default color programmatically, use :ref:`RenderingServer.set_default_clear_color`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/defaults/default_environment: -- :ref:`String` **rendering/environment/defaults/default_environment** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **rendering/environment/defaults/default_environment** = ``""`` :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/glow/upscale_mode: -- :ref:`int` **rendering/environment/glow/upscale_mode** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/environment/glow/upscale_mode** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/glow/upscale_mode.mobile: -- :ref:`int` **rendering/environment/glow/upscale_mode.mobile** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/environment/glow/upscale_mode.mobile** = ``0`` Lower-end override for :ref:`rendering/environment/glow/upscale_mode` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/glow/use_high_quality: -- :ref:`bool` **rendering/environment/glow/use_high_quality** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/environment/glow/use_high_quality** = ``false`` Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/screen_space_reflection/roughness_quality: -- :ref:`int` **rendering/environment/screen_space_reflection/roughness_quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/environment/screen_space_reflection/roughness_quality** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssao/adaptive_target: -- :ref:`float` **rendering/environment/ssao/adaptive_target** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **rendering/environment/ssao/adaptive_target** = ``0.5`` Quality target to use when :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssao/blur_passes: -- :ref:`int` **rendering/environment/ssao/blur_passes** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/environment/ssao/blur_passes** = ``2`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssao/fadeout_from: -- :ref:`float` **rendering/environment/ssao/fadeout_from** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``50.0`` | -+-----------+----------+ +:ref:`float` **rendering/environment/ssao/fadeout_from** = ``50.0`` Distance at which the screen-space ambient occlusion effect starts to fade out. Use this hide ambient occlusion at great distances. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssao/fadeout_to: -- :ref:`float` **rendering/environment/ssao/fadeout_to** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``300.0`` | -+-----------+-----------+ +:ref:`float` **rendering/environment/ssao/fadeout_to** = ``300.0`` Distance at which the screen-space ambient occlusion is fully faded out. Use this hide ambient occlusion at great distances. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssao/half_size: -- :ref:`bool` **rendering/environment/ssao/half_size** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/environment/ssao/half_size** = ``true`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssao/quality: -- :ref:`int` **rendering/environment/ssao/quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/environment/ssao/quality** = ``2`` 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` setting. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssil/adaptive_target: -- :ref:`float` **rendering/environment/ssil/adaptive_target** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.5`` | -+-----------+---------+ +:ref:`float` **rendering/environment/ssil/adaptive_target** = ``0.5`` Quality target to use when :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssil/blur_passes: -- :ref:`int` **rendering/environment/ssil/blur_passes** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **rendering/environment/ssil/blur_passes** = ``4`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssil/fadeout_from: -- :ref:`float` **rendering/environment/ssil/fadeout_from** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``50.0`` | -+-----------+----------+ +:ref:`float` **rendering/environment/ssil/fadeout_from** = ``50.0`` Distance at which the screen-space indirect lighting effect starts to fade out. Use this hide screen-space indirect lighting at great distances. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssil/fadeout_to: -- :ref:`float` **rendering/environment/ssil/fadeout_to** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``300.0`` | -+-----------+-----------+ +:ref:`float` **rendering/environment/ssil/fadeout_to** = ``300.0`` Distance at which the screen-space indirect lighting is fully faded out. Use this hide screen-space indirect lighting at great distances. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssil/half_size: -- :ref:`bool` **rendering/environment/ssil/half_size** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/environment/ssil/half_size** = ``true`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/ssil/quality: -- :ref:`int` **rendering/environment/ssil/quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/environment/ssil/quality** = ``2`` 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` setting. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale: -- :ref:`float` **rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.01`` | -+-----------+----------+ +:ref:`float` **rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale** = ``0.01`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_quality: -- :ref:`int` **rendering/environment/subsurface_scattering/subsurface_scattering_quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/environment/subsurface_scattering/subsurface_scattering_quality** = ``1`` Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_scale: -- :ref:`float` **rendering/environment/subsurface_scattering/subsurface_scattering_scale** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``0.05`` | -+-----------+----------+ +:ref:`float` **rendering/environment/subsurface_scattering/subsurface_scattering_scale** = ``0.05`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/volumetric_fog/use_filter: -- :ref:`int` **rendering/environment/volumetric_fog/use_filter** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/environment/volumetric_fog/use_filter** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_depth: -- :ref:`int` **rendering/environment/volumetric_fog/volume_depth** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/environment/volumetric_fog/volume_depth** = ``64`` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_size: -- :ref:`int` **rendering/environment/volumetric_fog/volume_size** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/environment/volumetric_fog/volume_size** = ``64`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/driver: -- :ref:`String` **rendering/gl_compatibility/driver** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"opengl3"`` | -+-----------+---------------+ +:ref:`String` **rendering/gl_compatibility/driver** = ``"opengl3"`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/driver.android: -- :ref:`String` **rendering/gl_compatibility/driver.android** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"opengl3"`` | -+-----------+---------------+ +:ref:`String` **rendering/gl_compatibility/driver.android** = ``"opengl3"`` Android override for :ref:`rendering/gl_compatibility/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/driver.ios: -- :ref:`String` **rendering/gl_compatibility/driver.ios** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"opengl3"`` | -+-----------+---------------+ +:ref:`String` **rendering/gl_compatibility/driver.ios** = ``"opengl3"`` iOS override for :ref:`rendering/gl_compatibility/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/driver.linuxbsd: -- :ref:`String` **rendering/gl_compatibility/driver.linuxbsd** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"opengl3"`` | -+-----------+---------------+ +:ref:`String` **rendering/gl_compatibility/driver.linuxbsd** = ``"opengl3"`` LinuxBSD override for :ref:`rendering/gl_compatibility/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/driver.macos: -- :ref:`String` **rendering/gl_compatibility/driver.macos** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"opengl3"`` | -+-----------+---------------+ +:ref:`String` **rendering/gl_compatibility/driver.macos** = ``"opengl3"`` macOS override for :ref:`rendering/gl_compatibility/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/driver.web: -- :ref:`String` **rendering/gl_compatibility/driver.web** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"opengl3"`` | -+-----------+---------------+ +:ref:`String` **rendering/gl_compatibility/driver.web** = ``"opengl3"`` Web override for :ref:`rendering/gl_compatibility/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/driver.windows: -- :ref:`String` **rendering/gl_compatibility/driver.windows** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``"opengl3"`` | -+-----------+---------------+ +:ref:`String` **rendering/gl_compatibility/driver.windows** = ``"opengl3"`` Windows override for :ref:`rendering/gl_compatibility/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/gl_compatibility/item_buffer_size: -- :ref:`int` **rendering/gl_compatibility/item_buffer_size** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``16384`` | -+-----------+-----------+ +:ref:`int` **rendering/gl_compatibility/item_buffer_size** = ``16384`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/global_illumination/gi/use_half_resolution: -- :ref:`bool` **rendering/global_illumination/gi/use_half_resolution** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/global_illumination/gi/use_half_resolution** = ``false`` If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment.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` rendering is not affected by this setting. \ **Note:** This property is only read when the project starts. To set half-resolution GI at run-time, call :ref:`RenderingServer.gi_set_use_half_resolution` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_converge: -- :ref:`int` **rendering/global_illumination/sdfgi/frames_to_converge** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``5`` | -+-----------+-------+ +:ref:`int` **rendering/global_illumination/sdfgi/frames_to_converge** = ``5`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_update_lights: -- :ref:`int` **rendering/global_illumination/sdfgi/frames_to_update_lights** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/global_illumination/sdfgi/frames_to_update_lights** = ``2`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/global_illumination/sdfgi/probe_ray_count: -- :ref:`int` **rendering/global_illumination/sdfgi/probe_ray_count** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **rendering/global_illumination/sdfgi/probe_ray_count** = ``1`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/global_illumination/voxel_gi/quality: -- :ref:`int` **rendering/global_illumination/voxel_gi/quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/global_illumination/voxel_gi/quality** = ``0`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_performance/max_rays_per_pass: -- :ref:`int` **rendering/lightmapping/bake_performance/max_rays_per_pass** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``32`` | -+-----------+--------+ +:ref:`int` **rendering/lightmapping/bake_performance/max_rays_per_pass** = ``32`` The maximum number of rays that can be thrown per pass when baking lightmaps with :ref:`LightmapGI`. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_performance/max_rays_per_probe_pass: -- :ref:`int` **rendering/lightmapping/bake_performance/max_rays_per_probe_pass** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/lightmapping/bake_performance/max_rays_per_probe_pass** = ``64`` The maximum number of rays that can be thrown per pass when baking dynamic object lighting in :ref:`LightmapProbe`\ s with :ref:`LightmapGI`. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_performance/region_size: -- :ref:`int` **rendering/lightmapping/bake_performance/region_size** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``512`` | -+-----------+---------+ +:ref:`int` **rendering/lightmapping/bake_performance/region_size** = ``512`` The region size to use when baking lightmaps with :ref:`LightmapGI`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/high_quality_probe_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/high_quality_probe_ray_count** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``512`` | -+-----------+---------+ +:ref:`int` **rendering/lightmapping/bake_quality/high_quality_probe_ray_count** = ``512`` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe`\ s when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_HIGH`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/high_quality_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/high_quality_ray_count** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``256`` | -+-----------+---------+ +:ref:`int` **rendering/lightmapping/bake_quality/high_quality_ray_count** = ``256`` The number of rays to use for baking lightmaps with :ref:`LightmapGI` when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_HIGH`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/low_quality_probe_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/low_quality_probe_ray_count** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/lightmapping/bake_quality/low_quality_probe_ray_count** = ``64`` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe`\ s when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_LOW`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/low_quality_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/low_quality_ray_count** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``16`` | -+-----------+--------+ +:ref:`int` **rendering/lightmapping/bake_quality/low_quality_ray_count** = ``16`` The number of rays to use for baking lightmaps with :ref:`LightmapGI` when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_LOW`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/medium_quality_probe_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/medium_quality_probe_ray_count** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``256`` | -+-----------+---------+ +:ref:`int` **rendering/lightmapping/bake_quality/medium_quality_probe_ray_count** = ``256`` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe`\ s when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_MEDIUM`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/medium_quality_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/medium_quality_ray_count** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/lightmapping/bake_quality/medium_quality_ray_count** = ``64`` The number of rays to use for baking lightmaps with :ref:`LightmapGI` when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_MEDIUM`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``2048`` | -+-----------+----------+ +:ref:`int` **rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count** = ``2048`` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe`\ s when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_ULTRA`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/bake_quality/ultra_quality_ray_count: -- :ref:`int` **rendering/lightmapping/bake_quality/ultra_quality_ray_count** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``1024`` | -+-----------+----------+ +:ref:`int` **rendering/lightmapping/bake_quality/ultra_quality_ray_count** = ``1024`` The number of rays to use for baking lightmaps with :ref:`LightmapGI` when :ref:`LightmapGI.quality` is :ref:`LightmapGI.BAKE_QUALITY_ULTRA`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/primitive_meshes/texel_size: -- :ref:`float` **rendering/lightmapping/primitive_meshes/texel_size** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.2`` | -+-----------+---------+ +:ref:`float` **rendering/lightmapping/primitive_meshes/texel_size** = ``0.2`` The texel_size that is used to calculate the :ref:`Mesh.lightmap_size_hint` on :ref:`PrimitiveMesh` resources if :ref:`PrimitiveMesh.add_uv2` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lightmapping/probe_capture/update_speed: -- :ref:`float` **rendering/lightmapping/probe_capture/update_speed** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``15`` | -+-----------+--------+ +:ref:`float` **rendering/lightmapping/probe_capture/update_speed** = ``15`` The framerate-independent update speed when representing dynamic object lighting from :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/16_bits: -- :ref:`bool` **rendering/lights_and_shadows/directional_shadow/16_bits** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/lights_and_shadows/directional_shadow/16_bits** = ``true`` Use 16 bits for 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/size: -- :ref:`int` **rendering/lights_and_shadows/directional_shadow/size** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``4096`` | -+-----------+----------+ +:ref:`int` **rendering/lights_and_shadows/directional_shadow/size** = ``4096`` The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/size.mobile: -- :ref:`int` **rendering/lights_and_shadows/directional_shadow/size.mobile** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``2048`` | -+-----------+----------+ +:ref:`int` **rendering/lights_and_shadows/directional_shadow/size.mobile** = ``2048`` Lower-end override for :ref:`rendering/lights_and_shadows/directional_shadow/size` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality: -- :ref:`int` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality** = ``2`` Quality setting for shadows cast by :ref:`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. @@ -8097,111 +8441,111 @@ Quality setting for shadows cast by :ref:`DirectionalLight3D` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile** = ``0`` Lower-end override for :ref:`rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_16_bits: -- :ref:`bool` **rendering/lights_and_shadows/positional_shadow/atlas_16_bits** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/lights_and_shadows/positional_shadow/atlas_16_bits** = ``true`` Use 16 bits for 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv** = ``2`` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv** = ``2`` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv** = ``3`` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv** = ``4`` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_size: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_size** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``4096`` | -+-----------+----------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_size** = ``4096`` Size for shadow atlas (used for OmniLights and SpotLights). See documentation. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_size.mobile: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_size.mobile** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``2048`` | -+-----------+----------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/atlas_size.mobile** = ``2048`` Lower-end override for :ref:`rendering/lights_and_shadows/positional_shadow/atlas_size` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality** = ``2`` Quality setting for shadows cast by :ref:`OmniLight3D`\ s and :ref:`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. @@ -8209,159 +8553,159 @@ Quality setting for shadows cast by :ref:`OmniLight3D`\ s and \ **Note:** The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile: -- :ref:`int` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile** = ``0`` Lower-end override for :ref:`rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units: -- :ref:`bool` **rendering/lights_and_shadows/use_physical_light_units** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/lights_and_shadows/use_physical_light_units** = ``false`` 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` resource, but :ref:`LightmapGI` and :ref:`VoxelGI` require a :ref:`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/cluster_builder/max_clustered_elements: -- :ref:`float` **rendering/limits/cluster_builder/max_clustered_elements** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``512`` | -+-----------+---------+ +:ref:`float` **rendering/limits/cluster_builder/max_clustered_elements** = ``512`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/forward_renderer/threaded_render_minimum_instances: -- :ref:`int` **rendering/limits/forward_renderer/threaded_render_minimum_instances** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``500`` | -+-----------+---------+ +:ref:`int` **rendering/limits/forward_renderer/threaded_render_minimum_instances** = ``500`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/global_shader_variables/buffer_size: -- :ref:`int` **rendering/limits/global_shader_variables/buffer_size** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``65536`` | -+-----------+-----------+ +:ref:`int` **rendering/limits/global_shader_variables/buffer_size** = ``65536`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/opengl/max_lights_per_object: -- :ref:`int` **rendering/limits/opengl/max_lights_per_object** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``8`` | -+-----------+-------+ +:ref:`int` **rendering/limits/opengl/max_lights_per_object** = ``8`` 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`. 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/opengl/max_renderable_elements: -- :ref:`int` **rendering/limits/opengl/max_renderable_elements** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``65536`` | -+-----------+-----------+ +:ref:`int` **rendering/limits/opengl/max_renderable_elements** = ``65536`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/opengl/max_renderable_lights: -- :ref:`int` **rendering/limits/opengl/max_renderable_lights** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``32`` | -+-----------+--------+ +:ref:`int` **rendering/limits/opengl/max_renderable_lights** = ``32`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/spatial_indexer/threaded_cull_minimum_instances: -- :ref:`int` **rendering/limits/spatial_indexer/threaded_cull_minimum_instances** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``1000`` | -+-----------+----------+ +:ref:`int` **rendering/limits/spatial_indexer/threaded_cull_minimum_instances** = ``1000`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/spatial_indexer/update_iterations_per_frame: -- :ref:`int` **rendering/limits/spatial_indexer/update_iterations_per_frame** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``10`` | -+-----------+--------+ +:ref:`int` **rendering/limits/spatial_indexer/update_iterations_per_frame** = ``10`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/limits/time/time_rollover_secs: -- :ref:`float` **rendering/limits/time/time_rollover_secs** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``3600`` | -+-----------+----------+ +:ref:`float` **rendering/limits/time/time_rollover_secs** = ``3600`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/mesh_lod/lod_change/threshold_pixels: -- :ref:`float` **rendering/mesh_lod/lod_change/threshold_pixels** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **rendering/mesh_lod/lod_change/threshold_pixels** = ``1.0`` The automatic LOD bias to use for meshes rendered within the :ref:`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` to improve performance at the cost of geometry detail. @@ -8369,161 +8713,161 @@ The automatic LOD bias to use for meshes rendered within the :ref:`ReflectionPro \ **Note:** This property is only read when the project starts. To adjust the automatic LOD threshold at runtime, set :ref:`Viewport.mesh_lod_threshold` on the root :ref:`Viewport`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/occlusion_culling/bvh_build_quality: -- :ref:`int` **rendering/occlusion_culling/bvh_build_quality** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/occlusion_culling/bvh_build_quality** = ``2`` The `BVH `__ 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/occlusion_culling/occlusion_rays_per_thread: -- :ref:`int` **rendering/occlusion_culling/occlusion_rays_per_thread** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``512`` | -+-----------+---------+ +:ref:`int` **rendering/occlusion_culling/occlusion_rays_per_thread** = ``512`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/occlusion_culling/use_occlusion_culling: -- :ref:`bool` **rendering/occlusion_culling/use_occlusion_culling** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/occlusion_culling/use_occlusion_culling** = ``false`` If ``true``, :ref:`OccluderInstance3D` nodes will be usable for occlusion culling in 3D in the root viewport. In custom viewports, :ref:`Viewport.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` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/reflection_atlas/reflection_count: -- :ref:`int` **rendering/reflections/reflection_atlas/reflection_count** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/reflections/reflection_atlas/reflection_count** = ``64`` Number of cubemaps to store in the reflection atlas. The number of :ref:`ReflectionProbe`\ s in a scene will be limited by this amount. A higher number requires more VRAM. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/reflection_atlas/reflection_size: -- :ref:`int` **rendering/reflections/reflection_atlas/reflection_size** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``256`` | -+-----------+---------+ +:ref:`int` **rendering/reflections/reflection_atlas/reflection_size** = ``256`` Size of cubemap faces for :ref:`ReflectionProbe`\ s. A higher number requires more VRAM and may make reflection probe updating slower. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/reflection_atlas/reflection_size.mobile: -- :ref:`int` **rendering/reflections/reflection_atlas/reflection_size.mobile** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``128`` | -+-----------+---------+ +:ref:`int` **rendering/reflections/reflection_atlas/reflection_size.mobile** = ``128`` Lower-end override for :ref:`rendering/reflections/reflection_atlas/reflection_size` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/sky_reflections/fast_filter_high_quality: -- :ref:`bool` **rendering/reflections/sky_reflections/fast_filter_high_quality** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/reflections/sky_reflections/fast_filter_high_quality** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/sky_reflections/ggx_samples: -- :ref:`int` **rendering/reflections/sky_reflections/ggx_samples** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``32`` | -+-----------+--------+ +:ref:`int` **rendering/reflections/sky_reflections/ggx_samples** = ``32`` Sets the number of samples to take when using importance sampling for :ref:`Sky`\ s and :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/sky_reflections/ggx_samples.mobile: -- :ref:`int` **rendering/reflections/sky_reflections/ggx_samples.mobile** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``16`` | -+-----------+--------+ +:ref:`int` **rendering/reflections/sky_reflections/ggx_samples.mobile** = ``16`` Lower-end override for :ref:`rendering/reflections/sky_reflections/ggx_samples` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/sky_reflections/roughness_layers: -- :ref:`int` **rendering/reflections/sky_reflections/roughness_layers** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``8`` | -+-----------+-------+ +:ref:`int` **rendering/reflections/sky_reflections/roughness_layers** = ``8`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections: -- :ref:`bool` **rendering/reflections/sky_reflections/texture_array_reflections** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/reflections/sky_reflections/texture_array_reflections** = ``true`` 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` times more memory. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections.mobile: -- :ref:`bool` **rendering/reflections/sky_reflections/texture_array_reflections.mobile** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/reflections/sky_reflections/texture_array_reflections.mobile** = ``false`` Lower-end override for :ref:`rendering/reflections/sky_reflections/texture_array_reflections` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/renderer/rendering_method: -- :ref:`String` **rendering/renderer/rendering_method** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``"forward_plus"`` | -+-----------+--------------------+ +:ref:`String` **rendering/renderer/rendering_method** = ``"forward_plus"`` Sets the renderer that will be used by the project. Options are: @@ -8533,331 +8877,331 @@ Sets the renderer that will be used by the project. Options are: \ **GL Compatibility**: Low-end renderer designed for older devices. Based on the limitations of the OpenGL 3.3/ OpenGL ES 3.0 / WebGL 2 APIs. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/renderer/rendering_method.mobile: -- :ref:`String` **rendering/renderer/rendering_method.mobile** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``"mobile"`` | -+-----------+--------------+ +:ref:`String` **rendering/renderer/rendering_method.mobile** = ``"mobile"`` Override for :ref:`rendering/renderer/rendering_method` on mobile devices. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/renderer/rendering_method.web: -- :ref:`String` **rendering/renderer/rendering_method.web** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``"gl_compatibility"`` | -+-----------+------------------------+ +:ref:`String` **rendering/renderer/rendering_method.web** = ``"gl_compatibility"`` Override for :ref:`rendering/renderer/rendering_method` on web. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/driver: -- :ref:`String` **rendering/rendering_device/driver** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``"vulkan"`` | -+-----------+--------------+ +:ref:`String` **rendering/rendering_device/driver** = ``"vulkan"`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/driver.android: -- :ref:`String` **rendering/rendering_device/driver.android** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``"vulkan"`` | -+-----------+--------------+ +:ref:`String` **rendering/rendering_device/driver.android** = ``"vulkan"`` Android override for :ref:`rendering/rendering_device/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/driver.ios: -- :ref:`String` **rendering/rendering_device/driver.ios** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``"vulkan"`` | -+-----------+--------------+ +:ref:`String` **rendering/rendering_device/driver.ios** = ``"vulkan"`` iOS override for :ref:`rendering/rendering_device/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/driver.linuxbsd: -- :ref:`String` **rendering/rendering_device/driver.linuxbsd** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``"vulkan"`` | -+-----------+--------------+ +:ref:`String` **rendering/rendering_device/driver.linuxbsd** = ``"vulkan"`` LinuxBSD override for :ref:`rendering/rendering_device/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/driver.macos: -- :ref:`String` **rendering/rendering_device/driver.macos** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``"vulkan"`` | -+-----------+--------------+ +:ref:`String` **rendering/rendering_device/driver.macos** = ``"vulkan"`` macOS override for :ref:`rendering/rendering_device/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/driver.windows: -- :ref:`String` **rendering/rendering_device/driver.windows** +.. rst-class:: classref-property -+-----------+--------------+ -| *Default* | ``"vulkan"`` | -+-----------+--------------+ +:ref:`String` **rendering/rendering_device/driver.windows** = ``"vulkan"`` Windows override for :ref:`rendering/rendering_device/driver`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/staging_buffer/block_size_kb: -- :ref:`int` **rendering/rendering_device/staging_buffer/block_size_kb** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``256`` | -+-----------+---------+ +:ref:`int` **rendering/rendering_device/staging_buffer/block_size_kb** = ``256`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/staging_buffer/max_size_mb: -- :ref:`int` **rendering/rendering_device/staging_buffer/max_size_mb** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``128`` | -+-----------+---------+ +:ref:`int` **rendering/rendering_device/staging_buffer/max_size_mb** = ``128`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/staging_buffer/texture_upload_region_size_px: -- :ref:`int` **rendering/rendering_device/staging_buffer/texture_upload_region_size_px** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/rendering_device/staging_buffer/texture_upload_region_size_px** = ``64`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/rendering_device/vulkan/max_descriptors_per_pool: -- :ref:`int` **rendering/rendering_device/vulkan/max_descriptors_per_pool** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``64`` | -+-----------+--------+ +:ref:`int` **rendering/rendering_device/vulkan/max_descriptors_per_pool** = ``64`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/scaling_3d/fsr_sharpness: -- :ref:`float` **rendering/scaling_3d/fsr_sharpness** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.2`` | -+-----------+---------+ +:ref:`float` **rendering/scaling_3d/fsr_sharpness** = ``0.2`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/scaling_3d/mode: -- :ref:`int` **rendering/scaling_3d/mode** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/scaling_3d/mode** = ``0`` 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. FSR should be used where possible. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/scaling_3d/scale: -- :ref:`float` **rendering/scaling_3d/scale** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **rendering/scaling_3d/scale** = ``1.0`` Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`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` for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shader_compiler/shader_cache/compress: -- :ref:`bool` **rendering/shader_compiler/shader_cache/compress** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/shader_compiler/shader_cache/compress** = ``true`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shader_compiler/shader_cache/enabled: -- :ref:`bool` **rendering/shader_compiler/shader_cache/enabled** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/shader_compiler/shader_cache/enabled** = ``true`` Enable the shader cache, which stores compiled shaders to disk to prevent stuttering from shader compilation the next time the shader is needed. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shader_compiler/shader_cache/strip_debug: -- :ref:`bool` **rendering/shader_compiler/shader_cache/strip_debug** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/shader_compiler/shader_cache/strip_debug** = ``false`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shader_compiler/shader_cache/strip_debug.release: -- :ref:`bool` **rendering/shader_compiler/shader_cache/strip_debug.release** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/shader_compiler/shader_cache/strip_debug.release** = ``true`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shader_compiler/shader_cache/use_zstd_compression: -- :ref:`bool` **rendering/shader_compiler/shader_cache/use_zstd_compression** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/shader_compiler/shader_cache/use_zstd_compression** = ``true`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shading/overrides/force_lambert_over_burley: -- :ref:`bool` **rendering/shading/overrides/force_lambert_over_burley** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/shading/overrides/force_lambert_over_burley** = ``false`` If ``true``, uses faster but lower-quality Lambert material lighting model instead of Burley. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shading/overrides/force_lambert_over_burley.mobile: -- :ref:`bool` **rendering/shading/overrides/force_lambert_over_burley.mobile** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/shading/overrides/force_lambert_over_burley.mobile** = ``true`` Lower-end override for :ref:`rendering/shading/overrides/force_lambert_over_burley` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shading/overrides/force_vertex_shading: -- :ref:`bool` **rendering/shading/overrides/force_vertex_shading** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/shading/overrides/force_vertex_shading** = ``false`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/shading/overrides/force_vertex_shading.mobile: -- :ref:`bool` **rendering/shading/overrides/force_vertex_shading.mobile** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/shading/overrides/force_vertex_shading.mobile** = ``true`` Lower-end override for :ref:`rendering/shading/overrides/force_vertex_shading` on mobile devices, due to performance concerns or driver support. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/decals/filter: -- :ref:`int` **rendering/textures/decals/filter** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **rendering/textures/decals/filter** = ``3`` The filtering quality to use for :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level: -- :ref:`int` **rendering/textures/default_filters/anisotropic_filtering_level** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/textures/default_filters/anisotropic_filtering_level** = ``2`` 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. @@ -8867,15 +9211,15 @@ The anisotropic filtering level also affects decals and light projectors if they \ **Note:** This property is only read when the project starts. There is currently no way to change this setting at run-time. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/default_filters/texture_mipmap_bias: -- :ref:`float` **rendering/textures/default_filters/texture_mipmap_bias** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **rendering/textures/default_filters/texture_mipmap_bias** = ``0.0`` 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). @@ -8885,280 +9229,303 @@ Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter: -- :ref:`bool` **rendering/textures/default_filters/use_nearest_mipmap_filter** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/textures/default_filters/use_nearest_mipmap_filter** = ``false`` 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. \ **Note:** This property is only read when the project starts. There is currently no way to change this setting at run-time. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/light_projectors/filter: -- :ref:`int` **rendering/textures/light_projectors/filter** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **rendering/textures/light_projectors/filter** = ``3`` The filtering quality to use for :ref:`OmniLight3D` and :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/lossless_compression/force_png: -- :ref:`bool` **rendering/textures/lossless_compression/force_png** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/textures/lossless_compression/force_png** = ``false`` If ``true``, the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/vram_compression/import_bptc: -- :ref:`bool` **rendering/textures/vram_compression/import_bptc** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/textures/vram_compression/import_bptc** = ``false`` If ``true``, the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer. \ **Note:** Changing this setting does *not* impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the ``.godot/imported/`` folder located inside the project folder then restart the editor (see :ref:`application/config/use_hidden_project_data_directory`). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/vram_compression/import_etc: -- :ref:`bool` **rendering/textures/vram_compression/import_etc** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/textures/vram_compression/import_etc** = ``false`` If ``true``, the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures. \ **Note:** Changing this setting does *not* impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the ``.godot/imported/`` folder located inside the project folder then restart the editor (see :ref:`application/config/use_hidden_project_data_directory`). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/vram_compression/import_etc2: -- :ref:`bool` **rendering/textures/vram_compression/import_etc2** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/textures/vram_compression/import_etc2** = ``true`` If ``true``, the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer. \ **Note:** Changing this setting does *not* impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the ``.godot/imported/`` folder located inside the project folder then restart the editor (see :ref:`application/config/use_hidden_project_data_directory`). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/vram_compression/import_s3tc: -- :ref:`bool` **rendering/textures/vram_compression/import_s3tc** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **rendering/textures/vram_compression/import_s3tc** = ``true`` If ``true``, the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles. \ **Note:** Changing this setting does *not* impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the ``.godot/imported/`` folder located inside the project folder then restart the editor (see :ref:`application/config/use_hidden_project_data_directory`). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/webp_compression/compression_method: -- :ref:`int` **rendering/textures/webp_compression/compression_method** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``2`` | -+-----------+-------+ +:ref:`int` **rendering/textures/webp_compression/compression_method** = ``2`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/textures/webp_compression/lossless_compression_factor: -- :ref:`float` **rendering/textures/webp_compression/lossless_compression_factor** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``25`` | -+-----------+--------+ +:ref:`float` **rendering/textures/webp_compression/lossless_compression_factor** = ``25`` The default compression factor for lossless WebP. Decompression speed is mostly unaffected by the compression factor. Supported values are 0 to 100. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/transparent_background: -- :ref:`bool` **rendering/transparent_background** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **rendering/transparent_background** = ``false`` If ``true``, enables :ref:`Viewport.transparent_bg` on the root viewport. This allows per-pixel transparency to be effective after also enabling :ref:`display/window/size/transparent` and :ref:`display/window/per_pixel_transparency/allowed`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/vrs/mode: -- :ref:`int` **rendering/vrs/mode** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **rendering/vrs/mode** = ``0`` Set the default Variable Rate Shading (VRS) mode for the main viewport. See :ref:`Viewport.vrs_mode` to change this at runtime, and :ref:`VRSMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_rendering/vrs/texture: -- :ref:`String` **rendering/vrs/texture** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``""`` | -+-----------+--------+ +:ref:`String` **rendering/vrs/texture** = ``""`` -If :ref:`rendering/vrs/mode` is set to texture, this is the path to default texture loaded as the VRS image. +If :ref:`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: + +:: + + - 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 + +.. rst-class:: classref-item-separator ---- .. _class_ProjectSettings_property_threading/worker_pool/low_priority_thread_ratio: -- :ref:`float` **threading/worker_pool/low_priority_thread_ratio** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.3`` | -+-----------+---------+ +:ref:`float` **threading/worker_pool/low_priority_thread_ratio** = ``0.3`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_threading/worker_pool/max_threads: -- :ref:`int` **threading/worker_pool/max_threads** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``-1`` | -+-----------+--------+ +:ref:`int` **threading/worker_pool/max_threads** = ``-1`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_threading/worker_pool/use_system_threads_for_low_priority_tasks: -- :ref:`bool` **threading/worker_pool/use_system_threads_for_low_priority_tasks** +.. rst-class:: classref-property -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ +:ref:`bool` **threading/worker_pool/use_system_threads_for_low_priority_tasks** = ``true`` .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_xr/openxr/default_action_map: -- :ref:`String` **xr/openxr/default_action_map** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``"res://openxr_action_map.tres"`` | -+-----------+------------------------------------+ +:ref:`String` **xr/openxr/default_action_map** = ``"res://openxr_action_map.tres"`` Action map configuration to load by default. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_xr/openxr/enabled: -- :ref:`bool` **xr/openxr/enabled** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **xr/openxr/enabled** = ``false`` If ``true`` Godot will setup and initialize OpenXR on startup. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_xr/openxr/form_factor: -- :ref:`int` **xr/openxr/form_factor** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``"0"`` | -+-----------+---------+ +:ref:`int` **xr/openxr/form_factor** = ``"0"`` Specify whether OpenXR should be configured for an HMD or a hand held device. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_xr/openxr/reference_space: -- :ref:`int` **xr/openxr/reference_space** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``"1"`` | -+-----------+---------+ +:ref:`int` **xr/openxr/reference_space** = ``"1"`` Specify the default reference space. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_xr/openxr/view_configuration: -- :ref:`int` **xr/openxr/view_configuration** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``"1"`` | -+-----------+---------+ +:ref:`int` **xr/openxr/view_configuration** = ``"1"`` Specify the view configuration with which to configure OpenXR setting up either Mono or Stereo rendering. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_property_xr/shaders/enabled: -- :ref:`bool` **xr/shaders/enabled** +.. rst-class:: classref-property -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ +:ref:`bool` **xr/shaders/enabled** = ``false`` If ``true``, Godot will compile shaders required for XR. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ProjectSettings_method_add_property_info: -- void **add_property_info** **(** :ref:`Dictionary` hint **)** +.. rst-class:: classref-method + +void **add_property_info** **(** :ref:`Dictionary` hint **)** Adds a custom property info to a property. The dictionary must contain: @@ -9202,27 +9569,39 @@ Adds a custom property info to a property. The dictionary must contain: +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_clear: -- void **clear** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **clear** **(** :ref:`String` name **)** Clears the whole configuration (not recommended, may break things). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_get_order: -- :ref:`int` **get_order** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_order** **(** :ref:`String` name **)** |const| Returns the order of a configuration value (influences when saved to the config file). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_get_setting: -- :ref:`Variant` **get_setting** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_setting** **(** :ref:`String` name **)** |const| Returns the value of a setting. @@ -9241,11 +9620,15 @@ Returns the value of a setting. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_globalize_path: -- :ref:`String` **globalize_path** **(** :ref:`String` path **)** |const| +.. rst-class:: classref-method + +:ref:`String` **globalize_path** **(** :ref:`String` path **)** |const| 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`. @@ -9265,19 +9648,27 @@ Returns the absolute, native OS path corresponding to the localized ``path`` (st # but is close enough in spirit. path = OS.get_executable_path().get_base_dir().path_join("hello.txt") +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_has_setting: -- :ref:`bool` **has_setting** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_setting** **(** :ref:`String` name **)** |const| Returns ``true`` if a configuration value is present. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_load_resource_pack: -- :ref:`bool` **load_resource_pack** **(** :ref:`String` pack, :ref:`bool` replace_files=true, :ref:`int` offset=0 **)** +.. rst-class:: classref-method + +:ref:`bool` **load_resource_pack** **(** :ref:`String` pack, :ref:`bool` replace_files=true, :ref:`int` offset=0 **)** Loads the contents of the .pck or .zip file specified by ``pack`` into the resource filesystem (``res://``). Returns ``true`` on success. @@ -9285,63 +9676,91 @@ Loads the contents of the .pck or .zip file specified by ``pack`` into the resou \ **Note:** The optional ``offset`` parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_localize_path: -- :ref:`String` **localize_path** **(** :ref:`String` path **)** |const| +.. rst-class:: classref-method + +:ref:`String` **localize_path** **(** :ref:`String` path **)** |const| Returns the localized path (starting with ``res://``) corresponding to the absolute, native OS ``path``. See also :ref:`globalize_path`. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_save: -- :ref:`Error` **save** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **save** **(** **)** Saves the configuration to the ``project.godot`` file. -\ **Note:** This method is intended to be used by editor plugins, as modified ``ProjectSettings`` can't be loaded back in the running app. If you want to change project settings in exported projects, use :ref:`save_custom` to save ``override.cfg`` file. +\ **Note:** This method is intended to be used by editor plugins, as modified **ProjectSettings** can't be loaded back in the running app. If you want to change project settings in exported projects, use :ref:`save_custom` to save ``override.cfg`` file. + +.. rst-class:: classref-item-separator ---- .. _class_ProjectSettings_method_save_custom: -- :ref:`Error` **save_custom** **(** :ref:`String` file **)** +.. rst-class:: classref-method + +:ref:`Error` **save_custom** **(** :ref:`String` file **)** Saves the configuration to a custom file. The file extension must be ``.godot`` (to save in text-based :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_set_initial_value: -- void **set_initial_value** **(** :ref:`String` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_initial_value** **(** :ref:`String` name, :ref:`Variant` value **)** Sets the specified property's initial value. This is the value the property reverts to. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_set_order: -- void **set_order** **(** :ref:`String` name, :ref:`int` position **)** +.. rst-class:: classref-method + +void **set_order** **(** :ref:`String` name, :ref:`int` position **)** Sets the order of a configuration value (influences when saved to the config file). +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_set_restart_if_changed: -- void **set_restart_if_changed** **(** :ref:`String` name, :ref:`bool` restart **)** +.. rst-class:: classref-method + +void **set_restart_if_changed** **(** :ref:`String` name, :ref:`bool` restart **)** Sets whether a setting requires restarting the editor to properly take effect. \ **Note:** This is just a hint to display to the user that the editor must be restarted for changes to take effect. Enabling :ref:`set_restart_if_changed` does *not* delay the setting being set when changed. +.. rst-class:: classref-item-separator + ---- .. _class_ProjectSettings_method_set_setting: -- void **set_setting** **(** :ref:`String` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_setting** **(** :ref:`String` name, :ref:`Variant` value **)** Sets the value of a setting. diff --git a/classes/class_propertytweener.rst b/classes/class_propertytweener.rst index 2312bed0d..20866c497 100644 --- a/classes/class_propertytweener.rst +++ b/classes/class_propertytweener.rst @@ -14,36 +14,51 @@ PropertyTweener Interpolates an :ref:`Object`'s property over time. +.. rst-class:: classref-introduction-group + Description ----------- -``PropertyTweener`` is used to interpolate a property in an object. See :ref:`Tween.tween_property` for more usage information. +**PropertyTweener** is used to interpolate a property in an object. See :ref:`Tween.tween_property` for more usage information. -\ **Note:** :ref:`Tween.tween_property` is the only correct way to create ``PropertyTweener``. Any ``PropertyTweener`` created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_property` is the only correct way to create **PropertyTweener**. Any **PropertyTweener** created manually will not function correctly. + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`as_relative` **(** **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`from` **(** :ref:`Variant` value **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`from_current` **(** **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | -+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener` | :ref:`as_relative` **(** **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener` | :ref:`from` **(** :ref:`Variant` value **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener` | :ref:`from_current` **(** **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_PropertyTweener_method_as_relative: -- :ref:`PropertyTweener` **as_relative** **(** **)** +.. rst-class:: classref-method + +:ref:`PropertyTweener` **as_relative** **(** **)** When called, the final value will be used as a relative value instead. @@ -54,13 +69,17 @@ When called, the final value will be used as a relative value instead. var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right +.. rst-class:: classref-item-separator + ---- .. _class_PropertyTweener_method_from: -- :ref:`PropertyTweener` **from** **(** :ref:`Variant` value **)** +.. rst-class:: classref-method -Sets a custom initial value to the ``PropertyTweener``. +:ref:`PropertyTweener` **from** **(** :ref:`Variant` value **)** + +Sets a custom initial value to the **PropertyTweener**. \ **Example:**\ @@ -69,40 +88,56 @@ Sets a custom initial value to the ``PropertyTweener``. var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) #this will move the node from position (100, 100) to (200, 100) +.. rst-class:: classref-item-separator + ---- .. _class_PropertyTweener_method_from_current: -- :ref:`PropertyTweener` **from_current** **(** **)** +.. rst-class:: classref-method -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` with the current value. These two calls will do the same: +:ref:`PropertyTweener` **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` with the current value. These two calls will do the same: :: tween.tween_property(self, "position", Vector2(200, 100), 1).from(position) tween.tween_property(self, "position", Vector2(200, 100), 1).from_current() +.. rst-class:: classref-item-separator + ---- .. _class_PropertyTweener_method_set_delay: -- :ref:`PropertyTweener` **set_delay** **(** :ref:`float` delay **)** +.. rst-class:: classref-method -Sets the time in seconds after which the ``PropertyTweener`` will start interpolating. By default there's no delay. +:ref:`PropertyTweener` **set_delay** **(** :ref:`float` delay **)** + +Sets the time in seconds after which the **PropertyTweener** will start interpolating. By default there's no delay. + +.. rst-class:: classref-item-separator ---- .. _class_PropertyTweener_method_set_ease: -- :ref:`PropertyTweener` **set_ease** **(** :ref:`EaseType` ease **)** +.. rst-class:: classref-method + +:ref:`PropertyTweener` **set_ease** **(** :ref:`EaseType` ease **)** Sets the type of used easing from :ref:`EaseType`. If not set, the default easing is used from the :ref:`Tween` that contains this Tweener. +.. rst-class:: classref-item-separator + ---- .. _class_PropertyTweener_method_set_trans: -- :ref:`PropertyTweener` **set_trans** **(** :ref:`TransitionType` trans **)** +.. rst-class:: classref-method + +:ref:`PropertyTweener` **set_trans** **(** :ref:`TransitionType` trans **)** Sets the type of used transition from :ref:`TransitionType`. If not set, the default transition is used from the :ref:`Tween` that contains this Tweener. diff --git a/classes/class_quadmesh.rst b/classes/class_quadmesh.rst index 733c3bddf..4a586a45f 100644 --- a/classes/class_quadmesh.rst +++ b/classes/class_quadmesh.rst @@ -14,10 +14,14 @@ QuadMesh Class representing a square mesh facing the camera. +.. rst-class:: classref-introduction-group + Description ----------- -Class representing a square :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this rotation is more suited for use with billboarded materials. A ``QuadMesh`` is equivalent to a :ref:`PlaneMesh` except its default :ref:`PlaneMesh.orientation` is :ref:`PlaneMesh.FACE_Z`. +Class representing a square :ref:`PrimitiveMesh`. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this rotation is more suited for use with billboarded materials. A **QuadMesh** is equivalent to a :ref:`PlaneMesh` except its default :ref:`PlaneMesh.orientation` is :ref:`PlaneMesh.FACE_Z`. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -26,14 +30,19 @@ Tutorials - `2D in 3D Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------+-------------+-------------------------------------------------------------------------------+ -| :ref:`Orientation` | orientation | ``2`` (overrides :ref:`PlaneMesh`) | -+------------------------------------------------+-------------+-------------------------------------------------------------------------------+ -| :ref:`Vector2` | size | ``Vector2(1, 1)`` (overrides :ref:`PlaneMesh`) | -+------------------------------------------------+-------------+-------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + | :ref:`Orientation` | orientation | ``2`` (overrides :ref:`PlaneMesh`) | + +------------------------------------------------+-------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | size | ``Vector2(1, 1)`` (overrides :ref:`PlaneMesh`) | + +------------------------------------------------+-------------+-------------------------------------------------------------------------------+ .. |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.)` diff --git a/classes/class_quadoccluder3d.rst b/classes/class_quadoccluder3d.rst index 6076db47e..6b080fc34 100644 --- a/classes/class_quadoccluder3d.rst +++ b/classes/class_quadoccluder3d.rst @@ -14,34 +14,46 @@ QuadOccluder3D Flat plane shape for use with occlusion culling in :ref:`OccluderInstance3D`. +.. rst-class:: classref-introduction-group + Description ----------- -``QuadOccluder3D`` stores a flat plane shape that can be used by the engine's occlusion culling system. See also :ref:`PolygonOccluder3D` if you need to customize the quad's shape. +**QuadOccluder3D** stores a flat plane shape that can be used by the engine's occlusion culling system. See also :ref:`PolygonOccluder3D` if you need to customize the quad's shape. See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(1, 1)`` | -+-------------------------------+-------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(1, 1)`` | + +-------------------------------+-------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_QuadOccluder3D_property_size: -- :ref:`Vector2` **size** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(1, 1)`` | -+-----------+-------------------+ -| *Setter* | set_size(value) | -+-----------+-------------------+ -| *Getter* | get_size() | -+-----------+-------------------+ +:ref:`Vector2` **size** = ``Vector2(1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_size** **(** **)** The quad's size in 3D units. diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index eb52ed5fd..6666ffb05 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -12,6 +12,8 @@ Quaternion Quaternion. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ It is similar to Basis, which implements matrix representation of rotations, and Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,482 +32,688 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------+---------+ -| :ref:`float` | :ref:`w` | ``1.0`` | -+---------------------------+---------------------------------------+---------+ -| :ref:`float` | :ref:`x` | ``0.0`` | -+---------------------------+---------------------------------------+---------+ -| :ref:`float` | :ref:`y` | ``0.0`` | -+---------------------------+---------------------------------------+---------+ -| :ref:`float` | :ref:`z` | ``0.0`` | -+---------------------------+---------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------+---------+ + | :ref:`float` | :ref:`w` | ``1.0`` | + +---------------------------+---------------------------------------+---------+ + | :ref:`float` | :ref:`x` | ``0.0`` | + +---------------------------+---------------------------------------+---------+ + | :ref:`float` | :ref:`y` | ``0.0`` | + +---------------------------+---------------------------------------+---------+ + | :ref:`float` | :ref:`z` | ``0.0`` | + +---------------------------+---------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`Quaternion` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Quaternion` from **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Vector3` arc_from, :ref:`Vector3` arc_to **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Basis` from **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`Quaternion` **(** **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Quaternion` from **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Vector3` arc_from, :ref:`Vector3` arc_to **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`Basis` from **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`Quaternion` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to` **(** :ref:`Quaternion` to **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Quaternion` with **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`exp` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`from_euler` **(** :ref:`Vector3` euler **)** |static| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angle` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_axis` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_euler` **(** :ref:`int` order=2 **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`inverse` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Quaternion` to **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`log` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`normalized` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`slerp` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`slerpni` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`spherical_cubic_interpolate` **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`spherical_cubic_interpolate_in_time` **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to` **(** :ref:`Quaternion` to **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot` **(** :ref:`Quaternion` with **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`exp` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`from_euler` **(** :ref:`Vector3` euler **)** |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_angle` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_axis` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_euler` **(** :ref:`int` order=2 **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`inverse` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Quaternion` to **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`log` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`normalized` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`slerp` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`slerpni` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`spherical_cubic_interpolate` **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`spherical_cubic_interpolate_in_time` **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Quaternion` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator *` **(** :ref:`float` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator *` **(** :ref:`int` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator +` **(** :ref:`Quaternion` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator -` **(** :ref:`Quaternion` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator /` **(** :ref:`float` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator /` **(** :ref:`int` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Quaternion` right **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator unary+` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`operator unary-` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Quaternion` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator *` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator *` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator +` **(** :ref:`Quaternion` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator -` **(** :ref:`Quaternion` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator /` **(** :ref:`float` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator /` **(** :ref:`int` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Quaternion` right **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator unary+` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`operator unary-` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Quaternion_constant_IDENTITY: -- **IDENTITY** = **Quaternion(0, 0, 0, 1)** --- The identity quaternion, representing no rotation. Equivalent to an identity :ref:`Basis` matrix. If a vector is transformed by an identity quaternion, it will not change. +.. rst-class:: classref-constant + +**IDENTITY** = ``Quaternion(0, 0, 0, 1)`` + +The identity quaternion, representing no rotation. Equivalent to an identity :ref:`Basis` matrix. If a vector is transformed by an identity quaternion, it will not change. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Quaternion_property_w: -- :ref:`float` **w** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ +:ref:`float` **w** = ``1.0`` W component of the quaternion (real part). Quaternion components should usually not be manipulated directly. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_property_x: -- :ref:`float` **x** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **x** = ``0.0`` X component of the quaternion (imaginary ``i`` axis part). Quaternion components should usually not be manipulated directly. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_property_y: -- :ref:`float` **y** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **y** = ``0.0`` Y component of the quaternion (imaginary ``j`` axis part). Quaternion components should usually not be manipulated directly. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_property_z: -- :ref:`float` **z** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **z** = ``0.0`` Z component of the quaternion (imaginary ``k`` axis part). Quaternion components should usually not be manipulated directly. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Quaternion_constructor_Quaternion: -- :ref:`Quaternion` **Quaternion** **(** **)** +.. rst-class:: classref-constructor + +:ref:`Quaternion` **Quaternion** **(** **)** Constructs a default-initialized quaternion with all components set to ``0``. ----- - -- :ref:`Quaternion` **Quaternion** **(** :ref:`Quaternion` from **)** - -Constructs a ``Quaternion`` as a copy of the given ``Quaternion``. +.. rst-class:: classref-item-separator ---- -- :ref:`Quaternion` **Quaternion** **(** :ref:`Vector3` arc_from, :ref:`Vector3` arc_to **)** +.. rst-class:: classref-constructor + +:ref:`Quaternion` **Quaternion** **(** :ref:`Quaternion` from **)** + +Constructs a **Quaternion** as a copy of the given **Quaternion**. + +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + +:ref:`Quaternion` **Quaternion** **(** :ref:`Vector3` arc_from, :ref:`Vector3` arc_to **)** .. container:: contribute There is currently no description for this constructor. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- -- :ref:`Quaternion` **Quaternion** **(** :ref:`Vector3` axis, :ref:`float` angle **)** +.. rst-class:: classref-constructor + +:ref:`Quaternion` **Quaternion** **(** :ref:`Vector3` axis, :ref:`float` angle **)** Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. +.. rst-class:: classref-item-separator + ---- -- :ref:`Quaternion` **Quaternion** **(** :ref:`Basis` from **)** +.. rst-class:: classref-constructor + +:ref:`Quaternion` **Quaternion** **(** :ref:`Basis` from **)** Constructs a quaternion from the given :ref:`Basis`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Quaternion` **Quaternion** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** +.. rst-class:: classref-constructor + +:ref:`Quaternion` **Quaternion** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** Constructs a quaternion defined by the given values. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Quaternion_method_angle_to: -- :ref:`float` **angle_to** **(** :ref:`Quaternion` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **angle_to** **(** :ref:`Quaternion` to **)** |const| 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. \ **Note:** The magnitude of the floating-point error for this method is abnormally high, so methods such as ``is_zero_approx`` will not work reliably. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_dot: -- :ref:`float` **dot** **(** :ref:`Quaternion` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **dot** **(** :ref:`Quaternion` with **)** |const| Returns the dot product of two quaternions. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_exp: -- :ref:`Quaternion` **exp** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **exp** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_from_euler: -- :ref:`Quaternion` **from_euler** **(** :ref:`Vector3` euler **)** |static| +.. rst-class:: classref-method + +:ref:`Quaternion` **from_euler** **(** :ref:`Vector3` euler **)** |static| Constructs a Quaternion from Euler angles in YXZ rotation order. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_get_angle: -- :ref:`float` **get_angle** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_angle** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_get_axis: -- :ref:`Vector3` **get_axis** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_axis** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_get_euler: -- :ref:`Vector3` **get_euler** **(** :ref:`int` order=2 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_euler** **(** :ref:`int` order=2 **)** |const| 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 for possible values. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_inverse: -- :ref:`Quaternion` **inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **inverse** **(** **)** |const| Returns the inverse of the quaternion. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Quaternion` to **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Quaternion` to **)** |const| Returns ``true`` if this quaternion and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this quaternion is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_is_normalized: -- :ref:`bool` **is_normalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_normalized** **(** **)** |const| Returns whether the quaternion is normalized or not. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_length: -- :ref:`float` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length** **(** **)** |const| Returns the length of the quaternion. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_length_squared: -- :ref:`float` **length_squared** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length_squared** **(** **)** |const| Returns the length of the quaternion, squared. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_log: -- :ref:`Quaternion` **log** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **log** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_normalized: -- :ref:`Quaternion` **normalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **normalized** **(** **)** |const| Returns a copy of the quaternion, normalized to unit length. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_slerp: -- :ref:`Quaternion` **slerp** **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **slerp** **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| Returns the result of the spherical linear interpolation between this quaternion and ``to`` by amount ``weight``. \ **Note:** Both quaternions must be normalized. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_slerpni: -- :ref:`Quaternion` **slerpni** **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **slerpni** **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_spherical_cubic_interpolate: -- :ref:`Quaternion` **spherical_cubic_interpolate** **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **spherical_cubic_interpolate** **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight **)** |const| Performs a spherical cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_method_spherical_cubic_interpolate_in_time: -- :ref:`Quaternion` **spherical_cubic_interpolate_in_time** **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **spherical_cubic_interpolate_in_time** **(** :ref:`Quaternion` b, :ref:`Quaternion` pre_a, :ref:`Quaternion` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_Quaternion_operator_neq_bool: +.. _class_Quaternion_operator_neq_Quaternion: -- :ref:`bool` **operator !=** **(** :ref:`Quaternion` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Quaternion` right **)** Returns ``true`` if the quaternions are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- .. _class_Quaternion_operator_mul_Quaternion: -- :ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** +.. rst-class:: classref-operator + +:ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** 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). ----- - -- :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** - -Rotates (multiplies) the :ref:`Vector3` by the given ``Quaternion``. +.. rst-class:: classref-item-separator ---- -- :ref:`Quaternion` **operator *** **(** :ref:`float` right **)** +.. _class_Quaternion_operator_mul_Vector3: -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. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** + +Rotates (multiplies) the :ref:`Vector3` by the given **Quaternion**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Quaternion` **operator *** **(** :ref:`int` right **)** +.. _class_Quaternion_operator_mul_float: -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. +.. rst-class:: classref-operator + +:ref:`Quaternion` **operator *** **(** :ref:`float` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Quaternion_operator_mul_int: + +.. rst-class:: classref-operator + +:ref:`Quaternion` **operator *** **(** :ref:`int` right **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Quaternion_operator_sum_Quaternion: -- :ref:`Quaternion` **operator +** **(** :ref:`Quaternion` right **)** +.. rst-class:: classref-operator -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. +:ref:`Quaternion` **operator +** **(** :ref:`Quaternion` right **)** + +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 ---- .. _class_Quaternion_operator_dif_Quaternion: -- :ref:`Quaternion` **operator -** **(** :ref:`Quaternion` right **)** +.. rst-class:: classref-operator -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. +:ref:`Quaternion` **operator -** **(** :ref:`Quaternion` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Quaternion_operator_div_Quaternion: +.. _class_Quaternion_operator_div_float: -- :ref:`Quaternion` **operator /** **(** :ref:`float` right **)** +.. rst-class:: classref-operator -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. +:ref:`Quaternion` **operator /** **(** :ref:`float` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -- :ref:`Quaternion` **operator /** **(** :ref:`int` right **)** +.. _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. +.. rst-class:: classref-operator + +:ref:`Quaternion` **operator /** **(** :ref:`int` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Quaternion_operator_eq_bool: +.. _class_Quaternion_operator_eq_Quaternion: -- :ref:`bool` **operator ==** **(** :ref:`Quaternion` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Quaternion` right **)** Returns ``true`` if the quaternions are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- -.. _class_Quaternion_operator_idx_float: +.. _class_Quaternion_operator_idx_int: -- :ref:`float` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`float` **operator []** **(** :ref:`int` 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``. +.. rst-class:: classref-item-separator + ---- -.. _class_Quaternion_operator_unplus_Quaternion: +.. _class_Quaternion_operator_unplus: -- :ref:`Quaternion` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Quaternion` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Quaternion_operator_unminus_Quaternion: +.. _class_Quaternion_operator_unminus: -- :ref:`Quaternion` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Quaternion` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_randomnumbergenerator.rst b/classes/class_randomnumbergenerator.rst index 9a36611d7..da4decd0a 100644 --- a/classes/class_randomnumbergenerator.rst +++ b/classes/class_randomnumbergenerator.rst @@ -14,6 +14,8 @@ RandomNumberGenerator A class for generating pseudo-random numbers. +.. rst-class:: classref-introduction-group + Description ----------- @@ -31,51 +33,68 @@ To generate a random float number (within a given range) based on a time-dependa \ **Note:** The default values of :ref:`seed` and :ref:`state` properties are pseudo-random, and change when calling :ref:`randomize`. The ``0`` value documented here is a placeholder, and not the actual default seed. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Random number generation <../tutorials/math/random_number_generation>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+----------------------------------------------------------+-------+ -| :ref:`int` | :ref:`seed` | ``0`` | -+-----------------------+----------------------------------------------------------+-------+ -| :ref:`int` | :ref:`state` | ``0`` | -+-----------------------+----------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------+-------+ + | :ref:`int` | :ref:`seed` | ``0`` | + +-----------------------+----------------------------------------------------------+-------+ + | :ref:`int` | :ref:`state` | ``0`` | + +-----------------------+----------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`randf` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`randf_range` **(** :ref:`float` from, :ref:`float` to **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`randfn` **(** :ref:`float` mean=0.0, :ref:`float` deviation=1.0 **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`randi` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`randi_range` **(** :ref:`int` from, :ref:`int` to **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`randomize` **(** **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randf` **(** **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randf_range` **(** :ref:`float` from, :ref:`float` to **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randfn` **(** :ref:`float` mean=0.0, :ref:`float` deviation=1.0 **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`randi` **(** **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`randi_range` **(** :ref:`int` from, :ref:`int` to **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`randomize` **(** **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RandomNumberGenerator_property_seed: -- :ref:`int` **seed** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_seed(value) | -+-----------+-----------------+ -| *Getter* | get_seed() | -+-----------+-----------------+ +:ref:`int` **seed** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_seed** **(** :ref:`int` value **)** +- :ref:`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. @@ -89,19 +108,20 @@ Initializes the random number generator state based on the given seed value. A g rng.seed = hash("Godot") rng.state = 100 # Restore to some previously saved state. +.. rst-class:: classref-item-separator + ---- .. _class_RandomNumberGenerator_property_state: -- :ref:`int` **state** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_state(value) | -+-----------+------------------+ -| *Getter* | get_state() | -+-----------+------------------+ +:ref:`int` **state** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_state** **(** :ref:`int` value **)** +- :ref:`int` **get_state** **(** **)** The current state of the random number generator. Save and restore this property to restore the generator to a previous state: @@ -116,54 +136,82 @@ The current state of the random number generator. Save and restore this property \ **Note:** Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use :ref:`seed` instead. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RandomNumberGenerator_method_randf: -- :ref:`float` **randf** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **randf** **(** **)** Returns a pseudo-random float between ``0.0`` and ``1.0`` (inclusive). +.. rst-class:: classref-item-separator + ---- .. _class_RandomNumberGenerator_method_randf_range: -- :ref:`float` **randf_range** **(** :ref:`float` from, :ref:`float` to **)** +.. rst-class:: classref-method + +:ref:`float` **randf_range** **(** :ref:`float` from, :ref:`float` to **)** Returns a pseudo-random float between ``from`` and ``to`` (inclusive). +.. rst-class:: classref-item-separator + ---- .. _class_RandomNumberGenerator_method_randfn: -- :ref:`float` **randfn** **(** :ref:`float` mean=0.0, :ref:`float` deviation=1.0 **)** +.. rst-class:: classref-method + +:ref:`float` **randfn** **(** :ref:`float` mean=0.0, :ref:`float` deviation=1.0 **)** Returns a `normally-distributed `__ pseudo-random number, using Box-Muller transform with the specified ``mean`` and a standard ``deviation``. This is also called Gaussian distribution. +.. rst-class:: classref-item-separator + ---- .. _class_RandomNumberGenerator_method_randi: -- :ref:`int` **randi** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **randi** **(** **)** Returns a pseudo-random 32-bit unsigned integer between ``0`` and ``4294967295`` (inclusive). +.. rst-class:: classref-item-separator + ---- .. _class_RandomNumberGenerator_method_randi_range: -- :ref:`int` **randi_range** **(** :ref:`int` from, :ref:`int` to **)** +.. rst-class:: classref-method + +:ref:`int` **randi_range** **(** :ref:`int` from, :ref:`int` to **)** Returns a pseudo-random 32-bit signed integer between ``from`` and ``to`` (inclusive). +.. rst-class:: classref-item-separator + ---- .. _class_RandomNumberGenerator_method_randomize: -- void **randomize** **(** **)** +.. rst-class:: classref-method -Setups a time-based seed to for this ``RandomNumberGenerator`` instance. Unlike the :ref:`@GlobalScope` random number generation functions, different ``RandomNumberGenerator`` instances can use different seeds. +void **randomize** **(** **)** + +Setups a time-based seed to for this **RandomNumberGenerator** instance. Unlike the :ref:`@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.)` diff --git a/classes/class_range.rst b/classes/class_range.rst index e2684eb8b..fa189bda1 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -16,261 +16,321 @@ Range Abstract base class for range-based controls. +.. rst-class:: classref-introduction-group + Description ----------- Range is a base class for :ref:`Control` nodes that change a floating-point :ref:`value` between a :ref:`min_value` and :ref:`max_value`, using a configured :ref:`step` and :ref:`page` size. See e.g. :ref:`ScrollBar` and :ref:`Slider` for examples of higher level nodes using Range. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_greater` | ``false`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_lesser` | ``false`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`exp_edit` | ``false`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`max_value` | ``100.0`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`min_value` | ``0.0`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`page` | ``0.0`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`ratio` | | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rounded` | ``false`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``0`` (overrides :ref:`Control`) | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`step` | ``0.01`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`value` | ``0.0`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_greater` | ``false`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_lesser` | ``false`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`exp_edit` | ``false`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`max_value` | ``100.0`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`min_value` | ``0.0`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`page` | ``0.0`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`ratio` | | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rounded` | ``false`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_vertical | ``0`` (overrides :ref:`Control`) | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`step` | ``0.01`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`value` | ``0.0`` | + +---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_value_changed` **(** :ref:`float` new_value **)** |virtual| | -+------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_value_no_signal` **(** :ref:`float` value **)** | -+------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`share` **(** :ref:`Node` with **)** | -+------+--------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unshare` **(** **)** | -+------+--------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_value_changed` **(** :ref:`float` new_value **)** |virtual| | + +------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_value_no_signal` **(** :ref:`float` value **)** | + +------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`share` **(** :ref:`Node` with **)** | + +------+--------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unshare` **(** **)** | + +------+--------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Range_signal_changed: -- **changed** **(** **)** +.. rst-class:: classref-signal + +**changed** **(** **)** Emitted when :ref:`min_value`, :ref:`max_value`, :ref:`page`, or :ref:`step` change. +.. rst-class:: classref-item-separator + ---- .. _class_Range_signal_value_changed: -- **value_changed** **(** :ref:`float` value **)** +.. rst-class:: classref-signal + +**value_changed** **(** :ref:`float` value **)** Emitted when :ref:`value` changes. When used on a :ref:`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`, consider using a *debouncing* :ref:`Timer` to call the function less often. \ **Note:** Unlike signals such as :ref:`LineEdit.text_changed`, :ref:`value_changed` is also emitted when ``value`` is set directly via code. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Range_property_allow_greater: -- :ref:`bool` **allow_greater** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_allow_greater(value) | -+-----------+--------------------------+ -| *Getter* | is_greater_allowed() | -+-----------+--------------------------+ +:ref:`bool` **allow_greater** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_greater** **(** :ref:`bool` value **)** +- :ref:`bool` **is_greater_allowed** **(** **)** If ``true``, :ref:`value` may be greater than :ref:`max_value`. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_allow_lesser: -- :ref:`bool` **allow_lesser** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_allow_lesser(value) | -+-----------+-------------------------+ -| *Getter* | is_lesser_allowed() | -+-----------+-------------------------+ +:ref:`bool` **allow_lesser** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_lesser** **(** :ref:`bool` value **)** +- :ref:`bool` **is_lesser_allowed** **(** **)** If ``true``, :ref:`value` may be less than :ref:`min_value`. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_exp_edit: -- :ref:`bool` **exp_edit** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_exp_ratio(value) | -+-----------+----------------------+ -| *Getter* | is_ratio_exp() | -+-----------+----------------------+ +:ref:`bool` **exp_edit** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_exp_ratio** **(** :ref:`bool` value **)** +- :ref:`bool` **is_ratio_exp** **(** **)** If ``true``, and ``min_value`` is greater than 0, ``value`` will be represented exponentially rather than linearly. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_max_value: -- :ref:`float` **max_value** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``100.0`` | -+-----------+----------------+ -| *Setter* | set_max(value) | -+-----------+----------------+ -| *Getter* | get_max() | -+-----------+----------------+ +:ref:`float` **max_value** = ``100.0`` + +.. rst-class:: classref-property-setget + +- void **set_max** **(** :ref:`float` value **)** +- :ref:`float` **get_max** **(** **)** Maximum value. Range is clamped if ``value`` is greater than ``max_value``. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_min_value: -- :ref:`float` **min_value** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.0`` | -+-----------+----------------+ -| *Setter* | set_min(value) | -+-----------+----------------+ -| *Getter* | get_min() | -+-----------+----------------+ +:ref:`float` **min_value** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_min** **(** :ref:`float` value **)** +- :ref:`float` **get_min** **(** **)** Minimum value. Range is clamped if ``value`` is less than ``min_value``. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_page: -- :ref:`float` **page** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.0`` | -+-----------+-----------------+ -| *Setter* | set_page(value) | -+-----------+-----------------+ -| *Getter* | get_page() | -+-----------+-----------------+ +:ref:`float` **page** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_page** **(** :ref:`float` value **)** +- :ref:`float` **get_page** **(** **)** Page size. Used mainly for :ref:`ScrollBar`. ScrollBar's length is its size multiplied by ``page`` over the difference between ``min_value`` and ``max_value``. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_ratio: -- :ref:`float` **ratio** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_as_ratio(value) | -+----------+---------------------+ -| *Getter* | get_as_ratio() | -+----------+---------------------+ +:ref:`float` **ratio** + +.. rst-class:: classref-property-setget + +- void **set_as_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_as_ratio** **(** **)** The value mapped between 0 and 1. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_rounded: -- :ref:`bool` **rounded** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_use_rounded_values(value) | -+-----------+-------------------------------+ -| *Getter* | is_using_rounded_values() | -+-----------+-------------------------------+ +:ref:`bool` **rounded** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_rounded_values** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_rounded_values** **(** **)** If ``true``, ``value`` will always be rounded to the nearest integer. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_step: -- :ref:`float` **step** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.01`` | -+-----------+-----------------+ -| *Setter* | set_step(value) | -+-----------+-----------------+ -| *Getter* | get_step() | -+-----------+-----------------+ +:ref:`float` **step** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_step** **(** :ref:`float` value **)** +- :ref:`float` **get_step** **(** **)** If greater than 0, ``value`` will always be rounded to a multiple of ``step``. If ``rounded`` is also ``true``, ``value`` will first be rounded to a multiple of ``step`` then rounded to the nearest integer. +.. rst-class:: classref-item-separator + ---- .. _class_Range_property_value: -- :ref:`float` **value** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_value(value) | -+-----------+------------------+ -| *Getter* | get_value() | -+-----------+------------------+ +:ref:`float` **value** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_value** **(** :ref:`float` value **)** +- :ref:`float` **get_value** **(** **)** Range's current value. Changing this property (even via code) will trigger :ref:`value_changed` signal. Use :ref:`set_value_no_signal` if you want to avoid it. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Range_method__value_changed: -- void **_value_changed** **(** :ref:`float` new_value **)** |virtual| +.. rst-class:: classref-method -Called when the ``Range``'s value is changed (following the same conditions as :ref:`value_changed`). +void **_value_changed** **(** :ref:`float` new_value **)** |virtual| + +Called when the **Range**'s value is changed (following the same conditions as :ref:`value_changed`). + +.. rst-class:: classref-item-separator ---- .. _class_Range_method_set_value_no_signal: -- void **set_value_no_signal** **(** :ref:`float` value **)** +.. rst-class:: classref-method -Sets the ``Range``'s current value to the specified ``value``, without emitting the :ref:`value_changed` signal. +void **set_value_no_signal** **(** :ref:`float` value **)** + +Sets the **Range**'s current value to the specified ``value``, without emitting the :ref:`value_changed` signal. + +.. rst-class:: classref-item-separator ---- .. _class_Range_method_share: -- void **share** **(** :ref:`Node` with **)** +.. rst-class:: classref-method -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. +void **share** **(** :ref:`Node` with **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Range_method_unshare: -- void **unshare** **(** **)** +.. rst-class:: classref-method -Stops the ``Range`` from sharing its member variables with any other. +void **unshare** **(** **)** + +Stops the **Range** from sharing its member variables with any other. .. |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.)` diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index a854618d9..67b34838c 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -14,6 +14,8 @@ RayCast2D Query the closest object intersecting a ray. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,290 +29,373 @@ Only enabled raycasts will be able to query the space and report collisions. RayCast2D calculates intersection every physics frame (see :ref:`Node`), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use :ref:`force_raycast_update` after adjusting the raycast. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Ray-casting <../tutorials/physics/ray-casting>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+-------------------------------+--------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`exclude_parent` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`hit_from_inside` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 50)`` | -+-------------------------------+--------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`exclude_parent` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`hit_from_inside` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 50)`` | + +-------------------------------+--------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception` **(** :ref:`CollisionObject2D` node **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_exceptions` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_raycast_update` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_point` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception` **(** :ref:`CollisionObject2D` node **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception` **(** :ref:`CollisionObject2D` node **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_exceptions` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_raycast_update` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collision_point` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception` **(** :ref:`CollisionObject2D` node **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RayCast2D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, collision with :ref:`Area2D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, collision with :ref:`PhysicsBody2D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** If ``true``, collisions will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_property_exclude_parent: -- :ref:`bool` **exclude_parent** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_exclude_parent_body(value) | -+-----------+--------------------------------+ -| *Getter* | get_exclude_parent_body() | -+-----------+--------------------------------+ +:ref:`bool` **exclude_parent** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_parent_body** **(** :ref:`bool` value **)** +- :ref:`bool` **get_exclude_parent_body** **(** **)** If ``true``, the parent node will be excluded from collision detection. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_property_hit_from_inside: -- :ref:`bool` **hit_from_inside** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_hit_from_inside(value) | -+-----------+------------------------------+ -| *Getter* | is_hit_from_inside_enabled() | -+-----------+------------------------------+ +:ref:`bool` **hit_from_inside** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_hit_from_inside** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_property_target_position: -- :ref:`Vector2` **target_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 50)`` | -+-----------+----------------------------+ -| *Setter* | set_target_position(value) | -+-----------+----------------------------+ -| *Getter* | get_target_position() | -+-----------+----------------------------+ +:ref:`Vector2` **target_position** = ``Vector2(0, 50)`` + +.. rst-class:: classref-property-setget + +- void **set_target_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_target_position** **(** **)** The ray's destination point, relative to the RayCast's ``position``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RayCast2D_method_add_exception: -- void **add_exception** **(** :ref:`CollisionObject2D` node **)** +.. rst-class:: classref-method + +void **add_exception** **(** :ref:`CollisionObject2D` node **)** Adds a collision exception so the ray does not report collisions with the specified :ref:`CollisionObject2D` node. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_add_exception_rid: -- void **add_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **add_exception_rid** **(** :ref:`RID` rid **)** Adds a collision exception so the ray does not report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_clear_exceptions: -- void **clear_exceptions** **(** **)** +.. rst-class:: classref-method + +void **clear_exceptions** **(** **)** Removes all collision exceptions for this ray. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_force_raycast_update: -- void **force_raycast_update** **(** **)** +.. rst-class:: classref-method + +void **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. \ **Note:** :ref:`enabled` does not need to be ``true`` for this to work. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_get_collider: -- :ref:`Object` **get_collider** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** **)** |const| Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** **)** |const| Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_get_collider_shape: -- :ref:`int` **get_collider_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape** **(** **)** |const| 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` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_get_collision_normal: -- :ref:`Vector2` **get_collision_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collision_normal** **(** **)** |const| 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` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_get_collision_point: -- :ref:`Vector2` **get_collision_point** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collision_point** **(** **)** |const| Returns the collision point at which the ray intersects the closest object. \ **Note:** This point is in the **global** coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_is_colliding: -- :ref:`bool` **is_colliding** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_colliding** **(** **)** |const| Returns whether any object is intersecting with the ray's vector (considering the vector length). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_remove_exception: -- void **remove_exception** **(** :ref:`CollisionObject2D` node **)** +.. rst-class:: classref-method + +void **remove_exception** **(** :ref:`CollisionObject2D` node **)** Removes a collision exception so the ray does report collisions with the specified :ref:`CollisionObject2D` node. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_remove_exception_rid: -- void **remove_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **remove_exception_rid** **(** :ref:`RID` rid **)** Removes a collision exception so the ray does report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast2D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_raycast3d.rst b/classes/class_raycast3d.rst index 5be799f60..8b0ce193d 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -14,6 +14,8 @@ RayCast3D Query the closest object intersecting a ray. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,6 +29,8 @@ Only enabled raycasts will be able to query the space and report collisions. RayCast3D calculates intersection every physics frame (see :ref:`Node`), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use :ref:`force_raycast_update` after adjusting the raycast. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,323 +38,406 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`debug_shape_custom_color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`debug_shape_thickness` | ``2`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`exclude_parent` | ``true`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`hit_from_inside` | ``false`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, -1, 0)`` | -+-------------------------------+------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_shape_custom_color` | ``Color(0, 0, 0, 1)`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`debug_shape_thickness` | ``2`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`exclude_parent` | ``true`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`hit_from_inside` | ``false`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, -1, 0)`` | + +-------------------------------+------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception` **(** :ref:`CollisionObject3D` node **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_exceptions` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_raycast_update` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_normal` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_point` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception` **(** :ref:`CollisionObject3D` node **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception` **(** :ref:`CollisionObject3D` node **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_exceptions` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_raycast_update` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collision_normal` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collision_point` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception` **(** :ref:`CollisionObject3D` node **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RayCast3D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, collision with :ref:`Area3D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, collision with :ref:`PhysicsBody3D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_property_debug_shape_custom_color: -- :ref:`Color` **debug_shape_custom_color** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-------------------------------------+ -| *Setter* | set_debug_shape_custom_color(value) | -+-----------+-------------------------------------+ -| *Getter* | get_debug_shape_custom_color() | -+-----------+-------------------------------------+ +:ref:`Color` **debug_shape_custom_color** = ``Color(0, 0, 0, 1)`` -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. +.. rst-class:: classref-property-setget + +- void **set_debug_shape_custom_color** **(** :ref:`Color` value **)** +- :ref:`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. If set to ``Color(0.0, 0.0, 0.0)`` (by default), the color set in :ref:`ProjectSettings.debug/shapes/collision/shape_color` is used. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_property_debug_shape_thickness: -- :ref:`int` **debug_shape_thickness** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``2`` | -+-----------+----------------------------------+ -| *Setter* | set_debug_shape_thickness(value) | -+-----------+----------------------------------+ -| *Getter* | get_debug_shape_thickness() | -+-----------+----------------------------------+ +:ref:`int` **debug_shape_thickness** = ``2`` -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. +.. rst-class:: classref-property-setget + +- void **set_debug_shape_thickness** **(** :ref:`int` value **)** +- :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_RayCast3D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** If ``true``, collisions will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_property_exclude_parent: -- :ref:`bool` **exclude_parent** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_exclude_parent_body(value) | -+-----------+--------------------------------+ -| *Getter* | get_exclude_parent_body() | -+-----------+--------------------------------+ +:ref:`bool` **exclude_parent** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_parent_body** **(** :ref:`bool` value **)** +- :ref:`bool` **get_exclude_parent_body** **(** **)** If ``true``, collisions will be ignored for this RayCast3D's immediate parent. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_property_hit_from_inside: -- :ref:`bool` **hit_from_inside** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_hit_from_inside(value) | -+-----------+------------------------------+ -| *Getter* | is_hit_from_inside_enabled() | -+-----------+------------------------------+ +:ref:`bool` **hit_from_inside** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_hit_from_inside** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_property_target_position: -- :ref:`Vector3` **target_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, -1, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_target_position(value) | -+-----------+----------------------------+ -| *Getter* | get_target_position() | -+-----------+----------------------------+ +:ref:`Vector3` **target_position** = ``Vector3(0, -1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_target_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_target_position** **(** **)** The ray's destination point, relative to the RayCast's ``position``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RayCast3D_method_add_exception: -- void **add_exception** **(** :ref:`CollisionObject3D` node **)** +.. rst-class:: classref-method + +void **add_exception** **(** :ref:`CollisionObject3D` node **)** Adds a collision exception so the ray does not report collisions with the specified :ref:`CollisionObject3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_add_exception_rid: -- void **add_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **add_exception_rid** **(** :ref:`RID` rid **)** Adds a collision exception so the ray does not report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_clear_exceptions: -- void **clear_exceptions** **(** **)** +.. rst-class:: classref-method + +void **clear_exceptions** **(** **)** Removes all collision exceptions for this ray. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_force_raycast_update: -- void **force_raycast_update** **(** **)** +.. rst-class:: classref-method + +void **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. \ **Note:** :ref:`enabled` does not need to be ``true`` for this to work. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_get_collider: -- :ref:`Object` **get_collider** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** **)** |const| Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** **)** |const| Returns the :ref:`RID` of the first object that the ray intersects, or an empty :ref:`RID` if no object is intersecting the ray (i.e. :ref:`is_colliding` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_get_collider_shape: -- :ref:`int` **get_collider_shape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape** **(** **)** |const| 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` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_get_collision_normal: -- :ref:`Vector3` **get_collision_normal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collision_normal** **(** **)** |const| 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` is ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_get_collision_point: -- :ref:`Vector3` **get_collision_point** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collision_point** **(** **)** |const| Returns the collision point at which the ray intersects the closest object. \ **Note:** This point is in the **global** coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_is_colliding: -- :ref:`bool` **is_colliding** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_colliding** **(** **)** |const| Returns whether any object is intersecting with the ray's vector (considering the vector length). +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_remove_exception: -- void **remove_exception** **(** :ref:`CollisionObject3D` node **)** +.. rst-class:: classref-method + +void **remove_exception** **(** :ref:`CollisionObject3D` node **)** Removes a collision exception so the ray does report collisions with the specified :ref:`CollisionObject3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_remove_exception_rid: -- void **remove_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **remove_exception_rid** **(** :ref:`RID` rid **)** Removes a collision exception so the ray does report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_RayCast3D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_rdattachmentformat.rst b/classes/class_rdattachmentformat.rst index cc8d098ff..698a1e772 100644 --- a/classes/class_rdattachmentformat.rst +++ b/classes/class_rdattachmentformat.rst @@ -16,67 +16,79 @@ RDAttachmentFormat There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`DataFormat` | :ref:`format` | ``36`` | -+------------------------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`TextureSamples` | :ref:`samples` | ``0`` | -+------------------------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`usage_flags` | ``0`` | -+------------------------------------------------------------+-------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+-------------------------------------------------------------------+--------+ + | :ref:`DataFormat` | :ref:`format` | ``36`` | + +------------------------------------------------------------+-------------------------------------------------------------------+--------+ + | :ref:`TextureSamples` | :ref:`samples` | ``0`` | + +------------------------------------------------------------+-------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`usage_flags` | ``0`` | + +------------------------------------------------------------+-------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDAttachmentFormat_property_format: -- :ref:`DataFormat` **format** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``36`` | -+-----------+-------------------+ -| *Setter* | set_format(value) | -+-----------+-------------------+ -| *Getter* | get_format() | -+-----------+-------------------+ +:ref:`DataFormat` **format** = ``36`` + +.. rst-class:: classref-property-setget + +- void **set_format** **(** :ref:`DataFormat` value **)** +- :ref:`DataFormat` **get_format** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDAttachmentFormat_property_samples: -- :ref:`TextureSamples` **samples** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_samples(value) | -+-----------+--------------------+ -| *Getter* | get_samples() | -+-----------+--------------------+ +:ref:`TextureSamples` **samples** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_samples** **(** :ref:`TextureSamples` value **)** +- :ref:`TextureSamples` **get_samples** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDAttachmentFormat_property_usage_flags: -- :ref:`int` **usage_flags** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_usage_flags(value) | -+-----------+------------------------+ -| *Getter* | get_usage_flags() | -+-----------+------------------------+ +:ref:`int` **usage_flags** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_usage_flags** **(** :ref:`int` value **)** +- :ref:`int` **get_usage_flags** **(** **)** .. container:: contribute diff --git a/classes/class_rdframebufferpass.rst b/classes/class_rdframebufferpass.rst index 122bb4791..5fbb6b71d 100644 --- a/classes/class_rdframebufferpass.rst +++ b/classes/class_rdframebufferpass.rst @@ -14,6 +14,8 @@ RDFramebufferPass Framebuffer pass attachment description. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,106 +23,130 @@ This class contains the list of attachment descriptions for a framebuffer pass. Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`color_attachments` | ``PackedInt32Array()`` | -+-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ -| :ref:`int` | :ref:`depth_attachment` | ``-1`` | -+-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`input_attachments` | ``PackedInt32Array()`` | -+-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`preserve_attachments` | ``PackedInt32Array()`` | -+-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ -| :ref:`PackedInt32Array` | :ref:`resolve_attachments` | ``PackedInt32Array()`` | -+-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`color_attachments` | ``PackedInt32Array()`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`int` | :ref:`depth_attachment` | ``-1`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`input_attachments` | ``PackedInt32Array()`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`preserve_attachments` | ``PackedInt32Array()`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array` | :ref:`resolve_attachments` | ``PackedInt32Array()`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_RDFramebufferPass_constant_ATTACHMENT_UNUSED: -- **ATTACHMENT_UNUSED** = **-1** +.. rst-class:: classref-constant + +**ATTACHMENT_UNUSED** = ``-1`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDFramebufferPass_property_color_attachments: -- :ref:`PackedInt32Array` **color_attachments** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------------+ -| *Setter* | set_color_attachments(value) | -+-----------+------------------------------+ -| *Getter* | get_color_attachments() | -+-----------+------------------------------+ +:ref:`PackedInt32Array` **color_attachments** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_color_attachments** **(** :ref:`PackedInt32Array` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_RDFramebufferPass_property_depth_attachment: -- :ref:`int` **depth_attachment** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``-1`` | -+-----------+-----------------------------+ -| *Setter* | set_depth_attachment(value) | -+-----------+-----------------------------+ -| *Getter* | get_depth_attachment() | -+-----------+-----------------------------+ +:ref:`int` **depth_attachment** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_depth_attachment** **(** :ref:`int` value **)** +- :ref:`int` **get_depth_attachment** **(** **)** Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is required for this pass. +.. rst-class:: classref-item-separator + ---- .. _class_RDFramebufferPass_property_input_attachments: -- :ref:`PackedInt32Array` **input_attachments** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+------------------------------+ -| *Setter* | set_input_attachments(value) | -+-----------+------------------------------+ -| *Getter* | get_input_attachments() | -+-----------+------------------------------+ +:ref:`PackedInt32Array` **input_attachments** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_input_attachments** **(** :ref:`PackedInt32Array` value **)** +- :ref:`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` for the uniform set. +.. rst-class:: classref-item-separator + ---- .. _class_RDFramebufferPass_property_preserve_attachments: -- :ref:`PackedInt32Array` **preserve_attachments** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+---------------------------------+ -| *Setter* | set_preserve_attachments(value) | -+-----------+---------------------------------+ -| *Getter* | get_preserve_attachments() | -+-----------+---------------------------------+ +:ref:`PackedInt32Array` **preserve_attachments** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_preserve_attachments** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_preserve_attachments** **(** **)** Attachments to preserve in this pass (otherwise they are erased). +.. rst-class:: classref-item-separator + ---- .. _class_RDFramebufferPass_property_resolve_attachments: -- :ref:`PackedInt32Array` **resolve_attachments** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``PackedInt32Array()`` | -+-----------+--------------------------------+ -| *Setter* | set_resolve_attachments(value) | -+-----------+--------------------------------+ -| *Getter* | get_resolve_attachments() | -+-----------+--------------------------------+ +:ref:`PackedInt32Array` **resolve_attachments** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_resolve_attachments** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_resolve_attachments** **(** **)** If the color attachments are multisampled, non-multisampled resolve attachments can be provided. diff --git a/classes/class_rdpipelinecolorblendstate.rst b/classes/class_rdpipelinecolorblendstate.rst index afd9146c5..05baa2231 100644 --- a/classes/class_rdpipelinecolorblendstate.rst +++ b/classes/class_rdpipelinecolorblendstate.rst @@ -16,87 +16,100 @@ RDPipelineColorBlendState There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ -| :ref:`RDPipelineColorBlendStateAttachment[]` | :ref:`attachments` | ``[]`` | -+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`blend_constant` | ``Color(0, 0, 0, 1)`` | -+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`enable_logic_op` | ``false`` | -+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ -| :ref:`LogicOperation` | :ref:`logic_op` | ``0`` | -+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`RDPipelineColorBlendStateAttachment[]` | :ref:`attachments` | ``[]`` | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`blend_constant` | ``Color(0, 0, 0, 1)`` | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`enable_logic_op` | ``false`` | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`LogicOperation` | :ref:`logic_op` | ``0`` | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDPipelineColorBlendState_property_attachments: -- :ref:`RDPipelineColorBlendStateAttachment[]` **attachments** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``[]`` | -+-----------+------------------------+ -| *Setter* | set_attachments(value) | -+-----------+------------------------+ -| *Getter* | get_attachments() | -+-----------+------------------------+ +:ref:`RDPipelineColorBlendStateAttachment[]` **attachments** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_attachments** **(** :ref:`RDPipelineColorBlendStateAttachment[]` value **)** +- :ref:`RDPipelineColorBlendStateAttachment[]` **get_attachments** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendState_property_blend_constant: -- :ref:`Color` **blend_constant** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+---------------------------+ -| *Setter* | set_blend_constant(value) | -+-----------+---------------------------+ -| *Getter* | get_blend_constant() | -+-----------+---------------------------+ +:ref:`Color` **blend_constant** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_blend_constant** **(** :ref:`Color` value **)** +- :ref:`Color` **get_blend_constant** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendState_property_enable_logic_op: -- :ref:`bool` **enable_logic_op** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_enable_logic_op(value) | -+-----------+----------------------------+ -| *Getter* | get_enable_logic_op() | -+-----------+----------------------------+ +:ref:`bool` **enable_logic_op** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_logic_op** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_logic_op** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendState_property_logic_op: -- :ref:`LogicOperation` **logic_op** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_logic_op(value) | -+-----------+---------------------+ -| *Getter* | get_logic_op() | -+-----------+---------------------+ +:ref:`LogicOperation` **logic_op** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_logic_op** **(** :ref:`LogicOperation` value **)** +- :ref:`LogicOperation` **get_logic_op** **(** **)** .. container:: contribute diff --git a/classes/class_rdpipelinecolorblendstateattachment.rst b/classes/class_rdpipelinecolorblendstateattachment.rst index 37895cf8e..0687b17dc 100644 --- a/classes/class_rdpipelinecolorblendstateattachment.rst +++ b/classes/class_rdpipelinecolorblendstateattachment.rst @@ -16,245 +16,278 @@ RDPipelineColorBlendStateAttachment There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`BlendOperation` | :ref:`alpha_blend_op` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`BlendOperation` | :ref:`color_blend_op` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`BlendFactor` | :ref:`dst_alpha_blend_factor` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`BlendFactor` | :ref:`dst_color_blend_factor` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_blend` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`BlendFactor` | :ref:`src_alpha_blend_factor` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`BlendFactor` | :ref:`src_color_blend_factor` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`write_a` | ``true`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`write_b` | ``true`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`write_g` | ``true`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`write_r` | ``true`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`BlendOperation` | :ref:`alpha_blend_op` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`BlendOperation` | :ref:`color_blend_op` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`BlendFactor` | :ref:`dst_alpha_blend_factor` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`BlendFactor` | :ref:`dst_color_blend_factor` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_blend` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`BlendFactor` | :ref:`src_alpha_blend_factor` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`BlendFactor` | :ref:`src_color_blend_factor` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`write_a` | ``true`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`write_b` | ``true`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`write_g` | ``true`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`write_r` | ``true`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+--------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_mix` **(** **)** | -+------+--------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+--------------------------------------------------------------------------------------------+ + | void | :ref:`set_as_mix` **(** **)** | + +------+--------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDPipelineColorBlendStateAttachment_property_alpha_blend_op: -- :ref:`BlendOperation` **alpha_blend_op** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_alpha_blend_op(value) | -+-----------+---------------------------+ -| *Getter* | get_alpha_blend_op() | -+-----------+---------------------------+ +:ref:`BlendOperation` **alpha_blend_op** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_alpha_blend_op** **(** :ref:`BlendOperation` value **)** +- :ref:`BlendOperation` **get_alpha_blend_op** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_color_blend_op: -- :ref:`BlendOperation` **color_blend_op** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_color_blend_op(value) | -+-----------+---------------------------+ -| *Getter* | get_color_blend_op() | -+-----------+---------------------------+ +:ref:`BlendOperation` **color_blend_op** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_color_blend_op** **(** :ref:`BlendOperation` value **)** +- :ref:`BlendOperation` **get_color_blend_op** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_dst_alpha_blend_factor: -- :ref:`BlendFactor` **dst_alpha_blend_factor** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------------+ -| *Setter* | set_dst_alpha_blend_factor(value) | -+-----------+-----------------------------------+ -| *Getter* | get_dst_alpha_blend_factor() | -+-----------+-----------------------------------+ +:ref:`BlendFactor` **dst_alpha_blend_factor** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_dst_alpha_blend_factor** **(** :ref:`BlendFactor` value **)** +- :ref:`BlendFactor` **get_dst_alpha_blend_factor** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_dst_color_blend_factor: -- :ref:`BlendFactor` **dst_color_blend_factor** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------------+ -| *Setter* | set_dst_color_blend_factor(value) | -+-----------+-----------------------------------+ -| *Getter* | get_dst_color_blend_factor() | -+-----------+-----------------------------------+ +:ref:`BlendFactor` **dst_color_blend_factor** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_dst_color_blend_factor** **(** :ref:`BlendFactor` value **)** +- :ref:`BlendFactor` **get_dst_color_blend_factor** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_enable_blend: -- :ref:`bool` **enable_blend** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_enable_blend(value) | -+-----------+-------------------------+ -| *Getter* | get_enable_blend() | -+-----------+-------------------------+ +:ref:`bool` **enable_blend** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_blend** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_blend** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_src_alpha_blend_factor: -- :ref:`BlendFactor` **src_alpha_blend_factor** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------------+ -| *Setter* | set_src_alpha_blend_factor(value) | -+-----------+-----------------------------------+ -| *Getter* | get_src_alpha_blend_factor() | -+-----------+-----------------------------------+ +:ref:`BlendFactor` **src_alpha_blend_factor** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_src_alpha_blend_factor** **(** :ref:`BlendFactor` value **)** +- :ref:`BlendFactor` **get_src_alpha_blend_factor** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_src_color_blend_factor: -- :ref:`BlendFactor` **src_color_blend_factor** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------------+ -| *Setter* | set_src_color_blend_factor(value) | -+-----------+-----------------------------------+ -| *Getter* | get_src_color_blend_factor() | -+-----------+-----------------------------------+ +:ref:`BlendFactor` **src_color_blend_factor** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_src_color_blend_factor** **(** :ref:`BlendFactor` value **)** +- :ref:`BlendFactor` **get_src_color_blend_factor** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_write_a: -- :ref:`bool` **write_a** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_write_a(value) | -+-----------+--------------------+ -| *Getter* | get_write_a() | -+-----------+--------------------+ +:ref:`bool` **write_a** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_write_a** **(** :ref:`bool` value **)** +- :ref:`bool` **get_write_a** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_write_b: -- :ref:`bool` **write_b** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_write_b(value) | -+-----------+--------------------+ -| *Getter* | get_write_b() | -+-----------+--------------------+ +:ref:`bool` **write_b** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_write_b** **(** :ref:`bool` value **)** +- :ref:`bool` **get_write_b** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_write_g: -- :ref:`bool` **write_g** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_write_g(value) | -+-----------+--------------------+ -| *Getter* | get_write_g() | -+-----------+--------------------+ +:ref:`bool` **write_g** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_write_g** **(** :ref:`bool` value **)** +- :ref:`bool` **get_write_g** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineColorBlendStateAttachment_property_write_r: -- :ref:`bool` **write_r** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_write_r(value) | -+-----------+--------------------+ -| *Getter* | get_write_r() | -+-----------+--------------------+ +:ref:`bool` **write_r** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_write_r** **(** :ref:`bool` value **)** +- :ref:`bool` **get_write_r** **(** **)** .. 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 ------------------- .. _class_RDPipelineColorBlendStateAttachment_method_set_as_mix: -- void **set_as_mix** **(** **)** +.. rst-class:: classref-method + +void **set_as_mix** **(** **)** .. container:: contribute diff --git a/classes/class_rdpipelinedepthstencilstate.rst b/classes/class_rdpipelinedepthstencilstate.rst index 98133464b..b73d92c14 100644 --- a/classes/class_rdpipelinedepthstencilstate.rst +++ b/classes/class_rdpipelinedepthstencilstate.rst @@ -16,427 +16,457 @@ RDPipelineDepthStencilState There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`CompareOperator` | :ref:`back_op_compare` | ``7`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`back_op_compare_mask` | ``0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StencilOperation` | :ref:`back_op_depth_fail` | ``1`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StencilOperation` | :ref:`back_op_fail` | ``1`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StencilOperation` | :ref:`back_op_pass` | ``1`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`back_op_reference` | ``0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`back_op_write_mask` | ``0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`CompareOperator` | :ref:`depth_compare_operator` | ``7`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`depth_range_max` | ``0.0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`depth_range_min` | ``0.0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_depth_range` | ``false`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_depth_test` | ``false`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_depth_write` | ``false`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_stencil` | ``false`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`CompareOperator` | :ref:`front_op_compare` | ``7`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`front_op_compare_mask` | ``0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StencilOperation` | :ref:`front_op_depth_fail` | ``1`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StencilOperation` | :ref:`front_op_fail` | ``1`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`StencilOperation` | :ref:`front_op_pass` | ``1`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`front_op_reference` | ``0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`front_op_write_mask` | ``0`` | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`CompareOperator` | :ref:`back_op_compare` | ``7`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`back_op_compare_mask` | ``0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StencilOperation` | :ref:`back_op_depth_fail` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StencilOperation` | :ref:`back_op_fail` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StencilOperation` | :ref:`back_op_pass` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`back_op_reference` | ``0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`back_op_write_mask` | ``0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`CompareOperator` | :ref:`depth_compare_operator` | ``7`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`depth_range_max` | ``0.0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`depth_range_min` | ``0.0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_depth_range` | ``false`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_depth_test` | ``false`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_depth_write` | ``false`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_stencil` | ``false`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`CompareOperator` | :ref:`front_op_compare` | ``7`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`front_op_compare_mask` | ``0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StencilOperation` | :ref:`front_op_depth_fail` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StencilOperation` | :ref:`front_op_fail` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StencilOperation` | :ref:`front_op_pass` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`front_op_reference` | ``0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`front_op_write_mask` | ``0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDPipelineDepthStencilState_property_back_op_compare: -- :ref:`CompareOperator` **back_op_compare** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``7`` | -+-----------+----------------------------+ -| *Setter* | set_back_op_compare(value) | -+-----------+----------------------------+ -| *Getter* | get_back_op_compare() | -+-----------+----------------------------+ +:ref:`CompareOperator` **back_op_compare** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_back_op_compare** **(** :ref:`CompareOperator` value **)** +- :ref:`CompareOperator` **get_back_op_compare** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_back_op_compare_mask: -- :ref:`int` **back_op_compare_mask** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_back_op_compare_mask(value) | -+-----------+---------------------------------+ -| *Getter* | get_back_op_compare_mask() | -+-----------+---------------------------------+ +:ref:`int` **back_op_compare_mask** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_back_op_compare_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_back_op_compare_mask** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_back_op_depth_fail: -- :ref:`StencilOperation` **back_op_depth_fail** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------------+ -| *Setter* | set_back_op_depth_fail(value) | -+-----------+-------------------------------+ -| *Getter* | get_back_op_depth_fail() | -+-----------+-------------------------------+ +:ref:`StencilOperation` **back_op_depth_fail** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_back_op_depth_fail** **(** :ref:`StencilOperation` value **)** +- :ref:`StencilOperation` **get_back_op_depth_fail** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_back_op_fail: -- :ref:`StencilOperation` **back_op_fail** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_back_op_fail(value) | -+-----------+-------------------------+ -| *Getter* | get_back_op_fail() | -+-----------+-------------------------+ +:ref:`StencilOperation` **back_op_fail** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_back_op_fail** **(** :ref:`StencilOperation` value **)** +- :ref:`StencilOperation` **get_back_op_fail** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_back_op_pass: -- :ref:`StencilOperation` **back_op_pass** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_back_op_pass(value) | -+-----------+-------------------------+ -| *Getter* | get_back_op_pass() | -+-----------+-------------------------+ +:ref:`StencilOperation` **back_op_pass** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_back_op_pass** **(** :ref:`StencilOperation` value **)** +- :ref:`StencilOperation` **get_back_op_pass** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_back_op_reference: -- :ref:`int` **back_op_reference** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_back_op_reference(value) | -+-----------+------------------------------+ -| *Getter* | get_back_op_reference() | -+-----------+------------------------------+ +:ref:`int` **back_op_reference** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_back_op_reference** **(** :ref:`int` value **)** +- :ref:`int` **get_back_op_reference** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_back_op_write_mask: -- :ref:`int` **back_op_write_mask** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_back_op_write_mask(value) | -+-----------+-------------------------------+ -| *Getter* | get_back_op_write_mask() | -+-----------+-------------------------------+ +:ref:`int` **back_op_write_mask** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_back_op_write_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_back_op_write_mask** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_depth_compare_operator: -- :ref:`CompareOperator` **depth_compare_operator** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``7`` | -+-----------+-----------------------------------+ -| *Setter* | set_depth_compare_operator(value) | -+-----------+-----------------------------------+ -| *Getter* | get_depth_compare_operator() | -+-----------+-----------------------------------+ +:ref:`CompareOperator` **depth_compare_operator** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_depth_compare_operator** **(** :ref:`CompareOperator` value **)** +- :ref:`CompareOperator` **get_depth_compare_operator** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_depth_range_max: -- :ref:`float` **depth_range_max** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_depth_range_max(value) | -+-----------+----------------------------+ -| *Getter* | get_depth_range_max() | -+-----------+----------------------------+ +:ref:`float` **depth_range_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth_range_max** **(** :ref:`float` value **)** +- :ref:`float` **get_depth_range_max** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_depth_range_min: -- :ref:`float` **depth_range_min** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_depth_range_min(value) | -+-----------+----------------------------+ -| *Getter* | get_depth_range_min() | -+-----------+----------------------------+ +:ref:`float` **depth_range_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth_range_min** **(** :ref:`float` value **)** +- :ref:`float` **get_depth_range_min** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_enable_depth_range: -- :ref:`bool` **enable_depth_range** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_enable_depth_range(value) | -+-----------+-------------------------------+ -| *Getter* | get_enable_depth_range() | -+-----------+-------------------------------+ +:ref:`bool` **enable_depth_range** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_depth_range** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_depth_range** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_enable_depth_test: -- :ref:`bool` **enable_depth_test** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_enable_depth_test(value) | -+-----------+------------------------------+ -| *Getter* | get_enable_depth_test() | -+-----------+------------------------------+ +:ref:`bool` **enable_depth_test** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_depth_test** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_depth_test** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_enable_depth_write: -- :ref:`bool` **enable_depth_write** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_enable_depth_write(value) | -+-----------+-------------------------------+ -| *Getter* | get_enable_depth_write() | -+-----------+-------------------------------+ +:ref:`bool` **enable_depth_write** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_depth_write** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_depth_write** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_enable_stencil: -- :ref:`bool` **enable_stencil** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_enable_stencil(value) | -+-----------+---------------------------+ -| *Getter* | get_enable_stencil() | -+-----------+---------------------------+ +:ref:`bool` **enable_stencil** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_stencil** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_stencil** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_front_op_compare: -- :ref:`CompareOperator` **front_op_compare** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``7`` | -+-----------+-----------------------------+ -| *Setter* | set_front_op_compare(value) | -+-----------+-----------------------------+ -| *Getter* | get_front_op_compare() | -+-----------+-----------------------------+ +:ref:`CompareOperator` **front_op_compare** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_front_op_compare** **(** :ref:`CompareOperator` value **)** +- :ref:`CompareOperator` **get_front_op_compare** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_front_op_compare_mask: -- :ref:`int` **front_op_compare_mask** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_front_op_compare_mask(value) | -+-----------+----------------------------------+ -| *Getter* | get_front_op_compare_mask() | -+-----------+----------------------------------+ +:ref:`int` **front_op_compare_mask** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_front_op_compare_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_front_op_compare_mask** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_front_op_depth_fail: -- :ref:`StencilOperation` **front_op_depth_fail** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------------+ -| *Setter* | set_front_op_depth_fail(value) | -+-----------+--------------------------------+ -| *Getter* | get_front_op_depth_fail() | -+-----------+--------------------------------+ +:ref:`StencilOperation` **front_op_depth_fail** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_front_op_depth_fail** **(** :ref:`StencilOperation` value **)** +- :ref:`StencilOperation` **get_front_op_depth_fail** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_front_op_fail: -- :ref:`StencilOperation` **front_op_fail** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------+ -| *Setter* | set_front_op_fail(value) | -+-----------+--------------------------+ -| *Getter* | get_front_op_fail() | -+-----------+--------------------------+ +:ref:`StencilOperation` **front_op_fail** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_front_op_fail** **(** :ref:`StencilOperation` value **)** +- :ref:`StencilOperation` **get_front_op_fail** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_front_op_pass: -- :ref:`StencilOperation` **front_op_pass** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1`` | -+-----------+--------------------------+ -| *Setter* | set_front_op_pass(value) | -+-----------+--------------------------+ -| *Getter* | get_front_op_pass() | -+-----------+--------------------------+ +:ref:`StencilOperation` **front_op_pass** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_front_op_pass** **(** :ref:`StencilOperation` value **)** +- :ref:`StencilOperation` **get_front_op_pass** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_front_op_reference: -- :ref:`int` **front_op_reference** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_front_op_reference(value) | -+-----------+-------------------------------+ -| *Getter* | get_front_op_reference() | -+-----------+-------------------------------+ +:ref:`int` **front_op_reference** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_front_op_reference** **(** :ref:`int` value **)** +- :ref:`int` **get_front_op_reference** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineDepthStencilState_property_front_op_write_mask: -- :ref:`int` **front_op_write_mask** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_front_op_write_mask(value) | -+-----------+--------------------------------+ -| *Getter* | get_front_op_write_mask() | -+-----------+--------------------------------+ +:ref:`int` **front_op_write_mask** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_front_op_write_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_front_op_write_mask** **(** **)** .. container:: contribute diff --git a/classes/class_rdpipelinemultisamplestate.rst b/classes/class_rdpipelinemultisamplestate.rst index 7c47bd8a0..15d7ea30d 100644 --- a/classes/class_rdpipelinemultisamplestate.rst +++ b/classes/class_rdpipelinemultisamplestate.rst @@ -16,127 +16,142 @@ RDPipelineMultisampleState There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_alpha_to_coverage` | ``false`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_alpha_to_one` | ``false`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_sample_shading` | ``false`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`min_sample_shading` | ``0.0`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`TextureSamples` | :ref:`sample_count` | ``0`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int[]` | :ref:`sample_masks` | ``[]`` | -+------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_alpha_to_coverage` | ``false`` | + +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_alpha_to_one` | ``false`` | + +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_sample_shading` | ``false`` | + +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`min_sample_shading` | ``0.0`` | + +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`TextureSamples` | :ref:`sample_count` | ``0`` | + +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int[]` | :ref:`sample_masks` | ``[]`` | + +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDPipelineMultisampleState_property_enable_alpha_to_coverage: -- :ref:`bool` **enable_alpha_to_coverage** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------+ -| *Setter* | set_enable_alpha_to_coverage(value) | -+-----------+-------------------------------------+ -| *Getter* | get_enable_alpha_to_coverage() | -+-----------+-------------------------------------+ +:ref:`bool` **enable_alpha_to_coverage** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_alpha_to_coverage** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_alpha_to_coverage** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineMultisampleState_property_enable_alpha_to_one: -- :ref:`bool` **enable_alpha_to_one** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_enable_alpha_to_one(value) | -+-----------+--------------------------------+ -| *Getter* | get_enable_alpha_to_one() | -+-----------+--------------------------------+ +:ref:`bool` **enable_alpha_to_one** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_alpha_to_one** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_alpha_to_one** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineMultisampleState_property_enable_sample_shading: -- :ref:`bool` **enable_sample_shading** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_enable_sample_shading(value) | -+-----------+----------------------------------+ -| *Getter* | get_enable_sample_shading() | -+-----------+----------------------------------+ +:ref:`bool` **enable_sample_shading** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_sample_shading** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_sample_shading** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineMultisampleState_property_min_sample_shading: -- :ref:`float` **min_sample_shading** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_min_sample_shading(value) | -+-----------+-------------------------------+ -| *Getter* | get_min_sample_shading() | -+-----------+-------------------------------+ +:ref:`float` **min_sample_shading** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_min_sample_shading** **(** :ref:`float` value **)** +- :ref:`float` **get_min_sample_shading** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineMultisampleState_property_sample_count: -- :ref:`TextureSamples` **sample_count** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_sample_count(value) | -+-----------+-------------------------+ -| *Getter* | get_sample_count() | -+-----------+-------------------------+ +:ref:`TextureSamples` **sample_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_sample_count** **(** :ref:`TextureSamples` value **)** +- :ref:`TextureSamples` **get_sample_count** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineMultisampleState_property_sample_masks: -- :ref:`int[]` **sample_masks** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``[]`` | -+-----------+-------------------------+ -| *Setter* | set_sample_masks(value) | -+-----------+-------------------------+ -| *Getter* | get_sample_masks() | -+-----------+-------------------------+ +:ref:`int[]` **sample_masks** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_sample_masks** **(** :ref:`int[]` value **)** +- :ref:`int[]` **get_sample_masks** **(** **)** .. container:: contribute diff --git a/classes/class_rdpipelinerasterizationstate.rst b/classes/class_rdpipelinerasterizationstate.rst index 2d1dfec7b..4295a651a 100644 --- a/classes/class_rdpipelinerasterizationstate.rst +++ b/classes/class_rdpipelinerasterizationstate.rst @@ -16,227 +16,247 @@ RDPipelineRasterizationState There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`PolygonCullMode` | :ref:`cull_mode` | ``0`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`depth_bias_clamp` | ``0.0`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`depth_bias_constant_factor` | ``0.0`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`depth_bias_enabled` | ``false`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`depth_bias_slope_factor` | ``0.0`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`discard_primitives` | ``false`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_depth_clamp` | ``false`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`PolygonFrontFace` | :ref:`front_face` | ``0`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`line_width` | ``1.0`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`patch_control_points` | ``1`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`wireframe` | ``false`` | -+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`PolygonCullMode` | :ref:`cull_mode` | ``0`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`depth_bias_clamp` | ``0.0`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`depth_bias_constant_factor` | ``0.0`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`depth_bias_enabled` | ``false`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`depth_bias_slope_factor` | ``0.0`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`discard_primitives` | ``false`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_depth_clamp` | ``false`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`PolygonFrontFace` | :ref:`front_face` | ``0`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`line_width` | ``1.0`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`patch_control_points` | ``1`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`wireframe` | ``false`` | + +----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDPipelineRasterizationState_property_cull_mode: -- :ref:`PolygonCullMode` **cull_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_cull_mode(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mode() | -+-----------+----------------------+ +:ref:`PolygonCullMode` **cull_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mode** **(** :ref:`PolygonCullMode` value **)** +- :ref:`PolygonCullMode` **get_cull_mode** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_depth_bias_clamp: -- :ref:`float` **depth_bias_clamp** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_depth_bias_clamp(value) | -+-----------+-----------------------------+ -| *Getter* | get_depth_bias_clamp() | -+-----------+-----------------------------+ +:ref:`float` **depth_bias_clamp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth_bias_clamp** **(** :ref:`float` value **)** +- :ref:`float` **get_depth_bias_clamp** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_depth_bias_constant_factor: -- :ref:`float` **depth_bias_constant_factor** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------------+ -| *Setter* | set_depth_bias_constant_factor(value) | -+-----------+---------------------------------------+ -| *Getter* | get_depth_bias_constant_factor() | -+-----------+---------------------------------------+ +:ref:`float` **depth_bias_constant_factor** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth_bias_constant_factor** **(** :ref:`float` value **)** +- :ref:`float` **get_depth_bias_constant_factor** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_depth_bias_enabled: -- :ref:`bool` **depth_bias_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_depth_bias_enabled(value) | -+-----------+-------------------------------+ -| *Getter* | get_depth_bias_enabled() | -+-----------+-------------------------------+ +:ref:`bool` **depth_bias_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_depth_bias_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_depth_bias_enabled** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_depth_bias_slope_factor: -- :ref:`float` **depth_bias_slope_factor** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------+ -| *Setter* | set_depth_bias_slope_factor(value) | -+-----------+------------------------------------+ -| *Getter* | get_depth_bias_slope_factor() | -+-----------+------------------------------------+ +:ref:`float` **depth_bias_slope_factor** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_depth_bias_slope_factor** **(** :ref:`float` value **)** +- :ref:`float` **get_depth_bias_slope_factor** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_discard_primitives: -- :ref:`bool` **discard_primitives** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_discard_primitives(value) | -+-----------+-------------------------------+ -| *Getter* | get_discard_primitives() | -+-----------+-------------------------------+ +:ref:`bool` **discard_primitives** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_discard_primitives** **(** :ref:`bool` value **)** +- :ref:`bool` **get_discard_primitives** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_enable_depth_clamp: -- :ref:`bool` **enable_depth_clamp** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_enable_depth_clamp(value) | -+-----------+-------------------------------+ -| *Getter* | get_enable_depth_clamp() | -+-----------+-------------------------------+ +:ref:`bool` **enable_depth_clamp** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_depth_clamp** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_depth_clamp** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_front_face: -- :ref:`PolygonFrontFace` **front_face** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_front_face(value) | -+-----------+-----------------------+ -| *Getter* | get_front_face() | -+-----------+-----------------------+ +:ref:`PolygonFrontFace` **front_face** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_front_face** **(** :ref:`PolygonFrontFace` value **)** +- :ref:`PolygonFrontFace` **get_front_face** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_line_width: -- :ref:`float` **line_width** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_line_width(value) | -+-----------+-----------------------+ -| *Getter* | get_line_width() | -+-----------+-----------------------+ +:ref:`float` **line_width** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_line_width** **(** :ref:`float` value **)** +- :ref:`float` **get_line_width** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_patch_control_points: -- :ref:`int` **patch_control_points** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_patch_control_points(value) | -+-----------+---------------------------------+ -| *Getter* | get_patch_control_points() | -+-----------+---------------------------------+ +:ref:`int` **patch_control_points** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_patch_control_points** **(** :ref:`int` value **)** +- :ref:`int` **get_patch_control_points** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineRasterizationState_property_wireframe: -- :ref:`bool` **wireframe** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_wireframe(value) | -+-----------+----------------------+ -| *Getter* | get_wireframe() | -+-----------+----------------------+ +:ref:`bool` **wireframe** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_wireframe** **(** :ref:`bool` value **)** +- :ref:`bool` **get_wireframe** **(** **)** .. container:: contribute diff --git a/classes/class_rdpipelinespecializationconstant.rst b/classes/class_rdpipelinespecializationconstant.rst index b46665453..348458c5d 100644 --- a/classes/class_rdpipelinespecializationconstant.rst +++ b/classes/class_rdpipelinespecializationconstant.rst @@ -16,45 +16,58 @@ RDPipelineSpecializationConstant There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`constant_id` | ``0`` | -+-------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Variant` | :ref:`value` | | -+-------------------------------+---------------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`constant_id` | ``0`` | + +-------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Variant` | :ref:`value` | | + +-------------------------------+---------------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDPipelineSpecializationConstant_property_constant_id: -- :ref:`int` **constant_id** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_constant_id(value) | -+-----------+------------------------+ -| *Getter* | get_constant_id() | -+-----------+------------------------+ +:ref:`int` **constant_id** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_constant_id** **(** :ref:`int` value **)** +- :ref:`int` **get_constant_id** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDPipelineSpecializationConstant_property_value: -- :ref:`Variant` **value** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_value(value) | -+----------+------------------+ -| *Getter* | get_value() | -+----------+------------------+ +:ref:`Variant` **value** + +.. rst-class:: classref-property-setget + +- void **set_value** **(** :ref:`Variant` value **)** +- :ref:`Variant` **get_value** **(** **)** .. container:: contribute diff --git a/classes/class_rdsamplerstate.rst b/classes/class_rdsamplerstate.rst index 8123e9841..df71f8253 100644 --- a/classes/class_rdsamplerstate.rst +++ b/classes/class_rdsamplerstate.rst @@ -16,307 +16,331 @@ RDSamplerState There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`anisotropy_max` | ``1.0`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`SamplerBorderColor` | :ref:`border_color` | ``2`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`CompareOperator` | :ref:`compare_op` | ``7`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enable_compare` | ``false`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`lod_bias` | ``0.0`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`SamplerFilter` | :ref:`mag_filter` | ``0`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`max_lod` | ``1e+20`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`SamplerFilter` | :ref:`min_filter` | ``0`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`min_lod` | ``0.0`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`SamplerFilter` | :ref:`mip_filter` | ``0`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`SamplerRepeatMode` | :ref:`repeat_u` | ``2`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`SamplerRepeatMode` | :ref:`repeat_v` | ``2`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`SamplerRepeatMode` | :ref:`repeat_w` | ``2`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`unnormalized_uvw` | ``false`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_anisotropy` | ``false`` | -+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`anisotropy_max` | ``1.0`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`SamplerBorderColor` | :ref:`border_color` | ``2`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`CompareOperator` | :ref:`compare_op` | ``7`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enable_compare` | ``false`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`lod_bias` | ``0.0`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`SamplerFilter` | :ref:`mag_filter` | ``0`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`max_lod` | ``1e+20`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`SamplerFilter` | :ref:`min_filter` | ``0`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`min_lod` | ``0.0`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`SamplerFilter` | :ref:`mip_filter` | ``0`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`SamplerRepeatMode` | :ref:`repeat_u` | ``2`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`SamplerRepeatMode` | :ref:`repeat_v` | ``2`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`SamplerRepeatMode` | :ref:`repeat_w` | ``2`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`unnormalized_uvw` | ``false`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_anisotropy` | ``false`` | + +--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDSamplerState_property_anisotropy_max: -- :ref:`float` **anisotropy_max** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------+ -| *Setter* | set_anisotropy_max(value) | -+-----------+---------------------------+ -| *Getter* | get_anisotropy_max() | -+-----------+---------------------------+ +:ref:`float` **anisotropy_max** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_anisotropy_max** **(** :ref:`float` value **)** +- :ref:`float` **get_anisotropy_max** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_border_color: -- :ref:`SamplerBorderColor` **border_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``2`` | -+-----------+-------------------------+ -| *Setter* | set_border_color(value) | -+-----------+-------------------------+ -| *Getter* | get_border_color() | -+-----------+-------------------------+ +:ref:`SamplerBorderColor` **border_color** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_border_color** **(** :ref:`SamplerBorderColor` value **)** +- :ref:`SamplerBorderColor` **get_border_color** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_compare_op: -- :ref:`CompareOperator` **compare_op** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``7`` | -+-----------+-----------------------+ -| *Setter* | set_compare_op(value) | -+-----------+-----------------------+ -| *Getter* | get_compare_op() | -+-----------+-----------------------+ +:ref:`CompareOperator` **compare_op** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_compare_op** **(** :ref:`CompareOperator` value **)** +- :ref:`CompareOperator` **get_compare_op** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_enable_compare: -- :ref:`bool` **enable_compare** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_enable_compare(value) | -+-----------+---------------------------+ -| *Getter* | get_enable_compare() | -+-----------+---------------------------+ +:ref:`bool` **enable_compare** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_compare** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enable_compare** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_lod_bias: -- :ref:`float` **lod_bias** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_lod_bias(value) | -+-----------+---------------------+ -| *Getter* | get_lod_bias() | -+-----------+---------------------+ +:ref:`float` **lod_bias** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_lod_bias** **(** :ref:`float` value **)** +- :ref:`float` **get_lod_bias** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_mag_filter: -- :ref:`SamplerFilter` **mag_filter** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_mag_filter(value) | -+-----------+-----------------------+ -| *Getter* | get_mag_filter() | -+-----------+-----------------------+ +:ref:`SamplerFilter` **mag_filter** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mag_filter** **(** :ref:`SamplerFilter` value **)** +- :ref:`SamplerFilter` **get_mag_filter** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_max_lod: -- :ref:`float` **max_lod** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1e+20`` | -+-----------+--------------------+ -| *Setter* | set_max_lod(value) | -+-----------+--------------------+ -| *Getter* | get_max_lod() | -+-----------+--------------------+ +:ref:`float` **max_lod** = ``1e+20`` + +.. rst-class:: classref-property-setget + +- void **set_max_lod** **(** :ref:`float` value **)** +- :ref:`float` **get_max_lod** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_min_filter: -- :ref:`SamplerFilter` **min_filter** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_min_filter(value) | -+-----------+-----------------------+ -| *Getter* | get_min_filter() | -+-----------+-----------------------+ +:ref:`SamplerFilter` **min_filter** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_min_filter** **(** :ref:`SamplerFilter` value **)** +- :ref:`SamplerFilter` **get_min_filter** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_min_lod: -- :ref:`float` **min_lod** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_min_lod(value) | -+-----------+--------------------+ -| *Getter* | get_min_lod() | -+-----------+--------------------+ +:ref:`float` **min_lod** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_min_lod** **(** :ref:`float` value **)** +- :ref:`float` **get_min_lod** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_mip_filter: -- :ref:`SamplerFilter` **mip_filter** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_mip_filter(value) | -+-----------+-----------------------+ -| *Getter* | get_mip_filter() | -+-----------+-----------------------+ +:ref:`SamplerFilter` **mip_filter** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mip_filter** **(** :ref:`SamplerFilter` value **)** +- :ref:`SamplerFilter` **get_mip_filter** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_repeat_u: -- :ref:`SamplerRepeatMode` **repeat_u** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``2`` | -+-----------+---------------------+ -| *Setter* | set_repeat_u(value) | -+-----------+---------------------+ -| *Getter* | get_repeat_u() | -+-----------+---------------------+ +:ref:`SamplerRepeatMode` **repeat_u** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_repeat_u** **(** :ref:`SamplerRepeatMode` value **)** +- :ref:`SamplerRepeatMode` **get_repeat_u** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_repeat_v: -- :ref:`SamplerRepeatMode` **repeat_v** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``2`` | -+-----------+---------------------+ -| *Setter* | set_repeat_v(value) | -+-----------+---------------------+ -| *Getter* | get_repeat_v() | -+-----------+---------------------+ +:ref:`SamplerRepeatMode` **repeat_v** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_repeat_v** **(** :ref:`SamplerRepeatMode` value **)** +- :ref:`SamplerRepeatMode` **get_repeat_v** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_repeat_w: -- :ref:`SamplerRepeatMode` **repeat_w** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``2`` | -+-----------+---------------------+ -| *Setter* | set_repeat_w(value) | -+-----------+---------------------+ -| *Getter* | get_repeat_w() | -+-----------+---------------------+ +:ref:`SamplerRepeatMode` **repeat_w** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_repeat_w** **(** :ref:`SamplerRepeatMode` value **)** +- :ref:`SamplerRepeatMode` **get_repeat_w** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_unnormalized_uvw: -- :ref:`bool` **unnormalized_uvw** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_unnormalized_uvw(value) | -+-----------+-----------------------------+ -| *Getter* | get_unnormalized_uvw() | -+-----------+-----------------------------+ +:ref:`bool` **unnormalized_uvw** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_unnormalized_uvw** **(** :ref:`bool` value **)** +- :ref:`bool` **get_unnormalized_uvw** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDSamplerState_property_use_anisotropy: -- :ref:`bool` **use_anisotropy** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_use_anisotropy(value) | -+-----------+---------------------------+ -| *Getter* | get_use_anisotropy() | -+-----------+---------------------------+ +:ref:`bool` **use_anisotropy** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_anisotropy** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_anisotropy** **(** **)** .. container:: contribute diff --git a/classes/class_rdshaderfile.rst b/classes/class_rdshaderfile.rst index e53bafaae..d3f015874 100644 --- a/classes/class_rdshaderfile.rst +++ b/classes/class_rdshaderfile.rst @@ -16,69 +16,100 @@ RDShaderFile There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-----------------------------------------------------------+--------+ -| :ref:`String` | :ref:`base_error` | ``""`` | -+-----------------------------+-----------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------+--------+ + | :ref:`String` | :ref:`base_error` | ``""`` | + +-----------------------------+-----------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RDShaderSPIRV` | :ref:`get_spirv` **(** :ref:`StringName` version=&"" **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_version_list` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bytecode` **(** :ref:`RDShaderSPIRV` bytecode, :ref:`StringName` version=&"" **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDShaderSPIRV` | :ref:`get_spirv` **(** :ref:`StringName` version=&"" **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_version_list` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bytecode` **(** :ref:`RDShaderSPIRV` bytecode, :ref:`StringName` version=&"" **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDShaderFile_property_base_error: -- :ref:`String` **base_error** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``""`` | -+-----------+-----------------------+ -| *Setter* | set_base_error(value) | -+-----------+-----------------------+ -| *Getter* | get_base_error() | -+-----------+-----------------------+ +:ref:`String` **base_error** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_base_error** **(** :ref:`String` value **)** +- :ref:`String` **get_base_error** **(** **)** .. 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 ------------------- .. _class_RDShaderFile_method_get_spirv: -- :ref:`RDShaderSPIRV` **get_spirv** **(** :ref:`StringName` version=&"" **)** |const| +.. rst-class:: classref-method + +:ref:`RDShaderSPIRV` **get_spirv** **(** :ref:`StringName` version=&"" **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderFile_method_get_version_list: -- :ref:`PackedStringArray` **get_version_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_version_list** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderFile_method_set_bytecode: -- void **set_bytecode** **(** :ref:`RDShaderSPIRV` bytecode, :ref:`StringName` version=&"" **)** +.. rst-class:: classref-method + +void **set_bytecode** **(** :ref:`RDShaderSPIRV` bytecode, :ref:`StringName` version=&"" **)** .. container:: contribute diff --git a/classes/class_rdshadersource.rst b/classes/class_rdshadersource.rst index d1a090ef9..a36cacd7a 100644 --- a/classes/class_rdshadersource.rst +++ b/classes/class_rdshadersource.rst @@ -16,157 +16,189 @@ RDShaderSource There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`ShaderLanguage` | :ref:`language` | ``0`` | -+------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`source_compute` | ``""`` | -+------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`source_fragment` | ``""`` | -+------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`source_tesselation_control` | ``""`` | -+------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`source_tesselation_evaluation` | ``""`` | -+------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`source_vertex` | ``""`` | -+------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`ShaderLanguage` | :ref:`language` | ``0`` | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`source_compute` | ``""`` | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`source_fragment` | ``""`` | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`source_tesselation_control` | ``""`` | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`source_tesselation_evaluation` | ``""`` | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`source_vertex` | ``""`` | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_stage_source` **(** :ref:`ShaderStage` stage **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stage_source` **(** :ref:`ShaderStage` stage, :ref:`String` source **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_stage_source` **(** :ref:`ShaderStage` stage **)** |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_stage_source` **(** :ref:`ShaderStage` stage, :ref:`String` source **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDShaderSource_property_language: -- :ref:`ShaderLanguage` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`ShaderLanguage` **language** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`ShaderLanguage` value **)** +- :ref:`ShaderLanguage` **get_language** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSource_property_source_compute: -- :ref:`String` **source_compute** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_stage_source(value) | -+-----------+-------------------------+ -| *Getter* | get_stage_source() | -+-----------+-------------------------+ +:ref:`String` **source_compute** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** +- :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSource_property_source_fragment: -- :ref:`String` **source_fragment** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_stage_source(value) | -+-----------+-------------------------+ -| *Getter* | get_stage_source() | -+-----------+-------------------------+ +:ref:`String` **source_fragment** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** +- :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSource_property_source_tesselation_control: -- :ref:`String` **source_tesselation_control** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_stage_source(value) | -+-----------+-------------------------+ -| *Getter* | get_stage_source() | -+-----------+-------------------------+ +:ref:`String` **source_tesselation_control** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** +- :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSource_property_source_tesselation_evaluation: -- :ref:`String` **source_tesselation_evaluation** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_stage_source(value) | -+-----------+-------------------------+ -| *Getter* | get_stage_source() | -+-----------+-------------------------+ +:ref:`String` **source_tesselation_evaluation** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** +- :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSource_property_source_vertex: -- :ref:`String` **source_vertex** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_stage_source(value) | -+-----------+-------------------------+ -| *Getter* | get_stage_source() | -+-----------+-------------------------+ +:ref:`String` **source_vertex** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** +- :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| .. 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 ------------------- .. _class_RDShaderSource_method_get_stage_source: -- :ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_stage_source** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSource_method_set_stage_source: -- void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** +.. rst-class:: classref-method + +void **set_stage_source** **(** :ref:`ShaderStage` stage, :ref:`String` source **)** .. container:: contribute diff --git a/classes/class_rdshaderspirv.rst b/classes/class_rdshaderspirv.rst index 1453cd9ad..704dcaf49 100644 --- a/classes/class_rdshaderspirv.rst +++ b/classes/class_rdshaderspirv.rst @@ -16,261 +16,305 @@ RDShaderSPIRV There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`bytecode_compute` | ``PackedByteArray()`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`bytecode_fragment` | ``PackedByteArray()`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`bytecode_tesselation_control` | ``PackedByteArray()`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`bytecode_tesselation_evaluation` | ``PackedByteArray()`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`bytecode_vertex` | ``PackedByteArray()`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`compile_error_compute` | ``""`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`compile_error_fragment` | ``""`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`compile_error_tesselation_control` | ``""`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`compile_error_tesselation_evaluation` | ``""`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`String` | :ref:`compile_error_vertex` | ``""`` | -+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`bytecode_compute` | ``PackedByteArray()`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`bytecode_fragment` | ``PackedByteArray()`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`bytecode_tesselation_control` | ``PackedByteArray()`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`bytecode_tesselation_evaluation` | ``PackedByteArray()`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`bytecode_vertex` | ``PackedByteArray()`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`compile_error_compute` | ``""`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`compile_error_fragment` | ``""`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`compile_error_tesselation_control` | ``""`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`compile_error_tesselation_evaluation` | ``""`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`compile_error_vertex` | ``""`` | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`get_stage_bytecode` **(** :ref:`ShaderStage` stage **)** |const| | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_stage_compile_error` **(** :ref:`ShaderStage` stage **)** |const| | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stage_bytecode` **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stage_compile_error` **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_stage_bytecode` **(** :ref:`ShaderStage` stage **)** |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_stage_compile_error` **(** :ref:`ShaderStage` stage **)** |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_stage_bytecode` **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_stage_compile_error` **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDShaderSPIRV_property_bytecode_compute: -- :ref:`PackedByteArray` **bytecode_compute** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+---------------------------+ -| *Setter* | set_stage_bytecode(value) | -+-----------+---------------------------+ -| *Getter* | get_stage_bytecode() | -+-----------+---------------------------+ +:ref:`PackedByteArray` **bytecode_compute** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** +- :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_bytecode_fragment: -- :ref:`PackedByteArray` **bytecode_fragment** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+---------------------------+ -| *Setter* | set_stage_bytecode(value) | -+-----------+---------------------------+ -| *Getter* | get_stage_bytecode() | -+-----------+---------------------------+ +:ref:`PackedByteArray` **bytecode_fragment** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** +- :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_bytecode_tesselation_control: -- :ref:`PackedByteArray` **bytecode_tesselation_control** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+---------------------------+ -| *Setter* | set_stage_bytecode(value) | -+-----------+---------------------------+ -| *Getter* | get_stage_bytecode() | -+-----------+---------------------------+ +:ref:`PackedByteArray` **bytecode_tesselation_control** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** +- :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_bytecode_tesselation_evaluation: -- :ref:`PackedByteArray` **bytecode_tesselation_evaluation** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+---------------------------+ -| *Setter* | set_stage_bytecode(value) | -+-----------+---------------------------+ -| *Getter* | get_stage_bytecode() | -+-----------+---------------------------+ +:ref:`PackedByteArray` **bytecode_tesselation_evaluation** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** +- :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_bytecode_vertex: -- :ref:`PackedByteArray` **bytecode_vertex** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+---------------------------+ -| *Setter* | set_stage_bytecode(value) | -+-----------+---------------------------+ -| *Getter* | get_stage_bytecode() | -+-----------+---------------------------+ +:ref:`PackedByteArray` **bytecode_vertex** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** +- :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_compile_error_compute: -- :ref:`String` **compile_error_compute** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``""`` | -+-----------+--------------------------------+ -| *Setter* | set_stage_compile_error(value) | -+-----------+--------------------------------+ -| *Getter* | get_stage_compile_error() | -+-----------+--------------------------------+ +:ref:`String` **compile_error_compute** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** +- :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_compile_error_fragment: -- :ref:`String` **compile_error_fragment** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``""`` | -+-----------+--------------------------------+ -| *Setter* | set_stage_compile_error(value) | -+-----------+--------------------------------+ -| *Getter* | get_stage_compile_error() | -+-----------+--------------------------------+ +:ref:`String` **compile_error_fragment** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** +- :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_compile_error_tesselation_control: -- :ref:`String` **compile_error_tesselation_control** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``""`` | -+-----------+--------------------------------+ -| *Setter* | set_stage_compile_error(value) | -+-----------+--------------------------------+ -| *Getter* | get_stage_compile_error() | -+-----------+--------------------------------+ +:ref:`String` **compile_error_tesselation_control** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** +- :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_compile_error_tesselation_evaluation: -- :ref:`String` **compile_error_tesselation_evaluation** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``""`` | -+-----------+--------------------------------+ -| *Setter* | set_stage_compile_error(value) | -+-----------+--------------------------------+ -| *Getter* | get_stage_compile_error() | -+-----------+--------------------------------+ +:ref:`String` **compile_error_tesselation_evaluation** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** +- :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_property_compile_error_vertex: -- :ref:`String` **compile_error_vertex** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``""`` | -+-----------+--------------------------------+ -| *Setter* | set_stage_compile_error(value) | -+-----------+--------------------------------+ -| *Getter* | get_stage_compile_error() | -+-----------+--------------------------------+ +:ref:`String` **compile_error_vertex** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** +- :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| .. 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 ------------------- .. _class_RDShaderSPIRV_method_get_stage_bytecode: -- :ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_stage_bytecode** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_method_get_stage_compile_error: -- :ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_stage_compile_error** **(** :ref:`ShaderStage` stage **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_method_set_stage_bytecode: -- void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** +.. rst-class:: classref-method + +void **set_stage_bytecode** **(** :ref:`ShaderStage` stage, :ref:`PackedByteArray` bytecode **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDShaderSPIRV_method_set_stage_compile_error: -- void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** +.. rst-class:: classref-method + +void **set_stage_compile_error** **(** :ref:`ShaderStage` stage, :ref:`String` compile_error **)** .. container:: contribute diff --git a/classes/class_rdtextureformat.rst b/classes/class_rdtextureformat.rst index 4c3528dba..93e45236d 100644 --- a/classes/class_rdtextureformat.rst +++ b/classes/class_rdtextureformat.rst @@ -16,217 +16,252 @@ RDTextureFormat There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`array_layers` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`depth` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`DataFormat` | :ref:`format` | ``8`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`height` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`mipmaps` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`TextureSamples` | :ref:`samples` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`TextureType` | :ref:`texture_type` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`usage_bits` | ``0`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`width` | ``1`` | -+------------------------------------------------------------+------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`array_layers` | ``1`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`depth` | ``1`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`DataFormat` | :ref:`format` | ``8`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`height` | ``1`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`mipmaps` | ``1`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`TextureSamples` | :ref:`samples` | ``0`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`TextureType` | :ref:`texture_type` | ``1`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`TextureUsageBits` | :ref:`usage_bits` | ``0`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`width` | ``1`` | + +----------------------------------------------------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_shareable_format` **(** :ref:`DataFormat` format **)** | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_shareable_format` **(** :ref:`DataFormat` format **)** | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_shareable_format` **(** :ref:`DataFormat` format **)** | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_shareable_format` **(** :ref:`DataFormat` format **)** | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDTextureFormat_property_array_layers: -- :ref:`int` **array_layers** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_array_layers(value) | -+-----------+-------------------------+ -| *Getter* | get_array_layers() | -+-----------+-------------------------+ +:ref:`int` **array_layers** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_array_layers** **(** :ref:`int` value **)** +- :ref:`int` **get_array_layers** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_depth: -- :ref:`int` **depth** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1`` | -+-----------+------------------+ -| *Setter* | set_depth(value) | -+-----------+------------------+ -| *Getter* | get_depth() | -+-----------+------------------+ +:ref:`int` **depth** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_depth** **(** :ref:`int` value **)** +- :ref:`int` **get_depth** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_format: -- :ref:`DataFormat` **format** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``8`` | -+-----------+-------------------+ -| *Setter* | set_format(value) | -+-----------+-------------------+ -| *Getter* | get_format() | -+-----------+-------------------+ +:ref:`DataFormat` **format** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_format** **(** :ref:`DataFormat` value **)** +- :ref:`DataFormat` **get_format** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_height: -- :ref:`int` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`int` **height** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`int` value **)** +- :ref:`int` **get_height** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_mipmaps: -- :ref:`int` **mipmaps** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_mipmaps(value) | -+-----------+--------------------+ -| *Getter* | get_mipmaps() | -+-----------+--------------------+ +:ref:`int` **mipmaps** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_mipmaps** **(** :ref:`int` value **)** +- :ref:`int` **get_mipmaps** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_samples: -- :ref:`TextureSamples` **samples** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_samples(value) | -+-----------+--------------------+ -| *Getter* | get_samples() | -+-----------+--------------------+ +:ref:`TextureSamples` **samples** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_samples** **(** :ref:`TextureSamples` value **)** +- :ref:`TextureSamples` **get_samples** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_texture_type: -- :ref:`TextureType` **texture_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_texture_type(value) | -+-----------+-------------------------+ -| *Getter* | get_texture_type() | -+-----------+-------------------------+ +:ref:`TextureType` **texture_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_texture_type** **(** :ref:`TextureType` value **)** +- :ref:`TextureType` **get_texture_type** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_usage_bits: -- :ref:`int` **usage_bits** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_usage_bits(value) | -+-----------+-----------------------+ -| *Getter* | get_usage_bits() | -+-----------+-----------------------+ +:ref:`TextureUsageBits` **usage_bits** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_usage_bits** **(** :ref:`TextureUsageBits` value **)** +- :ref:`TextureUsageBits` **get_usage_bits** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_property_width: -- :ref:`int` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`int` **width** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`int` value **)** +- :ref:`int` **get_width** **(** **)** .. 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 ------------------- .. _class_RDTextureFormat_method_add_shareable_format: -- void **add_shareable_format** **(** :ref:`DataFormat` format **)** +.. rst-class:: classref-method + +void **add_shareable_format** **(** :ref:`DataFormat` format **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureFormat_method_remove_shareable_format: -- void **remove_shareable_format** **(** :ref:`DataFormat` format **)** +.. rst-class:: classref-method + +void **remove_shareable_format** **(** :ref:`DataFormat` format **)** .. container:: contribute diff --git a/classes/class_rdtextureview.rst b/classes/class_rdtextureview.rst index 3e0dd3aae..bbd803f4e 100644 --- a/classes/class_rdtextureview.rst +++ b/classes/class_rdtextureview.rst @@ -16,107 +16,121 @@ RDTextureView There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`DataFormat` | :ref:`format_override` | ``218`` | -+------------------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`TextureSwizzle` | :ref:`swizzle_a` | ``6`` | -+------------------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`TextureSwizzle` | :ref:`swizzle_b` | ``5`` | -+------------------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`TextureSwizzle` | :ref:`swizzle_g` | ``4`` | -+------------------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`TextureSwizzle` | :ref:`swizzle_r` | ``3`` | -+------------------------------------------------------------+----------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+----------------------------------------------------------------------+---------+ + | :ref:`DataFormat` | :ref:`format_override` | ``218`` | + +------------------------------------------------------------+----------------------------------------------------------------------+---------+ + | :ref:`TextureSwizzle` | :ref:`swizzle_a` | ``6`` | + +------------------------------------------------------------+----------------------------------------------------------------------+---------+ + | :ref:`TextureSwizzle` | :ref:`swizzle_b` | ``5`` | + +------------------------------------------------------------+----------------------------------------------------------------------+---------+ + | :ref:`TextureSwizzle` | :ref:`swizzle_g` | ``4`` | + +------------------------------------------------------------+----------------------------------------------------------------------+---------+ + | :ref:`TextureSwizzle` | :ref:`swizzle_r` | ``3`` | + +------------------------------------------------------------+----------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDTextureView_property_format_override: -- :ref:`DataFormat` **format_override** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``218`` | -+-----------+----------------------------+ -| *Setter* | set_format_override(value) | -+-----------+----------------------------+ -| *Getter* | get_format_override() | -+-----------+----------------------------+ +:ref:`DataFormat` **format_override** = ``218`` + +.. rst-class:: classref-property-setget + +- void **set_format_override** **(** :ref:`DataFormat` value **)** +- :ref:`DataFormat` **get_format_override** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureView_property_swizzle_a: -- :ref:`TextureSwizzle` **swizzle_a** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``6`` | -+-----------+----------------------+ -| *Setter* | set_swizzle_a(value) | -+-----------+----------------------+ -| *Getter* | get_swizzle_a() | -+-----------+----------------------+ +:ref:`TextureSwizzle` **swizzle_a** = ``6`` + +.. rst-class:: classref-property-setget + +- void **set_swizzle_a** **(** :ref:`TextureSwizzle` value **)** +- :ref:`TextureSwizzle` **get_swizzle_a** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureView_property_swizzle_b: -- :ref:`TextureSwizzle` **swizzle_b** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``5`` | -+-----------+----------------------+ -| *Setter* | set_swizzle_b(value) | -+-----------+----------------------+ -| *Getter* | get_swizzle_b() | -+-----------+----------------------+ +:ref:`TextureSwizzle` **swizzle_b** = ``5`` + +.. rst-class:: classref-property-setget + +- void **set_swizzle_b** **(** :ref:`TextureSwizzle` value **)** +- :ref:`TextureSwizzle` **get_swizzle_b** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureView_property_swizzle_g: -- :ref:`TextureSwizzle` **swizzle_g** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``4`` | -+-----------+----------------------+ -| *Setter* | set_swizzle_g(value) | -+-----------+----------------------+ -| *Getter* | get_swizzle_g() | -+-----------+----------------------+ +:ref:`TextureSwizzle` **swizzle_g** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_swizzle_g** **(** :ref:`TextureSwizzle` value **)** +- :ref:`TextureSwizzle` **get_swizzle_g** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDTextureView_property_swizzle_r: -- :ref:`TextureSwizzle` **swizzle_r** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``3`` | -+-----------+----------------------+ -| *Setter* | set_swizzle_r(value) | -+-----------+----------------------+ -| *Getter* | get_swizzle_r() | -+-----------+----------------------+ +:ref:`TextureSwizzle` **swizzle_r** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_swizzle_r** **(** :ref:`TextureSwizzle` value **)** +- :ref:`TextureSwizzle` **get_swizzle_r** **(** **)** .. container:: contribute diff --git a/classes/class_rduniform.rst b/classes/class_rduniform.rst index a66baf7ae..0ba311ddc 100644 --- a/classes/class_rduniform.rst +++ b/classes/class_rduniform.rst @@ -16,89 +16,121 @@ RDUniform There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------+------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`binding` | ``0`` | -+------------------------------------------------------+------------------------------------------------------------+-------+ -| :ref:`UniformType` | :ref:`uniform_type` | ``3`` | -+------------------------------------------------------+------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +------------------------------------------------------+------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`binding` | ``0`` | + +------------------------------------------------------+------------------------------------------------------------+-------+ + | :ref:`UniformType` | :ref:`uniform_type` | ``3`` | + +------------------------------------------------------+------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+-----------------------------------------------------------------------------------+ -| void | :ref:`add_id` **(** :ref:`RID` id **)** | -+-------------------------+-----------------------------------------------------------------------------------+ -| void | :ref:`clear_ids` **(** **)** | -+-------------------------+-----------------------------------------------------------------------------------+ -| :ref:`RID[]` | :ref:`get_ids` **(** **)** |const| | -+-------------------------+-----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------+ + | void | :ref:`add_id` **(** :ref:`RID` id **)** | + +-------------------------+-----------------------------------------------------------------------------------+ + | void | :ref:`clear_ids` **(** **)** | + +-------------------------+-----------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`get_ids` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDUniform_property_binding: -- :ref:`int` **binding** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_binding(value) | -+-----------+--------------------+ -| *Getter* | get_binding() | -+-----------+--------------------+ +:ref:`int` **binding** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_binding** **(** :ref:`int` value **)** +- :ref:`int` **get_binding** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDUniform_property_uniform_type: -- :ref:`UniformType` **uniform_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``3`` | -+-----------+-------------------------+ -| *Setter* | set_uniform_type(value) | -+-----------+-------------------------+ -| *Getter* | get_uniform_type() | -+-----------+-------------------------+ +:ref:`UniformType` **uniform_type** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_uniform_type** **(** :ref:`UniformType` value **)** +- :ref:`UniformType` **get_uniform_type** **(** **)** .. 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 ------------------- .. _class_RDUniform_method_add_id: -- void **add_id** **(** :ref:`RID` id **)** +.. rst-class:: classref-method + +void **add_id** **(** :ref:`RID` id **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDUniform_method_clear_ids: -- void **clear_ids** **(** **)** +.. rst-class:: classref-method + +void **clear_ids** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDUniform_method_get_ids: -- :ref:`RID[]` **get_ids** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID[]` **get_ids** **(** **)** |const| .. container:: contribute diff --git a/classes/class_rdvertexattribute.rst b/classes/class_rdvertexattribute.rst index 4e0104990..bf9f12129 100644 --- a/classes/class_rdvertexattribute.rst +++ b/classes/class_rdvertexattribute.rst @@ -16,107 +16,121 @@ RDVertexAttribute There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+--------------------------------------------------------------+---------+ -| :ref:`DataFormat` | :ref:`format` | ``218`` | -+--------------------------------------------------------------+--------------------------------------------------------------+---------+ -| :ref:`VertexFrequency` | :ref:`frequency` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`location` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`offset` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`stride` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+--------------------------------------------------------------+---------+ + | :ref:`DataFormat` | :ref:`format` | ``218`` | + +--------------------------------------------------------------+--------------------------------------------------------------+---------+ + | :ref:`VertexFrequency` | :ref:`frequency` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`location` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`offset` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`stride` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RDVertexAttribute_property_format: -- :ref:`DataFormat` **format** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``218`` | -+-----------+-------------------+ -| *Setter* | set_format(value) | -+-----------+-------------------+ -| *Getter* | get_format() | -+-----------+-------------------+ +:ref:`DataFormat` **format** = ``218`` + +.. rst-class:: classref-property-setget + +- void **set_format** **(** :ref:`DataFormat` value **)** +- :ref:`DataFormat` **get_format** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDVertexAttribute_property_frequency: -- :ref:`VertexFrequency` **frequency** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_frequency(value) | -+-----------+----------------------+ -| *Getter* | get_frequency() | -+-----------+----------------------+ +:ref:`VertexFrequency` **frequency** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_frequency** **(** :ref:`VertexFrequency` value **)** +- :ref:`VertexFrequency` **get_frequency** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDVertexAttribute_property_location: -- :ref:`int` **location** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_location(value) | -+-----------+---------------------+ -| *Getter* | get_location() | -+-----------+---------------------+ +:ref:`int` **location** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_location** **(** :ref:`int` value **)** +- :ref:`int` **get_location** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDVertexAttribute_property_offset: -- :ref:`int` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`int` **offset** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`int` value **)** +- :ref:`int` **get_offset** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RDVertexAttribute_property_stride: -- :ref:`int` **stride** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_stride(value) | -+-----------+-------------------+ -| *Getter* | get_stride() | -+-----------+-------------------+ +:ref:`int` **stride** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_stride** **(** :ref:`int` value **)** +- :ref:`int` **get_stride** **(** **)** .. container:: contribute diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 0e9b1e4b3..0cdd2825f 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -12,17 +12,21 @@ Rect2 2D axis-aligned bounding box using floating point coordinates. +.. rst-class:: classref-introduction-group + Description ----------- -``Rect2`` consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +**Rect2** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. It uses floating-point coordinates. If you need integer coordinates, use :ref:`Rect2i` instead. -The 3D counterpart to ``Rect2`` is :ref:`AABB`. +The 3D counterpart to **Rect2** is :ref:`AABB`. Negative values for :ref:`size` are not supported and will not work for most methods. Use :ref:`abs` to get a Rect2 with a positive size. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -32,174 +36,238 @@ Tutorials - :doc:`Advanced vector math <../tutorials/math/vectors_advanced>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`end` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | -+-------------------------------+------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`end` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`Rect2` **(** **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`Rect2` **(** :ref:`Rect2` from **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`Rect2` **(** :ref:`Rect2i` from **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`Rect2` **(** :ref:`Vector2` position, :ref:`Vector2` size **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`Rect2` **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** | -+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`Rect2` **(** **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`Rect2` **(** :ref:`Rect2` from **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`Rect2` **(** :ref:`Rect2i` from **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`Rect2` **(** :ref:`Vector2` position, :ref:`Vector2` size **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`Rect2` **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`abs` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`encloses` **(** :ref:`Rect2` b **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`expand` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_area` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_center` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`grow` **(** :ref:`float` amount **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`grow_individual` **(** :ref:`float` left, :ref:`float` top, :ref:`float` right, :ref:`float` bottom **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`grow_side` **(** :ref:`int` side, :ref:`float` amount **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_area` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_point` **(** :ref:`Vector2` point **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`intersection` **(** :ref:`Rect2` b **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`intersects` **(** :ref:`Rect2` b, :ref:`bool` include_borders=false **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Rect2` rect **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`merge` **(** :ref:`Rect2` b **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`abs` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`encloses` **(** :ref:`Rect2` b **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`expand` **(** :ref:`Vector2` to **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_area` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_center` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`grow` **(** :ref:`float` amount **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`grow_individual` **(** :ref:`float` left, :ref:`float` top, :ref:`float` right, :ref:`float` bottom **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`grow_side` **(** :ref:`int` side, :ref:`float` amount **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_area` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_point` **(** :ref:`Vector2` point **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`intersection` **(** :ref:`Rect2` b **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`intersects` **(** :ref:`Rect2` b, :ref:`bool` include_borders=false **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Rect2` rect **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`merge` **(** :ref:`Rect2` b **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Rect2` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Rect2` right **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Rect2` right **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Rect2` right **)** | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Rect2_property_end: -- :ref:`Vector2` **end** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ +:ref:`Vector2` **end** = ``Vector2(0, 0)`` Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +.. rst-class:: classref-item-separator + ---- .. _class_Rect2_property_position: -- :ref:`Vector2` **position** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ +:ref:`Vector2` **position** = ``Vector2(0, 0)`` Beginning corner. Typically has values lower than :ref:`end`. +.. rst-class:: classref-item-separator + ---- .. _class_Rect2_property_size: -- :ref:`Vector2` **size** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ +:ref:`Vector2` **size** = ``Vector2(0, 0)`` Size from :ref:`position` to :ref:`end`. Typically, all components are positive. If the size is negative, you can use :ref:`abs` to fix it. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Rect2_constructor_Rect2: -- :ref:`Rect2` **Rect2** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Rect2`` with default (zero) values of :ref:`position` and :ref:`size`. +:ref:`Rect2` **Rect2** **(** **)** + +Constructs a default-initialized **Rect2** with default (zero) values of :ref:`position` and :ref:`size`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2` **Rect2** **(** :ref:`Rect2` from **)** +.. rst-class:: classref-constructor -Constructs a ``Rect2`` as a copy of the given ``Rect2``. +:ref:`Rect2` **Rect2** **(** :ref:`Rect2` from **)** + +Constructs a **Rect2** as a copy of the given **Rect2**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2` **Rect2** **(** :ref:`Rect2i` from **)** +.. rst-class:: classref-constructor -Constructs a ``Rect2`` from a :ref:`Rect2i`. +:ref:`Rect2` **Rect2** **(** :ref:`Rect2i` from **)** + +Constructs a **Rect2** from a :ref:`Rect2i`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2` **Rect2** **(** :ref:`Vector2` position, :ref:`Vector2` size **)** +.. rst-class:: classref-constructor -Constructs a ``Rect2`` by position and size. +:ref:`Rect2` **Rect2** **(** :ref:`Vector2` position, :ref:`Vector2` size **)** + +Constructs a **Rect2** by position and size. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2` **Rect2** **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** +.. rst-class:: classref-constructor -Constructs a ``Rect2`` by x, y, width, and height. +:ref:`Rect2` **Rect2** **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** + +Constructs a **Rect2** by x, y, width, and height. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Rect2_method_abs: -- :ref:`Rect2` **abs** **(** **)** |const| +.. rst-class:: classref-method -Returns a ``Rect2`` with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. +:ref:`Rect2` **abs** **(** **)** |const| + +Returns a **Rect2** with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_encloses: -- :ref:`bool` **encloses** **(** :ref:`Rect2` b **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Rect2`` completely encloses another one. +:ref:`bool` **encloses** **(** :ref:`Rect2` b **)** |const| + +Returns ``true`` if this **Rect2** completely encloses another one. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_expand: -- :ref:`Rect2` **expand** **(** :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method -Returns a copy of this ``Rect2`` expanded to include a given point. +:ref:`Rect2` **expand** **(** :ref:`Vector2` to **)** |const| + +Returns a copy of this **Rect2** expanded to include a given point. \ **Example:**\ @@ -215,139 +283,203 @@ Returns a copy of this ``Rect2`` expanded to include a given point. .. code-tab:: csharp - # position (-3, 2), size (1, 1) + // 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) + // position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1) var rect2 = rect.Expand(new Vector2(0, -1)); +.. rst-class:: classref-item-separator + ---- .. _class_Rect2_method_get_area: -- :ref:`float` **get_area** **(** **)** |const| +.. rst-class:: classref-method -Returns the area of the ``Rect2``. See also :ref:`has_area`. +:ref:`float` **get_area** **(** **)** |const| + +Returns the area of the **Rect2**. See also :ref:`has_area`. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_get_center: -- :ref:`Vector2` **get_center** **(** **)** |const| +.. rst-class:: classref-method -Returns the center of the ``Rect2``, which is equal to :ref:`position` + (:ref:`size` / 2). +:ref:`Vector2` **get_center** **(** **)** |const| + +Returns the center of the **Rect2**, which is equal to :ref:`position` + (:ref:`size` / 2). + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_grow: -- :ref:`Rect2` **grow** **(** :ref:`float` amount **)** |const| +.. rst-class:: classref-method -Returns a copy of the ``Rect2`` grown by the specified ``amount`` on all sides. +:ref:`Rect2` **grow** **(** :ref:`float` amount **)** |const| + +Returns a copy of the **Rect2** grown by the specified ``amount`` on all sides. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_grow_individual: -- :ref:`Rect2` **grow_individual** **(** :ref:`float` left, :ref:`float` top, :ref:`float` right, :ref:`float` bottom **)** |const| +.. rst-class:: classref-method -Returns a copy of the ``Rect2`` grown by the specified amount on each side individually. +:ref:`Rect2` **grow_individual** **(** :ref:`float` left, :ref:`float` top, :ref:`float` right, :ref:`float` bottom **)** |const| + +Returns a copy of the **Rect2** grown by the specified amount on each side individually. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_grow_side: -- :ref:`Rect2` **grow_side** **(** :ref:`int` side, :ref:`float` amount **)** |const| +.. rst-class:: classref-method -Returns a copy of the ``Rect2`` grown by the specified ``amount`` on the specified :ref:`Side`. +:ref:`Rect2` **grow_side** **(** :ref:`int` side, :ref:`float` amount **)** |const| + +Returns a copy of the **Rect2** grown by the specified ``amount`` on the specified :ref:`Side`. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_has_area: -- :ref:`bool` **has_area** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``Rect2`` has area, and ``false`` if the ``Rect2`` is linear, empty, or has a negative :ref:`size`. See also :ref:`get_area`. +:ref:`bool` **has_area** **(** **)** |const| + +Returns ``true`` if the **Rect2** has area, and ``false`` if the **Rect2** is linear, empty, or has a negative :ref:`size`. See also :ref:`get_area`. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_has_point: -- :ref:`bool` **has_point** **(** :ref:`Vector2` point **)** |const| +.. rst-class:: classref-method -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. +:ref:`bool` **has_point** **(** :ref:`Vector2` point **)** |const| -\ **Note:** This method is not reliable for ``Rect2`` with a *negative size*. Use :ref:`abs` to get a positive sized equivalent rectangle to check for contained points. +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. + +\ **Note:** This method is not reliable for **Rect2** with a *negative size*. Use :ref:`abs` to get a positive sized equivalent rectangle to check for contained points. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_intersection: -- :ref:`Rect2` **intersection** **(** :ref:`Rect2` b **)** |const| +.. rst-class:: classref-method -Returns the intersection of this ``Rect2`` and ``b``. +:ref:`Rect2` **intersection** **(** :ref:`Rect2` b **)** |const| -If the rectangles do not intersect, an empty ``Rect2`` is returned. +Returns the intersection of this **Rect2** and ``b``. + +If the rectangles do not intersect, an empty **Rect2** is returned. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_intersects: -- :ref:`bool` **intersects** **(** :ref:`Rect2` b, :ref:`bool` include_borders=false **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``Rect2`` overlaps with ``b`` (i.e. they have at least one point in common). +:ref:`bool` **intersects** **(** :ref:`Rect2` b, :ref:`bool` include_borders=false **)** |const| + +Returns ``true`` if the **Rect2** overlaps with ``b`` (i.e. they have at least one point in common). If ``include_borders`` is ``true``, they will also be considered overlapping if their borders touch, even without intersection. +.. rst-class:: classref-item-separator + ---- .. _class_Rect2_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Rect2` rect **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Rect2`` and ``rect`` are approximately equal, by calling ``is_equal_approx`` on each component. +:ref:`bool` **is_equal_approx** **(** :ref:`Rect2` rect **)** |const| + +Returns ``true`` if this **Rect2** and ``rect`` are approximately equal, by calling ``is_equal_approx`` on each component. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Rect2`` is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +:ref:`bool` **is_finite** **(** **)** |const| + +Returns ``true`` if this **Rect2** is finite, by calling :ref:`@GlobalScope.is_finite` on each component. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2_method_merge: -- :ref:`Rect2` **merge** **(** :ref:`Rect2` b **)** |const| +.. rst-class:: classref-method -Returns a larger ``Rect2`` that contains this ``Rect2`` and ``b``. +:ref:`Rect2` **merge** **(** :ref:`Rect2` b **)** |const| + +Returns a larger **Rect2** that contains this **Rect2** and ``b``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Rect2_operator_neq_bool: +.. _class_Rect2_operator_neq_Rect2: -- :ref:`bool` **operator !=** **(** :ref:`Rect2` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Rect2` right **)** Returns ``true`` if the rectangles are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. ----- - -.. _class_Rect2_operator_mul_Rect2: - -- :ref:`Rect2` **operator *** **(** :ref:`Transform2D` right **)** - -Inversely transforms (multiplies) the ``Rect2`` by the given :ref:`Transform2D` transformation matrix. +.. rst-class:: classref-item-separator ---- -.. _class_Rect2_operator_eq_bool: +.. _class_Rect2_operator_mul_Transform2D: -- :ref:`bool` **operator ==** **(** :ref:`Rect2` right **)** +.. rst-class:: classref-operator + +:ref:`Rect2` **operator *** **(** :ref:`Transform2D` right **)** + +Inversely transforms (multiplies) the **Rect2** by the given :ref:`Transform2D` transformation matrix. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Rect2_operator_eq_Rect2: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Rect2` right **)** Returns ``true`` if the rectangles are exactly equal. diff --git a/classes/class_rect2i.rst b/classes/class_rect2i.rst index b42d24c4f..36aaf1423 100644 --- a/classes/class_rect2i.rst +++ b/classes/class_rect2i.rst @@ -12,15 +12,19 @@ Rect2i 2D axis-aligned bounding box using integer coordinates. +.. rst-class:: classref-introduction-group + Description ----------- -``Rect2i`` consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +**Rect2i** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. It uses integer coordinates. If you need floating-point coordinates, use :ref:`Rect2` instead. Negative values for :ref:`size` are not supported and will not work for most methods. Use :ref:`abs` to get a Rect2i with a positive size. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,168 +32,232 @@ Tutorials - :doc:`Vector math <../tutorials/math/vector_math>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------+--------------------+ -| :ref:`Vector2i` | :ref:`end` | ``Vector2i(0, 0)`` | -+---------------------------------+-------------------------------------------------+--------------------+ -| :ref:`Vector2i` | :ref:`position` | ``Vector2i(0, 0)`` | -+---------------------------------+-------------------------------------------------+--------------------+ -| :ref:`Vector2i` | :ref:`size` | ``Vector2i(0, 0)`` | -+---------------------------------+-------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`end` | ``Vector2i(0, 0)`` | + +---------------------------------+-------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`position` | ``Vector2i(0, 0)`` | + +---------------------------------+-------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`size` | ``Vector2i(0, 0)`` | + +---------------------------------+-------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`Rect2i` **(** **)** | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`Rect2i` from **)** | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`Rect2` from **)** | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`Vector2i` position, :ref:`Vector2i` size **)** | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`int` x, :ref:`int` y, :ref:`int` width, :ref:`int` height **)** | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`Rect2i` **(** **)** | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`Rect2i` from **)** | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`Rect2` from **)** | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`Vector2i` position, :ref:`Vector2i` size **)** | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`Rect2i` **(** :ref:`int` x, :ref:`int` y, :ref:`int` width, :ref:`int` height **)** | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`abs` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`encloses` **(** :ref:`Rect2i` b **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`expand` **(** :ref:`Vector2i` to **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_area` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_center` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`grow` **(** :ref:`int` amount **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`grow_individual` **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`grow_side` **(** :ref:`int` side, :ref:`int` amount **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_area` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_point` **(** :ref:`Vector2i` point **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`intersection` **(** :ref:`Rect2i` b **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`intersects` **(** :ref:`Rect2i` b **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`merge` **(** :ref:`Rect2i` b **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`abs` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`encloses` **(** :ref:`Rect2i` b **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`expand` **(** :ref:`Vector2i` to **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_area` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_center` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`grow` **(** :ref:`int` amount **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`grow_individual` **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`grow_side` **(** :ref:`int` side, :ref:`int` amount **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_area` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_point` **(** :ref:`Vector2i` point **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`intersection` **(** :ref:`Rect2i` b **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`intersects` **(** :ref:`Rect2i` b **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`merge` **(** :ref:`Rect2i` b **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Rect2i` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Rect2i` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Rect2i` right **)** | + +-------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Rect2i` right **)** | + +-------------------------+----------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Rect2i_property_end: -- :ref:`Vector2i` **end** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+--------------------+ +:ref:`Vector2i` **end** = ``Vector2i(0, 0)`` Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +.. rst-class:: classref-item-separator + ---- .. _class_Rect2i_property_position: -- :ref:`Vector2i` **position** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+--------------------+ +:ref:`Vector2i` **position** = ``Vector2i(0, 0)`` Beginning corner. Typically has values lower than :ref:`end`. +.. rst-class:: classref-item-separator + ---- .. _class_Rect2i_property_size: -- :ref:`Vector2i` **size** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+--------------------+ +:ref:`Vector2i` **size** = ``Vector2i(0, 0)`` Size from :ref:`position` to :ref:`end`. Typically, all components are positive. If the size is negative, you can use :ref:`abs` to fix it. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Rect2i_constructor_Rect2i: -- :ref:`Rect2i` **Rect2i** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Rect2i`` with default (zero) values of :ref:`position` and :ref:`size`. +:ref:`Rect2i` **Rect2i** **(** **)** + +Constructs a default-initialized **Rect2i** with default (zero) values of :ref:`position` and :ref:`size`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2i` **Rect2i** **(** :ref:`Rect2i` from **)** +.. rst-class:: classref-constructor -Constructs a ``Rect2i`` as a copy of the given ``Rect2i``. +:ref:`Rect2i` **Rect2i** **(** :ref:`Rect2i` from **)** + +Constructs a **Rect2i** as a copy of the given **Rect2i**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2i` **Rect2i** **(** :ref:`Rect2` from **)** +.. rst-class:: classref-constructor -Constructs a new ``Rect2i`` from :ref:`Rect2`. The floating point coordinates will be truncated. +:ref:`Rect2i` **Rect2i** **(** :ref:`Rect2` from **)** + +Constructs a new **Rect2i** from :ref:`Rect2`. The floating point coordinates will be truncated. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2i` **Rect2i** **(** :ref:`Vector2i` position, :ref:`Vector2i` size **)** +.. rst-class:: classref-constructor -Constructs a ``Rect2i`` by position and size. +:ref:`Rect2i` **Rect2i** **(** :ref:`Vector2i` position, :ref:`Vector2i` size **)** + +Constructs a **Rect2i** by position and size. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2i` **Rect2i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` width, :ref:`int` height **)** +.. rst-class:: classref-constructor -Constructs a ``Rect2i`` by x, y, width, and height. +:ref:`Rect2i` **Rect2i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` width, :ref:`int` height **)** + +Constructs a **Rect2i** by x, y, width, and height. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Rect2i_method_abs: -- :ref:`Rect2i` **abs** **(** **)** |const| +.. rst-class:: classref-method -Returns a ``Rect2i`` with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. +:ref:`Rect2i` **abs** **(** **)** |const| + +Returns a **Rect2i** with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_encloses: -- :ref:`bool` **encloses** **(** :ref:`Rect2i` b **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Rect2i`` completely encloses another one. +:ref:`bool` **encloses** **(** :ref:`Rect2i` b **)** |const| + +Returns ``true`` if this **Rect2i** completely encloses another one. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_expand: -- :ref:`Rect2i` **expand** **(** :ref:`Vector2i` to **)** |const| +.. rst-class:: classref-method -Returns a copy of this ``Rect2i`` expanded so that the borders align with the given point. +:ref:`Rect2i` **expand** **(** :ref:`Vector2i` to **)** |const| + +Returns a copy of this **Rect2i** expanded so that the borders align with the given point. .. tabs:: @@ -203,113 +271,165 @@ Returns a copy of this ``Rect2i`` expanded so that the borders align with the gi .. code-tab:: csharp - # position (-3, 2), size (1, 1) + // 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) + // position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1) var rect2 = rect.Expand(new Vector2i(0, -1)); +.. rst-class:: classref-item-separator + ---- .. _class_Rect2i_method_get_area: -- :ref:`int` **get_area** **(** **)** |const| +.. rst-class:: classref-method -Returns the area of the ``Rect2i``. See also :ref:`has_area`. +:ref:`int` **get_area** **(** **)** |const| + +Returns the area of the **Rect2i**. See also :ref:`has_area`. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_get_center: -- :ref:`Vector2i` **get_center** **(** **)** |const| +.. rst-class:: classref-method -Returns the center of the ``Rect2i``, which is equal to :ref:`position` + (:ref:`size` / 2). +:ref:`Vector2i` **get_center** **(** **)** |const| + +Returns the center of the **Rect2i**, which is equal to :ref:`position` + (:ref:`size` / 2). If :ref:`size` is an odd number, the returned center value will be rounded towards :ref:`position`. +.. rst-class:: classref-item-separator + ---- .. _class_Rect2i_method_grow: -- :ref:`Rect2i` **grow** **(** :ref:`int` amount **)** |const| +.. rst-class:: classref-method -Returns a copy of the ``Rect2i`` grown by the specified ``amount`` on all sides. +:ref:`Rect2i` **grow** **(** :ref:`int` amount **)** |const| + +Returns a copy of the **Rect2i** grown by the specified ``amount`` on all sides. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_grow_individual: -- :ref:`Rect2i` **grow_individual** **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** |const| +.. rst-class:: classref-method -Returns a copy of the ``Rect2i`` grown by the specified amount on each side individually. +:ref:`Rect2i` **grow_individual** **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** |const| + +Returns a copy of the **Rect2i** grown by the specified amount on each side individually. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_grow_side: -- :ref:`Rect2i` **grow_side** **(** :ref:`int` side, :ref:`int` amount **)** |const| +.. rst-class:: classref-method -Returns a copy of the ``Rect2i`` grown by the specified ``amount`` on the specified :ref:`Side`. +:ref:`Rect2i` **grow_side** **(** :ref:`int` side, :ref:`int` amount **)** |const| + +Returns a copy of the **Rect2i** grown by the specified ``amount`` on the specified :ref:`Side`. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_has_area: -- :ref:`bool` **has_area** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``Rect2i`` has area, and ``false`` if the ``Rect2i`` is linear, empty, or has a negative :ref:`size`. See also :ref:`get_area`. +:ref:`bool` **has_area** **(** **)** |const| + +Returns ``true`` if the **Rect2i** has area, and ``false`` if the **Rect2i** is linear, empty, or has a negative :ref:`size`. See also :ref:`get_area`. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_has_point: -- :ref:`bool` **has_point** **(** :ref:`Vector2i` point **)** |const| +.. rst-class:: classref-method -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. +:ref:`bool` **has_point** **(** :ref:`Vector2i` point **)** |const| -\ **Note:** This method is not reliable for ``Rect2i`` with a *negative size*. Use :ref:`abs` to get a positive sized equivalent rectangle to check for contained points. +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. + +\ **Note:** This method is not reliable for **Rect2i** with a *negative size*. Use :ref:`abs` to get a positive sized equivalent rectangle to check for contained points. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_intersection: -- :ref:`Rect2i` **intersection** **(** :ref:`Rect2i` b **)** |const| +.. rst-class:: classref-method -Returns the intersection of this ``Rect2i`` and ``b``. +:ref:`Rect2i` **intersection** **(** :ref:`Rect2i` b **)** |const| -If the rectangles do not intersect, an empty ``Rect2i`` is returned. +Returns the intersection of this **Rect2i** and ``b``. + +If the rectangles do not intersect, an empty **Rect2i** is returned. + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_intersects: -- :ref:`bool` **intersects** **(** :ref:`Rect2i` b **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``Rect2i`` overlaps with ``b`` (i.e. they have at least one point in common). +:ref:`bool` **intersects** **(** :ref:`Rect2i` b **)** |const| + +Returns ``true`` if the **Rect2i** overlaps with ``b`` (i.e. they have at least one point in common). + +.. rst-class:: classref-item-separator ---- .. _class_Rect2i_method_merge: -- :ref:`Rect2i` **merge** **(** :ref:`Rect2i` b **)** |const| +.. rst-class:: classref-method -Returns a larger ``Rect2i`` that contains this ``Rect2i`` and ``b``. +:ref:`Rect2i` **merge** **(** :ref:`Rect2i` b **)** |const| + +Returns a larger **Rect2i** that contains this **Rect2i** and ``b``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Rect2i_operator_neq_bool: +.. _class_Rect2i_operator_neq_Rect2i: -- :ref:`bool` **operator !=** **(** :ref:`Rect2i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Rect2i` right **)** Returns ``true`` if the rectangles are not equal. +.. rst-class:: classref-item-separator + ---- -.. _class_Rect2i_operator_eq_bool: +.. _class_Rect2i_operator_eq_Rect2i: -- :ref:`bool` **operator ==** **(** :ref:`Rect2i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Rect2i` right **)** Returns ``true`` if the rectangles are equal. diff --git a/classes/class_rectangleshape2d.rst b/classes/class_rectangleshape2d.rst index 6e46c7fa7..ef5a7c90c 100644 --- a/classes/class_rectangleshape2d.rst +++ b/classes/class_rectangleshape2d.rst @@ -14,12 +14,16 @@ RectangleShape2D Rectangle shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- 2D rectangle shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. This shape is useful for modeling box-like 2D objects. -\ **Performance:** Being a primitive collision shape, ``RectangleShape2D`` is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). +\ **Performance:** Being a primitive collision shape, **RectangleShape2D** is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -28,27 +32,37 @@ Tutorials - `2D Kinematic Character Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+---------------------------------------------------+---------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(20, 20)`` | -+-------------------------------+---------------------------------------------------+---------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------+---------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(20, 20)`` | + +-------------------------------+---------------------------------------------------+---------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RectangleShape2D_property_size: -- :ref:`Vector2` **size** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(20, 20)`` | -+-----------+---------------------+ -| *Setter* | set_size(value) | -+-----------+---------------------+ -| *Getter* | get_size() | -+-----------+---------------------+ +:ref:`Vector2` **size** = ``Vector2(20, 20)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_size** **(** **)** The rectangle's width and height. diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 868b003fe..a1125e505 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -16,69 +16,98 @@ RefCounted Base class for reference-counted objects. +.. rst-class:: classref-introduction-group + Description ----------- Base class for any object that keeps a reference count. :ref:`Resource` and many other helper objects inherit this class. -Unlike other :ref:`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`. +Unlike other :ref:`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`. -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. +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. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`When and how to avoid using nodes for everything <../tutorials/best_practices/node_alternatives>` +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_reference_count` **(** **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`init_ref` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`reference` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`unreference` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_reference_count` **(** **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`init_ref` **(** **)** | + +-------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`reference` **(** **)** | + +-------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`unreference` **(** **)** | + +-------------------------+---------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_RefCounted_method_get_reference_count: -- :ref:`int` **get_reference_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_reference_count** **(** **)** |const| Returns the current reference count. +.. rst-class:: classref-item-separator + ---- .. _class_RefCounted_method_init_ref: -- :ref:`bool` **init_ref** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **init_ref** **(** **)** Initializes the internal reference counter. Use this only if you really know what you are doing. Returns whether the initialization was successful. +.. rst-class:: classref-item-separator + ---- .. _class_RefCounted_method_reference: -- :ref:`bool` **reference** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **reference** **(** **)** Increments the internal reference counter. Use this only if you really know what you are doing. Returns ``true`` if the increment was successful, ``false`` otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_RefCounted_method_unreference: -- :ref:`bool` **unreference** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **unreference** **(** **)** Decrements the internal reference counter. Use this only if you really know what you are doing. diff --git a/classes/class_referencerect.rst b/classes/class_referencerect.rst index cbf2f2a51..07ba31e15 100644 --- a/classes/class_referencerect.rst +++ b/classes/class_referencerect.rst @@ -14,70 +14,84 @@ ReferenceRect Reference frame for GUI. +.. rst-class:: classref-introduction-group + Description ----------- -A rectangle box that displays only a :ref:`border_color` border color around its rectangle. ``ReferenceRect`` has no fill :ref:`Color`. If you need to display a rectangle filled with a solid color, consider using :ref:`ColorRect` instead. +A rectangle box that displays only a :ref:`border_color` border color around its rectangle. **ReferenceRect** has no fill :ref:`Color`. If you need to display a rectangle filled with a solid color, consider using :ref:`ColorRect` instead. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`border_color` | ``Color(1, 0, 0, 1)`` | -+---------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`border_width` | ``1.0`` | -+---------------------------+----------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`editor_only` | ``true`` | -+---------------------------+----------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`border_color` | ``Color(1, 0, 0, 1)`` | + +---------------------------+----------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`border_width` | ``1.0`` | + +---------------------------+----------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`editor_only` | ``true`` | + +---------------------------+----------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ReferenceRect_property_border_color: -- :ref:`Color` **border_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(1, 0, 0, 1)`` | -+-----------+-------------------------+ -| *Setter* | set_border_color(value) | -+-----------+-------------------------+ -| *Getter* | get_border_color() | -+-----------+-------------------------+ +:ref:`Color` **border_color** = ``Color(1, 0, 0, 1)`` -Sets the border :ref:`Color` of the ``ReferenceRect``. +.. rst-class:: classref-property-setget + +- void **set_border_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_border_color** **(** **)** + +Sets the border :ref:`Color` of the **ReferenceRect**. + +.. rst-class:: classref-item-separator ---- .. _class_ReferenceRect_property_border_width: -- :ref:`float` **border_width** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_border_width(value) | -+-----------+-------------------------+ -| *Getter* | get_border_width() | -+-----------+-------------------------+ +:ref:`float` **border_width** = ``1.0`` -Sets the border width of the ``ReferenceRect``. The border grows both inwards and outwards with respect to the rectangle box. +.. rst-class:: classref-property-setget + +- void **set_border_width** **(** :ref:`float` value **)** +- :ref:`float` **get_border_width** **(** **)** + +Sets the border width of the **ReferenceRect**. The border grows both inwards and outwards with respect to the rectangle box. + +.. rst-class:: classref-item-separator ---- .. _class_ReferenceRect_property_editor_only: -- :ref:`bool` **editor_only** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``true`` | -+-----------+------------------------+ -| *Setter* | set_editor_only(value) | -+-----------+------------------------+ -| *Getter* | get_editor_only() | -+-----------+------------------------+ +:ref:`bool` **editor_only** = ``true`` -If ``true``, the ``ReferenceRect`` will only be visible while in editor. Otherwise, ``ReferenceRect`` will be visible in the running project. +.. rst-class:: classref-property-setget + +- void **set_editor_only** **(** :ref:`bool` value **)** +- :ref:`bool` **get_editor_only** **(** **)** + +If ``true``, the **ReferenceRect** will only be visible while in editor. Otherwise, **ReferenceRect** will be visible in the running project. .. |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.)` diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index cb7e66dc5..a9f2e281c 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -14,300 +14,358 @@ ReflectionProbe Captures its surroundings to create fast, accurate reflections from a given point. +.. rst-class:: classref-introduction-group + Description ----------- Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses. -The ``ReflectionProbe`` is used to create high-quality reflections at a low performance cost (when :ref:`update_mode` is :ref:`UPDATE_ONCE`). ``ReflectionProbe``\ s can be blended together and with the rest of the scene smoothly. ``ReflectionProbe``\ s can also be combined with :ref:`VoxelGI`, SDFGI (:ref:`Environment.sdfgi_enabled`) and screen-space reflections (:ref:`Environment.ssr_enabled`) to get more accurate reflections in specific areas. ``ReflectionProbe``\ s render all objects within their :ref:`cull_mask`, so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them as-is. +The **ReflectionProbe** is used to create high-quality reflections at a low performance cost (when :ref:`update_mode` is :ref:`UPDATE_ONCE`). **ReflectionProbe**\ s can be blended together and with the rest of the scene smoothly. **ReflectionProbe**\ s can also be combined with :ref:`VoxelGI`, SDFGI (:ref:`Environment.sdfgi_enabled`) and screen-space reflections (:ref:`Environment.ssr_enabled`) to get more accurate reflections in specific areas. **ReflectionProbe**\ s render all objects within their :ref:`cull_mask`, so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them as-is. -\ **Note:** Unlike :ref:`VoxelGI` and SDFGI, ``ReflectionProbe``\ s only source their environment from a :ref:`WorldEnvironment` node. If you specify an :ref:`Environment` resource within a :ref:`Camera3D` node, it will be ignored by the ``ReflectionProbe``. This can lead to incorrect lighting within the ``ReflectionProbe``. +\ **Note:** Unlike :ref:`VoxelGI` and SDFGI, **ReflectionProbe**\ s only source their environment from a :ref:`WorldEnvironment` node. If you specify an :ref:`Environment` resource within a :ref:`Camera3D` node, it will be ignored by the **ReflectionProbe**. This can lead to incorrect lighting within the **ReflectionProbe**. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Reflection probes <../tutorials/3d/reflection_probes>` +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`Color` | :ref:`ambient_color` | ``Color(0, 0, 0, 1)`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`ambient_color_energy` | ``1.0`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`AmbientMode` | :ref:`ambient_mode` | ``1`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`box_projection` | ``false`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`cull_mask` | ``1048575`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`enable_shadows` | ``false`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(10, 10, 10)`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`intensity` | ``1.0`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`interior` | ``false`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`max_distance` | ``0.0`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`mesh_lod_threshold` | ``1.0`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`Vector3` | :ref:`origin_offset` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`UpdateMode` | :ref:`update_mode` | ``0`` | -+------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`Color` | :ref:`ambient_color` | ``Color(0, 0, 0, 1)`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`ambient_color_energy` | ``1.0`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`AmbientMode` | :ref:`ambient_mode` | ``1`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`box_projection` | ``false`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`cull_mask` | ``1048575`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`enable_shadows` | ``false`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(10, 10, 10)`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`intensity` | ``1.0`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`interior` | ``false`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`max_distance` | ``0.0`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`mesh_lod_threshold` | ``1.0`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`origin_offset` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`UpdateMode` | :ref:`update_mode` | ``0`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ReflectionProbe_UpdateMode: -.. _class_ReflectionProbe_constant_UPDATE_ONCE: - -.. _class_ReflectionProbe_constant_UPDATE_ALWAYS: +.. rst-class:: classref-enumeration enum **UpdateMode**: -- **UPDATE_ONCE** = **0** --- Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than :ref:`UPDATE_ALWAYS`, but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a ``ReflectionProbe`` update by moving the ``ReflectionProbe`` slightly in any direction. +.. _class_ReflectionProbe_constant_UPDATE_ONCE: -- **UPDATE_ALWAYS** = **1** --- Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with :ref:`UPDATE_ALWAYS` at most per scene. For all other use cases, use :ref:`UPDATE_ONCE`. +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_ONCE** = ``0`` + +Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than :ref:`UPDATE_ALWAYS`, but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a **ReflectionProbe** update by moving the **ReflectionProbe** slightly in any direction. + +.. _class_ReflectionProbe_constant_UPDATE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_ALWAYS** = ``1`` + +Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with :ref:`UPDATE_ALWAYS` at most per scene. For all other use cases, use :ref:`UPDATE_ONCE`. + +.. rst-class:: classref-item-separator ---- .. _enum_ReflectionProbe_AmbientMode: -.. _class_ReflectionProbe_constant_AMBIENT_DISABLED: - -.. _class_ReflectionProbe_constant_AMBIENT_ENVIRONMENT: - -.. _class_ReflectionProbe_constant_AMBIENT_COLOR: +.. rst-class:: classref-enumeration enum **AmbientMode**: -- **AMBIENT_DISABLED** = **0** --- Do not apply any ambient lighting inside the ``ReflectionProbe``'s :ref:`extents`. +.. _class_ReflectionProbe_constant_AMBIENT_DISABLED: -- **AMBIENT_ENVIRONMENT** = **1** --- Apply automatically-sourced environment lighting inside the ``ReflectionProbe``'s :ref:`extents`. +.. rst-class:: classref-enumeration-constant -- **AMBIENT_COLOR** = **2** --- Apply custom ambient lighting inside the ``ReflectionProbe``'s :ref:`extents`. See :ref:`ambient_color` and :ref:`ambient_color_energy`. +:ref:`AmbientMode` **AMBIENT_DISABLED** = ``0`` + +Do not apply any ambient lighting inside the **ReflectionProbe**'s :ref:`extents`. + +.. _class_ReflectionProbe_constant_AMBIENT_ENVIRONMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AmbientMode` **AMBIENT_ENVIRONMENT** = ``1`` + +Apply automatically-sourced environment lighting inside the **ReflectionProbe**'s :ref:`extents`. + +.. _class_ReflectionProbe_constant_AMBIENT_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`AmbientMode` **AMBIENT_COLOR** = ``2`` + +Apply custom ambient lighting inside the **ReflectionProbe**'s :ref:`extents`. See :ref:`ambient_color` and :ref:`ambient_color_energy`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ReflectionProbe_property_ambient_color: -- :ref:`Color` **ambient_color** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_ambient_color(value) | -+-----------+--------------------------+ -| *Getter* | get_ambient_color() | -+-----------+--------------------------+ +:ref:`Color` **ambient_color** = ``Color(0, 0, 0, 1)`` -The custom ambient color to use within the ``ReflectionProbe``'s :ref:`extents`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. +.. rst-class:: classref-property-setget + +- void **set_ambient_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_ambient_color** **(** **)** + +The custom ambient color to use within the **ReflectionProbe**'s :ref:`extents`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. + +.. rst-class:: classref-item-separator ---- .. _class_ReflectionProbe_property_ambient_color_energy: -- :ref:`float` **ambient_color_energy** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------------+ -| *Setter* | set_ambient_color_energy(value) | -+-----------+---------------------------------+ -| *Getter* | get_ambient_color_energy() | -+-----------+---------------------------------+ +:ref:`float` **ambient_color_energy** = ``1.0`` -The custom ambient color energy to use within the ``ReflectionProbe``'s :ref:`extents`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. +.. rst-class:: classref-property-setget + +- void **set_ambient_color_energy** **(** :ref:`float` value **)** +- :ref:`float` **get_ambient_color_energy** **(** **)** + +The custom ambient color energy to use within the **ReflectionProbe**'s :ref:`extents`. Only effective if :ref:`ambient_mode` is :ref:`AMBIENT_COLOR`. + +.. rst-class:: classref-item-separator ---- .. _class_ReflectionProbe_property_ambient_mode: -- :ref:`AmbientMode` **ambient_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_ambient_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_ambient_mode() | -+-----------+-------------------------+ +:ref:`AmbientMode` **ambient_mode** = ``1`` -The ambient color to use within the ``ReflectionProbe``'s :ref:`extents`. The ambient color will smoothly blend with other ``ReflectionProbe``\ s and the rest of the scene (outside the ``ReflectionProbe``'s :ref:`extents`). +.. rst-class:: classref-property-setget + +- void **set_ambient_mode** **(** :ref:`AmbientMode` value **)** +- :ref:`AmbientMode` **get_ambient_mode** **(** **)** + +The ambient color to use within the **ReflectionProbe**'s :ref:`extents`. The ambient color will smoothly blend with other **ReflectionProbe**\ s and the rest of the scene (outside the **ReflectionProbe**'s :ref:`extents`). + +.. rst-class:: classref-item-separator ---- .. _class_ReflectionProbe_property_box_projection: -- :ref:`bool` **box_projection** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_enable_box_projection(value) | -+-----------+----------------------------------+ -| *Getter* | is_box_projection_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **box_projection** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_box_projection** **(** :ref:`bool` value **)** +- :ref:`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. -\ **Note:** To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the ``ReflectionProbe`` node. +\ **Note:** To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the **ReflectionProbe** node. + +.. rst-class:: classref-item-separator ---- .. _class_ReflectionProbe_property_cull_mask: -- :ref:`int` **cull_mask** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1048575`` | -+-----------+----------------------+ -| *Setter* | set_cull_mask(value) | -+-----------+----------------------+ -| *Getter* | get_cull_mask() | -+-----------+----------------------+ +:ref:`int` **cull_mask** = ``1048575`` + +.. rst-class:: classref-property-setget + +- void **set_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_cull_mask** **(** **)** Sets the cull mask which determines what objects are drawn by this probe. Every :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ReflectionProbe_property_enable_shadows: -- :ref:`bool` **enable_shadows** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_enable_shadows(value) | -+-----------+---------------------------+ -| *Getter* | are_shadows_enabled() | -+-----------+---------------------------+ +:ref:`bool` **enable_shadows** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enable_shadows** **(** :ref:`bool` value **)** +- :ref:`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` :ref:`update_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_ReflectionProbe_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector3(10, 10, 10)`` | -+-----------+-------------------------+ -| *Setter* | set_extents(value) | -+-----------+-------------------------+ -| *Getter* | get_extents() | -+-----------+-------------------------+ +:ref:`Vector3` **extents** = ``Vector3(10, 10, 10)`` + +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** The size of the reflection probe. The larger the extents, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the extents only as large as you need them. -\ **Note:** To better fit areas that are not aligned to the grid, you can rotate the ``ReflectionProbe`` node. +\ **Note:** To better fit areas that are not aligned to the grid, you can rotate the **ReflectionProbe** node. + +.. rst-class:: classref-item-separator ---- .. _class_ReflectionProbe_property_intensity: -- :ref:`float` **intensity** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_intensity(value) | -+-----------+----------------------+ -| *Getter* | get_intensity() | -+-----------+----------------------+ +:ref:`float` **intensity** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_intensity** **(** :ref:`float` value **)** +- :ref:`float` **get_intensity** **(** **)** Defines the reflection intensity. Intensity modulates the strength of the reflection. +.. rst-class:: classref-item-separator + ---- .. _class_ReflectionProbe_property_interior: -- :ref:`bool` **interior** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_as_interior(value) | -+-----------+------------------------+ -| *Getter* | is_set_as_interior() | -+-----------+------------------------+ +:ref:`bool` **interior** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_as_interior** **(** :ref:`bool` value **)** +- :ref:`bool` **is_set_as_interior** **(** **)** If ``true``, reflections will ignore sky contribution. +.. rst-class:: classref-item-separator + ---- .. _class_ReflectionProbe_property_max_distance: -- :ref:`float` **max_distance** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_max_distance(value) | -+-----------+-------------------------+ -| *Getter* | get_max_distance() | -+-----------+-------------------------+ +:ref:`float` **max_distance** = ``0.0`` -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` :ref:`update_mode`. +.. rst-class:: classref-property-setget + +- void **set_max_distance** **(** :ref:`float` value **)** +- :ref:`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` :ref:`update_mode`. \ **Note:** The maximum reflection distance is always at least equal to the :ref:`extents`. This means that decreasing :ref:`max_distance` will not always cull objects from reflections, especially if the reflection probe's :ref:`extents` are already large. +.. rst-class:: classref-item-separator + ---- .. _class_ReflectionProbe_property_mesh_lod_threshold: -- :ref:`float` **mesh_lod_threshold** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------+ -| *Setter* | set_mesh_lod_threshold(value) | -+-----------+-------------------------------+ -| *Getter* | get_mesh_lod_threshold() | -+-----------+-------------------------------+ +:ref:`float` **mesh_lod_threshold** = ``1.0`` -The automatic LOD bias to use for meshes rendered within the ``ReflectionProbe`` (this is analog to :ref:`Viewport.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` to improve performance at the cost of geometry detail, especially when using the :ref:`UPDATE_ALWAYS` :ref:`update_mode`. +.. rst-class:: classref-property-setget + +- void **set_mesh_lod_threshold** **(** :ref:`float` value **)** +- :ref:`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`). 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` to improve performance at the cost of geometry detail, especially when using the :ref:`UPDATE_ALWAYS` :ref:`update_mode`. \ **Note:** :ref:`mesh_lod_threshold` does not affect :ref:`GeometryInstance3D` visibility ranges (also known as "manual" LOD or hierarchical LOD). +.. rst-class:: classref-item-separator + ---- .. _class_ReflectionProbe_property_origin_offset: -- :ref:`Vector3` **origin_offset** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_origin_offset(value) | -+-----------+--------------------------+ -| *Getter* | get_origin_offset() | -+-----------+--------------------------+ +:ref:`Vector3` **origin_offset** = ``Vector3(0, 0, 0)`` -Sets the origin offset to be used when this ``ReflectionProbe`` is in :ref:`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. +.. rst-class:: classref-property-setget + +- void **set_origin_offset** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_origin_offset** **(** **)** + +Sets the origin offset to be used when this **ReflectionProbe** is in :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_ReflectionProbe_property_update_mode: -- :ref:`UpdateMode` **update_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_update_mode(value) | -+-----------+------------------------+ -| *Getter* | get_update_mode() | -+-----------+------------------------+ +:ref:`UpdateMode` **update_mode** = ``0`` -Sets how frequently the ``ReflectionProbe`` is updated. Can be :ref:`UPDATE_ONCE` or :ref:`UPDATE_ALWAYS`. +.. rst-class:: classref-property-setget + +- void **set_update_mode** **(** :ref:`UpdateMode` value **)** +- :ref:`UpdateMode` **get_update_mode** **(** **)** + +Sets how frequently the **ReflectionProbe** is updated. Can be :ref:`UPDATE_ONCE` or :ref:`UPDATE_ALWAYS`. .. |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.)` diff --git a/classes/class_regex.rst b/classes/class_regex.rst index 23e72b670..41d6c96d8 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -14,6 +14,8 @@ RegEx Class for searching text for patterns using regular expressions. +.. rst-class:: classref-introduction-group + Description ----------- @@ -73,113 +75,162 @@ If you need to process multiple results, :ref:`search_all`__ to test regular expressions online. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`compile` **(** :ref:`String` pattern **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RegEx` | :ref:`create_from_string` **(** :ref:`String` pattern **)** |static| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_group_count` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_names` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_pattern` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RegExMatch` | :ref:`search` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RegExMatch[]` | :ref:`search_all` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`sub` **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`compile` **(** :ref:`String` pattern **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RegEx` | :ref:`create_from_string` **(** :ref:`String` pattern **)** |static| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_group_count` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_names` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_pattern` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RegExMatch` | :ref:`search` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RegExMatch[]` | :ref:`search_all` **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`sub` **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_RegEx_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_compile: -- :ref:`Error` **compile** **(** :ref:`String` pattern **)** +.. rst-class:: classref-method + +:ref:`Error` **compile** **(** :ref:`String` pattern **)** Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK` if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_create_from_string: -- :ref:`RegEx` **create_from_string** **(** :ref:`String` pattern **)** |static| +.. rst-class:: classref-method -Creates and compiles a new ``RegEx`` object. +:ref:`RegEx` **create_from_string** **(** :ref:`String` pattern **)** |static| + +Creates and compiles a new **RegEx** object. + +.. rst-class:: classref-item-separator ---- .. _class_RegEx_method_get_group_count: -- :ref:`int` **get_group_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_group_count** **(** **)** |const| Returns the number of capturing groups in compiled pattern. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_get_names: -- :ref:`PackedStringArray` **get_names** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_names** **(** **)** |const| Returns an array of names of named capturing groups in the compiled pattern. They are ordered by appearance. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_get_pattern: -- :ref:`String` **get_pattern** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_pattern** **(** **)** |const| Returns the original search pattern that was compiled. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_is_valid: -- :ref:`bool` **is_valid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid** **(** **)** |const| Returns whether this object has a valid search pattern assigned. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_search: -- :ref:`RegExMatch` **search** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`RegExMatch` **search** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| Searches the text for the compiled pattern. Returns a :ref:`RegExMatch` container of the first matching result if found, otherwise ``null``. The region to search within can be specified with ``offset`` and ``end``. This is useful when searching for another match in the same ``subject`` by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor ``^`` is not affected by ``offset``, and the character before ``offset`` will be checked for the word boundary ``\b``. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_search_all: -- :ref:`RegExMatch[]` **search_all** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`RegExMatch[]` **search_all** **(** :ref:`String` subject, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| Searches the text for the compiled pattern. Returns an array of :ref:`RegExMatch` containers for each non-overlapping result. If no results were found, an empty array is returned instead. The region to search within can be specified with ``offset`` and ``end``. This is useful when searching for another match in the same ``subject`` by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor ``^`` is not affected by ``offset``, and the character before ``offset`` will be checked for the word boundary ``\b``. +.. rst-class:: classref-item-separator + ---- .. _class_RegEx_method_sub: -- :ref:`String` **sub** **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`String` **sub** **(** :ref:`String` subject, :ref:`String` replacement, :ref:`bool` all=false, :ref:`int` offset=0, :ref:`int` end=-1 **)** |const| 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). diff --git a/classes/class_regexmatch.rst b/classes/class_regexmatch.rst index 332085da5..1e8bbe681 100644 --- a/classes/class_regexmatch.rst +++ b/classes/class_regexmatch.rst @@ -14,112 +14,154 @@ RegExMatch Contains the results of a :ref:`RegEx` search. +.. rst-class:: classref-introduction-group + Description ----------- Contains the results of a single :ref:`RegEx` match returned by :ref:`RegEx.search` and :ref:`RegEx.search_all`. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+---------------------------------------------------+-------------------------+ -| :ref:`Dictionary` | :ref:`names` | ``{}`` | -+---------------------------------------------------+---------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`strings` | ``PackedStringArray()`` | -+---------------------------------------------------+---------------------------------------------------+-------------------------+ -| :ref:`String` | :ref:`subject` | ``""`` | -+---------------------------------------------------+---------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------+-------------------------+ + | :ref:`Dictionary` | :ref:`names` | ``{}`` | + +---------------------------------------------------+---------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`strings` | ``PackedStringArray()`` | + +---------------------------------------------------+---------------------------------------------------+-------------------------+ + | :ref:`String` | :ref:`subject` | ``""`` | + +---------------------------------------------------+---------------------------------------------------+-------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+----------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_end` **(** :ref:`Variant` name=0 **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_group_count` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_start` **(** :ref:`Variant` name=0 **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string` **(** :ref:`Variant` name=0 **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_end` **(** :ref:`Variant` name=0 **)** |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_group_count` **(** **)** |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_start` **(** :ref:`Variant` name=0 **)** |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string` **(** :ref:`Variant` name=0 **)** |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RegExMatch_property_names: -- :ref:`Dictionary` **names** +.. rst-class:: classref-property -+-----------+-------------+ -| *Default* | ``{}`` | -+-----------+-------------+ -| *Getter* | get_names() | -+-----------+-------------+ +:ref:`Dictionary` **names** = ``{}`` + +.. rst-class:: classref-property-setget + +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_RegExMatch_property_strings: -- :ref:`PackedStringArray` **strings** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+-------------------------+ -| *Getter* | get_strings() | -+-----------+-------------------------+ +:ref:`PackedStringArray` **strings** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- :ref:`PackedStringArray` **get_strings** **(** **)** An :ref:`Array` of the match and its capturing groups. +.. rst-class:: classref-item-separator + ---- .. _class_RegExMatch_property_subject: -- :ref:`String` **subject** +.. rst-class:: classref-property -+-----------+---------------+ -| *Default* | ``""`` | -+-----------+---------------+ -| *Getter* | get_subject() | -+-----------+---------------+ +:ref:`String` **subject** = ``""`` + +.. rst-class:: classref-property-setget + +- :ref:`String` **get_subject** **(** **)** The source string used with the search pattern to find this matching result. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RegExMatch_method_get_end: -- :ref:`int` **get_end** **(** :ref:`Variant` name=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_end** **(** :ref:`Variant` name=0 **)** |const| 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. Returns -1 if the group did not match or doesn't exist. +.. rst-class:: classref-item-separator + ---- .. _class_RegExMatch_method_get_group_count: -- :ref:`int` **get_group_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_group_count** **(** **)** |const| Returns the number of capturing groups. +.. rst-class:: classref-item-separator + ---- .. _class_RegExMatch_method_get_start: -- :ref:`int` **get_start** **(** :ref:`Variant` name=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_start** **(** :ref:`Variant` name=0 **)** |const| 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. Returns -1 if the group did not match or doesn't exist. +.. rst-class:: classref-item-separator + ---- .. _class_RegExMatch_method_get_string: -- :ref:`String` **get_string** **(** :ref:`Variant` name=0 **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_string** **(** :ref:`Variant` name=0 **)** |const| 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. diff --git a/classes/class_remotetransform2d.rst b/classes/class_remotetransform2d.rst index df00706d9..90867307d 100644 --- a/classes/class_remotetransform2d.rst +++ b/classes/class_remotetransform2d.rst @@ -14,6 +14,8 @@ RemoteTransform2D RemoteTransform2D pushes its own :ref:`Transform2D` to another :ref:`CanvasItem` derived Node in the scene. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,117 +23,144 @@ RemoteTransform2D pushes its own :ref:`Transform2D` to anothe It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`remote_path` | ``NodePath("")`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`update_position` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`update_rotation` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`update_scale` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`use_global_coordinates` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`remote_path` | ``NodePath("")`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`update_position` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`update_rotation` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`update_scale` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`use_global_coordinates` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+------------------------------------------------------------------------------------------+ -| void | :ref:`force_update_cache` **(** **)** | -+------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_cache` **(** **)** | + +------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RemoteTransform2D_property_remote_path: -- :ref:`NodePath` **remote_path** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_remote_node(value) | -+-----------+------------------------+ -| *Getter* | get_remote_node() | -+-----------+------------------------+ +:ref:`NodePath` **remote_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_remote_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_remote_node** **(** **)** The :ref:`NodePath` to the remote node, relative to the RemoteTransform2D's position in the scene. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform2D_property_update_position: -- :ref:`bool` **update_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_update_position(value) | -+-----------+----------------------------+ -| *Getter* | get_update_position() | -+-----------+----------------------------+ +:ref:`bool` **update_position** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_update_position** **(** :ref:`bool` value **)** +- :ref:`bool` **get_update_position** **(** **)** If ``true``, the remote node's position is updated. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform2D_property_update_rotation: -- :ref:`bool` **update_rotation** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_update_rotation(value) | -+-----------+----------------------------+ -| *Getter* | get_update_rotation() | -+-----------+----------------------------+ +:ref:`bool` **update_rotation** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_update_rotation** **(** :ref:`bool` value **)** +- :ref:`bool` **get_update_rotation** **(** **)** If ``true``, the remote node's rotation is updated. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform2D_property_update_scale: -- :ref:`bool` **update_scale** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_update_scale(value) | -+-----------+-------------------------+ -| *Getter* | get_update_scale() | -+-----------+-------------------------+ +:ref:`bool` **update_scale** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_update_scale** **(** :ref:`bool` value **)** +- :ref:`bool` **get_update_scale** **(** **)** If ``true``, the remote node's scale is updated. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform2D_property_use_global_coordinates: -- :ref:`bool` **use_global_coordinates** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------+ -| *Setter* | set_use_global_coordinates(value) | -+-----------+-----------------------------------+ -| *Getter* | get_use_global_coordinates() | -+-----------+-----------------------------------+ +:ref:`bool` **use_global_coordinates** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_global_coordinates** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_global_coordinates** **(** **)** If ``true``, global coordinates are used. If ``false``, local coordinates are used. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RemoteTransform2D_method_force_update_cache: -- void **force_update_cache** **(** **)** +.. rst-class:: classref-method -``RemoteTransform2D`` caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache` forces it to update the cache again. +void **force_update_cache** **(** **)** + +**RemoteTransform2D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache` forces it to update the cache again. .. |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.)` diff --git a/classes/class_remotetransform3d.rst b/classes/class_remotetransform3d.rst index 123029079..212db0bd9 100644 --- a/classes/class_remotetransform3d.rst +++ b/classes/class_remotetransform3d.rst @@ -14,6 +14,8 @@ RemoteTransform3D RemoteTransform3D pushes its own :ref:`Transform3D` to another :ref:`Node3D` derived Node in the scene. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,117 +23,144 @@ RemoteTransform3D pushes its own :ref:`Transform3D` to anothe It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`remote_path` | ``NodePath("")`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`update_position` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`update_rotation` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`update_scale` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`use_global_coordinates` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`remote_path` | ``NodePath("")`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`update_position` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`update_rotation` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`update_scale` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`use_global_coordinates` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+------------------------------------------------------------------------------------------+ -| void | :ref:`force_update_cache` **(** **)** | -+------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_cache` **(** **)** | + +------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RemoteTransform3D_property_remote_path: -- :ref:`NodePath` **remote_path** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_remote_node(value) | -+-----------+------------------------+ -| *Getter* | get_remote_node() | -+-----------+------------------------+ +:ref:`NodePath` **remote_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_remote_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_remote_node** **(** **)** The :ref:`NodePath` to the remote node, relative to the RemoteTransform3D's position in the scene. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform3D_property_update_position: -- :ref:`bool` **update_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_update_position(value) | -+-----------+----------------------------+ -| *Getter* | get_update_position() | -+-----------+----------------------------+ +:ref:`bool` **update_position** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_update_position** **(** :ref:`bool` value **)** +- :ref:`bool` **get_update_position** **(** **)** If ``true``, the remote node's position is updated. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform3D_property_update_rotation: -- :ref:`bool` **update_rotation** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_update_rotation(value) | -+-----------+----------------------------+ -| *Getter* | get_update_rotation() | -+-----------+----------------------------+ +:ref:`bool` **update_rotation** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_update_rotation** **(** :ref:`bool` value **)** +- :ref:`bool` **get_update_rotation** **(** **)** If ``true``, the remote node's rotation is updated. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform3D_property_update_scale: -- :ref:`bool` **update_scale** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_update_scale(value) | -+-----------+-------------------------+ -| *Getter* | get_update_scale() | -+-----------+-------------------------+ +:ref:`bool` **update_scale** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_update_scale** **(** :ref:`bool` value **)** +- :ref:`bool` **get_update_scale** **(** **)** If ``true``, the remote node's scale is updated. +.. rst-class:: classref-item-separator + ---- .. _class_RemoteTransform3D_property_use_global_coordinates: -- :ref:`bool` **use_global_coordinates** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------+ -| *Setter* | set_use_global_coordinates(value) | -+-----------+-----------------------------------+ -| *Getter* | get_use_global_coordinates() | -+-----------+-----------------------------------+ +:ref:`bool` **use_global_coordinates** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_global_coordinates** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_global_coordinates** **(** **)** If ``true``, global coordinates are used. If ``false``, local coordinates are used. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RemoteTransform3D_method_force_update_cache: -- void **force_update_cache** **(** **)** +.. rst-class:: classref-method -``RemoteTransform3D`` caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache` forces it to update the cache again. +void **force_update_cache** **(** **)** + +**RemoteTransform3D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache` forces it to update the cache again. .. |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.)` diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index 7805e08f4..a89e92707 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -16,3145 +16,5522 @@ RenderingDevice There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`barrier` **(** :ref:`int` from=7, :ref:`int` to=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`buffer_clear` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`buffer_get_data` **(** :ref:`RID` buffer **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`buffer_update` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`capture_timestamp` **(** :ref:`String` name **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compute_list_add_barrier` **(** :ref:`int` compute_list **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`compute_list_begin` **(** :ref:`bool` allow_draw_overlap=false **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compute_list_bind_compute_pipeline` **(** :ref:`int` compute_list, :ref:`RID` compute_pipeline **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compute_list_bind_uniform_set` **(** :ref:`int` compute_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compute_list_dispatch` **(** :ref:`int` compute_list, :ref:`int` x_groups, :ref:`int` y_groups, :ref:`int` z_groups **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compute_list_end` **(** :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`compute_list_set_push_constant` **(** :ref:`int` compute_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`compute_pipeline_create` **(** :ref:`RID` shader, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`compute_pipeline_is_valid` **(** :ref:`RID` compute_pieline **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RenderingDevice` | :ref:`create_local_device` **(** **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_command_begin_label` **(** :ref:`String` name, :ref:`Color` color **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_command_end_label` **(** **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_command_insert_label` **(** :ref:`String` name, :ref:`Color` color **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`draw_list_begin` **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Array` storage_textures=[] **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`draw_list_begin_for_screen` **(** :ref:`int` screen=0, :ref:`Color` clear_color=Color(0, 0, 0, 1) **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`draw_list_begin_split` **(** :ref:`RID` framebuffer, :ref:`int` splits, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`RID[]` storage_textures=[] **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_bind_index_array` **(** :ref:`int` draw_list, :ref:`RID` index_array **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_bind_render_pipeline` **(** :ref:`int` draw_list, :ref:`RID` render_pipeline **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_bind_uniform_set` **(** :ref:`int` draw_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_bind_vertex_array` **(** :ref:`int` draw_list, :ref:`RID` vertex_array **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_disable_scissor` **(** :ref:`int` draw_list **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_draw` **(** :ref:`int` draw_list, :ref:`bool` use_indices, :ref:`int` instances, :ref:`int` procedural_vertex_count=0 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_enable_scissor` **(** :ref:`int` draw_list, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_end` **(** :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_set_blend_constants` **(** :ref:`int` draw_list, :ref:`Color` color **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_list_set_push_constant` **(** :ref:`int` draw_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`draw_list_switch_to_next_pass` **(** **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`draw_list_switch_to_next_pass_split` **(** :ref:`int` splits **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`framebuffer_create` **(** :ref:`RID[]` textures, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`framebuffer_create_empty` **(** :ref:`Vector2i` size, :ref:`TextureSamples` samples=0, :ref:`int` validate_with_format=-1 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`framebuffer_create_multipass` **(** :ref:`RID[]` textures, :ref:`RDFramebufferPass[]` passes, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`framebuffer_format_create` **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`int` view_count=1 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`framebuffer_format_create_empty` **(** :ref:`TextureSamples` samples=0 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`framebuffer_format_create_multipass` **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`RDFramebufferPass[]` passes, :ref:`int` view_count=1 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextureSamples` | :ref:`framebuffer_format_get_texture_samples` **(** :ref:`int` format, :ref:`int` render_pass=0 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`framebuffer_get_format` **(** :ref:`RID` framebuffer **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`framebuffer_is_valid` **(** :ref:`RID` framebuffer **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`full_barrier` **(** **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_captured_timestamp_cpu_time` **(** :ref:`int` index **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_captured_timestamp_gpu_time` **(** :ref:`int` index **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_captured_timestamp_name` **(** :ref:`int` index **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_captured_timestamps_count` **(** **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_captured_timestamps_frame` **(** **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_device_name` **(** **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_device_pipeline_cache_uuid` **(** **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_device_vendor_name` **(** **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_driver_resource` **(** :ref:`DriverResource` resource, :ref:`RID` rid, :ref:`int` index **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_frame_delay` **(** **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_memory_usage` **(** :ref:`MemoryType` type **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`index_array_create` **(** :ref:`RID` index_buffer, :ref:`int` index_offset, :ref:`int` index_count **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`index_buffer_create` **(** :ref:`int` size_indices, :ref:`IndexBufferFormat` format, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_restart_indices=false **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`limit_get` **(** :ref:`Limit` limit **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`render_pipeline_create` **(** :ref:`RID` shader, :ref:`int` framebuffer_format, :ref:`int` vertex_format, :ref:`RenderPrimitive` primitive, :ref:`RDPipelineRasterizationState` rasterization_state, :ref:`RDPipelineMultisampleState` multisample_state, :ref:`RDPipelineDepthStencilState` stencil_state, :ref:`RDPipelineColorBlendState` color_blend_state, :ref:`int` dynamic_state_flags=0, :ref:`int` for_render_pass=0, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`render_pipeline_is_valid` **(** :ref:`RID` render_pipeline **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`sampler_create` **(** :ref:`RDSamplerState` state **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`screen_get_framebuffer_format` **(** **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`screen_get_height` **(** :ref:`int` screen=0 **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`screen_get_width` **(** :ref:`int` screen=0 **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_resource_name` **(** :ref:`RID` id, :ref:`String` name **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`shader_compile_binary_from_spirv` **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RDShaderSPIRV` | :ref:`shader_compile_spirv_from_source` **(** :ref:`RDShaderSource` shader_source, :ref:`bool` allow_cache=true **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shader_create_from_bytecode` **(** :ref:`PackedByteArray` binary_data **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shader_create_from_spirv` **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shader_get_vertex_input_attribute_mask` **(** :ref:`RID` shader **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`storage_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`int` usage=0 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`submit` **(** **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sync` **(** **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_buffer_create` **(** :ref:`int` size_bytes, :ref:`DataFormat` format, :ref:`PackedByteArray` data=PackedByteArray() **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`texture_clear` **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`texture_copy` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_create` **(** :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`PackedByteArray[]` data=[] **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_create_shared` **(** :ref:`RDTextureView` view, :ref:`RID` with_texture **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_create_shared_from_slice` **(** :ref:`RDTextureView` view, :ref:`RID` with_texture, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` mipmaps=1, :ref:`TextureSliceType` slice_type=0 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`texture_get_data` **(** :ref:`RID` texture, :ref:`int` layer **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`texture_is_format_supported_for_usage` **(** :ref:`DataFormat` format, :ref:`int` usage_flags **)** |const| | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`texture_is_shared` **(** :ref:`RID` texture **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`texture_is_valid` **(** :ref:`RID` texture **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`texture_resolve_multisample` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`texture_update` **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, :ref:`int` post_barrier=7 **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`uniform_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray() **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`uniform_set_create` **(** :ref:`RDUniform[]` uniforms, :ref:`RID` shader, :ref:`int` shader_set **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`uniform_set_is_valid` **(** :ref:`RID` uniform_set **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`vertex_array_create` **(** :ref:`int` vertex_count, :ref:`int` vertex_format, :ref:`RID[]` src_buffers **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`vertex_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_as_storage=false **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`vertex_format_create` **(** :ref:`RDVertexAttribute[]` vertex_descriptions **)** | -+------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`barrier` **(** :ref:`BarrierMask` from=7, :ref:`BarrierMask` to=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`buffer_clear` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`buffer_get_data` **(** :ref:`RID` buffer **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`buffer_update` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`capture_timestamp` **(** :ref:`String` name **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`compute_list_add_barrier` **(** :ref:`int` compute_list **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`compute_list_begin` **(** :ref:`bool` allow_draw_overlap=false **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`compute_list_bind_compute_pipeline` **(** :ref:`int` compute_list, :ref:`RID` compute_pipeline **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`compute_list_bind_uniform_set` **(** :ref:`int` compute_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`compute_list_dispatch` **(** :ref:`int` compute_list, :ref:`int` x_groups, :ref:`int` y_groups, :ref:`int` z_groups **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`compute_list_end` **(** :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`compute_list_set_push_constant` **(** :ref:`int` compute_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`compute_pipeline_create` **(** :ref:`RID` shader, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`compute_pipeline_is_valid` **(** :ref:`RID` compute_pieline **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderingDevice` | :ref:`create_local_device` **(** **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_command_begin_label` **(** :ref:`String` name, :ref:`Color` color **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_command_end_label` **(** **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_command_insert_label` **(** :ref:`String` name, :ref:`Color` color **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`draw_list_begin` **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Array` storage_textures=[] **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`draw_list_begin_for_screen` **(** :ref:`int` screen=0, :ref:`Color` clear_color=Color(0, 0, 0, 1) **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`draw_list_begin_split` **(** :ref:`RID` framebuffer, :ref:`int` splits, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`RID[]` storage_textures=[] **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_bind_index_array` **(** :ref:`int` draw_list, :ref:`RID` index_array **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_bind_render_pipeline` **(** :ref:`int` draw_list, :ref:`RID` render_pipeline **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_bind_uniform_set` **(** :ref:`int` draw_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_bind_vertex_array` **(** :ref:`int` draw_list, :ref:`RID` vertex_array **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_disable_scissor` **(** :ref:`int` draw_list **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_draw` **(** :ref:`int` draw_list, :ref:`bool` use_indices, :ref:`int` instances, :ref:`int` procedural_vertex_count=0 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_enable_scissor` **(** :ref:`int` draw_list, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_end` **(** :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_set_blend_constants` **(** :ref:`int` draw_list, :ref:`Color` color **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_list_set_push_constant` **(** :ref:`int` draw_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`draw_list_switch_to_next_pass` **(** **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`draw_list_switch_to_next_pass_split` **(** :ref:`int` splits **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`framebuffer_create` **(** :ref:`RID[]` textures, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`framebuffer_create_empty` **(** :ref:`Vector2i` size, :ref:`TextureSamples` samples=0, :ref:`int` validate_with_format=-1 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`framebuffer_create_multipass` **(** :ref:`RID[]` textures, :ref:`RDFramebufferPass[]` passes, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`framebuffer_format_create` **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`int` view_count=1 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`framebuffer_format_create_empty` **(** :ref:`TextureSamples` samples=0 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`framebuffer_format_create_multipass` **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`RDFramebufferPass[]` passes, :ref:`int` view_count=1 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextureSamples` | :ref:`framebuffer_format_get_texture_samples` **(** :ref:`int` format, :ref:`int` render_pass=0 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`framebuffer_get_format` **(** :ref:`RID` framebuffer **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`framebuffer_is_valid` **(** :ref:`RID` framebuffer **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`full_barrier` **(** **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_captured_timestamp_cpu_time` **(** :ref:`int` index **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_captured_timestamp_gpu_time` **(** :ref:`int` index **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_captured_timestamp_name` **(** :ref:`int` index **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_captured_timestamps_count` **(** **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_captured_timestamps_frame` **(** **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_device_name` **(** **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_device_pipeline_cache_uuid` **(** **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_device_vendor_name` **(** **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_driver_resource` **(** :ref:`DriverResource` resource, :ref:`RID` rid, :ref:`int` index **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frame_delay` **(** **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_memory_usage` **(** :ref:`MemoryType` type **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`index_array_create` **(** :ref:`RID` index_buffer, :ref:`int` index_offset, :ref:`int` index_count **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`index_buffer_create` **(** :ref:`int` size_indices, :ref:`IndexBufferFormat` format, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_restart_indices=false **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`limit_get` **(** :ref:`Limit` limit **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`render_pipeline_create` **(** :ref:`RID` shader, :ref:`int` framebuffer_format, :ref:`int` vertex_format, :ref:`RenderPrimitive` primitive, :ref:`RDPipelineRasterizationState` rasterization_state, :ref:`RDPipelineMultisampleState` multisample_state, :ref:`RDPipelineDepthStencilState` stencil_state, :ref:`RDPipelineColorBlendState` color_blend_state, :ref:`int` dynamic_state_flags=0, :ref:`int` for_render_pass=0, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`render_pipeline_is_valid` **(** :ref:`RID` render_pipeline **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`sampler_create` **(** :ref:`RDSamplerState` state **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`screen_get_framebuffer_format` **(** **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`screen_get_height` **(** :ref:`int` screen=0 **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`screen_get_width` **(** :ref:`int` screen=0 **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_resource_name` **(** :ref:`RID` id, :ref:`String` name **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`shader_compile_binary_from_spirv` **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDShaderSPIRV` | :ref:`shader_compile_spirv_from_source` **(** :ref:`RDShaderSource` shader_source, :ref:`bool` allow_cache=true **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`shader_create_from_bytecode` **(** :ref:`PackedByteArray` binary_data **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`shader_create_from_spirv` **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shader_get_vertex_input_attribute_mask` **(** :ref:`RID` shader **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`storage_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`int` usage=0 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`submit` **(** **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sync` **(** **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_buffer_create` **(** :ref:`int` size_bytes, :ref:`DataFormat` format, :ref:`PackedByteArray` data=PackedByteArray() **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`texture_clear` **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`texture_copy` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_create` **(** :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`PackedByteArray[]` data=[] **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_create_shared` **(** :ref:`RDTextureView` view, :ref:`RID` with_texture **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_create_shared_from_slice` **(** :ref:`RDTextureView` view, :ref:`RID` with_texture, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` mipmaps=1, :ref:`TextureSliceType` slice_type=0 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`texture_get_data` **(** :ref:`RID` texture, :ref:`int` layer **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_is_format_supported_for_usage` **(** :ref:`DataFormat` format, :ref:`TextureUsageBits` usage_flags **)** |const| | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_is_shared` **(** :ref:`RID` texture **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_is_valid` **(** :ref:`RID` texture **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`texture_resolve_multisample` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`texture_update` **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, :ref:`BarrierMask` post_barrier=7 **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`uniform_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray() **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`uniform_set_create` **(** :ref:`RDUniform[]` uniforms, :ref:`RID` shader, :ref:`int` shader_set **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`uniform_set_is_valid` **(** :ref:`RID` uniform_set **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`vertex_array_create` **(** :ref:`int` vertex_count, :ref:`int` vertex_format, :ref:`RID[]` src_buffers, :ref:`PackedInt64Array` offsets=PackedInt64Array() **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`vertex_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_as_storage=false **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`vertex_format_create` **(** :ref:`RDVertexAttribute[]` vertex_descriptions **)** | + +------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_RenderingDevice_DeviceType: -.. _class_RenderingDevice_constant_DEVICE_TYPE_OTHER: - -.. _class_RenderingDevice_constant_DEVICE_TYPE_INTEGRATED_GPU: - -.. _class_RenderingDevice_constant_DEVICE_TYPE_DISCRETE_GPU: - -.. _class_RenderingDevice_constant_DEVICE_TYPE_VIRTUAL_GPU: - -.. _class_RenderingDevice_constant_DEVICE_TYPE_CPU: - -.. _class_RenderingDevice_constant_DEVICE_TYPE_MAX: +.. rst-class:: classref-enumeration enum **DeviceType**: -- **DEVICE_TYPE_OTHER** = **0** --- Rendering device type does not match any of the other enum values or is unknown. +.. _class_RenderingDevice_constant_DEVICE_TYPE_OTHER: -- **DEVICE_TYPE_INTEGRATED_GPU** = **1** --- Rendering device is an integrated GPU, which is typically *(but not always)* slower than dedicated GPUs (:ref:`DEVICE_TYPE_DISCRETE_GPU`). On Android and iOS, the rendering device type is always considered to be :ref:`DEVICE_TYPE_INTEGRATED_GPU`. +.. rst-class:: classref-enumeration-constant -- **DEVICE_TYPE_DISCRETE_GPU** = **2** --- Rendering device is a dedicated GPU, which is typically *(but not always)* faster than integrated GPUs (:ref:`DEVICE_TYPE_INTEGRATED_GPU`). +:ref:`DeviceType` **DEVICE_TYPE_OTHER** = ``0`` -- **DEVICE_TYPE_VIRTUAL_GPU** = **3** --- Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to :ref:`DEVICE_TYPE_INTEGRATED_GPU`. Virtual machine GPU passthrough (such as VFIO) will not report the device type as :ref:`DEVICE_TYPE_VIRTUAL_GPU`. Instead, the host GPU's device type will be reported as if the GPU was not emulated. +Rendering device type does not match any of the other enum values or is unknown. -- **DEVICE_TYPE_CPU** = **4** --- Rendering device is provided by software emulation (such as Lavapipe or `SwiftShader `__). This is the slowest kind of rendering device available; it's typically much slower than :ref:`DEVICE_TYPE_INTEGRATED_GPU`. +.. _class_RenderingDevice_constant_DEVICE_TYPE_INTEGRATED_GPU: -- **DEVICE_TYPE_MAX** = **5** --- Represents the size of the :ref:`DeviceType` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`DeviceType` **DEVICE_TYPE_INTEGRATED_GPU** = ``1`` + +Rendering device is an integrated GPU, which is typically *(but not always)* slower than dedicated GPUs (:ref:`DEVICE_TYPE_DISCRETE_GPU`). On Android and iOS, the rendering device type is always considered to be :ref:`DEVICE_TYPE_INTEGRATED_GPU`. + +.. _class_RenderingDevice_constant_DEVICE_TYPE_DISCRETE_GPU: + +.. rst-class:: classref-enumeration-constant + +:ref:`DeviceType` **DEVICE_TYPE_DISCRETE_GPU** = ``2`` + +Rendering device is a dedicated GPU, which is typically *(but not always)* faster than integrated GPUs (:ref:`DEVICE_TYPE_INTEGRATED_GPU`). + +.. _class_RenderingDevice_constant_DEVICE_TYPE_VIRTUAL_GPU: + +.. rst-class:: classref-enumeration-constant + +:ref:`DeviceType` **DEVICE_TYPE_VIRTUAL_GPU** = ``3`` + +Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to :ref:`DEVICE_TYPE_INTEGRATED_GPU`. Virtual machine GPU passthrough (such as VFIO) will not report the device type as :ref:`DEVICE_TYPE_VIRTUAL_GPU`. Instead, the host GPU's device type will be reported as if the GPU was not emulated. + +.. _class_RenderingDevice_constant_DEVICE_TYPE_CPU: + +.. rst-class:: classref-enumeration-constant + +:ref:`DeviceType` **DEVICE_TYPE_CPU** = ``4`` + +Rendering device is provided by software emulation (such as Lavapipe or `SwiftShader `__). This is the slowest kind of rendering device available; it's typically much slower than :ref:`DEVICE_TYPE_INTEGRATED_GPU`. + +.. _class_RenderingDevice_constant_DEVICE_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DeviceType` **DEVICE_TYPE_MAX** = ``5`` + +Represents the size of the :ref:`DeviceType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_DriverResource: -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DEVICE: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_INSTANCE: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_VIEW: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_SAMPLER: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_BUFFER: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE: - -.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE: +.. rst-class:: classref-enumeration enum **DriverResource**: -- **DRIVER_RESOURCE_VULKAN_DEVICE** = **0** +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DEVICE: -- **DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE** = **1** +.. rst-class:: classref-enumeration-constant -- **DRIVER_RESOURCE_VULKAN_INSTANCE** = **2** +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_DEVICE** = ``0`` -- **DRIVER_RESOURCE_VULKAN_QUEUE** = **3** -- **DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX** = **4** -- **DRIVER_RESOURCE_VULKAN_IMAGE** = **5** +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE: -- **DRIVER_RESOURCE_VULKAN_IMAGE_VIEW** = **6** +.. rst-class:: classref-enumeration-constant -- **DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT** = **7** +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE** = ``1`` -- **DRIVER_RESOURCE_VULKAN_SAMPLER** = **8** -- **DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET** = **9** -- **DRIVER_RESOURCE_VULKAN_BUFFER** = **10** +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_INSTANCE: -- **DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE** = **11** +.. rst-class:: classref-enumeration-constant -- **DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE** = **12** +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_INSTANCE** = ``2`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_QUEUE** = ``3`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX** = ``4`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE** = ``5`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_VIEW: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE_VIEW** = ``6`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT** = ``7`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_SAMPLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_SAMPLER** = ``8`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET** = ``9`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_BUFFER** = ``10`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE** = ``11`` + + + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE** = ``12`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_DataFormat: -.. _class_RenderingDevice_constant_DATA_FORMAT_R4G4_UNORM_PACK8: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R4G4B4A4_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B4G4R4A4_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R5G6B5_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B5G6R5_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R5G5B5A1_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B5G5R5A1_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A1R5G5B5_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SRGB: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SRGB: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SRGB: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SRGB: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SRGB: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SRGB: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_UNORM_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SNORM_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_USCALED_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SSCALED_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_UINT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SINT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SRGB_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_UNORM_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SNORM_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_USCALED_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SSCALED_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_UINT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SINT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_UNORM_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SNORM_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_USCALED_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SSCALED_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_UINT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SINT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_USCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SSCALED: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_SINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B10G11R11_UFLOAT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_D16_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_X8_D24_UNORM_PACK32: - -.. _class_RenderingDevice_constant_DATA_FORMAT_D32_SFLOAT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_S8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_D16_UNORM_S8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_D24_UNORM_S8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_D32_SFLOAT_S8_UINT: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGB_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGB_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGBA_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGBA_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC2_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC2_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC3_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC3_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC4_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC4_SNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC5_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC5_SNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC6H_UFLOAT_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC6H_SFLOAT_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC7_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_BC7_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11_SNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11G11_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11G11_SNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_4x4_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_4x4_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x4_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x4_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x5_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x5_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x5_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x5_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x6_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x6_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x5_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x5_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x6_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x6_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x8_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x8_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x5_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x5_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x6_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x6_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x8_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x8_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x10_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x10_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x10_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x10_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x12_UNORM_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x12_SRGB_BLOCK: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G8B8G8R8_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8G8_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R10X6_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R10X6G10X6_UNORM_2PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R12X4_UNORM_PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R12X4G12X4_UNORM_2PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G16B16G16R16_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_B16G16R16G16_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM: - -.. _class_RenderingDevice_constant_DATA_FORMAT_MAX: +.. rst-class:: classref-enumeration enum **DataFormat**: -- **DATA_FORMAT_R4G4_UNORM_PACK8** = **0** +.. _class_RenderingDevice_constant_DATA_FORMAT_R4G4_UNORM_PACK8: -- **DATA_FORMAT_R4G4B4A4_UNORM_PACK16** = **1** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_B4G4R4A4_UNORM_PACK16** = **2** +:ref:`DataFormat` **DATA_FORMAT_R4G4_UNORM_PACK8** = ``0`` -- **DATA_FORMAT_R5G6B5_UNORM_PACK16** = **3** -- **DATA_FORMAT_B5G6R5_UNORM_PACK16** = **4** -- **DATA_FORMAT_R5G5B5A1_UNORM_PACK16** = **5** +.. _class_RenderingDevice_constant_DATA_FORMAT_R4G4B4A4_UNORM_PACK16: -- **DATA_FORMAT_B5G5R5A1_UNORM_PACK16** = **6** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_A1R5G5B5_UNORM_PACK16** = **7** +:ref:`DataFormat` **DATA_FORMAT_R4G4B4A4_UNORM_PACK16** = ``1`` -- **DATA_FORMAT_R8_UNORM** = **8** -- **DATA_FORMAT_R8_SNORM** = **9** -- **DATA_FORMAT_R8_USCALED** = **10** +.. _class_RenderingDevice_constant_DATA_FORMAT_B4G4R4A4_UNORM_PACK16: -- **DATA_FORMAT_R8_SSCALED** = **11** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R8_UINT** = **12** +:ref:`DataFormat` **DATA_FORMAT_B4G4R4A4_UNORM_PACK16** = ``2`` -- **DATA_FORMAT_R8_SINT** = **13** -- **DATA_FORMAT_R8_SRGB** = **14** -- **DATA_FORMAT_R8G8_UNORM** = **15** +.. _class_RenderingDevice_constant_DATA_FORMAT_R5G6B5_UNORM_PACK16: -- **DATA_FORMAT_R8G8_SNORM** = **16** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R8G8_USCALED** = **17** +:ref:`DataFormat` **DATA_FORMAT_R5G6B5_UNORM_PACK16** = ``3`` -- **DATA_FORMAT_R8G8_SSCALED** = **18** -- **DATA_FORMAT_R8G8_UINT** = **19** -- **DATA_FORMAT_R8G8_SINT** = **20** +.. _class_RenderingDevice_constant_DATA_FORMAT_B5G6R5_UNORM_PACK16: -- **DATA_FORMAT_R8G8_SRGB** = **21** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R8G8B8_UNORM** = **22** +:ref:`DataFormat` **DATA_FORMAT_B5G6R5_UNORM_PACK16** = ``4`` -- **DATA_FORMAT_R8G8B8_SNORM** = **23** -- **DATA_FORMAT_R8G8B8_USCALED** = **24** -- **DATA_FORMAT_R8G8B8_SSCALED** = **25** +.. _class_RenderingDevice_constant_DATA_FORMAT_R5G5B5A1_UNORM_PACK16: -- **DATA_FORMAT_R8G8B8_UINT** = **26** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R8G8B8_SINT** = **27** +:ref:`DataFormat` **DATA_FORMAT_R5G5B5A1_UNORM_PACK16** = ``5`` -- **DATA_FORMAT_R8G8B8_SRGB** = **28** -- **DATA_FORMAT_B8G8R8_UNORM** = **29** -- **DATA_FORMAT_B8G8R8_SNORM** = **30** +.. _class_RenderingDevice_constant_DATA_FORMAT_B5G5R5A1_UNORM_PACK16: -- **DATA_FORMAT_B8G8R8_USCALED** = **31** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_B8G8R8_SSCALED** = **32** +:ref:`DataFormat` **DATA_FORMAT_B5G5R5A1_UNORM_PACK16** = ``6`` -- **DATA_FORMAT_B8G8R8_UINT** = **33** -- **DATA_FORMAT_B8G8R8_SINT** = **34** -- **DATA_FORMAT_B8G8R8_SRGB** = **35** +.. _class_RenderingDevice_constant_DATA_FORMAT_A1R5G5B5_UNORM_PACK16: -- **DATA_FORMAT_R8G8B8A8_UNORM** = **36** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R8G8B8A8_SNORM** = **37** +:ref:`DataFormat` **DATA_FORMAT_A1R5G5B5_UNORM_PACK16** = ``7`` -- **DATA_FORMAT_R8G8B8A8_USCALED** = **38** -- **DATA_FORMAT_R8G8B8A8_SSCALED** = **39** -- **DATA_FORMAT_R8G8B8A8_UINT** = **40** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8_UNORM: -- **DATA_FORMAT_R8G8B8A8_SINT** = **41** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R8G8B8A8_SRGB** = **42** +:ref:`DataFormat` **DATA_FORMAT_R8_UNORM** = ``8`` -- **DATA_FORMAT_B8G8R8A8_UNORM** = **43** -- **DATA_FORMAT_B8G8R8A8_SNORM** = **44** -- **DATA_FORMAT_B8G8R8A8_USCALED** = **45** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SNORM: -- **DATA_FORMAT_B8G8R8A8_SSCALED** = **46** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_B8G8R8A8_UINT** = **47** +:ref:`DataFormat` **DATA_FORMAT_R8_SNORM** = ``9`` -- **DATA_FORMAT_B8G8R8A8_SINT** = **48** -- **DATA_FORMAT_B8G8R8A8_SRGB** = **49** -- **DATA_FORMAT_A8B8G8R8_UNORM_PACK32** = **50** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8_USCALED: -- **DATA_FORMAT_A8B8G8R8_SNORM_PACK32** = **51** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_A8B8G8R8_USCALED_PACK32** = **52** +:ref:`DataFormat` **DATA_FORMAT_R8_USCALED** = ``10`` -- **DATA_FORMAT_A8B8G8R8_SSCALED_PACK32** = **53** -- **DATA_FORMAT_A8B8G8R8_UINT_PACK32** = **54** -- **DATA_FORMAT_A8B8G8R8_SINT_PACK32** = **55** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SSCALED: -- **DATA_FORMAT_A8B8G8R8_SRGB_PACK32** = **56** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_A2R10G10B10_UNORM_PACK32** = **57** +:ref:`DataFormat` **DATA_FORMAT_R8_SSCALED** = ``11`` -- **DATA_FORMAT_A2R10G10B10_SNORM_PACK32** = **58** -- **DATA_FORMAT_A2R10G10B10_USCALED_PACK32** = **59** -- **DATA_FORMAT_A2R10G10B10_SSCALED_PACK32** = **60** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8_UINT: -- **DATA_FORMAT_A2R10G10B10_UINT_PACK32** = **61** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_A2R10G10B10_SINT_PACK32** = **62** +:ref:`DataFormat` **DATA_FORMAT_R8_UINT** = ``12`` -- **DATA_FORMAT_A2B10G10R10_UNORM_PACK32** = **63** -- **DATA_FORMAT_A2B10G10R10_SNORM_PACK32** = **64** -- **DATA_FORMAT_A2B10G10R10_USCALED_PACK32** = **65** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SINT: -- **DATA_FORMAT_A2B10G10R10_SSCALED_PACK32** = **66** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_A2B10G10R10_UINT_PACK32** = **67** +:ref:`DataFormat` **DATA_FORMAT_R8_SINT** = ``13`` -- **DATA_FORMAT_A2B10G10R10_SINT_PACK32** = **68** -- **DATA_FORMAT_R16_UNORM** = **69** -- **DATA_FORMAT_R16_SNORM** = **70** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8_SRGB: -- **DATA_FORMAT_R16_USCALED** = **71** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R16_SSCALED** = **72** +:ref:`DataFormat` **DATA_FORMAT_R8_SRGB** = ``14`` -- **DATA_FORMAT_R16_UINT** = **73** -- **DATA_FORMAT_R16_SINT** = **74** -- **DATA_FORMAT_R16_SFLOAT** = **75** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_UNORM: -- **DATA_FORMAT_R16G16_UNORM** = **76** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R16G16_SNORM** = **77** +:ref:`DataFormat` **DATA_FORMAT_R8G8_UNORM** = ``15`` -- **DATA_FORMAT_R16G16_USCALED** = **78** -- **DATA_FORMAT_R16G16_SSCALED** = **79** -- **DATA_FORMAT_R16G16_UINT** = **80** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SNORM: -- **DATA_FORMAT_R16G16_SINT** = **81** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R16G16_SFLOAT** = **82** +:ref:`DataFormat` **DATA_FORMAT_R8G8_SNORM** = ``16`` -- **DATA_FORMAT_R16G16B16_UNORM** = **83** -- **DATA_FORMAT_R16G16B16_SNORM** = **84** -- **DATA_FORMAT_R16G16B16_USCALED** = **85** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_USCALED: -- **DATA_FORMAT_R16G16B16_SSCALED** = **86** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R16G16B16_UINT** = **87** +:ref:`DataFormat` **DATA_FORMAT_R8G8_USCALED** = ``17`` -- **DATA_FORMAT_R16G16B16_SINT** = **88** -- **DATA_FORMAT_R16G16B16_SFLOAT** = **89** -- **DATA_FORMAT_R16G16B16A16_UNORM** = **90** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SSCALED: -- **DATA_FORMAT_R16G16B16A16_SNORM** = **91** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R16G16B16A16_USCALED** = **92** +:ref:`DataFormat` **DATA_FORMAT_R8G8_SSCALED** = ``18`` -- **DATA_FORMAT_R16G16B16A16_SSCALED** = **93** -- **DATA_FORMAT_R16G16B16A16_UINT** = **94** -- **DATA_FORMAT_R16G16B16A16_SINT** = **95** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_UINT: -- **DATA_FORMAT_R16G16B16A16_SFLOAT** = **96** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R32_UINT** = **97** +:ref:`DataFormat` **DATA_FORMAT_R8G8_UINT** = ``19`` -- **DATA_FORMAT_R32_SINT** = **98** -- **DATA_FORMAT_R32_SFLOAT** = **99** -- **DATA_FORMAT_R32G32_UINT** = **100** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SINT: -- **DATA_FORMAT_R32G32_SINT** = **101** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R32G32_SFLOAT** = **102** +:ref:`DataFormat` **DATA_FORMAT_R8G8_SINT** = ``20`` -- **DATA_FORMAT_R32G32B32_UINT** = **103** -- **DATA_FORMAT_R32G32B32_SINT** = **104** -- **DATA_FORMAT_R32G32B32_SFLOAT** = **105** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8_SRGB: -- **DATA_FORMAT_R32G32B32A32_UINT** = **106** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R32G32B32A32_SINT** = **107** +:ref:`DataFormat` **DATA_FORMAT_R8G8_SRGB** = ``21`` -- **DATA_FORMAT_R32G32B32A32_SFLOAT** = **108** -- **DATA_FORMAT_R64_UINT** = **109** -- **DATA_FORMAT_R64_SINT** = **110** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_UNORM: -- **DATA_FORMAT_R64_SFLOAT** = **111** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R64G64_UINT** = **112** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8_UNORM** = ``22`` -- **DATA_FORMAT_R64G64_SINT** = **113** -- **DATA_FORMAT_R64G64_SFLOAT** = **114** -- **DATA_FORMAT_R64G64B64_UINT** = **115** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SNORM: -- **DATA_FORMAT_R64G64B64_SINT** = **116** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R64G64B64_SFLOAT** = **117** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8_SNORM** = ``23`` -- **DATA_FORMAT_R64G64B64A64_UINT** = **118** -- **DATA_FORMAT_R64G64B64A64_SINT** = **119** -- **DATA_FORMAT_R64G64B64A64_SFLOAT** = **120** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_USCALED: -- **DATA_FORMAT_B10G11R11_UFLOAT_PACK32** = **121** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32** = **122** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8_USCALED** = ``24`` -- **DATA_FORMAT_D16_UNORM** = **123** -- **DATA_FORMAT_X8_D24_UNORM_PACK32** = **124** -- **DATA_FORMAT_D32_SFLOAT** = **125** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SSCALED: -- **DATA_FORMAT_S8_UINT** = **126** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_D16_UNORM_S8_UINT** = **127** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8_SSCALED** = ``25`` -- **DATA_FORMAT_D24_UNORM_S8_UINT** = **128** -- **DATA_FORMAT_D32_SFLOAT_S8_UINT** = **129** -- **DATA_FORMAT_BC1_RGB_UNORM_BLOCK** = **130** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_UINT: -- **DATA_FORMAT_BC1_RGB_SRGB_BLOCK** = **131** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_BC1_RGBA_UNORM_BLOCK** = **132** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8_UINT** = ``26`` -- **DATA_FORMAT_BC1_RGBA_SRGB_BLOCK** = **133** -- **DATA_FORMAT_BC2_UNORM_BLOCK** = **134** -- **DATA_FORMAT_BC2_SRGB_BLOCK** = **135** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SINT: -- **DATA_FORMAT_BC3_UNORM_BLOCK** = **136** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_BC3_SRGB_BLOCK** = **137** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8_SINT** = ``27`` -- **DATA_FORMAT_BC4_UNORM_BLOCK** = **138** -- **DATA_FORMAT_BC4_SNORM_BLOCK** = **139** -- **DATA_FORMAT_BC5_UNORM_BLOCK** = **140** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8_SRGB: -- **DATA_FORMAT_BC5_SNORM_BLOCK** = **141** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_BC6H_UFLOAT_BLOCK** = **142** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8_SRGB** = ``28`` -- **DATA_FORMAT_BC6H_SFLOAT_BLOCK** = **143** -- **DATA_FORMAT_BC7_UNORM_BLOCK** = **144** -- **DATA_FORMAT_BC7_SRGB_BLOCK** = **145** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_UNORM: -- **DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK** = **146** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK** = **147** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8_UNORM** = ``29`` -- **DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK** = **148** -- **DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK** = **149** -- **DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK** = **150** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SNORM: -- **DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK** = **151** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_EAC_R11_UNORM_BLOCK** = **152** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8_SNORM** = ``30`` -- **DATA_FORMAT_EAC_R11_SNORM_BLOCK** = **153** -- **DATA_FORMAT_EAC_R11G11_UNORM_BLOCK** = **154** -- **DATA_FORMAT_EAC_R11G11_SNORM_BLOCK** = **155** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_USCALED: -- **DATA_FORMAT_ASTC_4x4_UNORM_BLOCK** = **156** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_ASTC_4x4_SRGB_BLOCK** = **157** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8_USCALED** = ``31`` -- **DATA_FORMAT_ASTC_5x4_UNORM_BLOCK** = **158** -- **DATA_FORMAT_ASTC_5x4_SRGB_BLOCK** = **159** -- **DATA_FORMAT_ASTC_5x5_UNORM_BLOCK** = **160** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SSCALED: -- **DATA_FORMAT_ASTC_5x5_SRGB_BLOCK** = **161** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_ASTC_6x5_UNORM_BLOCK** = **162** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8_SSCALED** = ``32`` -- **DATA_FORMAT_ASTC_6x5_SRGB_BLOCK** = **163** -- **DATA_FORMAT_ASTC_6x6_UNORM_BLOCK** = **164** -- **DATA_FORMAT_ASTC_6x6_SRGB_BLOCK** = **165** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_UINT: -- **DATA_FORMAT_ASTC_8x5_UNORM_BLOCK** = **166** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_ASTC_8x5_SRGB_BLOCK** = **167** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8_UINT** = ``33`` -- **DATA_FORMAT_ASTC_8x6_UNORM_BLOCK** = **168** -- **DATA_FORMAT_ASTC_8x6_SRGB_BLOCK** = **169** -- **DATA_FORMAT_ASTC_8x8_UNORM_BLOCK** = **170** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SINT: -- **DATA_FORMAT_ASTC_8x8_SRGB_BLOCK** = **171** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_ASTC_10x5_UNORM_BLOCK** = **172** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8_SINT** = ``34`` -- **DATA_FORMAT_ASTC_10x5_SRGB_BLOCK** = **173** -- **DATA_FORMAT_ASTC_10x6_UNORM_BLOCK** = **174** -- **DATA_FORMAT_ASTC_10x6_SRGB_BLOCK** = **175** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8_SRGB: -- **DATA_FORMAT_ASTC_10x8_UNORM_BLOCK** = **176** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_ASTC_10x8_SRGB_BLOCK** = **177** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8_SRGB** = ``35`` -- **DATA_FORMAT_ASTC_10x10_UNORM_BLOCK** = **178** -- **DATA_FORMAT_ASTC_10x10_SRGB_BLOCK** = **179** -- **DATA_FORMAT_ASTC_12x10_UNORM_BLOCK** = **180** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_UNORM: -- **DATA_FORMAT_ASTC_12x10_SRGB_BLOCK** = **181** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_ASTC_12x12_UNORM_BLOCK** = **182** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_UNORM** = ``36`` -- **DATA_FORMAT_ASTC_12x12_SRGB_BLOCK** = **183** -- **DATA_FORMAT_G8B8G8R8_422_UNORM** = **184** -- **DATA_FORMAT_B8G8R8G8_422_UNORM** = **185** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SNORM: -- **DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM** = **186** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM** = **187** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SNORM** = ``37`` -- **DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM** = **188** -- **DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM** = **189** -- **DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM** = **190** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_USCALED: -- **DATA_FORMAT_R10X6_UNORM_PACK16** = **191** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R10X6G10X6_UNORM_2PACK16** = **192** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_USCALED** = ``38`` -- **DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16** = **193** -- **DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16** = **194** -- **DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16** = **195** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SSCALED: -- **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16** = **196** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16** = **197** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SSCALED** = ``39`` -- **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16** = **198** -- **DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16** = **199** -- **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16** = **200** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_UINT: -- **DATA_FORMAT_R12X4_UNORM_PACK16** = **201** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_R12X4G12X4_UNORM_2PACK16** = **202** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_UINT** = ``40`` -- **DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16** = **203** -- **DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16** = **204** -- **DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16** = **205** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SINT: -- **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16** = **206** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16** = **207** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SINT** = ``41`` -- **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16** = **208** -- **DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16** = **209** -- **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16** = **210** +.. _class_RenderingDevice_constant_DATA_FORMAT_R8G8B8A8_SRGB: -- **DATA_FORMAT_G16B16G16R16_422_UNORM** = **211** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_B16G16R16G16_422_UNORM** = **212** +:ref:`DataFormat` **DATA_FORMAT_R8G8B8A8_SRGB** = ``42`` -- **DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM** = **213** -- **DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM** = **214** -- **DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM** = **215** +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_UNORM: -- **DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM** = **216** +.. rst-class:: classref-enumeration-constant -- **DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM** = **217** +:ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_UNORM** = ``43`` -- **DATA_FORMAT_MAX** = **218** + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SNORM** = ``44`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_USCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_USCALED** = ``45`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SSCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SSCALED** = ``46`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_UINT** = ``47`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SINT** = ``48`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8A8_SRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B8G8R8A8_SRGB** = ``49`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_UNORM_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_UNORM_PACK32** = ``50`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SNORM_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SNORM_PACK32** = ``51`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_USCALED_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_USCALED_PACK32** = ``52`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SSCALED_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SSCALED_PACK32** = ``53`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_UINT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_UINT_PACK32** = ``54`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SINT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SINT_PACK32** = ``55`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A8B8G8R8_SRGB_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A8B8G8R8_SRGB_PACK32** = ``56`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_UNORM_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_UNORM_PACK32** = ``57`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SNORM_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_SNORM_PACK32** = ``58`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_USCALED_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_USCALED_PACK32** = ``59`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SSCALED_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_SSCALED_PACK32** = ``60`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_UINT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_UINT_PACK32** = ``61`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2R10G10B10_SINT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2R10G10B10_SINT_PACK32** = ``62`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_UNORM_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_UNORM_PACK32** = ``63`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SNORM_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_SNORM_PACK32** = ``64`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_USCALED_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_USCALED_PACK32** = ``65`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SSCALED_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_SSCALED_PACK32** = ``66`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_UINT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_UINT_PACK32** = ``67`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_A2B10G10R10_SINT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_A2B10G10R10_SINT_PACK32** = ``68`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16_UNORM** = ``69`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16_SNORM** = ``70`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16_USCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16_USCALED** = ``71`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SSCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16_SSCALED** = ``72`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16_UINT** = ``73`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16_SINT** = ``74`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16_SFLOAT** = ``75`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16_UNORM** = ``76`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16_SNORM** = ``77`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_USCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16_USCALED** = ``78`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SSCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16_SSCALED** = ``79`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16_UINT** = ``80`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16_SINT** = ``81`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16_SFLOAT** = ``82`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16_UNORM** = ``83`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16_SNORM** = ``84`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_USCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16_USCALED** = ``85`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SSCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16_SSCALED** = ``86`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16_UINT** = ``87`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16_SINT** = ``88`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16_SFLOAT** = ``89`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_UNORM** = ``90`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SNORM** = ``91`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_USCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_USCALED** = ``92`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SSCALED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SSCALED** = ``93`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_UINT** = ``94`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SINT** = ``95`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R16G16B16A16_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R16G16B16A16_SFLOAT** = ``96`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32_UINT** = ``97`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32_SINT** = ``98`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32_SFLOAT** = ``99`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32_UINT** = ``100`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32_SINT** = ``101`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32_SFLOAT** = ``102`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32B32_UINT** = ``103`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32B32_SINT** = ``104`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32B32_SFLOAT** = ``105`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32B32A32_UINT** = ``106`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32B32A32_SINT** = ``107`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R32G32B32A32_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R32G32B32A32_SFLOAT** = ``108`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64_UINT** = ``109`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64_SINT** = ``110`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64_SFLOAT** = ``111`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64_UINT** = ``112`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64_SINT** = ``113`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64_SFLOAT** = ``114`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64B64_UINT** = ``115`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64B64_SINT** = ``116`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64B64_SFLOAT** = ``117`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64B64A64_UINT** = ``118`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_SINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64B64A64_SINT** = ``119`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R64G64B64A64_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R64G64B64A64_SFLOAT** = ``120`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B10G11R11_UFLOAT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B10G11R11_UFLOAT_PACK32** = ``121`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32** = ``122`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_D16_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_D16_UNORM** = ``123`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_X8_D24_UNORM_PACK32: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_X8_D24_UNORM_PACK32** = ``124`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_D32_SFLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_D32_SFLOAT** = ``125`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_S8_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_S8_UINT** = ``126`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_D16_UNORM_S8_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_D16_UNORM_S8_UINT** = ``127`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_D24_UNORM_S8_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_D24_UNORM_S8_UINT** = ``128`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_D32_SFLOAT_S8_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_D32_SFLOAT_S8_UINT** = ``129`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGB_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC1_RGB_UNORM_BLOCK** = ``130`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGB_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC1_RGB_SRGB_BLOCK** = ``131`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGBA_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC1_RGBA_UNORM_BLOCK** = ``132`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC1_RGBA_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC1_RGBA_SRGB_BLOCK** = ``133`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC2_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC2_UNORM_BLOCK** = ``134`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC2_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC2_SRGB_BLOCK** = ``135`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC3_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC3_UNORM_BLOCK** = ``136`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC3_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC3_SRGB_BLOCK** = ``137`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC4_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC4_UNORM_BLOCK** = ``138`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC4_SNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC4_SNORM_BLOCK** = ``139`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC5_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC5_UNORM_BLOCK** = ``140`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC5_SNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC5_SNORM_BLOCK** = ``141`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC6H_UFLOAT_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC6H_UFLOAT_BLOCK** = ``142`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC6H_SFLOAT_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC6H_SFLOAT_BLOCK** = ``143`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC7_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC7_UNORM_BLOCK** = ``144`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_BC7_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_BC7_SRGB_BLOCK** = ``145`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK** = ``146`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK** = ``147`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK** = ``148`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK** = ``149`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK** = ``150`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK** = ``151`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_EAC_R11_UNORM_BLOCK** = ``152`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11_SNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_EAC_R11_SNORM_BLOCK** = ``153`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11G11_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_EAC_R11G11_UNORM_BLOCK** = ``154`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11G11_SNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_EAC_R11G11_SNORM_BLOCK** = ``155`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_4x4_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_4x4_UNORM_BLOCK** = ``156`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_4x4_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_4x4_SRGB_BLOCK** = ``157`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x4_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_5x4_UNORM_BLOCK** = ``158`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x4_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_5x4_SRGB_BLOCK** = ``159`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x5_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_5x5_UNORM_BLOCK** = ``160`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_5x5_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_5x5_SRGB_BLOCK** = ``161`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x5_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_6x5_UNORM_BLOCK** = ``162`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x5_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_6x5_SRGB_BLOCK** = ``163`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x6_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_6x6_UNORM_BLOCK** = ``164`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_6x6_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_6x6_SRGB_BLOCK** = ``165`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x5_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_8x5_UNORM_BLOCK** = ``166`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x5_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_8x5_SRGB_BLOCK** = ``167`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x6_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_8x6_UNORM_BLOCK** = ``168`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x6_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_8x6_SRGB_BLOCK** = ``169`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x8_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_8x8_UNORM_BLOCK** = ``170`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_8x8_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_8x8_SRGB_BLOCK** = ``171`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x5_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x5_UNORM_BLOCK** = ``172`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x5_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x5_SRGB_BLOCK** = ``173`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x6_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x6_UNORM_BLOCK** = ``174`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x6_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x6_SRGB_BLOCK** = ``175`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x8_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x8_UNORM_BLOCK** = ``176`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x8_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x8_SRGB_BLOCK** = ``177`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x10_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x10_UNORM_BLOCK** = ``178`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_10x10_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_10x10_SRGB_BLOCK** = ``179`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x10_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_12x10_UNORM_BLOCK** = ``180`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x10_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_12x10_SRGB_BLOCK** = ``181`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x12_UNORM_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_12x12_UNORM_BLOCK** = ``182`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_12x12_SRGB_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_ASTC_12x12_SRGB_BLOCK** = ``183`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G8B8G8R8_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G8B8G8R8_422_UNORM** = ``184`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B8G8R8G8_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B8G8R8G8_422_UNORM** = ``185`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM** = ``186`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM** = ``187`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM** = ``188`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM** = ``189`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM** = ``190`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R10X6_UNORM_PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R10X6_UNORM_PACK16** = ``191`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R10X6G10X6_UNORM_2PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R10X6G10X6_UNORM_2PACK16** = ``192`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16** = ``193`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16** = ``194`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16** = ``195`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16** = ``196`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16** = ``197`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16** = ``198`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16** = ``199`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16** = ``200`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R12X4_UNORM_PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R12X4_UNORM_PACK16** = ``201`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R12X4G12X4_UNORM_2PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R12X4G12X4_UNORM_2PACK16** = ``202`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16** = ``203`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16** = ``204`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16** = ``205`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16** = ``206`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16** = ``207`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16** = ``208`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16** = ``209`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16** = ``210`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G16B16G16R16_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G16B16G16R16_422_UNORM** = ``211`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_B16G16R16G16_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_B16G16R16G16_422_UNORM** = ``212`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM** = ``213`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM** = ``214`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM** = ``215`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM** = ``216`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM** = ``217`` + + + +.. _class_RenderingDevice_constant_DATA_FORMAT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataFormat` **DATA_FORMAT_MAX** = ``218`` + + + +.. rst-class:: classref-item-separator + +---- + +.. _enum_RenderingDevice_BarrierMask: + +.. rst-class:: classref-enumeration + +flags **BarrierMask**: + +.. _class_RenderingDevice_constant_BARRIER_MASK_RASTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BarrierMask` **BARRIER_MASK_RASTER** = ``1`` + + + +.. _class_RenderingDevice_constant_BARRIER_MASK_COMPUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BarrierMask` **BARRIER_MASK_COMPUTE** = ``2`` + + + +.. _class_RenderingDevice_constant_BARRIER_MASK_TRANSFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BarrierMask` **BARRIER_MASK_TRANSFER** = ``4`` + + + +.. _class_RenderingDevice_constant_BARRIER_MASK_ALL_BARRIERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BarrierMask` **BARRIER_MASK_ALL_BARRIERS** = ``7`` + + + +.. _class_RenderingDevice_constant_BARRIER_MASK_NO_BARRIER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BarrierMask` **BARRIER_MASK_NO_BARRIER** = ``8`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_TextureType: -.. _class_RenderingDevice_constant_TEXTURE_TYPE_1D: - -.. _class_RenderingDevice_constant_TEXTURE_TYPE_2D: - -.. _class_RenderingDevice_constant_TEXTURE_TYPE_3D: - -.. _class_RenderingDevice_constant_TEXTURE_TYPE_CUBE: - -.. _class_RenderingDevice_constant_TEXTURE_TYPE_1D_ARRAY: - -.. _class_RenderingDevice_constant_TEXTURE_TYPE_2D_ARRAY: - -.. _class_RenderingDevice_constant_TEXTURE_TYPE_CUBE_ARRAY: - -.. _class_RenderingDevice_constant_TEXTURE_TYPE_MAX: +.. rst-class:: classref-enumeration enum **TextureType**: -- **TEXTURE_TYPE_1D** = **0** +.. _class_RenderingDevice_constant_TEXTURE_TYPE_1D: -- **TEXTURE_TYPE_2D** = **1** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_TYPE_3D** = **2** +:ref:`TextureType` **TEXTURE_TYPE_1D** = ``0`` -- **TEXTURE_TYPE_CUBE** = **3** -- **TEXTURE_TYPE_1D_ARRAY** = **4** -- **TEXTURE_TYPE_2D_ARRAY** = **5** +.. _class_RenderingDevice_constant_TEXTURE_TYPE_2D: -- **TEXTURE_TYPE_CUBE_ARRAY** = **6** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_TYPE_MAX** = **7** +:ref:`TextureType` **TEXTURE_TYPE_2D** = ``1`` + + + +.. _class_RenderingDevice_constant_TEXTURE_TYPE_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_3D** = ``2`` + + + +.. _class_RenderingDevice_constant_TEXTURE_TYPE_CUBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_CUBE** = ``3`` + + + +.. _class_RenderingDevice_constant_TEXTURE_TYPE_1D_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_1D_ARRAY** = ``4`` + + + +.. _class_RenderingDevice_constant_TEXTURE_TYPE_2D_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_2D_ARRAY** = ``5`` + + + +.. _class_RenderingDevice_constant_TEXTURE_TYPE_CUBE_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_CUBE_ARRAY** = ``6`` + + + +.. _class_RenderingDevice_constant_TEXTURE_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_MAX** = ``7`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_TextureSamples: -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_1: - -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_2: - -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_4: - -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_8: - -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_16: - -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_32: - -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_64: - -.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_MAX: +.. rst-class:: classref-enumeration enum **TextureSamples**: -- **TEXTURE_SAMPLES_1** = **0** +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_1: -- **TEXTURE_SAMPLES_2** = **1** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_SAMPLES_4** = **2** +:ref:`TextureSamples` **TEXTURE_SAMPLES_1** = ``0`` -- **TEXTURE_SAMPLES_8** = **3** -- **TEXTURE_SAMPLES_16** = **4** -- **TEXTURE_SAMPLES_32** = **5** +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_2: -- **TEXTURE_SAMPLES_64** = **6** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_SAMPLES_MAX** = **7** +:ref:`TextureSamples` **TEXTURE_SAMPLES_2** = ``1`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_4: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSamples` **TEXTURE_SAMPLES_4** = ``2`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_8: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSamples` **TEXTURE_SAMPLES_8** = ``3`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_16: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSamples` **TEXTURE_SAMPLES_16** = ``4`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_32: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSamples` **TEXTURE_SAMPLES_32** = ``5`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_64: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSamples` **TEXTURE_SAMPLES_64** = ``6`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SAMPLES_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSamples` **TEXTURE_SAMPLES_MAX** = ``7`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_TextureUsageBits: +.. rst-class:: classref-enumeration + +flags **TextureUsageBits**: + .. _class_RenderingDevice_constant_TEXTURE_USAGE_SAMPLING_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_SAMPLING_BIT** = ``1`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_COLOR_ATTACHMENT_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_COLOR_ATTACHMENT_BIT** = ``2`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT** = ``4`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_STORAGE_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_STORAGE_BIT** = ``8`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_STORAGE_ATOMIC_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_STORAGE_ATOMIC_BIT** = ``16`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_CPU_READ_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_CPU_READ_BIT** = ``32`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_UPDATE_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_CAN_UPDATE_BIT** = ``64`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_COPY_FROM_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_CAN_COPY_FROM_BIT** = ``128`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_CAN_COPY_TO_BIT: +.. rst-class:: classref-enumeration-constant + +:ref:`TextureUsageBits` **TEXTURE_USAGE_CAN_COPY_TO_BIT** = ``256`` + + + .. _class_RenderingDevice_constant_TEXTURE_USAGE_INPUT_ATTACHMENT_BIT: -enum **TextureUsageBits**: +.. rst-class:: classref-enumeration-constant -- **TEXTURE_USAGE_SAMPLING_BIT** = **1** +:ref:`TextureUsageBits` **TEXTURE_USAGE_INPUT_ATTACHMENT_BIT** = ``512`` -- **TEXTURE_USAGE_COLOR_ATTACHMENT_BIT** = **2** -- **TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT** = **4** -- **TEXTURE_USAGE_STORAGE_BIT** = **8** - -- **TEXTURE_USAGE_STORAGE_ATOMIC_BIT** = **16** - -- **TEXTURE_USAGE_CPU_READ_BIT** = **32** - -- **TEXTURE_USAGE_CAN_UPDATE_BIT** = **64** - -- **TEXTURE_USAGE_CAN_COPY_FROM_BIT** = **128** - -- **TEXTURE_USAGE_CAN_COPY_TO_BIT** = **256** - -- **TEXTURE_USAGE_INPUT_ATTACHMENT_BIT** = **512** +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_TextureSwizzle: -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_IDENTITY: - -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_ZERO: - -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_ONE: - -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_R: - -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_G: - -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_B: - -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_A: - -.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_MAX: +.. rst-class:: classref-enumeration enum **TextureSwizzle**: -- **TEXTURE_SWIZZLE_IDENTITY** = **0** +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_IDENTITY: -- **TEXTURE_SWIZZLE_ZERO** = **1** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_SWIZZLE_ONE** = **2** +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_IDENTITY** = ``0`` -- **TEXTURE_SWIZZLE_R** = **3** -- **TEXTURE_SWIZZLE_G** = **4** -- **TEXTURE_SWIZZLE_B** = **5** +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_ZERO: -- **TEXTURE_SWIZZLE_A** = **6** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_SWIZZLE_MAX** = **7** +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_ZERO** = ``1`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_ONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_ONE** = ``2`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_R: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_R** = ``3`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_G: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_G** = ``4`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_B: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_B** = ``5`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_A: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_A** = ``6`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSwizzle` **TEXTURE_SWIZZLE_MAX** = ``7`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_TextureSliceType: -.. _class_RenderingDevice_constant_TEXTURE_SLICE_2D: - -.. _class_RenderingDevice_constant_TEXTURE_SLICE_CUBEMAP: - -.. _class_RenderingDevice_constant_TEXTURE_SLICE_3D: +.. rst-class:: classref-enumeration enum **TextureSliceType**: -- **TEXTURE_SLICE_2D** = **0** +.. _class_RenderingDevice_constant_TEXTURE_SLICE_2D: -- **TEXTURE_SLICE_CUBEMAP** = **1** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_SLICE_3D** = **2** +:ref:`TextureSliceType` **TEXTURE_SLICE_2D** = ``0`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SLICE_CUBEMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSliceType` **TEXTURE_SLICE_CUBEMAP** = ``1`` + + + +.. _class_RenderingDevice_constant_TEXTURE_SLICE_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureSliceType` **TEXTURE_SLICE_3D** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_SamplerFilter: -.. _class_RenderingDevice_constant_SAMPLER_FILTER_NEAREST: - -.. _class_RenderingDevice_constant_SAMPLER_FILTER_LINEAR: +.. rst-class:: classref-enumeration enum **SamplerFilter**: -- **SAMPLER_FILTER_NEAREST** = **0** +.. _class_RenderingDevice_constant_SAMPLER_FILTER_NEAREST: -- **SAMPLER_FILTER_LINEAR** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerFilter` **SAMPLER_FILTER_NEAREST** = ``0`` + + + +.. _class_RenderingDevice_constant_SAMPLER_FILTER_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerFilter` **SAMPLER_FILTER_LINEAR** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_SamplerRepeatMode: -.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_REPEAT: - -.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MIRRORED_REPEAT: - -.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE: - -.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER: - -.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE: - -.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MAX: +.. rst-class:: classref-enumeration enum **SamplerRepeatMode**: -- **SAMPLER_REPEAT_MODE_REPEAT** = **0** +.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_REPEAT: -- **SAMPLER_REPEAT_MODE_MIRRORED_REPEAT** = **1** +.. rst-class:: classref-enumeration-constant -- **SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE** = **2** +:ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_REPEAT** = ``0`` -- **SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER** = **3** -- **SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE** = **4** -- **SAMPLER_REPEAT_MODE_MAX** = **5** +.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MIRRORED_REPEAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_MIRRORED_REPEAT** = ``1`` + + + +.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE** = ``2`` + + + +.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER** = ``3`` + + + +.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE** = ``4`` + + + +.. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerRepeatMode` **SAMPLER_REPEAT_MODE_MAX** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_SamplerBorderColor: -.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK: - -.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK: - -.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK: - -.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK: - -.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE: - -.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE: - -.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_MAX: +.. rst-class:: classref-enumeration enum **SamplerBorderColor**: -- **SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK** = **0** +.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK: -- **SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK** = **1** +.. rst-class:: classref-enumeration-constant -- **SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK** = **2** +:ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK** = ``0`` -- **SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK** = **3** -- **SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE** = **4** -- **SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE** = **5** +.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK: -- **SAMPLER_BORDER_COLOR_MAX** = **6** +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK** = ``1`` + + + +.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK** = ``2`` + + + +.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK** = ``3`` + + + +.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE** = ``4`` + + + +.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE** = ``5`` + + + +.. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplerBorderColor` **SAMPLER_BORDER_COLOR_MAX** = ``6`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_VertexFrequency: -.. _class_RenderingDevice_constant_VERTEX_FREQUENCY_VERTEX: - -.. _class_RenderingDevice_constant_VERTEX_FREQUENCY_INSTANCE: +.. rst-class:: classref-enumeration enum **VertexFrequency**: -- **VERTEX_FREQUENCY_VERTEX** = **0** +.. _class_RenderingDevice_constant_VERTEX_FREQUENCY_VERTEX: -- **VERTEX_FREQUENCY_INSTANCE** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`VertexFrequency` **VERTEX_FREQUENCY_VERTEX** = ``0`` + + + +.. _class_RenderingDevice_constant_VERTEX_FREQUENCY_INSTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VertexFrequency` **VERTEX_FREQUENCY_INSTANCE** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_IndexBufferFormat: -.. _class_RenderingDevice_constant_INDEX_BUFFER_FORMAT_UINT16: - -.. _class_RenderingDevice_constant_INDEX_BUFFER_FORMAT_UINT32: +.. rst-class:: classref-enumeration enum **IndexBufferFormat**: -- **INDEX_BUFFER_FORMAT_UINT16** = **0** +.. _class_RenderingDevice_constant_INDEX_BUFFER_FORMAT_UINT16: -- **INDEX_BUFFER_FORMAT_UINT32** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`IndexBufferFormat` **INDEX_BUFFER_FORMAT_UINT16** = ``0`` + + + +.. _class_RenderingDevice_constant_INDEX_BUFFER_FORMAT_UINT32: + +.. rst-class:: classref-enumeration-constant + +:ref:`IndexBufferFormat` **INDEX_BUFFER_FORMAT_UINT32** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_StorageBufferUsage: -.. _class_RenderingDevice_constant_STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT: +.. rst-class:: classref-enumeration enum **StorageBufferUsage**: -- **STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT** = **1** +.. _class_RenderingDevice_constant_STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`StorageBufferUsage` **STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_UniformType: -.. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE_BUFFER: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE_BUFFER: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_UNIFORM_BUFFER: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_STORAGE_BUFFER: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_INPUT_ATTACHMENT: - -.. _class_RenderingDevice_constant_UNIFORM_TYPE_MAX: +.. rst-class:: classref-enumeration enum **UniformType**: -- **UNIFORM_TYPE_SAMPLER** = **0** +.. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER: -- **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE** = **1** +.. rst-class:: classref-enumeration-constant -- **UNIFORM_TYPE_TEXTURE** = **2** +:ref:`UniformType` **UNIFORM_TYPE_SAMPLER** = ``0`` -- **UNIFORM_TYPE_IMAGE** = **3** -- **UNIFORM_TYPE_TEXTURE_BUFFER** = **4** -- **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER** = **5** +.. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE: -- **UNIFORM_TYPE_IMAGE_BUFFER** = **6** +.. rst-class:: classref-enumeration-constant -- **UNIFORM_TYPE_UNIFORM_BUFFER** = **7** +:ref:`UniformType` **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE** = ``1`` -- **UNIFORM_TYPE_STORAGE_BUFFER** = **8** -- **UNIFORM_TYPE_INPUT_ATTACHMENT** = **9** -- **UNIFORM_TYPE_MAX** = **10** +.. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_TEXTURE** = ``2`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_IMAGE** = ``3`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_TEXTURE_BUFFER** = ``4`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER** = ``5`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_IMAGE_BUFFER** = ``6`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_UNIFORM_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_UNIFORM_BUFFER** = ``7`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_STORAGE_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_STORAGE_BUFFER** = ``8`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_INPUT_ATTACHMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_INPUT_ATTACHMENT** = ``9`` + + + +.. _class_RenderingDevice_constant_UNIFORM_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`UniformType` **UNIFORM_TYPE_MAX** = ``10`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_RenderPrimitive: -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_POINTS: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINES: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINES_WITH_ADJACENCY: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINESTRIPS: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLES: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TESSELATION_PATCH: - -.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_MAX: +.. rst-class:: classref-enumeration enum **RenderPrimitive**: -- **RENDER_PRIMITIVE_POINTS** = **0** +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_POINTS: -- **RENDER_PRIMITIVE_LINES** = **1** +.. rst-class:: classref-enumeration-constant -- **RENDER_PRIMITIVE_LINES_WITH_ADJACENCY** = **2** +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_POINTS** = ``0`` -- **RENDER_PRIMITIVE_LINESTRIPS** = **3** -- **RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY** = **4** -- **RENDER_PRIMITIVE_TRIANGLES** = **5** +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINES: -- **RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY** = **6** +.. rst-class:: classref-enumeration-constant -- **RENDER_PRIMITIVE_TRIANGLE_STRIPS** = **7** +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINES** = ``1`` -- **RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY** = **8** -- **RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX** = **9** -- **RENDER_PRIMITIVE_TESSELATION_PATCH** = **10** +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINES_WITH_ADJACENCY: -- **RENDER_PRIMITIVE_MAX** = **11** +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINES_WITH_ADJACENCY** = ``2`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINESTRIPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINESTRIPS** = ``3`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY** = ``4`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLES** = ``5`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY** = ``6`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLE_STRIPS** = ``7`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY** = ``8`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX** = ``9`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_TESSELATION_PATCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_TESSELATION_PATCH** = ``10`` + + + +.. _class_RenderingDevice_constant_RENDER_PRIMITIVE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderPrimitive` **RENDER_PRIMITIVE_MAX** = ``11`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_PolygonCullMode: -.. _class_RenderingDevice_constant_POLYGON_CULL_DISABLED: - -.. _class_RenderingDevice_constant_POLYGON_CULL_FRONT: - -.. _class_RenderingDevice_constant_POLYGON_CULL_BACK: +.. rst-class:: classref-enumeration enum **PolygonCullMode**: -- **POLYGON_CULL_DISABLED** = **0** +.. _class_RenderingDevice_constant_POLYGON_CULL_DISABLED: -- **POLYGON_CULL_FRONT** = **1** +.. rst-class:: classref-enumeration-constant -- **POLYGON_CULL_BACK** = **2** +:ref:`PolygonCullMode` **POLYGON_CULL_DISABLED** = ``0`` + + + +.. _class_RenderingDevice_constant_POLYGON_CULL_FRONT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolygonCullMode` **POLYGON_CULL_FRONT** = ``1`` + + + +.. _class_RenderingDevice_constant_POLYGON_CULL_BACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolygonCullMode` **POLYGON_CULL_BACK** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_PolygonFrontFace: -.. _class_RenderingDevice_constant_POLYGON_FRONT_FACE_CLOCKWISE: - -.. _class_RenderingDevice_constant_POLYGON_FRONT_FACE_COUNTER_CLOCKWISE: +.. rst-class:: classref-enumeration enum **PolygonFrontFace**: -- **POLYGON_FRONT_FACE_CLOCKWISE** = **0** +.. _class_RenderingDevice_constant_POLYGON_FRONT_FACE_CLOCKWISE: -- **POLYGON_FRONT_FACE_COUNTER_CLOCKWISE** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`PolygonFrontFace` **POLYGON_FRONT_FACE_CLOCKWISE** = ``0`` + + + +.. _class_RenderingDevice_constant_POLYGON_FRONT_FACE_COUNTER_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PolygonFrontFace` **POLYGON_FRONT_FACE_COUNTER_CLOCKWISE** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_StencilOperation: -.. _class_RenderingDevice_constant_STENCIL_OP_KEEP: - -.. _class_RenderingDevice_constant_STENCIL_OP_ZERO: - -.. _class_RenderingDevice_constant_STENCIL_OP_REPLACE: - -.. _class_RenderingDevice_constant_STENCIL_OP_INCREMENT_AND_CLAMP: - -.. _class_RenderingDevice_constant_STENCIL_OP_DECREMENT_AND_CLAMP: - -.. _class_RenderingDevice_constant_STENCIL_OP_INVERT: - -.. _class_RenderingDevice_constant_STENCIL_OP_INCREMENT_AND_WRAP: - -.. _class_RenderingDevice_constant_STENCIL_OP_DECREMENT_AND_WRAP: - -.. _class_RenderingDevice_constant_STENCIL_OP_MAX: +.. rst-class:: classref-enumeration enum **StencilOperation**: -- **STENCIL_OP_KEEP** = **0** +.. _class_RenderingDevice_constant_STENCIL_OP_KEEP: -- **STENCIL_OP_ZERO** = **1** +.. rst-class:: classref-enumeration-constant -- **STENCIL_OP_REPLACE** = **2** +:ref:`StencilOperation` **STENCIL_OP_KEEP** = ``0`` -- **STENCIL_OP_INCREMENT_AND_CLAMP** = **3** -- **STENCIL_OP_DECREMENT_AND_CLAMP** = **4** -- **STENCIL_OP_INVERT** = **5** +.. _class_RenderingDevice_constant_STENCIL_OP_ZERO: -- **STENCIL_OP_INCREMENT_AND_WRAP** = **6** +.. rst-class:: classref-enumeration-constant -- **STENCIL_OP_DECREMENT_AND_WRAP** = **7** +:ref:`StencilOperation` **STENCIL_OP_ZERO** = ``1`` -- **STENCIL_OP_MAX** = **8** + + +.. _class_RenderingDevice_constant_STENCIL_OP_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilOperation` **STENCIL_OP_REPLACE** = ``2`` + + + +.. _class_RenderingDevice_constant_STENCIL_OP_INCREMENT_AND_CLAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilOperation` **STENCIL_OP_INCREMENT_AND_CLAMP** = ``3`` + + + +.. _class_RenderingDevice_constant_STENCIL_OP_DECREMENT_AND_CLAMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilOperation` **STENCIL_OP_DECREMENT_AND_CLAMP** = ``4`` + + + +.. _class_RenderingDevice_constant_STENCIL_OP_INVERT: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilOperation` **STENCIL_OP_INVERT** = ``5`` + + + +.. _class_RenderingDevice_constant_STENCIL_OP_INCREMENT_AND_WRAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilOperation` **STENCIL_OP_INCREMENT_AND_WRAP** = ``6`` + + + +.. _class_RenderingDevice_constant_STENCIL_OP_DECREMENT_AND_WRAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilOperation` **STENCIL_OP_DECREMENT_AND_WRAP** = ``7`` + + + +.. _class_RenderingDevice_constant_STENCIL_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilOperation` **STENCIL_OP_MAX** = ``8`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_CompareOperator: -.. _class_RenderingDevice_constant_COMPARE_OP_NEVER: - -.. _class_RenderingDevice_constant_COMPARE_OP_LESS: - -.. _class_RenderingDevice_constant_COMPARE_OP_EQUAL: - -.. _class_RenderingDevice_constant_COMPARE_OP_LESS_OR_EQUAL: - -.. _class_RenderingDevice_constant_COMPARE_OP_GREATER: - -.. _class_RenderingDevice_constant_COMPARE_OP_NOT_EQUAL: - -.. _class_RenderingDevice_constant_COMPARE_OP_GREATER_OR_EQUAL: - -.. _class_RenderingDevice_constant_COMPARE_OP_ALWAYS: - -.. _class_RenderingDevice_constant_COMPARE_OP_MAX: +.. rst-class:: classref-enumeration enum **CompareOperator**: -- **COMPARE_OP_NEVER** = **0** +.. _class_RenderingDevice_constant_COMPARE_OP_NEVER: -- **COMPARE_OP_LESS** = **1** +.. rst-class:: classref-enumeration-constant -- **COMPARE_OP_EQUAL** = **2** +:ref:`CompareOperator` **COMPARE_OP_NEVER** = ``0`` -- **COMPARE_OP_LESS_OR_EQUAL** = **3** -- **COMPARE_OP_GREATER** = **4** -- **COMPARE_OP_NOT_EQUAL** = **5** +.. _class_RenderingDevice_constant_COMPARE_OP_LESS: -- **COMPARE_OP_GREATER_OR_EQUAL** = **6** +.. rst-class:: classref-enumeration-constant -- **COMPARE_OP_ALWAYS** = **7** +:ref:`CompareOperator` **COMPARE_OP_LESS** = ``1`` -- **COMPARE_OP_MAX** = **8** + + +.. _class_RenderingDevice_constant_COMPARE_OP_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompareOperator` **COMPARE_OP_EQUAL** = ``2`` + + + +.. _class_RenderingDevice_constant_COMPARE_OP_LESS_OR_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompareOperator` **COMPARE_OP_LESS_OR_EQUAL** = ``3`` + + + +.. _class_RenderingDevice_constant_COMPARE_OP_GREATER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompareOperator` **COMPARE_OP_GREATER** = ``4`` + + + +.. _class_RenderingDevice_constant_COMPARE_OP_NOT_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompareOperator` **COMPARE_OP_NOT_EQUAL** = ``5`` + + + +.. _class_RenderingDevice_constant_COMPARE_OP_GREATER_OR_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompareOperator` **COMPARE_OP_GREATER_OR_EQUAL** = ``6`` + + + +.. _class_RenderingDevice_constant_COMPARE_OP_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompareOperator` **COMPARE_OP_ALWAYS** = ``7`` + + + +.. _class_RenderingDevice_constant_COMPARE_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompareOperator` **COMPARE_OP_MAX** = ``8`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_LogicOperation: -.. _class_RenderingDevice_constant_LOGIC_OP_CLEAR: - -.. _class_RenderingDevice_constant_LOGIC_OP_AND: - -.. _class_RenderingDevice_constant_LOGIC_OP_AND_REVERSE: - -.. _class_RenderingDevice_constant_LOGIC_OP_COPY: - -.. _class_RenderingDevice_constant_LOGIC_OP_AND_INVERTED: - -.. _class_RenderingDevice_constant_LOGIC_OP_NO_OP: - -.. _class_RenderingDevice_constant_LOGIC_OP_XOR: - -.. _class_RenderingDevice_constant_LOGIC_OP_OR: - -.. _class_RenderingDevice_constant_LOGIC_OP_NOR: - -.. _class_RenderingDevice_constant_LOGIC_OP_EQUIVALENT: - -.. _class_RenderingDevice_constant_LOGIC_OP_INVERT: - -.. _class_RenderingDevice_constant_LOGIC_OP_OR_REVERSE: - -.. _class_RenderingDevice_constant_LOGIC_OP_COPY_INVERTED: - -.. _class_RenderingDevice_constant_LOGIC_OP_OR_INVERTED: - -.. _class_RenderingDevice_constant_LOGIC_OP_NAND: - -.. _class_RenderingDevice_constant_LOGIC_OP_SET: - -.. _class_RenderingDevice_constant_LOGIC_OP_MAX: +.. rst-class:: classref-enumeration enum **LogicOperation**: -- **LOGIC_OP_CLEAR** = **0** +.. _class_RenderingDevice_constant_LOGIC_OP_CLEAR: -- **LOGIC_OP_AND** = **1** +.. rst-class:: classref-enumeration-constant -- **LOGIC_OP_AND_REVERSE** = **2** +:ref:`LogicOperation` **LOGIC_OP_CLEAR** = ``0`` -- **LOGIC_OP_COPY** = **3** -- **LOGIC_OP_AND_INVERTED** = **4** -- **LOGIC_OP_NO_OP** = **5** +.. _class_RenderingDevice_constant_LOGIC_OP_AND: -- **LOGIC_OP_XOR** = **6** +.. rst-class:: classref-enumeration-constant -- **LOGIC_OP_OR** = **7** +:ref:`LogicOperation` **LOGIC_OP_AND** = ``1`` -- **LOGIC_OP_NOR** = **8** -- **LOGIC_OP_EQUIVALENT** = **9** -- **LOGIC_OP_INVERT** = **10** +.. _class_RenderingDevice_constant_LOGIC_OP_AND_REVERSE: -- **LOGIC_OP_OR_REVERSE** = **11** +.. rst-class:: classref-enumeration-constant -- **LOGIC_OP_COPY_INVERTED** = **12** +:ref:`LogicOperation` **LOGIC_OP_AND_REVERSE** = ``2`` -- **LOGIC_OP_OR_INVERTED** = **13** -- **LOGIC_OP_NAND** = **14** -- **LOGIC_OP_SET** = **15** +.. _class_RenderingDevice_constant_LOGIC_OP_COPY: -- **LOGIC_OP_MAX** = **16** +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_COPY** = ``3`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_AND_INVERTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_AND_INVERTED** = ``4`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_NO_OP: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_NO_OP** = ``5`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_XOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_XOR** = ``6`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_OR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_OR** = ``7`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_NOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_NOR** = ``8`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_EQUIVALENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_EQUIVALENT** = ``9`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_INVERT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_INVERT** = ``10`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_OR_REVERSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_OR_REVERSE** = ``11`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_COPY_INVERTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_COPY_INVERTED** = ``12`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_OR_INVERTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_OR_INVERTED** = ``13`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_NAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_NAND** = ``14`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_SET: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_SET** = ``15`` + + + +.. _class_RenderingDevice_constant_LOGIC_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`LogicOperation` **LOGIC_OP_MAX** = ``16`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_BlendFactor: -.. _class_RenderingDevice_constant_BLEND_FACTOR_ZERO: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_DST_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_DST_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_DST_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_DST_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_CONSTANT_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_CONSTANT_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA_SATURATE: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC1_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC1_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA: - -.. _class_RenderingDevice_constant_BLEND_FACTOR_MAX: +.. rst-class:: classref-enumeration enum **BlendFactor**: -- **BLEND_FACTOR_ZERO** = **0** +.. _class_RenderingDevice_constant_BLEND_FACTOR_ZERO: -- **BLEND_FACTOR_ONE** = **1** +.. rst-class:: classref-enumeration-constant -- **BLEND_FACTOR_SRC_COLOR** = **2** +:ref:`BlendFactor` **BLEND_FACTOR_ZERO** = ``0`` -- **BLEND_FACTOR_ONE_MINUS_SRC_COLOR** = **3** -- **BLEND_FACTOR_DST_COLOR** = **4** -- **BLEND_FACTOR_ONE_MINUS_DST_COLOR** = **5** +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE: -- **BLEND_FACTOR_SRC_ALPHA** = **6** +.. rst-class:: classref-enumeration-constant -- **BLEND_FACTOR_ONE_MINUS_SRC_ALPHA** = **7** +:ref:`BlendFactor` **BLEND_FACTOR_ONE** = ``1`` -- **BLEND_FACTOR_DST_ALPHA** = **8** -- **BLEND_FACTOR_ONE_MINUS_DST_ALPHA** = **9** -- **BLEND_FACTOR_CONSTANT_COLOR** = **10** +.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_COLOR: -- **BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR** = **11** +.. rst-class:: classref-enumeration-constant -- **BLEND_FACTOR_CONSTANT_ALPHA** = **12** +:ref:`BlendFactor` **BLEND_FACTOR_SRC_COLOR** = ``2`` -- **BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA** = **13** -- **BLEND_FACTOR_SRC_ALPHA_SATURATE** = **14** -- **BLEND_FACTOR_SRC1_COLOR** = **15** +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_COLOR: -- **BLEND_FACTOR_ONE_MINUS_SRC1_COLOR** = **16** +.. rst-class:: classref-enumeration-constant -- **BLEND_FACTOR_SRC1_ALPHA** = **17** +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC_COLOR** = ``3`` -- **BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA** = **18** -- **BLEND_FACTOR_MAX** = **19** + +.. _class_RenderingDevice_constant_BLEND_FACTOR_DST_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_DST_COLOR** = ``4`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_DST_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_DST_COLOR** = ``5`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_SRC_ALPHA** = ``6`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC_ALPHA** = ``7`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_DST_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_DST_ALPHA** = ``8`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_DST_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_DST_ALPHA** = ``9`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_CONSTANT_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_CONSTANT_COLOR** = ``10`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR** = ``11`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_CONSTANT_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_CONSTANT_ALPHA** = ``12`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA** = ``13`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA_SATURATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_SRC_ALPHA_SATURATE** = ``14`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC1_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_SRC1_COLOR** = ``15`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC1_COLOR** = ``16`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_SRC1_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_SRC1_ALPHA** = ``17`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA** = ``18`` + + + +.. _class_RenderingDevice_constant_BLEND_FACTOR_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendFactor` **BLEND_FACTOR_MAX** = ``19`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_BlendOperation: -.. _class_RenderingDevice_constant_BLEND_OP_ADD: - -.. _class_RenderingDevice_constant_BLEND_OP_SUBTRACT: - -.. _class_RenderingDevice_constant_BLEND_OP_REVERSE_SUBTRACT: - -.. _class_RenderingDevice_constant_BLEND_OP_MINIMUM: - -.. _class_RenderingDevice_constant_BLEND_OP_MAXIMUM: - -.. _class_RenderingDevice_constant_BLEND_OP_MAX: +.. rst-class:: classref-enumeration enum **BlendOperation**: -- **BLEND_OP_ADD** = **0** +.. _class_RenderingDevice_constant_BLEND_OP_ADD: -- **BLEND_OP_SUBTRACT** = **1** +.. rst-class:: classref-enumeration-constant -- **BLEND_OP_REVERSE_SUBTRACT** = **2** +:ref:`BlendOperation` **BLEND_OP_ADD** = ``0`` -- **BLEND_OP_MINIMUM** = **3** -- **BLEND_OP_MAXIMUM** = **4** -- **BLEND_OP_MAX** = **5** +.. _class_RenderingDevice_constant_BLEND_OP_SUBTRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendOperation` **BLEND_OP_SUBTRACT** = ``1`` + + + +.. _class_RenderingDevice_constant_BLEND_OP_REVERSE_SUBTRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendOperation` **BLEND_OP_REVERSE_SUBTRACT** = ``2`` + + + +.. _class_RenderingDevice_constant_BLEND_OP_MINIMUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendOperation` **BLEND_OP_MINIMUM** = ``3`` + + + +.. _class_RenderingDevice_constant_BLEND_OP_MAXIMUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendOperation` **BLEND_OP_MAXIMUM** = ``4`` + + + +.. _class_RenderingDevice_constant_BLEND_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendOperation` **BLEND_OP_MAX** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_PipelineDynamicStateFlags: -.. _class_RenderingDevice_constant_DYNAMIC_STATE_LINE_WIDTH: - -.. _class_RenderingDevice_constant_DYNAMIC_STATE_DEPTH_BIAS: - -.. _class_RenderingDevice_constant_DYNAMIC_STATE_BLEND_CONSTANTS: - -.. _class_RenderingDevice_constant_DYNAMIC_STATE_DEPTH_BOUNDS: - -.. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_COMPARE_MASK: - -.. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_WRITE_MASK: - -.. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_REFERENCE: +.. rst-class:: classref-enumeration enum **PipelineDynamicStateFlags**: -- **DYNAMIC_STATE_LINE_WIDTH** = **1** +.. _class_RenderingDevice_constant_DYNAMIC_STATE_LINE_WIDTH: -- **DYNAMIC_STATE_DEPTH_BIAS** = **2** +.. rst-class:: classref-enumeration-constant -- **DYNAMIC_STATE_BLEND_CONSTANTS** = **4** +:ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_LINE_WIDTH** = ``1`` -- **DYNAMIC_STATE_DEPTH_BOUNDS** = **8** -- **DYNAMIC_STATE_STENCIL_COMPARE_MASK** = **16** -- **DYNAMIC_STATE_STENCIL_WRITE_MASK** = **32** +.. _class_RenderingDevice_constant_DYNAMIC_STATE_DEPTH_BIAS: -- **DYNAMIC_STATE_STENCIL_REFERENCE** = **64** +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_DEPTH_BIAS** = ``2`` + + + +.. _class_RenderingDevice_constant_DYNAMIC_STATE_BLEND_CONSTANTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_BLEND_CONSTANTS** = ``4`` + + + +.. _class_RenderingDevice_constant_DYNAMIC_STATE_DEPTH_BOUNDS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_DEPTH_BOUNDS** = ``8`` + + + +.. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_COMPARE_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_STENCIL_COMPARE_MASK** = ``16`` + + + +.. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_WRITE_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_STENCIL_WRITE_MASK** = ``32`` + + + +.. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_REFERENCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineDynamicStateFlags` **DYNAMIC_STATE_STENCIL_REFERENCE** = ``64`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_InitialAction: -.. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR: - -.. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION: - -.. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION_CONTINUE: - -.. _class_RenderingDevice_constant_INITIAL_ACTION_KEEP: - -.. _class_RenderingDevice_constant_INITIAL_ACTION_DROP: - -.. _class_RenderingDevice_constant_INITIAL_ACTION_CONTINUE: - -.. _class_RenderingDevice_constant_INITIAL_ACTION_MAX: +.. rst-class:: classref-enumeration enum **InitialAction**: -- **INITIAL_ACTION_CLEAR** = **0** +.. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR: -- **INITIAL_ACTION_CLEAR_REGION** = **1** +.. rst-class:: classref-enumeration-constant -- **INITIAL_ACTION_CLEAR_REGION_CONTINUE** = **2** +:ref:`InitialAction` **INITIAL_ACTION_CLEAR** = ``0`` -- **INITIAL_ACTION_KEEP** = **3** -- **INITIAL_ACTION_DROP** = **4** -- **INITIAL_ACTION_CONTINUE** = **5** +.. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION: -- **INITIAL_ACTION_MAX** = **6** +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction` **INITIAL_ACTION_CLEAR_REGION** = ``1`` + + + +.. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION_CONTINUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction` **INITIAL_ACTION_CLEAR_REGION_CONTINUE** = ``2`` + + + +.. _class_RenderingDevice_constant_INITIAL_ACTION_KEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction` **INITIAL_ACTION_KEEP** = ``3`` + + + +.. _class_RenderingDevice_constant_INITIAL_ACTION_DROP: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction` **INITIAL_ACTION_DROP** = ``4`` + + + +.. _class_RenderingDevice_constant_INITIAL_ACTION_CONTINUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction` **INITIAL_ACTION_CONTINUE** = ``5`` + + + +.. _class_RenderingDevice_constant_INITIAL_ACTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction` **INITIAL_ACTION_MAX** = ``6`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_FinalAction: -.. _class_RenderingDevice_constant_FINAL_ACTION_READ: - -.. _class_RenderingDevice_constant_FINAL_ACTION_DISCARD: - -.. _class_RenderingDevice_constant_FINAL_ACTION_CONTINUE: - -.. _class_RenderingDevice_constant_FINAL_ACTION_MAX: +.. rst-class:: classref-enumeration enum **FinalAction**: -- **FINAL_ACTION_READ** = **0** +.. _class_RenderingDevice_constant_FINAL_ACTION_READ: -- **FINAL_ACTION_DISCARD** = **1** +.. rst-class:: classref-enumeration-constant -- **FINAL_ACTION_CONTINUE** = **2** +:ref:`FinalAction` **FINAL_ACTION_READ** = ``0`` -- **FINAL_ACTION_MAX** = **3** + + +.. _class_RenderingDevice_constant_FINAL_ACTION_DISCARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`FinalAction` **FINAL_ACTION_DISCARD** = ``1`` + + + +.. _class_RenderingDevice_constant_FINAL_ACTION_CONTINUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FinalAction` **FINAL_ACTION_CONTINUE** = ``2`` + + + +.. _class_RenderingDevice_constant_FINAL_ACTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`FinalAction` **FINAL_ACTION_MAX** = ``3`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_ShaderStage: -.. _class_RenderingDevice_constant_SHADER_STAGE_VERTEX: - -.. _class_RenderingDevice_constant_SHADER_STAGE_FRAGMENT: - -.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_CONTROL: - -.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_EVALUATION: - -.. _class_RenderingDevice_constant_SHADER_STAGE_COMPUTE: - -.. _class_RenderingDevice_constant_SHADER_STAGE_MAX: - -.. _class_RenderingDevice_constant_SHADER_STAGE_VERTEX_BIT: - -.. _class_RenderingDevice_constant_SHADER_STAGE_FRAGMENT_BIT: - -.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_CONTROL_BIT: - -.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_EVALUATION_BIT: - -.. _class_RenderingDevice_constant_SHADER_STAGE_COMPUTE_BIT: +.. rst-class:: classref-enumeration enum **ShaderStage**: -- **SHADER_STAGE_VERTEX** = **0** +.. _class_RenderingDevice_constant_SHADER_STAGE_VERTEX: -- **SHADER_STAGE_FRAGMENT** = **1** +.. rst-class:: classref-enumeration-constant -- **SHADER_STAGE_TESSELATION_CONTROL** = **2** +:ref:`ShaderStage` **SHADER_STAGE_VERTEX** = ``0`` -- **SHADER_STAGE_TESSELATION_EVALUATION** = **3** -- **SHADER_STAGE_COMPUTE** = **4** -- **SHADER_STAGE_MAX** = **5** +.. _class_RenderingDevice_constant_SHADER_STAGE_FRAGMENT: -- **SHADER_STAGE_VERTEX_BIT** = **1** +.. rst-class:: classref-enumeration-constant -- **SHADER_STAGE_FRAGMENT_BIT** = **2** +:ref:`ShaderStage` **SHADER_STAGE_FRAGMENT** = ``1`` -- **SHADER_STAGE_TESSELATION_CONTROL_BIT** = **4** -- **SHADER_STAGE_TESSELATION_EVALUATION_BIT** = **8** -- **SHADER_STAGE_COMPUTE_BIT** = **16** +.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_CONTROL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_TESSELATION_CONTROL** = ``2`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_EVALUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_TESSELATION_EVALUATION** = ``3`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_COMPUTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_COMPUTE** = ``4`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_MAX** = ``5`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_VERTEX_BIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_VERTEX_BIT** = ``1`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_FRAGMENT_BIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_FRAGMENT_BIT** = ``2`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_CONTROL_BIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_TESSELATION_CONTROL_BIT** = ``4`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_TESSELATION_EVALUATION_BIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_TESSELATION_EVALUATION_BIT** = ``8`` + + + +.. _class_RenderingDevice_constant_SHADER_STAGE_COMPUTE_BIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderStage` **SHADER_STAGE_COMPUTE_BIT** = ``16`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_ShaderLanguage: -.. _class_RenderingDevice_constant_SHADER_LANGUAGE_GLSL: - -.. _class_RenderingDevice_constant_SHADER_LANGUAGE_HLSL: +.. rst-class:: classref-enumeration enum **ShaderLanguage**: -- **SHADER_LANGUAGE_GLSL** = **0** +.. _class_RenderingDevice_constant_SHADER_LANGUAGE_GLSL: -- **SHADER_LANGUAGE_HLSL** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderLanguage` **SHADER_LANGUAGE_GLSL** = ``0`` + + + +.. _class_RenderingDevice_constant_SHADER_LANGUAGE_HLSL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderLanguage` **SHADER_LANGUAGE_HLSL** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_PipelineSpecializationConstantType: -.. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL: - -.. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT: - -.. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT: +.. rst-class:: classref-enumeration enum **PipelineSpecializationConstantType**: -- **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL** = **0** +.. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL: -- **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT** = **1** +.. rst-class:: classref-enumeration-constant -- **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT** = **2** +:ref:`PipelineSpecializationConstantType` **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL** = ``0`` + + + +.. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSpecializationConstantType` **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT** = ``1`` + + + +.. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSpecializationConstantType` **PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_Limit: -.. _class_RenderingDevice_constant_LIMIT_MAX_BOUND_UNIFORM_SETS: - -.. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS: - -.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURES_PER_UNIFORM_SET: - -.. _class_RenderingDevice_constant_LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET: - -.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET: - -.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET: - -.. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET: - -.. _class_RenderingDevice_constant_LIMIT_MAX_DRAW_INDEXED_INDEX: - -.. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_HEIGHT: - -.. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_WIDTH: - -.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_ARRAY_LAYERS: - -.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_1D: - -.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_2D: - -.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_3D: - -.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_CUBE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURES_PER_SHADER_STAGE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_PUSH_CONSTANT_SIZE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFER_SIZE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET: - -.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES: - -.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_BINDINGS: - -.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE: - -.. _class_RenderingDevice_constant_LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y: - -.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z: - -.. _class_RenderingDevice_constant_LIMIT_MAX_VIEWPORT_DIMENSIONS_X: - -.. _class_RenderingDevice_constant_LIMIT_MAX_VIEWPORT_DIMENSIONS_Y: +.. rst-class:: classref-enumeration enum **Limit**: -- **LIMIT_MAX_BOUND_UNIFORM_SETS** = **0** +.. _class_RenderingDevice_constant_LIMIT_MAX_BOUND_UNIFORM_SETS: -- **LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS** = **1** +.. rst-class:: classref-enumeration-constant -- **LIMIT_MAX_TEXTURES_PER_UNIFORM_SET** = **2** +:ref:`Limit` **LIMIT_MAX_BOUND_UNIFORM_SETS** = ``0`` -- **LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET** = **3** -- **LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET** = **4** -- **LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET** = **5** +.. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS: -- **LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET** = **6** +.. rst-class:: classref-enumeration-constant -- **LIMIT_MAX_DRAW_INDEXED_INDEX** = **7** +:ref:`Limit` **LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS** = ``1`` -- **LIMIT_MAX_FRAMEBUFFER_HEIGHT** = **8** -- **LIMIT_MAX_FRAMEBUFFER_WIDTH** = **9** -- **LIMIT_MAX_TEXTURE_ARRAY_LAYERS** = **10** +.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURES_PER_UNIFORM_SET: -- **LIMIT_MAX_TEXTURE_SIZE_1D** = **11** +.. rst-class:: classref-enumeration-constant -- **LIMIT_MAX_TEXTURE_SIZE_2D** = **12** +:ref:`Limit` **LIMIT_MAX_TEXTURES_PER_UNIFORM_SET** = ``2`` -- **LIMIT_MAX_TEXTURE_SIZE_3D** = **13** -- **LIMIT_MAX_TEXTURE_SIZE_CUBE** = **14** -- **LIMIT_MAX_TEXTURES_PER_SHADER_STAGE** = **15** +.. _class_RenderingDevice_constant_LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET: -- **LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE** = **16** +.. rst-class:: classref-enumeration-constant -- **LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE** = **17** +:ref:`Limit` **LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET** = ``3`` -- **LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE** = **18** -- **LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE** = **19** -- **LIMIT_MAX_PUSH_CONSTANT_SIZE** = **20** +.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET: -- **LIMIT_MAX_UNIFORM_BUFFER_SIZE** = **21** +.. rst-class:: classref-enumeration-constant -- **LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET** = **22** +:ref:`Limit` **LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET** = ``4`` -- **LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES** = **23** -- **LIMIT_MAX_VERTEX_INPUT_BINDINGS** = **24** -- **LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE** = **25** +.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET: -- **LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT** = **26** +.. rst-class:: classref-enumeration-constant -- **LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE** = **27** +:ref:`Limit` **LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET** = ``5`` -- **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X** = **28** -- **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y** = **29** -- **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z** = **30** +.. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET: -- **LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS** = **31** +.. rst-class:: classref-enumeration-constant -- **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X** = **32** +:ref:`Limit` **LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET** = ``6`` -- **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y** = **33** -- **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z** = **34** -- **LIMIT_MAX_VIEWPORT_DIMENSIONS_X** = **35** +.. _class_RenderingDevice_constant_LIMIT_MAX_DRAW_INDEXED_INDEX: -- **LIMIT_MAX_VIEWPORT_DIMENSIONS_Y** = **36** +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_DRAW_INDEXED_INDEX** = ``7`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_HEIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_FRAMEBUFFER_HEIGHT** = ``8`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_FRAMEBUFFER_WIDTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_FRAMEBUFFER_WIDTH** = ``9`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_ARRAY_LAYERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_TEXTURE_ARRAY_LAYERS** = ``10`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_1D: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_TEXTURE_SIZE_1D** = ``11`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_TEXTURE_SIZE_2D** = ``12`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_TEXTURE_SIZE_3D** = ``13`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURE_SIZE_CUBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_TEXTURE_SIZE_CUBE** = ``14`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_TEXTURES_PER_SHADER_STAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_TEXTURES_PER_SHADER_STAGE** = ``15`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE** = ``16`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE** = ``17`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE** = ``18`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE** = ``19`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_PUSH_CONSTANT_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_PUSH_CONSTANT_SIZE** = ``20`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_UNIFORM_BUFFER_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_UNIFORM_BUFFER_SIZE** = ``21`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET** = ``22`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES** = ``23`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_BINDINGS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_BINDINGS** = ``24`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE** = ``25`` + + + +.. _class_RenderingDevice_constant_LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT** = ``26`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE** = ``27`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X** = ``28`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y** = ``29`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z** = ``30`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS** = ``31`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X** = ``32`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y** = ``33`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z** = ``34`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_VIEWPORT_DIMENSIONS_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_VIEWPORT_DIMENSIONS_X** = ``35`` + + + +.. _class_RenderingDevice_constant_LIMIT_MAX_VIEWPORT_DIMENSIONS_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`Limit` **LIMIT_MAX_VIEWPORT_DIMENSIONS_Y** = ``36`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingDevice_MemoryType: -.. _class_RenderingDevice_constant_MEMORY_TEXTURES: - -.. _class_RenderingDevice_constant_MEMORY_BUFFERS: - -.. _class_RenderingDevice_constant_MEMORY_TOTAL: +.. rst-class:: classref-enumeration enum **MemoryType**: -- **MEMORY_TEXTURES** = **0** +.. _class_RenderingDevice_constant_MEMORY_TEXTURES: -- **MEMORY_BUFFERS** = **1** +.. rst-class:: classref-enumeration-constant -- **MEMORY_TOTAL** = **2** +:ref:`MemoryType` **MEMORY_TEXTURES** = ``0`` + + + +.. _class_RenderingDevice_constant_MEMORY_BUFFERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`MemoryType` **MEMORY_BUFFERS** = ``1`` + + + +.. _class_RenderingDevice_constant_MEMORY_TOTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`MemoryType` **MEMORY_TOTAL** = ``2`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- -.. _class_RenderingDevice_constant_BARRIER_MASK_RASTER: - -.. _class_RenderingDevice_constant_BARRIER_MASK_COMPUTE: - -.. _class_RenderingDevice_constant_BARRIER_MASK_TRANSFER: - -.. _class_RenderingDevice_constant_BARRIER_MASK_ALL: - -.. _class_RenderingDevice_constant_BARRIER_MASK_NO_BARRIER: - .. _class_RenderingDevice_constant_INVALID_ID: +.. rst-class:: classref-constant + +**INVALID_ID** = ``-1`` + + + .. _class_RenderingDevice_constant_INVALID_FORMAT_ID: -- **BARRIER_MASK_RASTER** = **1** +.. rst-class:: classref-constant -- **BARRIER_MASK_COMPUTE** = **2** +**INVALID_FORMAT_ID** = ``-1`` -- **BARRIER_MASK_TRANSFER** = **4** -- **BARRIER_MASK_ALL** = **7** -- **BARRIER_MASK_NO_BARRIER** = **8** +.. rst-class:: classref-section-separator -- **INVALID_ID** = **-1** +---- -- **INVALID_FORMAT_ID** = **-1** +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_RenderingDevice_method_barrier: -- void **barrier** **(** :ref:`int` from=7, :ref:`int` to=7 **)** +.. rst-class:: classref-method + +void **barrier** **(** :ref:`BarrierMask` from=7, :ref:`BarrierMask` to=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_buffer_clear: -- :ref:`Error` **buffer_clear** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +:ref:`Error` **buffer_clear** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_buffer_get_data: -- :ref:`PackedByteArray` **buffer_get_data** **(** :ref:`RID` buffer **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **buffer_get_data** **(** :ref:`RID` buffer **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_buffer_update: -- :ref:`Error` **buffer_update** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +:ref:`Error` **buffer_update** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_capture_timestamp: -- void **capture_timestamp** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **capture_timestamp** **(** :ref:`String` name **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_list_add_barrier: -- void **compute_list_add_barrier** **(** :ref:`int` compute_list **)** +.. rst-class:: classref-method + +void **compute_list_add_barrier** **(** :ref:`int` compute_list **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_list_begin: -- :ref:`int` **compute_list_begin** **(** :ref:`bool` allow_draw_overlap=false **)** +.. rst-class:: classref-method + +:ref:`int` **compute_list_begin** **(** :ref:`bool` allow_draw_overlap=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_list_bind_compute_pipeline: -- void **compute_list_bind_compute_pipeline** **(** :ref:`int` compute_list, :ref:`RID` compute_pipeline **)** +.. rst-class:: classref-method + +void **compute_list_bind_compute_pipeline** **(** :ref:`int` compute_list, :ref:`RID` compute_pipeline **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_list_bind_uniform_set: -- void **compute_list_bind_uniform_set** **(** :ref:`int` compute_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** +.. rst-class:: classref-method + +void **compute_list_bind_uniform_set** **(** :ref:`int` compute_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_list_dispatch: -- void **compute_list_dispatch** **(** :ref:`int` compute_list, :ref:`int` x_groups, :ref:`int` y_groups, :ref:`int` z_groups **)** +.. rst-class:: classref-method + +void **compute_list_dispatch** **(** :ref:`int` compute_list, :ref:`int` x_groups, :ref:`int` y_groups, :ref:`int` z_groups **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_list_end: -- void **compute_list_end** **(** :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +void **compute_list_end** **(** :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_list_set_push_constant: -- void **compute_list_set_push_constant** **(** :ref:`int` compute_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** +.. rst-class:: classref-method + +void **compute_list_set_push_constant** **(** :ref:`int` compute_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_pipeline_create: -- :ref:`RID` **compute_pipeline_create** **(** :ref:`RID` shader, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** +.. rst-class:: classref-method + +:ref:`RID` **compute_pipeline_create** **(** :ref:`RID` shader, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_compute_pipeline_is_valid: -- :ref:`bool` **compute_pipeline_is_valid** **(** :ref:`RID` compute_pieline **)** +.. rst-class:: classref-method + +:ref:`bool` **compute_pipeline_is_valid** **(** :ref:`RID` compute_pieline **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_create_local_device: -- :ref:`RenderingDevice` **create_local_device** **(** **)** +.. rst-class:: classref-method + +:ref:`RenderingDevice` **create_local_device** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_command_begin_label: -- void **draw_command_begin_label** **(** :ref:`String` name, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **draw_command_begin_label** **(** :ref:`String` name, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_command_end_label: -- void **draw_command_end_label** **(** **)** +.. rst-class:: classref-method + +void **draw_command_end_label** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_command_insert_label: -- void **draw_command_insert_label** **(** :ref:`String` name, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **draw_command_insert_label** **(** :ref:`String` name, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_begin: -- :ref:`int` **draw_list_begin** **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Array` storage_textures=[] **)** +.. rst-class:: classref-method + +:ref:`int` **draw_list_begin** **(** :ref:`RID` framebuffer, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Array` storage_textures=[] **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_begin_for_screen: -- :ref:`int` **draw_list_begin_for_screen** **(** :ref:`int` screen=0, :ref:`Color` clear_color=Color(0, 0, 0, 1) **)** +.. rst-class:: classref-method + +:ref:`int` **draw_list_begin_for_screen** **(** :ref:`int` screen=0, :ref:`Color` clear_color=Color(0, 0, 0, 1) **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_begin_split: -- :ref:`PackedInt64Array` **draw_list_begin_split** **(** :ref:`RID` framebuffer, :ref:`int` splits, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`RID[]` storage_textures=[] **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **draw_list_begin_split** **(** :ref:`RID` framebuffer, :ref:`int` splits, :ref:`InitialAction` initial_color_action, :ref:`FinalAction` final_color_action, :ref:`InitialAction` initial_depth_action, :ref:`FinalAction` final_depth_action, :ref:`PackedColorArray` clear_color_values=PackedColorArray(), :ref:`float` clear_depth=1.0, :ref:`int` clear_stencil=0, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`RID[]` storage_textures=[] **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_bind_index_array: -- void **draw_list_bind_index_array** **(** :ref:`int` draw_list, :ref:`RID` index_array **)** +.. rst-class:: classref-method + +void **draw_list_bind_index_array** **(** :ref:`int` draw_list, :ref:`RID` index_array **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_bind_render_pipeline: -- void **draw_list_bind_render_pipeline** **(** :ref:`int` draw_list, :ref:`RID` render_pipeline **)** +.. rst-class:: classref-method + +void **draw_list_bind_render_pipeline** **(** :ref:`int` draw_list, :ref:`RID` render_pipeline **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_bind_uniform_set: -- void **draw_list_bind_uniform_set** **(** :ref:`int` draw_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** +.. rst-class:: classref-method + +void **draw_list_bind_uniform_set** **(** :ref:`int` draw_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_bind_vertex_array: -- void **draw_list_bind_vertex_array** **(** :ref:`int` draw_list, :ref:`RID` vertex_array **)** +.. rst-class:: classref-method + +void **draw_list_bind_vertex_array** **(** :ref:`int` draw_list, :ref:`RID` vertex_array **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_disable_scissor: -- void **draw_list_disable_scissor** **(** :ref:`int` draw_list **)** +.. rst-class:: classref-method + +void **draw_list_disable_scissor** **(** :ref:`int` draw_list **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_draw: -- void **draw_list_draw** **(** :ref:`int` draw_list, :ref:`bool` use_indices, :ref:`int` instances, :ref:`int` procedural_vertex_count=0 **)** +.. rst-class:: classref-method + +void **draw_list_draw** **(** :ref:`int` draw_list, :ref:`bool` use_indices, :ref:`int` instances, :ref:`int` procedural_vertex_count=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_enable_scissor: -- void **draw_list_enable_scissor** **(** :ref:`int` draw_list, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** +.. rst-class:: classref-method + +void **draw_list_enable_scissor** **(** :ref:`int` draw_list, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_end: -- void **draw_list_end** **(** :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +void **draw_list_end** **(** :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_set_blend_constants: -- void **draw_list_set_blend_constants** **(** :ref:`int` draw_list, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **draw_list_set_blend_constants** **(** :ref:`int` draw_list, :ref:`Color` color **)** Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with :ref:`DYNAMIC_STATE_BLEND_CONSTANTS` flag set. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_set_push_constant: -- void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** +.. rst-class:: classref-method + +void **draw_list_set_push_constant** **(** :ref:`int` draw_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_switch_to_next_pass: -- :ref:`int` **draw_list_switch_to_next_pass** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **draw_list_switch_to_next_pass** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_draw_list_switch_to_next_pass_split: -- :ref:`PackedInt64Array` **draw_list_switch_to_next_pass_split** **(** :ref:`int` splits **)** +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **draw_list_switch_to_next_pass_split** **(** :ref:`int` splits **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_create: -- :ref:`RID` **framebuffer_create** **(** :ref:`RID[]` textures, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** +.. rst-class:: classref-method + +:ref:`RID` **framebuffer_create** **(** :ref:`RID[]` textures, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_create_empty: -- :ref:`RID` **framebuffer_create_empty** **(** :ref:`Vector2i` size, :ref:`TextureSamples` samples=0, :ref:`int` validate_with_format=-1 **)** +.. rst-class:: classref-method + +:ref:`RID` **framebuffer_create_empty** **(** :ref:`Vector2i` size, :ref:`TextureSamples` samples=0, :ref:`int` validate_with_format=-1 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_create_multipass: -- :ref:`RID` **framebuffer_create_multipass** **(** :ref:`RID[]` textures, :ref:`RDFramebufferPass[]` passes, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** +.. rst-class:: classref-method + +:ref:`RID` **framebuffer_create_multipass** **(** :ref:`RID[]` textures, :ref:`RDFramebufferPass[]` passes, :ref:`int` validate_with_format=-1, :ref:`int` view_count=1 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_format_create: -- :ref:`int` **framebuffer_format_create** **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`int` view_count=1 **)** +.. rst-class:: classref-method + +:ref:`int` **framebuffer_format_create** **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`int` view_count=1 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_format_create_empty: -- :ref:`int` **framebuffer_format_create_empty** **(** :ref:`TextureSamples` samples=0 **)** +.. rst-class:: classref-method + +:ref:`int` **framebuffer_format_create_empty** **(** :ref:`TextureSamples` samples=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_format_create_multipass: -- :ref:`int` **framebuffer_format_create_multipass** **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`RDFramebufferPass[]` passes, :ref:`int` view_count=1 **)** +.. rst-class:: classref-method + +:ref:`int` **framebuffer_format_create_multipass** **(** :ref:`RDAttachmentFormat[]` attachments, :ref:`RDFramebufferPass[]` passes, :ref:`int` view_count=1 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_format_get_texture_samples: -- :ref:`TextureSamples` **framebuffer_format_get_texture_samples** **(** :ref:`int` format, :ref:`int` render_pass=0 **)** +.. rst-class:: classref-method + +:ref:`TextureSamples` **framebuffer_format_get_texture_samples** **(** :ref:`int` format, :ref:`int` render_pass=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_get_format: -- :ref:`int` **framebuffer_get_format** **(** :ref:`RID` framebuffer **)** +.. rst-class:: classref-method + +:ref:`int` **framebuffer_get_format** **(** :ref:`RID` framebuffer **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_framebuffer_is_valid: -- :ref:`bool` **framebuffer_is_valid** **(** :ref:`RID` framebuffer **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **framebuffer_is_valid** **(** :ref:`RID` framebuffer **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_free_rid: -- void **free_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **free_rid** **(** :ref:`RID` rid **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_full_barrier: -- void **full_barrier** **(** **)** +.. rst-class:: classref-method + +void **full_barrier** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_captured_timestamp_cpu_time: -- :ref:`int` **get_captured_timestamp_cpu_time** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_captured_timestamp_cpu_time** **(** :ref:`int` index **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_captured_timestamp_gpu_time: -- :ref:`int` **get_captured_timestamp_gpu_time** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_captured_timestamp_gpu_time** **(** :ref:`int` index **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_captured_timestamp_name: -- :ref:`String` **get_captured_timestamp_name** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_captured_timestamp_name** **(** :ref:`int` index **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_captured_timestamps_count: -- :ref:`int` **get_captured_timestamps_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_captured_timestamps_count** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_captured_timestamps_frame: -- :ref:`int` **get_captured_timestamps_frame** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_captured_timestamps_frame** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_device_name: -- :ref:`String` **get_device_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_device_name** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_device_pipeline_cache_uuid: -- :ref:`String` **get_device_pipeline_cache_uuid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_device_pipeline_cache_uuid** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_device_vendor_name: -- :ref:`String` **get_device_vendor_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_device_vendor_name** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_driver_resource: -- :ref:`int` **get_driver_resource** **(** :ref:`DriverResource` resource, :ref:`RID` rid, :ref:`int` index **)** +.. rst-class:: classref-method + +:ref:`int` **get_driver_resource** **(** :ref:`DriverResource` resource, :ref:`RID` rid, :ref:`int` index **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_frame_delay: -- :ref:`int` **get_frame_delay** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_frame_delay** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_get_memory_usage: -- :ref:`int` **get_memory_usage** **(** :ref:`MemoryType` type **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_memory_usage** **(** :ref:`MemoryType` type **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_index_array_create: -- :ref:`RID` **index_array_create** **(** :ref:`RID` index_buffer, :ref:`int` index_offset, :ref:`int` index_count **)** +.. rst-class:: classref-method + +:ref:`RID` **index_array_create** **(** :ref:`RID` index_buffer, :ref:`int` index_offset, :ref:`int` index_count **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_index_buffer_create: -- :ref:`RID` **index_buffer_create** **(** :ref:`int` size_indices, :ref:`IndexBufferFormat` format, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_restart_indices=false **)** +.. rst-class:: classref-method + +:ref:`RID` **index_buffer_create** **(** :ref:`int` size_indices, :ref:`IndexBufferFormat` format, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_restart_indices=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_limit_get: -- :ref:`int` **limit_get** **(** :ref:`Limit` limit **)** |const| +.. rst-class:: classref-method + +:ref:`int` **limit_get** **(** :ref:`Limit` limit **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_render_pipeline_create: -- :ref:`RID` **render_pipeline_create** **(** :ref:`RID` shader, :ref:`int` framebuffer_format, :ref:`int` vertex_format, :ref:`RenderPrimitive` primitive, :ref:`RDPipelineRasterizationState` rasterization_state, :ref:`RDPipelineMultisampleState` multisample_state, :ref:`RDPipelineDepthStencilState` stencil_state, :ref:`RDPipelineColorBlendState` color_blend_state, :ref:`int` dynamic_state_flags=0, :ref:`int` for_render_pass=0, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** +.. rst-class:: classref-method + +:ref:`RID` **render_pipeline_create** **(** :ref:`RID` shader, :ref:`int` framebuffer_format, :ref:`int` vertex_format, :ref:`RenderPrimitive` primitive, :ref:`RDPipelineRasterizationState` rasterization_state, :ref:`RDPipelineMultisampleState` multisample_state, :ref:`RDPipelineDepthStencilState` stencil_state, :ref:`RDPipelineColorBlendState` color_blend_state, :ref:`int` dynamic_state_flags=0, :ref:`int` for_render_pass=0, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_render_pipeline_is_valid: -- :ref:`bool` **render_pipeline_is_valid** **(** :ref:`RID` render_pipeline **)** +.. rst-class:: classref-method + +:ref:`bool` **render_pipeline_is_valid** **(** :ref:`RID` render_pipeline **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_sampler_create: -- :ref:`RID` **sampler_create** **(** :ref:`RDSamplerState` state **)** +.. rst-class:: classref-method + +:ref:`RID` **sampler_create** **(** :ref:`RDSamplerState` state **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_screen_get_framebuffer_format: -- :ref:`int` **screen_get_framebuffer_format** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **screen_get_framebuffer_format** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_screen_get_height: -- :ref:`int` **screen_get_height** **(** :ref:`int` screen=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **screen_get_height** **(** :ref:`int` screen=0 **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_screen_get_width: -- :ref:`int` **screen_get_width** **(** :ref:`int` screen=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **screen_get_width** **(** :ref:`int` screen=0 **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_set_resource_name: -- void **set_resource_name** **(** :ref:`RID` id, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_resource_name** **(** :ref:`RID` id, :ref:`String` name **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_shader_compile_binary_from_spirv: -- :ref:`PackedByteArray` **shader_compile_binary_from_spirv** **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **shader_compile_binary_from_spirv** **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_shader_compile_spirv_from_source: -- :ref:`RDShaderSPIRV` **shader_compile_spirv_from_source** **(** :ref:`RDShaderSource` shader_source, :ref:`bool` allow_cache=true **)** +.. rst-class:: classref-method + +:ref:`RDShaderSPIRV` **shader_compile_spirv_from_source** **(** :ref:`RDShaderSource` shader_source, :ref:`bool` allow_cache=true **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_shader_create_from_bytecode: -- :ref:`RID` **shader_create_from_bytecode** **(** :ref:`PackedByteArray` binary_data **)** +.. rst-class:: classref-method + +:ref:`RID` **shader_create_from_bytecode** **(** :ref:`PackedByteArray` binary_data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_shader_create_from_spirv: -- :ref:`RID` **shader_create_from_spirv** **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** +.. rst-class:: classref-method + +:ref:`RID` **shader_create_from_spirv** **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_shader_get_vertex_input_attribute_mask: -- :ref:`int` **shader_get_vertex_input_attribute_mask** **(** :ref:`RID` shader **)** +.. rst-class:: classref-method + +:ref:`int` **shader_get_vertex_input_attribute_mask** **(** :ref:`RID` shader **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_storage_buffer_create: -- :ref:`RID` **storage_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`int` usage=0 **)** +.. rst-class:: classref-method + +:ref:`RID` **storage_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`int` usage=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_submit: -- void **submit** **(** **)** +.. rst-class:: classref-method + +void **submit** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_sync: -- void **sync** **(** **)** +.. rst-class:: classref-method + +void **sync** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_buffer_create: -- :ref:`RID` **texture_buffer_create** **(** :ref:`int` size_bytes, :ref:`DataFormat` format, :ref:`PackedByteArray` data=PackedByteArray() **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_buffer_create** **(** :ref:`int` size_bytes, :ref:`DataFormat` format, :ref:`PackedByteArray` data=PackedByteArray() **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_clear: -- :ref:`Error` **texture_clear** **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +:ref:`Error` **texture_clear** **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_copy: -- :ref:`Error` **texture_copy** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +:ref:`Error` **texture_copy** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_create: -- :ref:`RID` **texture_create** **(** :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`PackedByteArray[]` data=[] **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_create** **(** :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`PackedByteArray[]` data=[] **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_create_shared: -- :ref:`RID` **texture_create_shared** **(** :ref:`RDTextureView` view, :ref:`RID` with_texture **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_create_shared** **(** :ref:`RDTextureView` view, :ref:`RID` with_texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_create_shared_from_slice: -- :ref:`RID` **texture_create_shared_from_slice** **(** :ref:`RDTextureView` view, :ref:`RID` with_texture, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` mipmaps=1, :ref:`TextureSliceType` slice_type=0 **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_create_shared_from_slice** **(** :ref:`RDTextureView` view, :ref:`RID` with_texture, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` mipmaps=1, :ref:`TextureSliceType` slice_type=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_get_data: -- :ref:`PackedByteArray` **texture_get_data** **(** :ref:`RID` texture, :ref:`int` layer **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **texture_get_data** **(** :ref:`RID` texture, :ref:`int` layer **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_is_format_supported_for_usage: -- :ref:`bool` **texture_is_format_supported_for_usage** **(** :ref:`DataFormat` format, :ref:`int` usage_flags **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **texture_is_format_supported_for_usage** **(** :ref:`DataFormat` format, :ref:`TextureUsageBits` usage_flags **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_is_shared: -- :ref:`bool` **texture_is_shared** **(** :ref:`RID` texture **)** +.. rst-class:: classref-method + +:ref:`bool` **texture_is_shared** **(** :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_is_valid: -- :ref:`bool` **texture_is_valid** **(** :ref:`RID` texture **)** +.. rst-class:: classref-method + +:ref:`bool` **texture_is_valid** **(** :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_resolve_multisample: -- :ref:`Error` **texture_resolve_multisample** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +:ref:`Error` **texture_resolve_multisample** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_texture_update: -- :ref:`Error` **texture_update** **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, :ref:`int` post_barrier=7 **)** +.. rst-class:: classref-method + +:ref:`Error` **texture_update** **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, :ref:`BarrierMask` post_barrier=7 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_uniform_buffer_create: -- :ref:`RID` **uniform_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray() **)** +.. rst-class:: classref-method + +:ref:`RID` **uniform_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray() **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_uniform_set_create: -- :ref:`RID` **uniform_set_create** **(** :ref:`RDUniform[]` uniforms, :ref:`RID` shader, :ref:`int` shader_set **)** +.. rst-class:: classref-method + +:ref:`RID` **uniform_set_create** **(** :ref:`RDUniform[]` uniforms, :ref:`RID` shader, :ref:`int` shader_set **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_uniform_set_is_valid: -- :ref:`bool` **uniform_set_is_valid** **(** :ref:`RID` uniform_set **)** +.. rst-class:: classref-method + +:ref:`bool` **uniform_set_is_valid** **(** :ref:`RID` uniform_set **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_vertex_array_create: -- :ref:`RID` **vertex_array_create** **(** :ref:`int` vertex_count, :ref:`int` vertex_format, :ref:`RID[]` src_buffers **)** +.. rst-class:: classref-method -Creates a vertex array based on the specified buffers. +:ref:`RID` **vertex_array_create** **(** :ref:`int` vertex_count, :ref:`int` vertex_format, :ref:`RID[]` src_buffers, :ref:`PackedInt64Array` offsets=PackedInt64Array() **)** + +Creates a vertex array based on the specified buffers. Optionally, ``offsets`` (in bytes) may be defined for each buffer. + +.. rst-class:: classref-item-separator ---- .. _class_RenderingDevice_method_vertex_buffer_create: -- :ref:`RID` **vertex_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_as_storage=false **)** +.. rst-class:: classref-method + +:ref:`RID` **vertex_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), :ref:`bool` use_as_storage=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingDevice_method_vertex_format_create: -- :ref:`int` **vertex_format_create** **(** :ref:`RDVertexAttribute[]` vertex_descriptions **)** +.. rst-class:: classref-method + +:ref:`int` **vertex_format_create** **(** :ref:`RDVertexAttribute[]` vertex_descriptions **)** .. container:: contribute diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 2693b3dee..54720a296 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -14,6 +14,8 @@ RenderingServer Server for anything visible. +.. rst-class:: classref-introduction-group + Description ----------- @@ -35,3205 +37,5294 @@ In 3D, all visible objects are comprised of a resource and an instance. A resour In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. -\ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from ``RenderingServer`` will return dummy values in this case. +\ **Headless mode:** Starting the engine with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` disables all rendering and window management functions. Most functions from **RenderingServer** will return dummy values in this case. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Optimization using Servers <../tutorials/performance/using_servers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`render_loop_enabled` | -+-------------------------+--------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`render_loop_enabled` | + +-------------------------+--------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image[]` | :ref:`bake_render_uv2` **(** :ref:`RID` base, :ref:`RID[]` material_overrides, :ref:`Vector2i` image_size **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`camera_attributes_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_attributes_set_auto_exposure` **(** :ref:`RID` camera_attributes, :ref:`bool` enable, :ref:`float` min_sensitivity, :ref:`float` max_sensitivity, :ref:`float` speed, :ref:`float` scale **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_attributes_set_dof_blur` **(** :ref:`RID` camera_attributes, :ref:`bool` far_enable, :ref:`float` far_distance, :ref:`float` far_transition, :ref:`bool` near_enable, :ref:`float` near_distance, :ref:`float` near_transition, :ref:`float` amount **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_attributes_set_dof_blur_bokeh_shape` **(** :ref:`DOFBokehShape` shape **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_attributes_set_dof_blur_quality` **(** :ref:`DOFBlurQuality` quality, :ref:`bool` use_jitter **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_attributes_set_exposure` **(** :ref:`RID` camera_attributes, :ref:`float` multiplier, :ref:`float` normalization **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`camera_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_camera_attributes` **(** :ref:`RID` camera, :ref:`RID` effects **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_cull_mask` **(** :ref:`RID` camera, :ref:`int` layers **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_environment` **(** :ref:`RID` camera, :ref:`RID` env **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_frustum` **(** :ref:`RID` camera, :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_orthogonal` **(** :ref:`RID` camera, :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_perspective` **(** :ref:`RID` camera, :ref:`float` fovy_degrees, :ref:`float` z_near, :ref:`float` z_far **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_transform` **(** :ref:`RID` camera, :ref:`Transform3D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`camera_set_use_vertical_aspect` **(** :ref:`RID` camera, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_animation_slice` **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_circle` **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_clip_ignore` **(** :ref:`RID` item, :ref:`bool` ignore **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_lcd_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_mesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_msdf_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`float` px_range=1.0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_multimesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_nine_patch` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`NinePatchAxisMode` x_axis_mode=0, :ref:`NinePatchAxisMode` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_particles` **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_polygon` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_polyline` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_primitive` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_triangle_array` **(** :ref:`RID` item, :ref:`PackedInt32Array` indices, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedInt32Array` bones=PackedInt32Array(), :ref:`PackedFloat32Array` weights=PackedFloat32Array(), :ref:`RID` texture, :ref:`int` count=-1 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_clear` **(** :ref:`RID` item **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_item_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_canvas_group_mode` **(** :ref:`RID` item, :ref:`CanvasGroupMode` mode, :ref:`float` clear_margin=5.0, :ref:`bool` fit_empty=false, :ref:`float` fit_margin=0.0, :ref:`bool` blur_mipmaps=false **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_clip` **(** :ref:`RID` item, :ref:`bool` clip **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_copy_to_backbuffer` **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_custom_rect` **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_default_texture_filter` **(** :ref:`RID` item, :ref:`CanvasItemTextureFilter` filter **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_default_texture_repeat` **(** :ref:`RID` item, :ref:`CanvasItemTextureRepeat` repeat **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_distance_field_mode` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_draw_behind_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_draw_index` **(** :ref:`RID` item, :ref:`int` index **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_light_mask` **(** :ref:`RID` item, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_material` **(** :ref:`RID` item, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_parent` **(** :ref:`RID` item, :ref:`RID` parent **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_self_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_sort_children_by_y` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_use_parent_material` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_visibility_layer` **(** :ref:`RID` item, :ref:`int` visibility_layer **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_visibility_notifier` **(** :ref:`RID` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_visible` **(** :ref:`RID` item, :ref:`bool` visible **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_z_as_relative_to_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_set_z_index` **(** :ref:`RID` item, :ref:`int` z_index **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_attach_to_canvas` **(** :ref:`RID` light, :ref:`RID` canvas **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_light_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_attach_to_canvas` **(** :ref:`RID` occluder, :ref:`RID` canvas **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_light_occluder_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_as_sdf_collision` **(** :ref:`RID` occluder, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_enabled` **(** :ref:`RID` occluder, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_light_mask` **(** :ref:`RID` occluder, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_polygon` **(** :ref:`RID` occluder, :ref:`RID` polygon **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_occluder_set_transform` **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_energy` **(** :ref:`RID` light, :ref:`float` energy **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_height` **(** :ref:`RID` light, :ref:`float` height **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_item_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_item_shadow_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_layer_range` **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_mode` **(** :ref:`RID` light, :ref:`CanvasLightMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_color` **(** :ref:`RID` light, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_filter` **(** :ref:`RID` light, :ref:`CanvasLightShadowFilter` filter **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_shadow_smooth` **(** :ref:`RID` light, :ref:`float` smooth **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_texture` **(** :ref:`RID` light, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_texture_offset` **(** :ref:`RID` light, :ref:`Vector2` offset **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_texture_scale` **(** :ref:`RID` light, :ref:`float` scale **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_transform` **(** :ref:`RID` light, :ref:`Transform2D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_light_set_z_range` **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_occluder_polygon_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_occluder_polygon_set_cull_mode` **(** :ref:`RID` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_occluder_polygon_set_shape` **(** :ref:`RID` occluder_polygon, :ref:`PackedVector2Array` shape, :ref:`bool` closed **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_disable_scale` **(** :ref:`bool` disable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_item_mirroring` **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_modulate` **(** :ref:`RID` canvas, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_set_shadow_texture_size` **(** :ref:`int` size **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas_texture_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_channel` **(** :ref:`RID` canvas_texture, :ref:`CanvasTextureChannel` channel, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_shading_parameters` **(** :ref:`RID` canvas_texture, :ref:`Color` base_color, :ref:`float` shininess **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_texture_filter` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_texture_set_texture_repeat` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RenderingDevice` | :ref:`create_local_rendering_device` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`decal_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_albedo_mix` **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_cull_mask` **(** :ref:`RID` decal, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` length **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_emission_energy` **(** :ref:`RID` decal, :ref:`float` energy **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_extents` **(** :ref:`RID` decal, :ref:`Vector3` extents **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_fade` **(** :ref:`RID` decal, :ref:`float` above, :ref:`float` below **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_modulate` **(** :ref:`RID` decal, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_normal_fade` **(** :ref:`RID` decal, :ref:`float` fade **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decal_set_texture` **(** :ref:`RID` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`decals_set_filter` **(** :ref:`DecalFilter` filter **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`directional_light_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`directional_shadow_atlas_set_size` **(** :ref:`int` size, :ref:`bool` is_16bits **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`directional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`environment_bake_panorama` **(** :ref:`RID` environment, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`environment_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_glow_set_use_bicubic_upscale` **(** :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_glow_set_use_high_quality` **(** :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_adjustment` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation, :ref:`bool` use_1d_color_correction, :ref:`RID` color_correction **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ambient_light` **(** :ref:`RID` env, :ref:`Color` color, :ref:`EnvironmentAmbientSource` ambient=0, :ref:`float` energy=1.0, :ref:`float` sky_contibution=0.0, :ref:`EnvironmentReflectionSource` reflection_source=0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_background` **(** :ref:`RID` env, :ref:`EnvironmentBG` bg **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_bg_color` **(** :ref:`RID` env, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_bg_energy` **(** :ref:`RID` env, :ref:`float` multiplier, :ref:`float` exposure_value **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_canvas_max_layer` **(** :ref:`RID` env, :ref:`int` max_layer **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`Color` light_color, :ref:`float` light_energy, :ref:`float` sun_scatter, :ref:`float` density, :ref:`float` height, :ref:`float` height_density, :ref:`float` aerial_perspective, :ref:`float` sky_affect **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_glow` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`PackedFloat32Array` levels, :ref:`float` intensity, :ref:`float` strength, :ref:`float` mix, :ref:`float` bloom_threshold, :ref:`EnvironmentGlowBlendMode` blend_mode, :ref:`float` hdr_bleed_threshold, :ref:`float` hdr_bleed_scale, :ref:`float` hdr_luminance_cap, :ref:`float` glow_map_strength, :ref:`RID` glow_map **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` cascades, :ref:`float` min_cell_size, :ref:`EnvironmentSDFGIYScale` y_scale, :ref:`bool` use_occlusion, :ref:`float` bounce_feedback, :ref:`bool` read_sky, :ref:`float` energy, :ref:`float` normal_bias, :ref:`float` probe_bias **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi_frames_to_converge` **(** :ref:`EnvironmentSDFGIFramesToConverge` frames **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi_frames_to_update_light` **(** :ref:`EnvironmentSDFGIFramesToUpdateLight` frames **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sdfgi_ray_count` **(** :ref:`EnvironmentSDFGIRayCount` ray_count **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sky` **(** :ref:`RID` env, :ref:`RID` sky **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sky_custom_fov` **(** :ref:`RID` env, :ref:`float` scale **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_sky_orientation` **(** :ref:`RID` env, :ref:`Basis` orientation **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssao` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` radius, :ref:`float` intensity, :ref:`float` power, :ref:`float` detail, :ref:`float` horizon, :ref:`float` sharpness, :ref:`float` light_affect, :ref:`float` ao_channel_affect **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssao_quality` **(** :ref:`EnvironmentSSAOQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssil_quality` **(** :ref:`EnvironmentSSILQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssr` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` max_steps, :ref:`float` fade_in, :ref:`float` fade_out, :ref:`float` depth_tolerance **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_ssr_roughness_quality` **(** :ref:`EnvironmentSSRRoughnessQuality` quality **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_tonemap` **(** :ref:`RID` env, :ref:`EnvironmentToneMapper` tone_mapper, :ref:`float` exposure, :ref:`float` white **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_volumetric_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` density, :ref:`Color` albedo, :ref:`Color` emission, :ref:`float` emission_energy, :ref:`float` anisotropy, :ref:`float` length, :ref:`float` p_detail_spread, :ref:`float` gi_inject, :ref:`bool` temporal_reprojection, :ref:`float` temporal_reprojection_amount, :ref:`float` ambient_inject, :ref:`float` sky_affect **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_volumetric_fog_filter_active` **(** :ref:`bool` active **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`environment_set_volumetric_fog_volume_size` **(** :ref:`int` size, :ref:`int` depth **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`fog_volume_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fog_volume_set_extents` **(** :ref:`RID` fog_volume, :ref:`Vector3` extents **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fog_volume_set_material` **(** :ref:`RID` fog_volume, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fog_volume_set_shape` **(** :ref:`RID` fog_volume, :ref:`FogVolumeShape` shape **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_draw` **(** :ref:`bool` swap_buffers=true, :ref:`float` frame_step=0.0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_sync` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_frame_setup_time_cpu` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RenderingDevice` | :ref:`get_rendering_device` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_rendering_info` **(** :ref:`RenderingInfo` info **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_shader_parameter_list` **(** :ref:`RID` shader **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_test_cube` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_test_texture` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_adapter_api_version` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_adapter_name` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`DeviceType` | :ref:`get_video_adapter_type` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_adapter_vendor` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_white_texture` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`gi_set_use_half_resolution` **(** :ref:`bool` half_resolution **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_shader_parameter_add` **(** :ref:`StringName` name, :ref:`GlobalShaderParameterType` type, :ref:`Variant` default_value **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`global_shader_parameter_get` **(** :ref:`StringName` name **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`global_shader_parameter_get_list` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GlobalShaderParameterType` | :ref:`global_shader_parameter_get_type` **(** :ref:`StringName` name **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_shader_parameter_remove` **(** :ref:`StringName` name **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_shader_parameter_set` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_shader_parameter_set_override` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_changed` **(** **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_feature` **(** :ref:`Features` feature **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_os_feature` **(** :ref:`String` feature **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_attach_object_instance_id` **(** :ref:`RID` instance, :ref:`int` id **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_attach_skeleton` **(** :ref:`RID` instance, :ref:`RID` skeleton **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`instance_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`instance_create2` **(** :ref:`RID` base, :ref:`RID` scenario **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`instance_geometry_get_shader_parameter` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`instance_geometry_get_shader_parameter_default_value` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`instance_geometry_get_shader_parameter_list` **(** :ref:`RID` instance **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_cast_shadows_setting` **(** :ref:`RID` instance, :ref:`ShadowCastingSetting` shadow_casting_setting **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_flag` **(** :ref:`RID` instance, :ref:`InstanceFlags` flag, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_lightmap` **(** :ref:`RID` instance, :ref:`RID` lightmap, :ref:`Rect2` lightmap_uv_scale, :ref:`int` lightmap_slice **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_lod_bias` **(** :ref:`RID` instance, :ref:`float` lod_bias **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_material_overlay` **(** :ref:`RID` instance, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_material_override` **(** :ref:`RID` instance, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_shader_parameter` **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_transparency` **(** :ref:`RID` instance, :ref:`float` transparency **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_geometry_set_visibility_range` **(** :ref:`RID` instance, :ref:`float` min, :ref:`float` max, :ref:`float` min_margin, :ref:`float` max_margin, :ref:`VisibilityRangeFadeMode` fade_mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_base` **(** :ref:`RID` instance, :ref:`RID` base **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_blend_shape_weight` **(** :ref:`RID` instance, :ref:`int` shape, :ref:`float` weight **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_custom_aabb` **(** :ref:`RID` instance, :ref:`AABB` aabb **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_extra_visibility_margin` **(** :ref:`RID` instance, :ref:`float` margin **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_ignore_culling` **(** :ref:`RID` instance, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_layer_mask` **(** :ref:`RID` instance, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_scenario` **(** :ref:`RID` instance, :ref:`RID` scenario **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_surface_override_material` **(** :ref:`RID` instance, :ref:`int` surface, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_transform` **(** :ref:`RID` instance, :ref:`Transform3D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_visibility_parent` **(** :ref:`RID` instance, :ref:`RID` parent **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`instance_set_visible` **(** :ref:`RID` instance, :ref:`bool` visible **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`instances_cull_aabb` **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`instances_cull_convex` **(** :ref:`Plane[]` convex, :ref:`RID` scenario **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt64Array` | :ref:`instances_cull_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_directional_set_blend_splits` **(** :ref:`RID` light, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_directional_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightDirectionalShadowMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_directional_set_sky_mode` **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_omni_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightOmniShadowMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_projectors_set_filter` **(** :ref:`LightProjectorFilter` filter **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_bake_mode` **(** :ref:`RID` light, :ref:`LightBakeMode` bake_mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_max_sdfgi_cascade` **(** :ref:`RID` light, :ref:`int` cascade **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_negative` **(** :ref:`RID` light, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_param` **(** :ref:`RID` light, :ref:`LightParam` param, :ref:`float` value **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_projector` **(** :ref:`RID` light, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_reverse_cull_face_mode` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_set_shadow` **(** :ref:`RID` light, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`lightmap_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_bsp_tree` **(** :ref:`RID` lightmap **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`lightmap_get_probe_capture_points` **(** :ref:`RID` lightmap **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedColorArray` | :ref:`lightmap_get_probe_capture_sh` **(** :ref:`RID` lightmap **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_tetrahedra` **(** :ref:`RID` lightmap **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_baked_exposure_normalization` **(** :ref:`RID` lightmap, :ref:`float` baked_exposure **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_bounds` **(** :ref:`RID` lightmap, :ref:`AABB` bounds **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_capture_data` **(** :ref:`RID` lightmap, :ref:`PackedVector3Array` points, :ref:`PackedColorArray` point_sh, :ref:`PackedInt32Array` tetrahedra, :ref:`PackedInt32Array` bsp_tree **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_capture_update_speed` **(** :ref:`float` speed **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_probe_interior` **(** :ref:`RID` lightmap, :ref:`bool` interior **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`lightmap_set_textures` **(** :ref:`RID` lightmap, :ref:`RID` light, :ref:`bool` uses_sh **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`make_sphere_mesh` **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`material_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`material_get_param` **(** :ref:`RID` material, :ref:`StringName` parameter **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_next_pass` **(** :ref:`RID` material, :ref:`RID` next_material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_param` **(** :ref:`RID` material, :ref:`StringName` parameter, :ref:`Variant` value **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_render_priority` **(** :ref:`RID` material, :ref:`int` priority **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_shader` **(** :ref:`RID` shader_material, :ref:`RID` shader **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_add_surface` **(** :ref:`RID` mesh, :ref:`Dictionary` surface **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_add_surface_from_arrays` **(** :ref:`RID` mesh, :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_format=0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_clear` **(** :ref:`RID` mesh **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`mesh_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`mesh_create_from_surfaces` **(** :ref:`Dictionary[]` surfaces, :ref:`int` blend_shape_count=0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_get_blend_shape_count` **(** :ref:`RID` mesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`BlendShapeMode` | :ref:`mesh_get_blend_shape_mode` **(** :ref:`RID` mesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`mesh_get_custom_aabb` **(** :ref:`RID` mesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`mesh_get_surface` **(** :ref:`RID` mesh, :ref:`int` surface **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_get_surface_count` **(** :ref:`RID` mesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_set_blend_shape_mode` **(** :ref:`RID` mesh, :ref:`BlendShapeMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_set_custom_aabb` **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_set_shadow_mesh` **(** :ref:`RID` mesh, :ref:`RID` shadow_mesh **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`mesh_surface_get_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array[]` | :ref:`mesh_surface_get_blend_shape_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_attribute_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_offset` **(** :ref:`int` format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_skin_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`mesh_surface_get_format_vertex_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`mesh_surface_get_material` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_set_material` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_update_attribute_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_update_skin_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mesh_surface_update_vertex_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_allocate_data` **(** :ref:`RID` multimesh, :ref:`int` instances, :ref:`MultimeshTransformFormat` transform_format, :ref:`bool` color_format=false, :ref:`bool` custom_data_format=false **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`multimesh_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`multimesh_get_aabb` **(** :ref:`RID` multimesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`multimesh_get_buffer` **(** :ref:`RID` multimesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`multimesh_get_instance_count` **(** :ref:`RID` multimesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`multimesh_get_mesh` **(** :ref:`RID` multimesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`multimesh_get_visible_instances` **(** :ref:`RID` multimesh **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`multimesh_instance_get_color` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`multimesh_instance_get_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`multimesh_instance_get_transform` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`multimesh_instance_get_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_color` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` custom_data **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_transform` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform3D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_instance_set_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform2D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_set_buffer` **(** :ref:`RID` multimesh, :ref:`PackedFloat32Array` buffer **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_set_mesh` **(** :ref:`RID` multimesh, :ref:`RID` mesh **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`multimesh_set_visible_instances` **(** :ref:`RID` multimesh, :ref:`int` visible **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`occluder_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`occluder_set_mesh` **(** :ref:`RID` occluder, :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`omni_light_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`particles_collision_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_height_field_update` **(** :ref:`RID` particles_collision **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_attractor_attenuation` **(** :ref:`RID` particles_collision, :ref:`float` curve **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_attractor_directionality` **(** :ref:`RID` particles_collision, :ref:`float` amount **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_box_extents` **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_collision_type` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionType` type **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_cull_mask` **(** :ref:`RID` particles_collision, :ref:`int` mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_field_texture` **(** :ref:`RID` particles_collision, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_height_field_resolution` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution` resolution **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_collision_set_sphere_radius` **(** :ref:`RID` particles_collision, :ref:`float` radius **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`particles_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_emit` **(** :ref:`RID` particles, :ref:`Transform3D` transform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` emit_flags **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`particles_get_current_aabb` **(** :ref:`RID` particles **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`particles_get_emitting` **(** :ref:`RID` particles **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`particles_is_inactive` **(** :ref:`RID` particles **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_request_process` **(** :ref:`RID` particles **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_restart` **(** :ref:`RID` particles **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_amount` **(** :ref:`RID` particles, :ref:`int` amount **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_collision_base_size` **(** :ref:`RID` particles, :ref:`float` size **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_custom_aabb` **(** :ref:`RID` particles, :ref:`AABB` aabb **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_draw_order` **(** :ref:`RID` particles, :ref:`ParticlesDrawOrder` order **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_draw_pass_mesh` **(** :ref:`RID` particles, :ref:`int` pass, :ref:`RID` mesh **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_draw_passes` **(** :ref:`RID` particles, :ref:`int` count **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_emission_transform` **(** :ref:`RID` particles, :ref:`Transform3D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_emitting` **(** :ref:`RID` particles, :ref:`bool` emitting **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_explosiveness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_fixed_fps` **(** :ref:`RID` particles, :ref:`int` fps **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_fractional_delta` **(** :ref:`RID` particles, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_interpolate` **(** :ref:`RID` particles, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_lifetime` **(** :ref:`RID` particles, :ref:`float` lifetime **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_mode` **(** :ref:`RID` particles, :ref:`ParticlesMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_one_shot` **(** :ref:`RID` particles, :ref:`bool` one_shot **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_pre_process_time` **(** :ref:`RID` particles, :ref:`float` time **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_process_material` **(** :ref:`RID` particles, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_randomness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_speed_scale` **(** :ref:`RID` particles, :ref:`float` scale **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_subemitter` **(** :ref:`RID` particles, :ref:`RID` subemitter_particles **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_trail_bind_poses` **(** :ref:`RID` particles, :ref:`Transform3D[]` bind_poses **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_trails` **(** :ref:`RID` particles, :ref:`bool` enable, :ref:`float` length_sec **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_transform_align` **(** :ref:`RID` particles, :ref:`ParticlesTransformAlign` align **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`particles_set_use_local_coordinates` **(** :ref:`RID` particles, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`positional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`reflection_probe_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_ambient_color` **(** :ref:`RID` probe, :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_ambient_energy` **(** :ref:`RID` probe, :ref:`float` energy **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_ambient_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeAmbientMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_as_interior` **(** :ref:`RID` probe, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_cull_mask` **(** :ref:`RID` probe, :ref:`int` layers **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_enable_box_projection` **(** :ref:`RID` probe, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_enable_shadows` **(** :ref:`RID` probe, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_extents` **(** :ref:`RID` probe, :ref:`Vector3` extents **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_intensity` **(** :ref:`RID` probe, :ref:`float` intensity **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_max_distance` **(** :ref:`RID` probe, :ref:`float` distance **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_mesh_lod_threshold` **(** :ref:`RID` probe, :ref:`float` pixels **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_origin_offset` **(** :ref:`RID` probe, :ref:`Vector3` offset **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_resolution` **(** :ref:`RID` probe, :ref:`int` resolution **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reflection_probe_set_update_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeUpdateMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`request_frame_drawn_callback` **(** :ref:`Callable` callable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`scenario_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scenario_set_camera_attributes` **(** :ref:`RID` scenario, :ref:`RID` effects **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scenario_set_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scenario_set_fallback_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`screen_space_roughness_limiter_set_active` **(** :ref:`bool` enable, :ref:`float` amount, :ref:`float` limit **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_debug_generate_wireframes` **(** :ref:`bool` generate **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_clear_color` **(** :ref:`Color` color **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shader_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`shader_get_code` **(** :ref:`RID` shader **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shader_get_default_texture_parameter` **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`int` index=0 **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`shader_get_parameter_default` **(** :ref:`RID` shader, :ref:`StringName` name **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shader_set_code` **(** :ref:`RID` shader, :ref:`String` code **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shader_set_default_texture_parameter` **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`RID` texture, :ref:`int` index=0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shader_set_path_hint` **(** :ref:`RID` shader, :ref:`String` path **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_allocate_data` **(** :ref:`RID` skeleton, :ref:`int` bones, :ref:`bool` is_2d_skeleton=false **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`skeleton_bone_get_transform` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`skeleton_bone_get_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_bone_set_transform` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform3D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_bone_set_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform2D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`skeleton_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`skeleton_get_bone_count` **(** :ref:`RID` skeleton **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skeleton_set_base_transform_2d` **(** :ref:`RID` skeleton, :ref:`Transform2D` base_transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`sky_bake_panorama` **(** :ref:`RID` sky, :ref:`float` energy, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`sky_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sky_set_material` **(** :ref:`RID` sky, :ref:`RID` material **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sky_set_mode` **(** :ref:`RID` sky, :ref:`SkyMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sky_set_radiance_size` **(** :ref:`RID` sky, :ref:`int` radiance_size **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`spot_light_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sub_surface_scattering_set_quality` **(** :ref:`SubSurfaceScatteringQuality` quality **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sub_surface_scattering_set_scale` **(** :ref:`float` scale, :ref:`float` depth_scale **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_create` **(** :ref:`Image` image **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`texture_2d_get` **(** :ref:`RID` texture **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`texture_2d_layer_get` **(** :ref:`RID` texture, :ref:`int` layer **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_layered_create` **(** :ref:`Image[]` layers, :ref:`TextureLayeredType` layered_type **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_layered_placeholder_create` **(** :ref:`TextureLayeredType` layered_type **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_2d_placeholder_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_2d_update` **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` layer **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_3d_create` **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` mipmaps, :ref:`Image[]` data **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image[]` | :ref:`texture_3d_get` **(** :ref:`RID` texture **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_3d_placeholder_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_3d_update` **(** :ref:`RID` texture, :ref:`Image[]` data **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`texture_get_path` **(** :ref:`RID` texture **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_get_rd_texture` **(** :ref:`RID` texture, :ref:`bool` srgb=false **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_proxy_create` **(** :ref:`RID` base **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_proxy_update` **(** :ref:`RID` texture, :ref:`RID` proxy_to **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_replace` **(** :ref:`RID` texture, :ref:`RID` by_texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_force_redraw_if_visible` **(** :ref:`RID` texture, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_path` **(** :ref:`RID` texture, :ref:`String` path **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_size_override` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_attach_camera` **(** :ref:`RID` viewport, :ref:`RID` camera **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_attach_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_attach_to_screen` **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2(0, 0, 0, 0), :ref:`int` screen=0 **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`viewport_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`viewport_get_measured_render_time_cpu` **(** :ref:`RID` viewport **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`viewport_get_measured_render_time_gpu` **(** :ref:`RID` viewport **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`viewport_get_render_info` **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`viewport_get_texture` **(** :ref:`RID` viewport **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_remove_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_active` **(** :ref:`RID` viewport, :ref:`bool` active **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_canvas_cull_mask` **(** :ref:`RID` viewport, :ref:`int` canvas_cull_mask **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_canvas_stacking` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer, :ref:`int` sublayer **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_canvas_transform` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_clear_mode` **(** :ref:`RID` viewport, :ref:`ViewportClearMode` clear_mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_debug_draw` **(** :ref:`RID` viewport, :ref:`ViewportDebugDraw` draw **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_default_canvas_item_texture_filter` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureFilter` filter **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_default_canvas_item_texture_repeat` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureRepeat` repeat **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_disable_2d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_disable_3d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_disable_environment` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_fsr_sharpness` **(** :ref:`RID` viewport, :ref:`float` sharpness **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_global_canvas_transform` **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_measure_render_time` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_msaa_2d` **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_msaa_3d` **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_occlusion_culling_build_quality` **(** :ref:`ViewportOcclusionCullingBuildQuality` quality **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_occlusion_rays_per_thread` **(** :ref:`int` rays_per_thread **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_parent_viewport` **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_positional_shadow_atlas_quadrant_subdivision` **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_positional_shadow_atlas_size` **(** :ref:`RID` viewport, :ref:`int` size, :ref:`bool` use_16_bits=false **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_render_direct_to_screen` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_scaling_3d_mode` **(** :ref:`RID` viewport, :ref:`ViewportScaling3DMode` scaling_3d_mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_scaling_3d_scale` **(** :ref:`RID` viewport, :ref:`float` scale **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_scenario` **(** :ref:`RID` viewport, :ref:`RID` scenario **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_screen_space_aa` **(** :ref:`RID` viewport, :ref:`ViewportScreenSpaceAA` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_sdf_oversize_and_scale` **(** :ref:`RID` viewport, :ref:`ViewportSDFOversize` oversize, :ref:`ViewportSDFScale` scale **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_size` **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_snap_2d_transforms_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_snap_2d_vertices_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_texture_mipmap_bias` **(** :ref:`RID` viewport, :ref:`float` mipmap_bias **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_transparent_background` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_update_mode` **(** :ref:`RID` viewport, :ref:`ViewportUpdateMode` update_mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_debanding` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_occlusion_culling` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_taa` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_use_xr` **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_vrs_mode` **(** :ref:`RID` viewport, :ref:`ViewportVRSMode` mode **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`viewport_set_vrs_texture` **(** :ref:`RID` viewport, :ref:`RID` texture **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`visibility_notifier_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`visibility_notifier_set_aabb` **(** :ref:`RID` notifier, :ref:`AABB` aabb **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`visibility_notifier_set_callbacks` **(** :ref:`RID` notifier, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_allocate_data` **(** :ref:`RID` voxel_gi, :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3i` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`voxel_gi_create` **(** **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`voxel_gi_get_data_cells` **(** :ref:`RID` voxel_gi **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`voxel_gi_get_distance_field` **(** :ref:`RID` voxel_gi **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`voxel_gi_get_level_counts` **(** :ref:`RID` voxel_gi **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`voxel_gi_get_octree_cells` **(** :ref:`RID` voxel_gi **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`voxel_gi_get_octree_size` **(** :ref:`RID` voxel_gi **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`voxel_gi_get_to_cell_xform` **(** :ref:`RID` voxel_gi **)** |const| | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_baked_exposure_normalization` **(** :ref:`RID` voxel_gi, :ref:`float` baked_exposure **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_dynamic_range` **(** :ref:`RID` voxel_gi, :ref:`float` range **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_energy` **(** :ref:`RID` voxel_gi, :ref:`float` energy **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_interior` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_normal_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_propagation` **(** :ref:`RID` voxel_gi, :ref:`float` amount **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_quality` **(** :ref:`VoxelGIQuality` quality **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`voxel_gi_set_use_two_bounces` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | -+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`bake_render_uv2` **(** :ref:`RID` base, :ref:`RID[]` material_overrides, :ref:`Vector2i` image_size **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`camera_attributes_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_attributes_set_auto_exposure` **(** :ref:`RID` camera_attributes, :ref:`bool` enable, :ref:`float` min_sensitivity, :ref:`float` max_sensitivity, :ref:`float` speed, :ref:`float` scale **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_attributes_set_dof_blur` **(** :ref:`RID` camera_attributes, :ref:`bool` far_enable, :ref:`float` far_distance, :ref:`float` far_transition, :ref:`bool` near_enable, :ref:`float` near_distance, :ref:`float` near_transition, :ref:`float` amount **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_attributes_set_dof_blur_bokeh_shape` **(** :ref:`DOFBokehShape` shape **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_attributes_set_dof_blur_quality` **(** :ref:`DOFBlurQuality` quality, :ref:`bool` use_jitter **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_attributes_set_exposure` **(** :ref:`RID` camera_attributes, :ref:`float` multiplier, :ref:`float` normalization **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`camera_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_camera_attributes` **(** :ref:`RID` camera, :ref:`RID` effects **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_cull_mask` **(** :ref:`RID` camera, :ref:`int` layers **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_environment` **(** :ref:`RID` camera, :ref:`RID` env **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_frustum` **(** :ref:`RID` camera, :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_orthogonal` **(** :ref:`RID` camera, :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_perspective` **(** :ref:`RID` camera, :ref:`float` fovy_degrees, :ref:`float` z_near, :ref:`float` z_far **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_transform` **(** :ref:`RID` camera, :ref:`Transform3D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`camera_set_use_vertical_aspect` **(** :ref:`RID` camera, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`canvas_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_animation_slice` **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_circle` **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_clip_ignore` **(** :ref:`RID` item, :ref:`bool` ignore **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_lcd_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_mesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_msdf_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`float` px_range=1.0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_multimesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_nine_patch` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`NinePatchAxisMode` x_axis_mode=0, :ref:`NinePatchAxisMode` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_particles` **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_polygon` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_polyline` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_primitive` **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_add_triangle_array` **(** :ref:`RID` item, :ref:`PackedInt32Array` indices, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedInt32Array` bones=PackedInt32Array(), :ref:`PackedFloat32Array` weights=PackedFloat32Array(), :ref:`RID` texture, :ref:`int` count=-1 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_clear` **(** :ref:`RID` item **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`canvas_item_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_canvas_group_mode` **(** :ref:`RID` item, :ref:`CanvasGroupMode` mode, :ref:`float` clear_margin=5.0, :ref:`bool` fit_empty=false, :ref:`float` fit_margin=0.0, :ref:`bool` blur_mipmaps=false **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_clip` **(** :ref:`RID` item, :ref:`bool` clip **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_copy_to_backbuffer` **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_custom_rect` **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_default_texture_filter` **(** :ref:`RID` item, :ref:`CanvasItemTextureFilter` filter **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_default_texture_repeat` **(** :ref:`RID` item, :ref:`CanvasItemTextureRepeat` repeat **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_distance_field_mode` **(** :ref:`RID` item, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_draw_behind_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_draw_index` **(** :ref:`RID` item, :ref:`int` index **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_light_mask` **(** :ref:`RID` item, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_material` **(** :ref:`RID` item, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_parent` **(** :ref:`RID` item, :ref:`RID` parent **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_self_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_sort_children_by_y` **(** :ref:`RID` item, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_use_parent_material` **(** :ref:`RID` item, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_visibility_layer` **(** :ref:`RID` item, :ref:`int` visibility_layer **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_visibility_notifier` **(** :ref:`RID` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_visible` **(** :ref:`RID` item, :ref:`bool` visible **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_z_as_relative_to_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_item_set_z_index` **(** :ref:`RID` item, :ref:`int` z_index **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_attach_to_canvas` **(** :ref:`RID` light, :ref:`RID` canvas **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`canvas_light_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_occluder_attach_to_canvas` **(** :ref:`RID` occluder, :ref:`RID` canvas **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`canvas_light_occluder_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_occluder_set_as_sdf_collision` **(** :ref:`RID` occluder, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_occluder_set_enabled` **(** :ref:`RID` occluder, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_occluder_set_light_mask` **(** :ref:`RID` occluder, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_occluder_set_polygon` **(** :ref:`RID` occluder, :ref:`RID` polygon **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_occluder_set_transform` **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_energy` **(** :ref:`RID` light, :ref:`float` energy **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_height` **(** :ref:`RID` light, :ref:`float` height **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_item_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_item_shadow_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_layer_range` **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_mode` **(** :ref:`RID` light, :ref:`CanvasLightMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_shadow_color` **(** :ref:`RID` light, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_shadow_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_shadow_filter` **(** :ref:`RID` light, :ref:`CanvasLightShadowFilter` filter **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_shadow_smooth` **(** :ref:`RID` light, :ref:`float` smooth **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_texture` **(** :ref:`RID` light, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_texture_offset` **(** :ref:`RID` light, :ref:`Vector2` offset **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_texture_scale` **(** :ref:`RID` light, :ref:`float` scale **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_transform` **(** :ref:`RID` light, :ref:`Transform2D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_light_set_z_range` **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`canvas_occluder_polygon_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_occluder_polygon_set_cull_mode` **(** :ref:`RID` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_occluder_polygon_set_shape` **(** :ref:`RID` occluder_polygon, :ref:`PackedVector2Array` shape, :ref:`bool` closed **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_set_disable_scale` **(** :ref:`bool` disable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_set_item_mirroring` **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_set_modulate` **(** :ref:`RID` canvas, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_set_shadow_texture_size` **(** :ref:`int` size **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`canvas_texture_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_texture_set_channel` **(** :ref:`RID` canvas_texture, :ref:`CanvasTextureChannel` channel, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_texture_set_shading_parameters` **(** :ref:`RID` canvas_texture, :ref:`Color` base_color, :ref:`float` shininess **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_texture_set_texture_filter` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`canvas_texture_set_texture_repeat` **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderingDevice` | :ref:`create_local_rendering_device` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`decal_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_albedo_mix` **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_cull_mask` **(** :ref:`RID` decal, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` length **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_emission_energy` **(** :ref:`RID` decal, :ref:`float` energy **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_extents` **(** :ref:`RID` decal, :ref:`Vector3` extents **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_fade` **(** :ref:`RID` decal, :ref:`float` above, :ref:`float` below **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_modulate` **(** :ref:`RID` decal, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_normal_fade` **(** :ref:`RID` decal, :ref:`float` fade **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decal_set_texture` **(** :ref:`RID` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`decals_set_filter` **(** :ref:`DecalFilter` filter **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`directional_light_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`directional_shadow_atlas_set_size` **(** :ref:`int` size, :ref:`bool` is_16bits **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`directional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`environment_bake_panorama` **(** :ref:`RID` environment, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`environment_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_glow_set_use_bicubic_upscale` **(** :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_glow_set_use_high_quality` **(** :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_adjustment` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation, :ref:`bool` use_1d_color_correction, :ref:`RID` color_correction **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_ambient_light` **(** :ref:`RID` env, :ref:`Color` color, :ref:`EnvironmentAmbientSource` ambient=0, :ref:`float` energy=1.0, :ref:`float` sky_contibution=0.0, :ref:`EnvironmentReflectionSource` reflection_source=0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_background` **(** :ref:`RID` env, :ref:`EnvironmentBG` bg **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_bg_color` **(** :ref:`RID` env, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_bg_energy` **(** :ref:`RID` env, :ref:`float` multiplier, :ref:`float` exposure_value **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_canvas_max_layer` **(** :ref:`RID` env, :ref:`int` max_layer **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`Color` light_color, :ref:`float` light_energy, :ref:`float` sun_scatter, :ref:`float` density, :ref:`float` height, :ref:`float` height_density, :ref:`float` aerial_perspective, :ref:`float` sky_affect **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_glow` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`PackedFloat32Array` levels, :ref:`float` intensity, :ref:`float` strength, :ref:`float` mix, :ref:`float` bloom_threshold, :ref:`EnvironmentGlowBlendMode` blend_mode, :ref:`float` hdr_bleed_threshold, :ref:`float` hdr_bleed_scale, :ref:`float` hdr_luminance_cap, :ref:`float` glow_map_strength, :ref:`RID` glow_map **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_sdfgi` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` cascades, :ref:`float` min_cell_size, :ref:`EnvironmentSDFGIYScale` y_scale, :ref:`bool` use_occlusion, :ref:`float` bounce_feedback, :ref:`bool` read_sky, :ref:`float` energy, :ref:`float` normal_bias, :ref:`float` probe_bias **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_sdfgi_frames_to_converge` **(** :ref:`EnvironmentSDFGIFramesToConverge` frames **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_sdfgi_frames_to_update_light` **(** :ref:`EnvironmentSDFGIFramesToUpdateLight` frames **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_sdfgi_ray_count` **(** :ref:`EnvironmentSDFGIRayCount` ray_count **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_sky` **(** :ref:`RID` env, :ref:`RID` sky **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_sky_custom_fov` **(** :ref:`RID` env, :ref:`float` scale **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_sky_orientation` **(** :ref:`RID` env, :ref:`Basis` orientation **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_ssao` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` radius, :ref:`float` intensity, :ref:`float` power, :ref:`float` detail, :ref:`float` horizon, :ref:`float` sharpness, :ref:`float` light_affect, :ref:`float` ao_channel_affect **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_ssao_quality` **(** :ref:`EnvironmentSSAOQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_ssil_quality` **(** :ref:`EnvironmentSSILQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_ssr` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` max_steps, :ref:`float` fade_in, :ref:`float` fade_out, :ref:`float` depth_tolerance **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_ssr_roughness_quality` **(** :ref:`EnvironmentSSRRoughnessQuality` quality **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_tonemap` **(** :ref:`RID` env, :ref:`EnvironmentToneMapper` tone_mapper, :ref:`float` exposure, :ref:`float` white **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_volumetric_fog` **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` density, :ref:`Color` albedo, :ref:`Color` emission, :ref:`float` emission_energy, :ref:`float` anisotropy, :ref:`float` length, :ref:`float` p_detail_spread, :ref:`float` gi_inject, :ref:`bool` temporal_reprojection, :ref:`float` temporal_reprojection_amount, :ref:`float` ambient_inject, :ref:`float` sky_affect **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_volumetric_fog_filter_active` **(** :ref:`bool` active **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`environment_set_volumetric_fog_volume_size` **(** :ref:`int` size, :ref:`int` depth **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`fog_volume_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fog_volume_set_extents` **(** :ref:`RID` fog_volume, :ref:`Vector3` extents **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fog_volume_set_material` **(** :ref:`RID` fog_volume, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fog_volume_set_shape` **(** :ref:`RID` fog_volume, :ref:`FogVolumeShape` shape **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_draw` **(** :ref:`bool` swap_buffers=true, :ref:`float` frame_step=0.0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_sync` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_frame_setup_time_cpu` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderingDevice` | :ref:`get_rendering_device` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_rendering_info` **(** :ref:`RenderingInfo` info **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_shader_parameter_list` **(** :ref:`RID` shader **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_test_cube` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_test_texture` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_video_adapter_api_version` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_video_adapter_name` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`DeviceType` | :ref:`get_video_adapter_type` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_video_adapter_vendor` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_white_texture` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`gi_set_use_half_resolution` **(** :ref:`bool` half_resolution **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_shader_parameter_add` **(** :ref:`StringName` name, :ref:`GlobalShaderParameterType` type, :ref:`Variant` default_value **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`global_shader_parameter_get` **(** :ref:`StringName` name **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`global_shader_parameter_get_list` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GlobalShaderParameterType` | :ref:`global_shader_parameter_get_type` **(** :ref:`StringName` name **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_shader_parameter_remove` **(** :ref:`StringName` name **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_shader_parameter_set` **(** :ref:`StringName` name, :ref:`Variant` value **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_shader_parameter_set_override` **(** :ref:`StringName` name, :ref:`Variant` value **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_changed` **(** **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_feature` **(** :ref:`Features` feature **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_os_feature` **(** :ref:`String` feature **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_attach_object_instance_id` **(** :ref:`RID` instance, :ref:`int` id **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_attach_skeleton` **(** :ref:`RID` instance, :ref:`RID` skeleton **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`instance_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`instance_create2` **(** :ref:`RID` base, :ref:`RID` scenario **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`instance_geometry_get_shader_parameter` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`instance_geometry_get_shader_parameter_default_value` **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`instance_geometry_get_shader_parameter_list` **(** :ref:`RID` instance **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_cast_shadows_setting` **(** :ref:`RID` instance, :ref:`ShadowCastingSetting` shadow_casting_setting **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_flag` **(** :ref:`RID` instance, :ref:`InstanceFlags` flag, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_lightmap` **(** :ref:`RID` instance, :ref:`RID` lightmap, :ref:`Rect2` lightmap_uv_scale, :ref:`int` lightmap_slice **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_lod_bias` **(** :ref:`RID` instance, :ref:`float` lod_bias **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_material_overlay` **(** :ref:`RID` instance, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_material_override` **(** :ref:`RID` instance, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_shader_parameter` **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_transparency` **(** :ref:`RID` instance, :ref:`float` transparency **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_geometry_set_visibility_range` **(** :ref:`RID` instance, :ref:`float` min, :ref:`float` max, :ref:`float` min_margin, :ref:`float` max_margin, :ref:`VisibilityRangeFadeMode` fade_mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_base` **(** :ref:`RID` instance, :ref:`RID` base **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_blend_shape_weight` **(** :ref:`RID` instance, :ref:`int` shape, :ref:`float` weight **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_custom_aabb` **(** :ref:`RID` instance, :ref:`AABB` aabb **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_extra_visibility_margin` **(** :ref:`RID` instance, :ref:`float` margin **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_ignore_culling` **(** :ref:`RID` instance, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_layer_mask` **(** :ref:`RID` instance, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_scenario` **(** :ref:`RID` instance, :ref:`RID` scenario **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_surface_override_material` **(** :ref:`RID` instance, :ref:`int` surface, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_transform` **(** :ref:`RID` instance, :ref:`Transform3D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_visibility_parent` **(** :ref:`RID` instance, :ref:`RID` parent **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_visible` **(** :ref:`RID` instance, :ref:`bool` visible **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`instances_cull_aabb` **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`instances_cull_convex` **(** :ref:`Plane[]` convex, :ref:`RID` scenario **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`instances_cull_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_directional_set_blend_splits` **(** :ref:`RID` light, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_directional_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightDirectionalShadowMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_directional_set_sky_mode` **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_omni_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightOmniShadowMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_projectors_set_filter` **(** :ref:`LightProjectorFilter` filter **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_bake_mode` **(** :ref:`RID` light, :ref:`LightBakeMode` bake_mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_distance_fade` **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_max_sdfgi_cascade` **(** :ref:`RID` light, :ref:`int` cascade **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_negative` **(** :ref:`RID` light, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_param` **(** :ref:`RID` light, :ref:`LightParam` param, :ref:`float` value **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_projector` **(** :ref:`RID` light, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_reverse_cull_face_mode` **(** :ref:`RID` light, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`light_set_shadow` **(** :ref:`RID` light, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`lightmap_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_bsp_tree` **(** :ref:`RID` lightmap **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`lightmap_get_probe_capture_points` **(** :ref:`RID` lightmap **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`lightmap_get_probe_capture_sh` **(** :ref:`RID` lightmap **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`lightmap_get_probe_capture_tetrahedra` **(** :ref:`RID` lightmap **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`lightmap_set_baked_exposure_normalization` **(** :ref:`RID` lightmap, :ref:`float` baked_exposure **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`lightmap_set_probe_bounds` **(** :ref:`RID` lightmap, :ref:`AABB` bounds **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`lightmap_set_probe_capture_data` **(** :ref:`RID` lightmap, :ref:`PackedVector3Array` points, :ref:`PackedColorArray` point_sh, :ref:`PackedInt32Array` tetrahedra, :ref:`PackedInt32Array` bsp_tree **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`lightmap_set_probe_capture_update_speed` **(** :ref:`float` speed **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`lightmap_set_probe_interior` **(** :ref:`RID` lightmap, :ref:`bool` interior **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`lightmap_set_textures` **(** :ref:`RID` lightmap, :ref:`RID` light, :ref:`bool` uses_sh **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`make_sphere_mesh` **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`material_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`material_get_param` **(** :ref:`RID` material, :ref:`StringName` parameter **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`material_set_next_pass` **(** :ref:`RID` material, :ref:`RID` next_material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`material_set_param` **(** :ref:`RID` material, :ref:`StringName` parameter, :ref:`Variant` value **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`material_set_render_priority` **(** :ref:`RID` material, :ref:`int` priority **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`material_set_shader` **(** :ref:`RID` shader_material, :ref:`RID` shader **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_add_surface` **(** :ref:`RID` mesh, :ref:`Dictionary` surface **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_add_surface_from_arrays` **(** :ref:`RID` mesh, :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_format=0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_clear` **(** :ref:`RID` mesh **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`mesh_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`mesh_create_from_surfaces` **(** :ref:`Dictionary[]` surfaces, :ref:`int` blend_shape_count=0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mesh_get_blend_shape_count` **(** :ref:`RID` mesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BlendShapeMode` | :ref:`mesh_get_blend_shape_mode` **(** :ref:`RID` mesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`mesh_get_custom_aabb` **(** :ref:`RID` mesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`mesh_get_surface` **(** :ref:`RID` mesh, :ref:`int` surface **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mesh_get_surface_count` **(** :ref:`RID` mesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_set_blend_shape_mode` **(** :ref:`RID` mesh, :ref:`BlendShapeMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_set_custom_aabb` **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_set_shadow_mesh` **(** :ref:`RID` mesh, :ref:`RID` shadow_mesh **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`mesh_surface_get_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array[]` | :ref:`mesh_surface_get_blend_shape_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mesh_surface_get_format_attribute_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mesh_surface_get_format_offset` **(** :ref:`int` format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mesh_surface_get_format_skin_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mesh_surface_get_format_vertex_stride` **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`mesh_surface_get_material` **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_surface_set_material` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_surface_update_attribute_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_surface_update_skin_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`mesh_surface_update_vertex_region` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_allocate_data` **(** :ref:`RID` multimesh, :ref:`int` instances, :ref:`MultimeshTransformFormat` transform_format, :ref:`bool` color_format=false, :ref:`bool` custom_data_format=false **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`multimesh_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`multimesh_get_aabb` **(** :ref:`RID` multimesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`multimesh_get_buffer` **(** :ref:`RID` multimesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`multimesh_get_instance_count` **(** :ref:`RID` multimesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`multimesh_get_mesh` **(** :ref:`RID` multimesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`multimesh_get_visible_instances` **(** :ref:`RID` multimesh **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`multimesh_instance_get_color` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`multimesh_instance_get_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`multimesh_instance_get_transform` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`multimesh_instance_get_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_instance_set_color` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_instance_set_custom_data` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` custom_data **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_instance_set_transform` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform3D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_instance_set_transform_2d` **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform2D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_set_buffer` **(** :ref:`RID` multimesh, :ref:`PackedFloat32Array` buffer **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_set_mesh` **(** :ref:`RID` multimesh, :ref:`RID` mesh **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`multimesh_set_visible_instances` **(** :ref:`RID` multimesh, :ref:`int` visible **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`occluder_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`occluder_set_mesh` **(** :ref:`RID` occluder, :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`omni_light_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`particles_collision_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_height_field_update` **(** :ref:`RID` particles_collision **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_attractor_attenuation` **(** :ref:`RID` particles_collision, :ref:`float` curve **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_attractor_directionality` **(** :ref:`RID` particles_collision, :ref:`float` amount **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_box_extents` **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_collision_type` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionType` type **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_cull_mask` **(** :ref:`RID` particles_collision, :ref:`int` mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_field_texture` **(** :ref:`RID` particles_collision, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_height_field_resolution` **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution` resolution **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_collision_set_sphere_radius` **(** :ref:`RID` particles_collision, :ref:`float` radius **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`particles_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_emit` **(** :ref:`RID` particles, :ref:`Transform3D` transform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` emit_flags **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`particles_get_current_aabb` **(** :ref:`RID` particles **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`particles_get_emitting` **(** :ref:`RID` particles **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`particles_is_inactive` **(** :ref:`RID` particles **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_request_process` **(** :ref:`RID` particles **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_restart` **(** :ref:`RID` particles **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_amount` **(** :ref:`RID` particles, :ref:`int` amount **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_collision_base_size` **(** :ref:`RID` particles, :ref:`float` size **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_custom_aabb` **(** :ref:`RID` particles, :ref:`AABB` aabb **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_draw_order` **(** :ref:`RID` particles, :ref:`ParticlesDrawOrder` order **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_draw_pass_mesh` **(** :ref:`RID` particles, :ref:`int` pass, :ref:`RID` mesh **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_draw_passes` **(** :ref:`RID` particles, :ref:`int` count **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_emission_transform` **(** :ref:`RID` particles, :ref:`Transform3D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_emitting` **(** :ref:`RID` particles, :ref:`bool` emitting **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_explosiveness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_fixed_fps` **(** :ref:`RID` particles, :ref:`int` fps **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_fractional_delta` **(** :ref:`RID` particles, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_interpolate` **(** :ref:`RID` particles, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_lifetime` **(** :ref:`RID` particles, :ref:`float` lifetime **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_mode` **(** :ref:`RID` particles, :ref:`ParticlesMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_one_shot` **(** :ref:`RID` particles, :ref:`bool` one_shot **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_pre_process_time` **(** :ref:`RID` particles, :ref:`float` time **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_process_material` **(** :ref:`RID` particles, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_randomness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_speed_scale` **(** :ref:`RID` particles, :ref:`float` scale **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_subemitter` **(** :ref:`RID` particles, :ref:`RID` subemitter_particles **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_trail_bind_poses` **(** :ref:`RID` particles, :ref:`Transform3D[]` bind_poses **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_trails` **(** :ref:`RID` particles, :ref:`bool` enable, :ref:`float` length_sec **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_transform_align` **(** :ref:`RID` particles, :ref:`ParticlesTransformAlign` align **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_use_local_coordinates` **(** :ref:`RID` particles, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`positional_soft_shadow_filter_set_quality` **(** :ref:`ShadowQuality` quality **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`reflection_probe_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_ambient_color` **(** :ref:`RID` probe, :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_ambient_energy` **(** :ref:`RID` probe, :ref:`float` energy **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_ambient_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeAmbientMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_as_interior` **(** :ref:`RID` probe, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_cull_mask` **(** :ref:`RID` probe, :ref:`int` layers **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_enable_box_projection` **(** :ref:`RID` probe, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_enable_shadows` **(** :ref:`RID` probe, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_extents` **(** :ref:`RID` probe, :ref:`Vector3` extents **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_intensity` **(** :ref:`RID` probe, :ref:`float` intensity **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_max_distance` **(** :ref:`RID` probe, :ref:`float` distance **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_mesh_lod_threshold` **(** :ref:`RID` probe, :ref:`float` pixels **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_origin_offset` **(** :ref:`RID` probe, :ref:`Vector3` offset **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_resolution` **(** :ref:`RID` probe, :ref:`int` resolution **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reflection_probe_set_update_mode` **(** :ref:`RID` probe, :ref:`ReflectionProbeUpdateMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_frame_drawn_callback` **(** :ref:`Callable` callable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`scenario_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scenario_set_camera_attributes` **(** :ref:`RID` scenario, :ref:`RID` effects **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scenario_set_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scenario_set_fallback_environment` **(** :ref:`RID` scenario, :ref:`RID` environment **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`screen_space_roughness_limiter_set_active` **(** :ref:`bool` enable, :ref:`float` amount, :ref:`float` limit **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_debug_generate_wireframes` **(** :ref:`bool` generate **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_clear_color` **(** :ref:`Color` color **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`shader_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`shader_get_code` **(** :ref:`RID` shader **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`shader_get_default_texture_parameter` **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`int` index=0 **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`shader_get_parameter_default` **(** :ref:`RID` shader, :ref:`StringName` name **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shader_set_code` **(** :ref:`RID` shader, :ref:`String` code **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shader_set_default_texture_parameter` **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`RID` texture, :ref:`int` index=0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shader_set_path_hint` **(** :ref:`RID` shader, :ref:`String` path **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`skeleton_allocate_data` **(** :ref:`RID` skeleton, :ref:`int` bones, :ref:`bool` is_2d_skeleton=false **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`skeleton_bone_get_transform` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`skeleton_bone_get_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`skeleton_bone_set_transform` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform3D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`skeleton_bone_set_transform_2d` **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform2D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`skeleton_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`skeleton_get_bone_count` **(** :ref:`RID` skeleton **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`skeleton_set_base_transform_2d` **(** :ref:`RID` skeleton, :ref:`Transform2D` base_transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`sky_bake_panorama` **(** :ref:`RID` sky, :ref:`float` energy, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`sky_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sky_set_material` **(** :ref:`RID` sky, :ref:`RID` material **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sky_set_mode` **(** :ref:`RID` sky, :ref:`SkyMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sky_set_radiance_size` **(** :ref:`RID` sky, :ref:`int` radiance_size **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`spot_light_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sub_surface_scattering_set_quality` **(** :ref:`SubSurfaceScatteringQuality` quality **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`sub_surface_scattering_set_scale` **(** :ref:`float` scale, :ref:`float` depth_scale **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_2d_create` **(** :ref:`Image` image **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`texture_2d_get` **(** :ref:`RID` texture **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`texture_2d_layer_get` **(** :ref:`RID` texture, :ref:`int` layer **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_2d_layered_create` **(** :ref:`Image[]` layers, :ref:`TextureLayeredType` layered_type **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_2d_layered_placeholder_create` **(** :ref:`TextureLayeredType` layered_type **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_2d_placeholder_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`texture_2d_update` **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` layer **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_3d_create` **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` mipmaps, :ref:`Image[]` data **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`texture_3d_get` **(** :ref:`RID` texture **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_3d_placeholder_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`texture_3d_update` **(** :ref:`RID` texture, :ref:`Image[]` data **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`texture_get_path` **(** :ref:`RID` texture **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_get_rd_texture` **(** :ref:`RID` texture, :ref:`bool` srgb=false **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_proxy_create` **(** :ref:`RID` base **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`texture_proxy_update` **(** :ref:`RID` texture, :ref:`RID` proxy_to **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`texture_replace` **(** :ref:`RID` texture, :ref:`RID` by_texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`texture_set_force_redraw_if_visible` **(** :ref:`RID` texture, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`texture_set_path` **(** :ref:`RID` texture, :ref:`String` path **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`texture_set_size_override` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_attach_camera` **(** :ref:`RID` viewport, :ref:`RID` camera **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_attach_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_attach_to_screen` **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2(0, 0, 0, 0), :ref:`int` screen=0 **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`viewport_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`viewport_get_measured_render_time_cpu` **(** :ref:`RID` viewport **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`viewport_get_measured_render_time_gpu` **(** :ref:`RID` viewport **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`viewport_get_render_info` **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`viewport_get_texture` **(** :ref:`RID` viewport **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_remove_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_active` **(** :ref:`RID` viewport, :ref:`bool` active **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_canvas_cull_mask` **(** :ref:`RID` viewport, :ref:`int` canvas_cull_mask **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_canvas_stacking` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer, :ref:`int` sublayer **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_canvas_transform` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_clear_mode` **(** :ref:`RID` viewport, :ref:`ViewportClearMode` clear_mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_debug_draw` **(** :ref:`RID` viewport, :ref:`ViewportDebugDraw` draw **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_default_canvas_item_texture_filter` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureFilter` filter **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_default_canvas_item_texture_repeat` **(** :ref:`RID` viewport, :ref:`CanvasItemTextureRepeat` repeat **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_disable_2d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_disable_3d` **(** :ref:`RID` viewport, :ref:`bool` disable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_disable_environment` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_fsr_sharpness` **(** :ref:`RID` viewport, :ref:`float` sharpness **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_global_canvas_transform` **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_measure_render_time` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_msaa_2d` **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_msaa_3d` **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_occlusion_culling_build_quality` **(** :ref:`ViewportOcclusionCullingBuildQuality` quality **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_occlusion_rays_per_thread` **(** :ref:`int` rays_per_thread **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_parent_viewport` **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_positional_shadow_atlas_quadrant_subdivision` **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_positional_shadow_atlas_size` **(** :ref:`RID` viewport, :ref:`int` size, :ref:`bool` use_16_bits=false **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_render_direct_to_screen` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_scaling_3d_mode` **(** :ref:`RID` viewport, :ref:`ViewportScaling3DMode` scaling_3d_mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_scaling_3d_scale` **(** :ref:`RID` viewport, :ref:`float` scale **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_scenario` **(** :ref:`RID` viewport, :ref:`RID` scenario **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_screen_space_aa` **(** :ref:`RID` viewport, :ref:`ViewportScreenSpaceAA` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_sdf_oversize_and_scale` **(** :ref:`RID` viewport, :ref:`ViewportSDFOversize` oversize, :ref:`ViewportSDFScale` scale **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_size` **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_snap_2d_transforms_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_snap_2d_vertices_to_pixel` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_texture_mipmap_bias` **(** :ref:`RID` viewport, :ref:`float` mipmap_bias **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_transparent_background` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_update_mode` **(** :ref:`RID` viewport, :ref:`ViewportUpdateMode` update_mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_use_debanding` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_use_occlusion_culling` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_use_taa` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_use_xr` **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_vrs_mode` **(** :ref:`RID` viewport, :ref:`ViewportVRSMode` mode **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_vrs_texture` **(** :ref:`RID` viewport, :ref:`RID` texture **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`visibility_notifier_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`visibility_notifier_set_aabb` **(** :ref:`RID` notifier, :ref:`AABB` aabb **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`visibility_notifier_set_callbacks` **(** :ref:`RID` notifier, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_allocate_data` **(** :ref:`RID` voxel_gi, :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3i` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`voxel_gi_create` **(** **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`voxel_gi_get_data_cells` **(** :ref:`RID` voxel_gi **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`voxel_gi_get_distance_field` **(** :ref:`RID` voxel_gi **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`voxel_gi_get_level_counts` **(** :ref:`RID` voxel_gi **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`voxel_gi_get_octree_cells` **(** :ref:`RID` voxel_gi **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`voxel_gi_get_octree_size` **(** :ref:`RID` voxel_gi **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`voxel_gi_get_to_cell_xform` **(** :ref:`RID` voxel_gi **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_baked_exposure_normalization` **(** :ref:`RID` voxel_gi, :ref:`float` baked_exposure **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_dynamic_range` **(** :ref:`RID` voxel_gi, :ref:`float` range **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_energy` **(** :ref:`RID` voxel_gi, :ref:`float` energy **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_interior` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_normal_bias` **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_propagation` **(** :ref:`RID` voxel_gi, :ref:`float` amount **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_quality` **(** :ref:`VoxelGIQuality` quality **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`voxel_gi_set_use_two_bounces` **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_RenderingServer_signal_frame_post_draw: -- **frame_post_draw** **(** **)** +.. rst-class:: classref-signal + +**frame_post_draw** **(** **)** Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_signal_frame_pre_draw: -- **frame_pre_draw** **(** **)** +.. rst-class:: classref-signal + +**frame_pre_draw** **(** **)** Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_RenderingServer_TextureLayeredType: -.. _class_RenderingServer_constant_TEXTURE_LAYERED_2D_ARRAY: - -.. _class_RenderingServer_constant_TEXTURE_LAYERED_CUBEMAP: - -.. _class_RenderingServer_constant_TEXTURE_LAYERED_CUBEMAP_ARRAY: +.. rst-class:: classref-enumeration enum **TextureLayeredType**: -- **TEXTURE_LAYERED_2D_ARRAY** = **0** +.. _class_RenderingServer_constant_TEXTURE_LAYERED_2D_ARRAY: -- **TEXTURE_LAYERED_CUBEMAP** = **1** +.. rst-class:: classref-enumeration-constant -- **TEXTURE_LAYERED_CUBEMAP_ARRAY** = **2** +:ref:`TextureLayeredType` **TEXTURE_LAYERED_2D_ARRAY** = ``0`` + + + +.. _class_RenderingServer_constant_TEXTURE_LAYERED_CUBEMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureLayeredType` **TEXTURE_LAYERED_CUBEMAP** = ``1`` + + + +.. _class_RenderingServer_constant_TEXTURE_LAYERED_CUBEMAP_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureLayeredType` **TEXTURE_LAYERED_CUBEMAP_ARRAY** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CubeMapLayer: -.. _class_RenderingServer_constant_CUBEMAP_LAYER_LEFT: - -.. _class_RenderingServer_constant_CUBEMAP_LAYER_RIGHT: - -.. _class_RenderingServer_constant_CUBEMAP_LAYER_BOTTOM: - -.. _class_RenderingServer_constant_CUBEMAP_LAYER_TOP: - -.. _class_RenderingServer_constant_CUBEMAP_LAYER_FRONT: - -.. _class_RenderingServer_constant_CUBEMAP_LAYER_BACK: +.. rst-class:: classref-enumeration enum **CubeMapLayer**: -- **CUBEMAP_LAYER_LEFT** = **0** +.. _class_RenderingServer_constant_CUBEMAP_LAYER_LEFT: -- **CUBEMAP_LAYER_RIGHT** = **1** +.. rst-class:: classref-enumeration-constant -- **CUBEMAP_LAYER_BOTTOM** = **2** +:ref:`CubeMapLayer` **CUBEMAP_LAYER_LEFT** = ``0`` -- **CUBEMAP_LAYER_TOP** = **3** -- **CUBEMAP_LAYER_FRONT** = **4** -- **CUBEMAP_LAYER_BACK** = **5** +.. _class_RenderingServer_constant_CUBEMAP_LAYER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CubeMapLayer` **CUBEMAP_LAYER_RIGHT** = ``1`` + + + +.. _class_RenderingServer_constant_CUBEMAP_LAYER_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CubeMapLayer` **CUBEMAP_LAYER_BOTTOM** = ``2`` + + + +.. _class_RenderingServer_constant_CUBEMAP_LAYER_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CubeMapLayer` **CUBEMAP_LAYER_TOP** = ``3`` + + + +.. _class_RenderingServer_constant_CUBEMAP_LAYER_FRONT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CubeMapLayer` **CUBEMAP_LAYER_FRONT** = ``4`` + + + +.. _class_RenderingServer_constant_CUBEMAP_LAYER_BACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`CubeMapLayer` **CUBEMAP_LAYER_BACK** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ShaderMode: -.. _class_RenderingServer_constant_SHADER_SPATIAL: - -.. _class_RenderingServer_constant_SHADER_CANVAS_ITEM: - -.. _class_RenderingServer_constant_SHADER_PARTICLES: - -.. _class_RenderingServer_constant_SHADER_SKY: - -.. _class_RenderingServer_constant_SHADER_FOG: - -.. _class_RenderingServer_constant_SHADER_MAX: +.. rst-class:: classref-enumeration enum **ShaderMode**: -- **SHADER_SPATIAL** = **0** --- Shader is a 3D shader. +.. _class_RenderingServer_constant_SHADER_SPATIAL: -- **SHADER_CANVAS_ITEM** = **1** --- Shader is a 2D shader. +.. rst-class:: classref-enumeration-constant -- **SHADER_PARTICLES** = **2** --- Shader is a particle shader. +:ref:`ShaderMode` **SHADER_SPATIAL** = ``0`` -- **SHADER_SKY** = **3** --- Shader is a sky shader. +Shader is a 3D shader. -- **SHADER_FOG** = **4** --- Shader is a fog shader. +.. _class_RenderingServer_constant_SHADER_CANVAS_ITEM: -- **SHADER_MAX** = **5** --- Represents the size of the :ref:`ShaderMode` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderMode` **SHADER_CANVAS_ITEM** = ``1`` + +Shader is a 2D shader. + +.. _class_RenderingServer_constant_SHADER_PARTICLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderMode` **SHADER_PARTICLES** = ``2`` + +Shader is a particle shader. + +.. _class_RenderingServer_constant_SHADER_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderMode` **SHADER_SKY** = ``3`` + +Shader is a sky shader. + +.. _class_RenderingServer_constant_SHADER_FOG: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderMode` **SHADER_FOG** = ``4`` + +Shader is a fog shader. + +.. _class_RenderingServer_constant_SHADER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShaderMode` **SHADER_MAX** = ``5`` + +Represents the size of the :ref:`ShaderMode` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ArrayType: -.. _class_RenderingServer_constant_ARRAY_VERTEX: - -.. _class_RenderingServer_constant_ARRAY_NORMAL: - -.. _class_RenderingServer_constant_ARRAY_TANGENT: - -.. _class_RenderingServer_constant_ARRAY_COLOR: - -.. _class_RenderingServer_constant_ARRAY_TEX_UV: - -.. _class_RenderingServer_constant_ARRAY_TEX_UV2: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM0: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM1: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM2: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM3: - -.. _class_RenderingServer_constant_ARRAY_BONES: - -.. _class_RenderingServer_constant_ARRAY_WEIGHTS: - -.. _class_RenderingServer_constant_ARRAY_INDEX: - -.. _class_RenderingServer_constant_ARRAY_MAX: +.. rst-class:: classref-enumeration enum **ArrayType**: -- **ARRAY_VERTEX** = **0** --- Array is a vertex array. +.. _class_RenderingServer_constant_ARRAY_VERTEX: -- **ARRAY_NORMAL** = **1** --- Array is a normal array. +.. rst-class:: classref-enumeration-constant -- **ARRAY_TANGENT** = **2** --- Array is a tangent array. +:ref:`ArrayType` **ARRAY_VERTEX** = ``0`` -- **ARRAY_COLOR** = **3** --- Array is a color array. +Array is a vertex array. -- **ARRAY_TEX_UV** = **4** --- Array is an UV coordinates array. +.. _class_RenderingServer_constant_ARRAY_NORMAL: -- **ARRAY_TEX_UV2** = **5** --- Array is an UV coordinates array for the second UV coordinates. +.. rst-class:: classref-enumeration-constant -- **ARRAY_CUSTOM0** = **6** +:ref:`ArrayType` **ARRAY_NORMAL** = ``1`` -- **ARRAY_CUSTOM1** = **7** +Array is a normal array. -- **ARRAY_CUSTOM2** = **8** +.. _class_RenderingServer_constant_ARRAY_TANGENT: -- **ARRAY_CUSTOM3** = **9** +.. rst-class:: classref-enumeration-constant -- **ARRAY_BONES** = **10** --- Array contains bone information. +:ref:`ArrayType` **ARRAY_TANGENT** = ``2`` -- **ARRAY_WEIGHTS** = **11** --- Array is weight information. +Array is a tangent array. -- **ARRAY_INDEX** = **12** --- Array is index array. +.. _class_RenderingServer_constant_ARRAY_COLOR: -- **ARRAY_MAX** = **13** --- Represents the size of the :ref:`ArrayType` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_COLOR** = ``3`` + +Array is a color array. + +.. _class_RenderingServer_constant_ARRAY_TEX_UV: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_TEX_UV** = ``4`` + +Array is an UV coordinates array. + +.. _class_RenderingServer_constant_ARRAY_TEX_UV2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_TEX_UV2** = ``5`` + +Array is an UV coordinates array for the second UV coordinates. + +.. _class_RenderingServer_constant_ARRAY_CUSTOM0: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM0** = ``6`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM1: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM1** = ``7`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM2** = ``8`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM3: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_CUSTOM3** = ``9`` + + + +.. _class_RenderingServer_constant_ARRAY_BONES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_BONES** = ``10`` + +Array contains bone information. + +.. _class_RenderingServer_constant_ARRAY_WEIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_WEIGHTS** = ``11`` + +Array is weight information. + +.. _class_RenderingServer_constant_ARRAY_INDEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_INDEX** = ``12`` + +Array is index array. + +.. _class_RenderingServer_constant_ARRAY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayType` **ARRAY_MAX** = ``13`` + +Represents the size of the :ref:`ArrayType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ArrayCustomFormat: -.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA8_UNORM: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA8_SNORM: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_RG_HALF: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA_HALF: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_R_FLOAT: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_RG_FLOAT: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGB_FLOAT: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA_FLOAT: - -.. _class_RenderingServer_constant_ARRAY_CUSTOM_MAX: +.. rst-class:: classref-enumeration enum **ArrayCustomFormat**: -- **ARRAY_CUSTOM_RGBA8_UNORM** = **0** +.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA8_UNORM: -- **ARRAY_CUSTOM_RGBA8_SNORM** = **1** +.. rst-class:: classref-enumeration-constant -- **ARRAY_CUSTOM_RG_HALF** = **2** +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA8_UNORM** = ``0`` -- **ARRAY_CUSTOM_RGBA_HALF** = **3** -- **ARRAY_CUSTOM_R_FLOAT** = **4** -- **ARRAY_CUSTOM_RG_FLOAT** = **5** +.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA8_SNORM: -- **ARRAY_CUSTOM_RGB_FLOAT** = **6** +.. rst-class:: classref-enumeration-constant -- **ARRAY_CUSTOM_RGBA_FLOAT** = **7** +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA8_SNORM** = ``1`` -- **ARRAY_CUSTOM_MAX** = **8** + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM_RG_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RG_HALF** = ``2`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA_HALF** = ``3`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM_R_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_R_FLOAT** = ``4`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM_RG_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RG_FLOAT** = ``5`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGB_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGB_FLOAT** = ``6`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_RGBA_FLOAT** = ``7`` + + + +.. _class_RenderingServer_constant_ARRAY_CUSTOM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayCustomFormat` **ARRAY_CUSTOM_MAX** = ``8`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ArrayFormat: -.. _class_RenderingServer_constant_ARRAY_FORMAT_VERTEX: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_NORMAL: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_TANGENT: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_COLOR: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_TEX_UV: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_TEX_UV2: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM0: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM1: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM2: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM3: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_BONES: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_WEIGHTS: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_INDEX: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_BLEND_SHAPE_MASK: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BASE: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BITS: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM0_SHIFT: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM1_SHIFT: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM2_SHIFT: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM3_SHIFT: - -.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_MASK: - -.. _class_RenderingServer_constant_ARRAY_COMPRESS_FLAGS_BASE: - -.. _class_RenderingServer_constant_ARRAY_FLAG_USE_2D_VERTICES: - -.. _class_RenderingServer_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE: - -.. _class_RenderingServer_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS: +.. rst-class:: classref-enumeration enum **ArrayFormat**: -- **ARRAY_FORMAT_VERTEX** = **1** --- Flag used to mark a vertex array. +.. _class_RenderingServer_constant_ARRAY_FORMAT_VERTEX: -- **ARRAY_FORMAT_NORMAL** = **2** --- Flag used to mark a normal array. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_TANGENT** = **4** --- Flag used to mark a tangent array. +:ref:`ArrayFormat` **ARRAY_FORMAT_VERTEX** = ``1`` -- **ARRAY_FORMAT_COLOR** = **8** --- Flag used to mark a color array. +Flag used to mark a vertex array. -- **ARRAY_FORMAT_TEX_UV** = **16** --- Flag used to mark an UV coordinates array. +.. _class_RenderingServer_constant_ARRAY_FORMAT_NORMAL: -- **ARRAY_FORMAT_TEX_UV2** = **32** --- Flag used to mark an UV coordinates array for the second UV coordinates. +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_CUSTOM0** = **64** +:ref:`ArrayFormat` **ARRAY_FORMAT_NORMAL** = ``2`` -- **ARRAY_FORMAT_CUSTOM1** = **128** +Flag used to mark a normal array. -- **ARRAY_FORMAT_CUSTOM2** = **256** +.. _class_RenderingServer_constant_ARRAY_FORMAT_TANGENT: -- **ARRAY_FORMAT_CUSTOM3** = **512** +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_BONES** = **1024** --- Flag used to mark a bone information array. +:ref:`ArrayFormat` **ARRAY_FORMAT_TANGENT** = ``4`` -- **ARRAY_FORMAT_WEIGHTS** = **2048** --- Flag used to mark a weights array. +Flag used to mark a tangent array. -- **ARRAY_FORMAT_INDEX** = **4096** --- Flag used to mark an index array. +.. _class_RenderingServer_constant_ARRAY_FORMAT_COLOR: -- **ARRAY_FORMAT_BLEND_SHAPE_MASK** = **7** +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_CUSTOM_BASE** = **13** +:ref:`ArrayFormat` **ARRAY_FORMAT_COLOR** = ``8`` -- **ARRAY_FORMAT_CUSTOM_BITS** = **3** +Flag used to mark a color array. -- **ARRAY_FORMAT_CUSTOM0_SHIFT** = **13** +.. _class_RenderingServer_constant_ARRAY_FORMAT_TEX_UV: -- **ARRAY_FORMAT_CUSTOM1_SHIFT** = **16** +.. rst-class:: classref-enumeration-constant -- **ARRAY_FORMAT_CUSTOM2_SHIFT** = **19** +:ref:`ArrayFormat` **ARRAY_FORMAT_TEX_UV** = ``16`` -- **ARRAY_FORMAT_CUSTOM3_SHIFT** = **22** +Flag used to mark an UV coordinates array. -- **ARRAY_FORMAT_CUSTOM_MASK** = **7** +.. _class_RenderingServer_constant_ARRAY_FORMAT_TEX_UV2: -- **ARRAY_COMPRESS_FLAGS_BASE** = **25** +.. rst-class:: classref-enumeration-constant -- **ARRAY_FLAG_USE_2D_VERTICES** = **33554432** --- Flag used to mark that the array contains 2D vertices. +:ref:`ArrayFormat` **ARRAY_FORMAT_TEX_UV2** = ``32`` -- **ARRAY_FLAG_USE_DYNAMIC_UPDATE** = **67108864** +Flag used to mark an UV coordinates array for the second UV coordinates. -- **ARRAY_FLAG_USE_8_BONE_WEIGHTS** = **134217728** +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM0: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM0** = ``64`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM1: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM1** = ``128`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM2** = ``256`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM3: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM3** = ``512`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_BONES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_BONES** = ``1024`` + +Flag used to mark a bone information array. + +.. _class_RenderingServer_constant_ARRAY_FORMAT_WEIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_WEIGHTS** = ``2048`` + +Flag used to mark a weights array. + +.. _class_RenderingServer_constant_ARRAY_FORMAT_INDEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_INDEX** = ``4096`` + +Flag used to mark an index array. + +.. _class_RenderingServer_constant_ARRAY_FORMAT_BLEND_SHAPE_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_BLEND_SHAPE_MASK** = ``7`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM_BASE** = ``13`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM_BITS** = ``3`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM0_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM0_SHIFT** = ``13`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM1_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM1_SHIFT** = ``16`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM2_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM2_SHIFT** = ``19`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM3_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM3_SHIFT** = ``22`` + + + +.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FORMAT_CUSTOM_MASK** = ``7`` + + + +.. _class_RenderingServer_constant_ARRAY_COMPRESS_FLAGS_BASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_COMPRESS_FLAGS_BASE** = ``25`` + + + +.. _class_RenderingServer_constant_ARRAY_FLAG_USE_2D_VERTICES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_USE_2D_VERTICES** = ``33554432`` + +Flag used to mark that the array contains 2D vertices. + +.. _class_RenderingServer_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_USE_DYNAMIC_UPDATE** = ``67108864`` + + + +.. _class_RenderingServer_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_USE_8_BONE_WEIGHTS** = ``134217728`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_PrimitiveType: -.. _class_RenderingServer_constant_PRIMITIVE_POINTS: - -.. _class_RenderingServer_constant_PRIMITIVE_LINES: - -.. _class_RenderingServer_constant_PRIMITIVE_LINE_STRIP: - -.. _class_RenderingServer_constant_PRIMITIVE_TRIANGLES: - -.. _class_RenderingServer_constant_PRIMITIVE_TRIANGLE_STRIP: - -.. _class_RenderingServer_constant_PRIMITIVE_MAX: +.. rst-class:: classref-enumeration enum **PrimitiveType**: -- **PRIMITIVE_POINTS** = **0** --- Primitive to draw consists of points. +.. _class_RenderingServer_constant_PRIMITIVE_POINTS: -- **PRIMITIVE_LINES** = **1** --- Primitive to draw consists of lines. +.. rst-class:: classref-enumeration-constant -- **PRIMITIVE_LINE_STRIP** = **2** --- Primitive to draw consists of a line strip from start to end. +:ref:`PrimitiveType` **PRIMITIVE_POINTS** = ``0`` -- **PRIMITIVE_TRIANGLES** = **3** --- Primitive to draw consists of triangles. +Primitive to draw consists of points. -- **PRIMITIVE_TRIANGLE_STRIP** = **4** --- Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). +.. _class_RenderingServer_constant_PRIMITIVE_LINES: -- **PRIMITIVE_MAX** = **5** --- Represents the size of the :ref:`PrimitiveType` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_LINES** = ``1`` + +Primitive to draw consists of lines. + +.. _class_RenderingServer_constant_PRIMITIVE_LINE_STRIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_LINE_STRIP** = ``2`` + +Primitive to draw consists of a line strip from start to end. + +.. _class_RenderingServer_constant_PRIMITIVE_TRIANGLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_TRIANGLES** = ``3`` + +Primitive to draw consists of triangles. + +.. _class_RenderingServer_constant_PRIMITIVE_TRIANGLE_STRIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_TRIANGLE_STRIP** = ``4`` + +Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). + +.. _class_RenderingServer_constant_PRIMITIVE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`PrimitiveType` **PRIMITIVE_MAX** = ``5`` + +Represents the size of the :ref:`PrimitiveType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_BlendShapeMode: -.. _class_RenderingServer_constant_BLEND_SHAPE_MODE_NORMALIZED: - -.. _class_RenderingServer_constant_BLEND_SHAPE_MODE_RELATIVE: +.. rst-class:: classref-enumeration enum **BlendShapeMode**: -- **BLEND_SHAPE_MODE_NORMALIZED** = **0** --- Blend shapes are normalized. +.. _class_RenderingServer_constant_BLEND_SHAPE_MODE_NORMALIZED: -- **BLEND_SHAPE_MODE_RELATIVE** = **1** --- Blend shapes are relative to base weight. +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeMode` **BLEND_SHAPE_MODE_NORMALIZED** = ``0`` + +Blend shapes are normalized. + +.. _class_RenderingServer_constant_BLEND_SHAPE_MODE_RELATIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeMode` **BLEND_SHAPE_MODE_RELATIVE** = ``1`` + +Blend shapes are relative to base weight. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_MultimeshTransformFormat: -.. _class_RenderingServer_constant_MULTIMESH_TRANSFORM_2D: - -.. _class_RenderingServer_constant_MULTIMESH_TRANSFORM_3D: +.. rst-class:: classref-enumeration enum **MultimeshTransformFormat**: -- **MULTIMESH_TRANSFORM_2D** = **0** --- Use :ref:`Transform2D` to store MultiMesh transform. +.. _class_RenderingServer_constant_MULTIMESH_TRANSFORM_2D: -- **MULTIMESH_TRANSFORM_3D** = **1** --- Use :ref:`Transform3D` to store MultiMesh transform. +.. rst-class:: classref-enumeration-constant + +:ref:`MultimeshTransformFormat` **MULTIMESH_TRANSFORM_2D** = ``0`` + +Use :ref:`Transform2D` to store MultiMesh transform. + +.. _class_RenderingServer_constant_MULTIMESH_TRANSFORM_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`MultimeshTransformFormat` **MULTIMESH_TRANSFORM_3D** = ``1`` + +Use :ref:`Transform3D` to store MultiMesh transform. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_LightProjectorFilter: -.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST: - -.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR: - -.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS: - -.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS: - -.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC: - -.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC: +.. rst-class:: classref-enumeration enum **LightProjectorFilter**: -- **LIGHT_PROJECTOR_FILTER_NEAREST** = **0** --- Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST: -- **LIGHT_PROJECTOR_FILTER_LINEAR** = **1** --- Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. +.. rst-class:: classref-enumeration-constant -- **LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS** = **2** --- Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. +:ref:`LightProjectorFilter` **LIGHT_PROJECTOR_FILTER_NEAREST** = ``0`` -- **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS** = **3** --- Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. +Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. -- **LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC** = **4** --- Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR: -- **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = **5** --- Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +.. rst-class:: classref-enumeration-constant + +:ref:`LightProjectorFilter` **LIGHT_PROJECTOR_FILTER_LINEAR** = ``1`` + +Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. + +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightProjectorFilter` **LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS** = ``2`` + +Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightProjectorFilter` **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS** = ``3`` + +Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightProjectorFilter` **LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC** = ``4`` + +Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +.. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightProjectorFilter` **LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = ``5`` + +Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_LightType: -.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL: - -.. _class_RenderingServer_constant_LIGHT_OMNI: - -.. _class_RenderingServer_constant_LIGHT_SPOT: +.. rst-class:: classref-enumeration enum **LightType**: -- **LIGHT_DIRECTIONAL** = **0** --- Is a directional (sun) light. +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL: -- **LIGHT_OMNI** = **1** --- Is an omni light. +.. rst-class:: classref-enumeration-constant -- **LIGHT_SPOT** = **2** --- Is a spot light. +:ref:`LightType` **LIGHT_DIRECTIONAL** = ``0`` + +Is a directional (sun) light. + +.. _class_RenderingServer_constant_LIGHT_OMNI: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightType` **LIGHT_OMNI** = ``1`` + +Is an omni light. + +.. _class_RenderingServer_constant_LIGHT_SPOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightType` **LIGHT_SPOT** = ``2`` + +Is a spot light. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_LightParam: -.. _class_RenderingServer_constant_LIGHT_PARAM_ENERGY: - -.. _class_RenderingServer_constant_LIGHT_PARAM_INDIRECT_ENERGY: - -.. _class_RenderingServer_constant_LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SPECULAR: - -.. _class_RenderingServer_constant_LIGHT_PARAM_RANGE: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SIZE: - -.. _class_RenderingServer_constant_LIGHT_PARAM_ATTENUATION: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SPOT_ANGLE: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SPOT_ATTENUATION: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_MAX_DISTANCE: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_FADE_START: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_NORMAL_BIAS: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_BIAS: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_PANCAKE_SIZE: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_OPACITY: - -.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_BLUR: - -.. _class_RenderingServer_constant_LIGHT_PARAM_TRANSMITTANCE_BIAS: - -.. _class_RenderingServer_constant_LIGHT_PARAM_MAX: +.. rst-class:: classref-enumeration enum **LightParam**: -- **LIGHT_PARAM_ENERGY** = **0** --- The light's energy multiplier. +.. _class_RenderingServer_constant_LIGHT_PARAM_ENERGY: -- **LIGHT_PARAM_INDIRECT_ENERGY** = **1** --- The light's indirect energy multiplier (final indirect energy is :ref:`LIGHT_PARAM_ENERGY` \* :ref:`LIGHT_PARAM_INDIRECT_ENERGY`). +.. rst-class:: classref-enumeration-constant -- **LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY** = **2** --- The light's volumetric fog energy multiplier (final volumetric fog energy is :ref:`LIGHT_PARAM_ENERGY` \* :ref:`LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY`). +:ref:`LightParam` **LIGHT_PARAM_ENERGY** = ``0`` -- **LIGHT_PARAM_SPECULAR** = **3** --- The light's influence on specularity. +The light's energy multiplier. -- **LIGHT_PARAM_RANGE** = **4** --- The light's range. +.. _class_RenderingServer_constant_LIGHT_PARAM_INDIRECT_ENERGY: -- **LIGHT_PARAM_SIZE** = **5** --- The size of the light when using spot light or omni light. The angular size of the light when using directional light. +.. rst-class:: classref-enumeration-constant -- **LIGHT_PARAM_ATTENUATION** = **6** --- The light's attenuation. +:ref:`LightParam` **LIGHT_PARAM_INDIRECT_ENERGY** = ``1`` -- **LIGHT_PARAM_SPOT_ANGLE** = **7** --- The spotlight's angle. +The light's indirect energy multiplier (final indirect energy is :ref:`LIGHT_PARAM_ENERGY` \* :ref:`LIGHT_PARAM_INDIRECT_ENERGY`). -- **LIGHT_PARAM_SPOT_ATTENUATION** = **8** --- The spotlight's attenuation. +.. _class_RenderingServer_constant_LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY: -- **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = **9** --- Max distance that shadows will be rendered. +.. rst-class:: classref-enumeration-constant -- **LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET** = **10** --- Proportion of shadow atlas occupied by the first split. +:ref:`LightParam` **LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY** = ``2`` -- **LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET** = **11** --- Proportion of shadow atlas occupied by the second split. +The light's volumetric fog energy multiplier (final volumetric fog energy is :ref:`LIGHT_PARAM_ENERGY` \* :ref:`LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY`). -- **LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET** = **12** --- Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. +.. _class_RenderingServer_constant_LIGHT_PARAM_SPECULAR: -- **LIGHT_PARAM_SHADOW_FADE_START** = **13** --- Proportion of shadow max distance where the shadow will start to fade out. +.. rst-class:: classref-enumeration-constant -- **LIGHT_PARAM_SHADOW_NORMAL_BIAS** = **14** --- Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. +:ref:`LightParam` **LIGHT_PARAM_SPECULAR** = ``3`` -- **LIGHT_PARAM_SHADOW_BIAS** = **15** --- Bias the shadow lookup to fix self-shadowing artifacts. +The light's influence on specularity. -- **LIGHT_PARAM_SHADOW_PANCAKE_SIZE** = **16** --- 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. +.. _class_RenderingServer_constant_LIGHT_PARAM_RANGE: -- **LIGHT_PARAM_SHADOW_OPACITY** = **17** --- The light's shadow opacity. Values lower than ``1.0`` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. +.. rst-class:: classref-enumeration-constant -- **LIGHT_PARAM_SHADOW_BLUR** = **18** --- Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. +:ref:`LightParam` **LIGHT_PARAM_RANGE** = ``4`` -- **LIGHT_PARAM_TRANSMITTANCE_BIAS** = **19** +The light's range. -- **LIGHT_PARAM_MAX** = **21** --- Represents the size of the :ref:`LightParam` enum. +.. _class_RenderingServer_constant_LIGHT_PARAM_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SIZE** = ``5`` + +The size of the light when using spot light or omni light. The angular size of the light when using directional light. + +.. _class_RenderingServer_constant_LIGHT_PARAM_ATTENUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_ATTENUATION** = ``6`` + +The light's attenuation. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SPOT_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SPOT_ANGLE** = ``7`` + +The spotlight's angle. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SPOT_ATTENUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SPOT_ATTENUATION** = ``8`` + +The spotlight's attenuation. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_MAX_DISTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = ``9`` + +Max distance that shadows will be rendered. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET** = ``10`` + +Proportion of shadow atlas occupied by the first split. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET** = ``11`` + +Proportion of shadow atlas occupied by the second split. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET** = ``12`` + +Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_FADE_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_FADE_START** = ``13`` + +Proportion of shadow max distance where the shadow will start to fade out. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_NORMAL_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_NORMAL_BIAS** = ``14`` + +Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_BIAS** = ``15`` + +Bias the shadow lookup to fix self-shadowing artifacts. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_PANCAKE_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_PANCAKE_SIZE** = ``16`` + +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. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_OPACITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_OPACITY** = ``17`` + +The light's shadow opacity. Values lower than ``1.0`` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. + +.. _class_RenderingServer_constant_LIGHT_PARAM_SHADOW_BLUR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_SHADOW_BLUR** = ``18`` + +Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. + +.. _class_RenderingServer_constant_LIGHT_PARAM_TRANSMITTANCE_BIAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_TRANSMITTANCE_BIAS** = ``19`` + + + +.. _class_RenderingServer_constant_LIGHT_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightParam` **LIGHT_PARAM_MAX** = ``21`` + +Represents the size of the :ref:`LightParam` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_LightBakeMode: -.. _class_RenderingServer_constant_LIGHT_BAKE_DISABLED: - -.. _class_RenderingServer_constant_LIGHT_BAKE_STATIC: - -.. _class_RenderingServer_constant_LIGHT_BAKE_DYNAMIC: +.. rst-class:: classref-enumeration enum **LightBakeMode**: -- **LIGHT_BAKE_DISABLED** = **0** +.. _class_RenderingServer_constant_LIGHT_BAKE_DISABLED: -- **LIGHT_BAKE_STATIC** = **1** +.. rst-class:: classref-enumeration-constant -- **LIGHT_BAKE_DYNAMIC** = **2** +:ref:`LightBakeMode` **LIGHT_BAKE_DISABLED** = ``0`` + + + +.. _class_RenderingServer_constant_LIGHT_BAKE_STATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightBakeMode` **LIGHT_BAKE_STATIC** = ``1`` + + + +.. _class_RenderingServer_constant_LIGHT_BAKE_DYNAMIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightBakeMode` **LIGHT_BAKE_DYNAMIC** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_LightOmniShadowMode: -.. _class_RenderingServer_constant_LIGHT_OMNI_SHADOW_DUAL_PARABOLOID: - -.. _class_RenderingServer_constant_LIGHT_OMNI_SHADOW_CUBE: +.. rst-class:: classref-enumeration enum **LightOmniShadowMode**: -- **LIGHT_OMNI_SHADOW_DUAL_PARABOLOID** = **0** --- Use a dual paraboloid shadow map for omni lights. +.. _class_RenderingServer_constant_LIGHT_OMNI_SHADOW_DUAL_PARABOLOID: -- **LIGHT_OMNI_SHADOW_CUBE** = **1** --- Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. +.. rst-class:: classref-enumeration-constant + +:ref:`LightOmniShadowMode` **LIGHT_OMNI_SHADOW_DUAL_PARABOLOID** = ``0`` + +Use a dual paraboloid shadow map for omni lights. + +.. _class_RenderingServer_constant_LIGHT_OMNI_SHADOW_CUBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightOmniShadowMode` **LIGHT_OMNI_SHADOW_CUBE** = ``1`` + +Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_LightDirectionalShadowMode: -.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL: - -.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS: - -.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS: +.. rst-class:: classref-enumeration enum **LightDirectionalShadowMode**: -- **LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL** = **0** --- Use orthogonal shadow projection for directional light. +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL: -- **LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS** = **1** --- Use 2 splits for shadow projection when using directional light. +.. rst-class:: classref-enumeration-constant -- **LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS** = **2** --- Use 4 splits for shadow projection when using directional light. +:ref:`LightDirectionalShadowMode` **LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL** = ``0`` + +Use orthogonal shadow projection for directional light. + +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightDirectionalShadowMode` **LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS** = ``1`` + +Use 2 splits for shadow projection when using directional light. + +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightDirectionalShadowMode` **LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS** = ``2`` + +Use 4 splits for shadow projection when using directional light. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_LightDirectionalSkyMode: -.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY: - -.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY: - -.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY: +.. rst-class:: classref-enumeration enum **LightDirectionalSkyMode**: -- **LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY** = **0** --- Use DirectionalLight3D in both sky rendering and scene lighting. +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY: -- **LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY** = **1** --- Only use DirectionalLight3D in scene lighting. +.. rst-class:: classref-enumeration-constant -- **LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY** = **2** --- Only use DirectionalLight3D in sky rendering. +:ref:`LightDirectionalSkyMode` **LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY** = ``0`` + +Use DirectionalLight3D in both sky rendering and scene lighting. + +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightDirectionalSkyMode` **LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY** = ``1`` + +Only use DirectionalLight3D in scene lighting. + +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`LightDirectionalSkyMode` **LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY** = ``2`` + +Only use DirectionalLight3D in sky rendering. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ShadowQuality: -.. _class_RenderingServer_constant_SHADOW_QUALITY_HARD: - -.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_VERY_LOW: - -.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_LOW: - -.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_MEDIUM: - -.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_HIGH: - -.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_ULTRA: - -.. _class_RenderingServer_constant_SHADOW_QUALITY_MAX: +.. rst-class:: classref-enumeration enum **ShadowQuality**: -- **SHADOW_QUALITY_HARD** = **0** --- Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the :ref:`Light3D.shadow_blur` property is ignored if :ref:`Light3D.light_size` and :ref:`Light3D.light_angular_distance` is ``0.0``. +.. _class_RenderingServer_constant_SHADOW_QUALITY_HARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowQuality` **SHADOW_QUALITY_HARD** = ``0`` + +Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the :ref:`Light3D.shadow_blur` property is ignored if :ref:`Light3D.light_size` and :ref:`Light3D.light_angular_distance` is ``0.0``. \ **Note:** The variable shadow blur performed by :ref:`Light3D.light_size` and :ref:`Light3D.light_angular_distance` is still effective when using hard shadow filtering. In this case, :ref:`Light3D.shadow_blur` *is* taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra. -- **SHADOW_QUALITY_SOFT_VERY_LOW** = **1** --- Very low shadow filtering quality (faster). When using this quality setting, :ref:`Light3D.shadow_blur` is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose :ref:`Light3D.light_size` or :ref:`Light3D.light_angular_distance` is ``0.0``). +.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_VERY_LOW: -- **SHADOW_QUALITY_SOFT_LOW** = **2** --- Low shadow filtering quality (fast). +.. rst-class:: classref-enumeration-constant -- **SHADOW_QUALITY_SOFT_MEDIUM** = **3** --- Medium low shadow filtering quality (average). +:ref:`ShadowQuality` **SHADOW_QUALITY_SOFT_VERY_LOW** = ``1`` -- **SHADOW_QUALITY_SOFT_HIGH** = **4** --- High low shadow filtering quality (slow). When using this quality setting, :ref:`Light3D.shadow_blur` is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose :ref:`Light3D.light_size` or :ref:`Light3D.light_angular_distance` is ``0.0``). +Very low shadow filtering quality (faster). When using this quality setting, :ref:`Light3D.shadow_blur` is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose :ref:`Light3D.light_size` or :ref:`Light3D.light_angular_distance` is ``0.0``). -- **SHADOW_QUALITY_SOFT_ULTRA** = **5** --- Highest low shadow filtering quality (slowest). When using this quality setting, :ref:`Light3D.shadow_blur` is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose :ref:`Light3D.light_size` or :ref:`Light3D.light_angular_distance` is ``0.0``). +.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_LOW: -- **SHADOW_QUALITY_MAX** = **6** +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowQuality` **SHADOW_QUALITY_SOFT_LOW** = ``2`` + +Low shadow filtering quality (fast). + +.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowQuality` **SHADOW_QUALITY_SOFT_MEDIUM** = ``3`` + +Medium low shadow filtering quality (average). + +.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowQuality` **SHADOW_QUALITY_SOFT_HIGH** = ``4`` + +High low shadow filtering quality (slow). When using this quality setting, :ref:`Light3D.shadow_blur` is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose :ref:`Light3D.light_size` or :ref:`Light3D.light_angular_distance` is ``0.0``). + +.. _class_RenderingServer_constant_SHADOW_QUALITY_SOFT_ULTRA: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowQuality` **SHADOW_QUALITY_SOFT_ULTRA** = ``5`` + +Highest low shadow filtering quality (slowest). When using this quality setting, :ref:`Light3D.shadow_blur` is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose :ref:`Light3D.light_size` or :ref:`Light3D.light_angular_distance` is ``0.0``). + +.. _class_RenderingServer_constant_SHADOW_QUALITY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowQuality` **SHADOW_QUALITY_MAX** = ``6`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ReflectionProbeUpdateMode: -.. _class_RenderingServer_constant_REFLECTION_PROBE_UPDATE_ONCE: - -.. _class_RenderingServer_constant_REFLECTION_PROBE_UPDATE_ALWAYS: +.. rst-class:: classref-enumeration enum **ReflectionProbeUpdateMode**: -- **REFLECTION_PROBE_UPDATE_ONCE** = **0** --- Reflection probe will update reflections once and then stop. +.. _class_RenderingServer_constant_REFLECTION_PROBE_UPDATE_ONCE: -- **REFLECTION_PROBE_UPDATE_ALWAYS** = **1** --- Reflection probe will update each frame. This mode is necessary to capture moving objects. +.. rst-class:: classref-enumeration-constant + +:ref:`ReflectionProbeUpdateMode` **REFLECTION_PROBE_UPDATE_ONCE** = ``0`` + +Reflection probe will update reflections once and then stop. + +.. _class_RenderingServer_constant_REFLECTION_PROBE_UPDATE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReflectionProbeUpdateMode` **REFLECTION_PROBE_UPDATE_ALWAYS** = ``1`` + +Reflection probe will update each frame. This mode is necessary to capture moving objects. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ReflectionProbeAmbientMode: -.. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_DISABLED: - -.. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_ENVIRONMENT: - -.. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_COLOR: +.. rst-class:: classref-enumeration enum **ReflectionProbeAmbientMode**: -- **REFLECTION_PROBE_AMBIENT_DISABLED** = **0** +.. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_DISABLED: -- **REFLECTION_PROBE_AMBIENT_ENVIRONMENT** = **1** +.. rst-class:: classref-enumeration-constant -- **REFLECTION_PROBE_AMBIENT_COLOR** = **2** +:ref:`ReflectionProbeAmbientMode` **REFLECTION_PROBE_AMBIENT_DISABLED** = ``0`` + + + +.. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_ENVIRONMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReflectionProbeAmbientMode` **REFLECTION_PROBE_AMBIENT_ENVIRONMENT** = ``1`` + + + +.. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReflectionProbeAmbientMode` **REFLECTION_PROBE_AMBIENT_COLOR** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_DecalTexture: -.. _class_RenderingServer_constant_DECAL_TEXTURE_ALBEDO: - -.. _class_RenderingServer_constant_DECAL_TEXTURE_NORMAL: - -.. _class_RenderingServer_constant_DECAL_TEXTURE_ORM: - -.. _class_RenderingServer_constant_DECAL_TEXTURE_EMISSION: - -.. _class_RenderingServer_constant_DECAL_TEXTURE_MAX: +.. rst-class:: classref-enumeration enum **DecalTexture**: -- **DECAL_TEXTURE_ALBEDO** = **0** +.. _class_RenderingServer_constant_DECAL_TEXTURE_ALBEDO: -- **DECAL_TEXTURE_NORMAL** = **1** +.. rst-class:: classref-enumeration-constant -- **DECAL_TEXTURE_ORM** = **2** +:ref:`DecalTexture` **DECAL_TEXTURE_ALBEDO** = ``0`` -- **DECAL_TEXTURE_EMISSION** = **3** -- **DECAL_TEXTURE_MAX** = **4** + +.. _class_RenderingServer_constant_DECAL_TEXTURE_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **DECAL_TEXTURE_NORMAL** = ``1`` + + + +.. _class_RenderingServer_constant_DECAL_TEXTURE_ORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **DECAL_TEXTURE_ORM** = ``2`` + + + +.. _class_RenderingServer_constant_DECAL_TEXTURE_EMISSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **DECAL_TEXTURE_EMISSION** = ``3`` + + + +.. _class_RenderingServer_constant_DECAL_TEXTURE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalTexture` **DECAL_TEXTURE_MAX** = ``4`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_DecalFilter: -.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST: - -.. _class_RenderingServer_constant_DECAL_FILTER_LINEAR: - -.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST_MIPMAPS: - -.. _class_RenderingServer_constant_DECAL_FILTER_LINEAR_MIPMAPS: - -.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC: - -.. _class_RenderingServer_constant_DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC: +.. rst-class:: classref-enumeration enum **DecalFilter**: -- **DECAL_FILTER_NEAREST** = **0** --- Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. +.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST: -- **DECAL_FILTER_LINEAR** = **1** --- Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. +.. rst-class:: classref-enumeration-constant -- **DECAL_FILTER_NEAREST_MIPMAPS** = **2** --- Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. +:ref:`DecalFilter` **DECAL_FILTER_NEAREST** = ``0`` -- **DECAL_FILTER_LINEAR_MIPMAPS** = **3** --- Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. +Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. -- **DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC** = **4** --- Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +.. _class_RenderingServer_constant_DECAL_FILTER_LINEAR: -- **DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = **5** --- Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +.. rst-class:: classref-enumeration-constant + +:ref:`DecalFilter` **DECAL_FILTER_LINEAR** = ``1`` + +Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. + +.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalFilter` **DECAL_FILTER_NEAREST_MIPMAPS** = ``2`` + +Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + +.. _class_RenderingServer_constant_DECAL_FILTER_LINEAR_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalFilter` **DECAL_FILTER_LINEAR_MIPMAPS** = ``3`` + +Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + +.. _class_RenderingServer_constant_DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalFilter` **DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC** = ``4`` + +Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +.. _class_RenderingServer_constant_DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`DecalFilter` **DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC** = ``5`` + +Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_VoxelGIQuality: -.. _class_RenderingServer_constant_VOXEL_GI_QUALITY_LOW: - -.. _class_RenderingServer_constant_VOXEL_GI_QUALITY_HIGH: +.. rst-class:: classref-enumeration enum **VoxelGIQuality**: -- **VOXEL_GI_QUALITY_LOW** = **0** +.. _class_RenderingServer_constant_VOXEL_GI_QUALITY_LOW: -- **VOXEL_GI_QUALITY_HIGH** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`VoxelGIQuality` **VOXEL_GI_QUALITY_LOW** = ``0`` + + + +.. _class_RenderingServer_constant_VOXEL_GI_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`VoxelGIQuality` **VOXEL_GI_QUALITY_HIGH** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ParticlesMode: -.. _class_RenderingServer_constant_PARTICLES_MODE_2D: - -.. _class_RenderingServer_constant_PARTICLES_MODE_3D: +.. rst-class:: classref-enumeration enum **ParticlesMode**: -- **PARTICLES_MODE_2D** = **0** +.. _class_RenderingServer_constant_PARTICLES_MODE_2D: -- **PARTICLES_MODE_3D** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesMode` **PARTICLES_MODE_2D** = ``0`` + + + +.. _class_RenderingServer_constant_PARTICLES_MODE_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesMode` **PARTICLES_MODE_3D** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ParticlesTransformAlign: -.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_DISABLED: - -.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD: - -.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY: - -.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: +.. rst-class:: classref-enumeration enum **ParticlesTransformAlign**: -- **PARTICLES_TRANSFORM_ALIGN_DISABLED** = **0** +.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_DISABLED: -- **PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD** = **1** +.. rst-class:: classref-enumeration-constant -- **PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY** = **2** +:ref:`ParticlesTransformAlign` **PARTICLES_TRANSFORM_ALIGN_DISABLED** = ``0`` -- **PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY** = **3** + + +.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesTransformAlign` **PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD** = ``1`` + + + +.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesTransformAlign` **PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY** = ``2`` + + + +.. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesTransformAlign` **PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY** = ``3`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ParticlesDrawOrder: -.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_INDEX: - -.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_LIFETIME: - -.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_REVERSE_LIFETIME: - -.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_VIEW_DEPTH: +.. rst-class:: classref-enumeration enum **ParticlesDrawOrder**: -- **PARTICLES_DRAW_ORDER_INDEX** = **0** --- Draw particles in the order that they appear in the particles array. +.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_INDEX: -- **PARTICLES_DRAW_ORDER_LIFETIME** = **1** --- Sort particles based on their lifetime. +.. rst-class:: classref-enumeration-constant -- **PARTICLES_DRAW_ORDER_REVERSE_LIFETIME** = **2** +:ref:`ParticlesDrawOrder` **PARTICLES_DRAW_ORDER_INDEX** = ``0`` -- **PARTICLES_DRAW_ORDER_VIEW_DEPTH** = **3** --- Sort particles based on their distance to the camera. +Draw particles in the order that they appear in the particles array. + +.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesDrawOrder` **PARTICLES_DRAW_ORDER_LIFETIME** = ``1`` + +Sort particles based on their lifetime. + +.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_REVERSE_LIFETIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesDrawOrder` **PARTICLES_DRAW_ORDER_REVERSE_LIFETIME** = ``2`` + + + +.. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_VIEW_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesDrawOrder` **PARTICLES_DRAW_ORDER_VIEW_DEPTH** = ``3`` + +Sort particles based on their distance to the camera. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ParticlesCollisionType: -.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_BOX_ATTRACT: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_BOX_COLLIDE: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SDF_COLLIDE: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE: +.. rst-class:: classref-enumeration enum **ParticlesCollisionType**: -- **PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT** = **0** +.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT: -- **PARTICLES_COLLISION_TYPE_BOX_ATTRACT** = **1** +.. rst-class:: classref-enumeration-constant -- **PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT** = **2** +:ref:`ParticlesCollisionType` **PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT** = ``0`` -- **PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE** = **3** -- **PARTICLES_COLLISION_TYPE_BOX_COLLIDE** = **4** -- **PARTICLES_COLLISION_TYPE_SDF_COLLIDE** = **5** +.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_BOX_ATTRACT: -- **PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE** = **6** +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionType` **PARTICLES_COLLISION_TYPE_BOX_ATTRACT** = ``1`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionType` **PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT** = ``2`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionType` **PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE** = ``3`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_BOX_COLLIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionType` **PARTICLES_COLLISION_TYPE_BOX_COLLIDE** = ``4`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SDF_COLLIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionType` **PARTICLES_COLLISION_TYPE_SDF_COLLIDE** = ``5`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionType` **PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE** = ``6`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ParticlesCollisionHeightfieldResolution: -.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192: - -.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX: +.. rst-class:: classref-enumeration enum **ParticlesCollisionHeightfieldResolution**: -- **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256** = **0** +.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256: -- **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512** = **1** +.. rst-class:: classref-enumeration-constant -- **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024** = **2** +:ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256** = ``0`` -- **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048** = **3** -- **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096** = **4** -- **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192** = **5** +.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512: -- **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX** = **6** +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512** = ``1`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024** = ``2`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048** = ``3`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096** = ``4`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192** = ``5`` + + + +.. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticlesCollisionHeightfieldResolution` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX** = ``6`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_FogVolumeShape: -.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID: - -.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE: - -.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER: - -.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX: - -.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_WORLD: - -.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_MAX: +.. rst-class:: classref-enumeration enum **FogVolumeShape**: -- **FOG_VOLUME_SHAPE_ELLIPSOID** = **0** --- :ref:`FogVolume` will be shaped like an ellipsoid (stretched sphere). +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID: -- **FOG_VOLUME_SHAPE_CONE** = **1** --- :ref:`FogVolume` will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the extents. The cone will be adjusted to fit within the extents. Rotate the :ref:`FogVolume` node to reorient the cone. Non-uniform scaling via extents is not supported (scale the :ref:`FogVolume` node instead). +.. rst-class:: classref-enumeration-constant -- **FOG_VOLUME_SHAPE_CYLINDER** = **2** --- :ref:`FogVolume` will be shaped like an upright cylinder (in local coordinates). Rotate the :ref:`FogVolume` node to reorient the cylinder. The cylinder will be adjusted to fit within the extents. Non-uniform scaling via extents is not supported (scale the :ref:`FogVolume` node instead). +:ref:`FogVolumeShape` **FOG_VOLUME_SHAPE_ELLIPSOID** = ``0`` -- **FOG_VOLUME_SHAPE_BOX** = **3** --- :ref:`FogVolume` will be shaped like a box. +:ref:`FogVolume` will be shaped like an ellipsoid (stretched sphere). -- **FOG_VOLUME_SHAPE_WORLD** = **4** --- :ref:`FogVolume` will have no shape, will cover the whole world and will not be culled. +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE: -- **FOG_VOLUME_SHAPE_MAX** = **5** +.. rst-class:: classref-enumeration-constant + +:ref:`FogVolumeShape` **FOG_VOLUME_SHAPE_CONE** = ``1`` + +:ref:`FogVolume` will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the extents. The cone will be adjusted to fit within the extents. Rotate the :ref:`FogVolume` node to reorient the cone. Non-uniform scaling via extents is not supported (scale the :ref:`FogVolume` node instead). + +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`FogVolumeShape` **FOG_VOLUME_SHAPE_CYLINDER** = ``2`` + +:ref:`FogVolume` will be shaped like an upright cylinder (in local coordinates). Rotate the :ref:`FogVolume` node to reorient the cylinder. The cylinder will be adjusted to fit within the extents. Non-uniform scaling via extents is not supported (scale the :ref:`FogVolume` node instead). + +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX: + +.. rst-class:: classref-enumeration-constant + +:ref:`FogVolumeShape` **FOG_VOLUME_SHAPE_BOX** = ``3`` + +:ref:`FogVolume` will be shaped like a box. + +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_WORLD: + +.. rst-class:: classref-enumeration-constant + +:ref:`FogVolumeShape` **FOG_VOLUME_SHAPE_WORLD** = ``4`` + +:ref:`FogVolume` will have no shape, will cover the whole world and will not be culled. + +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`FogVolumeShape` **FOG_VOLUME_SHAPE_MAX** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportScaling3DMode: -.. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_BILINEAR: - -.. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_FSR: - -.. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_MAX: +.. rst-class:: classref-enumeration enum **ViewportScaling3DMode**: -- **VIEWPORT_SCALING_3D_MODE_BILINEAR** = **0** --- Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +.. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_BILINEAR: -- **VIEWPORT_SCALING_3D_MODE_FSR** = **1** --- 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`. Values less then ``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. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_SCALING_3D_MODE_MAX** = **2** +:ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_BILINEAR** = ``0`` + +Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. + +.. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_FSR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_FSR** = ``1`` + +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`. Values less then ``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_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_MAX** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportUpdateMode: -.. _class_RenderingServer_constant_VIEWPORT_UPDATE_DISABLED: - -.. _class_RenderingServer_constant_VIEWPORT_UPDATE_ONCE: - -.. _class_RenderingServer_constant_VIEWPORT_UPDATE_WHEN_VISIBLE: - -.. _class_RenderingServer_constant_VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE: - -.. _class_RenderingServer_constant_VIEWPORT_UPDATE_ALWAYS: +.. rst-class:: classref-enumeration enum **ViewportUpdateMode**: -- **VIEWPORT_UPDATE_DISABLED** = **0** --- Do not update the viewport. +.. _class_RenderingServer_constant_VIEWPORT_UPDATE_DISABLED: -- **VIEWPORT_UPDATE_ONCE** = **1** --- Update the viewport once then set to disabled. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_UPDATE_WHEN_VISIBLE** = **2** --- Update the viewport whenever it is visible. +:ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_DISABLED** = ``0`` -- **VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE** = **3** +Do not update the viewport. -- **VIEWPORT_UPDATE_ALWAYS** = **4** --- Always update the viewport. +.. _class_RenderingServer_constant_VIEWPORT_UPDATE_ONCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_ONCE** = ``1`` + +Update the viewport once then set to disabled. + +.. _class_RenderingServer_constant_VIEWPORT_UPDATE_WHEN_VISIBLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_WHEN_VISIBLE** = ``2`` + +Update the viewport whenever it is visible. + +.. _class_RenderingServer_constant_VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE** = ``3`` + + + +.. _class_RenderingServer_constant_VIEWPORT_UPDATE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportUpdateMode` **VIEWPORT_UPDATE_ALWAYS** = ``4`` + +Always update the viewport. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportClearMode: -.. _class_RenderingServer_constant_VIEWPORT_CLEAR_ALWAYS: - -.. _class_RenderingServer_constant_VIEWPORT_CLEAR_NEVER: - -.. _class_RenderingServer_constant_VIEWPORT_CLEAR_ONLY_NEXT_FRAME: +.. rst-class:: classref-enumeration enum **ViewportClearMode**: -- **VIEWPORT_CLEAR_ALWAYS** = **0** --- The viewport is always cleared before drawing. +.. _class_RenderingServer_constant_VIEWPORT_CLEAR_ALWAYS: -- **VIEWPORT_CLEAR_NEVER** = **1** --- The viewport is never cleared before drawing. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** --- The viewport is cleared once, then the clear mode is set to :ref:`VIEWPORT_CLEAR_NEVER`. +:ref:`ViewportClearMode` **VIEWPORT_CLEAR_ALWAYS** = ``0`` + +The viewport is always cleared before drawing. + +.. _class_RenderingServer_constant_VIEWPORT_CLEAR_NEVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportClearMode` **VIEWPORT_CLEAR_NEVER** = ``1`` + +The viewport is never cleared before drawing. + +.. _class_RenderingServer_constant_VIEWPORT_CLEAR_ONLY_NEXT_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportClearMode` **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = ``2`` + +The viewport is cleared once, then the clear mode is set to :ref:`VIEWPORT_CLEAR_NEVER`. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportSDFOversize: -.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_100_PERCENT: - -.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_120_PERCENT: - -.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_150_PERCENT: - -.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_200_PERCENT: - -.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_MAX: +.. rst-class:: classref-enumeration enum **ViewportSDFOversize**: -- **VIEWPORT_SDF_OVERSIZE_100_PERCENT** = **0** +.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_100_PERCENT: -- **VIEWPORT_SDF_OVERSIZE_120_PERCENT** = **1** +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_SDF_OVERSIZE_150_PERCENT** = **2** +:ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_100_PERCENT** = ``0`` -- **VIEWPORT_SDF_OVERSIZE_200_PERCENT** = **3** -- **VIEWPORT_SDF_OVERSIZE_MAX** = **4** + +.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_120_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_120_PERCENT** = ``1`` + + + +.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_150_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_150_PERCENT** = ``2`` + + + +.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_200_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_200_PERCENT** = ``3`` + + + +.. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportSDFOversize` **VIEWPORT_SDF_OVERSIZE_MAX** = ``4`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportSDFScale: -.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_100_PERCENT: - -.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_50_PERCENT: - -.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_25_PERCENT: - -.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_MAX: +.. rst-class:: classref-enumeration enum **ViewportSDFScale**: -- **VIEWPORT_SDF_SCALE_100_PERCENT** = **0** +.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_100_PERCENT: -- **VIEWPORT_SDF_SCALE_50_PERCENT** = **1** +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_SDF_SCALE_25_PERCENT** = **2** +:ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_100_PERCENT** = ``0`` -- **VIEWPORT_SDF_SCALE_MAX** = **3** + + +.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_50_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_50_PERCENT** = ``1`` + + + +.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_25_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_25_PERCENT** = ``2`` + + + +.. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportSDFScale` **VIEWPORT_SDF_SCALE_MAX** = ``3`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportMSAA: -.. _class_RenderingServer_constant_VIEWPORT_MSAA_DISABLED: - -.. _class_RenderingServer_constant_VIEWPORT_MSAA_2X: - -.. _class_RenderingServer_constant_VIEWPORT_MSAA_4X: - -.. _class_RenderingServer_constant_VIEWPORT_MSAA_8X: - -.. _class_RenderingServer_constant_VIEWPORT_MSAA_MAX: +.. rst-class:: classref-enumeration enum **ViewportMSAA**: -- **VIEWPORT_MSAA_DISABLED** = **0** --- Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting. +.. _class_RenderingServer_constant_VIEWPORT_MSAA_DISABLED: -- **VIEWPORT_MSAA_2X** = **1** --- Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_MSAA_4X** = **2** --- Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance. +:ref:`ViewportMSAA` **VIEWPORT_MSAA_DISABLED** = ``0`` -- **VIEWPORT_MSAA_8X** = **3** --- Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware. +Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting. -- **VIEWPORT_MSAA_MAX** = **4** +.. _class_RenderingServer_constant_VIEWPORT_MSAA_2X: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportMSAA` **VIEWPORT_MSAA_2X** = ``1`` + +Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance. + +.. _class_RenderingServer_constant_VIEWPORT_MSAA_4X: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportMSAA` **VIEWPORT_MSAA_4X** = ``2`` + +Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance. + +.. _class_RenderingServer_constant_VIEWPORT_MSAA_8X: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportMSAA` **VIEWPORT_MSAA_8X** = ``3`` + +Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware. + +.. _class_RenderingServer_constant_VIEWPORT_MSAA_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportMSAA` **VIEWPORT_MSAA_MAX** = ``4`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportScreenSpaceAA: -.. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_DISABLED: - -.. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_FXAA: - -.. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_MAX: +.. rst-class:: classref-enumeration enum **ViewportScreenSpaceAA**: -- **VIEWPORT_SCREEN_SPACE_AA_DISABLED** = **0** +.. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_DISABLED: -- **VIEWPORT_SCREEN_SPACE_AA_FXAA** = **1** +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_SCREEN_SPACE_AA_MAX** = **2** +:ref:`ViewportScreenSpaceAA` **VIEWPORT_SCREEN_SPACE_AA_DISABLED** = ``0`` + + + +.. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_FXAA: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportScreenSpaceAA` **VIEWPORT_SCREEN_SPACE_AA_FXAA** = ``1`` + + + +.. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportScreenSpaceAA` **VIEWPORT_SCREEN_SPACE_AA_MAX** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportOcclusionCullingBuildQuality: -.. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW: - -.. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM: - -.. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH: +.. rst-class:: classref-enumeration enum **ViewportOcclusionCullingBuildQuality**: -- **VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW** = **0** +.. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW: -- **VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM** = **1** +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH** = **2** +:ref:`ViewportOcclusionCullingBuildQuality` **VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW** = ``0`` + + + +.. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportOcclusionCullingBuildQuality` **VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM** = ``1`` + + + +.. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportOcclusionCullingBuildQuality` **VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportRenderInfo: -.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME: - -.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME: - -.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME: - -.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_MAX: +.. rst-class:: classref-enumeration enum **ViewportRenderInfo**: -- **VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME** = **0** --- Number of objects drawn in a single frame. +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME: -- **VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME** = **1** --- Number of vertices drawn in a single frame. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME** = **2** --- Number of draw calls during this frame. +:ref:`ViewportRenderInfo` **VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME** = ``0`` -- **VIEWPORT_RENDER_INFO_MAX** = **3** --- Represents the size of the :ref:`ViewportRenderInfo` enum. +Number of objects drawn in a single frame. + +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfo` **VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME** = ``1`` + +Number of vertices drawn in a single frame. + +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfo` **VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME** = ``2`` + +Number of draw calls during this frame. + +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfo` **VIEWPORT_RENDER_INFO_MAX** = ``3`` + +Represents the size of the :ref:`ViewportRenderInfo` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportRenderInfoType: -.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_VISIBLE: - -.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_SHADOW: - -.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_MAX: +.. rst-class:: classref-enumeration enum **ViewportRenderInfoType**: -- **VIEWPORT_RENDER_INFO_TYPE_VISIBLE** = **0** +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_VISIBLE: -- **VIEWPORT_RENDER_INFO_TYPE_SHADOW** = **1** +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_RENDER_INFO_TYPE_MAX** = **2** +:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_VISIBLE** = ``0`` + + + +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_SHADOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_SHADOW** = ``1`` + + + +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportDebugDraw: -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DISABLED: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_UNSHADED: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_LIGHTING: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_OVERDRAW: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_WIREFRAME: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SSAO: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SSIL: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_PSSM_SPLITS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DECAL_ATLAS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SDFGI: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SDFGI_PROBES: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_GI_BUFFER: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DISABLE_LOD: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_OCCLUDERS: - -.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_MOTION_VECTORS: +.. rst-class:: classref-enumeration enum **ViewportDebugDraw**: -- **VIEWPORT_DEBUG_DRAW_DISABLED** = **0** --- Debug draw is disabled. Default setting. +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DISABLED: -- **VIEWPORT_DEBUG_DRAW_UNSHADED** = **1** --- Objects are displayed without light information. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_DEBUG_DRAW_LIGHTING** = **2** --- Objects are displayed with only light information. +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_DISABLED** = ``0`` -- **VIEWPORT_DEBUG_DRAW_OVERDRAW** = **3** --- Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others. +Debug draw is disabled. Default setting. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_UNSHADED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_UNSHADED** = ``1`` + +Objects are displayed without light information. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_LIGHTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_LIGHTING** = ``2`` + +Objects are displayed with only light information. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_OVERDRAW: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_OVERDRAW** = ``3`` + +Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others. \ **Note:** When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore. -- **VIEWPORT_DEBUG_DRAW_WIREFRAME** = **4** --- Debug draw draws objects in wireframe. +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_WIREFRAME: -- **VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER** = **5** --- Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO** = **6** --- Objects are displayed with only the albedo value from :ref:`VoxelGI`\ s. +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_WIREFRAME** = ``4`` -- **VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING** = **7** --- Objects are displayed with only the lighting value from :ref:`VoxelGI`\ s. +Debug draw draws objects in wireframe. -- **VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION** = **8** --- Objects are displayed with only the emission color from :ref:`VoxelGI`\ s. +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER: -- **VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS** = **9** --- Draws the shadow atlas that stores shadows from :ref:`OmniLight3D`\ s and :ref:`SpotLight3D`\ s in the upper left quadrant of the :ref:`Viewport`. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS** = **10** --- Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D`\ s in the upper left quadrant of the :ref:`Viewport`. +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER** = ``5`` -- **VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE** = **11** +Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects. -- **VIEWPORT_DEBUG_DRAW_SSAO** = **12** --- Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssao_enabled` set in your :ref:`WorldEnvironment`. +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO: -- **VIEWPORT_DEBUG_DRAW_SSIL** = **13** --- Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssil_enabled` set in your :ref:`WorldEnvironment`. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_DEBUG_DRAW_PSSM_SPLITS** = **14** --- Colors each PSSM split for the :ref:`DirectionalLight3D`\ s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow. +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO** = ``6`` -- **VIEWPORT_DEBUG_DRAW_DECAL_ATLAS** = **15** +Objects are displayed with only the albedo value from :ref:`VoxelGI`\ s. -- **VIEWPORT_DEBUG_DRAW_SDFGI** = **16** +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING: -- **VIEWPORT_DEBUG_DRAW_SDFGI_PROBES** = **17** +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_DEBUG_DRAW_GI_BUFFER** = **18** +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING** = ``7`` -- **VIEWPORT_DEBUG_DRAW_DISABLE_LOD** = **19** +Objects are displayed with only the lighting value from :ref:`VoxelGI`\ s. -- **VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS** = **20** +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION: -- **VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS** = **21** +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS** = **22** +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION** = ``8`` -- **VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES** = **23** +Objects are displayed with only the emission color from :ref:`VoxelGI`\ s. -- **VIEWPORT_DEBUG_DRAW_OCCLUDERS** = **24** +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS: -- **VIEWPORT_DEBUG_DRAW_MOTION_VECTORS** = **25** +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS** = ``9`` + +Draws the shadow atlas that stores shadows from :ref:`OmniLight3D`\ s and :ref:`SpotLight3D`\ s in the upper left quadrant of the :ref:`Viewport`. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS** = ``10`` + +Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D`\ s in the upper left quadrant of the :ref:`Viewport`. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE** = ``11`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SSAO: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_SSAO** = ``12`` + +Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssao_enabled` set in your :ref:`WorldEnvironment`. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SSIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_SSIL** = ``13`` + +Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssil_enabled` set in your :ref:`WorldEnvironment`. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_PSSM_SPLITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_PSSM_SPLITS** = ``14`` + +Colors each PSSM split for the :ref:`DirectionalLight3D`\ s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow. + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DECAL_ATLAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_DECAL_ATLAS** = ``15`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SDFGI: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_SDFGI** = ``16`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SDFGI_PROBES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_SDFGI_PROBES** = ``17`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_GI_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_GI_BUFFER** = ``18`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DISABLE_LOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_DISABLE_LOD** = ``19`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS** = ``20`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS** = ``21`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS** = ``22`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES** = ``23`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_OCCLUDERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_OCCLUDERS** = ``24`` + + + +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_MOTION_VECTORS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_MOTION_VECTORS** = ``25`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ViewportVRSMode: -.. _class_RenderingServer_constant_VIEWPORT_VRS_DISABLED: - -.. _class_RenderingServer_constant_VIEWPORT_VRS_TEXTURE: - -.. _class_RenderingServer_constant_VIEWPORT_VRS_XR: - -.. _class_RenderingServer_constant_VIEWPORT_VRS_MAX: +.. rst-class:: classref-enumeration enum **ViewportVRSMode**: -- **VIEWPORT_VRS_DISABLED** = **0** --- VRS is disabled. +.. _class_RenderingServer_constant_VIEWPORT_VRS_DISABLED: -- **VIEWPORT_VRS_TEXTURE** = **1** --- VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. +.. rst-class:: classref-enumeration-constant -- **VIEWPORT_VRS_XR** = **2** --- VRS texture is supplied by the primary :ref:`XRInterface`. +:ref:`ViewportVRSMode` **VIEWPORT_VRS_DISABLED** = ``0`` -- **VIEWPORT_VRS_MAX** = **3** --- Represents the size of the :ref:`ViewportVRSMode` enum. +VRS is disabled. + +.. _class_RenderingServer_constant_VIEWPORT_VRS_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportVRSMode` **VIEWPORT_VRS_TEXTURE** = ``1`` + +VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. + +.. _class_RenderingServer_constant_VIEWPORT_VRS_XR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportVRSMode` **VIEWPORT_VRS_XR** = ``2`` + +VRS texture is supplied by the primary :ref:`XRInterface`. + +.. _class_RenderingServer_constant_VIEWPORT_VRS_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportVRSMode` **VIEWPORT_VRS_MAX** = ``3`` + +Represents the size of the :ref:`ViewportVRSMode` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_SkyMode: -.. _class_RenderingServer_constant_SKY_MODE_AUTOMATIC: - -.. _class_RenderingServer_constant_SKY_MODE_QUALITY: - -.. _class_RenderingServer_constant_SKY_MODE_INCREMENTAL: - -.. _class_RenderingServer_constant_SKY_MODE_REALTIME: +.. rst-class:: classref-enumeration enum **SkyMode**: -- **SKY_MODE_AUTOMATIC** = **0** +.. _class_RenderingServer_constant_SKY_MODE_AUTOMATIC: -- **SKY_MODE_QUALITY** = **1** --- Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than :ref:`Sky.PROCESS_MODE_REALTIME` but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing :ref:`ProjectSettings.rendering/reflections/sky_reflections/ggx_samples`. +.. rst-class:: classref-enumeration-constant -- **SKY_MODE_INCREMENTAL** = **2** +:ref:`SkyMode` **SKY_MODE_AUTOMATIC** = ``0`` -- **SKY_MODE_REALTIME** = **3** --- Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. + + +.. _class_RenderingServer_constant_SKY_MODE_QUALITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkyMode` **SKY_MODE_QUALITY** = ``1`` + +Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than :ref:`Sky.PROCESS_MODE_REALTIME` but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing :ref:`ProjectSettings.rendering/reflections/sky_reflections/ggx_samples`. + +.. _class_RenderingServer_constant_SKY_MODE_INCREMENTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkyMode` **SKY_MODE_INCREMENTAL** = ``2`` + + + +.. _class_RenderingServer_constant_SKY_MODE_REALTIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkyMode` **SKY_MODE_REALTIME** = ``3`` + +Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. \ **Note:** The fast filtering algorithm is limited to 256x256 cubemaps, so :ref:`Sky.radiance_size` must be set to :ref:`Sky.RADIANCE_SIZE_256`. +.. rst-class:: classref-item-separator + ---- .. _enum_RenderingServer_EnvironmentBG: -.. _class_RenderingServer_constant_ENV_BG_CLEAR_COLOR: - -.. _class_RenderingServer_constant_ENV_BG_COLOR: - -.. _class_RenderingServer_constant_ENV_BG_SKY: - -.. _class_RenderingServer_constant_ENV_BG_CANVAS: - -.. _class_RenderingServer_constant_ENV_BG_KEEP: - -.. _class_RenderingServer_constant_ENV_BG_CAMERA_FEED: - -.. _class_RenderingServer_constant_ENV_BG_MAX: +.. rst-class:: classref-enumeration enum **EnvironmentBG**: -- **ENV_BG_CLEAR_COLOR** = **0** --- Use the clear color as background. +.. _class_RenderingServer_constant_ENV_BG_CLEAR_COLOR: -- **ENV_BG_COLOR** = **1** --- Use a specified color as the background. +.. rst-class:: classref-enumeration-constant -- **ENV_BG_SKY** = **2** --- Use a sky resource for the background. +:ref:`EnvironmentBG` **ENV_BG_CLEAR_COLOR** = ``0`` -- **ENV_BG_CANVAS** = **3** --- Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. +Use the clear color as background. -- **ENV_BG_KEEP** = **4** --- Do not clear the background, use whatever was rendered last frame as the background. +.. _class_RenderingServer_constant_ENV_BG_COLOR: -- **ENV_BG_CAMERA_FEED** = **5** --- Displays a camera feed in the background. +.. rst-class:: classref-enumeration-constant -- **ENV_BG_MAX** = **6** --- Represents the size of the :ref:`EnvironmentBG` enum. +:ref:`EnvironmentBG` **ENV_BG_COLOR** = ``1`` + +Use a specified color as the background. + +.. _class_RenderingServer_constant_ENV_BG_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentBG` **ENV_BG_SKY** = ``2`` + +Use a sky resource for the background. + +.. _class_RenderingServer_constant_ENV_BG_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentBG` **ENV_BG_CANVAS** = ``3`` + +Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. + +.. _class_RenderingServer_constant_ENV_BG_KEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentBG` **ENV_BG_KEEP** = ``4`` + +Do not clear the background, use whatever was rendered last frame as the background. + +.. _class_RenderingServer_constant_ENV_BG_CAMERA_FEED: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentBG` **ENV_BG_CAMERA_FEED** = ``5`` + +Displays a camera feed in the background. + +.. _class_RenderingServer_constant_ENV_BG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentBG` **ENV_BG_MAX** = ``6`` + +Represents the size of the :ref:`EnvironmentBG` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentAmbientSource: -.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_BG: - -.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_DISABLED: - -.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_COLOR: - -.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_SKY: +.. rst-class:: classref-enumeration enum **EnvironmentAmbientSource**: -- **ENV_AMBIENT_SOURCE_BG** = **0** --- Gather ambient light from whichever source is specified as the background. +.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_BG: -- **ENV_AMBIENT_SOURCE_DISABLED** = **1** --- Disable ambient light. +.. rst-class:: classref-enumeration-constant -- **ENV_AMBIENT_SOURCE_COLOR** = **2** --- Specify a specific :ref:`Color` for ambient light. +:ref:`EnvironmentAmbientSource` **ENV_AMBIENT_SOURCE_BG** = ``0`` -- **ENV_AMBIENT_SOURCE_SKY** = **3** --- Gather ambient light from the :ref:`Sky` regardless of what the background is. +Gather ambient light from whichever source is specified as the background. + +.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentAmbientSource` **ENV_AMBIENT_SOURCE_DISABLED** = ``1`` + +Disable ambient light. + +.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentAmbientSource` **ENV_AMBIENT_SOURCE_COLOR** = ``2`` + +Specify a specific :ref:`Color` for ambient light. + +.. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentAmbientSource` **ENV_AMBIENT_SOURCE_SKY** = ``3`` + +Gather ambient light from the :ref:`Sky` regardless of what the background is. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentReflectionSource: -.. _class_RenderingServer_constant_ENV_REFLECTION_SOURCE_BG: - -.. _class_RenderingServer_constant_ENV_REFLECTION_SOURCE_DISABLED: - -.. _class_RenderingServer_constant_ENV_REFLECTION_SOURCE_SKY: +.. rst-class:: classref-enumeration enum **EnvironmentReflectionSource**: -- **ENV_REFLECTION_SOURCE_BG** = **0** --- Use the background for reflections. +.. _class_RenderingServer_constant_ENV_REFLECTION_SOURCE_BG: -- **ENV_REFLECTION_SOURCE_DISABLED** = **1** --- Disable reflections. +.. rst-class:: classref-enumeration-constant -- **ENV_REFLECTION_SOURCE_SKY** = **2** --- Use the :ref:`Sky` for reflections regardless of what the background is. +:ref:`EnvironmentReflectionSource` **ENV_REFLECTION_SOURCE_BG** = ``0`` + +Use the background for reflections. + +.. _class_RenderingServer_constant_ENV_REFLECTION_SOURCE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentReflectionSource` **ENV_REFLECTION_SOURCE_DISABLED** = ``1`` + +Disable reflections. + +.. _class_RenderingServer_constant_ENV_REFLECTION_SOURCE_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentReflectionSource` **ENV_REFLECTION_SOURCE_SKY** = ``2`` + +Use the :ref:`Sky` for reflections regardless of what the background is. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentGlowBlendMode: -.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_ADDITIVE: - -.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_SCREEN: - -.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_SOFTLIGHT: - -.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_REPLACE: - -.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_MIX: +.. rst-class:: classref-enumeration enum **EnvironmentGlowBlendMode**: -- **ENV_GLOW_BLEND_MODE_ADDITIVE** = **0** --- Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. +.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_ADDITIVE: -- **ENV_GLOW_BLEND_MODE_SCREEN** = **1** --- Screen glow blending mode. Increases brightness, used frequently with bloom. +.. rst-class:: classref-enumeration-constant -- **ENV_GLOW_BLEND_MODE_SOFTLIGHT** = **2** --- Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). +:ref:`EnvironmentGlowBlendMode` **ENV_GLOW_BLEND_MODE_ADDITIVE** = ``0`` -- **ENV_GLOW_BLEND_MODE_REPLACE** = **3** --- Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. +Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. -- **ENV_GLOW_BLEND_MODE_MIX** = **4** --- Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. +.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_SCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentGlowBlendMode` **ENV_GLOW_BLEND_MODE_SCREEN** = ``1`` + +Screen glow blending mode. Increases brightness, used frequently with bloom. + +.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_SOFTLIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentGlowBlendMode` **ENV_GLOW_BLEND_MODE_SOFTLIGHT** = ``2`` + +Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). + +.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentGlowBlendMode` **ENV_GLOW_BLEND_MODE_REPLACE** = ``3`` + +Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. + +.. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_MIX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentGlowBlendMode` **ENV_GLOW_BLEND_MODE_MIX** = ``4`` + +Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentToneMapper: -.. _class_RenderingServer_constant_ENV_TONE_MAPPER_LINEAR: - -.. _class_RenderingServer_constant_ENV_TONE_MAPPER_REINHARD: - -.. _class_RenderingServer_constant_ENV_TONE_MAPPER_FILMIC: - -.. _class_RenderingServer_constant_ENV_TONE_MAPPER_ACES: +.. rst-class:: classref-enumeration enum **EnvironmentToneMapper**: -- **ENV_TONE_MAPPER_LINEAR** = **0** --- Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. +.. _class_RenderingServer_constant_ENV_TONE_MAPPER_LINEAR: -- **ENV_TONE_MAPPER_REINHARD** = **1** --- Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. +.. rst-class:: classref-enumeration-constant -- **ENV_TONE_MAPPER_FILMIC** = **2** --- Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`ENV_TONE_MAPPER_REINHARD`. +:ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_LINEAR** = ``0`` -- **ENV_TONE_MAPPER_ACES** = **3** --- Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`ENV_TONE_MAPPER_REINHARD` and :ref:`ENV_TONE_MAPPER_FILMIC`. +Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. + +.. _class_RenderingServer_constant_ENV_TONE_MAPPER_REINHARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_REINHARD** = ``1`` + +Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. + +.. _class_RenderingServer_constant_ENV_TONE_MAPPER_FILMIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_FILMIC** = ``2`` + +Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`ENV_TONE_MAPPER_REINHARD`. + +.. _class_RenderingServer_constant_ENV_TONE_MAPPER_ACES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_ACES** = ``3`` + +Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`ENV_TONE_MAPPER_REINHARD` and :ref:`ENV_TONE_MAPPER_FILMIC`. \ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. +.. rst-class:: classref-item-separator + ---- .. _enum_RenderingServer_EnvironmentSSRRoughnessQuality: -.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_DISABLED: - -.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_LOW: - -.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_MEDIUM: - -.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_HIGH: +.. rst-class:: classref-enumeration enum **EnvironmentSSRRoughnessQuality**: -- **ENV_SSR_ROUGHNESS_QUALITY_DISABLED** = **0** --- Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option. +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_DISABLED: -- **ENV_SSR_ROUGHNESS_QUALITY_LOW** = **1** --- Low quality of roughness filter for screen-space reflections. +.. rst-class:: classref-enumeration-constant -- **ENV_SSR_ROUGHNESS_QUALITY_MEDIUM** = **2** --- Medium quality of roughness filter for screen-space reflections. +:ref:`EnvironmentSSRRoughnessQuality` **ENV_SSR_ROUGHNESS_QUALITY_DISABLED** = ``0`` -- **ENV_SSR_ROUGHNESS_QUALITY_HIGH** = **3** --- High quality of roughness filter for screen-space reflections. This is the slowest option. +Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option. + +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_LOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSRRoughnessQuality` **ENV_SSR_ROUGHNESS_QUALITY_LOW** = ``1`` + +Low quality of roughness filter for screen-space reflections. + +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSRRoughnessQuality` **ENV_SSR_ROUGHNESS_QUALITY_MEDIUM** = ``2`` + +Medium quality of roughness filter for screen-space reflections. + +.. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSRRoughnessQuality` **ENV_SSR_ROUGHNESS_QUALITY_HIGH** = ``3`` + +High quality of roughness filter for screen-space reflections. This is the slowest option. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentSSAOQuality: -.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_VERY_LOW: - -.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_LOW: - -.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_MEDIUM: - -.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_HIGH: - -.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_ULTRA: +.. rst-class:: classref-enumeration enum **EnvironmentSSAOQuality**: -- **ENV_SSAO_QUALITY_VERY_LOW** = **0** --- Lowest quality of screen-space ambient occlusion. +.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_VERY_LOW: -- **ENV_SSAO_QUALITY_LOW** = **1** --- Low quality screen-space ambient occlusion. +.. rst-class:: classref-enumeration-constant -- **ENV_SSAO_QUALITY_MEDIUM** = **2** --- Medium quality screen-space ambient occlusion. +:ref:`EnvironmentSSAOQuality` **ENV_SSAO_QUALITY_VERY_LOW** = ``0`` -- **ENV_SSAO_QUALITY_HIGH** = **3** --- High quality screen-space ambient occlusion. +Lowest quality of screen-space ambient occlusion. -- **ENV_SSAO_QUALITY_ULTRA** = **4** --- Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. +.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_LOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSAOQuality` **ENV_SSAO_QUALITY_LOW** = ``1`` + +Low quality screen-space ambient occlusion. + +.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSAOQuality` **ENV_SSAO_QUALITY_MEDIUM** = ``2`` + +Medium quality screen-space ambient occlusion. + +.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSAOQuality` **ENV_SSAO_QUALITY_HIGH** = ``3`` + +High quality screen-space ambient occlusion. + +.. _class_RenderingServer_constant_ENV_SSAO_QUALITY_ULTRA: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSAOQuality` **ENV_SSAO_QUALITY_ULTRA** = ``4`` + +Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentSSILQuality: -.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_VERY_LOW: - -.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_LOW: - -.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_MEDIUM: - -.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_HIGH: - -.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_ULTRA: +.. rst-class:: classref-enumeration enum **EnvironmentSSILQuality**: -- **ENV_SSIL_QUALITY_VERY_LOW** = **0** --- Lowest quality of screen-space indirect lighting. +.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_VERY_LOW: -- **ENV_SSIL_QUALITY_LOW** = **1** --- Low quality screen-space indirect lighting. +.. rst-class:: classref-enumeration-constant -- **ENV_SSIL_QUALITY_MEDIUM** = **2** --- High quality screen-space indirect lighting. +:ref:`EnvironmentSSILQuality` **ENV_SSIL_QUALITY_VERY_LOW** = ``0`` -- **ENV_SSIL_QUALITY_HIGH** = **3** --- High quality screen-space indirect lighting. +Lowest quality of screen-space indirect lighting. -- **ENV_SSIL_QUALITY_ULTRA** = **4** --- Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. +.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_LOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSILQuality` **ENV_SSIL_QUALITY_LOW** = ``1`` + +Low quality screen-space indirect lighting. + +.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSILQuality` **ENV_SSIL_QUALITY_MEDIUM** = ``2`` + +High quality screen-space indirect lighting. + +.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSILQuality` **ENV_SSIL_QUALITY_HIGH** = ``3`` + +High quality screen-space indirect lighting. + +.. _class_RenderingServer_constant_ENV_SSIL_QUALITY_ULTRA: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSSILQuality` **ENV_SSIL_QUALITY_ULTRA** = ``4`` + +Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentSDFGIYScale: -.. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_50_PERCENT: - -.. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_75_PERCENT: - -.. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_100_PERCENT: +.. rst-class:: classref-enumeration enum **EnvironmentSDFGIYScale**: -- **ENV_SDFGI_Y_SCALE_50_PERCENT** = **0** +.. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_50_PERCENT: -- **ENV_SDFGI_Y_SCALE_75_PERCENT** = **1** +.. rst-class:: classref-enumeration-constant -- **ENV_SDFGI_Y_SCALE_100_PERCENT** = **2** +:ref:`EnvironmentSDFGIYScale` **ENV_SDFGI_Y_SCALE_50_PERCENT** = ``0`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_75_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIYScale` **ENV_SDFGI_Y_SCALE_75_PERCENT** = ``1`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_100_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIYScale` **ENV_SDFGI_Y_SCALE_100_PERCENT** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentSDFGIRayCount: -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_4: - -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_8: - -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_16: - -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_32: - -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_64: - -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_96: - -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_128: - -.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_MAX: +.. rst-class:: classref-enumeration enum **EnvironmentSDFGIRayCount**: -- **ENV_SDFGI_RAY_COUNT_4** = **0** +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_4: -- **ENV_SDFGI_RAY_COUNT_8** = **1** +.. rst-class:: classref-enumeration-constant -- **ENV_SDFGI_RAY_COUNT_16** = **2** +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_4** = ``0`` -- **ENV_SDFGI_RAY_COUNT_32** = **3** -- **ENV_SDFGI_RAY_COUNT_64** = **4** -- **ENV_SDFGI_RAY_COUNT_96** = **5** +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_8: -- **ENV_SDFGI_RAY_COUNT_128** = **6** +.. rst-class:: classref-enumeration-constant -- **ENV_SDFGI_RAY_COUNT_MAX** = **7** +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_8** = ``1`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_16: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_16** = ``2`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_32: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_32** = ``3`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_64: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_64** = ``4`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_96: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_96** = ``5`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_128: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_128** = ``6`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIRayCount` **ENV_SDFGI_RAY_COUNT_MAX** = ``7`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentSDFGIFramesToConverge: -.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_5_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_10_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_15_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_20_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_25_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_30_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_MAX: +.. rst-class:: classref-enumeration enum **EnvironmentSDFGIFramesToConverge**: -- **ENV_SDFGI_CONVERGE_IN_5_FRAMES** = **0** +.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_5_FRAMES: -- **ENV_SDFGI_CONVERGE_IN_10_FRAMES** = **1** +.. rst-class:: classref-enumeration-constant -- **ENV_SDFGI_CONVERGE_IN_15_FRAMES** = **2** +:ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_5_FRAMES** = ``0`` -- **ENV_SDFGI_CONVERGE_IN_20_FRAMES** = **3** -- **ENV_SDFGI_CONVERGE_IN_25_FRAMES** = **4** -- **ENV_SDFGI_CONVERGE_IN_30_FRAMES** = **5** +.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_10_FRAMES: -- **ENV_SDFGI_CONVERGE_MAX** = **6** +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_10_FRAMES** = ``1`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_15_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_15_FRAMES** = ``2`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_20_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_20_FRAMES** = ``3`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_25_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_25_FRAMES** = ``4`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_30_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_IN_30_FRAMES** = ``5`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToConverge` **ENV_SDFGI_CONVERGE_MAX** = ``6`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_EnvironmentSDFGIFramesToUpdateLight: -.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME: - -.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES: - -.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_MAX: +.. rst-class:: classref-enumeration enum **EnvironmentSDFGIFramesToUpdateLight**: -- **ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME** = **0** +.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME: -- **ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES** = **1** +.. rst-class:: classref-enumeration-constant -- **ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES** = **2** +:ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME** = ``0`` -- **ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES** = **3** -- **ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES** = **4** -- **ENV_SDFGI_UPDATE_LIGHT_MAX** = **5** +.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES** = ``1`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES** = ``2`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES** = ``3`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES** = ``4`` + + + +.. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentSDFGIFramesToUpdateLight` **ENV_SDFGI_UPDATE_LIGHT_MAX** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_SubSurfaceScatteringQuality: -.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_DISABLED: - -.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_LOW: - -.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_MEDIUM: - -.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_HIGH: +.. rst-class:: classref-enumeration enum **SubSurfaceScatteringQuality**: -- **SUB_SURFACE_SCATTERING_QUALITY_DISABLED** = **0** +.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_DISABLED: -- **SUB_SURFACE_SCATTERING_QUALITY_LOW** = **1** +.. rst-class:: classref-enumeration-constant -- **SUB_SURFACE_SCATTERING_QUALITY_MEDIUM** = **2** +:ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_DISABLED** = ``0`` -- **SUB_SURFACE_SCATTERING_QUALITY_HIGH** = **3** + + +.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_LOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_LOW** = ``1`` + + + +.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_MEDIUM** = ``2`` + + + +.. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubSurfaceScatteringQuality` **SUB_SURFACE_SCATTERING_QUALITY_HIGH** = ``3`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_DOFBokehShape: -.. _class_RenderingServer_constant_DOF_BOKEH_BOX: - -.. _class_RenderingServer_constant_DOF_BOKEH_HEXAGON: - -.. _class_RenderingServer_constant_DOF_BOKEH_CIRCLE: +.. rst-class:: classref-enumeration enum **DOFBokehShape**: -- **DOF_BOKEH_BOX** = **0** --- Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern. +.. _class_RenderingServer_constant_DOF_BOKEH_BOX: -- **DOF_BOKEH_HEXAGON** = **1** --- Calculates DOF blur using a hexagon shaped filter. +.. rst-class:: classref-enumeration-constant -- **DOF_BOKEH_CIRCLE** = **2** --- Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes). +:ref:`DOFBokehShape` **DOF_BOKEH_BOX** = ``0`` + +Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern. + +.. _class_RenderingServer_constant_DOF_BOKEH_HEXAGON: + +.. rst-class:: classref-enumeration-constant + +:ref:`DOFBokehShape` **DOF_BOKEH_HEXAGON** = ``1`` + +Calculates DOF blur using a hexagon shaped filter. + +.. _class_RenderingServer_constant_DOF_BOKEH_CIRCLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DOFBokehShape` **DOF_BOKEH_CIRCLE** = ``2`` + +Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes). + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_DOFBlurQuality: -.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_VERY_LOW: - -.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_LOW: - -.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_MEDIUM: - -.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_HIGH: +.. rst-class:: classref-enumeration enum **DOFBlurQuality**: -- **DOF_BLUR_QUALITY_VERY_LOW** = **0** --- Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts. +.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_VERY_LOW: -- **DOF_BLUR_QUALITY_LOW** = **1** --- Low quality DOF blur. +.. rst-class:: classref-enumeration-constant -- **DOF_BLUR_QUALITY_MEDIUM** = **2** --- Medium quality DOF blur. +:ref:`DOFBlurQuality` **DOF_BLUR_QUALITY_VERY_LOW** = ``0`` -- **DOF_BLUR_QUALITY_HIGH** = **3** --- Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower. +Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts. + +.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_LOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`DOFBlurQuality` **DOF_BLUR_QUALITY_LOW** = ``1`` + +Low quality DOF blur. + +.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_MEDIUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DOFBlurQuality` **DOF_BLUR_QUALITY_MEDIUM** = ``2`` + +Medium quality DOF blur. + +.. _class_RenderingServer_constant_DOF_BLUR_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`DOFBlurQuality` **DOF_BLUR_QUALITY_HIGH** = ``3`` + +Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_InstanceType: -.. _class_RenderingServer_constant_INSTANCE_NONE: - -.. _class_RenderingServer_constant_INSTANCE_MESH: - -.. _class_RenderingServer_constant_INSTANCE_MULTIMESH: - -.. _class_RenderingServer_constant_INSTANCE_PARTICLES: - -.. _class_RenderingServer_constant_INSTANCE_PARTICLES_COLLISION: - -.. _class_RenderingServer_constant_INSTANCE_LIGHT: - -.. _class_RenderingServer_constant_INSTANCE_REFLECTION_PROBE: - -.. _class_RenderingServer_constant_INSTANCE_DECAL: - -.. _class_RenderingServer_constant_INSTANCE_VOXEL_GI: - -.. _class_RenderingServer_constant_INSTANCE_LIGHTMAP: - -.. _class_RenderingServer_constant_INSTANCE_OCCLUDER: - -.. _class_RenderingServer_constant_INSTANCE_VISIBLITY_NOTIFIER: - -.. _class_RenderingServer_constant_INSTANCE_FOG_VOLUME: - -.. _class_RenderingServer_constant_INSTANCE_MAX: - -.. _class_RenderingServer_constant_INSTANCE_GEOMETRY_MASK: +.. rst-class:: classref-enumeration enum **InstanceType**: -- **INSTANCE_NONE** = **0** --- The instance does not have a type. +.. _class_RenderingServer_constant_INSTANCE_NONE: -- **INSTANCE_MESH** = **1** --- The instance is a mesh. +.. rst-class:: classref-enumeration-constant -- **INSTANCE_MULTIMESH** = **2** --- The instance is a multimesh. +:ref:`InstanceType` **INSTANCE_NONE** = ``0`` -- **INSTANCE_PARTICLES** = **3** --- The instance is a particle emitter. +The instance does not have a type. -- **INSTANCE_PARTICLES_COLLISION** = **4** +.. _class_RenderingServer_constant_INSTANCE_MESH: -- **INSTANCE_LIGHT** = **5** --- The instance is a light. +.. rst-class:: classref-enumeration-constant -- **INSTANCE_REFLECTION_PROBE** = **6** --- The instance is a reflection probe. +:ref:`InstanceType` **INSTANCE_MESH** = ``1`` -- **INSTANCE_DECAL** = **7** --- The instance is a decal. +The instance is a mesh. -- **INSTANCE_VOXEL_GI** = **8** --- The instance is a VoxelGI. +.. _class_RenderingServer_constant_INSTANCE_MULTIMESH: -- **INSTANCE_LIGHTMAP** = **9** --- The instance is a lightmap. +.. rst-class:: classref-enumeration-constant -- **INSTANCE_OCCLUDER** = **10** +:ref:`InstanceType` **INSTANCE_MULTIMESH** = ``2`` -- **INSTANCE_VISIBLITY_NOTIFIER** = **11** +The instance is a multimesh. -- **INSTANCE_FOG_VOLUME** = **12** +.. _class_RenderingServer_constant_INSTANCE_PARTICLES: -- **INSTANCE_MAX** = **13** --- Represents the size of the :ref:`InstanceType` enum. +.. rst-class:: classref-enumeration-constant -- **INSTANCE_GEOMETRY_MASK** = **14** --- A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). +:ref:`InstanceType` **INSTANCE_PARTICLES** = ``3`` + +The instance is a particle emitter. + +.. _class_RenderingServer_constant_INSTANCE_PARTICLES_COLLISION: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_PARTICLES_COLLISION** = ``4`` + + + +.. _class_RenderingServer_constant_INSTANCE_LIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_LIGHT** = ``5`` + +The instance is a light. + +.. _class_RenderingServer_constant_INSTANCE_REFLECTION_PROBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_REFLECTION_PROBE** = ``6`` + +The instance is a reflection probe. + +.. _class_RenderingServer_constant_INSTANCE_DECAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_DECAL** = ``7`` + +The instance is a decal. + +.. _class_RenderingServer_constant_INSTANCE_VOXEL_GI: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_VOXEL_GI** = ``8`` + +The instance is a VoxelGI. + +.. _class_RenderingServer_constant_INSTANCE_LIGHTMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_LIGHTMAP** = ``9`` + +The instance is a lightmap. + +.. _class_RenderingServer_constant_INSTANCE_OCCLUDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_OCCLUDER** = ``10`` + + + +.. _class_RenderingServer_constant_INSTANCE_VISIBLITY_NOTIFIER: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_VISIBLITY_NOTIFIER** = ``11`` + + + +.. _class_RenderingServer_constant_INSTANCE_FOG_VOLUME: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_FOG_VOLUME** = ``12`` + + + +.. _class_RenderingServer_constant_INSTANCE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_MAX** = ``13`` + +Represents the size of the :ref:`InstanceType` enum. + +.. _class_RenderingServer_constant_INSTANCE_GEOMETRY_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceType` **INSTANCE_GEOMETRY_MASK** = ``14`` + +A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_InstanceFlags: -.. _class_RenderingServer_constant_INSTANCE_FLAG_USE_BAKED_LIGHT: - -.. _class_RenderingServer_constant_INSTANCE_FLAG_USE_DYNAMIC_GI: - -.. _class_RenderingServer_constant_INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE: - -.. _class_RenderingServer_constant_INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING: - -.. _class_RenderingServer_constant_INSTANCE_FLAG_MAX: +.. rst-class:: classref-enumeration enum **InstanceFlags**: -- **INSTANCE_FLAG_USE_BAKED_LIGHT** = **0** --- Allows the instance to be used in baked lighting. +.. _class_RenderingServer_constant_INSTANCE_FLAG_USE_BAKED_LIGHT: -- **INSTANCE_FLAG_USE_DYNAMIC_GI** = **1** --- Allows the instance to be used with dynamic global illumination. +.. rst-class:: classref-enumeration-constant -- **INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE** = **2** --- When set, manually requests to draw geometry on next frame. +:ref:`InstanceFlags` **INSTANCE_FLAG_USE_BAKED_LIGHT** = ``0`` -- **INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING** = **3** +Allows the instance to be used in baked lighting. -- **INSTANCE_FLAG_MAX** = **4** --- Represents the size of the :ref:`InstanceFlags` enum. +.. _class_RenderingServer_constant_INSTANCE_FLAG_USE_DYNAMIC_GI: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceFlags` **INSTANCE_FLAG_USE_DYNAMIC_GI** = ``1`` + +Allows the instance to be used with dynamic global illumination. + +.. _class_RenderingServer_constant_INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceFlags` **INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE** = ``2`` + +When set, manually requests to draw geometry on next frame. + +.. _class_RenderingServer_constant_INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceFlags` **INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING** = ``3`` + + + +.. _class_RenderingServer_constant_INSTANCE_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`InstanceFlags` **INSTANCE_FLAG_MAX** = ``4`` + +Represents the size of the :ref:`InstanceFlags` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_ShadowCastingSetting: -.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_OFF: - -.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_ON: - -.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED: - -.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY: +.. rst-class:: classref-enumeration enum **ShadowCastingSetting**: -- **SHADOW_CASTING_SETTING_OFF** = **0** --- Disable shadows from this instance. +.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_OFF: -- **SHADOW_CASTING_SETTING_ON** = **1** --- Cast shadows from this instance. +.. rst-class:: classref-enumeration-constant -- **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = **2** --- Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_OFF** = ``0`` -- **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = **3** --- Only render the shadows from the object. The object itself will not be drawn. +Disable shadows from this instance. + +.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_ON: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_ON** = ``1`` + +Cast shadows from this instance. + +.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = ``2`` + +Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. + +.. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowCastingSetting` **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = ``3`` + +Only render the shadows from the object. The object itself will not be drawn. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_VisibilityRangeFadeMode: -.. _class_RenderingServer_constant_VISIBILITY_RANGE_FADE_DISABLED: - -.. _class_RenderingServer_constant_VISIBILITY_RANGE_FADE_SELF: - -.. _class_RenderingServer_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES: +.. rst-class:: classref-enumeration enum **VisibilityRangeFadeMode**: -- **VISIBILITY_RANGE_FADE_DISABLED** = **0** --- Disable visibility range fading for the given instance. +.. _class_RenderingServer_constant_VISIBILITY_RANGE_FADE_DISABLED: -- **VISIBILITY_RANGE_FADE_SELF** = **1** --- Fade-out the given instance when it approaches its visibility range limits. +.. rst-class:: classref-enumeration-constant -- **VISIBILITY_RANGE_FADE_DEPENDENCIES** = **2** --- Fade-in the given instance's dependencies when reaching its visibility range limits. +:ref:`VisibilityRangeFadeMode` **VISIBILITY_RANGE_FADE_DISABLED** = ``0`` + +Disable visibility range fading for the given instance. + +.. _class_RenderingServer_constant_VISIBILITY_RANGE_FADE_SELF: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityRangeFadeMode` **VISIBILITY_RANGE_FADE_SELF** = ``1`` + +Fade-out the given instance when it approaches its visibility range limits. + +.. _class_RenderingServer_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityRangeFadeMode` **VISIBILITY_RANGE_FADE_DEPENDENCIES** = ``2`` + +Fade-in the given instance's dependencies when reaching its visibility range limits. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_BakeChannels: -.. _class_RenderingServer_constant_BAKE_CHANNEL_ALBEDO_ALPHA: - -.. _class_RenderingServer_constant_BAKE_CHANNEL_NORMAL: - -.. _class_RenderingServer_constant_BAKE_CHANNEL_ORM: - -.. _class_RenderingServer_constant_BAKE_CHANNEL_EMISSION: +.. rst-class:: classref-enumeration enum **BakeChannels**: -- **BAKE_CHANNEL_ALBEDO_ALPHA** = **0** +.. _class_RenderingServer_constant_BAKE_CHANNEL_ALBEDO_ALPHA: -- **BAKE_CHANNEL_NORMAL** = **1** +.. rst-class:: classref-enumeration-constant -- **BAKE_CHANNEL_ORM** = **2** +:ref:`BakeChannels` **BAKE_CHANNEL_ALBEDO_ALPHA** = ``0`` -- **BAKE_CHANNEL_EMISSION** = **3** + + +.. _class_RenderingServer_constant_BAKE_CHANNEL_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeChannels` **BAKE_CHANNEL_NORMAL** = ``1`` + + + +.. _class_RenderingServer_constant_BAKE_CHANNEL_ORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeChannels` **BAKE_CHANNEL_ORM** = ``2`` + + + +.. _class_RenderingServer_constant_BAKE_CHANNEL_EMISSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeChannels` **BAKE_CHANNEL_EMISSION** = ``3`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasTextureChannel: -.. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_DIFFUSE: - -.. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_NORMAL: - -.. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_SPECULAR: +.. rst-class:: classref-enumeration enum **CanvasTextureChannel**: -- **CANVAS_TEXTURE_CHANNEL_DIFFUSE** = **0** +.. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_DIFFUSE: -- **CANVAS_TEXTURE_CHANNEL_NORMAL** = **1** +.. rst-class:: classref-enumeration-constant -- **CANVAS_TEXTURE_CHANNEL_SPECULAR** = **2** +:ref:`CanvasTextureChannel` **CANVAS_TEXTURE_CHANNEL_DIFFUSE** = ``0`` + + + +.. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasTextureChannel` **CANVAS_TEXTURE_CHANNEL_NORMAL** = ``1`` + + + +.. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_SPECULAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasTextureChannel` **CANVAS_TEXTURE_CHANNEL_SPECULAR** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_NinePatchAxisMode: -.. _class_RenderingServer_constant_NINE_PATCH_STRETCH: - -.. _class_RenderingServer_constant_NINE_PATCH_TILE: - -.. _class_RenderingServer_constant_NINE_PATCH_TILE_FIT: +.. rst-class:: classref-enumeration enum **NinePatchAxisMode**: -- **NINE_PATCH_STRETCH** = **0** --- The nine patch gets stretched where needed. +.. _class_RenderingServer_constant_NINE_PATCH_STRETCH: -- **NINE_PATCH_TILE** = **1** --- The nine patch gets filled with tiles where needed. +.. rst-class:: classref-enumeration-constant -- **NINE_PATCH_TILE_FIT** = **2** --- The nine patch gets filled with tiles where needed and stretches them a bit if needed. +:ref:`NinePatchAxisMode` **NINE_PATCH_STRETCH** = ``0`` + +The nine patch gets stretched where needed. + +.. _class_RenderingServer_constant_NINE_PATCH_TILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`NinePatchAxisMode` **NINE_PATCH_TILE** = ``1`` + +The nine patch gets filled with tiles where needed. + +.. _class_RenderingServer_constant_NINE_PATCH_TILE_FIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`NinePatchAxisMode` **NINE_PATCH_TILE_FIT** = ``2`` + +The nine patch gets filled with tiles where needed and stretches them a bit if needed. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasItemTextureFilter: -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_DEFAULT: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_MAX: +.. rst-class:: classref-enumeration enum **CanvasItemTextureFilter**: -- **CANVAS_ITEM_TEXTURE_FILTER_DEFAULT** = **0** --- Uses the default filter mode for this :ref:`Viewport`. +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_DEFAULT: -- **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. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_DEFAULT** = ``0`` -- **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. +Uses the default filter mode for this :ref:`Viewport`. -- **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = **4** --- The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: -- **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. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``1`` -- **CANVAS_ITEM_TEXTURE_FILTER_MAX** = **7** --- Max value for :ref:`CanvasItemTextureFilter` enum. +The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``4`` + +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_MAX** = ``7`` + +Max value for :ref:`CanvasItemTextureFilter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasItemTextureRepeat: -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR: - -.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_MAX: +.. rst-class:: classref-enumeration enum **CanvasItemTextureRepeat**: -- **CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT** = **0** --- Uses the default repeat mode for this :ref:`Viewport`. +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT: -- **CANVAS_ITEM_TEXTURE_REPEAT_DISABLED** = **1** --- Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture. +.. rst-class:: classref-enumeration-constant -- **CANVAS_ITEM_TEXTURE_REPEAT_ENABLED** = **2** --- Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. +:ref:`CanvasItemTextureRepeat` **CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT** = ``0`` -- **CANVAS_ITEM_TEXTURE_REPEAT_MIRROR** = **3** --- Flip the texture when repeating so that the edge lines up instead of abruptly changing. +Uses the default repeat mode for this :ref:`Viewport`. -- **CANVAS_ITEM_TEXTURE_REPEAT_MAX** = **4** --- Max value for :ref:`CanvasItemTextureRepeat` enum. +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasItemTextureRepeat` **CANVAS_ITEM_TEXTURE_REPEAT_DISABLED** = ``1`` + +Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasItemTextureRepeat` **CANVAS_ITEM_TEXTURE_REPEAT_ENABLED** = ``2`` + +Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasItemTextureRepeat` **CANVAS_ITEM_TEXTURE_REPEAT_MIRROR** = ``3`` + +Flip the texture when repeating so that the edge lines up instead of abruptly changing. + +.. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasItemTextureRepeat` **CANVAS_ITEM_TEXTURE_REPEAT_MAX** = ``4`` + +Max value for :ref:`CanvasItemTextureRepeat` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasGroupMode: -.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_DISABLED: - -.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_CLIP_ONLY: - -.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_CLIP_AND_DRAW: - -.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_TRANSPARENT: +.. rst-class:: classref-enumeration enum **CanvasGroupMode**: -- **CANVAS_GROUP_MODE_DISABLED** = **0** +.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_DISABLED: -- **CANVAS_GROUP_MODE_CLIP_ONLY** = **1** +.. rst-class:: classref-enumeration-constant -- **CANVAS_GROUP_MODE_CLIP_AND_DRAW** = **2** +:ref:`CanvasGroupMode` **CANVAS_GROUP_MODE_DISABLED** = ``0`` -- **CANVAS_GROUP_MODE_TRANSPARENT** = **3** + + +.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_CLIP_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasGroupMode` **CANVAS_GROUP_MODE_CLIP_ONLY** = ``1`` + + + +.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_CLIP_AND_DRAW: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasGroupMode` **CANVAS_GROUP_MODE_CLIP_AND_DRAW** = ``2`` + + + +.. _class_RenderingServer_constant_CANVAS_GROUP_MODE_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasGroupMode` **CANVAS_GROUP_MODE_TRANSPARENT** = ``3`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasLightMode: -.. _class_RenderingServer_constant_CANVAS_LIGHT_MODE_POINT: - -.. _class_RenderingServer_constant_CANVAS_LIGHT_MODE_DIRECTIONAL: +.. rst-class:: classref-enumeration enum **CanvasLightMode**: -- **CANVAS_LIGHT_MODE_POINT** = **0** +.. _class_RenderingServer_constant_CANVAS_LIGHT_MODE_POINT: -- **CANVAS_LIGHT_MODE_DIRECTIONAL** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasLightMode` **CANVAS_LIGHT_MODE_POINT** = ``0`` + + + +.. _class_RenderingServer_constant_CANVAS_LIGHT_MODE_DIRECTIONAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasLightMode` **CANVAS_LIGHT_MODE_DIRECTIONAL** = ``1`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasLightBlendMode: -.. _class_RenderingServer_constant_CANVAS_LIGHT_BLEND_MODE_ADD: - -.. _class_RenderingServer_constant_CANVAS_LIGHT_BLEND_MODE_SUB: - -.. _class_RenderingServer_constant_CANVAS_LIGHT_BLEND_MODE_MIX: +.. rst-class:: classref-enumeration enum **CanvasLightBlendMode**: -- **CANVAS_LIGHT_BLEND_MODE_ADD** = **0** --- Adds light color additive to the canvas. +.. _class_RenderingServer_constant_CANVAS_LIGHT_BLEND_MODE_ADD: -- **CANVAS_LIGHT_BLEND_MODE_SUB** = **1** --- Adds light color subtractive to the canvas. +.. rst-class:: classref-enumeration-constant -- **CANVAS_LIGHT_BLEND_MODE_MIX** = **2** --- The light adds color depending on transparency. +:ref:`CanvasLightBlendMode` **CANVAS_LIGHT_BLEND_MODE_ADD** = ``0`` + +Adds light color additive to the canvas. + +.. _class_RenderingServer_constant_CANVAS_LIGHT_BLEND_MODE_SUB: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasLightBlendMode` **CANVAS_LIGHT_BLEND_MODE_SUB** = ``1`` + +Adds light color subtractive to the canvas. + +.. _class_RenderingServer_constant_CANVAS_LIGHT_BLEND_MODE_MIX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasLightBlendMode` **CANVAS_LIGHT_BLEND_MODE_MIX** = ``2`` + +The light adds color depending on transparency. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasLightShadowFilter: -.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_NONE: - -.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_PCF5: - -.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_PCF13: - -.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_MAX: +.. rst-class:: classref-enumeration enum **CanvasLightShadowFilter**: -- **CANVAS_LIGHT_FILTER_NONE** = **0** --- Do not apply a filter to canvas light shadows. +.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_NONE: -- **CANVAS_LIGHT_FILTER_PCF5** = **1** --- Use PCF5 filtering to filter canvas light shadows. +.. rst-class:: classref-enumeration-constant -- **CANVAS_LIGHT_FILTER_PCF13** = **2** --- Use PCF13 filtering to filter canvas light shadows. +:ref:`CanvasLightShadowFilter` **CANVAS_LIGHT_FILTER_NONE** = ``0`` -- **CANVAS_LIGHT_FILTER_MAX** = **3** --- Max value of the :ref:`CanvasLightShadowFilter` enum. +Do not apply a filter to canvas light shadows. + +.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_PCF5: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasLightShadowFilter` **CANVAS_LIGHT_FILTER_PCF5** = ``1`` + +Use PCF5 filtering to filter canvas light shadows. + +.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_PCF13: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasLightShadowFilter` **CANVAS_LIGHT_FILTER_PCF13** = ``2`` + +Use PCF13 filtering to filter canvas light shadows. + +.. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasLightShadowFilter` **CANVAS_LIGHT_FILTER_MAX** = ``3`` + +Max value of the :ref:`CanvasLightShadowFilter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_CanvasOccluderPolygonCullMode: -.. _class_RenderingServer_constant_CANVAS_OCCLUDER_POLYGON_CULL_DISABLED: - -.. _class_RenderingServer_constant_CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE: - -.. _class_RenderingServer_constant_CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE: +.. rst-class:: classref-enumeration enum **CanvasOccluderPolygonCullMode**: -- **CANVAS_OCCLUDER_POLYGON_CULL_DISABLED** = **0** --- Culling of the canvas occluder is disabled. +.. _class_RenderingServer_constant_CANVAS_OCCLUDER_POLYGON_CULL_DISABLED: -- **CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE** = **1** --- Culling of the canvas occluder is clockwise. +.. rst-class:: classref-enumeration-constant -- **CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE** = **2** --- Culling of the canvas occluder is counterclockwise. +:ref:`CanvasOccluderPolygonCullMode` **CANVAS_OCCLUDER_POLYGON_CULL_DISABLED** = ``0`` + +Culling of the canvas occluder is disabled. + +.. _class_RenderingServer_constant_CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasOccluderPolygonCullMode` **CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE** = ``1`` + +Culling of the canvas occluder is clockwise. + +.. _class_RenderingServer_constant_CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CanvasOccluderPolygonCullMode` **CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE** = ``2`` + +Culling of the canvas occluder is counterclockwise. + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_GlobalShaderParameterType: -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BOOL: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC2: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC3: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC4: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_INT: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC2: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC3: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC4: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_RECT2I: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UINT: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC2: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC3: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC4: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_FLOAT: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC2: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC3: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC4: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_COLOR: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_RECT2: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT2: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT3: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT4: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_TRANSFORM_2D: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_TRANSFORM: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER2D: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER2DARRAY: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER3D: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLERCUBE: - -.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAX: +.. rst-class:: classref-enumeration enum **GlobalShaderParameterType**: -- **GLOBAL_VAR_TYPE_BOOL** = **0** +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BOOL: -- **GLOBAL_VAR_TYPE_BVEC2** = **1** +.. rst-class:: classref-enumeration-constant -- **GLOBAL_VAR_TYPE_BVEC3** = **2** +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BOOL** = ``0`` -- **GLOBAL_VAR_TYPE_BVEC4** = **3** -- **GLOBAL_VAR_TYPE_INT** = **4** -- **GLOBAL_VAR_TYPE_IVEC2** = **5** +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC2: -- **GLOBAL_VAR_TYPE_IVEC3** = **6** +.. rst-class:: classref-enumeration-constant -- **GLOBAL_VAR_TYPE_IVEC4** = **7** +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BVEC2** = ``1`` -- **GLOBAL_VAR_TYPE_RECT2I** = **8** -- **GLOBAL_VAR_TYPE_UINT** = **9** -- **GLOBAL_VAR_TYPE_UVEC2** = **10** +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC3: -- **GLOBAL_VAR_TYPE_UVEC3** = **11** +.. rst-class:: classref-enumeration-constant -- **GLOBAL_VAR_TYPE_UVEC4** = **12** +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BVEC3** = ``2`` -- **GLOBAL_VAR_TYPE_FLOAT** = **13** -- **GLOBAL_VAR_TYPE_VEC2** = **14** -- **GLOBAL_VAR_TYPE_VEC3** = **15** +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BVEC4: -- **GLOBAL_VAR_TYPE_VEC4** = **16** +.. rst-class:: classref-enumeration-constant -- **GLOBAL_VAR_TYPE_COLOR** = **17** +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_BVEC4** = ``3`` -- **GLOBAL_VAR_TYPE_RECT2** = **18** -- **GLOBAL_VAR_TYPE_MAT2** = **19** -- **GLOBAL_VAR_TYPE_MAT3** = **20** +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_INT: -- **GLOBAL_VAR_TYPE_MAT4** = **21** +.. rst-class:: classref-enumeration-constant -- **GLOBAL_VAR_TYPE_TRANSFORM_2D** = **22** +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_INT** = ``4`` -- **GLOBAL_VAR_TYPE_TRANSFORM** = **23** -- **GLOBAL_VAR_TYPE_SAMPLER2D** = **24** -- **GLOBAL_VAR_TYPE_SAMPLER2DARRAY** = **25** +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC2: -- **GLOBAL_VAR_TYPE_SAMPLER3D** = **26** +.. rst-class:: classref-enumeration-constant -- **GLOBAL_VAR_TYPE_SAMPLERCUBE** = **27** +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_IVEC2** = ``5`` -- **GLOBAL_VAR_TYPE_MAX** = **28** + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_IVEC3** = ``6`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_IVEC4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_IVEC4** = ``7`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_RECT2I: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_RECT2I** = ``8`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UINT** = ``9`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UVEC2** = ``10`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UVEC3** = ``11`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_UVEC4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_UVEC4** = ``12`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_FLOAT** = ``13`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_VEC2** = ``14`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_VEC3** = ``15`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_VEC4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_VEC4** = ``16`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_COLOR** = ``17`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_RECT2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_RECT2** = ``18`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAT2** = ``19`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAT3** = ``20`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAT4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAT4** = ``21`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_TRANSFORM_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_TRANSFORM_2D** = ``22`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_TRANSFORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_TRANSFORM** = ``23`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLER2D** = ``24`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER2DARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLER2DARRAY** = ``25`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLER3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLER3D** = ``26`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLERCUBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLERCUBE** = ``27`` + + + +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAX** = ``28`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_RenderingInfo: -.. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME: - -.. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME: - -.. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME: - -.. _class_RenderingServer_constant_RENDERING_INFO_TEXTURE_MEM_USED: - -.. _class_RenderingServer_constant_RENDERING_INFO_BUFFER_MEM_USED: - -.. _class_RenderingServer_constant_RENDERING_INFO_VIDEO_MEM_USED: +.. rst-class:: classref-enumeration enum **RenderingInfo**: -- **RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME** = **0** +.. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME: -- **RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME** = **1** +.. rst-class:: classref-enumeration-constant -- **RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME** = **2** +:ref:`RenderingInfo` **RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME** = ``0`` -- **RENDERING_INFO_TEXTURE_MEM_USED** = **3** -- **RENDERING_INFO_BUFFER_MEM_USED** = **4** -- **RENDERING_INFO_VIDEO_MEM_USED** = **5** +.. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME** = ``1`` + + + +.. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME** = ``2`` + + + +.. _class_RenderingServer_constant_RENDERING_INFO_TEXTURE_MEM_USED: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_TEXTURE_MEM_USED** = ``3`` + + + +.. _class_RenderingServer_constant_RENDERING_INFO_BUFFER_MEM_USED: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_BUFFER_MEM_USED** = ``4`` + + + +.. _class_RenderingServer_constant_RENDERING_INFO_VIDEO_MEM_USED: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_VIDEO_MEM_USED** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_RenderingServer_Features: -.. _class_RenderingServer_constant_FEATURE_SHADERS: - -.. _class_RenderingServer_constant_FEATURE_MULTITHREADED: +.. rst-class:: classref-enumeration enum **Features**: -- **FEATURE_SHADERS** = **0** --- Hardware supports shaders. This enum is currently unused in Godot 3.x. +.. _class_RenderingServer_constant_FEATURE_SHADERS: -- **FEATURE_MULTITHREADED** = **1** --- Hardware supports multithreading. This enum is currently unused in Godot 3.x. +.. rst-class:: classref-enumeration-constant + +:ref:`Features` **FEATURE_SHADERS** = ``0`` + +Hardware supports shaders. This enum is currently unused in Godot 3.x. + +.. _class_RenderingServer_constant_FEATURE_MULTITHREADED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Features` **FEATURE_MULTITHREADED** = ``1`` + +Hardware supports multithreading. This enum is currently unused in Godot 3.x. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_RenderingServer_constant_NO_INDEX_ARRAY: +.. rst-class:: classref-constant + +**NO_INDEX_ARRAY** = ``-1`` + +Marks an error that shows that the index array is empty. + .. _class_RenderingServer_constant_ARRAY_WEIGHTS_SIZE: +.. rst-class:: classref-constant + +**ARRAY_WEIGHTS_SIZE** = ``4`` + +Number of weights/bones per vertex. + .. _class_RenderingServer_constant_CANVAS_ITEM_Z_MIN: +.. rst-class:: classref-constant + +**CANVAS_ITEM_Z_MIN** = ``-4096`` + +The minimum Z-layer for canvas items. + .. _class_RenderingServer_constant_CANVAS_ITEM_Z_MAX: +.. rst-class:: classref-constant + +**CANVAS_ITEM_Z_MAX** = ``4096`` + +The maximum Z-layer for canvas items. + .. _class_RenderingServer_constant_MAX_GLOW_LEVELS: +.. rst-class:: classref-constant + +**MAX_GLOW_LEVELS** = ``7`` + +Max number of glow levels that can be used with glow post-process effect. + .. _class_RenderingServer_constant_MAX_CURSORS: +.. rst-class:: classref-constant + +**MAX_CURSORS** = ``8`` + +Unused enum in Godot 3.x. + .. _class_RenderingServer_constant_MAX_2D_DIRECTIONAL_LIGHTS: +.. rst-class:: classref-constant + +**MAX_2D_DIRECTIONAL_LIGHTS** = ``8`` + + + .. _class_RenderingServer_constant_MATERIAL_RENDER_PRIORITY_MIN: +.. rst-class:: classref-constant + +**MATERIAL_RENDER_PRIORITY_MIN** = ``-128`` + +The minimum renderpriority of all materials. + .. _class_RenderingServer_constant_MATERIAL_RENDER_PRIORITY_MAX: +.. rst-class:: classref-constant + +**MATERIAL_RENDER_PRIORITY_MAX** = ``127`` + +The maximum renderpriority of all materials. + .. _class_RenderingServer_constant_ARRAY_CUSTOM_COUNT: +.. rst-class:: classref-constant + +**ARRAY_CUSTOM_COUNT** = ``4`` + + + .. _class_RenderingServer_constant_PARTICLES_EMIT_FLAG_POSITION: +.. rst-class:: classref-constant + +**PARTICLES_EMIT_FLAG_POSITION** = ``1`` + + + .. _class_RenderingServer_constant_PARTICLES_EMIT_FLAG_ROTATION_SCALE: +.. rst-class:: classref-constant + +**PARTICLES_EMIT_FLAG_ROTATION_SCALE** = ``2`` + + + .. _class_RenderingServer_constant_PARTICLES_EMIT_FLAG_VELOCITY: +.. rst-class:: classref-constant + +**PARTICLES_EMIT_FLAG_VELOCITY** = ``4`` + + + .. _class_RenderingServer_constant_PARTICLES_EMIT_FLAG_COLOR: +.. rst-class:: classref-constant + +**PARTICLES_EMIT_FLAG_COLOR** = ``8`` + + + .. _class_RenderingServer_constant_PARTICLES_EMIT_FLAG_CUSTOM: -- **NO_INDEX_ARRAY** = **-1** --- Marks an error that shows that the index array is empty. +.. rst-class:: classref-constant -- **ARRAY_WEIGHTS_SIZE** = **4** --- Number of weights/bones per vertex. +**PARTICLES_EMIT_FLAG_CUSTOM** = ``16`` -- **CANVAS_ITEM_Z_MIN** = **-4096** --- The minimum Z-layer for canvas items. -- **CANVAS_ITEM_Z_MAX** = **4096** --- The maximum Z-layer for canvas items. -- **MAX_GLOW_LEVELS** = **7** --- Max number of glow levels that can be used with glow post-process effect. +.. rst-class:: classref-section-separator -- **MAX_CURSORS** = **8** --- Unused enum in Godot 3.x. +---- -- **MAX_2D_DIRECTIONAL_LIGHTS** = **8** - -- **MATERIAL_RENDER_PRIORITY_MIN** = **-128** --- The minimum renderpriority of all materials. - -- **MATERIAL_RENDER_PRIORITY_MAX** = **127** --- The maximum renderpriority of all materials. - -- **ARRAY_CUSTOM_COUNT** = **4** - -- **PARTICLES_EMIT_FLAG_POSITION** = **1** - -- **PARTICLES_EMIT_FLAG_ROTATION_SCALE** = **2** - -- **PARTICLES_EMIT_FLAG_VELOCITY** = **4** - -- **PARTICLES_EMIT_FLAG_COLOR** = **8** - -- **PARTICLES_EMIT_FLAG_CUSTOM** = **16** +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RenderingServer_property_render_loop_enabled: -- :ref:`bool` **render_loop_enabled** +.. rst-class:: classref-property -+----------+--------------------------------+ -| *Setter* | set_render_loop_enabled(value) | -+----------+--------------------------------+ -| *Getter* | is_render_loop_enabled() | -+----------+--------------------------------+ +:ref:`bool` **render_loop_enabled** + +.. rst-class:: classref-property-setget + +- void **set_render_loop_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_render_loop_enabled** **(** **)** If ``false``, disables rendering completely, but the engine logic is still being processed. You can call :ref:`force_draw` to draw a frame even with rendering disabled. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RenderingServer_method_bake_render_uv2: -- :ref:`Image[]` **bake_render_uv2** **(** :ref:`RID` base, :ref:`RID[]` material_overrides, :ref:`Vector2i` image_size **)** +.. rst-class:: classref-method + +:ref:`Image[]` **bake_render_uv2** **(** :ref:`RID` base, :ref:`RID[]` material_overrides, :ref:`Vector2i` image_size **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_attributes_create: -- :ref:`RID` **camera_attributes_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_attributes_set_auto_exposure: -- void **camera_attributes_set_auto_exposure** **(** :ref:`RID` camera_attributes, :ref:`bool` enable, :ref:`float` min_sensitivity, :ref:`float` max_sensitivity, :ref:`float` speed, :ref:`float` scale **)** +.. rst-class:: classref-method + +void **camera_attributes_set_auto_exposure** **(** :ref:`RID` camera_attributes, :ref:`bool` enable, :ref:`float` min_sensitivity, :ref:`float` max_sensitivity, :ref:`float` speed, :ref:`float` scale **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_attributes_set_dof_blur: -- void **camera_attributes_set_dof_blur** **(** :ref:`RID` camera_attributes, :ref:`bool` far_enable, :ref:`float` far_distance, :ref:`float` far_transition, :ref:`bool` near_enable, :ref:`float` near_distance, :ref:`float` near_transition, :ref:`float` amount **)** +.. rst-class:: classref-method + +void **camera_attributes_set_dof_blur** **(** :ref:`RID` camera_attributes, :ref:`bool` far_enable, :ref:`float` far_distance, :ref:`float` far_transition, :ref:`bool` near_enable, :ref:`float` near_distance, :ref:`float` near_transition, :ref:`float` amount **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_attributes_set_dof_blur_bokeh_shape: -- void **camera_attributes_set_dof_blur_bokeh_shape** **(** :ref:`DOFBokehShape` shape **)** +.. rst-class:: classref-method + +void **camera_attributes_set_dof_blur_bokeh_shape** **(** :ref:`DOFBokehShape` shape **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_attributes_set_dof_blur_quality: -- void **camera_attributes_set_dof_blur_quality** **(** :ref:`DOFBlurQuality` quality, :ref:`bool` use_jitter **)** +.. rst-class:: classref-method + +void **camera_attributes_set_dof_blur_quality** **(** :ref:`DOFBlurQuality` quality, :ref:`bool` use_jitter **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_attributes_set_exposure: -- void **camera_attributes_set_exposure** **(** :ref:`RID` camera_attributes, :ref:`float` multiplier, :ref:`float` normalization **)** +.. rst-class:: classref-method + +void **camera_attributes_set_exposure** **(** :ref:`RID` camera_attributes, :ref:`float` multiplier, :ref:`float` normalization **)** 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. @@ -3251,945 +5342,1357 @@ The exposure value can be calculated from aperture (in f-stops), shutter speed ( func get_exposure(float aperture, float shutter_speed, float sensitivity): return log2((aperture * aperture) / shutterSpeed * (100.0 / sensitivity)) +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_create: -- :ref:`RID` **camera_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **camera_create** **(** **)** Creates a 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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_camera_attributes: -- void **camera_set_camera_attributes** **(** :ref:`RID` camera, :ref:`RID` effects **)** +.. rst-class:: classref-method + +void **camera_set_camera_attributes** **(** :ref:`RID` camera, :ref:`RID` effects **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_cull_mask: -- void **camera_set_cull_mask** **(** :ref:`RID` camera, :ref:`int` layers **)** +.. rst-class:: classref-method + +void **camera_set_cull_mask** **(** :ref:`RID` camera, :ref:`int` layers **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_environment: -- void **camera_set_environment** **(** :ref:`RID` camera, :ref:`RID` env **)** +.. rst-class:: classref-method + +void **camera_set_environment** **(** :ref:`RID` camera, :ref:`RID` env **)** Sets the environment used by this camera. Equivalent to :ref:`Camera3D.environment`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_frustum: -- void **camera_set_frustum** **(** :ref:`RID` camera, :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** +.. rst-class:: classref-method + +void **camera_set_frustum** **(** :ref:`RID` camera, :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** Sets camera to use frustum projection. This mode allows adjusting the ``offset`` argument to create "tilted frustum" effects. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_orthogonal: -- void **camera_set_orthogonal** **(** :ref:`RID` camera, :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** +.. rst-class:: classref-method + +void **camera_set_orthogonal** **(** :ref:`RID` camera, :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_perspective: -- void **camera_set_perspective** **(** :ref:`RID` camera, :ref:`float` fovy_degrees, :ref:`float` z_near, :ref:`float` z_far **)** +.. rst-class:: classref-method + +void **camera_set_perspective** **(** :ref:`RID` camera, :ref:`float` fovy_degrees, :ref:`float` z_near, :ref:`float` z_far **)** Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_transform: -- void **camera_set_transform** **(** :ref:`RID` camera, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **camera_set_transform** **(** :ref:`RID` camera, :ref:`Transform3D` transform **)** Sets :ref:`Transform3D` of camera. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_camera_set_use_vertical_aspect: -- void **camera_set_use_vertical_aspect** **(** :ref:`RID` camera, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **camera_set_use_vertical_aspect** **(** :ref:`RID` camera, :ref:`bool` enable **)** If ``true``, preserves the horizontal aspect ratio which is equivalent to :ref:`Camera3D.KEEP_WIDTH`. If ``false``, preserves the vertical aspect ratio which is equivalent to :ref:`Camera3D.KEEP_HEIGHT`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_create: -- :ref:`RID` **canvas_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **canvas_create** **(** **)** Creates a canvas and returns the assigned :ref:`RID`. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_*`` RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_animation_slice: -- void **canvas_item_add_animation_slice** **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** +.. rst-class:: classref-method + +void **canvas_item_add_animation_slice** **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_circle: -- void **canvas_item_add_circle** **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **canvas_item_add_circle** **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_clip_ignore: -- void **canvas_item_add_clip_ignore** **(** :ref:`RID` item, :ref:`bool` ignore **)** +.. rst-class:: classref-method + +void **canvas_item_add_clip_ignore** **(** :ref:`RID` item, :ref:`bool` ignore **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_lcd_texture_rect_region: -- void **canvas_item_add_lcd_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate **)** +.. rst-class:: classref-method + +void **canvas_item_add_lcd_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_line: -- void **canvas_item_add_line** **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** +.. rst-class:: classref-method + +void **canvas_item_add_line** **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_mesh: -- void **canvas_item_add_mesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **canvas_item_add_mesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_msdf_texture_rect_region: -- void **canvas_item_add_msdf_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`float` px_range=1.0 **)** +.. rst-class:: classref-method + +void **canvas_item_add_msdf_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`float` px_range=1.0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_multimesh: -- void **canvas_item_add_multimesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **canvas_item_add_multimesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_nine_patch: -- void **canvas_item_add_nine_patch** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`NinePatchAxisMode` x_axis_mode=0, :ref:`NinePatchAxisMode` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +.. rst-class:: classref-method + +void **canvas_item_add_nine_patch** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`NinePatchAxisMode` x_axis_mode=0, :ref:`NinePatchAxisMode` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_particles: -- void **canvas_item_add_particles** **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **canvas_item_add_particles** **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_polygon: -- void **canvas_item_add_polygon** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **canvas_item_add_polygon** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_polyline: -- void **canvas_item_add_polyline** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** +.. rst-class:: classref-method + +void **canvas_item_add_polyline** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_primitive: -- void **canvas_item_add_primitive** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0 **)** +.. rst-class:: classref-method + +void **canvas_item_add_primitive** **(** :ref:`RID` item, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_rect: -- void **canvas_item_add_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **canvas_item_add_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_set_transform: -- void **canvas_item_add_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **canvas_item_add_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_texture_rect: -- void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** +.. rst-class:: classref-method + +void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_texture_rect_region: -- void **canvas_item_add_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** +.. rst-class:: classref-method + +void **canvas_item_add_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_add_triangle_array: -- void **canvas_item_add_triangle_array** **(** :ref:`RID` item, :ref:`PackedInt32Array` indices, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedInt32Array` bones=PackedInt32Array(), :ref:`PackedFloat32Array` weights=PackedFloat32Array(), :ref:`RID` texture, :ref:`int` count=-1 **)** +.. rst-class:: classref-method + +void **canvas_item_add_triangle_array** **(** :ref:`RID` item, :ref:`PackedInt32Array` indices, :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedInt32Array` bones=PackedInt32Array(), :ref:`PackedFloat32Array` weights=PackedFloat32Array(), :ref:`RID` texture, :ref:`int` count=-1 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_clear: -- void **canvas_item_clear** **(** :ref:`RID` item **)** +.. rst-class:: classref-method + +void **canvas_item_clear** **(** :ref:`RID` item **)** Clears the :ref:`CanvasItem` and removes all commands in it. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_create: -- :ref:`RID` **canvas_item_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **canvas_item_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_canvas_group_mode: -- void **canvas_item_set_canvas_group_mode** **(** :ref:`RID` item, :ref:`CanvasGroupMode` mode, :ref:`float` clear_margin=5.0, :ref:`bool` fit_empty=false, :ref:`float` fit_margin=0.0, :ref:`bool` blur_mipmaps=false **)** +.. rst-class:: classref-method + +void **canvas_item_set_canvas_group_mode** **(** :ref:`RID` item, :ref:`CanvasGroupMode` mode, :ref:`float` clear_margin=5.0, :ref:`bool` fit_empty=false, :ref:`float` fit_margin=0.0, :ref:`bool` blur_mipmaps=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_clip: -- void **canvas_item_set_clip** **(** :ref:`RID` item, :ref:`bool` clip **)** +.. rst-class:: classref-method + +void **canvas_item_set_clip** **(** :ref:`RID` item, :ref:`bool` clip **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_copy_to_backbuffer: -- void **canvas_item_set_copy_to_backbuffer** **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** +.. rst-class:: classref-method + +void **canvas_item_set_copy_to_backbuffer** **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** Sets the :ref:`CanvasItem` to copy a rect to the backbuffer. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_custom_rect: -- void **canvas_item_set_custom_rect** **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** +.. rst-class:: classref-method + +void **canvas_item_set_custom_rect** **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_default_texture_filter: -- void **canvas_item_set_default_texture_filter** **(** :ref:`RID` item, :ref:`CanvasItemTextureFilter` filter **)** +.. rst-class:: classref-method + +void **canvas_item_set_default_texture_filter** **(** :ref:`RID` item, :ref:`CanvasItemTextureFilter` filter **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_default_texture_repeat: -- void **canvas_item_set_default_texture_repeat** **(** :ref:`RID` item, :ref:`CanvasItemTextureRepeat` repeat **)** +.. rst-class:: classref-method + +void **canvas_item_set_default_texture_repeat** **(** :ref:`RID` item, :ref:`CanvasItemTextureRepeat` repeat **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_distance_field_mode: -- void **canvas_item_set_distance_field_mode** **(** :ref:`RID` item, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_item_set_distance_field_mode** **(** :ref:`RID` item, :ref:`bool` enabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_draw_behind_parent: -- void **canvas_item_set_draw_behind_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_item_set_draw_behind_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_draw_index: -- void **canvas_item_set_draw_index** **(** :ref:`RID` item, :ref:`int` index **)** +.. rst-class:: classref-method + +void **canvas_item_set_draw_index** **(** :ref:`RID` item, :ref:`int` index **)** Sets the index for the :ref:`CanvasItem`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_light_mask: -- void **canvas_item_set_light_mask** **(** :ref:`RID` item, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **canvas_item_set_light_mask** **(** :ref:`RID` item, :ref:`int` mask **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_material: -- void **canvas_item_set_material** **(** :ref:`RID` item, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **canvas_item_set_material** **(** :ref:`RID` item, :ref:`RID` material **)** Sets a new material to the :ref:`CanvasItem`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_modulate: -- void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_parent: -- void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` parent **)** +.. rst-class:: classref-method + +void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` parent **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_self_modulate: -- void **canvas_item_set_self_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **canvas_item_set_self_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_sort_children_by_y: -- void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :ref:`bool` enabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_transform: -- void **canvas_item_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **canvas_item_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_use_parent_material: -- void **canvas_item_set_use_parent_material** **(** :ref:`RID` item, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_item_set_use_parent_material** **(** :ref:`RID` item, :ref:`bool` enabled **)** Sets if the :ref:`CanvasItem` uses its parent's material. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_visibility_layer: -- void **canvas_item_set_visibility_layer** **(** :ref:`RID` item, :ref:`int` visibility_layer **)** +.. rst-class:: classref-method + +void **canvas_item_set_visibility_layer** **(** :ref:`RID` item, :ref:`int` visibility_layer **)** Sets the rendering visibility layer associated with this :ref:`CanvasItem`. Only :ref:`Viewport` nodes with a matching rendering mask will render this :ref:`CanvasItem`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_visibility_notifier: -- void **canvas_item_set_visibility_notifier** **(** :ref:`RID` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** +.. rst-class:: classref-method + +void **canvas_item_set_visibility_notifier** **(** :ref:`RID` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_visible: -- void **canvas_item_set_visible** **(** :ref:`RID` item, :ref:`bool` visible **)** +.. rst-class:: classref-method + +void **canvas_item_set_visible** **(** :ref:`RID` item, :ref:`bool` visible **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_z_as_relative_to_parent: -- void **canvas_item_set_z_as_relative_to_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_item_set_z_as_relative_to_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** If this is enabled, the Z index of the parent will be added to the children's Z index. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_item_set_z_index: -- void **canvas_item_set_z_index** **(** :ref:`RID` item, :ref:`int` z_index **)** +.. rst-class:: classref-method + +void **canvas_item_set_z_index** **(** :ref:`RID` item, :ref:`int` z_index **)** Sets the :ref:`CanvasItem`'s Z index, i.e. its draw order (lower indexes are drawn first). +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_attach_to_canvas: -- void **canvas_light_attach_to_canvas** **(** :ref:`RID` light, :ref:`RID` canvas **)** +.. rst-class:: classref-method + +void **canvas_light_attach_to_canvas** **(** :ref:`RID` light, :ref:`RID` canvas **)** Attaches the canvas light to the canvas. Removes it from its previous canvas. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_create: -- :ref:`RID` **canvas_light_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_occluder_attach_to_canvas: -- void **canvas_light_occluder_attach_to_canvas** **(** :ref:`RID` occluder, :ref:`RID` canvas **)** +.. rst-class:: classref-method + +void **canvas_light_occluder_attach_to_canvas** **(** :ref:`RID` occluder, :ref:`RID` canvas **)** Attaches a light occluder to the canvas. Removes it from its previous canvas. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_occluder_create: -- :ref:`RID` **canvas_light_occluder_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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_ocluder_*`` RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_occluder_set_as_sdf_collision: -- void **canvas_light_occluder_set_as_sdf_collision** **(** :ref:`RID` occluder, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **canvas_light_occluder_set_as_sdf_collision** **(** :ref:`RID` occluder, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_occluder_set_enabled: -- void **canvas_light_occluder_set_enabled** **(** :ref:`RID` occluder, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_light_occluder_set_enabled** **(** :ref:`RID` occluder, :ref:`bool` enabled **)** Enables or disables light occluder. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_occluder_set_light_mask: -- void **canvas_light_occluder_set_light_mask** **(** :ref:`RID` occluder, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **canvas_light_occluder_set_light_mask** **(** :ref:`RID` occluder, :ref:`int` mask **)** The light mask. See :ref:`LightOccluder2D` for more information on light masks. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_occluder_set_polygon: -- void **canvas_light_occluder_set_polygon** **(** :ref:`RID` occluder, :ref:`RID` polygon **)** +.. rst-class:: classref-method + +void **canvas_light_occluder_set_polygon** **(** :ref:`RID` occluder, :ref:`RID` polygon **)** Sets a light occluder's polygon. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_occluder_set_transform: -- void **canvas_light_occluder_set_transform** **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **canvas_light_occluder_set_transform** **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** Sets a light occluder's :ref:`Transform2D`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_color: -- void **canvas_light_set_color** **(** :ref:`RID` light, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **canvas_light_set_color** **(** :ref:`RID` light, :ref:`Color` color **)** Sets the color for a light. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_enabled: -- void **canvas_light_set_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_light_set_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** Enables or disables a canvas light. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_energy: -- void **canvas_light_set_energy** **(** :ref:`RID` light, :ref:`float` energy **)** +.. rst-class:: classref-method + +void **canvas_light_set_energy** **(** :ref:`RID` light, :ref:`float` energy **)** Sets a canvas light's energy. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_height: -- void **canvas_light_set_height** **(** :ref:`RID` light, :ref:`float` height **)** +.. rst-class:: classref-method + +void **canvas_light_set_height** **(** :ref:`RID` light, :ref:`float` height **)** Sets a canvas light's height. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_item_cull_mask: -- void **canvas_light_set_item_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **canvas_light_set_item_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** The light mask. See :ref:`LightOccluder2D` for more information on light masks. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_item_shadow_cull_mask: -- void **canvas_light_set_item_shadow_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **canvas_light_set_item_shadow_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** The binary mask used to determine which layers this canvas light's shadows affects. See :ref:`LightOccluder2D` for more information on light masks. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_layer_range: -- void **canvas_light_set_layer_range** **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** +.. rst-class:: classref-method + +void **canvas_light_set_layer_range** **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** The layer range that gets rendered with this light. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_mode: -- void **canvas_light_set_mode** **(** :ref:`RID` light, :ref:`CanvasLightMode` mode **)** +.. rst-class:: classref-method + +void **canvas_light_set_mode** **(** :ref:`RID` light, :ref:`CanvasLightMode` mode **)** The mode of the light, see :ref:`CanvasLightMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_shadow_color: -- void **canvas_light_set_shadow_color** **(** :ref:`RID` light, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **canvas_light_set_shadow_color** **(** :ref:`RID` light, :ref:`Color` color **)** Sets the color of the canvas light's shadow. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_shadow_enabled: -- void **canvas_light_set_shadow_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **canvas_light_set_shadow_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** Enables or disables the canvas light's shadow. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_shadow_filter: -- void **canvas_light_set_shadow_filter** **(** :ref:`RID` light, :ref:`CanvasLightShadowFilter` filter **)** +.. rst-class:: classref-method + +void **canvas_light_set_shadow_filter** **(** :ref:`RID` light, :ref:`CanvasLightShadowFilter` filter **)** Sets the canvas light's shadow's filter, see :ref:`CanvasLightShadowFilter` constants. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_shadow_smooth: -- void **canvas_light_set_shadow_smooth** **(** :ref:`RID` light, :ref:`float` smooth **)** +.. rst-class:: classref-method + +void **canvas_light_set_shadow_smooth** **(** :ref:`RID` light, :ref:`float` smooth **)** Smoothens the shadow. The lower, the smoother. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_texture: -- void **canvas_light_set_texture** **(** :ref:`RID` light, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **canvas_light_set_texture** **(** :ref:`RID` light, :ref:`RID` texture **)** Sets the texture to be used by a :ref:`PointLight2D`. Equivalent to :ref:`PointLight2D.texture`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_texture_offset: -- void **canvas_light_set_texture_offset** **(** :ref:`RID` light, :ref:`Vector2` offset **)** +.. rst-class:: classref-method + +void **canvas_light_set_texture_offset** **(** :ref:`RID` light, :ref:`Vector2` offset **)** Sets the offset of a :ref:`PointLight2D`'s texture. Equivalent to :ref:`PointLight2D.offset`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_texture_scale: -- void **canvas_light_set_texture_scale** **(** :ref:`RID` light, :ref:`float` scale **)** +.. rst-class:: classref-method + +void **canvas_light_set_texture_scale** **(** :ref:`RID` light, :ref:`float` scale **)** Sets the scale factor of a :ref:`PointLight2D`'s texture. Equivalent to :ref:`PointLight2D.texture_scale`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_transform: -- void **canvas_light_set_transform** **(** :ref:`RID` light, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **canvas_light_set_transform** **(** :ref:`RID` light, :ref:`Transform2D` transform **)** Sets the canvas light's :ref:`Transform2D`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_light_set_z_range: -- void **canvas_light_set_z_range** **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** +.. rst-class:: classref-method + +void **canvas_light_set_z_range** **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** Sets the Z range of objects that will be affected by this light. Equivalent to :ref:`Light2D.range_z_min` and :ref:`Light2D.range_z_max`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_occluder_polygon_create: -- :ref:`RID` **canvas_occluder_polygon_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_occluder_polygon_set_cull_mode: -- void **canvas_occluder_polygon_set_cull_mode** **(** :ref:`RID` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode` mode **)** +.. rst-class:: classref-method + +void **canvas_occluder_polygon_set_cull_mode** **(** :ref:`RID` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode` mode **)** Sets an occluder polygons cull mode. See :ref:`CanvasOccluderPolygonCullMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_occluder_polygon_set_shape: -- void **canvas_occluder_polygon_set_shape** **(** :ref:`RID` occluder_polygon, :ref:`PackedVector2Array` shape, :ref:`bool` closed **)** +.. rst-class:: classref-method + +void **canvas_occluder_polygon_set_shape** **(** :ref:`RID` occluder_polygon, :ref:`PackedVector2Array` shape, :ref:`bool` closed **)** Sets the shape of the occluder polygon. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_set_disable_scale: -- void **canvas_set_disable_scale** **(** :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **canvas_set_disable_scale** **(** :ref:`bool` disable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_set_item_mirroring: -- void **canvas_set_item_mirroring** **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** +.. rst-class:: classref-method + +void **canvas_set_item_mirroring** **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** A copy of the canvas item will be drawn with a local offset of the mirroring :ref:`Vector2`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_set_modulate: -- void **canvas_set_modulate** **(** :ref:`RID` canvas, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **canvas_set_modulate** **(** :ref:`RID` canvas, :ref:`Color` color **)** Modulates all colors in the given canvas. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_set_shadow_texture_size: -- void **canvas_set_shadow_texture_size** **(** :ref:`int` size **)** +.. rst-class:: classref-method + +void **canvas_set_shadow_texture_size** **(** :ref:`int` size **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_texture_create: -- :ref:`RID` **canvas_texture_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **canvas_texture_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_texture_set_channel: -- void **canvas_texture_set_channel** **(** :ref:`RID` canvas_texture, :ref:`CanvasTextureChannel` channel, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **canvas_texture_set_channel** **(** :ref:`RID` canvas_texture, :ref:`CanvasTextureChannel` channel, :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_texture_set_shading_parameters: -- void **canvas_texture_set_shading_parameters** **(** :ref:`RID` canvas_texture, :ref:`Color` base_color, :ref:`float` shininess **)** +.. rst-class:: classref-method + +void **canvas_texture_set_shading_parameters** **(** :ref:`RID` canvas_texture, :ref:`Color` base_color, :ref:`float` shininess **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_texture_set_texture_filter: -- void **canvas_texture_set_texture_filter** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** +.. rst-class:: classref-method + +void **canvas_texture_set_texture_filter** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_canvas_texture_set_texture_repeat: -- void **canvas_texture_set_texture_repeat** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** +.. rst-class:: classref-method + +void **canvas_texture_set_texture_repeat** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_create_local_rendering_device: -- :ref:`RenderingDevice` **create_local_rendering_device** **(** **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`RenderingDevice` **create_local_rendering_device** **(** **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +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. + +\ **Note:** When using the OpenGL backend or when running in headless mode, this function always returns ``null``. + +.. rst-class:: classref-item-separator ---- .. _class_RenderingServer_method_decal_create: -- :ref:`RID` **decal_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **decal_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_albedo_mix: -- void **decal_set_albedo_mix** **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** +.. rst-class:: classref-method + +void **decal_set_albedo_mix** **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_cull_mask: -- void **decal_set_cull_mask** **(** :ref:`RID` decal, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **decal_set_cull_mask** **(** :ref:`RID` decal, :ref:`int` mask **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_distance_fade: -- void **decal_set_distance_fade** **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` length **)** +.. rst-class:: classref-method + +void **decal_set_distance_fade** **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` length **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_emission_energy: -- void **decal_set_emission_energy** **(** :ref:`RID` decal, :ref:`float` energy **)** +.. rst-class:: classref-method + +void **decal_set_emission_energy** **(** :ref:`RID` decal, :ref:`float` energy **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_extents: -- void **decal_set_extents** **(** :ref:`RID` decal, :ref:`Vector3` extents **)** +.. rst-class:: classref-method + +void **decal_set_extents** **(** :ref:`RID` decal, :ref:`Vector3` extents **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_fade: -- void **decal_set_fade** **(** :ref:`RID` decal, :ref:`float` above, :ref:`float` below **)** +.. rst-class:: classref-method + +void **decal_set_fade** **(** :ref:`RID` decal, :ref:`float` above, :ref:`float` below **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_modulate: -- void **decal_set_modulate** **(** :ref:`RID` decal, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **decal_set_modulate** **(** :ref:`RID` decal, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_normal_fade: -- void **decal_set_normal_fade** **(** :ref:`RID` decal, :ref:`float` fade **)** +.. rst-class:: classref-method + +void **decal_set_normal_fade** **(** :ref:`RID` decal, :ref:`float` fade **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decal_set_texture: -- void **decal_set_texture** **(** :ref:`RID` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **decal_set_texture** **(** :ref:`RID` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_decals_set_filter: -- void **decals_set_filter** **(** :ref:`DecalFilter` filter **)** +.. rst-class:: classref-method + +void **decals_set_filter** **(** :ref:`DecalFilter` filter **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_directional_light_create: -- :ref:`RID` **directional_light_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. @@ -4197,561 +6700,809 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this directional light to an instance using :ref:`instance_set_base` using the returned RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_directional_shadow_atlas_set_size: -- void **directional_shadow_atlas_set_size** **(** :ref:`int` size, :ref:`bool` is_16bits **)** +.. rst-class:: classref-method + +void **directional_shadow_atlas_set_size** **(** :ref:`int` size, :ref:`bool` is_16bits **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_directional_soft_shadow_filter_set_quality: -- void **directional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` quality **)** +.. rst-class:: classref-method + +void **directional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` quality **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_bake_panorama: -- :ref:`Image` **environment_bake_panorama** **(** :ref:`RID` environment, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +:ref:`Image` **environment_bake_panorama** **(** :ref:`RID` environment, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_create: -- :ref:`RID` **environment_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_glow_set_use_bicubic_upscale: -- void **environment_glow_set_use_bicubic_upscale** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **environment_glow_set_use_bicubic_upscale** **(** :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_glow_set_use_high_quality: -- void **environment_glow_set_use_high_quality** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **environment_glow_set_use_high_quality** **(** :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_adjustment: -- void **environment_set_adjustment** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation, :ref:`bool` use_1d_color_correction, :ref:`RID` color_correction **)** +.. rst-class:: classref-method + +void **environment_set_adjustment** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation, :ref:`bool` use_1d_color_correction, :ref:`RID` color_correction **)** Sets the values to be used with the "Adjustment" post-process effect. See :ref:`Environment` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_ambient_light: -- void **environment_set_ambient_light** **(** :ref:`RID` env, :ref:`Color` color, :ref:`EnvironmentAmbientSource` ambient=0, :ref:`float` energy=1.0, :ref:`float` sky_contibution=0.0, :ref:`EnvironmentReflectionSource` reflection_source=0 **)** +.. rst-class:: classref-method + +void **environment_set_ambient_light** **(** :ref:`RID` env, :ref:`Color` color, :ref:`EnvironmentAmbientSource` ambient=0, :ref:`float` energy=1.0, :ref:`float` sky_contibution=0.0, :ref:`EnvironmentReflectionSource` reflection_source=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_background: -- void **environment_set_background** **(** :ref:`RID` env, :ref:`EnvironmentBG` bg **)** +.. rst-class:: classref-method + +void **environment_set_background** **(** :ref:`RID` env, :ref:`EnvironmentBG` bg **)** Sets the *BGMode* of the environment. Equivalent to :ref:`Environment.background_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_bg_color: -- void **environment_set_bg_color** **(** :ref:`RID` env, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **environment_set_bg_color** **(** :ref:`RID` env, :ref:`Color` color **)** Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_bg_energy: -- void **environment_set_bg_energy** **(** :ref:`RID` env, :ref:`float` multiplier, :ref:`float` exposure_value **)** +.. rst-class:: classref-method + +void **environment_set_bg_energy** **(** :ref:`RID` env, :ref:`float` multiplier, :ref:`float` exposure_value **)** Sets the intensity of the background color. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_canvas_max_layer: -- void **environment_set_canvas_max_layer** **(** :ref:`RID` env, :ref:`int` max_layer **)** +.. rst-class:: classref-method + +void **environment_set_canvas_max_layer** **(** :ref:`RID` env, :ref:`int` max_layer **)** Sets the maximum layer to use if using Canvas background mode. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_fog: -- void **environment_set_fog** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`Color` light_color, :ref:`float` light_energy, :ref:`float` sun_scatter, :ref:`float` density, :ref:`float` height, :ref:`float` height_density, :ref:`float` aerial_perspective, :ref:`float` sky_affect **)** +.. rst-class:: classref-method + +void **environment_set_fog** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`Color` light_color, :ref:`float` light_energy, :ref:`float` sun_scatter, :ref:`float` density, :ref:`float` height, :ref:`float` height_density, :ref:`float` aerial_perspective, :ref:`float` sky_affect **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_glow: -- void **environment_set_glow** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`PackedFloat32Array` levels, :ref:`float` intensity, :ref:`float` strength, :ref:`float` mix, :ref:`float` bloom_threshold, :ref:`EnvironmentGlowBlendMode` blend_mode, :ref:`float` hdr_bleed_threshold, :ref:`float` hdr_bleed_scale, :ref:`float` hdr_luminance_cap, :ref:`float` glow_map_strength, :ref:`RID` glow_map **)** +.. rst-class:: classref-method + +void **environment_set_glow** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`PackedFloat32Array` levels, :ref:`float` intensity, :ref:`float` strength, :ref:`float` mix, :ref:`float` bloom_threshold, :ref:`EnvironmentGlowBlendMode` blend_mode, :ref:`float` hdr_bleed_threshold, :ref:`float` hdr_bleed_scale, :ref:`float` hdr_luminance_cap, :ref:`float` glow_map_strength, :ref:`RID` glow_map **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_sdfgi: -- void **environment_set_sdfgi** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` cascades, :ref:`float` min_cell_size, :ref:`EnvironmentSDFGIYScale` y_scale, :ref:`bool` use_occlusion, :ref:`float` bounce_feedback, :ref:`bool` read_sky, :ref:`float` energy, :ref:`float` normal_bias, :ref:`float` probe_bias **)** +.. rst-class:: classref-method + +void **environment_set_sdfgi** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` cascades, :ref:`float` min_cell_size, :ref:`EnvironmentSDFGIYScale` y_scale, :ref:`bool` use_occlusion, :ref:`float` bounce_feedback, :ref:`bool` read_sky, :ref:`float` energy, :ref:`float` normal_bias, :ref:`float` probe_bias **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_sdfgi_frames_to_converge: -- void **environment_set_sdfgi_frames_to_converge** **(** :ref:`EnvironmentSDFGIFramesToConverge` frames **)** +.. rst-class:: classref-method + +void **environment_set_sdfgi_frames_to_converge** **(** :ref:`EnvironmentSDFGIFramesToConverge` frames **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_sdfgi_frames_to_update_light: -- void **environment_set_sdfgi_frames_to_update_light** **(** :ref:`EnvironmentSDFGIFramesToUpdateLight` frames **)** +.. rst-class:: classref-method + +void **environment_set_sdfgi_frames_to_update_light** **(** :ref:`EnvironmentSDFGIFramesToUpdateLight` frames **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_sdfgi_ray_count: -- void **environment_set_sdfgi_ray_count** **(** :ref:`EnvironmentSDFGIRayCount` ray_count **)** +.. rst-class:: classref-method + +void **environment_set_sdfgi_ray_count** **(** :ref:`EnvironmentSDFGIRayCount` ray_count **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_sky: -- void **environment_set_sky** **(** :ref:`RID` env, :ref:`RID` sky **)** +.. rst-class:: classref-method + +void **environment_set_sky** **(** :ref:`RID` env, :ref:`RID` sky **)** Sets the :ref:`Sky` to be used as the environment's background when using *BGMode* sky. Equivalent to :ref:`Environment.sky`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_sky_custom_fov: -- void **environment_set_sky_custom_fov** **(** :ref:`RID` env, :ref:`float` scale **)** +.. rst-class:: classref-method + +void **environment_set_sky_custom_fov** **(** :ref:`RID` env, :ref:`float` scale **)** Sets a custom field of view for the background :ref:`Sky`. Equivalent to :ref:`Environment.sky_custom_fov`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_sky_orientation: -- void **environment_set_sky_orientation** **(** :ref:`RID` env, :ref:`Basis` orientation **)** +.. rst-class:: classref-method + +void **environment_set_sky_orientation** **(** :ref:`RID` env, :ref:`Basis` orientation **)** Sets the rotation of the background :ref:`Sky` expressed as a :ref:`Basis`. Equivalent to :ref:`Environment.sky_rotation`, where the rotation vector is used to construct the :ref:`Basis`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_ssao: -- void **environment_set_ssao** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` radius, :ref:`float` intensity, :ref:`float` power, :ref:`float` detail, :ref:`float` horizon, :ref:`float` sharpness, :ref:`float` light_affect, :ref:`float` ao_channel_affect **)** +.. rst-class:: classref-method + +void **environment_set_ssao** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` radius, :ref:`float` intensity, :ref:`float` power, :ref:`float` detail, :ref:`float` horizon, :ref:`float` sharpness, :ref:`float` light_affect, :ref:`float` ao_channel_affect **)** Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See :ref:`Environment` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_ssao_quality: -- void **environment_set_ssao_quality** **(** :ref:`EnvironmentSSAOQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** +.. rst-class:: classref-method + +void **environment_set_ssao_quality** **(** :ref:`EnvironmentSSAOQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See :ref:`Environment` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_ssil_quality: -- void **environment_set_ssil_quality** **(** :ref:`EnvironmentSSILQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** +.. rst-class:: classref-method + +void **environment_set_ssil_quality** **(** :ref:`EnvironmentSSILQuality` quality, :ref:`bool` half_size, :ref:`float` adaptive_target, :ref:`int` blur_passes, :ref:`float` fadeout_from, :ref:`float` fadeout_to **)** Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See :ref:`Environment` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_ssr: -- void **environment_set_ssr** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` max_steps, :ref:`float` fade_in, :ref:`float` fade_out, :ref:`float` depth_tolerance **)** +.. rst-class:: classref-method + +void **environment_set_ssr** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`int` max_steps, :ref:`float` fade_in, :ref:`float` fade_out, :ref:`float` depth_tolerance **)** Sets the variables to be used with the "screen space reflections" post-process effect. See :ref:`Environment` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_ssr_roughness_quality: -- void **environment_set_ssr_roughness_quality** **(** :ref:`EnvironmentSSRRoughnessQuality` quality **)** +.. rst-class:: classref-method + +void **environment_set_ssr_roughness_quality** **(** :ref:`EnvironmentSSRRoughnessQuality` quality **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_tonemap: -- void **environment_set_tonemap** **(** :ref:`RID` env, :ref:`EnvironmentToneMapper` tone_mapper, :ref:`float` exposure, :ref:`float` white **)** +.. rst-class:: classref-method + +void **environment_set_tonemap** **(** :ref:`RID` env, :ref:`EnvironmentToneMapper` tone_mapper, :ref:`float` exposure, :ref:`float` white **)** Sets the variables to be used with the "tonemap" post-process effect. See :ref:`Environment` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_volumetric_fog: -- void **environment_set_volumetric_fog** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` density, :ref:`Color` albedo, :ref:`Color` emission, :ref:`float` emission_energy, :ref:`float` anisotropy, :ref:`float` length, :ref:`float` p_detail_spread, :ref:`float` gi_inject, :ref:`bool` temporal_reprojection, :ref:`float` temporal_reprojection_amount, :ref:`float` ambient_inject, :ref:`float` sky_affect **)** +.. rst-class:: classref-method + +void **environment_set_volumetric_fog** **(** :ref:`RID` env, :ref:`bool` enable, :ref:`float` density, :ref:`Color` albedo, :ref:`Color` emission, :ref:`float` emission_energy, :ref:`float` anisotropy, :ref:`float` length, :ref:`float` p_detail_spread, :ref:`float` gi_inject, :ref:`bool` temporal_reprojection, :ref:`float` temporal_reprojection_amount, :ref:`float` ambient_inject, :ref:`float` sky_affect **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_volumetric_fog_filter_active: -- void **environment_set_volumetric_fog_filter_active** **(** :ref:`bool` active **)** +.. rst-class:: classref-method + +void **environment_set_volumetric_fog_filter_active** **(** :ref:`bool` active **)** Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_environment_set_volumetric_fog_volume_size: -- void **environment_set_volumetric_fog_volume_size** **(** :ref:`int` size, :ref:`int` depth **)** +.. rst-class:: classref-method + +void **environment_set_volumetric_fog_volume_size** **(** :ref:`int` size, :ref:`int` depth **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_fog_volume_create: -- :ref:`RID` **fog_volume_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **fog_volume_create** **(** **)** Creates a new fog volume and allocates an RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_fog_volume_set_extents: -- void **fog_volume_set_extents** **(** :ref:`RID` fog_volume, :ref:`Vector3` extents **)** +.. rst-class:: classref-method + +void **fog_volume_set_extents** **(** :ref:`RID` fog_volume, :ref:`Vector3` extents **)** Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`FOG_VOLUME_SHAPE_CONE`, :ref:`FOG_VOLUME_SHAPE_CYLINDER` or :ref:`FOG_VOLUME_SHAPE_BOX`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_fog_volume_set_material: -- void **fog_volume_set_material** **(** :ref:`RID` fog_volume, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **fog_volume_set_material** **(** :ref:`RID` fog_volume, :ref:`RID` material **)** Sets the :ref:`Material` of the fog volume. Can be either a :ref:`FogMaterial` or a custom :ref:`ShaderMaterial`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_fog_volume_set_shape: -- void **fog_volume_set_shape** **(** :ref:`RID` fog_volume, :ref:`FogVolumeShape` shape **)** +.. rst-class:: classref-method + +void **fog_volume_set_shape** **(** :ref:`RID` fog_volume, :ref:`FogVolumeShape` shape **)** Sets the shape of the fog volume to either :ref:`FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`FOG_VOLUME_SHAPE_CONE`, :ref:`FOG_VOLUME_SHAPE_CYLINDER`, :ref:`FOG_VOLUME_SHAPE_BOX` or :ref:`FOG_VOLUME_SHAPE_WORLD`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_force_draw: -- void **force_draw** **(** :ref:`bool` swap_buffers=true, :ref:`float` frame_step=0.0 **)** +.. rst-class:: classref-method + +void **force_draw** **(** :ref:`bool` swap_buffers=true, :ref:`float` frame_step=0.0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_force_sync: -- void **force_sync** **(** **)** +.. rst-class:: classref-method + +void **force_sync** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_free_rid: -- void **free_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **free_rid** **(** :ref:`RID` rid **)** Tries to free an object in the RenderingServer. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_frame_setup_time_cpu: -- :ref:`float` **get_frame_setup_time_cpu** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_frame_setup_time_cpu** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_rendering_device: -- :ref:`RenderingDevice` **get_rendering_device** **(** **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`RenderingDevice` **get_rendering_device** **(** **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the global RenderingDevice. + +\ **Note:** When using the OpenGL backend or when running in headless mode, this function always returns ``null``. + +.. rst-class:: classref-item-separator ---- .. _class_RenderingServer_method_get_rendering_info: -- :ref:`int` **get_rendering_info** **(** :ref:`RenderingInfo` info **)** +.. rst-class:: classref-method + +:ref:`int` **get_rendering_info** **(** :ref:`RenderingInfo` info **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_shader_parameter_list: -- :ref:`Dictionary[]` **get_shader_parameter_list** **(** :ref:`RID` shader **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_shader_parameter_list** **(** :ref:`RID` shader **)** |const| Returns the parameters of a shader. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_test_cube: -- :ref:`RID` **get_test_cube** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **get_test_cube** **(** **)** Returns the id of the test cube. Creates one if none exists. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_test_texture: -- :ref:`RID` **get_test_texture** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **get_test_texture** **(** **)** Returns the id of the test texture. Creates one if none exists. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_video_adapter_api_version: -- :ref:`String` **get_video_adapter_api_version** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_video_adapter_api_version** **(** **)** |const| 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. \ **Note:** When running a headless or server binary, this function returns an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_video_adapter_name: -- :ref:`String` **get_video_adapter_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_video_adapter_name** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_video_adapter_type: -- :ref:`DeviceType` **get_video_adapter_type** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`DeviceType` **get_video_adapter_type** **(** **)** |const| 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. \ **Note:** When using the OpenGL backend or when running in headless mode, this function always returns :ref:`RenderingDevice.DEVICE_TYPE_OTHER`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_video_adapter_vendor: -- :ref:`String` **get_video_adapter_vendor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_video_adapter_vendor** **(** **)** |const| Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). \ **Note:** When running a headless or server binary, this function returns an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_get_white_texture: -- :ref:`RID` **get_white_texture** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **get_white_texture** **(** **)** Returns the id of a white texture. Creates one if none exists. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_gi_set_use_half_resolution: -- void **gi_set_use_half_resolution** **(** :ref:`bool` half_resolution **)** +.. rst-class:: classref-method + +void **gi_set_use_half_resolution** **(** :ref:`bool` half_resolution **)** If ``half_resolution`` is ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment.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` rendering is not affected by this setting. See also :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_global_shader_parameter_add: -- void **global_shader_parameter_add** **(** :ref:`StringName` name, :ref:`GlobalShaderParameterType` type, :ref:`Variant` default_value **)** +.. rst-class:: classref-method + +void **global_shader_parameter_add** **(** :ref:`StringName` name, :ref:`GlobalShaderParameterType` type, :ref:`Variant` default_value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_global_shader_parameter_get: -- :ref:`Variant` **global_shader_parameter_get** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **global_shader_parameter_get** **(** :ref:`StringName` name **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_global_shader_parameter_get_list: -- :ref:`PackedStringArray` **global_shader_parameter_get_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **global_shader_parameter_get_list** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_global_shader_parameter_get_type: -- :ref:`GlobalShaderParameterType` **global_shader_parameter_get_type** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`GlobalShaderParameterType` **global_shader_parameter_get_type** **(** :ref:`StringName` name **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_global_shader_parameter_remove: -- void **global_shader_parameter_remove** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **global_shader_parameter_remove** **(** :ref:`StringName` name **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_global_shader_parameter_set: -- void **global_shader_parameter_set** **(** :ref:`StringName` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **global_shader_parameter_set** **(** :ref:`StringName` name, :ref:`Variant` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_global_shader_parameter_set_override: -- void **global_shader_parameter_set_override** **(** :ref:`StringName` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **global_shader_parameter_set_override** **(** :ref:`StringName` name, :ref:`Variant` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_has_changed: -- :ref:`bool` **has_changed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_changed** **(** **)** |const| Returns ``true`` if changes have been made to the RenderingServer's data. :ref:`force_draw` is usually called if this happens. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_has_feature: -- :ref:`bool` **has_feature** **(** :ref:`Features` feature **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_feature** **(** :ref:`Features` feature **)** |const| Not yet implemented. Always returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_has_os_feature: -- :ref:`bool` **has_os_feature** **(** :ref:`String` feature **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_os_feature** **(** :ref:`String` feature **)** |const| Returns ``true`` if the OS supports a certain ``feature``. Features might be ``s3tc``, ``etc``, and ``etc2``. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_attach_object_instance_id: -- void **instance_attach_object_instance_id** **(** :ref:`RID` instance, :ref:`int` id **)** +.. rst-class:: classref-method + +void **instance_attach_object_instance_id** **(** :ref:`RID` instance, :ref:`int` id **)** Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with :ref:`instances_cull_aabb`, :ref:`instances_cull_convex`, and :ref:`instances_cull_ray`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_attach_skeleton: -- void **instance_attach_skeleton** **(** :ref:`RID` instance, :ref:`RID` skeleton **)** +.. rst-class:: classref-method + +void **instance_attach_skeleton** **(** :ref:`RID` instance, :ref:`RID` skeleton **)** Attaches a skeleton to an instance. Removes the previous skeleton from the instance. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_create: -- :ref:`RID` **instance_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. @@ -4759,113 +7510,161 @@ Once finished with your RID, you will want to free the RID using the RenderingSe An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using :ref:`instance_set_base`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_create2: -- :ref:`RID` **instance_create2** **(** :ref:`RID` base, :ref:`RID` scenario **)** +.. rst-class:: classref-method + +:ref:`RID` **instance_create2** **(** :ref:`RID` base, :ref:`RID` scenario **)** 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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_get_shader_parameter: -- :ref:`Variant` **instance_geometry_get_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **instance_geometry_get_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_get_shader_parameter_default_value: -- :ref:`Variant` **instance_geometry_get_shader_parameter_default_value** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **instance_geometry_get_shader_parameter_default_value** **(** :ref:`RID` instance, :ref:`StringName` parameter **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_get_shader_parameter_list: -- :ref:`Dictionary[]` **instance_geometry_get_shader_parameter_list** **(** :ref:`RID` instance **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **instance_geometry_get_shader_parameter_list** **(** :ref:`RID` instance **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_cast_shadows_setting: -- void **instance_geometry_set_cast_shadows_setting** **(** :ref:`RID` instance, :ref:`ShadowCastingSetting` shadow_casting_setting **)** +.. rst-class:: classref-method + +void **instance_geometry_set_cast_shadows_setting** **(** :ref:`RID` instance, :ref:`ShadowCastingSetting` shadow_casting_setting **)** Sets the shadow casting setting to one of :ref:`ShadowCastingSetting`. Equivalent to :ref:`GeometryInstance3D.cast_shadow`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_flag: -- void **instance_geometry_set_flag** **(** :ref:`RID` instance, :ref:`InstanceFlags` flag, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **instance_geometry_set_flag** **(** :ref:`RID` instance, :ref:`InstanceFlags` flag, :ref:`bool` enabled **)** Sets the flag for a given :ref:`InstanceFlags`. See :ref:`InstanceFlags` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_lightmap: -- void **instance_geometry_set_lightmap** **(** :ref:`RID` instance, :ref:`RID` lightmap, :ref:`Rect2` lightmap_uv_scale, :ref:`int` lightmap_slice **)** +.. rst-class:: classref-method + +void **instance_geometry_set_lightmap** **(** :ref:`RID` instance, :ref:`RID` lightmap, :ref:`Rect2` lightmap_uv_scale, :ref:`int` lightmap_slice **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_lod_bias: -- void **instance_geometry_set_lod_bias** **(** :ref:`RID` instance, :ref:`float` lod_bias **)** +.. rst-class:: classref-method + +void **instance_geometry_set_lod_bias** **(** :ref:`RID` instance, :ref:`float` lod_bias **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_material_overlay: -- void **instance_geometry_set_material_overlay** **(** :ref:`RID` instance, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **instance_geometry_set_material_overlay** **(** :ref:`RID` instance, :ref:`RID` material **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_material_override: -- void **instance_geometry_set_material_override** **(** :ref:`RID` instance, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **instance_geometry_set_material_override** **(** :ref:`RID` instance, :ref:`RID` material **)** Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to :ref:`GeometryInstance3D.material_override`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_shader_parameter: -- void **instance_geometry_set_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **instance_geometry_set_shader_parameter** **(** :ref:`RID` instance, :ref:`StringName` parameter, :ref:`Variant` value **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_transparency: -- void **instance_geometry_set_transparency** **(** :ref:`RID` instance, :ref:`float` transparency **)** +.. rst-class:: classref-method + +void **instance_geometry_set_transparency** **(** :ref:`RID` instance, :ref:`float` transparency **)** Sets the transparency for the given geometry instance. Equivalent to :ref:`GeometryInstance3D.transparency`. @@ -4875,459 +7674,667 @@ In spatial shaders, ``1.0 - transparency`` is set as the default value of the `` \ **Note:** ``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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_geometry_set_visibility_range: -- void **instance_geometry_set_visibility_range** **(** :ref:`RID` instance, :ref:`float` min, :ref:`float` max, :ref:`float` min_margin, :ref:`float` max_margin, :ref:`VisibilityRangeFadeMode` fade_mode **)** +.. rst-class:: classref-method + +void **instance_geometry_set_visibility_range** **(** :ref:`RID` instance, :ref:`float` min, :ref:`float` max, :ref:`float` min_margin, :ref:`float` max_margin, :ref:`VisibilityRangeFadeMode` fade_mode **)** Sets the visibility range values for the given geometry instance. Equivalent to :ref:`GeometryInstance3D.visibility_range_begin` and related properties. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_base: -- void **instance_set_base** **(** :ref:`RID` instance, :ref:`RID` base **)** +.. rst-class:: classref-method + +void **instance_set_base** **(** :ref:`RID` instance, :ref:`RID` 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, immediate geometry, particle system, reflection probe, lightmap, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_blend_shape_weight: -- void **instance_set_blend_shape_weight** **(** :ref:`RID` instance, :ref:`int` shape, :ref:`float` weight **)** +.. rst-class:: classref-method + +void **instance_set_blend_shape_weight** **(** :ref:`RID` instance, :ref:`int` shape, :ref:`float` weight **)** Sets the weight for a given blend shape associated with this instance. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_custom_aabb: -- void **instance_set_custom_aabb** **(** :ref:`RID` instance, :ref:`AABB` aabb **)** +.. rst-class:: classref-method + +void **instance_set_custom_aabb** **(** :ref:`RID` instance, :ref:`AABB` aabb **)** Sets a custom AABB to use when culling objects from the view frustum. Equivalent to :ref:`GeometryInstance3D.set_custom_aabb`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_extra_visibility_margin: -- void **instance_set_extra_visibility_margin** **(** :ref:`RID` instance, :ref:`float` margin **)** +.. rst-class:: classref-method + +void **instance_set_extra_visibility_margin** **(** :ref:`RID` instance, :ref:`float` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_ignore_culling: -- void **instance_set_ignore_culling** **(** :ref:`RID` instance, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **instance_set_ignore_culling** **(** :ref:`RID` instance, :ref:`bool` enabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_layer_mask: -- void **instance_set_layer_mask** **(** :ref:`RID` instance, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **instance_set_layer_mask** **(** :ref:`RID` instance, :ref:`int` mask **)** Sets the render layers that this instance will be drawn to. Equivalent to :ref:`VisualInstance3D.layers`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_scenario: -- void **instance_set_scenario** **(** :ref:`RID` instance, :ref:`RID` scenario **)** +.. rst-class:: classref-method + +void **instance_set_scenario** **(** :ref:`RID` instance, :ref:`RID` scenario **)** Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_surface_override_material: -- void **instance_set_surface_override_material** **(** :ref:`RID` instance, :ref:`int` surface, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **instance_set_surface_override_material** **(** :ref:`RID` instance, :ref:`int` surface, :ref:`RID` material **)** Sets the override material of a specific surface. Equivalent to :ref:`MeshInstance3D.set_surface_override_material`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_transform: -- void **instance_set_transform** **(** :ref:`RID` instance, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **instance_set_transform** **(** :ref:`RID` instance, :ref:`Transform3D` transform **)** Sets the world space transform of the instance. Equivalent to :ref:`Node3D.transform`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_visibility_parent: -- void **instance_set_visibility_parent** **(** :ref:`RID` instance, :ref:`RID` parent **)** +.. rst-class:: classref-method + +void **instance_set_visibility_parent** **(** :ref:`RID` instance, :ref:`RID` parent **)** Sets the visibility parent for the given instance. Equivalent to :ref:`Node3D.visibility_parent`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instance_set_visible: -- void **instance_set_visible** **(** :ref:`RID` instance, :ref:`bool` visible **)** +.. rst-class:: classref-method + +void **instance_set_visible** **(** :ref:`RID` instance, :ref:`bool` visible **)** Sets whether an instance is drawn or not. Equivalent to :ref:`Node3D.visible`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instances_cull_aabb: -- :ref:`PackedInt64Array` **instances_cull_aabb** **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **instances_cull_aabb** **(** :ref:`AABB` aabb, :ref:`RID` scenario **)** |const| Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. \ **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instances_cull_convex: -- :ref:`PackedInt64Array` **instances_cull_convex** **(** :ref:`Plane[]` convex, :ref:`RID` scenario **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **instances_cull_convex** **(** :ref:`Plane[]` convex, :ref:`RID` scenario **)** |const| Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. \ **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_instances_cull_ray: -- :ref:`PackedInt64Array` **instances_cull_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt64Array` **instances_cull_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`RID` scenario **)** |const| Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as :ref:`MeshInstance3D` or :ref:`DirectionalLight3D`. Use :ref:`@GlobalScope.instance_from_id` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D` you want to query. This forces an update for all resources queued to update. \ **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_directional_set_blend_splits: -- void **light_directional_set_blend_splits** **(** :ref:`RID` light, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **light_directional_set_blend_splits** **(** :ref:`RID` light, :ref:`bool` enable **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_directional_set_shadow_mode: -- void **light_directional_set_shadow_mode** **(** :ref:`RID` light, :ref:`LightDirectionalShadowMode` mode **)** +.. rst-class:: classref-method + +void **light_directional_set_shadow_mode** **(** :ref:`RID` light, :ref:`LightDirectionalShadowMode` mode **)** Sets the shadow mode for this directional light. Equivalent to :ref:`DirectionalLight3D.directional_shadow_mode`. See :ref:`LightDirectionalShadowMode` for options. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_directional_set_sky_mode: -- void **light_directional_set_sky_mode** **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` mode **)** +.. rst-class:: classref-method + +void **light_directional_set_sky_mode** **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_omni_set_shadow_mode: -- void **light_omni_set_shadow_mode** **(** :ref:`RID` light, :ref:`LightOmniShadowMode` mode **)** +.. rst-class:: classref-method + +void **light_omni_set_shadow_mode** **(** :ref:`RID` light, :ref:`LightOmniShadowMode` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_projectors_set_filter: -- void **light_projectors_set_filter** **(** :ref:`LightProjectorFilter` filter **)** +.. rst-class:: classref-method + +void **light_projectors_set_filter** **(** :ref:`LightProjectorFilter` filter **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_bake_mode: -- void **light_set_bake_mode** **(** :ref:`RID` light, :ref:`LightBakeMode` bake_mode **)** +.. rst-class:: classref-method + +void **light_set_bake_mode** **(** :ref:`RID` light, :ref:`LightBakeMode` bake_mode **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_color: -- void **light_set_color** **(** :ref:`RID` light, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **light_set_color** **(** :ref:`RID` light, :ref:`Color` color **)** Sets the color of the light. Equivalent to :ref:`Light3D.light_color`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_cull_mask: -- void **light_set_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **light_set_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** Sets the cull mask for this Light3D. Lights only affect objects in the selected layers. Equivalent to :ref:`Light3D.light_cull_mask`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_distance_fade: -- void **light_set_distance_fade** **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** +.. rst-class:: classref-method + +void **light_set_distance_fade** **(** :ref:`RID` decal, :ref:`bool` enabled, :ref:`float` begin, :ref:`float` shadow, :ref:`float` length **)** Sets the distance fade for this Light3D. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to :ref:`Light3D.distance_fade_enabled`, :ref:`Light3D.distance_fade_begin`, :ref:`Light3D.distance_fade_shadow`, and :ref:`Light3D.distance_fade_length`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_max_sdfgi_cascade: -- void **light_set_max_sdfgi_cascade** **(** :ref:`RID` light, :ref:`int` cascade **)** +.. rst-class:: classref-method + +void **light_set_max_sdfgi_cascade** **(** :ref:`RID` light, :ref:`int` cascade **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_negative: -- void **light_set_negative** **(** :ref:`RID` light, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **light_set_negative** **(** :ref:`RID` light, :ref:`bool` enable **)** If ``true``, light will subtract light instead of adding light. Equivalent to :ref:`Light3D.light_negative`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_param: -- void **light_set_param** **(** :ref:`RID` light, :ref:`LightParam` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **light_set_param** **(** :ref:`RID` light, :ref:`LightParam` param, :ref:`float` value **)** Sets the specified light parameter. See :ref:`LightParam` for options. Equivalent to :ref:`Light3D.set_param`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_projector: -- void **light_set_projector** **(** :ref:`RID` light, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **light_set_projector** **(** :ref:`RID` light, :ref:`RID` texture **)** Not implemented in Godot 3.x. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_reverse_cull_face_mode: -- void **light_set_reverse_cull_face_mode** **(** :ref:`RID` light, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **light_set_reverse_cull_face_mode** **(** :ref:`RID` light, :ref:`bool` enabled **)** 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`. Equivalent to :ref:`Light3D.shadow_reverse_cull_face`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_light_set_shadow: -- void **light_set_shadow** **(** :ref:`RID` light, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **light_set_shadow** **(** :ref:`RID` light, :ref:`bool` enabled **)** If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_create: -- :ref:`RID` **lightmap_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **lightmap_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_get_probe_capture_bsp_tree: -- :ref:`PackedInt32Array` **lightmap_get_probe_capture_bsp_tree** **(** :ref:`RID` lightmap **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **lightmap_get_probe_capture_bsp_tree** **(** :ref:`RID` lightmap **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_get_probe_capture_points: -- :ref:`PackedVector3Array` **lightmap_get_probe_capture_points** **(** :ref:`RID` lightmap **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **lightmap_get_probe_capture_points** **(** :ref:`RID` lightmap **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_get_probe_capture_sh: -- :ref:`PackedColorArray` **lightmap_get_probe_capture_sh** **(** :ref:`RID` lightmap **)** |const| +.. rst-class:: classref-method + +:ref:`PackedColorArray` **lightmap_get_probe_capture_sh** **(** :ref:`RID` lightmap **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_get_probe_capture_tetrahedra: -- :ref:`PackedInt32Array` **lightmap_get_probe_capture_tetrahedra** **(** :ref:`RID` lightmap **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **lightmap_get_probe_capture_tetrahedra** **(** :ref:`RID` lightmap **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_set_baked_exposure_normalization: -- void **lightmap_set_baked_exposure_normalization** **(** :ref:`RID` lightmap, :ref:`float` baked_exposure **)** +.. rst-class:: classref-method + +void **lightmap_set_baked_exposure_normalization** **(** :ref:`RID` lightmap, :ref:`float` baked_exposure **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_set_probe_bounds: -- void **lightmap_set_probe_bounds** **(** :ref:`RID` lightmap, :ref:`AABB` bounds **)** +.. rst-class:: classref-method + +void **lightmap_set_probe_bounds** **(** :ref:`RID` lightmap, :ref:`AABB` bounds **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_set_probe_capture_data: -- void **lightmap_set_probe_capture_data** **(** :ref:`RID` lightmap, :ref:`PackedVector3Array` points, :ref:`PackedColorArray` point_sh, :ref:`PackedInt32Array` tetrahedra, :ref:`PackedInt32Array` bsp_tree **)** +.. rst-class:: classref-method + +void **lightmap_set_probe_capture_data** **(** :ref:`RID` lightmap, :ref:`PackedVector3Array` points, :ref:`PackedColorArray` point_sh, :ref:`PackedInt32Array` tetrahedra, :ref:`PackedInt32Array` bsp_tree **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_set_probe_capture_update_speed: -- void **lightmap_set_probe_capture_update_speed** **(** :ref:`float` speed **)** +.. rst-class:: classref-method + +void **lightmap_set_probe_capture_update_speed** **(** :ref:`float` speed **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_set_probe_interior: -- void **lightmap_set_probe_interior** **(** :ref:`RID` lightmap, :ref:`bool` interior **)** +.. rst-class:: classref-method + +void **lightmap_set_probe_interior** **(** :ref:`RID` lightmap, :ref:`bool` interior **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_lightmap_set_textures: -- void **lightmap_set_textures** **(** :ref:`RID` lightmap, :ref:`RID` light, :ref:`bool` uses_sh **)** +.. rst-class:: classref-method + +void **lightmap_set_textures** **(** :ref:`RID` lightmap, :ref:`RID` light, :ref:`bool` uses_sh **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_make_sphere_mesh: -- :ref:`RID` **make_sphere_mesh** **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** +.. rst-class:: classref-method + +:ref:`RID` **make_sphere_mesh** **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** Returns a mesh of a sphere with the given number of horizontal and vertical subdivisions. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_material_create: -- :ref:`RID` **material_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_material_get_param: -- :ref:`Variant` **material_get_param** **(** :ref:`RID` material, :ref:`StringName` parameter **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **material_get_param** **(** :ref:`RID` material, :ref:`StringName` parameter **)** |const| Returns the value of a certain material's parameter. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_material_set_next_pass: -- void **material_set_next_pass** **(** :ref:`RID` material, :ref:`RID` next_material **)** +.. rst-class:: classref-method + +void **material_set_next_pass** **(** :ref:`RID` material, :ref:`RID` next_material **)** Sets an object's next material. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_material_set_param: -- void **material_set_param** **(** :ref:`RID` material, :ref:`StringName` parameter, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **material_set_param** **(** :ref:`RID` material, :ref:`StringName` parameter, :ref:`Variant` value **)** Sets a material's parameter. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_material_set_render_priority: -- void **material_set_render_priority** **(** :ref:`RID` material, :ref:`int` priority **)** +.. rst-class:: classref-method + +void **material_set_render_priority** **(** :ref:`RID` material, :ref:`int` priority **)** Sets a material's render priority. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_material_set_shader: -- void **material_set_shader** **(** :ref:`RID` shader_material, :ref:`RID` shader **)** +.. rst-class:: classref-method + +void **material_set_shader** **(** :ref:`RID` shader_material, :ref:`RID` shader **)** Sets a shader material's shader. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_add_surface: -- void **mesh_add_surface** **(** :ref:`RID` mesh, :ref:`Dictionary` surface **)** +.. rst-class:: classref-method + +void **mesh_add_surface** **(** :ref:`RID` mesh, :ref:`Dictionary` surface **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_add_surface_from_arrays: -- void **mesh_add_surface_from_arrays** **(** :ref:`RID` mesh, :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_format=0 **)** +.. rst-class:: classref-method + +void **mesh_add_surface_from_arrays** **(** :ref:`RID` mesh, :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[], :ref:`Dictionary` lods={}, :ref:`int` compress_format=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_clear: -- void **mesh_clear** **(** :ref:`RID` mesh **)** +.. rst-class:: classref-method + +void **mesh_clear** **(** :ref:`RID` mesh **)** Removes all surfaces from a mesh. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_create: -- :ref:`RID` **mesh_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. @@ -5335,201 +8342,289 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this mesh to an instance using :ref:`instance_set_base` using the returned RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_create_from_surfaces: -- :ref:`RID` **mesh_create_from_surfaces** **(** :ref:`Dictionary[]` surfaces, :ref:`int` blend_shape_count=0 **)** +.. rst-class:: classref-method + +:ref:`RID` **mesh_create_from_surfaces** **(** :ref:`Dictionary[]` surfaces, :ref:`int` blend_shape_count=0 **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_get_blend_shape_count: -- :ref:`int` **mesh_get_blend_shape_count** **(** :ref:`RID` mesh **)** |const| +.. rst-class:: classref-method + +:ref:`int` **mesh_get_blend_shape_count** **(** :ref:`RID` mesh **)** |const| Returns a mesh's blend shape count. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_get_blend_shape_mode: -- :ref:`BlendShapeMode` **mesh_get_blend_shape_mode** **(** :ref:`RID` mesh **)** |const| +.. rst-class:: classref-method + +:ref:`BlendShapeMode` **mesh_get_blend_shape_mode** **(** :ref:`RID` mesh **)** |const| Returns a mesh's blend shape mode. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_get_custom_aabb: -- :ref:`AABB` **mesh_get_custom_aabb** **(** :ref:`RID` mesh **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **mesh_get_custom_aabb** **(** :ref:`RID` mesh **)** |const| Returns a mesh's custom aabb. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_get_surface: -- :ref:`Dictionary` **mesh_get_surface** **(** :ref:`RID` mesh, :ref:`int` surface **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **mesh_get_surface** **(** :ref:`RID` mesh, :ref:`int` surface **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_get_surface_count: -- :ref:`int` **mesh_get_surface_count** **(** :ref:`RID` mesh **)** |const| +.. rst-class:: classref-method + +:ref:`int` **mesh_get_surface_count** **(** :ref:`RID` mesh **)** |const| Returns a mesh's number of surfaces. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_set_blend_shape_mode: -- void **mesh_set_blend_shape_mode** **(** :ref:`RID` mesh, :ref:`BlendShapeMode` mode **)** +.. rst-class:: classref-method + +void **mesh_set_blend_shape_mode** **(** :ref:`RID` mesh, :ref:`BlendShapeMode` mode **)** Sets a mesh's blend shape mode. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_set_custom_aabb: -- void **mesh_set_custom_aabb** **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** +.. rst-class:: classref-method + +void **mesh_set_custom_aabb** **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** Sets a mesh's custom aabb. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_set_shadow_mesh: -- void **mesh_set_shadow_mesh** **(** :ref:`RID` mesh, :ref:`RID` shadow_mesh **)** +.. rst-class:: classref-method + +void **mesh_set_shadow_mesh** **(** :ref:`RID` mesh, :ref:`RID` shadow_mesh **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_get_arrays: -- :ref:`Array` **mesh_surface_get_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **mesh_surface_get_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| Returns a mesh's surface's buffer arrays. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_get_blend_shape_arrays: -- :ref:`Array[]` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| +.. rst-class:: classref-method + +:ref:`Array[]` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| Returns a mesh's surface's arrays for blend shapes. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_get_format_attribute_stride: -- :ref:`int` **mesh_surface_get_format_attribute_stride** **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| +.. rst-class:: classref-method + +:ref:`int` **mesh_surface_get_format_attribute_stride** **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_get_format_offset: -- :ref:`int` **mesh_surface_get_format_offset** **(** :ref:`int` format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **mesh_surface_get_format_offset** **(** :ref:`int` format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_get_format_skin_stride: -- :ref:`int` **mesh_surface_get_format_skin_stride** **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| +.. rst-class:: classref-method + +:ref:`int` **mesh_surface_get_format_skin_stride** **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_get_format_vertex_stride: -- :ref:`int` **mesh_surface_get_format_vertex_stride** **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| +.. rst-class:: classref-method + +:ref:`int` **mesh_surface_get_format_vertex_stride** **(** :ref:`int` format, :ref:`int` vertex_count **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_get_material: -- :ref:`RID` **mesh_surface_get_material** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **mesh_surface_get_material** **(** :ref:`RID` mesh, :ref:`int` surface **)** |const| Returns a mesh's surface's material. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_set_material: -- void **mesh_surface_set_material** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **mesh_surface_set_material** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** Sets a mesh's surface's material. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_update_attribute_region: -- void **mesh_surface_update_attribute_region** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +void **mesh_surface_update_attribute_region** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_update_skin_region: -- void **mesh_surface_update_skin_region** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +void **mesh_surface_update_skin_region** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_mesh_surface_update_vertex_region: -- void **mesh_surface_update_vertex_region** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +void **mesh_surface_update_vertex_region** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`int` offset, :ref:`PackedByteArray` data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_allocate_data: -- void **multimesh_allocate_data** **(** :ref:`RID` multimesh, :ref:`int` instances, :ref:`MultimeshTransformFormat` transform_format, :ref:`bool` color_format=false, :ref:`bool` custom_data_format=false **)** +.. rst-class:: classref-method + +void **multimesh_allocate_data** **(** :ref:`RID` multimesh, :ref:`int` instances, :ref:`MultimeshTransformFormat` transform_format, :ref:`bool` color_format=false, :ref:`bool` custom_data_format=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_create: -- :ref:`RID` **multimesh_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **multimesh_create** **(** **)** Creates a new multimesh on the RenderingServer and returns an :ref:`RID` handle. This RID will be used in all ``multimesh_*`` RenderingServer functions. @@ -5537,163 +8632,239 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this multimesh to an instance using :ref:`instance_set_base` using the returned RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_get_aabb: -- :ref:`AABB` **multimesh_get_aabb** **(** :ref:`RID` multimesh **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **multimesh_get_aabb** **(** :ref:`RID` multimesh **)** |const| Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_get_buffer: -- :ref:`PackedFloat32Array` **multimesh_get_buffer** **(** :ref:`RID` multimesh **)** |const| +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **multimesh_get_buffer** **(** :ref:`RID` multimesh **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_get_instance_count: -- :ref:`int` **multimesh_get_instance_count** **(** :ref:`RID` multimesh **)** |const| +.. rst-class:: classref-method + +:ref:`int` **multimesh_get_instance_count** **(** :ref:`RID` multimesh **)** |const| Returns the number of instances allocated for this multimesh. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_get_mesh: -- :ref:`RID` **multimesh_get_mesh** **(** :ref:`RID` multimesh **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **multimesh_get_mesh** **(** :ref:`RID` multimesh **)** |const| Returns the RID of the mesh that will be used in drawing this multimesh. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_get_visible_instances: -- :ref:`int` **multimesh_get_visible_instances** **(** :ref:`RID` multimesh **)** |const| +.. rst-class:: classref-method + +:ref:`int` **multimesh_get_visible_instances** **(** :ref:`RID` multimesh **)** |const| Returns the number of visible instances for this multimesh. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_get_color: -- :ref:`Color` **multimesh_instance_get_color** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **multimesh_instance_get_color** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| Returns the color by which the specified instance will be modulated. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_get_custom_data: -- :ref:`Color` **multimesh_instance_get_custom_data** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **multimesh_instance_get_custom_data** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| Returns the custom data associated with the specified instance. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_get_transform: -- :ref:`Transform3D` **multimesh_instance_get_transform** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **multimesh_instance_get_transform** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| Returns the :ref:`Transform3D` of the specified instance. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_get_transform_2d: -- :ref:`Transform2D` **multimesh_instance_get_transform_2d** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **multimesh_instance_get_transform_2d** **(** :ref:`RID` multimesh, :ref:`int` index **)** |const| Returns the :ref:`Transform2D` of the specified instance. For use when the multimesh is set to use 2D transforms. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_set_color: -- void **multimesh_instance_set_color** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **multimesh_instance_set_color** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` color **)** Sets the color by which this instance will be modulated. Equivalent to :ref:`MultiMesh.set_instance_color`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_set_custom_data: -- void **multimesh_instance_set_custom_data** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` custom_data **)** +.. rst-class:: classref-method + +void **multimesh_instance_set_custom_data** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Color` custom_data **)** Sets the custom data for this instance. Custom data is passed as a :ref:`Color`, but is interpreted as a ``vec4`` in the shader. Equivalent to :ref:`MultiMesh.set_instance_custom_data`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_set_transform: -- void **multimesh_instance_set_transform** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **multimesh_instance_set_transform** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform3D` transform **)** Sets the :ref:`Transform3D` for this instance. Equivalent to :ref:`MultiMesh.set_instance_transform`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_instance_set_transform_2d: -- void **multimesh_instance_set_transform_2d** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **multimesh_instance_set_transform_2d** **(** :ref:`RID` multimesh, :ref:`int` index, :ref:`Transform2D` transform **)** Sets the :ref:`Transform2D` for this instance. For use when multimesh is used in 2D. Equivalent to :ref:`MultiMesh.set_instance_transform_2d`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_set_buffer: -- void **multimesh_set_buffer** **(** :ref:`RID` multimesh, :ref:`PackedFloat32Array` buffer **)** +.. rst-class:: classref-method + +void **multimesh_set_buffer** **(** :ref:`RID` multimesh, :ref:`PackedFloat32Array` buffer **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_set_mesh: -- void **multimesh_set_mesh** **(** :ref:`RID` multimesh, :ref:`RID` mesh **)** +.. rst-class:: classref-method + +void **multimesh_set_mesh** **(** :ref:`RID` multimesh, :ref:`RID` mesh **)** Sets the mesh to be drawn by the multimesh. Equivalent to :ref:`MultiMesh.mesh`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_multimesh_set_visible_instances: -- void **multimesh_set_visible_instances** **(** :ref:`RID` multimesh, :ref:`int` visible **)** +.. rst-class:: classref-method + +void **multimesh_set_visible_instances** **(** :ref:`RID` multimesh, :ref:`int` visible **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_occluder_create: -- :ref:`RID` **occluder_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **occluder_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_occluder_set_mesh: -- void **occluder_set_mesh** **(** :ref:`RID` occluder, :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** +.. rst-class:: classref-method + +void **occluder_set_mesh** **(** :ref:`RID` occluder, :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_omni_light_create: -- :ref:`RID` **omni_light_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. @@ -5701,121 +8872,169 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this omni light to an instance using :ref:`instance_set_base` using the returned RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_create: -- :ref:`RID` **particles_collision_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **particles_collision_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_height_field_update: -- void **particles_collision_height_field_update** **(** :ref:`RID` particles_collision **)** +.. rst-class:: classref-method + +void **particles_collision_height_field_update** **(** :ref:`RID` particles_collision **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_attractor_attenuation: -- void **particles_collision_set_attractor_attenuation** **(** :ref:`RID` particles_collision, :ref:`float` curve **)** +.. rst-class:: classref-method + +void **particles_collision_set_attractor_attenuation** **(** :ref:`RID` particles_collision, :ref:`float` curve **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_attractor_directionality: -- void **particles_collision_set_attractor_directionality** **(** :ref:`RID` particles_collision, :ref:`float` amount **)** +.. rst-class:: classref-method + +void **particles_collision_set_attractor_directionality** **(** :ref:`RID` particles_collision, :ref:`float` amount **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_attractor_strength: -- void **particles_collision_set_attractor_strength** **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** +.. rst-class:: classref-method + +void **particles_collision_set_attractor_strength** **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_box_extents: -- void **particles_collision_set_box_extents** **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** +.. rst-class:: classref-method + +void **particles_collision_set_box_extents** **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_collision_type: -- void **particles_collision_set_collision_type** **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionType` type **)** +.. rst-class:: classref-method + +void **particles_collision_set_collision_type** **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionType` type **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_cull_mask: -- void **particles_collision_set_cull_mask** **(** :ref:`RID` particles_collision, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **particles_collision_set_cull_mask** **(** :ref:`RID` particles_collision, :ref:`int` mask **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_field_texture: -- void **particles_collision_set_field_texture** **(** :ref:`RID` particles_collision, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **particles_collision_set_field_texture** **(** :ref:`RID` particles_collision, :ref:`RID` texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_height_field_resolution: -- void **particles_collision_set_height_field_resolution** **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution` resolution **)** +.. rst-class:: classref-method + +void **particles_collision_set_height_field_resolution** **(** :ref:`RID` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution` resolution **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_collision_set_sphere_radius: -- void **particles_collision_set_sphere_radius** **(** :ref:`RID` particles_collision, :ref:`float` radius **)** +.. rst-class:: classref-method + +void **particles_collision_set_sphere_radius** **(** :ref:`RID` particles_collision, :ref:`float` radius **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_create: -- :ref:`RID` **particles_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **particles_create** **(** **)** Creates a 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. @@ -5823,279 +9042,407 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach these particles to an instance using :ref:`instance_set_base` using the returned RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_emit: -- void **particles_emit** **(** :ref:`RID` particles, :ref:`Transform3D` transform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` emit_flags **)** +.. rst-class:: classref-method + +void **particles_emit** **(** :ref:`RID` particles, :ref:`Transform3D` transform, :ref:`Vector3` velocity, :ref:`Color` color, :ref:`Color` custom, :ref:`int` emit_flags **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_get_current_aabb: -- :ref:`AABB` **particles_get_current_aabb** **(** :ref:`RID` particles **)** +.. rst-class:: classref-method + +:ref:`AABB` **particles_get_current_aabb** **(** :ref:`RID` particles **)** Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to :ref:`GPUParticles3D.capture_aabb`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_get_emitting: -- :ref:`bool` **particles_get_emitting** **(** :ref:`RID` particles **)** +.. rst-class:: classref-method + +:ref:`bool` **particles_get_emitting** **(** :ref:`RID` particles **)** Returns ``true`` if particles are currently set to emitting. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_is_inactive: -- :ref:`bool` **particles_is_inactive** **(** :ref:`RID` particles **)** +.. rst-class:: classref-method + +:ref:`bool` **particles_is_inactive** **(** :ref:`RID` particles **)** Returns ``true`` if particles are not emitting and particles are set to inactive. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_request_process: -- void **particles_request_process** **(** :ref:`RID` particles **)** +.. rst-class:: classref-method + +void **particles_request_process** **(** :ref:`RID` particles **)** 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`, :ref:`instances_cull_convex`, or :ref:`instances_cull_ray`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_restart: -- void **particles_restart** **(** :ref:`RID` particles **)** +.. rst-class:: classref-method + +void **particles_restart** **(** :ref:`RID` particles **)** Reset the particles on the next update. Equivalent to :ref:`GPUParticles3D.restart`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_amount: -- void **particles_set_amount** **(** :ref:`RID` particles, :ref:`int` amount **)** +.. rst-class:: classref-method + +void **particles_set_amount** **(** :ref:`RID` particles, :ref:`int` amount **)** Sets the number of particles to be drawn and allocates the memory for them. Equivalent to :ref:`GPUParticles3D.amount`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_collision_base_size: -- void **particles_set_collision_base_size** **(** :ref:`RID` particles, :ref:`float` size **)** +.. rst-class:: classref-method + +void **particles_set_collision_base_size** **(** :ref:`RID` particles, :ref:`float` size **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_custom_aabb: -- void **particles_set_custom_aabb** **(** :ref:`RID` particles, :ref:`AABB` aabb **)** +.. rst-class:: classref-method + +void **particles_set_custom_aabb** **(** :ref:`RID` particles, :ref:`AABB` aabb **)** Sets a custom axis-aligned bounding box for the particle system. Equivalent to :ref:`GPUParticles3D.visibility_aabb`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_draw_order: -- void **particles_set_draw_order** **(** :ref:`RID` particles, :ref:`ParticlesDrawOrder` order **)** +.. rst-class:: classref-method + +void **particles_set_draw_order** **(** :ref:`RID` particles, :ref:`ParticlesDrawOrder` order **)** Sets the draw order of the particles to one of the named enums from :ref:`ParticlesDrawOrder`. See :ref:`ParticlesDrawOrder` for options. Equivalent to :ref:`GPUParticles3D.draw_order`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_draw_pass_mesh: -- void **particles_set_draw_pass_mesh** **(** :ref:`RID` particles, :ref:`int` pass, :ref:`RID` mesh **)** +.. rst-class:: classref-method + +void **particles_set_draw_pass_mesh** **(** :ref:`RID` particles, :ref:`int` pass, :ref:`RID` mesh **)** Sets the mesh to be used for the specified draw pass. Equivalent to :ref:`GPUParticles3D.draw_pass_1`, :ref:`GPUParticles3D.draw_pass_2`, :ref:`GPUParticles3D.draw_pass_3`, and :ref:`GPUParticles3D.draw_pass_4`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_draw_passes: -- void **particles_set_draw_passes** **(** :ref:`RID` particles, :ref:`int` count **)** +.. rst-class:: classref-method + +void **particles_set_draw_passes** **(** :ref:`RID` particles, :ref:`int` count **)** Sets the number of draw passes to use. Equivalent to :ref:`GPUParticles3D.draw_passes`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_emission_transform: -- void **particles_set_emission_transform** **(** :ref:`RID` particles, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **particles_set_emission_transform** **(** :ref:`RID` particles, :ref:`Transform3D` transform **)** Sets the :ref:`Transform3D` that will be used by the particles when they first emit. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_emitting: -- void **particles_set_emitting** **(** :ref:`RID` particles, :ref:`bool` emitting **)** +.. rst-class:: classref-method + +void **particles_set_emitting** **(** :ref:`RID` particles, :ref:`bool` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_explosiveness_ratio: -- void **particles_set_explosiveness_ratio** **(** :ref:`RID` particles, :ref:`float` ratio **)** +.. rst-class:: classref-method + +void **particles_set_explosiveness_ratio** **(** :ref:`RID` particles, :ref:`float` ratio **)** Sets the explosiveness ratio. Equivalent to :ref:`GPUParticles3D.explosiveness`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_fixed_fps: -- void **particles_set_fixed_fps** **(** :ref:`RID` particles, :ref:`int` fps **)** +.. rst-class:: classref-method + +void **particles_set_fixed_fps** **(** :ref:`RID` particles, :ref:`int` fps **)** Sets the frame rate that the particle system rendering will be fixed to. Equivalent to :ref:`GPUParticles3D.fixed_fps`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_fractional_delta: -- void **particles_set_fractional_delta** **(** :ref:`RID` particles, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **particles_set_fractional_delta** **(** :ref:`RID` particles, :ref:`bool` enable **)** If ``true``, uses fractional delta which smooths the movement of the particles. Equivalent to :ref:`GPUParticles3D.fract_delta`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_interpolate: -- void **particles_set_interpolate** **(** :ref:`RID` particles, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **particles_set_interpolate** **(** :ref:`RID` particles, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_lifetime: -- void **particles_set_lifetime** **(** :ref:`RID` particles, :ref:`float` lifetime **)** +.. rst-class:: classref-method + +void **particles_set_lifetime** **(** :ref:`RID` particles, :ref:`float` lifetime **)** Sets the lifetime of each particle in the system. Equivalent to :ref:`GPUParticles3D.lifetime`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_mode: -- void **particles_set_mode** **(** :ref:`RID` particles, :ref:`ParticlesMode` mode **)** +.. rst-class:: classref-method + +void **particles_set_mode** **(** :ref:`RID` particles, :ref:`ParticlesMode` mode **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_one_shot: -- void **particles_set_one_shot** **(** :ref:`RID` particles, :ref:`bool` one_shot **)** +.. rst-class:: classref-method + +void **particles_set_one_shot** **(** :ref:`RID` particles, :ref:`bool` one_shot **)** If ``true``, particles will emit once and then stop. Equivalent to :ref:`GPUParticles3D.one_shot`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_pre_process_time: -- void **particles_set_pre_process_time** **(** :ref:`RID` particles, :ref:`float` time **)** +.. rst-class:: classref-method + +void **particles_set_pre_process_time** **(** :ref:`RID` particles, :ref:`float` 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_process_material: -- void **particles_set_process_material** **(** :ref:`RID` particles, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **particles_set_process_material** **(** :ref:`RID` particles, :ref:`RID` material **)** Sets the material for processing the particles. \ **Note:** This is not the material used to draw the materials. Equivalent to :ref:`GPUParticles3D.process_material`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_randomness_ratio: -- void **particles_set_randomness_ratio** **(** :ref:`RID` particles, :ref:`float` ratio **)** +.. rst-class:: classref-method + +void **particles_set_randomness_ratio** **(** :ref:`RID` particles, :ref:`float` ratio **)** Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to :ref:`GPUParticles3D.randomness`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_speed_scale: -- void **particles_set_speed_scale** **(** :ref:`RID` particles, :ref:`float` scale **)** +.. rst-class:: classref-method + +void **particles_set_speed_scale** **(** :ref:`RID` particles, :ref:`float` scale **)** Sets the speed scale of the particle system. Equivalent to :ref:`GPUParticles3D.speed_scale`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_subemitter: -- void **particles_set_subemitter** **(** :ref:`RID` particles, :ref:`RID` subemitter_particles **)** +.. rst-class:: classref-method + +void **particles_set_subemitter** **(** :ref:`RID` particles, :ref:`RID` subemitter_particles **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_trail_bind_poses: -- void **particles_set_trail_bind_poses** **(** :ref:`RID` particles, :ref:`Transform3D[]` bind_poses **)** +.. rst-class:: classref-method + +void **particles_set_trail_bind_poses** **(** :ref:`RID` particles, :ref:`Transform3D[]` bind_poses **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_trails: -- void **particles_set_trails** **(** :ref:`RID` particles, :ref:`bool` enable, :ref:`float` length_sec **)** +.. rst-class:: classref-method + +void **particles_set_trails** **(** :ref:`RID` particles, :ref:`bool` enable, :ref:`float` length_sec **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_transform_align: -- void **particles_set_transform_align** **(** :ref:`RID` particles, :ref:`ParticlesTransformAlign` align **)** +.. rst-class:: classref-method + +void **particles_set_transform_align** **(** :ref:`RID` particles, :ref:`ParticlesTransformAlign` align **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_particles_set_use_local_coordinates: -- void **particles_set_use_local_coordinates** **(** :ref:`RID` particles, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **particles_set_use_local_coordinates** **(** :ref:`RID` particles, :ref:`bool` enable **)** If ``true``, particles use local coordinates. If ``false`` they use global coordinates. Equivalent to :ref:`GPUParticles3D.local_coords`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_positional_soft_shadow_filter_set_quality: -- void **positional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` quality **)** +.. rst-class:: classref-method + +void **positional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality` quality **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_create: -- :ref:`RID` **reflection_probe_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. @@ -6103,141 +9450,205 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this reflection probe to an instance using :ref:`instance_set_base` using the returned RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_ambient_color: -- void **reflection_probe_set_ambient_color** **(** :ref:`RID` probe, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **reflection_probe_set_ambient_color** **(** :ref:`RID` probe, :ref:`Color` color **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_ambient_energy: -- void **reflection_probe_set_ambient_energy** **(** :ref:`RID` probe, :ref:`float` energy **)** +.. rst-class:: classref-method + +void **reflection_probe_set_ambient_energy** **(** :ref:`RID` probe, :ref:`float` energy **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_ambient_mode: -- void **reflection_probe_set_ambient_mode** **(** :ref:`RID` probe, :ref:`ReflectionProbeAmbientMode` mode **)** +.. rst-class:: classref-method + +void **reflection_probe_set_ambient_mode** **(** :ref:`RID` probe, :ref:`ReflectionProbeAmbientMode` mode **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_as_interior: -- void **reflection_probe_set_as_interior** **(** :ref:`RID` probe, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **reflection_probe_set_as_interior** **(** :ref:`RID` probe, :ref:`bool` enable **)** If ``true``, reflections will ignore sky contribution. Equivalent to :ref:`ReflectionProbe.interior`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_cull_mask: -- void **reflection_probe_set_cull_mask** **(** :ref:`RID` probe, :ref:`int` layers **)** +.. rst-class:: classref-method + +void **reflection_probe_set_cull_mask** **(** :ref:`RID` probe, :ref:`int` layers **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_enable_box_projection: -- void **reflection_probe_set_enable_box_projection** **(** :ref:`RID` probe, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **reflection_probe_set_enable_box_projection** **(** :ref:`RID` probe, :ref:`bool` enable **)** If ``true``, uses box projection. This can make reflections look more correct in certain situations. Equivalent to :ref:`ReflectionProbe.box_projection`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_enable_shadows: -- void **reflection_probe_set_enable_shadows** **(** :ref:`RID` probe, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **reflection_probe_set_enable_shadows** **(** :ref:`RID` probe, :ref:`bool` enable **)** If ``true``, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to :ref:`ReflectionProbe.enable_shadows`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_extents: -- void **reflection_probe_set_extents** **(** :ref:`RID` probe, :ref:`Vector3` extents **)** +.. rst-class:: classref-method + +void **reflection_probe_set_extents** **(** :ref:`RID` probe, :ref:`Vector3` extents **)** Sets the size of the area that the reflection probe will capture. Equivalent to :ref:`ReflectionProbe.extents`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_intensity: -- void **reflection_probe_set_intensity** **(** :ref:`RID` probe, :ref:`float` intensity **)** +.. rst-class:: classref-method + +void **reflection_probe_set_intensity** **(** :ref:`RID` probe, :ref:`float` intensity **)** Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to :ref:`ReflectionProbe.intensity`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_max_distance: -- void **reflection_probe_set_max_distance** **(** :ref:`RID` probe, :ref:`float` distance **)** +.. rst-class:: classref-method + +void **reflection_probe_set_max_distance** **(** :ref:`RID` probe, :ref:`float` distance **)** Sets the max distance away from the probe an object can be before it is culled. Equivalent to :ref:`ReflectionProbe.max_distance`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_mesh_lod_threshold: -- void **reflection_probe_set_mesh_lod_threshold** **(** :ref:`RID` probe, :ref:`float` pixels **)** +.. rst-class:: classref-method + +void **reflection_probe_set_mesh_lod_threshold** **(** :ref:`RID` probe, :ref:`float` pixels **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_origin_offset: -- void **reflection_probe_set_origin_offset** **(** :ref:`RID` probe, :ref:`Vector3` offset **)** +.. rst-class:: classref-method + +void **reflection_probe_set_origin_offset** **(** :ref:`RID` probe, :ref:`Vector3` offset **)** Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to :ref:`ReflectionProbe.origin_offset`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_resolution: -- void **reflection_probe_set_resolution** **(** :ref:`RID` probe, :ref:`int` resolution **)** +.. rst-class:: classref-method + +void **reflection_probe_set_resolution** **(** :ref:`RID` probe, :ref:`int` resolution **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_reflection_probe_set_update_mode: -- void **reflection_probe_set_update_mode** **(** :ref:`RID` probe, :ref:`ReflectionProbeUpdateMode` mode **)** +.. rst-class:: classref-method + +void **reflection_probe_set_update_mode** **(** :ref:`RID` probe, :ref:`ReflectionProbeUpdateMode` mode **)** Sets how often the reflection probe updates. Can either be once or every frame. See :ref:`ReflectionProbeUpdateMode` for options. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_request_frame_drawn_callback: -- void **request_frame_drawn_callback** **(** :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **request_frame_drawn_callback** **(** :ref:`Callable` callable **)** Schedules a callback to the given callable after a frame has been drawn. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_scenario_create: -- :ref:`RID` **scenario_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. @@ -6245,257 +9656,369 @@ Once finished with your RID, you will want to free the RID using the RenderingSe The scenario is the 3D world that all the visual instances exist in. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_scenario_set_camera_attributes: -- void **scenario_set_camera_attributes** **(** :ref:`RID` scenario, :ref:`RID` effects **)** +.. rst-class:: classref-method + +void **scenario_set_camera_attributes** **(** :ref:`RID` scenario, :ref:`RID` effects **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_scenario_set_environment: -- void **scenario_set_environment** **(** :ref:`RID` scenario, :ref:`RID` environment **)** +.. rst-class:: classref-method + +void **scenario_set_environment** **(** :ref:`RID` scenario, :ref:`RID` environment **)** Sets the environment that will be used with this scenario. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_scenario_set_fallback_environment: -- void **scenario_set_fallback_environment** **(** :ref:`RID` scenario, :ref:`RID` environment **)** +.. rst-class:: classref-method + +void **scenario_set_fallback_environment** **(** :ref:`RID` scenario, :ref:`RID` 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_screen_space_roughness_limiter_set_active: -- void **screen_space_roughness_limiter_set_active** **(** :ref:`bool` enable, :ref:`float` amount, :ref:`float` limit **)** +.. rst-class:: classref-method + +void **screen_space_roughness_limiter_set_active** **(** :ref:`bool` enable, :ref:`float` amount, :ref:`float` limit **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_set_boot_image: -- void **set_boot_image** **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** +.. rst-class:: classref-method + +void **set_boot_image** **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale, :ref:`bool` use_filter=true **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_set_debug_generate_wireframes: -- void **set_debug_generate_wireframes** **(** :ref:`bool` generate **)** +.. rst-class:: classref-method + +void **set_debug_generate_wireframes** **(** :ref:`bool` generate **)** If ``true``, the engine will generate wireframes for use with the wireframe debug mode. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_set_default_clear_color: -- void **set_default_clear_color** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_default_clear_color** **(** :ref:`Color` color **)** Sets the default clear color which is used when a specific clear color has not been selected. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_shader_create: -- :ref:`RID` **shader_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_shader_get_code: -- :ref:`String` **shader_get_code** **(** :ref:`RID` shader **)** |const| +.. rst-class:: classref-method + +:ref:`String` **shader_get_code** **(** :ref:`RID` shader **)** |const| Returns a shader's code. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_shader_get_default_texture_parameter: -- :ref:`RID` **shader_get_default_texture_parameter** **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`int` index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **shader_get_default_texture_parameter** **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`int` index=0 **)** |const| Returns a default texture from a shader searched by name. \ **Note:** If the sampler array is used use ``index`` to access the specified texture. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_shader_get_parameter_default: -- :ref:`Variant` **shader_get_parameter_default** **(** :ref:`RID` shader, :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **shader_get_parameter_default** **(** :ref:`RID` shader, :ref:`StringName` name **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_shader_set_code: -- void **shader_set_code** **(** :ref:`RID` shader, :ref:`String` code **)** +.. rst-class:: classref-method + +void **shader_set_code** **(** :ref:`RID` shader, :ref:`String` code **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_shader_set_default_texture_parameter: -- void **shader_set_default_texture_parameter** **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`RID` texture, :ref:`int` index=0 **)** +.. rst-class:: classref-method + +void **shader_set_default_texture_parameter** **(** :ref:`RID` shader, :ref:`StringName` name, :ref:`RID` texture, :ref:`int` index=0 **)** Sets a shader's default texture. Overwrites the texture given by name. \ **Note:** If the sampler array is used use ``index`` to access the specified texture. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_shader_set_path_hint: -- void **shader_set_path_hint** **(** :ref:`RID` shader, :ref:`String` path **)** +.. rst-class:: classref-method + +void **shader_set_path_hint** **(** :ref:`RID` shader, :ref:`String` path **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_allocate_data: -- void **skeleton_allocate_data** **(** :ref:`RID` skeleton, :ref:`int` bones, :ref:`bool` is_2d_skeleton=false **)** +.. rst-class:: classref-method + +void **skeleton_allocate_data** **(** :ref:`RID` skeleton, :ref:`int` bones, :ref:`bool` is_2d_skeleton=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_bone_get_transform: -- :ref:`Transform3D` **skeleton_bone_get_transform** **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **skeleton_bone_get_transform** **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| Returns the :ref:`Transform3D` set for a specific bone of this skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_bone_get_transform_2d: -- :ref:`Transform2D` **skeleton_bone_get_transform_2d** **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **skeleton_bone_get_transform_2d** **(** :ref:`RID` skeleton, :ref:`int` bone **)** |const| Returns the :ref:`Transform2D` set for a specific bone of this skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_bone_set_transform: -- void **skeleton_bone_set_transform** **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **skeleton_bone_set_transform** **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform3D` transform **)** Sets the :ref:`Transform3D` for a specific bone of this skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_bone_set_transform_2d: -- void **skeleton_bone_set_transform_2d** **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **skeleton_bone_set_transform_2d** **(** :ref:`RID` skeleton, :ref:`int` bone, :ref:`Transform2D` transform **)** Sets the :ref:`Transform2D` for a specific bone of this skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_create: -- :ref:`RID` **skeleton_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_get_bone_count: -- :ref:`int` **skeleton_get_bone_count** **(** :ref:`RID` skeleton **)** |const| +.. rst-class:: classref-method + +:ref:`int` **skeleton_get_bone_count** **(** :ref:`RID` skeleton **)** |const| Returns the number of bones allocated for this skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_skeleton_set_base_transform_2d: -- void **skeleton_set_base_transform_2d** **(** :ref:`RID` skeleton, :ref:`Transform2D` base_transform **)** +.. rst-class:: classref-method + +void **skeleton_set_base_transform_2d** **(** :ref:`RID` skeleton, :ref:`Transform2D` base_transform **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_sky_bake_panorama: -- :ref:`Image` **sky_bake_panorama** **(** :ref:`RID` sky, :ref:`float` energy, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +:ref:`Image` **sky_bake_panorama** **(** :ref:`RID` sky, :ref:`float` energy, :ref:`bool` bake_irradiance, :ref:`Vector2i` size **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_sky_create: -- :ref:`RID` **sky_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_sky_set_material: -- void **sky_set_material** **(** :ref:`RID` sky, :ref:`RID` material **)** +.. rst-class:: classref-method + +void **sky_set_material** **(** :ref:`RID` sky, :ref:`RID` material **)** Sets the material that the sky uses to render the background and reflection maps. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_sky_set_mode: -- void **sky_set_mode** **(** :ref:`RID` sky, :ref:`SkyMode` mode **)** +.. rst-class:: classref-method + +void **sky_set_mode** **(** :ref:`RID` sky, :ref:`SkyMode` mode **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_sky_set_radiance_size: -- void **sky_set_radiance_size** **(** :ref:`RID` sky, :ref:`int` radiance_size **)** +.. rst-class:: classref-method + +void **sky_set_radiance_size** **(** :ref:`RID` sky, :ref:`int` radiance_size **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_spot_light_create: -- :ref:`RID` **spot_light_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. @@ -6503,235 +10026,331 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this spot light to an instance using :ref:`instance_set_base` using the returned RID. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_sub_surface_scattering_set_quality: -- void **sub_surface_scattering_set_quality** **(** :ref:`SubSurfaceScatteringQuality` quality **)** +.. rst-class:: classref-method + +void **sub_surface_scattering_set_quality** **(** :ref:`SubSurfaceScatteringQuality` quality **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_sub_surface_scattering_set_scale: -- void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`float` depth_scale **)** +.. rst-class:: classref-method + +void **sub_surface_scattering_set_scale** **(** :ref:`float` scale, :ref:`float` depth_scale **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_2d_create: -- :ref:`RID` **texture_2d_create** **(** :ref:`Image` image **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_2d_create** **(** :ref:`Image` image **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_2d_get: -- :ref:`Image` **texture_2d_get** **(** :ref:`RID` texture **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **texture_2d_get** **(** :ref:`RID` texture **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_2d_layer_get: -- :ref:`Image` **texture_2d_layer_get** **(** :ref:`RID` texture, :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **texture_2d_layer_get** **(** :ref:`RID` texture, :ref:`int` layer **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_2d_layered_create: -- :ref:`RID` **texture_2d_layered_create** **(** :ref:`Image[]` layers, :ref:`TextureLayeredType` layered_type **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_2d_layered_create** **(** :ref:`Image[]` layers, :ref:`TextureLayeredType` layered_type **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_2d_layered_placeholder_create: -- :ref:`RID` **texture_2d_layered_placeholder_create** **(** :ref:`TextureLayeredType` layered_type **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_2d_layered_placeholder_create** **(** :ref:`TextureLayeredType` layered_type **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_2d_placeholder_create: -- :ref:`RID` **texture_2d_placeholder_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_2d_placeholder_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_2d_update: -- void **texture_2d_update** **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` layer **)** +.. rst-class:: classref-method + +void **texture_2d_update** **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` layer **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_3d_create: -- :ref:`RID` **texture_3d_create** **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` mipmaps, :ref:`Image[]` data **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_3d_create** **(** :ref:`Format` format, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`bool` mipmaps, :ref:`Image[]` data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_3d_get: -- :ref:`Image[]` **texture_3d_get** **(** :ref:`RID` texture **)** |const| +.. rst-class:: classref-method + +:ref:`Image[]` **texture_3d_get** **(** :ref:`RID` texture **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_3d_placeholder_create: -- :ref:`RID` **texture_3d_placeholder_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_3d_placeholder_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_3d_update: -- void **texture_3d_update** **(** :ref:`RID` texture, :ref:`Image[]` data **)** +.. rst-class:: classref-method + +void **texture_3d_update** **(** :ref:`RID` texture, :ref:`Image[]` data **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_get_path: -- :ref:`String` **texture_get_path** **(** :ref:`RID` texture **)** |const| +.. rst-class:: classref-method + +:ref:`String` **texture_get_path** **(** :ref:`RID` texture **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_get_rd_texture: -- :ref:`RID` **texture_get_rd_texture** **(** :ref:`RID` texture, :ref:`bool` srgb=false **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **texture_get_rd_texture** **(** :ref:`RID` texture, :ref:`bool` srgb=false **)** |const| Returns a texture :ref:`RID` that can be used with :ref:`RenderingDevice`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_proxy_create: -- :ref:`RID` **texture_proxy_create** **(** :ref:`RID` base **)** +.. rst-class:: classref-method + +:ref:`RID` **texture_proxy_create** **(** :ref:`RID` base **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_proxy_update: -- void **texture_proxy_update** **(** :ref:`RID` texture, :ref:`RID` proxy_to **)** +.. rst-class:: classref-method + +void **texture_proxy_update** **(** :ref:`RID` texture, :ref:`RID` proxy_to **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_replace: -- void **texture_replace** **(** :ref:`RID` texture, :ref:`RID` by_texture **)** +.. rst-class:: classref-method + +void **texture_replace** **(** :ref:`RID` texture, :ref:`RID` by_texture **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_set_force_redraw_if_visible: -- void **texture_set_force_redraw_if_visible** **(** :ref:`RID` texture, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **texture_set_force_redraw_if_visible** **(** :ref:`RID` texture, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_set_path: -- void **texture_set_path** **(** :ref:`RID` texture, :ref:`String` path **)** +.. rst-class:: classref-method + +void **texture_set_path** **(** :ref:`RID` texture, :ref:`String` path **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_texture_set_size_override: -- void **texture_set_size_override** **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** +.. rst-class:: classref-method + +void **texture_set_size_override** **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_attach_camera: -- void **viewport_attach_camera** **(** :ref:`RID` viewport, :ref:`RID` camera **)** +.. rst-class:: classref-method + +void **viewport_attach_camera** **(** :ref:`RID` viewport, :ref:`RID` camera **)** Sets a viewport's camera. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_attach_canvas: -- void **viewport_attach_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** +.. rst-class:: classref-method + +void **viewport_attach_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** Sets a viewport's canvas. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_attach_to_screen: -- void **viewport_attach_to_screen** **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2(0, 0, 0, 0), :ref:`int` screen=0 **)** +.. rst-class:: classref-method + +void **viewport_attach_to_screen** **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2(0, 0, 0, 0), :ref:`int` screen=0 **)** Copies the viewport to a region of the screen specified by ``rect``. If :ref:`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. @@ -6752,601 +10371,861 @@ FIXME: The method seems to be non-existent. Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see :ref:`viewport_set_render_direct_to_screen`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_create: -- :ref:`RID` **viewport_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **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. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_get_measured_render_time_cpu: -- :ref:`float` **viewport_get_measured_render_time_cpu** **(** :ref:`RID` viewport **)** |const| +.. rst-class:: classref-method + +:ref:`float` **viewport_get_measured_render_time_cpu** **(** :ref:`RID` viewport **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_get_measured_render_time_gpu: -- :ref:`float` **viewport_get_measured_render_time_gpu** **(** :ref:`RID` viewport **)** |const| +.. rst-class:: classref-method + +:ref:`float` **viewport_get_measured_render_time_gpu** **(** :ref:`RID` viewport **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_get_render_info: -- :ref:`int` **viewport_get_render_info** **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** +.. rst-class:: classref-method + +:ref:`int` **viewport_get_render_info** **(** :ref:`RID` viewport, :ref:`ViewportRenderInfoType` type, :ref:`ViewportRenderInfo` info **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_get_texture: -- :ref:`RID` **viewport_get_texture** **(** :ref:`RID` viewport **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **viewport_get_texture** **(** :ref:`RID` viewport **)** |const| Returns the viewport's last rendered frame. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_remove_canvas: -- void **viewport_remove_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** +.. rst-class:: classref-method + +void **viewport_remove_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** Detaches a viewport from a canvas and vice versa. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_active: -- void **viewport_set_active** **(** :ref:`RID` viewport, :ref:`bool` active **)** +.. rst-class:: classref-method + +void **viewport_set_active** **(** :ref:`RID` viewport, :ref:`bool` active **)** If ``true``, sets the viewport active, else sets it inactive. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_canvas_cull_mask: -- void **viewport_set_canvas_cull_mask** **(** :ref:`RID` viewport, :ref:`int` canvas_cull_mask **)** +.. rst-class:: classref-method + +void **viewport_set_canvas_cull_mask** **(** :ref:`RID` viewport, :ref:`int` canvas_cull_mask **)** Sets the rendering mask associated with this :ref:`Viewport`. Only :ref:`CanvasItem` nodes with a matching rendering visibility layer will be rendered by this :ref:`Viewport`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_canvas_stacking: -- void **viewport_set_canvas_stacking** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer, :ref:`int` sublayer **)** +.. rst-class:: classref-method + +void **viewport_set_canvas_stacking** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer, :ref:`int` sublayer **)** Sets the stacking order for a viewport's canvas. \ ``layer`` is the actual canvas layer, while ``sublayer`` specifies the stacking order of the canvas among those in the same layer. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_canvas_transform: -- void **viewport_set_canvas_transform** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** +.. rst-class:: classref-method + +void **viewport_set_canvas_transform** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** Sets the transformation of a viewport's canvas. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_clear_mode: -- void **viewport_set_clear_mode** **(** :ref:`RID` viewport, :ref:`ViewportClearMode` clear_mode **)** +.. rst-class:: classref-method + +void **viewport_set_clear_mode** **(** :ref:`RID` viewport, :ref:`ViewportClearMode` clear_mode **)** Sets the clear mode of a viewport. See :ref:`ViewportClearMode` for options. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_debug_draw: -- void **viewport_set_debug_draw** **(** :ref:`RID` viewport, :ref:`ViewportDebugDraw` draw **)** +.. rst-class:: classref-method + +void **viewport_set_debug_draw** **(** :ref:`RID` viewport, :ref:`ViewportDebugDraw` draw **)** Sets the debug draw mode of a viewport. See :ref:`ViewportDebugDraw` for options. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_default_canvas_item_texture_filter: -- void **viewport_set_default_canvas_item_texture_filter** **(** :ref:`RID` viewport, :ref:`CanvasItemTextureFilter` filter **)** +.. rst-class:: classref-method + +void **viewport_set_default_canvas_item_texture_filter** **(** :ref:`RID` viewport, :ref:`CanvasItemTextureFilter` filter **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_default_canvas_item_texture_repeat: -- void **viewport_set_default_canvas_item_texture_repeat** **(** :ref:`RID` viewport, :ref:`CanvasItemTextureRepeat` repeat **)** +.. rst-class:: classref-method + +void **viewport_set_default_canvas_item_texture_repeat** **(** :ref:`RID` viewport, :ref:`CanvasItemTextureRepeat` repeat **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_disable_2d: -- void **viewport_set_disable_2d** **(** :ref:`RID` viewport, :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **viewport_set_disable_2d** **(** :ref:`RID` viewport, :ref:`bool` disable **)** If ``true``, the viewport's canvas is not rendered. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_disable_3d: -- void **viewport_set_disable_3d** **(** :ref:`RID` viewport, :ref:`bool` disable **)** +.. rst-class:: classref-method + +void **viewport_set_disable_3d** **(** :ref:`RID` viewport, :ref:`bool` disable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_disable_environment: -- void **viewport_set_disable_environment** **(** :ref:`RID` viewport, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **viewport_set_disable_environment** **(** :ref:`RID` viewport, :ref:`bool` disabled **)** If ``true``, rendering of a viewport's environment is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_fsr_sharpness: -- void **viewport_set_fsr_sharpness** **(** :ref:`RID` viewport, :ref:`float` sharpness **)** +.. rst-class:: classref-method + +void **viewport_set_fsr_sharpness** **(** :ref:`RID` viewport, :ref:`float` 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_global_canvas_transform: -- void **viewport_set_global_canvas_transform** **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **viewport_set_global_canvas_transform** **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** Sets the viewport's global transformation matrix. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_measure_render_time: -- void **viewport_set_measure_render_time** **(** :ref:`RID` viewport, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **viewport_set_measure_render_time** **(** :ref:`RID` viewport, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_msaa_2d: -- void **viewport_set_msaa_2d** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** +.. rst-class:: classref-method + +void **viewport_set_msaa_2d** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** Sets the multisample anti-aliasing mode for 2D/Canvas. See :ref:`ViewportMSAA` for options. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_msaa_3d: -- void **viewport_set_msaa_3d** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** +.. rst-class:: classref-method + +void **viewport_set_msaa_3d** **(** :ref:`RID` viewport, :ref:`ViewportMSAA` msaa **)** Sets the multisample anti-aliasing mode for 3D. See :ref:`ViewportMSAA` for options. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_occlusion_culling_build_quality: -- void **viewport_set_occlusion_culling_build_quality** **(** :ref:`ViewportOcclusionCullingBuildQuality` quality **)** +.. rst-class:: classref-method + +void **viewport_set_occlusion_culling_build_quality** **(** :ref:`ViewportOcclusionCullingBuildQuality` quality **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_occlusion_rays_per_thread: -- void **viewport_set_occlusion_rays_per_thread** **(** :ref:`int` rays_per_thread **)** +.. rst-class:: classref-method + +void **viewport_set_occlusion_rays_per_thread** **(** :ref:`int` rays_per_thread **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_parent_viewport: -- void **viewport_set_parent_viewport** **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** +.. rst-class:: classref-method + +void **viewport_set_parent_viewport** **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** Sets the viewport's parent to another viewport. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_positional_shadow_atlas_quadrant_subdivision: -- void **viewport_set_positional_shadow_atlas_quadrant_subdivision** **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** +.. rst-class:: classref-method + +void **viewport_set_positional_shadow_atlas_quadrant_subdivision** **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** Sets the shadow atlas quadrant's subdivision. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_positional_shadow_atlas_size: -- void **viewport_set_positional_shadow_atlas_size** **(** :ref:`RID` viewport, :ref:`int` size, :ref:`bool` use_16_bits=false **)** +.. rst-class:: classref-method + +void **viewport_set_positional_shadow_atlas_size** **(** :ref:`RID` viewport, :ref:`int` size, :ref:`bool` use_16_bits=false **)** Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2. \ **Note:** If this is set to ``0``, no shadows will be visible at all (including directional shadows). +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_render_direct_to_screen: -- void **viewport_set_render_direct_to_screen** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **viewport_set_render_direct_to_screen** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_scaling_3d_mode: -- void **viewport_set_scaling_3d_mode** **(** :ref:`RID` viewport, :ref:`ViewportScaling3DMode` scaling_3d_mode **)** +.. rst-class:: classref-method + +void **viewport_set_scaling_3d_mode** **(** :ref:`RID` viewport, :ref:`ViewportScaling3DMode` 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. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_scaling_3d_scale: -- void **viewport_set_scaling_3d_scale** **(** :ref:`RID` viewport, :ref:`float` scale **)** +.. rst-class:: classref-method + +void **viewport_set_scaling_3d_scale** **(** :ref:`RID` viewport, :ref:`float` scale **)** Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`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` for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_scenario: -- void **viewport_set_scenario** **(** :ref:`RID` viewport, :ref:`RID` scenario **)** +.. rst-class:: classref-method + +void **viewport_set_scenario** **(** :ref:`RID` viewport, :ref:`RID` scenario **)** Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas etc. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_screen_space_aa: -- void **viewport_set_screen_space_aa** **(** :ref:`RID` viewport, :ref:`ViewportScreenSpaceAA` mode **)** +.. rst-class:: classref-method + +void **viewport_set_screen_space_aa** **(** :ref:`RID` viewport, :ref:`ViewportScreenSpaceAA` mode **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_sdf_oversize_and_scale: -- void **viewport_set_sdf_oversize_and_scale** **(** :ref:`RID` viewport, :ref:`ViewportSDFOversize` oversize, :ref:`ViewportSDFScale` scale **)** +.. rst-class:: classref-method + +void **viewport_set_sdf_oversize_and_scale** **(** :ref:`RID` viewport, :ref:`ViewportSDFOversize` oversize, :ref:`ViewportSDFScale` scale **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_size: -- void **viewport_set_size** **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** +.. rst-class:: classref-method + +void **viewport_set_size** **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** Sets the viewport's width and height. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_snap_2d_transforms_to_pixel: -- void **viewport_set_snap_2d_transforms_to_pixel** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **viewport_set_snap_2d_transforms_to_pixel** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_snap_2d_vertices_to_pixel: -- void **viewport_set_snap_2d_vertices_to_pixel** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **viewport_set_snap_2d_vertices_to_pixel** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_texture_mipmap_bias: -- void **viewport_set_texture_mipmap_bias** **(** :ref:`RID` viewport, :ref:`float` mipmap_bias **)** +.. rst-class:: classref-method + +void **viewport_set_texture_mipmap_bias** **(** :ref:`RID` viewport, :ref:`float` 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`) can help reduce the graininess visible when using negative mipmap bias. \ **Note:** When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``-log2(1.0 / scale) + mipmap_bias``. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_transparent_background: -- void **viewport_set_transparent_background** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **viewport_set_transparent_background** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** If ``true``, the viewport renders its background as transparent. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_update_mode: -- void **viewport_set_update_mode** **(** :ref:`RID` viewport, :ref:`ViewportUpdateMode` update_mode **)** +.. rst-class:: classref-method + +void **viewport_set_update_mode** **(** :ref:`RID` viewport, :ref:`ViewportUpdateMode` update_mode **)** Sets when the viewport should be updated. See :ref:`ViewportUpdateMode` constants for options. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_use_debanding: -- void **viewport_set_use_debanding** **(** :ref:`RID` viewport, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **viewport_set_use_debanding** **(** :ref:`RID` viewport, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_use_occlusion_culling: -- void **viewport_set_use_occlusion_culling** **(** :ref:`RID` viewport, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **viewport_set_use_occlusion_culling** **(** :ref:`RID` viewport, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_use_taa: -- void **viewport_set_use_taa** **(** :ref:`RID` viewport, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **viewport_set_use_taa** **(** :ref:`RID` viewport, :ref:`bool` enable **)** If ``true``, use Temporal Anti-Aliasing. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_use_xr: -- void **viewport_set_use_xr** **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** +.. rst-class:: classref-method + +void **viewport_set_use_xr** **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** If ``true``, the viewport uses augmented or virtual reality technologies. See :ref:`XRInterface`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_vrs_mode: -- void **viewport_set_vrs_mode** **(** :ref:`RID` viewport, :ref:`ViewportVRSMode` mode **)** +.. rst-class:: classref-method + +void **viewport_set_vrs_mode** **(** :ref:`RID` viewport, :ref:`ViewportVRSMode` mode **)** Sets the Variable Rate Shading (VRS) mode for the viewport. Note, if hardware does not support VRS this property is ignored. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_viewport_set_vrs_texture: -- void **viewport_set_vrs_texture** **(** :ref:`RID` viewport, :ref:`RID` texture **)** +.. rst-class:: classref-method + +void **viewport_set_vrs_texture** **(** :ref:`RID` viewport, :ref:`RID` texture **)** Texture to use when the VRS mode is set to :ref:`VIEWPORT_VRS_TEXTURE`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_visibility_notifier_create: -- :ref:`RID` **visibility_notifier_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **visibility_notifier_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_visibility_notifier_set_aabb: -- void **visibility_notifier_set_aabb** **(** :ref:`RID` notifier, :ref:`AABB` aabb **)** +.. rst-class:: classref-method + +void **visibility_notifier_set_aabb** **(** :ref:`RID` notifier, :ref:`AABB` aabb **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_visibility_notifier_set_callbacks: -- void **visibility_notifier_set_callbacks** **(** :ref:`RID` notifier, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** +.. rst-class:: classref-method + +void **visibility_notifier_set_callbacks** **(** :ref:`RID` notifier, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_allocate_data: -- void **voxel_gi_allocate_data** **(** :ref:`RID` voxel_gi, :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3i` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** +.. rst-class:: classref-method + +void **voxel_gi_allocate_data** **(** :ref:`RID` voxel_gi, :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3i` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_create: -- :ref:`RID` **voxel_gi_create** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **voxel_gi_create** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_get_data_cells: -- :ref:`PackedByteArray` **voxel_gi_get_data_cells** **(** :ref:`RID` voxel_gi **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **voxel_gi_get_data_cells** **(** :ref:`RID` voxel_gi **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_get_distance_field: -- :ref:`PackedByteArray` **voxel_gi_get_distance_field** **(** :ref:`RID` voxel_gi **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **voxel_gi_get_distance_field** **(** :ref:`RID` voxel_gi **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_get_level_counts: -- :ref:`PackedInt32Array` **voxel_gi_get_level_counts** **(** :ref:`RID` voxel_gi **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **voxel_gi_get_level_counts** **(** :ref:`RID` voxel_gi **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_get_octree_cells: -- :ref:`PackedByteArray` **voxel_gi_get_octree_cells** **(** :ref:`RID` voxel_gi **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **voxel_gi_get_octree_cells** **(** :ref:`RID` voxel_gi **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_get_octree_size: -- :ref:`Vector3i` **voxel_gi_get_octree_size** **(** :ref:`RID` voxel_gi **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3i` **voxel_gi_get_octree_size** **(** :ref:`RID` voxel_gi **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_get_to_cell_xform: -- :ref:`Transform3D` **voxel_gi_get_to_cell_xform** **(** :ref:`RID` voxel_gi **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **voxel_gi_get_to_cell_xform** **(** :ref:`RID` voxel_gi **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_baked_exposure_normalization: -- void **voxel_gi_set_baked_exposure_normalization** **(** :ref:`RID` voxel_gi, :ref:`float` baked_exposure **)** +.. rst-class:: classref-method + +void **voxel_gi_set_baked_exposure_normalization** **(** :ref:`RID` voxel_gi, :ref:`float` baked_exposure **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_bias: -- void **voxel_gi_set_bias** **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** +.. rst-class:: classref-method + +void **voxel_gi_set_bias** **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_dynamic_range: -- void **voxel_gi_set_dynamic_range** **(** :ref:`RID` voxel_gi, :ref:`float` range **)** +.. rst-class:: classref-method + +void **voxel_gi_set_dynamic_range** **(** :ref:`RID` voxel_gi, :ref:`float` range **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_energy: -- void **voxel_gi_set_energy** **(** :ref:`RID` voxel_gi, :ref:`float` energy **)** +.. rst-class:: classref-method + +void **voxel_gi_set_energy** **(** :ref:`RID` voxel_gi, :ref:`float` energy **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_interior: -- void **voxel_gi_set_interior** **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **voxel_gi_set_interior** **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_normal_bias: -- void **voxel_gi_set_normal_bias** **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** +.. rst-class:: classref-method + +void **voxel_gi_set_normal_bias** **(** :ref:`RID` voxel_gi, :ref:`float` bias **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_propagation: -- void **voxel_gi_set_propagation** **(** :ref:`RID` voxel_gi, :ref:`float` amount **)** +.. rst-class:: classref-method + +void **voxel_gi_set_propagation** **(** :ref:`RID` voxel_gi, :ref:`float` amount **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_quality: -- void **voxel_gi_set_quality** **(** :ref:`VoxelGIQuality` quality **)** +.. rst-class:: classref-method + +void **voxel_gi_set_quality** **(** :ref:`VoxelGIQuality` quality **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RenderingServer_method_voxel_gi_set_use_two_bounces: -- void **voxel_gi_set_use_two_bounces** **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **voxel_gi_set_use_two_bounces** **(** :ref:`RID` voxel_gi, :ref:`bool` enable **)** .. container:: contribute diff --git a/classes/class_resource.rst b/classes/class_resource.rst index f4b285382..1ac0b088a 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -16,6 +16,8 @@ Resource Base class for all resources. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,6 +27,8 @@ In GDScript, resources can loaded from disk by their :ref:`resource_path` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`resource_local_to_scene` | ``false`` | -+-----------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`resource_name` | ``""`` | -+-----------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`resource_path` | ``""`` | -+-----------------------------+---------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`resource_local_to_scene` | ``false`` | + +-----------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`resource_name` | ``""`` | + +-----------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`resource_path` | ``""`` | + +-----------------------------+---------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_get_rid` **(** **)** |virtual| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`duplicate` **(** :ref:`bool` subresources=false **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`emit_changed` **(** **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_local_scene` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`setup_local_to_scene` **(** **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`take_over_path` **(** :ref:`String` path **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_rid` **(** **)** |virtual| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`duplicate` **(** :ref:`bool` subresources=false **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`emit_changed` **(** **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_local_scene` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`setup_local_to_scene` **(** **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`take_over_path` **(** :ref:`String` path **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Resource_signal_changed: -- **changed** **(** **)** +.. rst-class:: classref-signal + +**changed** **(** **)** Emitted when the resource changes, usually when one of its properties is modified. See also :ref:`emit_changed`. \ **Note:** This signal is not emitted automatically for properties of custom resources. If necessary, a setter needs to be created to emit the signal. +.. rst-class:: classref-item-separator + ---- .. _class_Resource_signal_setup_local_to_scene_requested: -- **setup_local_to_scene_requested** **(** **)** +.. rst-class:: classref-signal + +**setup_local_to_scene_requested** **(** **)** Emitted when :ref:`setup_local_to_scene` is called, usually by a newly duplicated resource with :ref:`resource_local_to_scene` set to ``true``. Custom behavior can be defined by connecting this signal. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Resource_property_resource_local_to_scene: -- :ref:`bool` **resource_local_to_scene** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_local_to_scene(value) | -+-----------+---------------------------+ -| *Getter* | is_local_to_scene() | -+-----------+---------------------------+ +:ref:`bool` **resource_local_to_scene** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_local_to_scene** **(** :ref:`bool` value **)** +- :ref:`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`). \ **Note:** Changing this property at run-time has no effect on already created duplicate resources. +.. rst-class:: classref-item-separator + ---- .. _class_Resource_property_resource_name: -- :ref:`String` **resource_name** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_name(value) | -+-----------+-----------------+ -| *Getter* | get_name() | -+-----------+-----------------+ +:ref:`String` **resource_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_name** **(** :ref:`String` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Resource_property_resource_path: -- :ref:`String` **resource_path** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_path(value) | -+-----------+-----------------+ -| *Getter* | get_path() | -+-----------+-----------------+ +:ref:`String` **resource_path** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_path** **(** :ref:`String` value **)** +- :ref:`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`'s filepath, followed by an 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`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Resource_method__get_rid: -- :ref:`RID` **_get_rid** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_get_rid** **(** **)** |virtual| Override this method to return a custom :ref:`RID` when :ref:`get_rid` is called. +.. rst-class:: classref-item-separator + ---- .. _class_Resource_method_duplicate: -- :ref:`Resource` **duplicate** **(** :ref:`bool` subresources=false **)** |const| +.. rst-class:: classref-method + +:ref:`Resource` **duplicate** **(** :ref:`bool` subresources=false **)** |const| Duplicates this resource, returning a new resource with its ``export``\ ed or :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` properties copied from the original. @@ -155,11 +200,15 @@ If ``subresources`` is ``false``, a shallow copy is returned. Nested resources w \ **Note:** For custom resources, this method will fail if :ref:`Object._init` has been defined with required parameters. +.. rst-class:: classref-item-separator + ---- .. _class_Resource_method_emit_changed: -- void **emit_changed** **(** **)** +.. rst-class:: classref-method + +void **emit_changed** **(** **)** Emits the :ref:`changed` signal. This method is called automatically for built-in resources. @@ -173,27 +222,39 @@ Emits the :ref:`changed` signal. This method is c damage = new_value emit_changed() +.. rst-class:: classref-item-separator + ---- .. _class_Resource_method_get_local_scene: -- :ref:`Node` **get_local_scene** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node` **get_local_scene** **(** **)** |const| If :ref:`resource_local_to_scene` is set to ``true`` and the resource has been loaded from a :ref:`PackedScene` instantiation, returns the root :ref:`Node` of the scene where this resource is used. Otherwise, returns ``null``. +.. rst-class:: classref-item-separator + ---- .. _class_Resource_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns the :ref:`RID` of this resource (or an empty RID). Many resources (such as :ref:`Texture2D`, :ref:`Mesh`, and so on) are high-level abstractions of resources stored in a specialized server (:ref:`DisplayServer`, :ref:`RenderingServer`, etc.), so this function will return the original :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_Resource_method_setup_local_to_scene: -- void **setup_local_to_scene** **(** **)** +.. rst-class:: classref-method + +void **setup_local_to_scene** **(** **)** Emits the :ref:`setup_local_to_scene_requested` signal. If :ref:`resource_local_to_scene` is set to ``true``, this method is called from :ref:`PackedScene.instantiate` by the newly duplicated resource within the scene instance. @@ -213,11 +274,15 @@ For most resources, this method performs no logic of its own. Custom behavior ca func randomize_health(): health = randi_range(10, 40) +.. rst-class:: classref-item-separator + ---- .. _class_Resource_method_take_over_path: -- void **take_over_path** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +void **take_over_path** **(** :ref:`String` path **)** Sets the :ref:`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. diff --git a/classes/class_resourceformatloader.rst b/classes/class_resourceformatloader.rst index 299a8211c..955b7727d 100644 --- a/classes/class_resourceformatloader.rst +++ b/classes/class_resourceformatloader.rst @@ -14,6 +14,8 @@ ResourceFormatLoader Loads a specific resource type from a file. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,144 +25,213 @@ Extending this class allows you to define your own loader. Be sure to respect th \ **Note:** You can also extend :ref:`EditorImportPlugin` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends on if the format is suitable or not for the final exported game. For example, it's better to import ``.png`` textures as ``.ctex`` (:ref:`CompressedTexture2D`) first, so they can be loaded with better efficiency on the graphics card. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_exists` **(** :ref:`String` path **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_classes_used` **(** :ref:`String` path **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_dependencies` **(** :ref:`String` path, :ref:`bool` add_types **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_resource_type` **(** :ref:`String` path **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_resource_uid` **(** :ref:`String` path **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handles_type` **(** :ref:`StringName` type **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_load` **(** :ref:`String` path, :ref:`String` original_path, :ref:`bool` use_sub_threads, :ref:`int` cache_mode **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_recognize_path` **(** :ref:`String` path, :ref:`StringName` type **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_rename_dependencies` **(** :ref:`String` path, :ref:`Dictionary` renames **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_exists` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_classes_used` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_dependencies` **(** :ref:`String` path, :ref:`bool` add_types **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_resource_type` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_resource_uid` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_type` **(** :ref:`StringName` type **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_load` **(** :ref:`String` path, :ref:`String` original_path, :ref:`bool` use_sub_threads, :ref:`int` cache_mode **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_recognize_path` **(** :ref:`String` path, :ref:`StringName` type **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_rename_dependencies` **(** :ref:`String` path, :ref:`Dictionary` renames **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ResourceFormatLoader_CacheMode: -.. _class_ResourceFormatLoader_constant_CACHE_MODE_IGNORE: - -.. _class_ResourceFormatLoader_constant_CACHE_MODE_REUSE: - -.. _class_ResourceFormatLoader_constant_CACHE_MODE_REPLACE: +.. rst-class:: classref-enumeration enum **CacheMode**: -- **CACHE_MODE_IGNORE** = **0** +.. _class_ResourceFormatLoader_constant_CACHE_MODE_IGNORE: -- **CACHE_MODE_REUSE** = **1** +.. rst-class:: classref-enumeration-constant -- **CACHE_MODE_REPLACE** = **2** +:ref:`CacheMode` **CACHE_MODE_IGNORE** = ``0`` + + + +.. _class_ResourceFormatLoader_constant_CACHE_MODE_REUSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode` **CACHE_MODE_REUSE** = ``1`` + + + +.. _class_ResourceFormatLoader_constant_CACHE_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode` **CACHE_MODE_REPLACE** = ``2`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ResourceFormatLoader_method__exists: -- :ref:`bool` **_exists** **(** :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_exists** **(** :ref:`String` path **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__get_classes_used: -- :ref:`PackedStringArray` **_get_classes_used** **(** :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_classes_used** **(** :ref:`String` path **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__get_dependencies: -- :ref:`PackedStringArray` **_get_dependencies** **(** :ref:`String` path, :ref:`bool` add_types **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_dependencies** **(** :ref:`String` path, :ref:`bool` add_types **)** |virtual| |const| 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. \ **Note:** Custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just return ``"Resource"`` for them. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__get_recognized_extensions: -- :ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| Gets the list of extensions for files this loader is able to read. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__get_resource_type: -- :ref:`String` **_get_resource_type** **(** :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_resource_type** **(** :ref:`String` path **)** |virtual| |const| Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return ``""``. \ **Note:** Custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just return ``"Resource"`` for them. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__get_resource_uid: -- :ref:`int` **_get_resource_uid** **(** :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_resource_uid** **(** :ref:`String` path **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__handles_type: -- :ref:`bool` **_handles_type** **(** :ref:`StringName` type **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_handles_type** **(** :ref:`StringName` type **)** |virtual| |const| Tells which resource class this loader can load. \ **Note:** Custom resource types defined by scripts aren't known by the :ref:`ClassDB`, so you might just handle ``"Resource"`` for them. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__load: -- :ref:`Variant` **_load** **(** :ref:`String` path, :ref:`String` original_path, :ref:`bool` use_sub_threads, :ref:`int` cache_mode **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_load** **(** :ref:`String` path, :ref:`String` original_path, :ref:`bool` use_sub_threads, :ref:`int` cache_mode **)** |virtual| |const| 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` object on success, or an :ref:`Error` constant in case of failure. The ``cache_mode`` property defines whether and how the cache should be used or updated when loading the resource. See :ref:`CacheMode` for details. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__recognize_path: -- :ref:`bool` **_recognize_path** **(** :ref:`String` path, :ref:`StringName` type **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_recognize_path** **(** :ref:`String` path, :ref:`StringName` type **)** |virtual| |const| 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`, and if the type is within the ones provided by :ref:`_get_resource_type`. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatLoader_method__rename_dependencies: -- :ref:`int` **_rename_dependencies** **(** :ref:`String` path, :ref:`Dictionary` renames **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_rename_dependencies** **(** :ref:`String` path, :ref:`Dictionary` renames **)** |virtual| |const| If implemented, renames dependencies within the given resource and saves it. ``renames`` is a dictionary ``{ String => String }`` mapping old dependency paths to new paths. diff --git a/classes/class_resourceformatsaver.rst b/classes/class_resourceformatsaver.rst index c76175d5d..753e1bd1d 100644 --- a/classes/class_resourceformatsaver.rst +++ b/classes/class_resourceformatsaver.rst @@ -14,58 +14,85 @@ ResourceFormatSaver Saves a specific resource type to a file. +.. rst-class:: classref-introduction-group + Description ----------- -The engine can save resources when you do it from the editor, or when you use the :ref:`ResourceSaver` singleton. This is accomplished thanks to multiple ``ResourceFormatSaver``\ s, each handling its own format and called automatically by the engine. +The engine can save resources when you do it from the editor, or when you use the :ref:`ResourceSaver` singleton. This is accomplished thanks to multiple **ResourceFormatSaver**\ s, each handling its own format and called automatically by the engine. By default, Godot saves resources as ``.tres`` (text-based), ``.res`` (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with ``class_name`` for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a :ref:`ResourceFormatLoader`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** :ref:`Resource` resource **)** |virtual| |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_recognize` **(** :ref:`Resource` resource **)** |virtual| |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_recognize_path` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| |const| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_save` **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| | -+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_recognize` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_recognize_path` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_save` **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ResourceFormatSaver_method__get_recognized_extensions: -- :ref:`PackedStringArray` **_get_recognized_extensions** **(** :ref:`Resource` resource **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_recognized_extensions** **(** :ref:`Resource` resource **)** |virtual| |const| Returns the list of extensions available for saving the resource object, provided it is recognized (see :ref:`_recognize`). +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatSaver_method__recognize: -- :ref:`bool` **_recognize** **(** :ref:`Resource` resource **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_recognize** **(** :ref:`Resource` resource **)** |virtual| |const| Returns whether the given resource object can be saved by this saver. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatSaver_method__recognize_path: -- :ref:`bool` **_recognize_path** **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_recognize_path** **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceFormatSaver_method__save: -- :ref:`int` **_save** **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_save** **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| Saves the given resource object to a file at the target ``path``. ``flags`` is a bitmask composed with :ref:`SaverFlags` constants. diff --git a/classes/class_resourceimporter.rst b/classes/class_resourceimporter.rst index 28b35a431..7345044b4 100644 --- a/classes/class_resourceimporter.rst +++ b/classes/class_resourceimporter.rst @@ -16,30 +16,50 @@ ResourceImporter Base class for the implementation of core resource importers. +.. rst-class:: classref-introduction-group + Description ----------- This is the base class for the resource importers implemented in core. To implement your own resource importers using editor plugins, see :ref:`EditorImportPlugin`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Import plugins <../tutorials/plugins/editor/import_plugins>` +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_ResourceImporter_ImportOrder: -.. _class_ResourceImporter_constant_IMPORT_ORDER_DEFAULT: - -.. _class_ResourceImporter_constant_IMPORT_ORDER_SCENE: +.. rst-class:: classref-enumeration enum **ImportOrder**: -- **IMPORT_ORDER_DEFAULT** = **0** --- The default import order. +.. _class_ResourceImporter_constant_IMPORT_ORDER_DEFAULT: -- **IMPORT_ORDER_SCENE** = **100** --- The import order for scenes, which ensures scenes are imported *after* all other core resources such as textures. Custom importers should generally have an import order lower than ``100`` to avoid issues when importing scenes that rely on custom resources. +.. rst-class:: classref-enumeration-constant + +:ref:`ImportOrder` **IMPORT_ORDER_DEFAULT** = ``0`` + +The default import order. + +.. _class_ResourceImporter_constant_IMPORT_ORDER_SCENE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImportOrder` **IMPORT_ORDER_SCENE** = ``100`` + +The import order for scenes, which ensures scenes are imported *after* all other core resources such as textures. Custom importers should generally have an import order lower than ``100`` to avoid issues when importing scenes that rely on custom resources. .. |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.)` diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 053afe1c6..7a9973109 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -14,6 +14,8 @@ ResourceLoader Singleton used to load resource files. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,141 +25,220 @@ It uses the many :ref:`ResourceFormatLoader` classes \ **Note:** You have to import the files into the engine first to load them using :ref:`load`. If you want to load :ref:`Image`\ s at run-time, you may use :ref:`Image.load`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. +.. rst-class:: classref-introduction-group + Tutorials --------- - `OS Test Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader, :ref:`bool` at_front=false **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`exists` **(** :ref:`String` path, :ref:`String` type_hint="" **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_dependencies` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_recognized_extensions_for_type` **(** :ref:`String` type **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_resource_uid` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_cached` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`load` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`CacheMode` cache_mode=1 **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`load_threaded_get` **(** :ref:`String` path **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ThreadLoadStatus` | :ref:`load_threaded_get_status` **(** :ref:`String` path, :ref:`Array` progress=[] **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load_threaded_request` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false, :ref:`CacheMode` cache_mode=1 **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_abort_on_missing_resources` **(** :ref:`bool` abort **)** | -+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader, :ref:`bool` at_front=false **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`exists` **(** :ref:`String` path, :ref:`String` type_hint="" **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_dependencies` **(** :ref:`String` path **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_recognized_extensions_for_type` **(** :ref:`String` type **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_resource_uid` **(** :ref:`String` path **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_cached` **(** :ref:`String` path **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`load` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`CacheMode` cache_mode=1 **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`load_threaded_get` **(** :ref:`String` path **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ThreadLoadStatus` | :ref:`load_threaded_get_status` **(** :ref:`String` path, :ref:`Array` progress=[] **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_threaded_request` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false, :ref:`CacheMode` cache_mode=1 **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_resource_format_loader` **(** :ref:`ResourceFormatLoader` format_loader **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_abort_on_missing_resources` **(** :ref:`bool` abort **)** | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ResourceLoader_ThreadLoadStatus: -.. _class_ResourceLoader_constant_THREAD_LOAD_INVALID_RESOURCE: - -.. _class_ResourceLoader_constant_THREAD_LOAD_IN_PROGRESS: - -.. _class_ResourceLoader_constant_THREAD_LOAD_FAILED: - -.. _class_ResourceLoader_constant_THREAD_LOAD_LOADED: +.. rst-class:: classref-enumeration enum **ThreadLoadStatus**: -- **THREAD_LOAD_INVALID_RESOURCE** = **0** --- The resource is invalid, or has not been loaded with :ref:`load_threaded_request`. +.. _class_ResourceLoader_constant_THREAD_LOAD_INVALID_RESOURCE: -- **THREAD_LOAD_IN_PROGRESS** = **1** --- The resource is still being loaded. +.. rst-class:: classref-enumeration-constant -- **THREAD_LOAD_FAILED** = **2** --- Some error occurred during loading and it failed. +:ref:`ThreadLoadStatus` **THREAD_LOAD_INVALID_RESOURCE** = ``0`` -- **THREAD_LOAD_LOADED** = **3** --- The resource was loaded successfully and can be accessed via :ref:`load_threaded_get`. +The resource is invalid, or has not been loaded with :ref:`load_threaded_request`. + +.. _class_ResourceLoader_constant_THREAD_LOAD_IN_PROGRESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ThreadLoadStatus` **THREAD_LOAD_IN_PROGRESS** = ``1`` + +The resource is still being loaded. + +.. _class_ResourceLoader_constant_THREAD_LOAD_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ThreadLoadStatus` **THREAD_LOAD_FAILED** = ``2`` + +Some error occurred during loading and it failed. + +.. _class_ResourceLoader_constant_THREAD_LOAD_LOADED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ThreadLoadStatus` **THREAD_LOAD_LOADED** = ``3`` + +The resource was loaded successfully and can be accessed via :ref:`load_threaded_get`. + +.. rst-class:: classref-item-separator ---- .. _enum_ResourceLoader_CacheMode: -.. _class_ResourceLoader_constant_CACHE_MODE_IGNORE: - -.. _class_ResourceLoader_constant_CACHE_MODE_REUSE: - -.. _class_ResourceLoader_constant_CACHE_MODE_REPLACE: +.. rst-class:: classref-enumeration enum **CacheMode**: -- **CACHE_MODE_IGNORE** = **0** +.. _class_ResourceLoader_constant_CACHE_MODE_IGNORE: -- **CACHE_MODE_REUSE** = **1** +.. rst-class:: classref-enumeration-constant -- **CACHE_MODE_REPLACE** = **2** +:ref:`CacheMode` **CACHE_MODE_IGNORE** = ``0`` + + + +.. _class_ResourceLoader_constant_CACHE_MODE_REUSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode` **CACHE_MODE_REUSE** = ``1`` + + + +.. _class_ResourceLoader_constant_CACHE_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode` **CACHE_MODE_REPLACE** = ``2`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ResourceLoader_method_add_resource_format_loader: -- void **add_resource_format_loader** **(** :ref:`ResourceFormatLoader` format_loader, :ref:`bool` at_front=false **)** +.. rst-class:: classref-method + +void **add_resource_format_loader** **(** :ref:`ResourceFormatLoader` format_loader, :ref:`bool` at_front=false **)** Registers a new :ref:`ResourceFormatLoader`. The ResourceLoader will use the ResourceFormatLoader as described in :ref:`load`. This method is performed implicitly for ResourceFormatLoaders written in GDScript (see :ref:`ResourceFormatLoader` for more information). +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_exists: -- :ref:`bool` **exists** **(** :ref:`String` path, :ref:`String` type_hint="" **)** +.. rst-class:: classref-method + +:ref:`bool` **exists** **(** :ref:`String` path, :ref:`String` type_hint="" **)** Returns whether a recognized resource exists for the given ``path``. An optional ``type_hint`` can be used to further specify the :ref:`Resource` type that should be handled by the :ref:`ResourceFormatLoader`. Anything that inherits from :ref:`Resource` can be used as a type hint, for example :ref:`Image`. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_get_dependencies: -- :ref:`PackedStringArray` **get_dependencies** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_dependencies** **(** :ref:`String` path **)** Returns the dependencies for the resource at the given ``path``. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_get_recognized_extensions_for_type: -- :ref:`PackedStringArray` **get_recognized_extensions_for_type** **(** :ref:`String` type **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_recognized_extensions_for_type** **(** :ref:`String` type **)** Returns the list of recognized extensions for a resource type. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_get_resource_uid: -- :ref:`int` **get_resource_uid** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`int` **get_resource_uid** **(** :ref:`String` path **)** Returns the ID associated with a given resource path, or ``-1`` when no such ID exists. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_has_cached: -- :ref:`bool` **has_cached** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`bool` **has_cached** **(** :ref:`String` path **)** Returns whether a cached resource is available for the given ``path``. Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the :ref:`load` method will use the cached version. The cached resource can be overridden by using :ref:`Resource.take_over_path` on a new resource for that same path. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_load: -- :ref:`Resource` **load** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`CacheMode` cache_mode=1 **)** +.. rst-class:: classref-method + +:ref:`Resource` **load** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`CacheMode` cache_mode=1 **)** Loads a resource at the given ``path``, caching the result for further access. @@ -169,51 +250,71 @@ The ``cache_mode`` property defines whether and how the cache should be used or Returns an empty resource if no :ref:`ResourceFormatLoader` could handle the file. -GDScript has a simplified :ref:`@GDScript.load` built-in method which can be used in most situations, leaving the use of ``ResourceLoader`` for more advanced scenarios. +GDScript has a simplified :ref:`@GDScript.load` built-in method which can be used in most situations, leaving the use of **ResourceLoader** for more advanced scenarios. + +.. rst-class:: classref-item-separator ---- .. _class_ResourceLoader_method_load_threaded_get: -- :ref:`Resource` **load_threaded_get** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Resource` **load_threaded_get** **(** :ref:`String` path **)** Returns the resource loaded by :ref:`load_threaded_request`. If this is called before the loading thread is done (i.e. :ref:`load_threaded_get_status` is not :ref:`THREAD_LOAD_LOADED`), the calling thread will be blocked until the resource has finished loading. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_load_threaded_get_status: -- :ref:`ThreadLoadStatus` **load_threaded_get_status** **(** :ref:`String` path, :ref:`Array` progress=[] **)** +.. rst-class:: classref-method + +:ref:`ThreadLoadStatus` **load_threaded_get_status** **(** :ref:`String` path, :ref:`Array` progress=[] **)** Returns the status of a threaded loading operation started with :ref:`load_threaded_request` for the resource at ``path``. See :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_load_threaded_request: -- :ref:`Error` **load_threaded_request** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false, :ref:`CacheMode` cache_mode=1 **)** +.. rst-class:: classref-method + +:ref:`Error` **load_threaded_request** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` use_sub_threads=false, :ref:`CacheMode` cache_mode=1 **)** 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). The ``cache_mode`` property defines whether and how the cache should be used or updated when loading the resource. See :ref:`CacheMode` for details. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_remove_resource_format_loader: -- void **remove_resource_format_loader** **(** :ref:`ResourceFormatLoader` format_loader **)** +.. rst-class:: classref-method + +void **remove_resource_format_loader** **(** :ref:`ResourceFormatLoader` format_loader **)** Unregisters the given :ref:`ResourceFormatLoader`. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceLoader_method_set_abort_on_missing_resources: -- void **set_abort_on_missing_resources** **(** :ref:`bool` abort **)** +.. rst-class:: classref-method + +void **set_abort_on_missing_resources** **(** :ref:`bool` abort **)** Changes the behavior on missing sub-resources. The default behavior is to abort loading. diff --git a/classes/class_resourcepreloader.rst b/classes/class_resourcepreloader.rst index 7e179bb02..9e56c2f17 100644 --- a/classes/class_resourcepreloader.rst +++ b/classes/class_resourcepreloader.rst @@ -14,76 +14,111 @@ ResourcePreloader Resource Preloader Node. +.. rst-class:: classref-introduction-group + Description ----------- This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. -GDScript has a simplified :ref:`@GDScript.preload` built-in method which can be used in most situations, leaving the use of ``ResourcePreloader`` for more advanced scenarios. +GDScript has a simplified :ref:`@GDScript.preload` built-in method which can be used in most situations, leaving the use of **ResourcePreloader** for more advanced scenarios. + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_resource` **(** :ref:`StringName` name, :ref:`Resource` resource **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`get_resource` **(** :ref:`StringName` name **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_resource_list` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_resource` **(** :ref:`StringName` name **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_resource` **(** :ref:`StringName` name **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_resource` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_resource` **(** :ref:`StringName` name, :ref:`Resource` resource **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`get_resource` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_resource_list` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_resource` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_resource` **(** :ref:`StringName` name **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_resource` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ResourcePreloader_method_add_resource: -- void **add_resource** **(** :ref:`StringName` name, :ref:`Resource` resource **)** +.. rst-class:: classref-method + +void **add_resource** **(** :ref:`StringName` name, :ref:`Resource` 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. +.. rst-class:: classref-item-separator + ---- .. _class_ResourcePreloader_method_get_resource: -- :ref:`Resource` **get_resource** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Resource` **get_resource** **(** :ref:`StringName` name **)** |const| Returns the resource associated to ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_ResourcePreloader_method_get_resource_list: -- :ref:`PackedStringArray` **get_resource_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_resource_list** **(** **)** |const| Returns the list of resources inside the preloader. +.. rst-class:: classref-item-separator + ---- .. _class_ResourcePreloader_method_has_resource: -- :ref:`bool` **has_resource** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_resource** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the preloader contains a resource associated to ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_ResourcePreloader_method_remove_resource: -- void **remove_resource** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **remove_resource** **(** :ref:`StringName` name **)** Removes the resource associated to ``name`` from the preloader. +.. rst-class:: classref-item-separator + ---- .. _class_ResourcePreloader_method_rename_resource: -- void **rename_resource** **(** :ref:`StringName` name, :ref:`StringName` newname **)** +.. rst-class:: classref-method + +void **rename_resource** **(** :ref:`StringName` name, :ref:`StringName` newname **)** Renames a resource inside the preloader from ``name`` to ``newname``. diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index a6057a3f9..3b8b19627 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -14,6 +14,8 @@ ResourceSaver Singleton for saving Godot-specific resource types. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,92 +23,157 @@ Singleton for saving Godot-specific resource types to the filesystem. It uses the many :ref:`ResourceFormatSaver` classes registered in the engine (either built-in or from a plugin) to save engine-specific resource data to text-based (e.g. ``.tres`` or ``.tscn``) or binary files (e.g. ``.res`` or ``.scn``). +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_resource_format_saver` **(** :ref:`ResourceFormatSaver` format_saver, :ref:`bool` at_front=false **)** | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_recognized_extensions` **(** :ref:`Resource` type **)** | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_resource_format_saver` **(** :ref:`ResourceFormatSaver` format_saver **)** | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save` **(** :ref:`Resource` resource, :ref:`String` path="", :ref:`SaverFlags` flags=0 **)** | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_resource_format_saver` **(** :ref:`ResourceFormatSaver` format_saver, :ref:`bool` at_front=false **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_recognized_extensions` **(** :ref:`Resource` type **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_resource_format_saver` **(** :ref:`ResourceFormatSaver` format_saver **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save` **(** :ref:`Resource` resource, :ref:`String` path="", :ref:`SaverFlags` flags=0 **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ResourceSaver_SaverFlags: -.. _class_ResourceSaver_constant_FLAG_NONE: - -.. _class_ResourceSaver_constant_FLAG_RELATIVE_PATHS: - -.. _class_ResourceSaver_constant_FLAG_BUNDLE_RESOURCES: - -.. _class_ResourceSaver_constant_FLAG_CHANGE_PATH: - -.. _class_ResourceSaver_constant_FLAG_OMIT_EDITOR_PROPERTIES: - -.. _class_ResourceSaver_constant_FLAG_SAVE_BIG_ENDIAN: - -.. _class_ResourceSaver_constant_FLAG_COMPRESS: - -.. _class_ResourceSaver_constant_FLAG_REPLACE_SUBRESOURCE_PATHS: +.. rst-class:: classref-enumeration flags **SaverFlags**: -- **FLAG_NONE** = **0** --- No resource saving option. +.. _class_ResourceSaver_constant_FLAG_NONE: -- **FLAG_RELATIVE_PATHS** = **1** --- Save the resource with a path relative to the scene which uses it. +.. rst-class:: classref-enumeration-constant -- **FLAG_BUNDLE_RESOURCES** = **2** --- Bundles external resources. +:ref:`SaverFlags` **FLAG_NONE** = ``0`` -- **FLAG_CHANGE_PATH** = **4** --- Changes the :ref:`Resource.resource_path` of the saved resource to match its new location. +No resource saving option. -- **FLAG_OMIT_EDITOR_PROPERTIES** = **8** --- Do not save editor-specific metadata (identified by their ``__editor`` prefix). +.. _class_ResourceSaver_constant_FLAG_RELATIVE_PATHS: -- **FLAG_SAVE_BIG_ENDIAN** = **16** --- Save as big endian (see :ref:`FileAccess.big_endian`). +.. rst-class:: classref-enumeration-constant -- **FLAG_COMPRESS** = **32** --- Compress the resource on save using :ref:`FileAccess.COMPRESSION_ZSTD`. Only available for binary resource types. +:ref:`SaverFlags` **FLAG_RELATIVE_PATHS** = ``1`` -- **FLAG_REPLACE_SUBRESOURCE_PATHS** = **64** --- Take over the paths of the saved subresources (see :ref:`Resource.take_over_path`). +Save the resource with a path relative to the scene which uses it. + +.. _class_ResourceSaver_constant_FLAG_BUNDLE_RESOURCES: + +.. rst-class:: classref-enumeration-constant + +:ref:`SaverFlags` **FLAG_BUNDLE_RESOURCES** = ``2`` + +Bundles external resources. + +.. _class_ResourceSaver_constant_FLAG_CHANGE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`SaverFlags` **FLAG_CHANGE_PATH** = ``4`` + +Changes the :ref:`Resource.resource_path` of the saved resource to match its new location. + +.. _class_ResourceSaver_constant_FLAG_OMIT_EDITOR_PROPERTIES: + +.. rst-class:: classref-enumeration-constant + +:ref:`SaverFlags` **FLAG_OMIT_EDITOR_PROPERTIES** = ``8`` + +Do not save editor-specific metadata (identified by their ``__editor`` prefix). + +.. _class_ResourceSaver_constant_FLAG_SAVE_BIG_ENDIAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`SaverFlags` **FLAG_SAVE_BIG_ENDIAN** = ``16`` + +Save as big endian (see :ref:`FileAccess.big_endian`). + +.. _class_ResourceSaver_constant_FLAG_COMPRESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SaverFlags` **FLAG_COMPRESS** = ``32`` + +Compress the resource on save using :ref:`FileAccess.COMPRESSION_ZSTD`. Only available for binary resource types. + +.. _class_ResourceSaver_constant_FLAG_REPLACE_SUBRESOURCE_PATHS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SaverFlags` **FLAG_REPLACE_SUBRESOURCE_PATHS** = ``64`` + +Take over the paths of the saved subresources (see :ref:`Resource.take_over_path`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ResourceSaver_method_add_resource_format_saver: -- void **add_resource_format_saver** **(** :ref:`ResourceFormatSaver` format_saver, :ref:`bool` at_front=false **)** +.. rst-class:: classref-method + +void **add_resource_format_saver** **(** :ref:`ResourceFormatSaver` format_saver, :ref:`bool` at_front=false **)** Registers a new :ref:`ResourceFormatSaver`. The ResourceSaver will use the ResourceFormatSaver as described in :ref:`save`. This method is performed implicitly for ResourceFormatSavers written in GDScript (see :ref:`ResourceFormatSaver` for more information). +.. rst-class:: classref-item-separator + ---- .. _class_ResourceSaver_method_get_recognized_extensions: -- :ref:`PackedStringArray` **get_recognized_extensions** **(** :ref:`Resource` type **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_recognized_extensions** **(** :ref:`Resource` type **)** Returns the list of extensions available for saving a resource of a given type. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceSaver_method_remove_resource_format_saver: -- void **remove_resource_format_saver** **(** :ref:`ResourceFormatSaver` format_saver **)** +.. rst-class:: classref-method + +void **remove_resource_format_saver** **(** :ref:`ResourceFormatSaver` format_saver **)** Unregisters the given :ref:`ResourceFormatSaver`. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceSaver_method_save: -- :ref:`Error` **save** **(** :ref:`Resource` resource, :ref:`String` path="", :ref:`SaverFlags` flags=0 **)** +.. rst-class:: classref-method -Saves a resource to disk to the given path, using a :ref:`ResourceFormatSaver` that recognizes the resource object. If ``path`` is empty, ``ResourceSaver`` will try to use :ref:`Resource.resource_path`. +:ref:`Error` **save** **(** :ref:`Resource` resource, :ref:`String` path="", :ref:`SaverFlags` flags=0 **)** + +Saves a resource to disk to the given path, using a :ref:`ResourceFormatSaver` that recognizes the resource object. If ``path`` is empty, **ResourceSaver** will try to use :ref:`Resource.resource_path`. The ``flags`` bitmask can be specified to customize the save behavior using :ref:`SaverFlags` flags. diff --git a/classes/class_resourceuid.rst b/classes/class_resourceuid.rst index c713bc8fa..7eb32998a 100644 --- a/classes/class_resourceuid.rst +++ b/classes/class_resourceuid.rst @@ -14,6 +14,8 @@ ResourceUID Singleton for managing a cache of resource UIDs within a project. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,108 +25,159 @@ Using UIDs allows for the engine to keep references between resources intact, ev This singleton is responsible for keeping track of all registered resource UIDs of a project, generating new UIDs and converting between the string and integer representation. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_id` **(** :ref:`int` id, :ref:`String` path **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_id` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_id_path` **(** :ref:`int` id **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_id` **(** :ref:`int` id **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`id_to_text` **(** :ref:`int` id **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_id` **(** :ref:`int` id **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_id` **(** :ref:`int` id, :ref:`String` path **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`text_to_id` **(** :ref:`String` text_id **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_id` **(** :ref:`int` id, :ref:`String` path **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_id` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_id_path` **(** :ref:`int` id **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_id` **(** :ref:`int` id **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`id_to_text` **(** :ref:`int` id **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_id` **(** :ref:`int` id **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_id` **(** :ref:`int` id, :ref:`String` path **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_to_id` **(** :ref:`String` text_id **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_ResourceUID_constant_INVALID_ID: -- **INVALID_ID** = **-1** --- The value to use for an invalid UID, for example if the resource could not be loaded. +.. rst-class:: classref-constant + +**INVALID_ID** = ``-1`` + +The value to use for an invalid UID, for example if the resource could not be loaded. Its text representation is ``uid://``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ResourceUID_method_add_id: -- void **add_id** **(** :ref:`int` id, :ref:`String` path **)** +.. rst-class:: classref-method + +void **add_id** **(** :ref:`int` id, :ref:`String` path **)** Adds a new UID value which is mapped to the given resource path. Fails with an error if the UID already exists, so be sure to check :ref:`has_id` beforehand, or use :ref:`set_id` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceUID_method_create_id: -- :ref:`int` **create_id** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **create_id** **(** **)** Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. In order for this UID to be registered, you must call :ref:`add_id` or :ref:`set_id`. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceUID_method_get_id_path: -- :ref:`String` **get_id_path** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_id_path** **(** :ref:`int` id **)** |const| Returns the path that the given UID value refers to. Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceUID_method_has_id: -- :ref:`bool` **has_id** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_id** **(** :ref:`int` id **)** |const| Returns whether the given UID value is known to the cache. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceUID_method_id_to_text: -- :ref:`String` **id_to_text** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`String` **id_to_text** **(** :ref:`int` id **)** |const| Converts the given UID to a ``uid://`` string value. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceUID_method_remove_id: -- void **remove_id** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_id** **(** :ref:`int` id **)** Removes a loaded UID value from the cache. Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceUID_method_set_id: -- void **set_id** **(** :ref:`int` id, :ref:`String` path **)** +.. rst-class:: classref-method + +void **set_id** **(** :ref:`int` id, :ref:`String` path **)** Updates the resource path of an existing UID. Fails with an error if the UID does not exist, so be sure to check :ref:`has_id` beforehand, or use :ref:`add_id` instead. +.. rst-class:: classref-item-separator + ---- .. _class_ResourceUID_method_text_to_id: -- :ref:`int` **text_to_id** **(** :ref:`String` text_id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **text_to_id** **(** :ref:`String` text_id **)** |const| Extracts the UID value from the given ``uid://`` string. diff --git a/classes/class_ribbontrailmesh.rst b/classes/class_ribbontrailmesh.rst index 2867e1cd1..280eea4f0 100644 --- a/classes/class_ribbontrailmesh.rst +++ b/classes/class_ribbontrailmesh.rst @@ -16,140 +16,173 @@ RibbonTrailMesh There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------+--------------------------------------------------------------------------+---------+ -| :ref:`Curve` | :ref:`curve` | | -+------------------------------------------+--------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`section_length` | ``0.2`` | -+------------------------------------------+--------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`section_segments` | ``3`` | -+------------------------------------------+--------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`sections` | ``5`` | -+------------------------------------------+--------------------------------------------------------------------------+---------+ -| :ref:`Shape` | :ref:`shape` | ``1`` | -+------------------------------------------+--------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`size` | ``1.0`` | -+------------------------------------------+--------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +------------------------------------------+--------------------------------------------------------------------------+---------+ + | :ref:`Curve` | :ref:`curve` | | + +------------------------------------------+--------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`section_length` | ``0.2`` | + +------------------------------------------+--------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`section_segments` | ``3`` | + +------------------------------------------+--------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`sections` | ``5`` | + +------------------------------------------+--------------------------------------------------------------------------+---------+ + | :ref:`Shape` | :ref:`shape` | ``1`` | + +------------------------------------------+--------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`size` | ``1.0`` | + +------------------------------------------+--------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_RibbonTrailMesh_Shape: -.. _class_RibbonTrailMesh_constant_SHAPE_FLAT: - -.. _class_RibbonTrailMesh_constant_SHAPE_CROSS: +.. rst-class:: classref-enumeration enum **Shape**: -- **SHAPE_FLAT** = **0** +.. _class_RibbonTrailMesh_constant_SHAPE_FLAT: -- **SHAPE_CROSS** = **1** +.. rst-class:: classref-enumeration-constant + +:ref:`Shape` **SHAPE_FLAT** = ``0`` + + + +.. _class_RibbonTrailMesh_constant_SHAPE_CROSS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Shape` **SHAPE_CROSS** = ``1`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RibbonTrailMesh_property_curve: -- :ref:`Curve` **curve** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_curve(value) | -+----------+------------------+ -| *Getter* | get_curve() | -+----------+------------------+ +:ref:`Curve` **curve** + +.. rst-class:: classref-property-setget + +- void **set_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_curve** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RibbonTrailMesh_property_section_length: -- :ref:`float` **section_length** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.2`` | -+-----------+---------------------------+ -| *Setter* | set_section_length(value) | -+-----------+---------------------------+ -| *Getter* | get_section_length() | -+-----------+---------------------------+ +:ref:`float` **section_length** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_section_length** **(** :ref:`float` value **)** +- :ref:`float` **get_section_length** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RibbonTrailMesh_property_section_segments: -- :ref:`int` **section_segments** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``3`` | -+-----------+-----------------------------+ -| *Setter* | set_section_segments(value) | -+-----------+-----------------------------+ -| *Getter* | get_section_segments() | -+-----------+-----------------------------+ +:ref:`int` **section_segments** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_section_segments** **(** :ref:`int` value **)** +- :ref:`int` **get_section_segments** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RibbonTrailMesh_property_sections: -- :ref:`int` **sections** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``5`` | -+-----------+---------------------+ -| *Setter* | set_sections(value) | -+-----------+---------------------+ -| *Getter* | get_sections() | -+-----------+---------------------+ +:ref:`int` **sections** = ``5`` + +.. rst-class:: classref-property-setget + +- void **set_sections** **(** :ref:`int` value **)** +- :ref:`int` **get_sections** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RibbonTrailMesh_property_shape: -- :ref:`Shape` **shape** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1`` | -+-----------+------------------+ -| *Setter* | set_shape(value) | -+-----------+------------------+ -| *Getter* | get_shape() | -+-----------+------------------+ +:ref:`Shape` **shape** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Shape` value **)** +- :ref:`Shape` **get_shape** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RibbonTrailMesh_property_size: -- :ref:`float` **size** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_size(value) | -+-----------+-----------------+ -| *Getter* | get_size() | -+-----------+-----------------+ +:ref:`float` **size** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`float` value **)** +- :ref:`float` **get_size** **(** **)** .. container:: contribute diff --git a/classes/class_richtexteffect.rst b/classes/class_richtexteffect.rst index 1585ec1e9..5b63651d4 100644 --- a/classes/class_richtexteffect.rst +++ b/classes/class_richtexteffect.rst @@ -14,12 +14,14 @@ RichTextEffect A custom effect for use with :ref:`RichTextLabel`. +.. rst-class:: classref-introduction-group + Description ----------- A custom effect for use with :ref:`RichTextLabel`. -\ **Note:** For a ``RichTextEffect`` to be usable, a BBCode tag must be defined as a member variable called ``bbcode`` in the script. +\ **Note:** For a **RichTextEffect** to be usable, a BBCode tag must be defined as a member variable called ``bbcode`` in the script. .. tabs:: @@ -36,7 +38,9 @@ A custom effect for use with :ref:`RichTextLabel`. -\ **Note:** As soon as a :ref:`RichTextLabel` contains at least one ``RichTextEffect``, it will continuously process the effect unless the project is paused. This may impact battery life negatively. +\ **Note:** As soon as a :ref:`RichTextLabel` contains at least one **RichTextEffect**, it will continuously process the effect unless the project is paused. This may impact battery life negatively. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -45,19 +49,32 @@ Tutorials - `RichTextEffect test project (third-party) `__ +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_process_custom_fx` **(** :ref:`CharFXTransform` char_fx **)** |virtual| |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process_custom_fx` **(** :ref:`CharFXTransform` char_fx **)** |virtual| |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_RichTextEffect_method__process_custom_fx: -- :ref:`bool` **_process_custom_fx** **(** :ref:`CharFXTransform` char_fx **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_process_custom_fx** **(** :ref:`CharFXTransform` char_fx **)** |virtual| |const| 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. diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 3d1670478..e9bc97b4a 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -14,6 +14,8 @@ RichTextLabel Label that displays rich text. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,6 +29,8 @@ Rich text can contain custom text, fonts, images and some basic formatting. The \ **Note:** Unlike :ref:`Label`, RichTextLabel doesn't have a *property* to horizontally align text to the center. Instead, enable :ref:`bbcode_enabled` and surround the text in a ``[center]`` tag as follows: ``[center]Example[/center]``. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the :ref:`fit_content_height` property. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,804 +40,1012 @@ Tutorials - `OS Test Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``3`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`bbcode_enabled` | ``false`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`context_menu_enabled` | ``false`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`custom_effects` | ``[]`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`fit_content_height` | ``false`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hint_underlined` | ``true`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`meta_underlined` | ``true`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`progress_bar_delay` | ``1000`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_active` | ``true`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_following` | ``false`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`selection_enabled` | ``false`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`tab_size` | ``4`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`threaded` | ``false`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`visible_characters` | ``-1`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`float` | :ref:`visible_ratio` | ``1.0`` | -+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``3`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`bbcode_enabled` | ``false`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`context_menu_enabled` | ``false`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`custom_effects` | ``[]`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`fit_content_height` | ``false`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`hint_underlined` | ``true`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`meta_underlined` | ``true`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`progress_bar_delay` | ``1000`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_active` | ``true`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_following` | ``false`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selection_enabled` | ``false`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`tab_size` | ``4`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`threaded` | ``false`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`visible_characters` | ``-1`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`visible_ratio` | ``1.0`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_text` **(** :ref:`String` text **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_text` **(** :ref:`String` bbcode **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_content_height` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_content_width` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_count` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_ready` **(** **)** |const| | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`newline` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pop` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_bold` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_bold_italics` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_cell` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_color` **(** :ref:`Color` color **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_hint` **(** :ref:`String` description **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_indent` **(** :ref:`int` level **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_italics` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_meta` **(** :ref:`Variant` data **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_mono` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_normal` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_strikethrough` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0 **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_underline` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`remove_line` **(** :ref:`int` line **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select_all` **(** **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** | -+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_text` **(** :ref:`String` text **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_text` **(** :ref:`String` bbcode **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_height` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_width` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_ready` **(** **)** |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`newline` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pop` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold_italics` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_cell` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_color` **(** :ref:`Color` color **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_hint` **(** :ref:`String` description **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_indent` **(** :ref:`int` level **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_italics` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_mono` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_normal` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_strikethrough` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0 **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_underline` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`remove_line` **(** :ref:`int` line **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_selection` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_all` **(** **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`default_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`font_selected_color` | ``Color(0, 0, 0, 0)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`font_shadow_color` | ``Color(0, 0, 0, 0)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`selection_color` | ``Color(0.1, 0.1, 1, 0.8)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`table_border` | ``Color(0, 0, 0, 0)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`table_even_row_bg` | ``Color(0, 0, 0, 0)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`table_odd_row_bg` | ``Color(0, 0, 0, 0)`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`line_separation` | ``0`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`shadow_offset_x` | ``1`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`shadow_offset_y` | ``1`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`shadow_outline_size` | ``1`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`table_h_separation` | ``3`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`table_v_separation` | ``3`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`text_highlight_h_padding` | ``3`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`text_highlight_v_padding` | ``3`` | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Font` | :ref:`bold_font` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Font` | :ref:`bold_italics_font` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Font` | :ref:`italics_font` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Font` | :ref:`mono_font` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Font` | :ref:`normal_font` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`bold_font_size` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`bold_italics_font_size` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`italics_font_size` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`mono_font_size` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`normal_font_size` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`StyleBox` | :ref:`focus` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`StyleBox` | :ref:`normal` | | -+---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`default_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`font_selected_color` | ``Color(0, 0, 0, 0)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`font_shadow_color` | ``Color(0, 0, 0, 0)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`selection_color` | ``Color(0.1, 0.1, 1, 0.8)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`table_border` | ``Color(0, 0, 0, 0)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`table_even_row_bg` | ``Color(0, 0, 0, 0)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`table_odd_row_bg` | ``Color(0, 0, 0, 0)`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`line_separation` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`shadow_offset_x` | ``1`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`shadow_offset_y` | ``1`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`shadow_outline_size` | ``1`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`table_h_separation` | ``3`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`table_v_separation` | ``3`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`text_highlight_h_padding` | ``3`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`text_highlight_v_padding` | ``3`` | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Font` | :ref:`bold_font` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Font` | :ref:`bold_italics_font` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Font` | :ref:`italics_font` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Font` | :ref:`mono_font` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Font` | :ref:`normal_font` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`bold_font_size` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`bold_italics_font_size` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`italics_font_size` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`mono_font_size` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`normal_font_size` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`StyleBox` | :ref:`normal` | | + +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_RichTextLabel_signal_finished: -- **finished** **(** **)** +.. rst-class:: classref-signal + +**finished** **(** **)** Triggered when the document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_signal_meta_clicked: -- **meta_clicked** **(** :ref:`Variant` meta **)** +.. rst-class:: classref-signal + +**meta_clicked** **(** :ref:`Variant` 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` type. If a particular type or an object is desired, the :ref:`push_meta` method must be used to manually insert the data into the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_signal_meta_hover_ended: -- **meta_hover_ended** **(** :ref:`Variant` meta **)** +.. rst-class:: classref-signal + +**meta_hover_ended** **(** :ref:`Variant` meta **)** Triggers when the mouse exits a meta tag. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_signal_meta_hover_started: -- **meta_hover_started** **(** :ref:`Variant` meta **)** +.. rst-class:: classref-signal + +**meta_hover_started** **(** :ref:`Variant` meta **)** Triggers when the mouse enters a meta tag. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_RichTextLabel_ListType: -.. _class_RichTextLabel_constant_LIST_NUMBERS: - -.. _class_RichTextLabel_constant_LIST_LETTERS: - -.. _class_RichTextLabel_constant_LIST_ROMAN: - -.. _class_RichTextLabel_constant_LIST_DOTS: +.. rst-class:: classref-enumeration enum **ListType**: -- **LIST_NUMBERS** = **0** --- Each list item has a number marker. +.. _class_RichTextLabel_constant_LIST_NUMBERS: -- **LIST_LETTERS** = **1** --- Each list item has a letter marker. +.. rst-class:: classref-enumeration-constant -- **LIST_ROMAN** = **2** --- Each list item has a roman number marker. +:ref:`ListType` **LIST_NUMBERS** = ``0`` -- **LIST_DOTS** = **3** --- Each list item has a filled circle marker. +Each list item has a number marker. + +.. _class_RichTextLabel_constant_LIST_LETTERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ListType` **LIST_LETTERS** = ``1`` + +Each list item has a letter marker. + +.. _class_RichTextLabel_constant_LIST_ROMAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`ListType` **LIST_ROMAN** = ``2`` + +Each list item has a roman number marker. + +.. _class_RichTextLabel_constant_LIST_DOTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ListType` **LIST_DOTS** = ``3`` + +Each list item has a filled circle marker. + +.. rst-class:: classref-item-separator ---- .. _enum_RichTextLabel_ItemType: -.. _class_RichTextLabel_constant_ITEM_FRAME: - -.. _class_RichTextLabel_constant_ITEM_TEXT: - -.. _class_RichTextLabel_constant_ITEM_IMAGE: - -.. _class_RichTextLabel_constant_ITEM_NEWLINE: - -.. _class_RichTextLabel_constant_ITEM_FONT: - -.. _class_RichTextLabel_constant_ITEM_FONT_SIZE: - -.. _class_RichTextLabel_constant_ITEM_FONT_FEATURES: - -.. _class_RichTextLabel_constant_ITEM_COLOR: - -.. _class_RichTextLabel_constant_ITEM_OUTLINE_SIZE: - -.. _class_RichTextLabel_constant_ITEM_OUTLINE_COLOR: - -.. _class_RichTextLabel_constant_ITEM_UNDERLINE: - -.. _class_RichTextLabel_constant_ITEM_STRIKETHROUGH: - -.. _class_RichTextLabel_constant_ITEM_PARAGRAPH: - -.. _class_RichTextLabel_constant_ITEM_INDENT: - -.. _class_RichTextLabel_constant_ITEM_LIST: - -.. _class_RichTextLabel_constant_ITEM_TABLE: - -.. _class_RichTextLabel_constant_ITEM_FADE: - -.. _class_RichTextLabel_constant_ITEM_SHAKE: - -.. _class_RichTextLabel_constant_ITEM_WAVE: - -.. _class_RichTextLabel_constant_ITEM_TORNADO: - -.. _class_RichTextLabel_constant_ITEM_RAINBOW: - -.. _class_RichTextLabel_constant_ITEM_BGCOLOR: - -.. _class_RichTextLabel_constant_ITEM_FGCOLOR: - -.. _class_RichTextLabel_constant_ITEM_META: - -.. _class_RichTextLabel_constant_ITEM_HINT: - -.. _class_RichTextLabel_constant_ITEM_DROPCAP: - -.. _class_RichTextLabel_constant_ITEM_CUSTOMFX: +.. rst-class:: classref-enumeration enum **ItemType**: -- **ITEM_FRAME** = **0** +.. _class_RichTextLabel_constant_ITEM_FRAME: -- **ITEM_TEXT** = **1** +.. rst-class:: classref-enumeration-constant -- **ITEM_IMAGE** = **2** +:ref:`ItemType` **ITEM_FRAME** = ``0`` -- **ITEM_NEWLINE** = **3** -- **ITEM_FONT** = **4** -- **ITEM_FONT_SIZE** = **5** +.. _class_RichTextLabel_constant_ITEM_TEXT: -- **ITEM_FONT_FEATURES** = **6** +.. rst-class:: classref-enumeration-constant -- **ITEM_COLOR** = **7** +:ref:`ItemType` **ITEM_TEXT** = ``1`` -- **ITEM_OUTLINE_SIZE** = **8** -- **ITEM_OUTLINE_COLOR** = **9** -- **ITEM_UNDERLINE** = **10** +.. _class_RichTextLabel_constant_ITEM_IMAGE: -- **ITEM_STRIKETHROUGH** = **11** +.. rst-class:: classref-enumeration-constant -- **ITEM_PARAGRAPH** = **12** +:ref:`ItemType` **ITEM_IMAGE** = ``2`` -- **ITEM_INDENT** = **13** -- **ITEM_LIST** = **14** -- **ITEM_TABLE** = **15** +.. _class_RichTextLabel_constant_ITEM_NEWLINE: -- **ITEM_FADE** = **16** +.. rst-class:: classref-enumeration-constant -- **ITEM_SHAKE** = **17** +:ref:`ItemType` **ITEM_NEWLINE** = ``3`` -- **ITEM_WAVE** = **18** -- **ITEM_TORNADO** = **19** -- **ITEM_RAINBOW** = **20** +.. _class_RichTextLabel_constant_ITEM_FONT: -- **ITEM_BGCOLOR** = **21** +.. rst-class:: classref-enumeration-constant -- **ITEM_FGCOLOR** = **22** +:ref:`ItemType` **ITEM_FONT** = ``4`` -- **ITEM_META** = **23** -- **ITEM_HINT** = **24** -- **ITEM_DROPCAP** = **25** +.. _class_RichTextLabel_constant_ITEM_FONT_SIZE: -- **ITEM_CUSTOMFX** = **26** +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_FONT_SIZE** = ``5`` + + + +.. _class_RichTextLabel_constant_ITEM_FONT_FEATURES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_FONT_FEATURES** = ``6`` + + + +.. _class_RichTextLabel_constant_ITEM_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_COLOR** = ``7`` + + + +.. _class_RichTextLabel_constant_ITEM_OUTLINE_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_OUTLINE_SIZE** = ``8`` + + + +.. _class_RichTextLabel_constant_ITEM_OUTLINE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_OUTLINE_COLOR** = ``9`` + + + +.. _class_RichTextLabel_constant_ITEM_UNDERLINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_UNDERLINE** = ``10`` + + + +.. _class_RichTextLabel_constant_ITEM_STRIKETHROUGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_STRIKETHROUGH** = ``11`` + + + +.. _class_RichTextLabel_constant_ITEM_PARAGRAPH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_PARAGRAPH** = ``12`` + + + +.. _class_RichTextLabel_constant_ITEM_INDENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_INDENT** = ``13`` + + + +.. _class_RichTextLabel_constant_ITEM_LIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_LIST** = ``14`` + + + +.. _class_RichTextLabel_constant_ITEM_TABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_TABLE** = ``15`` + + + +.. _class_RichTextLabel_constant_ITEM_FADE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_FADE** = ``16`` + + + +.. _class_RichTextLabel_constant_ITEM_SHAKE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_SHAKE** = ``17`` + + + +.. _class_RichTextLabel_constant_ITEM_WAVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_WAVE** = ``18`` + + + +.. _class_RichTextLabel_constant_ITEM_TORNADO: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_TORNADO** = ``19`` + + + +.. _class_RichTextLabel_constant_ITEM_RAINBOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_RAINBOW** = ``20`` + + + +.. _class_RichTextLabel_constant_ITEM_BGCOLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_BGCOLOR** = ``21`` + + + +.. _class_RichTextLabel_constant_ITEM_FGCOLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_FGCOLOR** = ``22`` + + + +.. _class_RichTextLabel_constant_ITEM_META: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_META** = ``23`` + + + +.. _class_RichTextLabel_constant_ITEM_HINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_HINT** = ``24`` + + + +.. _class_RichTextLabel_constant_ITEM_DROPCAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_DROPCAP** = ``25`` + + + +.. _class_RichTextLabel_constant_ITEM_CUSTOMFX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ItemType` **ITEM_CUSTOMFX** = ``26`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RichTextLabel_property_autowrap_mode: -- :ref:`AutowrapMode` **autowrap_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``3`` | -+-----------+--------------------------+ -| *Setter* | set_autowrap_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_autowrap_mode() | -+-----------+--------------------------+ +:ref:`AutowrapMode` **autowrap_mode** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_autowrap_mode** **(** :ref:`AutowrapMode` value **)** +- :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. To see how each mode behaves, see :ref:`AutowrapMode`. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_bbcode_enabled: -- :ref:`bool` **bbcode_enabled** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_use_bbcode(value) | -+-----------+-----------------------+ -| *Getter* | is_using_bbcode() | -+-----------+-----------------------+ +:ref:`bool` **bbcode_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_bbcode** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_bbcode** **(** **)** If ``true``, the label uses BBCode formatting. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_context_menu_enabled: -- :ref:`bool` **context_menu_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_context_menu_enabled(value) | -+-----------+---------------------------------+ -| *Getter* | is_context_menu_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **context_menu_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_context_menu_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_context_menu_enabled** **(** **)** If ``true``, a right-click displays the context menu. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_custom_effects: -- :ref:`Array` **custom_effects** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``[]`` | -+-----------+--------------------+ -| *Setter* | set_effects(value) | -+-----------+--------------------+ -| *Getter* | get_effects() | -+-----------+--------------------+ +:ref:`Array` **custom_effects** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_effects** **(** :ref:`Array` value **)** +- :ref:`Array` **get_effects** **(** **)** The currently installed custom effects. This is an array of :ref:`RichTextEffect`\ s. To add a custom effect, it's more convenient to use :ref:`install_effect`. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_deselect_on_focus_loss_enabled: -- :ref:`bool` **deselect_on_focus_loss_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------------+ -| *Setter* | set_deselect_on_focus_loss_enabled(value) | -+-----------+-------------------------------------------+ -| *Getter* | is_deselect_on_focus_loss_enabled() | -+-----------+-------------------------------------------+ +:ref:`bool` **deselect_on_focus_loss_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_deselect_on_focus_loss_enabled** **(** **)** If ``true``, the selected text will be deselected when focus is lost. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_fit_content_height: -- :ref:`bool` **fit_content_height** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_fit_content_height(value) | -+-----------+---------------------------------+ -| *Getter* | is_fit_content_height_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **fit_content_height** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_fit_content_height** **(** :ref:`bool` value **)** +- :ref:`bool` **is_fit_content_height_enabled** **(** **)** If ``true``, the label's height will be automatically updated to fit its content. -\ **Note:** This property is used as a workaround to fix issues with ``RichTextLabel`` in :ref:`Container`\ s, but it's unreliable in some cases and will be removed in future versions. +\ **Note:** This property is used as a workaround to fix issues with **RichTextLabel** in :ref:`Container`\ s, but it's unreliable in some cases and will be removed in future versions. + +.. rst-class:: classref-item-separator ---- .. _class_RichTextLabel_property_hint_underlined: -- :ref:`bool` **hint_underlined** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------+ -| *Setter* | set_hint_underline(value) | -+-----------+---------------------------+ -| *Getter* | is_hint_underlined() | -+-----------+---------------------------+ +:ref:`bool` **hint_underlined** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_hint_underline** **(** :ref:`bool` value **)** +- :ref:`bool` **is_hint_underlined** **(** **)** If ``true``, the label underlines hint tags such as ``[hint=description]{text}[/hint]``. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_RichTextLabel_property_meta_underlined: -- :ref:`bool` **meta_underlined** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------+ -| *Setter* | set_meta_underline(value) | -+-----------+---------------------------+ -| *Getter* | is_meta_underlined() | -+-----------+---------------------------+ +:ref:`bool` **meta_underlined** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_meta_underline** **(** :ref:`bool` value **)** +- :ref:`bool` **is_meta_underlined** **(** **)** If ``true``, the label underlines meta tags such as ``[url]{text}[/url]``. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_progress_bar_delay: -- :ref:`int` **progress_bar_delay** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1000`` | -+-----------+-------------------------------+ -| *Setter* | set_progress_bar_delay(value) | -+-----------+-------------------------------+ -| *Getter* | get_progress_bar_delay() | -+-----------+-------------------------------+ +:ref:`int` **progress_bar_delay** = ``1000`` + +.. rst-class:: classref-property-setget + +- void **set_progress_bar_delay** **(** :ref:`int` value **)** +- :ref:`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. \ **Note:** Progress bar is displayed only if :ref:`threaded` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_scroll_active: -- :ref:`bool` **scroll_active** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_scroll_active(value) | -+-----------+--------------------------+ -| *Getter* | is_scroll_active() | -+-----------+--------------------------+ +:ref:`bool` **scroll_active** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_active** **(** :ref:`bool` value **)** +- :ref:`bool` **is_scroll_active** **(** **)** If ``true``, the scrollbar is visible. Setting this to ``false`` does not block scrolling completely. See :ref:`scroll_to_line`. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_scroll_following: -- :ref:`bool` **scroll_following** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_scroll_follow(value) | -+-----------+--------------------------+ -| *Getter* | is_scroll_following() | -+-----------+--------------------------+ +:ref:`bool` **scroll_following** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_follow** **(** :ref:`bool` value **)** +- :ref:`bool` **is_scroll_following** **(** **)** If ``true``, the window scrolls down to display new content automatically. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_selection_enabled: -- :ref:`bool` **selection_enabled** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_selection_enabled(value) | -+-----------+------------------------------+ -| *Getter* | is_selection_enabled() | -+-----------+------------------------------+ +:ref:`bool` **selection_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_selection_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_selection_enabled** **(** **)** If ``true``, the label allows text selection. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_shortcut_keys_enabled: -- :ref:`bool` **shortcut_keys_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_shortcut_keys_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_shortcut_keys_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **shortcut_keys_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_shortcut_keys_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shortcut_keys_enabled** **(** **)** If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_structured_text_bidi_override(value) | -+-----------+------------------------------------------+ -| *Getter* | get_structured_text_bidi_override() | -+-----------+------------------------------------------+ +:ref:`StructuredTextParser` **structured_text_bidi_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser` value **)** +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** **)** Set BiDi algorithm override for the structured text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_structured_text_bidi_override_options: -- :ref:`Array` **structured_text_bidi_override_options** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``[]`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_structured_text_bidi_override_options(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_structured_text_bidi_override_options() | -+-----------+--------------------------------------------------+ +:ref:`Array` **structured_text_bidi_override_options** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override_options** **(** :ref:`Array` value **)** +- :ref:`Array` **get_structured_text_bidi_override_options** **(** **)** Set additional options for BiDi override. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_tab_size: -- :ref:`int` **tab_size** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``4`` | -+-----------+---------------------+ -| *Setter* | set_tab_size(value) | -+-----------+---------------------+ -| *Getter* | get_tab_size() | -+-----------+---------------------+ +:ref:`int` **tab_size** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_tab_size** **(** :ref:`int` value **)** +- :ref:`int` **get_tab_size** **(** **)** The number of spaces associated with a single tab length. Does not affect ``\t`` in text tags, only indent tags. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`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` 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` 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 + ---- .. _class_RichTextLabel_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_threaded: -- :ref:`bool` **threaded** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_threaded(value) | -+-----------+---------------------+ -| *Getter* | is_threaded() | -+-----------+---------------------+ +:ref:`bool` **threaded** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_threaded** **(** :ref:`bool` value **)** +- :ref:`bool` **is_threaded** **(** **)** If ``true``, text processing is done in a background thread. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_visible_characters: -- :ref:`int` **visible_characters** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``-1`` | -+-----------+-------------------------------+ -| *Setter* | set_visible_characters(value) | -+-----------+-------------------------------+ -| *Getter* | get_visible_characters() | -+-----------+-------------------------------+ +:ref:`int` **visible_characters** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_visible_characters** **(** :ref:`int` value **)** +- :ref:`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. \ **Note:** Setting this property updates :ref:`visible_ratio` accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_visible_characters_behavior: -- :ref:`VisibleCharactersBehavior` **visible_characters_behavior** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------------+ -| *Setter* | set_visible_characters_behavior(value) | -+-----------+----------------------------------------+ -| *Getter* | get_visible_characters_behavior() | -+-----------+----------------------------------------+ +:ref:`VisibleCharactersBehavior` **visible_characters_behavior** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_visible_characters_behavior** **(** :ref:`VisibleCharactersBehavior` value **)** +- :ref:`VisibleCharactersBehavior` **get_visible_characters_behavior** **(** **)** Sets the clipping behavior when :ref:`visible_characters` or :ref:`visible_ratio` is set. See :ref:`VisibleCharactersBehavior` for more info. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_property_visible_ratio: -- :ref:`float` **visible_ratio** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_visible_ratio(value) | -+-----------+--------------------------+ -| *Getter* | get_visible_ratio() | -+-----------+--------------------------+ +:ref:`float` **visible_ratio** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_visible_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_visible_ratio** **(** **)** The fraction of characters to display, relative to the total number of characters (see :ref:`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. \ **Note:** Setting this property updates :ref:`visible_characters` accordingly. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RichTextLabel_method_add_image: -- void **add_image** **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** +.. rst-class:: classref-method + +void **add_image** **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** 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. @@ -841,505 +1053,753 @@ 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. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_add_text: -- void **add_text** **(** :ref:`String` text **)** +.. rst-class:: classref-method + +void **add_text** **(** :ref:`String` text **)** Adds raw non-BBCode-parsed text to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_append_text: -- void **append_text** **(** :ref:`String` bbcode **)** +.. rst-class:: classref-method + +void **append_text** **(** :ref:`String` bbcode **)** Parses ``bbcode`` and adds tags to the tag stack as needed. \ **Note:** Using this method, you can't close a tag that was opened in a previous :ref:`append_text` call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the :ref:`text` instead of using :ref:`append_text`. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the tag stack and sets :ref:`text` to an empty string. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_deselect: -- void **deselect** **(** **)** +.. rst-class:: classref-method + +void **deselect** **(** **)** Clears the current selection. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_character_line: -- :ref:`int` **get_character_line** **(** :ref:`int` character **)** +.. rst-class:: classref-method + +:ref:`int` **get_character_line** **(** :ref:`int` character **)** Returns the line number of the character position provided. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_character_paragraph: -- :ref:`int` **get_character_paragraph** **(** :ref:`int` character **)** +.. rst-class:: classref-method + +:ref:`int` **get_character_paragraph** **(** :ref:`int` character **)** Returns the paragraph number of the character position provided. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_content_height: -- :ref:`int` **get_content_height** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_content_height** **(** **)** |const| Returns the height of the content. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_content_width: -- :ref:`int` **get_content_width** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_content_width** **(** **)** |const| Returns the width of the content. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_line_count: -- :ref:`int` **get_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_count** **(** **)** |const| Returns the total number of lines in the text. Wrapped text is counted as multiple lines. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_line_offset: -- :ref:`float` **get_line_offset** **(** :ref:`int` line **)** +.. rst-class:: classref-method + +:ref:`float` **get_line_offset** **(** :ref:`int` line **)** Returns the vertical offset of the line found at the provided index. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_menu: -- :ref:`PopupMenu` **get_menu** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`PopupMenu` of this ``RichTextLabel``. By default, this menu is displayed when right-clicking on the ``RichTextLabel``. +:ref:`PopupMenu` **get_menu** **(** **)** |const| + +Returns the :ref:`PopupMenu` of this **RichTextLabel**. By default, this menu is displayed when right-clicking on the **RichTextLabel**. \ **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:`Window.visible` property. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_paragraph_count: -- :ref:`int` **get_paragraph_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_paragraph_count** **(** **)** |const| Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack's text tags). Considers wrapped text as one paragraph. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_paragraph_offset: -- :ref:`float` **get_paragraph_offset** **(** :ref:`int` paragraph **)** +.. rst-class:: classref-method + +:ref:`float` **get_paragraph_offset** **(** :ref:`int` paragraph **)** Returns the vertical offset of the paragraph found at the provided index. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_parsed_text: -- :ref:`String` **get_parsed_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_parsed_text** **(** **)** |const| Returns the text without BBCode mark-up. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_selected_text: -- :ref:`String` **get_selected_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_selected_text** **(** **)** |const| Returns the current selection text. Does not include BBCodes. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_selection_from: -- :ref:`int` **get_selection_from** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_from** **(** **)** |const| Returns the current selection first character index if a selection is active, ``-1`` otherwise. Does not include BBCodes. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_selection_to: -- :ref:`int` **get_selection_to** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_to** **(** **)** |const| Returns the current selection last character index if a selection is active, ``-1`` otherwise. Does not include BBCodes. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_total_character_count: -- :ref:`int` **get_total_character_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_total_character_count** **(** **)** |const| Returns the total number of characters from text tags. Does not include BBCodes. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_v_scroll_bar: -- :ref:`VScrollBar` **get_v_scroll_bar** **(** **)** +.. rst-class:: classref-method + +:ref:`VScrollBar` **get_v_scroll_bar** **(** **)** Returns the vertical scrollbar. \ **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` property. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_visible_line_count: -- :ref:`int` **get_visible_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_visible_line_count** **(** **)** |const| Returns the number of visible lines. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_get_visible_paragraph_count: -- :ref:`int` **get_visible_paragraph_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_visible_paragraph_count** **(** **)** |const| Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_install_effect: -- void **install_effect** **(** :ref:`Variant` effect **)** +.. rst-class:: classref-method + +void **install_effect** **(** :ref:`Variant` effect **)** Installs a custom effect. ``effect`` should be a valid :ref:`RichTextEffect`. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_is_menu_visible: -- :ref:`bool` **is_menu_visible** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_menu_visible** **(** **)** |const| Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_is_ready: -- :ref:`bool` **is_ready** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_ready** **(** **)** |const| If :ref:`threaded` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_newline: -- void **newline** **(** **)** +.. rst-class:: classref-method + +void **newline** **(** **)** Adds a newline tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_parse_bbcode: -- void **parse_bbcode** **(** :ref:`String` bbcode **)** +.. rst-class:: classref-method + +void **parse_bbcode** **(** :ref:`String` bbcode **)** The assignment version of :ref:`append_text`. Clears the tag stack and inserts the new content. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_parse_expressions_for_values: -- :ref:`Dictionary` **parse_expressions_for_values** **(** :ref:`PackedStringArray` expressions **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **parse_expressions_for_values** **(** :ref:`PackedStringArray` expressions **)** Parses BBCode parameter ``expressions`` into a dictionary. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_pop: -- void **pop** **(** **)** +.. rst-class:: classref-method + +void **pop** **(** **)** Terminates the current tag. Use after ``push_*`` methods to close BBCodes manually. Does not need to follow ``add_*`` methods. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_bgcolor: -- void **push_bgcolor** **(** :ref:`Color` bgcolor **)** +.. rst-class:: classref-method + +void **push_bgcolor** **(** :ref:`Color` bgcolor **)** Adds a ``[bgcolor]`` tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_bold: -- void **push_bold** **(** **)** +.. rst-class:: classref-method + +void **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. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_bold_italics: -- void **push_bold_italics** **(** **)** +.. rst-class:: classref-method + +void **push_bold_italics** **(** **)** Adds a ``[font]`` tag with a bold italics font to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_cell: -- void **push_cell** **(** **)** +.. rst-class:: classref-method + +void **push_cell** **(** **)** Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :ref:`push_table` for details. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_color: -- void **push_color** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **push_color** **(** :ref:`Color` color **)** Adds a ``[color]`` tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_dropcap: -- void **push_dropcap** **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** +.. rst-class:: classref-method + +void **push_dropcap** **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_fgcolor: -- void **push_fgcolor** **(** :ref:`Color` fgcolor **)** +.. rst-class:: classref-method + +void **push_fgcolor** **(** :ref:`Color` fgcolor **)** Adds a ``[fgcolor]`` tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_font: -- void **push_font** **(** :ref:`Font` font, :ref:`int` font_size **)** +.. rst-class:: classref-method + +void **push_font** **(** :ref:`Font` font, :ref:`int` font_size **)** Adds a ``[font]`` tag to the tag stack. Overrides default fonts for its duration. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_font_size: -- void **push_font_size** **(** :ref:`int` font_size **)** +.. rst-class:: classref-method + +void **push_font_size** **(** :ref:`int` font_size **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_hint: -- void **push_hint** **(** :ref:`String` description **)** +.. rst-class:: classref-method + +void **push_hint** **(** :ref:`String` description **)** Adds a ``[hint]`` tag to the tag stack. Same as BBCode ``[hint=something]{text}[/hint]``. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_indent: -- void **push_indent** **(** :ref:`int` level **)** +.. rst-class:: classref-method + +void **push_indent** **(** :ref:`int` level **)** Adds an ``[indent]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size` to determine new margin length. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_italics: -- void **push_italics** **(** **)** +.. rst-class:: classref-method + +void **push_italics** **(** **)** Adds a ``[font]`` tag with a italics font to the tag stack. This is the same as adding a ``[i]`` tag if not currently in a ``[b]`` tag. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_list: -- void **push_list** **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** +.. rst-class:: classref-method + +void **push_list** **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** Adds ``[ol]`` or ``[ul]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size` to determine new margin length. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_meta: -- void **push_meta** **(** :ref:`Variant` data **)** +.. rst-class:: classref-method + +void **push_meta** **(** :ref:`Variant` data **)** Adds a ``[meta]`` tag to the tag stack. Similar to the BBCode ``[url=something]{text}[/url]``, but supports non-:ref:`String` metadata types. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_mono: -- void **push_mono** **(** **)** +.. rst-class:: classref-method + +void **push_mono** **(** **)** Adds a ``[font]`` tag with a monospace font to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_normal: -- void **push_normal** **(** **)** +.. rst-class:: classref-method + +void **push_normal** **(** **)** Adds a ``[font]`` tag with a normal font to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_outline_color: -- void **push_outline_color** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **push_outline_color** **(** :ref:`Color` color **)** Adds a ``[outline_color]`` tag to the tag stack. Adds text outline for its duration. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_outline_size: -- void **push_outline_size** **(** :ref:`int` outline_size **)** +.. rst-class:: classref-method + +void **push_outline_size** **(** :ref:`int` outline_size **)** Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline size for its duration. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_paragraph: -- void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** +.. rst-class:: classref-method + +void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** Adds a ``[p]`` tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_strikethrough: -- void **push_strikethrough** **(** **)** +.. rst-class:: classref-method + +void **push_strikethrough** **(** **)** Adds a ``[s]`` tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_table: -- void **push_table** **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0 **)** +.. rst-class:: classref-method + +void **push_table** **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0 **)** Adds a ``[table=columns,inline_align]`` tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_push_underline: -- void **push_underline** **(** **)** +.. rst-class:: classref-method + +void **push_underline** **(** **)** Adds a ``[u]`` tag to the tag stack. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_remove_line: -- :ref:`bool` **remove_line** **(** :ref:`int` line **)** +.. rst-class:: classref-method + +:ref:`bool` **remove_line** **(** :ref:`int` line **)** Removes a line of content from the label. Returns ``true`` if the line exists. The ``line`` argument is the index of the line to remove, it can take values in the interval ``[0, get_line_count() - 1]``. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_scroll_to_line: -- void **scroll_to_line** **(** :ref:`int` line **)** +.. rst-class:: classref-method + +void **scroll_to_line** **(** :ref:`int` line **)** Scrolls the window's top line to match ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_scroll_to_paragraph: -- void **scroll_to_paragraph** **(** :ref:`int` paragraph **)** +.. rst-class:: classref-method + +void **scroll_to_paragraph** **(** :ref:`int` paragraph **)** Scrolls the window's top line to match first line of the ``paragraph``. +.. rst-class:: classref-item-separator + +---- + +.. _class_RichTextLabel_method_scroll_to_selection: + +.. rst-class:: classref-method + +void **scroll_to_selection** **(** **)** + +Scrolls to the beginning of the current selection. + +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_select_all: -- void **select_all** **(** **)** +.. rst-class:: classref-method + +void **select_all** **(** **)** Select all the text. If :ref:`selection_enabled` is ``false``, no selection will occur. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_set_cell_border_color: -- void **set_cell_border_color** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_cell_border_color** **(** :ref:`Color` color **)** Sets color of a table cell border. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_set_cell_padding: -- void **set_cell_padding** **(** :ref:`Rect2` padding **)** +.. rst-class:: classref-method + +void **set_cell_padding** **(** :ref:`Rect2` padding **)** Sets inner padding of a table cell. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_set_cell_row_background_color: -- void **set_cell_row_background_color** **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** +.. rst-class:: classref-method + +void **set_cell_row_background_color** **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** Sets color of a table cell. Separate colors for alternating rows can be specified. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_set_cell_size_override: -- void **set_cell_size_override** **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** +.. rst-class:: classref-method + +void **set_cell_size_override** **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** Sets minimum and maximum size overrides for a table cell. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_method_set_table_column_expand: -- void **set_table_column_expand** **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** +.. rst-class:: classref-method + +void **set_table_column_expand** **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** 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. @@ -1347,306 +1807,358 @@ 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-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_RichTextLabel_theme_color_default_color: -- :ref:`Color` **default_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **default_color** = ``Color(1, 1, 1, 1)`` The default text color. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` The default tint of text outline. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **font_selected_color** = ``Color(0, 0, 0, 0)`` The color of selected text, used when :ref:`selection_enabled` is ``true``. If equal to ``Color(0, 0, 0, 0)``, it will be ignored. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_color_font_shadow_color: -- :ref:`Color` **font_shadow_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **font_shadow_color** = ``Color(0, 0, 0, 0)`` The color of the font's shadow. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_color_selection_color: -- :ref:`Color` **selection_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.1, 0.1, 1, 0.8)`` | -+-----------+-----------------------------+ +:ref:`Color` **selection_color** = ``Color(0.1, 0.1, 1, 0.8)`` The color of the selection box. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_color_table_border: -- :ref:`Color` **table_border** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **table_border** = ``Color(0, 0, 0, 0)`` The default cell border color. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_color_table_even_row_bg: -- :ref:`Color` **table_even_row_bg** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **table_even_row_bg** = ``Color(0, 0, 0, 0)`` The default background color for even rows. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_color_table_odd_row_bg: -- :ref:`Color` **table_odd_row_bg** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **table_odd_row_bg** = ``Color(0, 0, 0, 0)`` The default background color for odd rows. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_line_separation: -- :ref:`int` **line_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **line_separation** = ``0`` The vertical space between lines. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_shadow_offset_x: -- :ref:`int` **shadow_offset_x** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **shadow_offset_x** = ``1`` The horizontal offset of the font's shadow. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_shadow_offset_y: -- :ref:`int` **shadow_offset_y** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **shadow_offset_y** = ``1`` The vertical offset of the font's shadow. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_shadow_outline_size: -- :ref:`int` **shadow_outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **shadow_outline_size** = ``1`` The size of the shadow outline. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_table_h_separation: -- :ref:`int` **table_h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **table_h_separation** = ``3`` The horizontal separation of elements in a table. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_table_v_separation: -- :ref:`int` **table_v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **table_v_separation** = ``3`` The vertical separation of elements in a table. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_text_highlight_h_padding: -- :ref:`int` **text_highlight_h_padding** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **text_highlight_h_padding** = ``3`` The horizontal padding around a highlighting and background color box. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_constant_text_highlight_v_padding: -- :ref:`int` **text_highlight_v_padding** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``3`` | -+-----------+-------+ +:ref:`int` **text_highlight_v_padding** = ``3`` The vertical padding around a highlighting and background color box. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_bold_font: -- :ref:`Font` **bold_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **bold_font** The font used for bold text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_bold_italics_font: -- :ref:`Font` **bold_italics_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **bold_italics_font** The font used for bold italics text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_italics_font: -- :ref:`Font` **italics_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **italics_font** The font used for italics text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_mono_font: -- :ref:`Font` **mono_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **mono_font** The font used for monospace text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_normal_font: -- :ref:`Font` **normal_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **normal_font** The default text font. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_size_bold_font_size: -- :ref:`int` **bold_font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **bold_font_size** The font size used for bold text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_size_bold_italics_font_size: -- :ref:`int` **bold_italics_font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **bold_italics_font_size** The font size used for bold italics text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_size_italics_font_size: -- :ref:`int` **italics_font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **italics_font_size** The font size used for italics text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_size_mono_font_size: -- :ref:`int` **mono_font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **mono_font_size** The font size used for monospace text. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_font_size_normal_font_size: -- :ref:`int` **normal_font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **normal_font_size** The default text font size. +.. rst-class:: classref-item-separator + ---- .. _class_RichTextLabel_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -The background used when the ``RichTextLabel`` 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` **focus** + +The background used when the **RichTextLabel** 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_RichTextLabel_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -The normal background for the ``RichTextLabel``. +:ref:`StyleBox` **normal** + +The normal background for the **RichTextLabel**. .. |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.)` diff --git a/classes/class_rid.rst b/classes/class_rid.rst index f838b65aa..337316d48 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -12,138 +12,197 @@ RID Handle for a :ref:`Resource`'s unique ID. +.. rst-class:: classref-introduction-group + Description ----------- -The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`RenderingServer`. +The RID :ref:`Variant` type is used to access a low-level resource by its unique ID. RIDs are opaque, which means they do not grant access to the resource by themselves. They are used by the low-level server classes, such as :ref:`DisplayServer`, :ref:`RenderingServer`, :ref:`TextServer`, etc. + +A low-level resource may correspond to a high-level :ref:`Resource`, such as :ref:`Texture` or :ref:`Mesh`. + +.. rst-class:: classref-reftable-group Constructors ------------ -+-----------------------+------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`RID` **(** **)** | -+-----------------------+------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`RID` **(** :ref:`RID` from **)** | -+-----------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`RID` **(** **)** | + +-----------------------+------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`RID` **(** :ref:`RID` from **)** | + +-----------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+----------------------------------------------------------------+ -| :ref:`int` | :ref:`get_id` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------+ + | :ref:`int` | :ref:`get_id` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`RID` right **)** | -+-------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`RID` right **)** | -+-------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`RID` right **)** | -+-------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`RID` right **)** | -+-------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`RID` right **)** | -+-------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`RID` right **)** | -+-------------------------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`RID` right **)** | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`RID` right **)** | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`RID` right **)** | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`RID` right **)** | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`RID` right **)** | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`RID` right **)** | + +-------------------------+-----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_RID_constructor_RID: -- :ref:`RID` **RID** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``RID`` with the invalid ID ``0``. +:ref:`RID` **RID** **(** **)** + +Constructs an empty **RID** with the invalid ID ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`RID` **RID** **(** :ref:`RID` from **)** +.. rst-class:: classref-constructor -Constructs a ``RID`` as a copy of the given ``RID``. +:ref:`RID` **RID** **(** :ref:`RID` from **)** + +Constructs a **RID** as a copy of the given **RID**. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_RID_method_get_id: -- :ref:`int` **get_id** **(** **)** |const| +.. rst-class:: classref-method -Returns the ID of the referenced resource. +:ref:`int` **get_id** **(** **)** |const| + +Returns the ID of the referenced low-level resource. + +.. rst-class:: classref-item-separator ---- .. _class_RID_method_is_valid: -- :ref:`bool` **is_valid** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if ``RID`` is valid. +:ref:`bool` **is_valid** **(** **)** |const| + +Returns ``true`` if the **RID** is not ``0``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_RID_operator_neq_bool: +.. _class_RID_operator_neq_RID: -- :ref:`bool` **operator !=** **(** :ref:`RID` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator !=** **(** :ref:`RID` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the **RID**\ s are not equal. + +.. rst-class:: classref-item-separator ---- -.. _class_RID_operator_lt_bool: +.. _class_RID_operator_lt_RID: -- :ref:`bool` **operator <** **(** :ref:`RID` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator <** **(** :ref:`RID` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the **RID**'s ID is less than ``right``'s ID. + +.. rst-class:: classref-item-separator ---- -.. _class_RID_operator_lte_bool: +.. _class_RID_operator_lte_RID: -- :ref:`bool` **operator <=** **(** :ref:`RID` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator <=** **(** :ref:`RID` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the **RID**'s ID is less than or equal to ``right``'s ID. + +.. rst-class:: classref-item-separator ---- -.. _class_RID_operator_eq_bool: +.. _class_RID_operator_eq_RID: -- :ref:`bool` **operator ==** **(** :ref:`RID` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator ==** **(** :ref:`RID` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if both **RID**\ s are equal, which means they both refer to the same low-level resource. + +.. rst-class:: classref-item-separator ---- -.. _class_RID_operator_gt_bool: +.. _class_RID_operator_gt_RID: -- :ref:`bool` **operator >** **(** :ref:`RID` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator >** **(** :ref:`RID` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the **RID**'s ID is greater than ``right``'s ID. + +.. rst-class:: classref-item-separator ---- -.. _class_RID_operator_gte_bool: +.. _class_RID_operator_gte_RID: -- :ref:`bool` **operator >=** **(** :ref:`RID` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator >=** **(** :ref:`RID` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the **RID**'s ID is greater than or equal to ``right``'s 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.)` diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index 3051063db..765190c88 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -16,6 +16,8 @@ RigidBody2D Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects. +.. rst-class:: classref-introduction-group + Description ----------- @@ -29,6 +31,8 @@ Please also keep in mind that physics bodies manage their own transform which ov If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See :ref:`custom_integrator`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,114 +40,140 @@ Tutorials - `Instancing Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`angular_damp` | ``0.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`angular_velocity` | ``0.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`can_sleep` | ``true`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`center_of_mass` | ``Vector2(0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`constant_force` | ``Vector2(0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`constant_torque` | ``0.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`contact_monitor` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`CCDMode` | :ref:`continuous_cd` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`custom_integrator` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`freeze` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`gravity_scale` | ``1.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`inertia` | ``0.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`linear_damp` | ``0.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`linear_velocity` | ``Vector2(0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`lock_rotation` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`mass` | ``1.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`max_contacts_reported` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`sleeping` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`angular_damp` | ``0.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`angular_velocity` | ``0.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`can_sleep` | ``true`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`center_of_mass` | ``Vector2(0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`constant_force` | ``Vector2(0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`constant_torque` | ``0.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`contact_monitor` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`CCDMode` | :ref:`continuous_cd` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`custom_integrator` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`freeze` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`gravity_scale` | ``1.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`inertia` | ``0.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`linear_damp` | ``0.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`linear_velocity` | ``Vector2(0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`lock_rotation` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`mass` | ``1.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`max_contacts_reported` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`sleeping` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_central_force` **(** :ref:`Vector2` force **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_torque` **(** :ref:`float` torque **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_force` **(** :ref:`Vector2` force **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_impulse` **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque` **(** :ref:`float` torque **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque_impulse` **(** :ref:`float` torque **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node2D[]` | :ref:`get_colliding_bodies` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_axis_velocity` **(** :ref:`Vector2` axis_velocity **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_central_force` **(** :ref:`Vector2` force **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_torque` **(** :ref:`float` torque **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_force` **(** :ref:`Vector2` force **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_impulse` **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque` **(** :ref:`float` torque **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque_impulse` **(** :ref:`float` torque **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node2D[]` | :ref:`get_colliding_bodies` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_axis_velocity` **(** :ref:`Vector2` axis_velocity **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_RigidBody2D_signal_body_entered: -- **body_entered** **(** :ref:`Node` body **)** +.. rst-class:: classref-signal + +**body_entered** **(** :ref:`Node` body **)** Emitted when a collision with another :ref:`PhysicsBody2D` or :ref:`TileMap` occurs. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_signal_body_exited: -- **body_exited** **(** :ref:`Node` body **)** +.. rst-class:: classref-signal + +**body_exited** **(** :ref:`Node` body **)** Emitted when the collision with another :ref:`PhysicsBody2D` or :ref:`TileMap` ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_signal_body_shape_entered: -- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when one of this RigidBody2D's :ref:`Shape2D`\ s collides with another :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. @@ -155,11 +185,15 @@ Emitted when one of this RigidBody2D's :ref:`Shape2D`\ s collides \ ``local_shape_index`` the index of the :ref:`Shape2D` of this RigidBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_signal_body_shape_exited: -- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when the collision between one of this RigidBody2D's :ref:`Shape2D`\ s and another :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. @@ -171,279 +205,355 @@ Emitted when the collision between one of this RigidBody2D's :ref:`Shape2D` of this RigidBody2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_signal_sleeping_state_changed: -- **sleeping_state_changed** **(** **)** +.. rst-class:: classref-signal + +**sleeping_state_changed** **(** **)** Emitted when the physics engine changes the body's sleeping state. \ **Note:** Changing the value :ref:`sleeping` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or ``emit_signal("sleeping_state_changed")`` is used. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_RigidBody2D_FreezeMode: -.. _class_RigidBody2D_constant_FREEZE_MODE_STATIC: - -.. _class_RigidBody2D_constant_FREEZE_MODE_KINEMATIC: +.. rst-class:: classref-enumeration enum **FreezeMode**: -- **FREEZE_MODE_STATIC** = **0** --- Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. +.. _class_RigidBody2D_constant_FREEZE_MODE_STATIC: -- **FREEZE_MODE_KINEMATIC** = **1** --- Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. +.. rst-class:: classref-enumeration-constant + +:ref:`FreezeMode` **FREEZE_MODE_STATIC** = ``0`` + +Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. + +.. _class_RigidBody2D_constant_FREEZE_MODE_KINEMATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`FreezeMode` **FREEZE_MODE_KINEMATIC** = ``1`` + +Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. + +.. rst-class:: classref-item-separator ---- .. _enum_RigidBody2D_CenterOfMassMode: -.. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_AUTO: - -.. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_CUSTOM: +.. rst-class:: classref-enumeration enum **CenterOfMassMode**: -- **CENTER_OF_MASS_MODE_AUTO** = **0** --- In this mode, the body's center of mass is calculated automatically based on its shapes. +.. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_AUTO: -- **CENTER_OF_MASS_MODE_CUSTOM** = **1** --- In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. +.. rst-class:: classref-enumeration-constant + +:ref:`CenterOfMassMode` **CENTER_OF_MASS_MODE_AUTO** = ``0`` + +In this mode, the body's center of mass is calculated automatically based on its shapes. + +.. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CenterOfMassMode` **CENTER_OF_MASS_MODE_CUSTOM** = ``1`` + +In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. + +.. rst-class:: classref-item-separator ---- .. _enum_RigidBody2D_DampMode: -.. _class_RigidBody2D_constant_DAMP_MODE_COMBINE: - -.. _class_RigidBody2D_constant_DAMP_MODE_REPLACE: +.. rst-class:: classref-enumeration enum **DampMode**: -- **DAMP_MODE_COMBINE** = **0** --- In this mode, the body's damping value is added to any value set in areas or the default value. +.. _class_RigidBody2D_constant_DAMP_MODE_COMBINE: -- **DAMP_MODE_REPLACE** = **1** --- In this mode, the body's damping value replaces any value set in areas or the default value. +.. rst-class:: classref-enumeration-constant + +:ref:`DampMode` **DAMP_MODE_COMBINE** = ``0`` + +In this mode, the body's damping value is added to any value set in areas or the default value. + +.. _class_RigidBody2D_constant_DAMP_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DampMode` **DAMP_MODE_REPLACE** = ``1`` + +In this mode, the body's damping value replaces any value set in areas or the default value. + +.. rst-class:: classref-item-separator ---- .. _enum_RigidBody2D_CCDMode: -.. _class_RigidBody2D_constant_CCD_MODE_DISABLED: - -.. _class_RigidBody2D_constant_CCD_MODE_CAST_RAY: - -.. _class_RigidBody2D_constant_CCD_MODE_CAST_SHAPE: +.. rst-class:: classref-enumeration enum **CCDMode**: -- **CCD_MODE_DISABLED** = **0** --- Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. +.. _class_RigidBody2D_constant_CCD_MODE_DISABLED: -- **CCD_MODE_CAST_RAY** = **1** --- Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. +.. rst-class:: classref-enumeration-constant -- **CCD_MODE_CAST_SHAPE** = **2** --- Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. +:ref:`CCDMode` **CCD_MODE_DISABLED** = ``0`` + +Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + +.. _class_RigidBody2D_constant_CCD_MODE_CAST_RAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CCDMode` **CCD_MODE_CAST_RAY** = ``1`` + +Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. + +.. _class_RigidBody2D_constant_CCD_MODE_CAST_SHAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CCDMode` **CCD_MODE_CAST_SHAPE** = ``2`` + +Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RigidBody2D_property_angular_damp: -- :ref:`float` **angular_damp** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_angular_damp(value) | -+-----------+-------------------------+ -| *Getter* | get_angular_damp() | -+-----------+-------------------------+ +:ref:`float` **angular_damp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp** **(** :ref:`float` value **)** +- :ref:`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` the body is in. Depending on :ref:`angular_damp_mode`, you can set :ref:`angular_damp` to be added to or to replace the body's damping value. See :ref:`ProjectSettings.physics/2d/default_angular_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_angular_damp_mode: -- :ref:`DampMode` **angular_damp_mode** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_angular_damp_mode(value) | -+-----------+------------------------------+ -| *Getter* | get_angular_damp_mode() | -+-----------+------------------------------+ +:ref:`DampMode` **angular_damp_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp_mode** **(** :ref:`DampMode` value **)** +- :ref:`DampMode` **get_angular_damp_mode** **(** **)** Defines how :ref:`angular_damp` is applied. See :ref:`DampMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_angular_velocity: -- :ref:`float` **angular_velocity** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+-----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+-----------+-----------------------------+ +:ref:`float` **angular_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_velocity** **(** :ref:`float` value **)** +- :ref:`float` **get_angular_velocity** **(** **)** The body's rotational velocity in *radians* per second. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_can_sleep: -- :ref:`bool` **can_sleep** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_can_sleep(value) | -+-----------+----------------------+ -| *Getter* | is_able_to_sleep() | -+-----------+----------------------+ +:ref:`bool` **can_sleep** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_can_sleep** **(** :ref:`bool` value **)** +- :ref:`bool` **is_able_to_sleep** **(** **)** If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_center_of_mass: -- :ref:`Vector2` **center_of_mass** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_center_of_mass(value) | -+-----------+---------------------------+ -| *Getter* | get_center_of_mass() | -+-----------+---------------------------+ +:ref:`Vector2` **center_of_mass** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_center_of_mass** **(** :ref:`Vector2` value **)** +- :ref:`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` is set to :ref:`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. When :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_AUTO` (default value), the center of mass is automatically computed. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_center_of_mass_mode: -- :ref:`CenterOfMassMode` **center_of_mass_mode** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_center_of_mass_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_center_of_mass_mode() | -+-----------+--------------------------------+ +:ref:`CenterOfMassMode` **center_of_mass_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_center_of_mass_mode** **(** :ref:`CenterOfMassMode` value **)** +- :ref:`CenterOfMassMode` **get_center_of_mass_mode** **(** **)** Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_constant_force: -- :ref:`Vector2` **constant_force** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_constant_force(value) | -+-----------+---------------------------+ -| *Getter* | get_constant_force() | -+-----------+---------------------------+ +:ref:`Vector2` **constant_force** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant_force** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_constant_force** **(** **)** The body's total constant positional forces applied during each physics update. See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_constant_torque: -- :ref:`float` **constant_torque** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------+ -| *Setter* | set_constant_torque(value) | -+-----------+----------------------------+ -| *Getter* | get_constant_torque() | -+-----------+----------------------------+ +:ref:`float` **constant_torque** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_constant_torque** **(** :ref:`float` value **)** +- :ref:`float` **get_constant_torque** **(** **)** The body's total constant rotational forces applied during each physics update. See :ref:`add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_contact_monitor: -- :ref:`bool` **contact_monitor** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_contact_monitor(value) | -+-----------+------------------------------+ -| *Getter* | is_contact_monitor_enabled() | -+-----------+------------------------------+ +:ref:`bool` **contact_monitor** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_contact_monitor** **(** :ref:`bool` value **)** +- :ref:`bool` **is_contact_monitor_enabled** **(** **)** If ``true``, the RigidBody2D will emit signals when it collides with another RigidBody2D. \ **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see :ref:`max_contacts_reported`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_continuous_cd: -- :ref:`CCDMode` **continuous_cd** +.. rst-class:: classref-property -+-----------+------------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------------+ -| *Setter* | set_continuous_collision_detection_mode(value) | -+-----------+------------------------------------------------+ -| *Getter* | get_continuous_collision_detection_mode() | -+-----------+------------------------------------------------+ +:ref:`CCDMode` **continuous_cd** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_continuous_collision_detection_mode** **(** :ref:`CCDMode` value **)** +- :ref:`CCDMode` **get_continuous_collision_detection_mode** **(** **)** Continuous collision detection mode. Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See :ref:`CCDMode` for details. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_custom_integrator: -- :ref:`bool` **custom_integrator** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_custom_integrator(value) | -+-----------+----------------------------------+ -| *Getter* | is_using_custom_integrator() | -+-----------+----------------------------------+ +:ref:`bool` **custom_integrator** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_custom_integrator** **(** :ref:`bool` value **)** +- :ref:`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` function. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_freeze: -- :ref:`bool` **freeze** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_freeze_enabled(value) | -+-----------+---------------------------+ -| *Getter* | is_freeze_enabled() | -+-----------+---------------------------+ +:ref:`bool` **freeze** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_freeze_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_freeze_enabled** **(** **)** If ``true``, the body is frozen. Gravity and forces are not applied anymore. @@ -451,242 +561,283 @@ See :ref:`freeze_mode` to set the body's For a body that is always frozen, use :ref:`StaticBody2D` or :ref:`AnimatableBody2D` instead. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_freeze_mode: -- :ref:`FreezeMode` **freeze_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_freeze_mode(value) | -+-----------+------------------------+ -| *Getter* | get_freeze_mode() | -+-----------+------------------------+ +:ref:`FreezeMode` **freeze_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_freeze_mode** **(** :ref:`FreezeMode` value **)** +- :ref:`FreezeMode` **get_freeze_mode** **(** **)** The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze` is enabled. See :ref:`FreezeMode` for possible values. For a body that is always frozen, use :ref:`StaticBody2D` or :ref:`AnimatableBody2D` instead. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_gravity_scale: -- :ref:`float` **gravity_scale** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_gravity_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_gravity_scale() | -+-----------+--------------------------+ +:ref:`float` **gravity_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_scale** **(** :ref:`float` value **)** +- :ref:`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`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_inertia: -- :ref:`float` **inertia** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------+ -| *Setter* | set_inertia(value) | -+-----------+--------------------+ -| *Getter* | get_inertia() | -+-----------+--------------------+ +:ref:`float` **inertia** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_inertia** **(** :ref:`float` value **)** +- :ref:`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. If set to ``0``, inertia is automatically computed (default value). +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_linear_damp: -- :ref:`float` **linear_damp** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_linear_damp(value) | -+-----------+------------------------+ -| *Getter* | get_linear_damp() | -+-----------+------------------------+ +:ref:`float` **linear_damp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp** **(** :ref:`float` value **)** +- :ref:`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` the body is in. Depending on :ref:`linear_damp_mode`, you can set :ref:`linear_damp` to be added to or to replace the body's damping value. See :ref:`ProjectSettings.physics/2d/default_linear_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_linear_damp_mode: -- :ref:`DampMode` **linear_damp_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_linear_damp_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_linear_damp_mode() | -+-----------+-----------------------------+ +:ref:`DampMode` **linear_damp_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp_mode** **(** :ref:`DampMode` value **)** +- :ref:`DampMode` **get_linear_damp_mode** **(** **)** Defines how :ref:`linear_damp` is applied. See :ref:`DampMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_linear_velocity: -- :ref:`Vector2` **linear_velocity** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+-----------+----------------------------+ +:ref:`Vector2` **linear_velocity** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_linear_velocity** **(** :ref:`Vector2` value **)** +- :ref:`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` as your process loop for precise control of the body state. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_lock_rotation: -- :ref:`bool` **lock_rotation** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_lock_rotation_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_lock_rotation_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **lock_rotation** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_lock_rotation_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_lock_rotation_enabled** **(** **)** If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_mass: -- :ref:`float` **mass** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_mass(value) | -+-----------+-----------------+ -| *Getter* | get_mass() | -+-----------+-----------------+ +:ref:`float` **mass** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_mass** **(** :ref:`float` value **)** +- :ref:`float` **get_mass** **(** **)** The body's mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_max_contacts_reported: -- :ref:`int` **max_contacts_reported** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_max_contacts_reported(value) | -+-----------+----------------------------------+ -| *Getter* | get_max_contacts_reported() | -+-----------+----------------------------------+ +:ref:`int` **max_contacts_reported** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_max_contacts_reported** **(** :ref:`int` value **)** +- :ref:`int` **get_max_contacts_reported** **(** **)** The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count` to retrieve the count or :ref:`get_colliding_bodies` to retrieve bodies that have been collided with. \ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_physics_material_override: -- :ref:`PhysicsMaterial` **physics_material_override** +.. rst-class:: classref-property -+----------+--------------------------------------+ -| *Setter* | set_physics_material_override(value) | -+----------+--------------------------------------+ -| *Getter* | get_physics_material_override() | -+----------+--------------------------------------+ +:ref:`PhysicsMaterial` **physics_material_override** + +.. rst-class:: classref-property-setget + +- void **set_physics_material_override** **(** :ref:`PhysicsMaterial` value **)** +- :ref:`PhysicsMaterial` **get_physics_material_override** **(** **)** The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_property_sleeping: -- :ref:`bool` **sleeping** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_sleeping(value) | -+-----------+---------------------+ -| *Getter* | is_sleeping() | -+-----------+---------------------+ +:ref:`bool` **sleeping** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_sleeping** **(** :ref:`bool` value **)** +- :ref:`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` or :ref:`apply_force` methods. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RigidBody2D_method__integrate_forces: -- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| +.. rst-class:: classref-method + +void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| Allows you to read and safely modify the simulation state for the object. Use this instead of :ref:`Node._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` allows you to disable the default behavior and write custom force integration for a body. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_add_constant_central_force: -- void **add_constant_central_force** **(** :ref:`Vector2` force **)** +.. rst-class:: classref-method + +void **add_constant_central_force** **(** :ref:`Vector2` force **)** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_add_constant_force: -- void **add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **add_constant_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_add_constant_torque: -- void **add_constant_torque** **(** :ref:`float` torque **)** +.. rst-class:: classref-method + +void **add_constant_torque** **(** :ref:`float` torque **)** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = 0``. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_apply_central_force: -- void **apply_central_force** **(** :ref:`Vector2` force **)** +.. rst-class:: classref-method + +void **apply_central_force** **(** :ref:`Vector2` force **)** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using :ref:`apply_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_apply_central_impulse: -- void **apply_central_impulse** **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **apply_central_impulse** **(** :ref:`Vector2` impulse=Vector2(0, 0) **)** Applies a directional impulse without affecting rotation. @@ -694,21 +845,29 @@ An impulse is time-independent! Applying an impulse every frame would result in This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_apply_force: -- void **apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **apply_force** **(** :ref:`Vector2` force, :ref:`Vector2` position=Vector2(0, 0) **)** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_apply_impulse: -- void **apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** +.. rst-class:: classref-method + +void **apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vector2` position=Vector2(0, 0) **)** Applies a positioned impulse to the body. @@ -716,21 +875,29 @@ An impulse is time-independent! Applying an impulse every frame would result in \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_apply_torque: -- void **apply_torque** **(** :ref:`float` torque **)** +.. rst-class:: classref-method + +void **apply_torque** **(** :ref:`float` torque **)** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. \ **Note:** :ref:`inertia` is required for this to work. To have :ref:`inertia`, an active :ref:`CollisionShape2D` must be a child of the node, or you can manually set :ref:`inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_apply_torque_impulse: -- void **apply_torque_impulse** **(** :ref:`float` torque **)** +.. rst-class:: classref-method + +void **apply_torque_impulse** **(** :ref:`float` torque **)** Applies a rotational impulse to the body without affecting the position. @@ -738,31 +905,43 @@ An impulse is time-independent! Applying an impulse every frame would result in \ **Note:** :ref:`inertia` is required for this to work. To have :ref:`inertia`, an active :ref:`CollisionShape2D` must be a child of the node, or you can manually set :ref:`inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_get_colliding_bodies: -- :ref:`Node2D[]` **get_colliding_bodies** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node2D[]` **get_colliding_bodies** **(** **)** |const| Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. \ **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_get_contact_count: -- :ref:`int` **get_contact_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_count** **(** **)** |const| 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`). \ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody2D_method_set_axis_velocity: -- void **set_axis_velocity** **(** :ref:`Vector2` axis_velocity **)** +.. rst-class:: classref-method + +void **set_axis_velocity** **(** :ref:`Vector2` 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. diff --git a/classes/class_rigidbody3d.rst b/classes/class_rigidbody3d.rst index bd615a1d7..d8edf6e94 100644 --- a/classes/class_rigidbody3d.rst +++ b/classes/class_rigidbody3d.rst @@ -16,6 +16,8 @@ RigidBody3D Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,6 +29,8 @@ You can switch the body's behavior using :ref:`lock_rotation`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,116 +40,142 @@ Tutorials - `3D Physics Tests Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`angular_damp` | ``0.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`can_sleep` | ``true`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`center_of_mass` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`constant_force` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`constant_torque` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`contact_monitor` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`continuous_cd` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`custom_integrator` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`freeze` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`gravity_scale` | ``1.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`inertia` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`linear_damp` | ``0.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`lock_rotation` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`mass` | ``1.0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`int` | :ref:`max_contacts_reported` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`sleeping` | ``false`` | -+------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`angular_damp` | ``0.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`DampMode` | :ref:`angular_damp_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`can_sleep` | ``true`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`center_of_mass` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`CenterOfMassMode` | :ref:`center_of_mass_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`constant_force` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`constant_torque` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`contact_monitor` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`continuous_cd` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`custom_integrator` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`freeze` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`FreezeMode` | :ref:`freeze_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`gravity_scale` | ``1.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`inertia` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`linear_damp` | ``0.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`DampMode` | :ref:`linear_damp_mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`lock_rotation` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`mass` | ``1.0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`max_contacts_reported` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`sleeping` | ``false`` | + +------------------------------------------------------------+----------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_central_force` **(** :ref:`Vector3` force **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_constant_torque` **(** :ref:`Vector3` torque **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_force` **(** :ref:`Vector3` force **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque` **(** :ref:`Vector3` torque **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_torque_impulse` **(** :ref:`Vector3` impulse **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node3D[]` | :ref:`get_colliding_bodies` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`get_inverse_inertia_tensor` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_axis_velocity` **(** :ref:`Vector3` axis_velocity **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_central_force` **(** :ref:`Vector3` force **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_constant_torque` **(** :ref:`Vector3` torque **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_force` **(** :ref:`Vector3` force **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque` **(** :ref:`Vector3` torque **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_torque_impulse` **(** :ref:`Vector3` impulse **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D[]` | :ref:`get_colliding_bodies` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_contact_count` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`get_inverse_inertia_tensor` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_axis_velocity` **(** :ref:`Vector3` axis_velocity **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_RigidBody3D_signal_body_entered: -- **body_entered** **(** :ref:`Node` body **)** +.. rst-class:: classref-signal + +**body_entered** **(** :ref:`Node` body **)** Emitted when a collision with another :ref:`PhysicsBody3D` or :ref:`GridMap` occurs. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_signal_body_exited: -- **body_exited** **(** :ref:`Node` body **)** +.. rst-class:: classref-signal + +**body_exited** **(** :ref:`Node` body **)** Emitted when the collision with another :ref:`PhysicsBody3D` or :ref:`GridMap` ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. \ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_signal_body_shape_entered: -- **body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when one of this RigidBody3D's :ref:`Shape3D`\ s collides with another :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. @@ -157,11 +187,15 @@ Emitted when one of this RigidBody3D's :ref:`Shape3D`\ s collides \ ``local_shape_index`` the index of the :ref:`Shape3D` of this RigidBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_signal_body_shape_exited: -- **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +.. rst-class:: classref-signal + +**body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** Emitted when the collision between one of this RigidBody3D's :ref:`Shape3D`\ s and another :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s ends. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. @@ -173,261 +207,321 @@ Emitted when the collision between one of this RigidBody3D's :ref:`Shape3D` of this RigidBody3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_signal_sleeping_state_changed: -- **sleeping_state_changed** **(** **)** +.. rst-class:: classref-signal + +**sleeping_state_changed** **(** **)** Emitted when the physics engine changes the body's sleeping state. \ **Note:** Changing the value :ref:`sleeping` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or ``emit_signal("sleeping_state_changed")`` is used. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_RigidBody3D_FreezeMode: -.. _class_RigidBody3D_constant_FREEZE_MODE_STATIC: - -.. _class_RigidBody3D_constant_FREEZE_MODE_KINEMATIC: +.. rst-class:: classref-enumeration enum **FreezeMode**: -- **FREEZE_MODE_STATIC** = **0** --- Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. +.. _class_RigidBody3D_constant_FREEZE_MODE_STATIC: -- **FREEZE_MODE_KINEMATIC** = **1** --- Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. +.. rst-class:: classref-enumeration-constant + +:ref:`FreezeMode` **FREEZE_MODE_STATIC** = ``0`` + +Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. + +.. _class_RigidBody3D_constant_FREEZE_MODE_KINEMATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`FreezeMode` **FREEZE_MODE_KINEMATIC** = ``1`` + +Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC`, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. + +.. rst-class:: classref-item-separator ---- .. _enum_RigidBody3D_CenterOfMassMode: -.. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_AUTO: - -.. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_CUSTOM: +.. rst-class:: classref-enumeration enum **CenterOfMassMode**: -- **CENTER_OF_MASS_MODE_AUTO** = **0** --- In this mode, the body's center of mass is calculated automatically based on its shapes. +.. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_AUTO: -- **CENTER_OF_MASS_MODE_CUSTOM** = **1** --- In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. +.. rst-class:: classref-enumeration-constant + +:ref:`CenterOfMassMode` **CENTER_OF_MASS_MODE_AUTO** = ``0`` + +In this mode, the body's center of mass is calculated automatically based on its shapes. + +.. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CenterOfMassMode` **CENTER_OF_MASS_MODE_CUSTOM** = ``1`` + +In this mode, the body's center of mass is set through :ref:`center_of_mass`. Defaults to the body's origin position. + +.. rst-class:: classref-item-separator ---- .. _enum_RigidBody3D_DampMode: -.. _class_RigidBody3D_constant_DAMP_MODE_COMBINE: - -.. _class_RigidBody3D_constant_DAMP_MODE_REPLACE: +.. rst-class:: classref-enumeration enum **DampMode**: -- **DAMP_MODE_COMBINE** = **0** --- In this mode, the body's damping value is added to any value set in areas or the default value. +.. _class_RigidBody3D_constant_DAMP_MODE_COMBINE: -- **DAMP_MODE_REPLACE** = **1** --- In this mode, the body's damping value replaces any value set in areas or the default value. +.. rst-class:: classref-enumeration-constant + +:ref:`DampMode` **DAMP_MODE_COMBINE** = ``0`` + +In this mode, the body's damping value is added to any value set in areas or the default value. + +.. _class_RigidBody3D_constant_DAMP_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DampMode` **DAMP_MODE_REPLACE** = ``1`` + +In this mode, the body's damping value replaces any value set in areas or the default value. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RigidBody3D_property_angular_damp: -- :ref:`float` **angular_damp** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_angular_damp(value) | -+-----------+-------------------------+ -| *Getter* | get_angular_damp() | -+-----------+-------------------------+ +:ref:`float` **angular_damp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp** **(** :ref:`float` value **)** +- :ref:`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` the body is in. Depending on :ref:`angular_damp_mode`, you can set :ref:`angular_damp` to be added to or to replace the body's damping value. See :ref:`ProjectSettings.physics/3d/default_angular_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_angular_damp_mode: -- :ref:`DampMode` **angular_damp_mode** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------+ -| *Setter* | set_angular_damp_mode(value) | -+-----------+------------------------------+ -| *Getter* | get_angular_damp_mode() | -+-----------+------------------------------+ +:ref:`DampMode` **angular_damp_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_damp_mode** **(** :ref:`DampMode` value **)** +- :ref:`DampMode` **get_angular_damp_mode** **(** **)** Defines how :ref:`angular_damp` is applied. See :ref:`DampMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_angular_velocity: -- :ref:`Vector3` **angular_velocity** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+-----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+-----------+-----------------------------+ +:ref:`Vector3` **angular_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_angular_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_angular_velocity** **(** **)** The RigidBody3D's rotational velocity in *radians* per second. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_can_sleep: -- :ref:`bool` **can_sleep** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_can_sleep(value) | -+-----------+----------------------+ -| *Getter* | is_able_to_sleep() | -+-----------+----------------------+ +:ref:`bool` **can_sleep** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_can_sleep** **(** :ref:`bool` value **)** +- :ref:`bool` **is_able_to_sleep** **(** **)** If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_center_of_mass: -- :ref:`Vector3` **center_of_mass** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_center_of_mass(value) | -+-----------+---------------------------+ -| *Getter* | get_center_of_mass() | -+-----------+---------------------------+ +:ref:`Vector3` **center_of_mass** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_center_of_mass** **(** :ref:`Vector3` value **)** +- :ref:`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` is set to :ref:`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. When :ref:`center_of_mass_mode` is set to :ref:`CENTER_OF_MASS_MODE_AUTO` (default value), the center of mass is automatically computed. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_center_of_mass_mode: -- :ref:`CenterOfMassMode` **center_of_mass_mode** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_center_of_mass_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_center_of_mass_mode() | -+-----------+--------------------------------+ +:ref:`CenterOfMassMode` **center_of_mass_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_center_of_mass_mode** **(** :ref:`CenterOfMassMode` value **)** +- :ref:`CenterOfMassMode` **get_center_of_mass_mode** **(** **)** Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_constant_force: -- :ref:`Vector3` **constant_force** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_constant_force(value) | -+-----------+---------------------------+ -| *Getter* | get_constant_force() | -+-----------+---------------------------+ +:ref:`Vector3` **constant_force** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant_force** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_constant_force** **(** **)** The body's total constant positional forces applied during each physics update. See :ref:`add_constant_force` and :ref:`add_constant_central_force`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_constant_torque: -- :ref:`Vector3` **constant_torque** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_constant_torque(value) | -+-----------+----------------------------+ -| *Getter* | get_constant_torque() | -+-----------+----------------------------+ +:ref:`Vector3` **constant_torque** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant_torque** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_constant_torque** **(** **)** The body's total constant rotational forces applied during each physics update. See :ref:`add_constant_torque`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_contact_monitor: -- :ref:`bool` **contact_monitor** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_contact_monitor(value) | -+-----------+------------------------------+ -| *Getter* | is_contact_monitor_enabled() | -+-----------+------------------------------+ +:ref:`bool` **contact_monitor** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_contact_monitor** **(** :ref:`bool` value **)** +- :ref:`bool` **is_contact_monitor_enabled** **(** **)** If ``true``, the RigidBody3D will emit signals when it collides with another RigidBody3D. \ **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see :ref:`max_contacts_reported`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_continuous_cd: -- :ref:`bool` **continuous_cd** +.. rst-class:: classref-property -+-----------+-----------------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------------+ -| *Setter* | set_use_continuous_collision_detection(value) | -+-----------+-----------------------------------------------+ -| *Getter* | is_using_continuous_collision_detection() | -+-----------+-----------------------------------------------+ +:ref:`bool` **continuous_cd** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_continuous_collision_detection** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_continuous_collision_detection** **(** **)** If ``true``, continuous collision detection is used. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_custom_integrator: -- :ref:`bool` **custom_integrator** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_custom_integrator(value) | -+-----------+----------------------------------+ -| *Getter* | is_using_custom_integrator() | -+-----------+----------------------------------+ +:ref:`bool` **custom_integrator** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_custom_integrator** **(** :ref:`bool` value **)** +- :ref:`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` function, if defined. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_freeze: -- :ref:`bool` **freeze** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_freeze_enabled(value) | -+-----------+---------------------------+ -| *Getter* | is_freeze_enabled() | -+-----------+---------------------------+ +:ref:`bool` **freeze** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_freeze_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_freeze_enabled** **(** **)** If ``true``, the body is frozen. Gravity and forces are not applied anymore. @@ -435,242 +529,283 @@ See :ref:`freeze_mode` to set the body's For a body that is always frozen, use :ref:`StaticBody3D` or :ref:`AnimatableBody3D` instead. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_freeze_mode: -- :ref:`FreezeMode` **freeze_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_freeze_mode(value) | -+-----------+------------------------+ -| *Getter* | get_freeze_mode() | -+-----------+------------------------+ +:ref:`FreezeMode` **freeze_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_freeze_mode** **(** :ref:`FreezeMode` value **)** +- :ref:`FreezeMode` **get_freeze_mode** **(** **)** The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze` is enabled. See :ref:`FreezeMode` for possible values. For a body that is always frozen, use :ref:`StaticBody3D` or :ref:`AnimatableBody3D` instead. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_gravity_scale: -- :ref:`float` **gravity_scale** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_gravity_scale(value) | -+-----------+--------------------------+ -| *Getter* | get_gravity_scale() | -+-----------+--------------------------+ +:ref:`float` **gravity_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_gravity_scale** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_inertia: -- :ref:`Vector3` **inertia** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_inertia(value) | -+-----------+----------------------+ -| *Getter* | get_inertia() | -+-----------+----------------------+ +:ref:`Vector3` **inertia** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_inertia** **(** :ref:`Vector3` value **)** +- :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_linear_damp: -- :ref:`float` **linear_damp** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_linear_damp(value) | -+-----------+------------------------+ -| *Getter* | get_linear_damp() | -+-----------+------------------------+ +:ref:`float` **linear_damp** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp** **(** :ref:`float` value **)** +- :ref:`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` the body is in. Depending on :ref:`linear_damp_mode`, you can set :ref:`linear_damp` to be added to or to replace the body's damping value. See :ref:`ProjectSettings.physics/3d/default_linear_damp` for more details about damping. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_linear_damp_mode: -- :ref:`DampMode` **linear_damp_mode** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_linear_damp_mode(value) | -+-----------+-----------------------------+ -| *Getter* | get_linear_damp_mode() | -+-----------+-----------------------------+ +:ref:`DampMode` **linear_damp_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_linear_damp_mode** **(** :ref:`DampMode` value **)** +- :ref:`DampMode` **get_linear_damp_mode** **(** **)** Defines how :ref:`linear_damp` is applied. See :ref:`DampMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_linear_velocity: -- :ref:`Vector3` **linear_velocity** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+-----------+----------------------------+ +:ref:`Vector3` **linear_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_linear_velocity** **(** :ref:`Vector3` value **)** +- :ref:`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` as your process loop for precise control of the body state. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_lock_rotation: -- :ref:`bool` **lock_rotation** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_lock_rotation_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_lock_rotation_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **lock_rotation** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_lock_rotation_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_lock_rotation_enabled** **(** **)** If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_mass: -- :ref:`float` **mass** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_mass(value) | -+-----------+-----------------+ -| *Getter* | get_mass() | -+-----------+-----------------+ +:ref:`float` **mass** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_mass** **(** :ref:`float` value **)** +- :ref:`float` **get_mass** **(** **)** The body's mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_max_contacts_reported: -- :ref:`int` **max_contacts_reported** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_max_contacts_reported(value) | -+-----------+----------------------------------+ -| *Getter* | get_max_contacts_reported() | -+-----------+----------------------------------+ +:ref:`int` **max_contacts_reported** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_max_contacts_reported** **(** :ref:`int` value **)** +- :ref:`int` **get_max_contacts_reported** **(** **)** The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count` to retrieve the count or :ref:`get_colliding_bodies` to retrieve bodies that have been collided with. \ **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_physics_material_override: -- :ref:`PhysicsMaterial` **physics_material_override** +.. rst-class:: classref-property -+----------+--------------------------------------+ -| *Setter* | set_physics_material_override(value) | -+----------+--------------------------------------+ -| *Getter* | get_physics_material_override() | -+----------+--------------------------------------+ +:ref:`PhysicsMaterial` **physics_material_override** + +.. rst-class:: classref-property-setget + +- void **set_physics_material_override** **(** :ref:`PhysicsMaterial` value **)** +- :ref:`PhysicsMaterial` **get_physics_material_override** **(** **)** The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_property_sleeping: -- :ref:`bool` **sleeping** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_sleeping(value) | -+-----------+---------------------+ -| *Getter* | is_sleeping() | -+-----------+---------------------+ +:ref:`bool` **sleeping** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_sleeping** **(** :ref:`bool` value **)** +- :ref:`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` or :ref:`apply_force` methods. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_RigidBody3D_method__integrate_forces: -- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| +.. rst-class:: classref-method + +void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| 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` property allows you to disable the default behavior and do fully custom force integration for a body. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_add_constant_central_force: -- void **add_constant_central_force** **(** :ref:`Vector3` force **)** +.. rst-class:: classref-method + +void **add_constant_central_force** **(** :ref:`Vector3` force **)** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. This is equivalent to using :ref:`add_constant_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_add_constant_force: -- void **add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_add_constant_torque: -- void **add_constant_torque** **(** :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **add_constant_torque** **(** :ref:`Vector3` torque **)** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = Vector3(0, 0, 0)``. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_apply_central_force: -- void **apply_central_force** **(** :ref:`Vector3` force **)** +.. rst-class:: classref-method + +void **apply_central_force** **(** :ref:`Vector3` force **)** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using :ref:`apply_force` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_apply_central_impulse: -- void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** +.. rst-class:: classref-method + +void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** Applies a directional impulse without affecting rotation. @@ -678,21 +813,29 @@ An impulse is time-independent! Applying an impulse every frame would result in This is equivalent to using :ref:`apply_impulse` at the body's center of mass. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_apply_force: -- void **apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_apply_impulse: -- void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** +.. rst-class:: classref-method + +void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** Applies a positioned impulse to the body. @@ -700,21 +843,29 @@ An impulse is time-independent! Applying an impulse every frame would result in \ ``position`` is the offset from the body origin in global coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_apply_torque: -- void **apply_torque** **(** :ref:`Vector3` torque **)** +.. rst-class:: classref-method + +void **apply_torque** **(** :ref:`Vector3` torque **)** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. \ **Note:** :ref:`inertia` is required for this to work. To have :ref:`inertia`, an active :ref:`CollisionShape3D` must be a child of the node, or you can manually set :ref:`inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_apply_torque_impulse: -- void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** +.. rst-class:: classref-method + +void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** Applies a rotational impulse to the body without affecting the position. @@ -722,39 +873,55 @@ An impulse is time-independent! Applying an impulse every frame would result in \ **Note:** :ref:`inertia` is required for this to work. To have :ref:`inertia`, an active :ref:`CollisionShape3D` must be a child of the node, or you can manually set :ref:`inertia`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_get_colliding_bodies: -- :ref:`Node3D[]` **get_colliding_bodies** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node3D[]` **get_colliding_bodies** **(** **)** |const| Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor` to be set to ``true`` and :ref:`max_contacts_reported` to be set high enough to detect all the collisions. \ **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_get_contact_count: -- :ref:`int` **get_contact_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_contact_count** **(** **)** |const| 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`). \ **Note:** To retrieve the colliding bodies, use :ref:`get_colliding_bodies`. +.. rst-class:: classref-item-separator + ---- .. _class_RigidBody3D_method_get_inverse_inertia_tensor: -- :ref:`Basis` **get_inverse_inertia_tensor** **(** **)** |const| +.. rst-class:: classref-method -Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the ``RigidBody3D``. +:ref:`Basis` **get_inverse_inertia_tensor** **(** **)** |const| + +Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the **RigidBody3D**. + +.. rst-class:: classref-item-separator ---- .. _class_RigidBody3D_method_set_axis_velocity: -- void **set_axis_velocity** **(** :ref:`Vector3` axis_velocity **)** +.. rst-class:: classref-method + +void **set_axis_velocity** **(** :ref:`Vector3` 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. diff --git a/classes/class_rootmotionview.rst b/classes/class_rootmotionview.rst index 6b94971cb..f8dd764e3 100644 --- a/classes/class_rootmotionview.rst +++ b/classes/class_rootmotionview.rst @@ -14,111 +14,129 @@ RootMotionView Editor-only helper for setting up root motion in :ref:`AnimationTree`. +.. 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`. -\ **Note:** ``RootMotionView`` is only visible in the editor. It will be hidden automatically in the running project. +\ **Note:** **RootMotionView** is only visible in the editor. It will be hidden automatically in the running project. + +.. rst-class:: classref-introduction-group Tutorials --------- - `Using AnimationTree - Root motion <../tutorials/animation/animation_tree.html#root-motion>`__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+---------------------------------------------------------------------+---------------------------+ -| :ref:`NodePath` | :ref:`animation_path` | ``NodePath("")`` | -+---------------------------------+---------------------------------------------------------------------+---------------------------+ -| :ref:`float` | :ref:`cell_size` | ``1.0`` | -+---------------------------------+---------------------------------------------------------------------+---------------------------+ -| :ref:`Color` | :ref:`color` | ``Color(0.5, 0.5, 1, 1)`` | -+---------------------------------+---------------------------------------------------------------------+---------------------------+ -| :ref:`float` | :ref:`radius` | ``10.0`` | -+---------------------------------+---------------------------------------------------------------------+---------------------------+ -| :ref:`bool` | :ref:`zero_y` | ``true`` | -+---------------------------------+---------------------------------------------------------------------+---------------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------+---------------------------+ + | :ref:`NodePath` | :ref:`animation_path` | ``NodePath("")`` | + +---------------------------------+---------------------------------------------------------------------+---------------------------+ + | :ref:`float` | :ref:`cell_size` | ``1.0`` | + +---------------------------------+---------------------------------------------------------------------+---------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(0.5, 0.5, 1, 1)`` | + +---------------------------------+---------------------------------------------------------------------+---------------------------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +---------------------------------+---------------------------------------------------------------------+---------------------------+ + | :ref:`bool` | :ref:`zero_y` | ``true`` | + +---------------------------------+---------------------------------------------------------------------+---------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RootMotionView_property_animation_path: -- :ref:`NodePath` **animation_path** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------------+ -| *Setter* | set_animation_path(value) | -+-----------+---------------------------+ -| *Getter* | get_animation_path() | -+-----------+---------------------------+ +:ref:`NodePath` **animation_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_animation_path** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_animation_path** **(** **)** Path to an :ref:`AnimationTree` node to use as a basis for root motion. +.. rst-class:: classref-item-separator + ---- .. _class_RootMotionView_property_cell_size: -- :ref:`float` **cell_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_cell_size(value) | -+-----------+----------------------+ -| *Getter* | get_cell_size() | -+-----------+----------------------+ +:ref:`float` **cell_size** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_cell_size** **(** :ref:`float` value **)** +- :ref:`float` **get_cell_size** **(** **)** The grid's cell size in 3D units. +.. rst-class:: classref-item-separator + ---- .. _class_RootMotionView_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Color(0.5, 0.5, 1, 1)`` | -+-----------+---------------------------+ -| *Setter* | set_color(value) | -+-----------+---------------------------+ -| *Getter* | get_color() | -+-----------+---------------------------+ +:ref:`Color` **color** = ``Color(0.5, 0.5, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** The grid's color. +.. rst-class:: classref-item-separator + ---- .. _class_RootMotionView_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``10.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`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` is reached. +.. rst-class:: classref-item-separator + ---- .. _class_RootMotionView_property_zero_y: -- :ref:`bool` **zero_y** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``true`` | -+-----------+-------------------+ -| *Setter* | set_zero_y(value) | -+-----------+-------------------+ -| *Getter* | get_zero_y() | -+-----------+-------------------+ +:ref:`bool` **zero_y** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_zero_y** **(** :ref:`bool` value **)** +- :ref:`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. diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst index e63b132df..a95198f76 100644 --- a/classes/class_scenemultiplayer.rst +++ b/classes/class_scenemultiplayer.rst @@ -14,6 +14,8 @@ SceneMultiplayer High-level multiplayer API implementation. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,214 +29,280 @@ This implementation additionally provide :ref:`SceneTree` repli \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+---------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`allow_object_decoding` | ``false`` | -+---------------------------------+---------------------------------------------------------------------------------------+------------------+ -| :ref:`Callable` | :ref:`auth_callback` | | -+---------------------------------+---------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`auth_timeout` | ``3.0`` | -+---------------------------------+---------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | -+---------------------------------+---------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`root_path` | ``NodePath("")`` | -+---------------------------------+---------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`server_relay` | ``true`` | -+---------------------------------+---------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`allow_object_decoding` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`Callable` | :ref:`auth_callback` | | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`auth_timeout` | ``3.0`` | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`refuse_new_connections` | ``false`` | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`root_path` | ``NodePath("")`` | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`server_relay` | ``true`` | + +---------------------------------+---------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`complete_auth` **(** :ref:`int` id **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_peer` **(** :ref:`int` id **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_authenticating_peers` **(** **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`send_auth` **(** :ref:`int` id, :ref:`PackedByteArray` data **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`send_bytes` **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`complete_auth` **(** :ref:`int` id **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect_peer` **(** :ref:`int` id **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_authenticating_peers` **(** **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`send_auth` **(** :ref:`int` id, :ref:`PackedByteArray` data **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`send_bytes` **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_SceneMultiplayer_signal_peer_authenticating: -- **peer_authenticating** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**peer_authenticating** **(** :ref:`int` id **)** Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` connects to a new peer and a valid :ref:`auth_callback` is set. In this case, the :ref:`MultiplayerAPI.peer_connected` will not be emitted until :ref:`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` (but in the one returned by :ref:`get_authenticating_peers`), and only authentication data will be sent or received. See :ref:`send_auth` for sending authentication data. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_signal_peer_authentication_failed: -- **peer_authentication_failed** **(** :ref:`int` id **)** +.. rst-class:: classref-signal + +**peer_authentication_failed** **(** :ref:`int` id **)** Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` disconnects from a peer for which authentication had not yet completed. See :ref:`peer_authenticating`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_signal_peer_packet: -- **peer_packet** **(** :ref:`int` id, :ref:`PackedByteArray` packet **)** +.. rst-class:: classref-signal + +**peer_packet** **(** :ref:`int` id, :ref:`PackedByteArray` packet **)** Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` receives a ``packet`` with custom data (see :ref:`send_bytes`). ID is the peer ID of the peer that sent the packet. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_SceneMultiplayer_property_allow_object_decoding: -- :ref:`bool` **allow_object_decoding** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_allow_object_decoding(value) | -+-----------+----------------------------------+ -| *Getter* | is_object_decoding_allowed() | -+-----------+----------------------------------+ +:ref:`bool` **allow_object_decoding** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_object_decoding** **(** :ref:`bool` value **)** +- :ref:`bool` **is_object_decoding_allowed** **(** **)** If ``true``, the MultiplayerAPI will allow encoding and decoding of object during RPCs. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threat such as remote code execution. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_property_auth_callback: -- :ref:`Callable` **auth_callback** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_auth_callback(value) | -+----------+--------------------------+ -| *Getter* | get_auth_callback() | -+----------+--------------------------+ +:ref:`Callable` **auth_callback** + +.. rst-class:: classref-property-setget + +- void **set_auth_callback** **(** :ref:`Callable` value **)** +- :ref:`Callable` **get_auth_callback** **(** **)** The callback to execute when when receiving authentication data sent via :ref:`send_auth`. If the :ref:`Callable` is empty (default), peers will be automatically accepted as soon as they connect. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_property_auth_timeout: -- :ref:`float` **auth_timeout** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``3.0`` | -+-----------+-------------------------+ -| *Setter* | set_auth_timeout(value) | -+-----------+-------------------------+ -| *Getter* | get_auth_timeout() | -+-----------+-------------------------+ +:ref:`float` **auth_timeout** = ``3.0`` + +.. rst-class:: classref-property-setget + +- void **set_auth_timeout** **(** :ref:`float` value **)** +- :ref:`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` and :ref:`peer_authentication_failed` signals. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_property_refuse_new_connections: -- :ref:`bool` **refuse_new_connections** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_refuse_new_connections(value) | -+-----------+-----------------------------------+ -| *Getter* | is_refusing_new_connections() | -+-----------+-----------------------------------+ +:ref:`bool` **refuse_new_connections** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_refuse_new_connections** **(** :ref:`bool` value **)** +- :ref:`bool` **is_refusing_new_connections** **(** **)** If ``true``, the MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer` refuses new incoming connections. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_property_root_path: -- :ref:`NodePath` **root_path** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``NodePath("")`` | -+-----------+----------------------+ -| *Setter* | set_root_path(value) | -+-----------+----------------------+ -| *Getter* | get_root_path() | -+-----------+----------------------+ +:ref:`NodePath` **root_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_root_path** **(** :ref:`NodePath` value **)** +- :ref:`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. This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_property_server_relay: -- :ref:`bool` **server_relay** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_server_relay_enabled(value) | -+-----------+---------------------------------+ -| *Getter* | is_server_relay_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **server_relay** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_server_relay_enabled** **(** :ref:`bool` value **)** +- :ref:`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. \ **Note:** Support for this feature may depend on the current :ref:`MultiplayerPeer` configuration. See :ref:`MultiplayerPeer.is_server_relay_supported`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SceneMultiplayer_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing). +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_method_complete_auth: -- :ref:`Error` **complete_auth** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +:ref:`Error` **complete_auth** **(** :ref:`int` id **)** Mark the authentication step as completed for the remote peer identified by ``id``. The :ref:`MultiplayerAPI.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. If a peer disconnects before completing authentication, either due to a network issue, the :ref:`auth_timeout` expiring, or manually calling :ref:`disconnect_peer`, the :ref:`peer_authentication_failed` signal will be emitted instead of :ref:`MultiplayerAPI.peer_disconnected`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_method_disconnect_peer: -- void **disconnect_peer** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **disconnect_peer** **(** :ref:`int` id **)** Disconnects the peer identified by ``id``, removing it from the list of connected peers, and closing the underlying connection with it. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_method_get_authenticating_peers: -- :ref:`PackedInt32Array` **get_authenticating_peers** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_authenticating_peers** **(** **)** Returns the IDs of the peers currently trying to authenticate with this :ref:`MultiplayerAPI`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_method_send_auth: -- :ref:`Error` **send_auth** **(** :ref:`int` id, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +:ref:`Error` **send_auth** **(** :ref:`int` id, :ref:`PackedByteArray` data **)** 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` is emitted (and the remote peer accepted as one of the connected peers). +.. rst-class:: classref-item-separator + ---- .. _class_SceneMultiplayer_method_send_bytes: -- :ref:`Error` **send_bytes** **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** +.. rst-class:: classref-method + +:ref:`Error` **send_bytes** **(** :ref:`PackedByteArray` bytes, :ref:`int` id=0, :ref:`TransferMode` mode=2, :ref:`int` channel=0 **)** Sends the given raw ``bytes`` to a specific peer identified by ``id`` (see :ref:`MultiplayerPeer.set_target_peer`). Default ID is ``0``, i.e. broadcast to all peers. diff --git a/classes/class_scenereplicationconfig.rst b/classes/class_scenereplicationconfig.rst index 813498db7..4b5e5219f 100644 --- a/classes/class_scenereplicationconfig.rst +++ b/classes/class_scenereplicationconfig.rst @@ -14,99 +14,144 @@ SceneReplicationConfig Configuration for properties to synchronize with a :ref:`MultiplayerSynchronizer`. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_property` **(** :ref:`NodePath` path, :ref:`int` index=-1 **)** | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath[]` | :ref:`get_properties` **(** **)** |const| | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_property` **(** :ref:`NodePath` path **)** |const| | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`property_get_index` **(** :ref:`NodePath` path **)** |const| | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`property_get_spawn` **(** :ref:`NodePath` path **)** | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`property_get_sync` **(** :ref:`NodePath` path **)** | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`property_set_spawn` **(** :ref:`NodePath` path, :ref:`bool` enabled **)** | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`property_set_sync` **(** :ref:`NodePath` path, :ref:`bool` enabled **)** | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_property` **(** :ref:`NodePath` path **)** | -+-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_property` **(** :ref:`NodePath` path, :ref:`int` index=-1 **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath[]` | :ref:`get_properties` **(** **)** |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_property` **(** :ref:`NodePath` path **)** |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`property_get_index` **(** :ref:`NodePath` path **)** |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_get_spawn` **(** :ref:`NodePath` path **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_get_sync` **(** :ref:`NodePath` path **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`property_set_spawn` **(** :ref:`NodePath` path, :ref:`bool` enabled **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`property_set_sync` **(** :ref:`NodePath` path, :ref:`bool` enabled **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_property` **(** :ref:`NodePath` path **)** | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SceneReplicationConfig_method_add_property: -- void **add_property** **(** :ref:`NodePath` path, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +void **add_property** **(** :ref:`NodePath` path, :ref:`int` index=-1 **)** Adds the property identified by the given ``path`` to the list of the properties being synchronized, optionally passing an ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_get_properties: -- :ref:`NodePath[]` **get_properties** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath[]` **get_properties** **(** **)** |const| Returns a list of synchronized property :ref:`NodePath`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_has_property: -- :ref:`bool` **has_property** **(** :ref:`NodePath` path **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_property** **(** :ref:`NodePath` path **)** |const| Returns whether the given ``path`` is configured for synchronization. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_property_get_index: -- :ref:`int` **property_get_index** **(** :ref:`NodePath` path **)** |const| +.. rst-class:: classref-method + +:ref:`int` **property_get_index** **(** :ref:`NodePath` path **)** |const| Finds the index of the given ``path``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_property_get_spawn: -- :ref:`bool` **property_get_spawn** **(** :ref:`NodePath` path **)** +.. rst-class:: classref-method + +:ref:`bool` **property_get_spawn** **(** :ref:`NodePath` path **)** Returns whether the property identified by the given ``path`` is configured to be synchronized on spawn. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_property_get_sync: -- :ref:`bool` **property_get_sync** **(** :ref:`NodePath` path **)** +.. rst-class:: classref-method + +:ref:`bool` **property_get_sync** **(** :ref:`NodePath` path **)** Returns whether the property identified by the given ``path`` is configured to be synchronized on process. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_property_set_spawn: -- void **property_set_spawn** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **property_set_spawn** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** Sets whether the property identified by the given ``path`` is configured to be synchronized on spawn. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_property_set_sync: -- void **property_set_sync** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **property_set_sync** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** Sets whether the property identified by the given ``path`` is configured to be synchronized on process. +.. rst-class:: classref-item-separator + ---- .. _class_SceneReplicationConfig_method_remove_property: -- void **remove_property** **(** :ref:`NodePath` path **)** +.. rst-class:: classref-method + +void **remove_property** **(** :ref:`NodePath` path **)** Removes the property identified by the given ``path`` from the configuration. diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index 88220bf6f..efbccb858 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -14,6 +14,8 @@ SceneState A script interface to a scene file's data. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,256 +23,373 @@ Maintains a list of resources, nodes, exported, and overridden properties, and b This class cannot be instantiated directly, it is retrieved for a given scene as the result of :ref:`PackedScene.get_state`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_connection_binds` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_count` **(** **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_flags` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_connection_method` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_connection_signal` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_connection_source` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_connection_target` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_unbinds` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_node_count` **(** **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_node_groups` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_node_index` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedScene` | :ref:`get_node_instance` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_node_instance_placeholder` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_node_name` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_node_owner_path` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_node_path` **(** :ref:`int` idx, :ref:`bool` for_parent=false **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_node_property_count` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_node_property_name` **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_node_property_value` **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_node_type` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_node_instance_placeholder` **(** :ref:`int` idx **)** |const| | -+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_connection_binds` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_count` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_flags` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_connection_method` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_connection_signal` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_connection_source` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_connection_target` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connection_unbinds` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_count` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_node_groups` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_index` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedScene` | :ref:`get_node_instance` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_node_instance_placeholder` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_node_name` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_node_owner_path` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_node_path` **(** :ref:`int` idx, :ref:`bool` for_parent=false **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_property_count` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_node_property_name` **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_node_property_value` **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_node_type` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_node_instance_placeholder` **(** :ref:`int` idx **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_SceneState_GenEditState: -.. _class_SceneState_constant_GEN_EDIT_STATE_DISABLED: - -.. _class_SceneState_constant_GEN_EDIT_STATE_INSTANCE: - -.. _class_SceneState_constant_GEN_EDIT_STATE_MAIN: - -.. _class_SceneState_constant_GEN_EDIT_STATE_MAIN_INHERITED: +.. rst-class:: classref-enumeration enum **GenEditState**: -- **GEN_EDIT_STATE_DISABLED** = **0** --- If passed to :ref:`PackedScene.instantiate`, blocks edits to the scene state. +.. _class_SceneState_constant_GEN_EDIT_STATE_DISABLED: -- **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`PackedScene.instantiate`, provides inherited scene resources to the local scene. +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_DISABLED** = ``0`` + +If passed to :ref:`PackedScene.instantiate`, blocks edits to the scene state. + +.. _class_SceneState_constant_GEN_EDIT_STATE_INSTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_INSTANCE** = ``1`` + +If passed to :ref:`PackedScene.instantiate`, provides inherited scene resources to the local scene. \ **Note:** Only available in editor builds. -- **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`PackedScene.instantiate`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. +.. _class_SceneState_constant_GEN_EDIT_STATE_MAIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_MAIN** = ``2`` + +If passed to :ref:`PackedScene.instantiate`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. \ **Note:** Only available in editor builds. -- **GEN_EDIT_STATE_MAIN_INHERITED** = **3** --- If passed to :ref:`PackedScene.instantiate`, it's similar to :ref:`GEN_EDIT_STATE_MAIN`, but for the case where the scene is being instantiated to be the base of another one. +.. _class_SceneState_constant_GEN_EDIT_STATE_MAIN_INHERITED: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenEditState` **GEN_EDIT_STATE_MAIN_INHERITED** = ``3`` + +If passed to :ref:`PackedScene.instantiate`, it's similar to :ref:`GEN_EDIT_STATE_MAIN`, but for the case where the scene is being instantiated to be the base of another one. \ **Note:** Only available in editor builds. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SceneState_method_get_connection_binds: -- :ref:`Array` **get_connection_binds** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_connection_binds** **(** :ref:`int` idx **)** |const| Returns the list of bound parameters for the signal at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_connection_count: -- :ref:`int` **get_connection_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_connection_count** **(** **)** |const| Returns the number of signal connections in the scene. The ``idx`` argument used to query connection metadata in other ``get_connection_*`` methods in the interval ``[0, get_connection_count() - 1]``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_connection_flags: -- :ref:`int` **get_connection_flags** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_connection_flags** **(** :ref:`int` idx **)** |const| Returns the connection flags for the signal at ``idx``. See :ref:`ConnectFlags` constants. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_connection_method: -- :ref:`StringName` **get_connection_method** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_connection_method** **(** :ref:`int` idx **)** |const| Returns the method connected to the signal at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_connection_signal: -- :ref:`StringName` **get_connection_signal** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_connection_signal** **(** :ref:`int` idx **)** |const| Returns the name of the signal at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_connection_source: -- :ref:`NodePath` **get_connection_source** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_connection_source** **(** :ref:`int` idx **)** |const| Returns the path to the node that owns the signal at ``idx``, relative to the root node. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_connection_target: -- :ref:`NodePath` **get_connection_target** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_connection_target** **(** :ref:`int` idx **)** |const| Returns the path to the node that owns the method connected to the signal at ``idx``, relative to the root node. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_connection_unbinds: -- :ref:`int` **get_connection_unbinds** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_connection_unbinds** **(** :ref:`int` idx **)** |const| Returns the number of unbound parameters for the signal at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_count: -- :ref:`int` **get_node_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_node_count** **(** **)** |const| Returns the number of nodes in the scene. The ``idx`` argument used to query node data in other ``get_node_*`` methods in the interval ``[0, get_node_count() - 1]``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_groups: -- :ref:`PackedStringArray` **get_node_groups** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_node_groups** **(** :ref:`int` idx **)** |const| Returns the list of group names associated with the node at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_index: -- :ref:`int` **get_node_index** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_node_index** **(** :ref:`int` idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_instance: -- :ref:`PackedScene` **get_node_instance** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedScene` **get_node_instance** **(** :ref:`int` idx **)** |const| Returns a :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_instance_placeholder: -- :ref:`String` **get_node_instance_placeholder** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_node_instance_placeholder** **(** :ref:`int` idx **)** |const| Returns the path to the represented scene file if the node at ``idx`` is an :ref:`InstancePlaceholder`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_name: -- :ref:`StringName` **get_node_name** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_node_name** **(** :ref:`int` idx **)** |const| Returns the name of the node at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_owner_path: -- :ref:`NodePath` **get_node_owner_path** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_node_owner_path** **(** :ref:`int` idx **)** |const| Returns the path to the owner of the node at ``idx``, relative to the root node. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_path: -- :ref:`NodePath` **get_node_path** **(** :ref:`int` idx, :ref:`bool` for_parent=false **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_node_path** **(** :ref:`int` idx, :ref:`bool` for_parent=false **)** |const| Returns the path to the node at ``idx``. If ``for_parent`` is ``true``, returns the path of the ``idx`` node's parent instead. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_property_count: -- :ref:`int` **get_node_property_count** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_node_property_count** **(** :ref:`int` idx **)** |const| Returns the number of exported or overridden properties for the node at ``idx``. The ``prop_idx`` argument used to query node property data in other ``get_node_property_*`` methods in the interval ``[0, get_node_property_count() - 1]``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_property_name: -- :ref:`StringName` **get_node_property_name** **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_node_property_name** **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| Returns the name of the property at ``prop_idx`` for the node at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_property_value: -- :ref:`Variant` **get_node_property_value** **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_node_property_value** **(** :ref:`int` idx, :ref:`int` prop_idx **)** |const| Returns the value of the property at ``prop_idx`` for the node at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_get_node_type: -- :ref:`StringName` **get_node_type** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_node_type** **(** :ref:`int` idx **)** |const| Returns the type of the node at ``idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneState_method_is_node_instance_placeholder: -- :ref:`bool` **is_node_instance_placeholder** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_node_instance_placeholder** **(** :ref:`int` idx **)** |const| Returns ``true`` if the node at ``idx`` is an :ref:`InstancePlaceholder`. diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index ca032ff7d..fb0d506dd 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -14,14 +14,18 @@ SceneTree Manages the game loop via a hierarchy of nodes. +.. rst-class:: classref-introduction-group + 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, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. -You can also use the ``SceneTree`` to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. 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 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. -\ ``SceneTree`` is the default :ref:`MainLoop` implementation used by scenes, and is thus in charge of the game loop. +\ **SceneTree** is the default :ref:`MainLoop` implementation used by scenes, and is thus in charge of the game loop. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -30,351 +34,454 @@ Tutorials - :doc:`Multiple resolutions <../tutorials/rendering/multiple_resolutions>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`auto_accept_quit` | ``true`` | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Node` | :ref:`current_scene` | | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`debug_collisions_hint` | ``false`` | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`debug_navigation_hint` | ``false`` | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`debug_paths_hint` | ``false`` | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Node` | :ref:`edited_scene_root` | | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`multiplayer_poll` | ``true`` | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`paused` | ``false`` | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`quit_on_go_back` | ``true`` | -+-----------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Window` | :ref:`root` | | -+-----------------------------+------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`auto_accept_quit` | ``true`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Node` | :ref:`current_scene` | | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`debug_collisions_hint` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`debug_navigation_hint` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`debug_paths_hint` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Node` | :ref:`edited_scene_root` | | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`multiplayer_poll` | ``true`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`paused` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`quit_on_go_back` | ``true`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Window` | :ref:`root` | | + +-----------------------------+------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_group` **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_group_flags` **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`change_scene_to_file` **(** :ref:`String` path **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`change_scene_to_packed` **(** :ref:`PackedScene` packed_scene **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SceneTreeTimer` | :ref:`create_timer` **(** :ref:`float` time_sec, :ref:`bool` process_always=true, :ref:`bool` process_in_physics=false, :ref:`bool` ignore_time_scale=false **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`create_tween` **(** **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_first_node_in_group` **(** :ref:`StringName` group **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_frame` **(** **)** |const| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MultiplayerAPI` | :ref:`get_multiplayer` **(** :ref:`NodePath` for_path=NodePath("") **)** |const| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_node_count` **(** **)** |const| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`get_nodes_in_group` **(** :ref:`StringName` group **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween[]` | :ref:`get_processed_tweens` **(** **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_group` **(** :ref:`StringName` name **)** |const| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`notify_group` **(** :ref:`StringName` group, :ref:`int` notification **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`notify_group_flags` **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`int` notification **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_delete` **(** :ref:`Object` obj **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`quit` **(** :ref:`int` exit_code=0 **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`reload_current_scene` **(** **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_group` **(** :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_group_flags` **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_multiplayer` **(** :ref:`MultiplayerAPI` multiplayer, :ref:`NodePath` root_path=NodePath("") **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`call_group` **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`call_group_flags` **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`change_scene_to_file` **(** :ref:`String` path **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`change_scene_to_packed` **(** :ref:`PackedScene` packed_scene **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SceneTreeTimer` | :ref:`create_timer` **(** :ref:`float` time_sec, :ref:`bool` process_always=true, :ref:`bool` process_in_physics=false, :ref:`bool` ignore_time_scale=false **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`create_tween` **(** **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_first_node_in_group` **(** :ref:`StringName` group **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frame` **(** **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MultiplayerAPI` | :ref:`get_multiplayer` **(** :ref:`NodePath` for_path=NodePath("") **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_count` **(** **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node[]` | :ref:`get_nodes_in_group` **(** :ref:`StringName` group **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween[]` | :ref:`get_processed_tweens` **(** **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_group` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notify_group` **(** :ref:`StringName` group, :ref:`int` notification **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notify_group_flags` **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`int` notification **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue_delete` **(** :ref:`Object` obj **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`quit` **(** :ref:`int` exit_code=0 **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`reload_current_scene` **(** **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_group` **(** :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_group_flags` **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_multiplayer` **(** :ref:`MultiplayerAPI` multiplayer, :ref:`NodePath` root_path=NodePath("") **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_SceneTree_signal_node_added: -- **node_added** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal -Emitted whenever a node is added to the ``SceneTree``. +**node_added** **(** :ref:`Node` node **)** + +Emitted whenever a node is added to the **SceneTree**. + +.. rst-class:: classref-item-separator ---- .. _class_SceneTree_signal_node_configuration_warning_changed: -- **node_configuration_warning_changed** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**node_configuration_warning_changed** **(** :ref:`Node` node **)** Emitted when a node's configuration changed. Only emitted in ``tool`` mode. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_signal_node_removed: -- **node_removed** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal -Emitted whenever a node is removed from the ``SceneTree``. +**node_removed** **(** :ref:`Node` node **)** + +Emitted whenever a node is removed from the **SceneTree**. + +.. rst-class:: classref-item-separator ---- .. _class_SceneTree_signal_node_renamed: -- **node_renamed** **(** :ref:`Node` node **)** +.. rst-class:: classref-signal + +**node_renamed** **(** :ref:`Node` node **)** Emitted whenever a node is renamed. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_signal_physics_frame: -- **physics_frame** **(** **)** +.. rst-class:: classref-signal -Emitted immediately before :ref:`Node._physics_process` is called on every node in the ``SceneTree``. +**physics_frame** **(** **)** + +Emitted immediately before :ref:`Node._physics_process` is called on every node in the **SceneTree**. + +.. rst-class:: classref-item-separator ---- .. _class_SceneTree_signal_process_frame: -- **process_frame** **(** **)** +.. rst-class:: classref-signal -Emitted immediately before :ref:`Node._process` is called on every node in the ``SceneTree``. +**process_frame** **(** **)** + +Emitted immediately before :ref:`Node._process` is called on every node in the **SceneTree**. + +.. rst-class:: classref-item-separator ---- .. _class_SceneTree_signal_tree_changed: -- **tree_changed** **(** **)** +.. rst-class:: classref-signal -Emitted whenever the ``SceneTree`` hierarchy changed (children being moved or renamed, etc.). +**tree_changed** **(** **)** + +Emitted whenever the **SceneTree** hierarchy changed (children being moved or renamed, etc.). + +.. rst-class:: classref-item-separator ---- .. _class_SceneTree_signal_tree_process_mode_changed: -- **tree_process_mode_changed** **(** **)** +.. rst-class:: classref-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` is changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_SceneTree_GroupCallFlags: -.. _class_SceneTree_constant_GROUP_CALL_DEFAULT: - -.. _class_SceneTree_constant_GROUP_CALL_REVERSE: - -.. _class_SceneTree_constant_GROUP_CALL_DEFERRED: - -.. _class_SceneTree_constant_GROUP_CALL_UNIQUE: +.. rst-class:: classref-enumeration enum **GroupCallFlags**: -- **GROUP_CALL_DEFAULT** = **0** --- Call a group with no flags (default). +.. _class_SceneTree_constant_GROUP_CALL_DEFAULT: -- **GROUP_CALL_REVERSE** = **1** --- Call a group in reverse scene order. +.. rst-class:: classref-enumeration-constant -- **GROUP_CALL_DEFERRED** = **2** --- Call a group with a one-frame delay (idle frame, not physics). +:ref:`GroupCallFlags` **GROUP_CALL_DEFAULT** = ``0`` -- **GROUP_CALL_UNIQUE** = **4** --- Call a group only once even if the call is executed many times. +Call a group with no flags (default). + +.. _class_SceneTree_constant_GROUP_CALL_REVERSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GroupCallFlags` **GROUP_CALL_REVERSE** = ``1`` + +Call a group in reverse scene order. + +.. _class_SceneTree_constant_GROUP_CALL_DEFERRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`GroupCallFlags` **GROUP_CALL_DEFERRED** = ``2`` + +Call a group with a one-frame delay (idle frame, not physics). + +.. _class_SceneTree_constant_GROUP_CALL_UNIQUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GroupCallFlags` **GROUP_CALL_UNIQUE** = ``4`` + +Call a group only once even if the call is executed many times. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SceneTree_property_auto_accept_quit: -- :ref:`bool` **auto_accept_quit** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_auto_accept_quit(value) | -+-----------+-----------------------------+ -| *Getter* | is_auto_accept_quit() | -+-----------+-----------------------------+ +:ref:`bool` **auto_accept_quit** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_auto_accept_quit** **(** :ref:`bool` value **)** +- :ref:`bool` **is_auto_accept_quit** **(** **)** If ``true``, the application automatically accepts quitting. For mobile platforms, see :ref:`quit_on_go_back`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_current_scene: -- :ref:`Node` **current_scene** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_current_scene(value) | -+----------+--------------------------+ -| *Getter* | get_current_scene() | -+----------+--------------------------+ +:ref:`Node` **current_scene** + +.. rst-class:: classref-property-setget + +- void **set_current_scene** **(** :ref:`Node` value **)** +- :ref:`Node` **get_current_scene** **(** **)** The current scene. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_debug_collisions_hint: -- :ref:`bool` **debug_collisions_hint** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_debug_collisions_hint(value) | -+-----------+----------------------------------+ -| *Getter* | is_debugging_collisions_hint() | -+-----------+----------------------------------+ +:ref:`bool` **debug_collisions_hint** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_debug_collisions_hint** **(** :ref:`bool` value **)** +- :ref:`bool` **is_debugging_collisions_hint** **(** **)** If ``true``, collision shapes will be visible when running the game from the editor for debugging purposes. \ **Note:** This property is not designed to be changed at run-time. Changing the value of :ref:`debug_collisions_hint` while the project is running will not have the desired effect. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_debug_navigation_hint: -- :ref:`bool` **debug_navigation_hint** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_debug_navigation_hint(value) | -+-----------+----------------------------------+ -| *Getter* | is_debugging_navigation_hint() | -+-----------+----------------------------------+ +:ref:`bool` **debug_navigation_hint** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_debug_navigation_hint** **(** :ref:`bool` value **)** +- :ref:`bool` **is_debugging_navigation_hint** **(** **)** If ``true``, navigation polygons will be visible when running the game from the editor for debugging purposes. \ **Note:** This property is not designed to be changed at run-time. Changing the value of :ref:`debug_navigation_hint` while the project is running will not have the desired effect. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_debug_paths_hint: -- :ref:`bool` **debug_paths_hint** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_debug_paths_hint(value) | -+-----------+-----------------------------+ -| *Getter* | is_debugging_paths_hint() | -+-----------+-----------------------------+ +:ref:`bool` **debug_paths_hint** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_debug_paths_hint** **(** :ref:`bool` value **)** +- :ref:`bool` **is_debugging_paths_hint** **(** **)** If ``true``, curves from :ref:`Path2D` and :ref:`Path3D` nodes will be visible when running the game from the editor for debugging purposes. \ **Note:** This property is not designed to be changed at run-time. Changing the value of :ref:`debug_paths_hint` while the project is running will not have the desired effect. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_edited_scene_root: -- :ref:`Node` **edited_scene_root** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_edited_scene_root(value) | -+----------+------------------------------+ -| *Getter* | get_edited_scene_root() | -+----------+------------------------------+ +:ref:`Node` **edited_scene_root** + +.. rst-class:: classref-property-setget + +- void **set_edited_scene_root** **(** :ref:`Node` value **)** +- :ref:`Node` **get_edited_scene_root** **(** **)** The root of the edited scene. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_multiplayer_poll: -- :ref:`bool` **multiplayer_poll** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------+ -| *Setter* | set_multiplayer_poll_enabled(value) | -+-----------+-------------------------------------+ -| *Getter* | is_multiplayer_poll_enabled() | -+-----------+-------------------------------------+ +:ref:`bool` **multiplayer_poll** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_multiplayer_poll_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_multiplayer_poll_enabled** **(** **)** If ``true`` (default value), enables automatic polling of the :ref:`MultiplayerAPI` for this SceneTree during :ref:`process_frame`. If ``false``, you need to manually call :ref:`MultiplayerAPI.poll` to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual :ref:`Mutex` protection when accessing the :ref:`MultiplayerAPI` from threads. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_paused: -- :ref:`bool` **paused** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``false`` | -+-----------+------------------+ -| *Setter* | set_pause(value) | -+-----------+------------------+ -| *Getter* | is_paused() | -+-----------+------------------+ +:ref:`bool` **paused** = ``false`` -If ``true``, the ``SceneTree`` is paused. Doing so will have the following behavior: +.. rst-class:: classref-property-setget + +- void **set_pause** **(** :ref:`bool` value **)** +- :ref:`bool` **is_paused** **(** **)** + +If ``true``, the **SceneTree** is paused. Doing so will have the following behavior: - 2D and 3D physics will be stopped. This includes signals and collision detection. - :ref:`Node._process`, :ref:`Node._physics_process` and :ref:`Node._input` will not be called anymore in nodes. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_quit_on_go_back: -- :ref:`bool` **quit_on_go_back** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_quit_on_go_back(value) | -+-----------+----------------------------+ -| *Getter* | is_quit_on_go_back() | -+-----------+----------------------------+ +:ref:`bool` **quit_on_go_back** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_quit_on_go_back** **(** :ref:`bool` value **)** +- :ref:`bool` **is_quit_on_go_back** **(** **)** If ``true``, the application quits automatically on going back (e.g. on Android). To handle 'Go Back' button when this option is disabled, use :ref:`DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_property_root: -- :ref:`Window` **root** +.. rst-class:: classref-property -+----------+------------+ -| *Getter* | get_root() | -+----------+------------+ +:ref:`Window` **root** -The ``SceneTree``'s root :ref:`Window`. +.. rst-class:: classref-property-setget + +- :ref:`Window` **get_root** **(** **)** + +The **SceneTree**'s root :ref:`Window`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SceneTree_method_call_group: -- void **call_group** **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method + +void **call_group** **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| 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:** :ref:`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. To wait for one frame after :ref:`call_group` was called, use :ref:`call_group_flags` with the :ref:`GROUP_CALL_DEFERRED` flag. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_call_group_flags: -- void **call_group_flags** **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method + +void **call_group_flags** **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| Calls ``method`` on each member of the given group, respecting the given :ref:`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. @@ -385,11 +492,15 @@ Calls ``method`` on each member of the given group, respecting the given :ref:`G \ **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`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``flags`` argument, methods will be called with a one-frame delay in a way similar to :ref:`Object.set_deferred`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_change_scene_to_file: -- :ref:`Error` **change_scene_to_file** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **change_scene_to_file** **(** :ref:`String` path **)** Changes the running scene to the one at the given ``path``, after loading it into a :ref:`PackedScene` and creating a new instance. @@ -397,11 +508,15 @@ Returns :ref:`@GlobalScope.OK` on success, :ref: \ **Note:** The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the :ref:`change_scene_to_file` call. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_change_scene_to_packed: -- :ref:`Error` **change_scene_to_packed** **(** :ref:`PackedScene` packed_scene **)** +.. rst-class:: classref-method + +:ref:`Error` **change_scene_to_packed** **(** :ref:`PackedScene` packed_scene **)** Changes the running scene to a new instance of the given :ref:`PackedScene`. @@ -409,15 +524,19 @@ Returns :ref:`@GlobalScope.OK` on success or :re \ **Note:** The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the :ref:`change_scene_to_packed` call. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_create_timer: -- :ref:`SceneTreeTimer` **create_timer** **(** :ref:`float` time_sec, :ref:`bool` process_always=true, :ref:`bool` process_in_physics=false, :ref:`bool` ignore_time_scale=false **)** +.. rst-class:: classref-method -Returns a :ref:`SceneTreeTimer` which will :ref:`SceneTreeTimer.timeout` after the given time in seconds elapsed in this ``SceneTree``. +:ref:`SceneTreeTimer` **create_timer** **(** :ref:`float` time_sec, :ref:`bool` process_always=true, :ref:`bool` process_in_physics=false, :ref:`bool` ignore_time_scale=false **)** -If ``process_always`` is set to ``false``, pausing the ``SceneTree`` will also pause the timer. +Returns a :ref:`SceneTreeTimer` which will :ref:`SceneTreeTimer.timeout` after the given time in seconds elapsed in this **SceneTree**. + +If ``process_always`` is set to ``false``, pausing the **SceneTree** will also pause the timer. If ``process_in_physics`` is set to ``true``, will update the :ref:`SceneTreeTimer` during the physics frame instead of the process frame (fixed framerate processing). @@ -448,103 +567,151 @@ Commonly used to create a one-shot delay timer as in the following example: The timer will be automatically freed after its time elapses. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_create_tween: -- :ref:`Tween` **create_tween** **(** **)** +.. rst-class:: classref-method + +:ref:`Tween` **create_tween** **(** **)** Creates and returns a new :ref:`Tween`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_get_first_node_in_group: -- :ref:`Node` **get_first_node_in_group** **(** :ref:`StringName` group **)** +.. rst-class:: classref-method + +:ref:`Node` **get_first_node_in_group** **(** :ref:`StringName` group **)** Returns the first node in the specified group, or ``null`` if the group is empty or does not exist. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_get_frame: -- :ref:`int` **get_frame** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_frame** **(** **)** |const| Returns the current frame number, i.e. the total frame count since the application started. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_get_multiplayer: -- :ref:`MultiplayerAPI` **get_multiplayer** **(** :ref:`NodePath` for_path=NodePath("") **)** |const| +.. rst-class:: classref-method + +:ref:`MultiplayerAPI` **get_multiplayer** **(** :ref:`NodePath` for_path=NodePath("") **)** |const| Return the :ref:`MultiplayerAPI` configured for the given path, or the default one if ``for_path`` is empty. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_get_node_count: -- :ref:`int` **get_node_count** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of nodes in this ``SceneTree``. +:ref:`int` **get_node_count** **(** **)** |const| + +Returns the number of nodes in this **SceneTree**. + +.. rst-class:: classref-item-separator ---- .. _class_SceneTree_method_get_nodes_in_group: -- :ref:`Node[]` **get_nodes_in_group** **(** :ref:`StringName` group **)** +.. rst-class:: classref-method + +:ref:`Node[]` **get_nodes_in_group** **(** :ref:`StringName` group **)** Returns a list of all nodes assigned to the given group. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_get_processed_tweens: -- :ref:`Tween[]` **get_processed_tweens** **(** **)** +.. rst-class:: classref-method -Returns an array of currently existing :ref:`Tween`\ s in the ``SceneTree`` (both running and paused). +:ref:`Tween[]` **get_processed_tweens** **(** **)** + +Returns an array of currently existing :ref:`Tween`\ s in the **SceneTree** (both running and paused). + +.. rst-class:: classref-item-separator ---- .. _class_SceneTree_method_has_group: -- :ref:`bool` **has_group** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_group** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the given group exists. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_notify_group: -- void **notify_group** **(** :ref:`StringName` group, :ref:`int` notification **)** +.. rst-class:: classref-method + +void **notify_group** **(** :ref:`StringName` group, :ref:`int` notification **)** Sends the given notification to all members of the ``group``. \ **Note:** :ref:`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 lots of members. To wait for one frame, use :ref:`notify_group_flags` with the :ref:`GROUP_CALL_DEFERRED` flag. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_notify_group_flags: -- void **notify_group_flags** **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`int` notification **)** +.. rst-class:: classref-method + +void **notify_group_flags** **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`int` notification **)** Sends the given notification to all members of the ``group``, respecting the given :ref:`GroupCallFlags`. \ **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`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``call_flags`` argument, notifications will be sent with a one-frame delay in a way similar to using ``Object.call_deferred("notification", ...)``. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_queue_delete: -- void **queue_delete** **(** :ref:`Object` obj **)** +.. rst-class:: classref-method + +void **queue_delete** **(** :ref:`Object` obj **)** Queues the given object for deletion, delaying the call to :ref:`Object.free` to after the current frame. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_quit: -- void **quit** **(** :ref:`int` exit_code=0 **)** +.. rst-class:: classref-method + +void **quit** **(** :ref:`int` exit_code=0 **)** 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. @@ -554,41 +721,57 @@ For portability reasons, the exit code should be set between 0 and 125 (inclusiv \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_reload_current_scene: -- :ref:`Error` **reload_current_scene** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **reload_current_scene** **(** **)** Reloads the currently active scene. Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_UNCONFIGURED` if no :ref:`current_scene` was defined yet, :ref:`@GlobalScope.ERR_CANT_OPEN` if :ref:`current_scene` cannot be loaded into a :ref:`PackedScene`, or :ref:`@GlobalScope.ERR_CANT_CREATE` if the scene cannot be instantiated. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_set_group: -- void **set_group** **(** :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_group** **(** :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** Sets the given ``property`` to ``value`` on all members of the given group. \ **Note:** :ref:`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. To wait for one frame, use :ref:`set_group_flags` with the :ref:`GROUP_CALL_DEFERRED` flag. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_set_group_flags: -- void **set_group_flags** **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_group_flags** **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** Sets the given ``property`` to ``value`` on all members of the given group, respecting the given :ref:`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`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``call_flags`` argument, properties will be set with a one-frame delay in a way similar to :ref:`Object.call_deferred`. +.. rst-class:: classref-item-separator + ---- .. _class_SceneTree_method_set_multiplayer: -- void **set_multiplayer** **(** :ref:`MultiplayerAPI` multiplayer, :ref:`NodePath` root_path=NodePath("") **)** +.. rst-class:: classref-method + +void **set_multiplayer** **(** :ref:`MultiplayerAPI` multiplayer, :ref:`NodePath` root_path=NodePath("") **)** Sets a custom :ref:`MultiplayerAPI` with the given ``root_path`` (controlling also the relative subpaths), or override the default one if ``root_path`` is empty. diff --git a/classes/class_scenetreetimer.rst b/classes/class_scenetreetimer.rst index 77f10894a..25693a321 100644 --- a/classes/class_scenetreetimer.rst +++ b/classes/class_scenetreetimer.rst @@ -14,6 +14,8 @@ SceneTreeTimer One-shot timer. +.. rst-class:: classref-introduction-group + Description ----------- @@ -44,34 +46,54 @@ As opposed to :ref:`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`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------+ -| :ref:`float` | :ref:`time_left` | -+---------------------------+-----------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------+ + | :ref:`float` | :ref:`time_left` | + +---------------------------+-----------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_SceneTreeTimer_signal_timeout: -- **timeout** **(** **)** +.. rst-class:: classref-signal + +**timeout** **(** **)** Emitted when the timer reaches 0. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_SceneTreeTimer_property_time_left: -- :ref:`float` **time_left** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_time_left(value) | -+----------+----------------------+ -| *Getter* | get_time_left() | -+----------+----------------------+ +:ref:`float` **time_left** + +.. rst-class:: classref-property-setget + +- void **set_time_left** **(** :ref:`float` value **)** +- :ref:`float` **get_time_left** **(** **)** The time remaining (in seconds). diff --git a/classes/class_script.rst b/classes/class_script.rst index 3e2716ebc..2fbf956fa 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -16,6 +16,8 @@ Script A class stored as a resource. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,166 +27,241 @@ This is the base class for all scripts and should not be used directly. Trying t The ``new`` method of a script subclass creates a new instance. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Scripting documentation index <../tutorials/scripting/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-------------------------------------------------------+ -| :ref:`String` | :ref:`source_code` | -+-----------------------------+-------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------+ + | :ref:`String` | :ref:`source_code` | + +-----------------------------+-------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_instantiate` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Script` | :ref:`get_base_script` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_instance_base_type` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_property_default_value` **(** :ref:`StringName` property **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_script_constant_map` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_script_method_list` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_script_property_list` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_script_signal_list` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_script_signal` **(** :ref:`StringName` signal_name **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_source_code` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`instance_has` **(** :ref:`Object` base_object **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_tool` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`reload` **(** :ref:`bool` keep_state=false **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_instantiate` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script` | :ref:`get_base_script` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_instance_base_type` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_property_default_value` **(** :ref:`StringName` property **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_script_constant_map` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_script_method_list` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_script_property_list` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_script_signal_list` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_script_signal` **(** :ref:`StringName` signal_name **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_source_code` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`instance_has` **(** :ref:`Object` base_object **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_tool` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`reload` **(** :ref:`bool` keep_state=false **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Script_property_source_code: -- :ref:`String` **source_code** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_source_code(value) | -+----------+------------------------+ -| *Getter* | get_source_code() | -+----------+------------------------+ +:ref:`String` **source_code** + +.. rst-class:: classref-property-setget + +- void **set_source_code** **(** :ref:`String` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Script_method_can_instantiate: -- :ref:`bool` **can_instantiate** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_instantiate** **(** **)** |const| Returns ``true`` if the script can be instantiated. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_get_base_script: -- :ref:`Script` **get_base_script** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Script` **get_base_script** **(** **)** |const| Returns the script directly inherited by this script. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_get_instance_base_type: -- :ref:`StringName` **get_instance_base_type** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_instance_base_type** **(** **)** |const| Returns the script's base type. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_get_property_default_value: -- :ref:`Variant` **get_property_default_value** **(** :ref:`StringName` property **)** +.. rst-class:: classref-method + +:ref:`Variant` **get_property_default_value** **(** :ref:`StringName` property **)** Returns the default value of the specified property. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_get_script_constant_map: -- :ref:`Dictionary` **get_script_constant_map** **(** **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_script_constant_map** **(** **)** Returns a dictionary containing constant names and their values. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_get_script_method_list: -- :ref:`Dictionary[]` **get_script_method_list** **(** **)** +.. rst-class:: classref-method -Returns the list of methods in this ``Script``. +:ref:`Dictionary[]` **get_script_method_list** **(** **)** + +Returns the list of methods in this **Script**. + +.. rst-class:: classref-item-separator ---- .. _class_Script_method_get_script_property_list: -- :ref:`Dictionary[]` **get_script_property_list** **(** **)** +.. rst-class:: classref-method -Returns the list of properties in this ``Script``. +:ref:`Dictionary[]` **get_script_property_list** **(** **)** + +Returns the list of properties in this **Script**. + +.. rst-class:: classref-item-separator ---- .. _class_Script_method_get_script_signal_list: -- :ref:`Dictionary[]` **get_script_signal_list** **(** **)** +.. rst-class:: classref-method -Returns the list of user signals defined in this ``Script``. +:ref:`Dictionary[]` **get_script_signal_list** **(** **)** + +Returns the list of user signals defined in this **Script**. + +.. rst-class:: classref-item-separator ---- .. _class_Script_method_has_script_signal: -- :ref:`bool` **has_script_signal** **(** :ref:`StringName` signal_name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_script_signal** **(** :ref:`StringName` signal_name **)** |const| Returns ``true`` if the script, or a base class, defines a signal with the given name. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_has_source_code: -- :ref:`bool` **has_source_code** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_source_code** **(** **)** |const| Returns ``true`` if the script contains non-empty source code. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_instance_has: -- :ref:`bool` **instance_has** **(** :ref:`Object` base_object **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **instance_has** **(** :ref:`Object` base_object **)** |const| Returns ``true`` if ``base_object`` is an instance of this script. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_is_tool: -- :ref:`bool` **is_tool** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_tool** **(** **)** |const| Returns ``true`` if the script is a tool script. A tool script can run in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_Script_method_reload: -- :ref:`Error` **reload** **(** :ref:`bool` keep_state=false **)** +.. rst-class:: classref-method + +:ref:`Error` **reload** **(** :ref:`bool` keep_state=false **)** Reloads the script's class implementation. Returns an error code. diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index 964e02ba9..309943f57 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -14,10 +14,12 @@ ScriptCreateDialog The Editor's popup dialog for creating new :ref:`Script` files. +.. rst-class:: classref-introduction-group + Description ----------- -The ``ScriptCreateDialog`` creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the :ref:`Window.popup` methods. +The **ScriptCreateDialog** creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the :ref:`Window.popup` methods. .. tabs:: @@ -42,39 +44,65 @@ The ``ScriptCreateDialog`` creates script files according to a given template fo +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | -+-----------------------------+-------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | ok_button_text | ``"Create"`` (overrides :ref:`AcceptDialog`) | -+-----------------------------+-------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | title | ``"Attach Node Script"`` (overrides :ref:`Window`) | -+-----------------------------+-------------------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | + +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | ok_button_text | ``"Create"`` (overrides :ref:`AcceptDialog`) | + +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | title | ``"Attach Node Script"`` (overrides :ref:`Window`) | + +-----------------------------+-------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`config` **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true, :ref:`bool` load_enabled=true **)** | -+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`config` **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true, :ref:`bool` load_enabled=true **)** | + +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ScriptCreateDialog_signal_script_created: -- **script_created** **(** :ref:`Script` script **)** +.. rst-class:: classref-signal + +**script_created** **(** :ref:`Script` script **)** Emitted when the user clicks the OK button. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ScriptCreateDialog_method_config: -- void **config** **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true, :ref:`bool` load_enabled=true **)** +.. rst-class:: classref-method + +void **config** **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true, :ref:`bool` load_enabled=true **)** Prefills required fields to configure the ScriptCreateDialog for use. diff --git a/classes/class_scripteditor.rst b/classes/class_scripteditor.rst index a266ca254..c529f1281 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -14,113 +14,168 @@ ScriptEditor Godot editor's script editor. +.. rst-class:: classref-introduction-group + Description ----------- **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_script_editor`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptEditorBase` | :ref:`get_current_editor` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Script` | :ref:`get_current_script` **(** **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptEditorBase[]` | :ref:`get_open_script_editors` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Script[]` | :ref:`get_open_scripts` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`goto_line` **(** :ref:`int` line_number **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`open_script_create_dialog` **(** :ref:`String` base_name, :ref:`String` base_path **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`register_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unregister_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditorBase` | :ref:`get_current_editor` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script` | :ref:`get_current_script` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditorBase[]` | :ref:`get_open_script_editors` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script[]` | :ref:`get_open_scripts` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`goto_line` **(** :ref:`int` line_number **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`open_script_create_dialog` **(** :ref:`String` base_name, :ref:`String` base_path **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unregister_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ScriptEditor_signal_editor_script_changed: -- **editor_script_changed** **(** :ref:`Script` script **)** +.. rst-class:: classref-signal + +**editor_script_changed** **(** :ref:`Script` script **)** Emitted when user changed active script. Argument is a freshly activated :ref:`Script`. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_signal_script_close: -- **script_close** **(** :ref:`Script` script **)** +.. rst-class:: classref-signal + +**script_close** **(** :ref:`Script` script **)** Emitted when editor is about to close the active script. Argument is a :ref:`Script` that is going to be closed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ScriptEditor_method_get_current_editor: -- :ref:`ScriptEditorBase` **get_current_editor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`ScriptEditorBase` **get_current_editor** **(** **)** |const| Returns the :ref:`ScriptEditorBase` object that the user is currently editing. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_method_get_current_script: -- :ref:`Script` **get_current_script** **(** **)** +.. rst-class:: classref-method + +:ref:`Script` **get_current_script** **(** **)** Returns a :ref:`Script` that is currently active in editor. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_method_get_open_script_editors: -- :ref:`ScriptEditorBase[]` **get_open_script_editors** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`ScriptEditorBase[]` **get_open_script_editors** **(** **)** |const| Returns an array with all :ref:`ScriptEditorBase` objects which are currently open in editor. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_method_get_open_scripts: -- :ref:`Script[]` **get_open_scripts** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Script[]` **get_open_scripts** **(** **)** |const| Returns an array with all :ref:`Script` objects which are currently open in editor. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_method_goto_line: -- void **goto_line** **(** :ref:`int` line_number **)** +.. rst-class:: classref-method + +void **goto_line** **(** :ref:`int` line_number **)** Goes to the specified line in the current script. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_method_open_script_create_dialog: -- void **open_script_create_dialog** **(** :ref:`String` base_name, :ref:`String` base_path **)** +.. rst-class:: classref-method + +void **open_script_create_dialog** **(** :ref:`String` base_name, :ref:`String` base_path **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_method_register_syntax_highlighter: -- void **register_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** +.. rst-class:: classref-method + +void **register_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** Registers the :ref:`EditorSyntaxHighlighter` to the editor, the :ref:`EditorSyntaxHighlighter` will be available on all open scripts. \ **Note:** Does not apply to scripts that are already opened. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditor_method_unregister_syntax_highlighter: -- void **unregister_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** +.. rst-class:: classref-method + +void **unregister_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter` syntax_highlighter **)** Unregisters the :ref:`EditorSyntaxHighlighter` from the editor. diff --git a/classes/class_scripteditorbase.rst b/classes/class_scripteditorbase.rst index 376e3c808..b8afb1d4a 100644 --- a/classes/class_scripteditorbase.rst +++ b/classes/class_scripteditorbase.rst @@ -14,107 +14,166 @@ ScriptEditorBase Base editor for editing scripts in the :ref:`ScriptEditor`. +.. rst-class:: classref-introduction-group + Description ----------- Base editor for editing scripts in the :ref:`ScriptEditor`, this does not include documentation items. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` highlighter **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`get_base_editor` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_syntax_highlighter` **(** :ref:`EditorSyntaxHighlighter` highlighter **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_base_editor` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ScriptEditorBase_signal_edited_script_changed: -- **edited_script_changed** **(** **)** +.. rst-class:: classref-signal + +**edited_script_changed** **(** **)** Emitted after script validation. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_go_to_help: -- **go_to_help** **(** :ref:`String` what **)** +.. rst-class:: classref-signal + +**go_to_help** **(** :ref:`String` what **)** Emitted when the user requests a specific documentation page. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_go_to_method: -- **go_to_method** **(** :ref:`Object` script, :ref:`String` method **)** +.. rst-class:: classref-signal + +**go_to_method** **(** :ref:`Object` script, :ref:`String` method **)** Emitted when the user requests to view a specific method of a script, similar to :ref:`request_open_script_at_line`. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_name_changed: -- **name_changed** **(** **)** +.. rst-class:: classref-signal + +**name_changed** **(** **)** Emitted after script validation or when the edited resource has changed. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_replace_in_files_requested: -- **replace_in_files_requested** **(** :ref:`String` text **)** +.. rst-class:: classref-signal + +**replace_in_files_requested** **(** :ref:`String` text **)** Emitted when the user request to find and replace text in the file system. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_request_help: -- **request_help** **(** :ref:`String` topic **)** +.. rst-class:: classref-signal + +**request_help** **(** :ref:`String` topic **)** Emitted when the user requests contextual help. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_request_open_script_at_line: -- **request_open_script_at_line** **(** :ref:`Object` script, :ref:`int` line **)** +.. rst-class:: classref-signal + +**request_open_script_at_line** **(** :ref:`Object` script, :ref:`int` line **)** Emitted when the user requests to view a specific line of a script, similar to :ref:`go_to_method`. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_request_save_history: -- **request_save_history** **(** **)** +.. rst-class:: classref-signal + +**request_save_history** **(** **)** Emitted when the user contextual goto and the item is in the same script. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_signal_search_in_files_requested: -- **search_in_files_requested** **(** :ref:`String` text **)** +.. rst-class:: classref-signal + +**search_in_files_requested** **(** :ref:`String` text **)** Emitted when the user request to search text in the file system. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ScriptEditorBase_method_add_syntax_highlighter: -- void **add_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter` highlighter **)** +.. rst-class:: classref-method + +void **add_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter` highlighter **)** Adds a :ref:`EditorSyntaxHighlighter` to the open script. +.. rst-class:: classref-item-separator + ---- .. _class_ScriptEditorBase_method_get_base_editor: -- :ref:`Control` **get_base_editor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Control` **get_base_editor** **(** **)** |const| Returns the underlying :ref:`Control` used for editing scripts. For text scripts, this is a :ref:`CodeEdit`. diff --git a/classes/class_scriptextension.rst b/classes/class_scriptextension.rst index fd7bc50a7..351c7f009 100644 --- a/classes/class_scriptextension.rst +++ b/classes/class_scriptextension.rst @@ -16,379 +16,512 @@ ScriptExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_can_instantiate` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_editor_can_reload_from_file` **(** **)** |virtual| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Script` | :ref:`_get_base_script` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_constants` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_documentation` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`_get_instance_base_type` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScriptLanguage` | :ref:`_get_language` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_member_line` **(** :ref:`StringName` member **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName[]` | :ref:`_get_members` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_method_info` **(** :ref:`StringName` method **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_rpc_config` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_script_method_list` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_script_property_list` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_script_signal_list` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_source_code` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_method` **(** :ref:`StringName` method **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_script_signal` **(** :ref:`StringName` signal **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_source_code` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_inherits_script` **(** :ref:`Script` script **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void* | :ref:`_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_instance_has` **(** :ref:`Object` object **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_placeholder_fallback_enabled` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_tool` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_valid` **(** **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_placeholder_erased` **(** void* placeholder **)** |virtual| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void* | :ref:`_placeholder_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_reload` **(** :ref:`bool` keep_state **)** |virtual| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_source_code` **(** :ref:`String` code **)** |virtual| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_update_exports` **(** **)** |virtual| | -+---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_instantiate` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_editor_can_reload_from_file` **(** **)** |virtual| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script` | :ref:`_get_base_script` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_constants` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_documentation` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_instance_base_type` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptLanguage` | :ref:`_get_language` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_member_line` **(** :ref:`StringName` member **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`_get_members` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_method_info` **(** :ref:`StringName` method **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_rpc_config` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_script_method_list` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_script_property_list` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_script_signal_list` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_source_code` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_method` **(** :ref:`StringName` method **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_script_signal` **(** :ref:`StringName` signal **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_source_code` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_inherits_script` **(** :ref:`Script` script **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void* | :ref:`_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_instance_has` **(** :ref:`Object` object **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_placeholder_fallback_enabled` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_tool` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_valid` **(** **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_placeholder_erased` **(** void* placeholder **)** |virtual| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void* | :ref:`_placeholder_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_reload` **(** :ref:`bool` keep_state **)** |virtual| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_source_code` **(** :ref:`String` code **)** |virtual| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_update_exports` **(** **)** |virtual| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ScriptExtension_method__can_instantiate: -- :ref:`bool` **_can_instantiate** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_instantiate** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__editor_can_reload_from_file: -- :ref:`bool` **_editor_can_reload_from_file** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_editor_can_reload_from_file** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_base_script: -- :ref:`Script` **_get_base_script** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Script` **_get_base_script** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_constants: -- :ref:`Dictionary` **_get_constants** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_constants** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_documentation: -- :ref:`Dictionary[]` **_get_documentation** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_documentation** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_instance_base_type: -- :ref:`StringName` **_get_instance_base_type** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`StringName` **_get_instance_base_type** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_language: -- :ref:`ScriptLanguage` **_get_language** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`ScriptLanguage` **_get_language** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_member_line: -- :ref:`int` **_get_member_line** **(** :ref:`StringName` member **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_member_line** **(** :ref:`StringName` member **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_members: -- :ref:`StringName[]` **_get_members** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`StringName[]` **_get_members** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_method_info: -- :ref:`Dictionary` **_get_method_info** **(** :ref:`StringName` method **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_method_info** **(** :ref:`StringName` method **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_property_default_value: -- :ref:`Variant` **_get_property_default_value** **(** :ref:`StringName` property **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_property_default_value** **(** :ref:`StringName` property **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_rpc_config: -- :ref:`Variant` **_get_rpc_config** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_get_rpc_config** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_script_method_list: -- :ref:`Dictionary[]` **_get_script_method_list** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_script_method_list** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_script_property_list: -- :ref:`Dictionary[]` **_get_script_property_list** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_script_property_list** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_script_signal_list: -- :ref:`Dictionary[]` **_get_script_signal_list** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_script_signal_list** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__get_source_code: -- :ref:`String` **_get_source_code** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_source_code** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__has_method: -- :ref:`bool` **_has_method** **(** :ref:`StringName` method **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_method** **(** :ref:`StringName` method **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__has_property_default_value: -- :ref:`bool` **_has_property_default_value** **(** :ref:`StringName` property **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_property_default_value** **(** :ref:`StringName` property **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__has_script_signal: -- :ref:`bool` **_has_script_signal** **(** :ref:`StringName` signal **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_script_signal** **(** :ref:`StringName` signal **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__has_source_code: -- :ref:`bool` **_has_source_code** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_source_code** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__inherits_script: -- :ref:`bool` **_inherits_script** **(** :ref:`Script` script **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_inherits_script** **(** :ref:`Script` script **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__instance_create: -- void* **_instance_create** **(** :ref:`Object` for_object **)** |virtual| |const| +.. rst-class:: classref-method + +void* **_instance_create** **(** :ref:`Object` for_object **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__instance_has: -- :ref:`bool` **_instance_has** **(** :ref:`Object` object **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_instance_has** **(** :ref:`Object` object **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__is_placeholder_fallback_enabled: -- :ref:`bool` **_is_placeholder_fallback_enabled** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_placeholder_fallback_enabled** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__is_tool: -- :ref:`bool` **_is_tool** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_tool** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__is_valid: -- :ref:`bool` **_is_valid** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_valid** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__placeholder_erased: -- void **_placeholder_erased** **(** void* placeholder **)** |virtual| +.. rst-class:: classref-method + +void **_placeholder_erased** **(** void* placeholder **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__placeholder_instance_create: -- void* **_placeholder_instance_create** **(** :ref:`Object` for_object **)** |virtual| |const| +.. rst-class:: classref-method + +void* **_placeholder_instance_create** **(** :ref:`Object` for_object **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__reload: -- :ref:`Error` **_reload** **(** :ref:`bool` keep_state **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_reload** **(** :ref:`bool` keep_state **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__set_source_code: -- void **_set_source_code** **(** :ref:`String` code **)** |virtual| +.. rst-class:: classref-method + +void **_set_source_code** **(** :ref:`String` code **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptExtension_method__update_exports: -- void **_update_exports** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_update_exports** **(** **)** |virtual| .. container:: contribute diff --git a/classes/class_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst index d51a451d6..90e4bc5b7 100644 --- a/classes/class_scriptlanguageextension.rst +++ b/classes/class_scriptlanguageextension.rst @@ -16,834 +16,1195 @@ ScriptLanguageExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_add_named_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void* | :ref:`_alloc_instance_binding_data` **(** :ref:`Object` object **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_auto_indent_code` **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_can_inherit_from_file` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_complete_code` **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_create_script` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_debug_get_current_stack_info` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_debug_get_error` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_debug_get_globals` **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_debug_get_stack_level_count` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_debug_get_stack_level_function` **(** :ref:`int` level **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void* | :ref:`_debug_get_stack_level_instance` **(** :ref:`int` level **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_debug_get_stack_level_line` **(** :ref:`int` level **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_debug_get_stack_level_locals` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_debug_get_stack_level_members` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_debug_parse_stack_level_expression` **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_execute_file` **(** :ref:`String` path **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_find_function` **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_finish` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_frame` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_free_instance_binding_data` **(** void* data **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_built_in_templates` **(** :ref:`StringName` object **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_comment_delimiters` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_extension` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_global_class_name` **(** :ref:`String` path **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_public_annotations` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_public_constants` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`_get_public_functions` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_reserved_words` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_string_delimiters` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_type` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_handles_global_class_type` **(** :ref:`String` type **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_named_classes` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_init` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_control_flow_keyword` **(** :ref:`String` keyword **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_using_templates` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_lookup_code` **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_make_function` **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Script` | :ref:`_make_template` **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_open_in_external_editor` **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_overrides_external_editor` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_profiling_get_accumulated_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_profiling_get_frame_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_profiling_start` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_profiling_stop` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_refcount_decremented_instance_binding` **(** :ref:`Object` object **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_refcount_incremented_instance_binding` **(** :ref:`Object` object **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_reload_all_scripts` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_reload_tool_script` **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_remove_named_global_constant` **(** :ref:`StringName` name **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_supports_builtin_mode` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_supports_documentation` **(** **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_thread_enter` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_thread_exit` **(** **)** |virtual| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_validate` **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_validate_path` **(** :ref:`String` path **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_named_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void* | :ref:`_alloc_instance_binding_data` **(** :ref:`Object` object **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_auto_indent_code` **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_inherit_from_file` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_complete_code` **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_create_script` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_debug_get_current_stack_info` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_debug_get_error` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_debug_get_globals` **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_debug_get_stack_level_count` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_debug_get_stack_level_function` **(** :ref:`int` level **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void* | :ref:`_debug_get_stack_level_instance` **(** :ref:`int` level **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_debug_get_stack_level_line` **(** :ref:`int` level **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_debug_get_stack_level_locals` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_debug_get_stack_level_members` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_debug_parse_stack_level_expression` **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_execute_file` **(** :ref:`String` path **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_find_function` **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_frame` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_instance_binding_data` **(** void* data **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_built_in_templates` **(** :ref:`StringName` object **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_comment_delimiters` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_extension` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_global_class_name` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_public_annotations` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_public_constants` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_public_functions` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_reserved_words` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_string_delimiters` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_type` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_global_class_type` **(** :ref:`String` type **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_named_classes` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_control_flow_keyword` **(** :ref:`String` keyword **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_using_templates` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_lookup_code` **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_make_function` **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script` | :ref:`_make_template` **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_open_in_external_editor` **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_overrides_external_editor` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_profiling_get_accumulated_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_profiling_get_frame_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_profiling_start` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_profiling_stop` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_refcount_decremented_instance_binding` **(** :ref:`Object` object **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_refcount_incremented_instance_binding` **(** :ref:`Object` object **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_reload_all_scripts` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_reload_tool_script` **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_remove_named_global_constant` **(** :ref:`StringName` name **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_supports_builtin_mode` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_supports_documentation` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_thread_enter` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_thread_exit` **(** **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_validate` **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_validate_path` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ScriptLanguageExtension_LookupResultType: -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_SCRIPT_LOCATION: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_CONSTANT: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_PROPERTY: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_METHOD: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_SIGNAL: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ENUM: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ANNOTATION: - -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_MAX: +.. rst-class:: classref-enumeration enum **LookupResultType**: -- **LOOKUP_RESULT_SCRIPT_LOCATION** = **0** +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_SCRIPT_LOCATION: -- **LOOKUP_RESULT_CLASS** = **1** +.. rst-class:: classref-enumeration-constant -- **LOOKUP_RESULT_CLASS_CONSTANT** = **2** +:ref:`LookupResultType` **LOOKUP_RESULT_SCRIPT_LOCATION** = ``0`` -- **LOOKUP_RESULT_CLASS_PROPERTY** = **3** -- **LOOKUP_RESULT_CLASS_METHOD** = **4** -- **LOOKUP_RESULT_CLASS_SIGNAL** = **5** +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS: -- **LOOKUP_RESULT_CLASS_ENUM** = **6** +.. rst-class:: classref-enumeration-constant -- **LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE** = **7** +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS** = ``1`` -- **LOOKUP_RESULT_CLASS_ANNOTATION** = **8** -- **LOOKUP_RESULT_MAX** = **9** + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_CONSTANT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_CONSTANT** = ``2`` + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_PROPERTY: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_PROPERTY** = ``3`` + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_METHOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_METHOD** = ``4`` + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_SIGNAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_SIGNAL** = ``5`` + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ENUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_ENUM** = ``6`` + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE** = ``7`` + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ANNOTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_ANNOTATION** = ``8`` + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_MAX** = ``9`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_ScriptLanguageExtension_CodeCompletionLocation: -.. _class_ScriptLanguageExtension_constant_LOCATION_LOCAL: - -.. _class_ScriptLanguageExtension_constant_LOCATION_PARENT_MASK: - -.. _class_ScriptLanguageExtension_constant_LOCATION_OTHER_USER_CODE: - -.. _class_ScriptLanguageExtension_constant_LOCATION_OTHER: +.. rst-class:: classref-enumeration enum **CodeCompletionLocation**: -- **LOCATION_LOCAL** = **0** --- The option is local to the location of the code completion query - e.g. a local variable. +.. _class_ScriptLanguageExtension_constant_LOCATION_LOCAL: -- **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 a the class or a parent class. +.. rst-class:: classref-enumeration-constant -- **LOCATION_OTHER_USER_CODE** = **512** --- The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). +:ref:`CodeCompletionLocation` **LOCATION_LOCAL** = ``0`` -- **LOCATION_OTHER** = **1024** --- The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. +The option is local to the location of the code completion query - e.g. a local variable. + +.. _class_ScriptLanguageExtension_constant_LOCATION_PARENT_MASK: + +.. rst-class:: classref-enumeration-constant + +: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 a the class or a parent class. + +.. _class_ScriptLanguageExtension_constant_LOCATION_OTHER_USER_CODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionLocation` **LOCATION_OTHER_USER_CODE** = ``512`` + +The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). + +.. _class_ScriptLanguageExtension_constant_LOCATION_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionLocation` **LOCATION_OTHER** = ``1024`` + +The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. + +.. rst-class:: classref-item-separator ---- .. _enum_ScriptLanguageExtension_CodeCompletionKind: -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CLASS: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FUNCTION: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_SIGNAL: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_VARIABLE: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MEMBER: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_ENUM: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CONSTANT: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_NODE_PATH: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FILE_PATH: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_PLAIN_TEXT: - -.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MAX: +.. rst-class:: classref-enumeration enum **CodeCompletionKind**: -- **CODE_COMPLETION_KIND_CLASS** = **0** +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CLASS: -- **CODE_COMPLETION_KIND_FUNCTION** = **1** +.. rst-class:: classref-enumeration-constant -- **CODE_COMPLETION_KIND_SIGNAL** = **2** +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_CLASS** = ``0`` -- **CODE_COMPLETION_KIND_VARIABLE** = **3** -- **CODE_COMPLETION_KIND_MEMBER** = **4** -- **CODE_COMPLETION_KIND_ENUM** = **5** +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FUNCTION: -- **CODE_COMPLETION_KIND_CONSTANT** = **6** +.. rst-class:: classref-enumeration-constant -- **CODE_COMPLETION_KIND_NODE_PATH** = **7** +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_FUNCTION** = ``1`` -- **CODE_COMPLETION_KIND_FILE_PATH** = **8** -- **CODE_COMPLETION_KIND_PLAIN_TEXT** = **9** -- **CODE_COMPLETION_KIND_MAX** = **10** +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_SIGNAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_SIGNAL** = ``2`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_VARIABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_VARIABLE** = ``3`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_MEMBER** = ``4`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_ENUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_ENUM** = ``5`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CONSTANT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_CONSTANT** = ``6`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_NODE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_NODE_PATH** = ``7`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FILE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_FILE_PATH** = ``8`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_PLAIN_TEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_PLAIN_TEXT** = ``9`` + + + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CodeCompletionKind` **CODE_COMPLETION_KIND_MAX** = ``10`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ScriptLanguageExtension_method__add_global_constant: -- void **_add_global_constant** **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_add_global_constant** **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__add_named_global_constant: -- void **_add_named_global_constant** **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| +.. rst-class:: classref-method + +void **_add_named_global_constant** **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__alloc_instance_binding_data: -- void* **_alloc_instance_binding_data** **(** :ref:`Object` object **)** |virtual| +.. rst-class:: classref-method + +void* **_alloc_instance_binding_data** **(** :ref:`Object` object **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__auto_indent_code: -- :ref:`String` **_auto_indent_code** **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_auto_indent_code** **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__can_inherit_from_file: -- :ref:`bool` **_can_inherit_from_file** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_can_inherit_from_file** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__complete_code: -- :ref:`Dictionary` **_complete_code** **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_complete_code** **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__create_script: -- :ref:`Object` **_create_script** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Object` **_create_script** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_current_stack_info: -- :ref:`Dictionary[]` **_debug_get_current_stack_info** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_debug_get_current_stack_info** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_error: -- :ref:`String` **_debug_get_error** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_debug_get_error** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_globals: -- :ref:`Dictionary` **_debug_get_globals** **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary` **_debug_get_globals** **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_stack_level_count: -- :ref:`int` **_debug_get_stack_level_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_debug_get_stack_level_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_stack_level_function: -- :ref:`String` **_debug_get_stack_level_function** **(** :ref:`int` level **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_debug_get_stack_level_function** **(** :ref:`int` level **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_stack_level_instance: -- void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)** |virtual| +.. rst-class:: classref-method + +void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_stack_level_line: -- :ref:`int` **_debug_get_stack_level_line** **(** :ref:`int` level **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_debug_get_stack_level_line** **(** :ref:`int` level **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_stack_level_locals: -- :ref:`Dictionary` **_debug_get_stack_level_locals** **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary` **_debug_get_stack_level_locals** **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_get_stack_level_members: -- :ref:`Dictionary` **_debug_get_stack_level_members** **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| +.. rst-class:: classref-method + +:ref:`Dictionary` **_debug_get_stack_level_members** **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__debug_parse_stack_level_expression: -- :ref:`String` **_debug_parse_stack_level_expression** **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| +.. rst-class:: classref-method + +:ref:`String` **_debug_parse_stack_level_expression** **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__execute_file: -- :ref:`Error` **_execute_file** **(** :ref:`String` path **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_execute_file** **(** :ref:`String` path **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__find_function: -- :ref:`int` **_find_function** **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_find_function** **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__finish: -- void **_finish** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_finish** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__frame: -- void **_frame** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_frame** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__free_instance_binding_data: -- void **_free_instance_binding_data** **(** void* data **)** |virtual| +.. rst-class:: classref-method + +void **_free_instance_binding_data** **(** void* data **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_built_in_templates: -- :ref:`Dictionary[]` **_get_built_in_templates** **(** :ref:`StringName` object **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_built_in_templates** **(** :ref:`StringName` object **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_comment_delimiters: -- :ref:`PackedStringArray` **_get_comment_delimiters** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_comment_delimiters** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_extension: -- :ref:`String` **_get_extension** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_extension** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_global_class_name: -- :ref:`Dictionary` **_get_global_class_name** **(** :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_global_class_name** **(** :ref:`String` path **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_name: -- :ref:`String` **_get_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_name** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_public_annotations: -- :ref:`Dictionary[]` **_get_public_annotations** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_public_annotations** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_public_constants: -- :ref:`Dictionary` **_get_public_constants** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_public_constants** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_public_functions: -- :ref:`Dictionary[]` **_get_public_functions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_public_functions** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_recognized_extensions: -- :ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_reserved_words: -- :ref:`PackedStringArray` **_get_reserved_words** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_reserved_words** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_string_delimiters: -- :ref:`PackedStringArray` **_get_string_delimiters** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_string_delimiters** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__get_type: -- :ref:`String` **_get_type** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_type** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__handles_global_class_type: -- :ref:`bool` **_handles_global_class_type** **(** :ref:`String` type **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_handles_global_class_type** **(** :ref:`String` type **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__has_named_classes: -- :ref:`bool` **_has_named_classes** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_named_classes** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__init: -- void **_init** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_init** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__is_control_flow_keyword: -- :ref:`bool` **_is_control_flow_keyword** **(** :ref:`String` keyword **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_control_flow_keyword** **(** :ref:`String` keyword **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__is_using_templates: -- :ref:`bool` **_is_using_templates** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_is_using_templates** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__lookup_code: -- :ref:`Dictionary` **_lookup_code** **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_lookup_code** **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__make_function: -- :ref:`String` **_make_function** **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_make_function** **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__make_template: -- :ref:`Script` **_make_template** **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Script` **_make_template** **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__open_in_external_editor: -- :ref:`Error` **_open_in_external_editor** **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_open_in_external_editor** **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__overrides_external_editor: -- :ref:`bool` **_overrides_external_editor** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_overrides_external_editor** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__profiling_get_accumulated_data: -- :ref:`int` **_profiling_get_accumulated_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_profiling_get_accumulated_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__profiling_get_frame_data: -- :ref:`int` **_profiling_get_frame_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_profiling_get_frame_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__profiling_start: -- void **_profiling_start** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_profiling_start** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__profiling_stop: -- void **_profiling_stop** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_profiling_stop** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__refcount_decremented_instance_binding: -- :ref:`bool` **_refcount_decremented_instance_binding** **(** :ref:`Object` object **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_refcount_decremented_instance_binding** **(** :ref:`Object` object **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__refcount_incremented_instance_binding: -- void **_refcount_incremented_instance_binding** **(** :ref:`Object` object **)** |virtual| +.. rst-class:: classref-method + +void **_refcount_incremented_instance_binding** **(** :ref:`Object` object **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__reload_all_scripts: -- void **_reload_all_scripts** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_reload_all_scripts** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__reload_tool_script: -- void **_reload_tool_script** **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| +.. rst-class:: classref-method + +void **_reload_tool_script** **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__remove_named_global_constant: -- void **_remove_named_global_constant** **(** :ref:`StringName` name **)** |virtual| +.. rst-class:: classref-method + +void **_remove_named_global_constant** **(** :ref:`StringName` name **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__supports_builtin_mode: -- :ref:`bool` **_supports_builtin_mode** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_supports_builtin_mode** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__supports_documentation: -- :ref:`bool` **_supports_documentation** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_supports_documentation** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__thread_enter: -- void **_thread_enter** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_thread_enter** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__thread_exit: -- void **_thread_exit** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_thread_exit** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__validate: -- :ref:`Dictionary` **_validate** **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_validate** **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_ScriptLanguageExtension_method__validate_path: -- :ref:`String` **_validate_path** **(** :ref:`String` path **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_validate_path** **(** :ref:`String` path **)** |virtual| |const| .. container:: contribute diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst index da6fcec34..f457a8be0 100644 --- a/classes/class_scrollbar.rst +++ b/classes/class_scrollbar.rst @@ -16,45 +16,65 @@ ScrollBar Base class for scroll bars. +.. rst-class:: classref-introduction-group + Description ----------- Scrollbars are a :ref:`Range`-based :ref:`Control`, that display a draggable area (the size of the page). Horizontal (:ref:`HScrollBar`) and Vertical (:ref:`VScrollBar`) versions are available. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ -| :ref:`float` | :ref:`custom_step` | ``-1.0`` | -+---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ -| :ref:`float` | step | ``0.0`` (overrides :ref:`Range`) | -+---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ + | :ref:`float` | :ref:`custom_step` | ``-1.0`` | + +---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ + | :ref:`float` | step | ``0.0`` (overrides :ref:`Range`) | + +---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ScrollBar_signal_scrolling: -- **scrolling** **(** **)** +.. rst-class:: classref-signal + +**scrolling** **(** **)** Emitted when the scrollbar is being scrolled. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_ScrollBar_property_custom_step: -- :ref:`float` **custom_step** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``-1.0`` | -+-----------+------------------------+ -| *Setter* | set_custom_step(value) | -+-----------+------------------------+ -| *Getter* | get_custom_step() | -+-----------+------------------------+ +:ref:`float` **custom_step** = ``-1.0`` -Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the ``ScrollBar`` is focused. +.. rst-class:: classref-property-setget + +- void **set_custom_step** **(** :ref:`float` value **)** +- :ref:`float` **get_custom_step** **(** **)** + +Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the **ScrollBar** is focused. .. |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.)` diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 55d6159e4..7dc961893 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -16,6 +16,8 @@ ScrollContainer A helper node for displaying scrollable elements such as lists. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,193 +27,262 @@ ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar` control. You can set :ref:`Control.SIZE_EXPAND` on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`follow_focus` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`ScrollMode` | :ref:`horizontal_scroll_mode` | ``1`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_deadzone` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_horizontal` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_vertical` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`ScrollMode` | :ref:`vertical_scroll_mode` | ``1`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`follow_focus` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`ScrollMode` | :ref:`horizontal_scroll_mode` | ``1`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_deadzone` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_horizontal` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_vertical` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`ScrollMode` | :ref:`vertical_scroll_mode` | ``1`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ensure_control_visible` **(** :ref:`Control` control **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`HScrollBar` | :ref:`get_h_scroll_bar` **(** **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ensure_control_visible` **(** :ref:`Control` control **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HScrollBar` | :ref:`get_h_scroll_bar` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+---------------------------------+-------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | -+---------------------------------+-------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | + +---------------------------------+-------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ScrollContainer_signal_scroll_ended: -- **scroll_ended** **(** **)** +.. rst-class:: classref-signal + +**scroll_ended** **(** **)** Emitted when scrolling stops. +.. rst-class:: classref-item-separator + ---- .. _class_ScrollContainer_signal_scroll_started: -- **scroll_started** **(** **)** +.. rst-class:: classref-signal + +**scroll_started** **(** **)** Emitted when scrolling is started. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_ScrollContainer_ScrollMode: -.. _class_ScrollContainer_constant_SCROLL_MODE_DISABLED: - -.. _class_ScrollContainer_constant_SCROLL_MODE_AUTO: - -.. _class_ScrollContainer_constant_SCROLL_MODE_SHOW_ALWAYS: - -.. _class_ScrollContainer_constant_SCROLL_MODE_SHOW_NEVER: +.. rst-class:: classref-enumeration enum **ScrollMode**: -- **SCROLL_MODE_DISABLED** = **0** --- Scrolling disabled, scrollbar will be invisible. +.. _class_ScrollContainer_constant_SCROLL_MODE_DISABLED: -- **SCROLL_MODE_AUTO** = **1** --- Scrolling enabled, scrollbar will be visible only if necessary, i.e. container's content is bigger than the container. +.. rst-class:: classref-enumeration-constant -- **SCROLL_MODE_SHOW_ALWAYS** = **2** --- Scrolling enabled, scrollbar will be always visible. +:ref:`ScrollMode` **SCROLL_MODE_DISABLED** = ``0`` -- **SCROLL_MODE_SHOW_NEVER** = **3** --- Scrolling enabled, scrollbar will be hidden. +Scrolling disabled, scrollbar will be invisible. + +.. _class_ScrollContainer_constant_SCROLL_MODE_AUTO: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScrollMode` **SCROLL_MODE_AUTO** = ``1`` + +Scrolling enabled, scrollbar will be visible only if necessary, i.e. container's content is bigger than the container. + +.. _class_ScrollContainer_constant_SCROLL_MODE_SHOW_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScrollMode` **SCROLL_MODE_SHOW_ALWAYS** = ``2`` + +Scrolling enabled, scrollbar will be always visible. + +.. _class_ScrollContainer_constant_SCROLL_MODE_SHOW_NEVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScrollMode` **SCROLL_MODE_SHOW_NEVER** = ``3`` + +Scrolling enabled, scrollbar will be hidden. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ScrollContainer_property_follow_focus: -- :ref:`bool` **follow_focus** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_follow_focus(value) | -+-----------+-------------------------+ -| *Getter* | is_following_focus() | -+-----------+-------------------------+ +:ref:`bool` **follow_focus** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_follow_focus** **(** :ref:`bool` value **)** +- :ref:`bool` **is_following_focus** **(** **)** If ``true``, the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible. +.. rst-class:: classref-item-separator + ---- .. _class_ScrollContainer_property_horizontal_scroll_mode: -- :ref:`ScrollMode` **horizontal_scroll_mode** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------------+ -| *Setter* | set_horizontal_scroll_mode(value) | -+-----------+-----------------------------------+ -| *Getter* | get_horizontal_scroll_mode() | -+-----------+-----------------------------------+ +:ref:`ScrollMode` **horizontal_scroll_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_horizontal_scroll_mode** **(** :ref:`ScrollMode` value **)** +- :ref:`ScrollMode` **get_horizontal_scroll_mode** **(** **)** Controls whether horizontal scrollbar can be used and when it should be visible. See :ref:`ScrollMode` for options. +.. rst-class:: classref-item-separator + ---- .. _class_ScrollContainer_property_scroll_deadzone: -- :ref:`int` **scroll_deadzone** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_deadzone(value) | -+-----------+---------------------+ -| *Getter* | get_deadzone() | -+-----------+---------------------+ +:ref:`int` **scroll_deadzone** = ``0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_deadzone** **(** :ref:`int` value **)** +- :ref:`int` **get_deadzone** **(** **)** + +Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive. + +.. rst-class:: classref-item-separator ---- .. _class_ScrollContainer_property_scroll_horizontal: -- :ref:`int` **scroll_horizontal** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_h_scroll(value) | -+-----------+---------------------+ -| *Getter* | get_h_scroll() | -+-----------+---------------------+ +:ref:`int` **scroll_horizontal** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_h_scroll** **(** :ref:`int` value **)** +- :ref:`int` **get_h_scroll** **(** **)** The current horizontal scroll value. +.. rst-class:: classref-item-separator + ---- .. _class_ScrollContainer_property_scroll_vertical: -- :ref:`int` **scroll_vertical** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_v_scroll(value) | -+-----------+---------------------+ -| *Getter* | get_v_scroll() | -+-----------+---------------------+ +:ref:`int` **scroll_vertical** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_v_scroll** **(** :ref:`int` value **)** +- :ref:`int` **get_v_scroll** **(** **)** The current vertical scroll value. +.. rst-class:: classref-item-separator + ---- .. _class_ScrollContainer_property_vertical_scroll_mode: -- :ref:`ScrollMode` **vertical_scroll_mode** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_vertical_scroll_mode(value) | -+-----------+---------------------------------+ -| *Getter* | get_vertical_scroll_mode() | -+-----------+---------------------------------+ +:ref:`ScrollMode` **vertical_scroll_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_vertical_scroll_mode** **(** :ref:`ScrollMode` value **)** +- :ref:`ScrollMode` **get_vertical_scroll_mode** **(** **)** Controls whether vertical scrollbar can be used and when it should be visible. See :ref:`ScrollMode` for options. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ScrollContainer_method_ensure_control_visible: -- void **ensure_control_visible** **(** :ref:`Control` control **)** +.. rst-class:: classref-method + +void **ensure_control_visible** **(** :ref:`Control` control **)** Ensures the given ``control`` is visible (must be a direct or indirect child of the ScrollContainer). Used by :ref:`follow_focus`. @@ -223,34 +294,50 @@ Ensures the given ``control`` is visible (must be a direct or indirect child of await get_tree().process_frame ensure_control_visible(child_node) +.. rst-class:: classref-item-separator + ---- .. _class_ScrollContainer_method_get_h_scroll_bar: -- :ref:`HScrollBar` **get_h_scroll_bar** **(** **)** +.. rst-class:: classref-method -Returns the horizontal scrollbar :ref:`HScrollBar` of this ``ScrollContainer``. +:ref:`HScrollBar` **get_h_scroll_bar** **(** **)** + +Returns the horizontal scrollbar :ref:`HScrollBar` of this **ScrollContainer**. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use :ref:`horizontal_scroll_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_ScrollContainer_method_get_v_scroll_bar: -- :ref:`VScrollBar` **get_v_scroll_bar** **(** **)** +.. rst-class:: classref-method -Returns the vertical scrollbar :ref:`VScrollBar` of this ``ScrollContainer``. +:ref:`VScrollBar` **get_v_scroll_bar** **(** **)** + +Returns the vertical scrollbar :ref:`VScrollBar` of this **ScrollContainer**. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use :ref:`vertical_scroll_mode`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_ScrollContainer_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty -The background :ref:`StyleBox` of the ``ScrollContainer``. +:ref:`StyleBox` **panel** + +The background :ref:`StyleBox` of the **ScrollContainer**. .. |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.)` diff --git a/classes/class_segmentshape2d.rst b/classes/class_segmentshape2d.rst index 96847b4dc..984b4fd75 100644 --- a/classes/class_segmentshape2d.rst +++ b/classes/class_segmentshape2d.rst @@ -14,52 +14,65 @@ SegmentShape2D Segment shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- 2D segment shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. Consists of two points, ``a`` and ``b``. -\ **Performance:** Being a primitive collision shape, ``SegmentShape2D`` is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). +\ **Performance:** Being a primitive collision shape, **SegmentShape2D** is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------------+-------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`a` | ``Vector2(0, 0)`` | -+-------------------------------+-------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`b` | ``Vector2(0, 10)`` | -+-------------------------------+-------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`a` | ``Vector2(0, 0)`` | + +-------------------------------+-------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`b` | ``Vector2(0, 10)`` | + +-------------------------------+-------------------------------------------+--------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SegmentShape2D_property_a: -- :ref:`Vector2` **a** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_a(value) | -+-----------+-------------------+ -| *Getter* | get_a() | -+-----------+-------------------+ +:ref:`Vector2` **a** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_a** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_a** **(** **)** The segment's first point position. +.. rst-class:: classref-item-separator + ---- .. _class_SegmentShape2D_property_b: -- :ref:`Vector2` **b** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2(0, 10)`` | -+-----------+--------------------+ -| *Setter* | set_b(value) | -+-----------+--------------------+ -| *Getter* | get_b() | -+-----------+--------------------+ +:ref:`Vector2` **b** = ``Vector2(0, 10)`` + +.. rst-class:: classref-property-setget + +- void **set_b** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_b** **(** **)** The segment's second point position. diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index da0265c43..bf41ba56f 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -14,51 +14,76 @@ Semaphore A synchronization semaphore. +.. rst-class:: classref-introduction-group + Description ----------- A synchronization semaphore which can be used to synchronize multiple :ref:`Thread`\ s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see :ref:`Mutex`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Using multiple threads <../tutorials/performance/using_multiple_threads>` +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+--------------------------------------------------------------+ -| void | :ref:`post` **(** **)** | -+---------------------------------------+--------------------------------------------------------------+ -| :ref:`Error` | :ref:`try_wait` **(** **)** | -+---------------------------------------+--------------------------------------------------------------+ -| void | :ref:`wait` **(** **)** | -+---------------------------------------+--------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------+ + | void | :ref:`post` **(** **)** | + +---------------------------------------+--------------------------------------------------------------+ + | :ref:`Error` | :ref:`try_wait` **(** **)** | + +---------------------------------------+--------------------------------------------------------------+ + | void | :ref:`wait` **(** **)** | + +---------------------------------------+--------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Semaphore_method_post: -- void **post** **(** **)** +.. rst-class:: classref-method -Lowers the ``Semaphore``, allowing one more thread in. +void **post** **(** **)** + +Lowers the **Semaphore**, allowing one more thread in. + +.. rst-class:: classref-item-separator ---- .. _class_Semaphore_method_try_wait: -- :ref:`Error` **try_wait** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **try_wait** **(** **)** Like :ref:`wait`, but won't block, so if the value is zero, fails immediately and returns :ref:`@GlobalScope.ERR_BUSY`. If non-zero, it returns :ref:`@GlobalScope.OK` to report success. +.. rst-class:: classref-item-separator + ---- .. _class_Semaphore_method_wait: -- void **wait** **(** **)** +.. rst-class:: classref-method -Waits for the ``Semaphore``, if its value is zero, blocks until non-zero. +void **wait** **(** **)** + +Waits for the **Semaphore**, if its value is zero, blocks until non-zero. .. |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.)` diff --git a/classes/class_separationrayshape2d.rst b/classes/class_separationrayshape2d.rst index 746f1a6a1..1874487ee 100644 --- a/classes/class_separationrayshape2d.rst +++ b/classes/class_separationrayshape2d.rst @@ -14,52 +14,65 @@ SeparationRayShape2D Separation ray shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- 2D separation ray shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. -\ **Performance:** Being a primitive collision shape, ``SeparationRayShape2D`` is fast to check collisions against. +\ **Performance:** Being a primitive collision shape, **SeparationRayShape2D** is fast to check collisions against. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`length` | ``20.0`` | -+---------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`slide_on_slope` | ``false`` | -+---------------------------+---------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`length` | ``20.0`` | + +---------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`slide_on_slope` | ``false`` | + +---------------------------+---------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SeparationRayShape2D_property_length: -- :ref:`float` **length** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``20.0`` | -+-----------+-------------------+ -| *Setter* | set_length(value) | -+-----------+-------------------+ -| *Getter* | get_length() | -+-----------+-------------------+ +:ref:`float` **length** = ``20.0`` + +.. rst-class:: classref-property-setget + +- void **set_length** **(** :ref:`float` value **)** +- :ref:`float` **get_length** **(** **)** The ray's length. +.. rst-class:: classref-item-separator + ---- .. _class_SeparationRayShape2D_property_slide_on_slope: -- :ref:`bool` **slide_on_slope** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_slide_on_slope(value) | -+-----------+---------------------------+ -| *Getter* | get_slide_on_slope() | -+-----------+---------------------------+ +:ref:`bool` **slide_on_slope** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_slide_on_slope** **(** :ref:`bool` value **)** +- :ref:`bool` **get_slide_on_slope** **(** **)** If ``false`` (default), the shape always separates and returns a normal along its own direction. diff --git a/classes/class_separationrayshape3d.rst b/classes/class_separationrayshape3d.rst index f1d5cf5c8..b31ecff06 100644 --- a/classes/class_separationrayshape3d.rst +++ b/classes/class_separationrayshape3d.rst @@ -14,52 +14,65 @@ SeparationRayShape3D Separation ray shape resource for 3D physics. +.. rst-class:: classref-introduction-group + Description ----------- 3D separation ray shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. -\ **Performance:** Being a primitive collision shape, ``SeparationRayShape3D`` is fast to check collisions against. +\ **Performance:** Being a primitive collision shape, **SeparationRayShape3D** is fast to check collisions against. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`length` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`slide_on_slope` | ``false`` | -+---------------------------+---------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`length` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`slide_on_slope` | ``false`` | + +---------------------------+---------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SeparationRayShape3D_property_length: -- :ref:`float` **length** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_length(value) | -+-----------+-------------------+ -| *Getter* | get_length() | -+-----------+-------------------+ +:ref:`float` **length** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_length** **(** :ref:`float` value **)** +- :ref:`float` **get_length** **(** **)** The ray's length. +.. rst-class:: classref-item-separator + ---- .. _class_SeparationRayShape3D_property_slide_on_slope: -- :ref:`bool` **slide_on_slope** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_slide_on_slope(value) | -+-----------+---------------------------+ -| *Getter* | get_slide_on_slope() | -+-----------+---------------------------+ +:ref:`bool` **slide_on_slope** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_slide_on_slope** **(** :ref:`bool` value **)** +- :ref:`bool` **get_slide_on_slope** **(** **)** If ``false`` (default), the shape always separates and returns a normal along its own direction. diff --git a/classes/class_separator.rst b/classes/class_separator.rst index 36d567ce5..4031a84cd 100644 --- a/classes/class_separator.rst +++ b/classes/class_separator.rst @@ -16,6 +16,8 @@ Separator Base class for separators. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_shader.rst b/classes/class_shader.rst index 1c924479b..7d23441db 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -16,86 +16,141 @@ Shader A custom shader program. +.. rst-class:: classref-introduction-group + Description ----------- This class allows you to define a custom shader program that can be used by a :ref:`ShaderMaterial`. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Shaders documentation index <../tutorials/shaders/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-----------------------------------------+--------+ -| :ref:`String` | :ref:`code` | ``""`` | -+-----------------------------+-----------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------+--------+ + | :ref:`String` | :ref:`code` | ``""`` | + +-----------------------------+-----------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_default_texture_parameter` **(** :ref:`StringName` name, :ref:`int` index=0 **)** |const| | -+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Mode` | :ref:`get_mode` **(** **)** |const| | -+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_parameter` **(** :ref:`StringName` name **)** |const| | -+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_texture_parameter` **(** :ref:`StringName` name, :ref:`Texture2D` texture, :ref:`int` index=0 **)** | -+-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_default_texture_parameter` **(** :ref:`StringName` name, :ref:`int` index=0 **)** |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mode` | :ref:`get_mode` **(** **)** |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_parameter` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_texture_parameter` **(** :ref:`StringName` name, :ref:`Texture2D` texture, :ref:`int` index=0 **)** | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Shader_Mode: -.. _class_Shader_constant_MODE_SPATIAL: - -.. _class_Shader_constant_MODE_CANVAS_ITEM: - -.. _class_Shader_constant_MODE_PARTICLES: - -.. _class_Shader_constant_MODE_SKY: - -.. _class_Shader_constant_MODE_FOG: +.. rst-class:: classref-enumeration enum **Mode**: -- **MODE_SPATIAL** = **0** --- Mode used to draw all 3D objects. +.. _class_Shader_constant_MODE_SPATIAL: -- **MODE_CANVAS_ITEM** = **1** --- Mode used to draw all 2D objects. +.. rst-class:: classref-enumeration-constant -- **MODE_PARTICLES** = **2** --- Mode used to calculate particle information on a per-particle basis. Not used for drawing. +:ref:`Mode` **MODE_SPATIAL** = ``0`` -- **MODE_SKY** = **3** --- Mode used for drawing skies. Only works with shaders attached to :ref:`Sky` objects. +Mode used to draw all 3D objects. -- **MODE_FOG** = **4** --- Mode used for setting the color and density of volumetric fog effect. +.. _class_Shader_constant_MODE_CANVAS_ITEM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_CANVAS_ITEM** = ``1`` + +Mode used to draw all 2D objects. + +.. _class_Shader_constant_MODE_PARTICLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_PARTICLES** = ``2`` + +Mode used to calculate particle information on a per-particle basis. Not used for drawing. + +.. _class_Shader_constant_MODE_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_SKY** = ``3`` + +Mode used for drawing skies. Only works with shaders attached to :ref:`Sky` objects. + +.. _class_Shader_constant_MODE_FOG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_FOG** = ``4`` + +Mode used for setting the color and density of volumetric fog effect. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Shader_property_code: -- :ref:`String` **code** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_code(value) | -+-----------+-----------------+ -| *Getter* | get_code() | -+-----------+-----------------+ +:ref:`String` **code** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_code** **(** :ref:`String` value **)** +- :ref:`String` **get_code** **(** **)** Returns the shader's code as the user has written it, not the full generated code used internally. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Shader_method_get_default_texture_parameter: -- :ref:`Texture2D` **get_default_texture_parameter** **(** :ref:`StringName` name, :ref:`int` index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_default_texture_parameter** **(** :ref:`StringName` name, :ref:`int` index=0 **)** |const| Returns the texture that is set as default for the specified parameter. @@ -103,29 +158,41 @@ Returns the texture that is set as default for the specified parameter. \ **Note:** If the sampler array is used use ``index`` to access the specified texture. +.. rst-class:: classref-item-separator + ---- .. _class_Shader_method_get_mode: -- :ref:`Mode` **get_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Mode` **get_mode** **(** **)** |const| Returns the shader mode for the shader, either :ref:`MODE_CANVAS_ITEM`, :ref:`MODE_SPATIAL` or :ref:`MODE_PARTICLES`. +.. rst-class:: classref-item-separator + ---- .. _class_Shader_method_has_parameter: -- :ref:`bool` **has_parameter** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_parameter** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the shader has this param defined as a uniform in its code. \ **Note:** ``name`` must match the name of the uniform in the code exactly. +.. rst-class:: classref-item-separator + ---- .. _class_Shader_method_set_default_texture_parameter: -- void **set_default_texture_parameter** **(** :ref:`StringName` name, :ref:`Texture2D` texture, :ref:`int` index=0 **)** +.. rst-class:: classref-method + +void **set_default_texture_parameter** **(** :ref:`StringName` name, :ref:`Texture2D` texture, :ref:`int` index=0 **)** 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`. diff --git a/classes/class_shaderinclude.rst b/classes/class_shaderinclude.rst index ceb5319d4..d7fc547cd 100644 --- a/classes/class_shaderinclude.rst +++ b/classes/class_shaderinclude.rst @@ -16,27 +16,37 @@ ShaderInclude There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+------------------------------------------------+--------+ -| :ref:`String` | :ref:`code` | ``""`` | -+-----------------------------+------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------+--------+ + | :ref:`String` | :ref:`code` | ``""`` | + +-----------------------------+------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ShaderInclude_property_code: -- :ref:`String` **code** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_code(value) | -+-----------+-----------------+ -| *Getter* | get_code() | -+-----------+-----------------+ +:ref:`String` **code** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_code** **(** :ref:`String` value **)** +- :ref:`String` **get_code** **(** **)** .. container:: contribute diff --git a/classes/class_shadermaterial.rst b/classes/class_shadermaterial.rst index a72c14b56..18824e014 100644 --- a/classes/class_shadermaterial.rst +++ b/classes/class_shadermaterial.rst @@ -14,61 +14,94 @@ ShaderMaterial A material that uses a custom :ref:`Shader` program. +.. rst-class:: classref-introduction-group + Description ----------- A material that uses a custom :ref:`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. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Shaders documentation index <../tutorials/shaders/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-----------------------------------------------------+ -| :ref:`Shader` | :ref:`shader` | -+-----------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------+ + | :ref:`Shader` | :ref:`shader` | + +-----------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_shader_parameter` **(** :ref:`StringName` param **)** |const| | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shader_parameter` **(** :ref:`StringName` param, :ref:`Variant` value **)** | -+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_shader_parameter` **(** :ref:`StringName` param **)** |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_shader_parameter` **(** :ref:`StringName` param, :ref:`Variant` value **)** | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ShaderMaterial_property_shader: -- :ref:`Shader` **shader** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_shader(value) | -+----------+-------------------+ -| *Getter* | get_shader() | -+----------+-------------------+ +:ref:`Shader` **shader** + +.. rst-class:: classref-property-setget + +- void **set_shader** **(** :ref:`Shader` value **)** +- :ref:`Shader` **get_shader** **(** **)** The :ref:`Shader` program used to render this material. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ShaderMaterial_method_get_shader_parameter: -- :ref:`Variant` **get_shader_parameter** **(** :ref:`StringName` param **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_shader_parameter** **(** :ref:`StringName` param **)** |const| Returns the current value set for this material of a uniform in the shader. +.. rst-class:: classref-item-separator + ---- .. _class_ShaderMaterial_method_set_shader_parameter: -- void **set_shader_parameter** **(** :ref:`StringName` param, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_shader_parameter** **(** :ref:`StringName` param, :ref:`Variant` value **)** Changes the value set for this material of a uniform in the shader. diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index 6ebe7f4dd..44d87f9bd 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -16,75 +16,106 @@ Shape2D Base class for all 2D shapes. +.. rst-class:: classref-introduction-group + Description ----------- Base class for all 2D shapes. All 2D shape types inherit from this. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`custom_solver_bias` | ``0.0`` | -+---------------------------+----------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`custom_solver_bias` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`collide` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`collide_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`collide_with_motion` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Color` color **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_rect` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`collide` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`collide_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`collide_with_motion` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Color` color **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_rect` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Shape2D_property_custom_solver_bias: -- :ref:`float` **custom_solver_bias** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_custom_solver_bias(value) | -+-----------+-------------------------------+ -| *Getter* | get_custom_solver_bias() | -+-----------+-------------------------------+ +:ref:`float` **custom_solver_bias** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_custom_solver_bias** **(** :ref:`float` value **)** +- :ref:`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. When set to ``0``, the default value from :ref:`ProjectSettings.physics/2d/solver/default_contact_bias` is used. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Shape2D_method_collide: -- :ref:`bool` **collide** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** +.. rst-class:: classref-method + +:ref:`bool` **collide** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** Returns ``true`` if this shape is colliding with another. This method needs the transformation matrix for this shape (``local_xform``), the shape to check collisions with (``with_shape``), and the transformation matrix of that shape (``shape_xform``). +.. rst-class:: classref-item-separator + ---- .. _class_Shape2D_method_collide_and_get_contacts: -- :ref:`PackedVector2Array` **collide_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **collide_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** Returns a list of contact point pairs where this shape touches another. @@ -94,21 +125,29 @@ A collision pair A, B can be used to calculate the collision normal with ``(B - This method needs the transformation matrix for this shape (``local_xform``), the shape to check collisions with (``with_shape``), and the transformation matrix of that shape (``shape_xform``). +.. rst-class:: classref-item-separator + ---- .. _class_Shape2D_method_collide_with_motion: -- :ref:`bool` **collide_with_motion** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** +.. rst-class:: classref-method + +:ref:`bool` **collide_with_motion** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** Returns whether this shape would collide with another, if a given movement was applied. This method needs the transformation matrix for this shape (``local_xform``), the movement to test on this shape (``local_motion``), the shape to check collisions with (``with_shape``), the transformation matrix of that shape (``shape_xform``), and the movement to test onto the other object (``shape_motion``). +.. rst-class:: classref-item-separator + ---- .. _class_Shape2D_method_collide_with_motion_and_get_contacts: -- :ref:`PackedVector2Array` **collide_with_motion_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **collide_with_motion_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. @@ -118,19 +157,27 @@ A collision pair A, B can be used to calculate the collision normal with ``(B - This method needs the transformation matrix for this shape (``local_xform``), the movement to test on this shape (``local_motion``), the shape to check collisions with (``with_shape``), the transformation matrix of that shape (``shape_xform``), and the movement to test onto the other object (``shape_motion``). +.. rst-class:: classref-item-separator + ---- .. _class_Shape2D_method_draw: -- void **draw** **(** :ref:`RID` canvas_item, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **draw** **(** :ref:`RID` canvas_item, :ref:`Color` color **)** Draws a solid shape onto a :ref:`CanvasItem` with the :ref:`RenderingServer` API filled with the specified ``color``. The exact drawing method is specific for each shape and cannot be configured. +.. rst-class:: classref-item-separator + ---- .. _class_Shape2D_method_get_rect: -- :ref:`Rect2` **get_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_rect** **(** **)** |const| Returns a :ref:`Rect2` representing the shapes boundary. diff --git a/classes/class_shape3d.rst b/classes/class_shape3d.rst index 42a78589b..8d17e3895 100644 --- a/classes/class_shape3d.rst +++ b/classes/class_shape3d.rst @@ -16,77 +16,105 @@ Shape3D Base class for all 3D shape resources. +.. rst-class:: classref-introduction-group + Description ----------- Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a :ref:`PhysicsBody3D` or :ref:`Area3D` objects. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`custom_solver_bias` | ``0.0`` | -+---------------------------+----------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`margin` | ``0.04`` | -+---------------------------+----------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`custom_solver_bias` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`margin` | ``0.04`` | + +---------------------------+----------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+------------------------------------------------------------------------+ -| :ref:`ArrayMesh` | :ref:`get_debug_mesh` **(** **)** | -+-----------------------------------+------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------+ + | :ref:`ArrayMesh` | :ref:`get_debug_mesh` **(** **)** | + +-----------------------------------+------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Shape3D_property_custom_solver_bias: -- :ref:`float` **custom_solver_bias** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_custom_solver_bias(value) | -+-----------+-------------------------------+ -| *Getter* | get_custom_solver_bias() | -+-----------+-------------------------------+ +:ref:`float` **custom_solver_bias** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_custom_solver_bias** **(** :ref:`float` value **)** +- :ref:`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. When set to ``0``, the default value from :ref:`ProjectSettings.physics/3d/solver/default_contact_bias` is used. +.. rst-class:: classref-item-separator + ---- .. _class_Shape3D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.04`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.04`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** The collision margin for the shape. Used in Bullet Physics only. Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Shape3D_method_get_debug_mesh: -- :ref:`ArrayMesh` **get_debug_mesh** **(** **)** +.. rst-class:: classref-method -Returns the :ref:`ArrayMesh` used to draw the debug collision for this ``Shape3D``. +:ref:`ArrayMesh` **get_debug_mesh** **(** **)** + +Returns the :ref:`ArrayMesh` used to draw the debug collision for this **Shape3D**. .. |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.)` diff --git a/classes/class_shapecast2d.rst b/classes/class_shapecast2d.rst index b81c09eab..d8d92203d 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -14,6 +14,8 @@ ShapeCast2D Node for physics collision sweep and immediate overlap queries. Similar to the :ref:`RayCast2D` node. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,363 +27,460 @@ The node can detect multiple collision objects, but it's usually used to detect \ **Note:** shape casting is more computationally expensive compared to ray casting. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`Array` | :ref:`collision_result` | ``[]`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`bool` | :ref:`exclude_parent` | ``true`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`margin` | ``0.0`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`int` | :ref:`max_results` | ``32`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`Shape2D` | :ref:`shape` | | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 50)`` | -+-------------------------------+----------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`Array` | :ref:`collision_result` | ``[]`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`exclude_parent` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`margin` | ``0.0`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`max_results` | ``32`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`Shape2D` | :ref:`shape` | | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 50)`` | + +-------------------------------+----------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception` **(** :ref:`CollisionObject2D` node **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_exceptions` **(** **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_shapecast_update` **(** **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_closest_collision_safe_fraction` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_closest_collision_unsafe_fraction` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_normal` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_point` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception` **(** :ref:`CollisionObject2D` node **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception` **(** :ref:`CollisionObject2D` node **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_exceptions` **(** **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_shapecast_update` **(** **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_closest_collision_safe_fraction` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_closest_collision_unsafe_fraction` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collision_normal` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_collision_point` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception` **(** :ref:`CollisionObject2D` node **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ShapeCast2D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, collision with :ref:`Area2D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, collision with :ref:`PhysicsBody2D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_collision_mask** **(** **)** The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_collision_result: -- :ref:`Array` **collision_result** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``[]`` | -+-----------+--------+ +:ref:`Array` **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` method. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** If ``true``, collisions will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_exclude_parent: -- :ref:`bool` **exclude_parent** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_exclude_parent_body(value) | -+-----------+--------------------------------+ -| *Getter* | get_exclude_parent_body() | -+-----------+--------------------------------+ +:ref:`bool` **exclude_parent** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_parent_body** **(** :ref:`bool` value **)** +- :ref:`bool` **get_exclude_parent_body** **(** **)** If ``true``, the parent node will be excluded from collision detection. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_max_results: -- :ref:`int` **max_results** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``32`` | -+-----------+------------------------+ -| *Setter* | set_max_results(value) | -+-----------+------------------------+ -| *Getter* | get_max_results() | -+-----------+------------------------+ +:ref:`int` **max_results** = ``32`` + +.. rst-class:: classref-property-setget + +- void **set_max_results** **(** :ref:`int` value **)** +- :ref:`int` **get_max_results** **(** **)** The number of intersections can be limited with this parameter, to reduce the processing time. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_shape: -- :ref:`Shape2D` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Shape2D` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Shape2D` value **)** +- :ref:`Shape2D` **get_shape** **(** **)** The :ref:`Shape2D`-derived shape to be used for collision queries. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_property_target_position: -- :ref:`Vector2` **target_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector2(0, 50)`` | -+-----------+----------------------------+ -| *Setter* | set_target_position(value) | -+-----------+----------------------------+ -| *Getter* | get_target_position() | -+-----------+----------------------------+ +:ref:`Vector2` **target_position** = ``Vector2(0, 50)`` + +.. rst-class:: classref-property-setget + +- void **set_target_position** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_target_position** **(** **)** The shape's destination point, relative to this node's ``position``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ShapeCast2D_method_add_exception: -- void **add_exception** **(** :ref:`CollisionObject2D` node **)** +.. rst-class:: classref-method + +void **add_exception** **(** :ref:`CollisionObject2D` node **)** Adds a collision exception so the shape does not report collisions with the specified :ref:`CollisionObject2D` node. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_add_exception_rid: -- void **add_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **add_exception_rid** **(** :ref:`RID` rid **)** Adds a collision exception so the shape does not report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_clear_exceptions: -- void **clear_exceptions** **(** **)** +.. rst-class:: classref-method + +void **clear_exceptions** **(** **)** Removes all collision exceptions for this shape. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_force_shapecast_update: -- void **force_shapecast_update** **(** **)** +.. rst-class:: classref-method + +void **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. \ **Note:** ``enabled == true`` is not required for this to work. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_get_closest_collision_safe_fraction: -- :ref:`float` **get_closest_collision_safe_fraction** **(** **)** |const| +.. rst-class:: classref-method -The fraction from the ``ShapeCast2D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. +:ref:`float` **get_closest_collision_safe_fraction** **(** **)** |const| + +The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. + +.. rst-class:: classref-item-separator ---- .. _class_ShapeCast2D_method_get_closest_collision_unsafe_fraction: -- :ref:`float` **get_closest_collision_unsafe_fraction** **(** **)** |const| +.. rst-class:: classref-method -The fraction from the ``ShapeCast2D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. +:ref:`float` **get_closest_collision_unsafe_fraction** **(** **)** |const| + +The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. + +.. rst-class:: classref-item-separator ---- .. _class_ShapeCast2D_method_get_collider: -- :ref:`Object` **get_collider** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** :ref:`int` index **)** |const| Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** :ref:`int` index **)** |const| Returns the :ref:`RID` of the collided object of one of the multiple collisions at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_get_collider_shape: -- :ref:`int` **get_collider_shape** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape** **(** :ref:`int` index **)** |const| 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` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_get_collision_count: -- :ref:`int` **get_collision_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_count** **(** **)** |const| The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider`, :ref:`get_collider_shape`, :ref:`get_collision_point`, and :ref:`get_collision_normal` methods. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_get_collision_normal: -- :ref:`Vector2` **get_collision_normal** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collision_normal** **(** :ref:`int` index **)** |const| Returns the normal of one of the multiple collisions at ``index`` of the intersecting object. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_get_collision_point: -- :ref:`Vector2` **get_collision_point** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_collision_point** **(** :ref:`int` index **)** |const| Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. \ **Note:** this point is in the **global** coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_is_colliding: -- :ref:`bool` **is_colliding** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_colliding** **(** **)** |const| Returns whether any object is intersecting with the shape's vector (considering the vector length). +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_remove_exception: -- void **remove_exception** **(** :ref:`CollisionObject2D` node **)** +.. rst-class:: classref-method + +void **remove_exception** **(** :ref:`CollisionObject2D` node **)** Removes a collision exception so the shape does report collisions with the specified :ref:`CollisionObject2D` node. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_remove_exception_rid: -- void **remove_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **remove_exception_rid** **(** :ref:`RID` rid **)** Removes a collision exception so the shape does report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast2D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst index 8f01b2e8e..b4d03043d 100644 --- a/classes/class_shapecast3d.rst +++ b/classes/class_shapecast3d.rst @@ -14,6 +14,8 @@ ShapeCast3D Node for physics collision sweep and immediate overlap queries. Similar to the :ref:`RayCast3D` node. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,393 +27,495 @@ The node can detect multiple collision objects, but it's usually used to detect \ **Note:** Shape casting is more computationally expensive compared to ray casting. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`collide_with_areas` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Array` | :ref:`collision_result` | ``[]`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`debug_shape_custom_color` | ``Color(0, 0, 0, 1)`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`exclude_parent` | ``true`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`margin` | ``0.0`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`max_results` | ``32`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Shape3D` | :ref:`shape` | | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, -1, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`collide_with_areas` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`collide_with_bodies` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Array` | :ref:`collision_result` | ``[]`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_shape_custom_color` | ``Color(0, 0, 0, 1)`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`exclude_parent` | ``true`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`margin` | ``0.0`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`max_results` | ``32`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Shape3D` | :ref:`shape` | | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, -1, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception` **(** :ref:`Object` node **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_exceptions` **(** **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_shapecast_update` **(** **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_closest_collision_safe_fraction` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_closest_collision_unsafe_fraction` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_normal` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_point` **(** :ref:`int` index **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception` **(** :ref:`Object` node **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_exceptions` **(** **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_shapecast_update` **(** **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_closest_collision_safe_fraction` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_closest_collision_unsafe_fraction` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_collider` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_collider_rid` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collider_shape` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_count` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collision_normal` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_collision_point` **(** :ref:`int` index **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_colliding` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception` **(** :ref:`Object` node **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ShapeCast3D_property_collide_with_areas: -- :ref:`bool` **collide_with_areas** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collide_with_areas(value) | -+-----------+---------------------------------+ -| *Getter* | is_collide_with_areas_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **collide_with_areas** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_areas** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_areas_enabled** **(** **)** If ``true``, collision with :ref:`Area3D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_collide_with_bodies: -- :ref:`bool` **collide_with_bodies** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_collide_with_bodies(value) | -+-----------+----------------------------------+ -| *Getter* | is_collide_with_bodies_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **collide_with_bodies** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_collide_with_bodies** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** If ``true``, collision with :ref:`PhysicsBody3D`\ s will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_collision_result: -- :ref:`Array` **collision_result** +.. rst-class:: classref-property -+-----------+--------+ -| *Default* | ``[]`` | -+-----------+--------+ +:ref:`Array` **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` method. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_debug_shape_custom_color: -- :ref:`Color` **debug_shape_custom_color** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-------------------------------------+ -| *Setter* | set_debug_shape_custom_color(value) | -+-----------+-------------------------------------+ -| *Getter* | get_debug_shape_custom_color() | -+-----------+-------------------------------------+ +:ref:`Color` **debug_shape_custom_color** = ``Color(0, 0, 0, 1)`` -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. +.. rst-class:: classref-property-setget + +- void **set_debug_shape_custom_color** **(** :ref:`Color` value **)** +- :ref:`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. If set to ``Color(0.0, 0.0, 0.0)`` (by default), the color set in :ref:`ProjectSettings.debug/shapes/collision/shape_color` is used. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | is_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_enabled** **(** **)** If ``true``, collisions will be reported. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_exclude_parent: -- :ref:`bool` **exclude_parent** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_exclude_parent_body(value) | -+-----------+--------------------------------+ -| *Getter* | get_exclude_parent_body() | -+-----------+--------------------------------+ +:ref:`bool` **exclude_parent** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_exclude_parent_body** **(** :ref:`bool` value **)** +- :ref:`bool` **get_exclude_parent_body** **(** **)** If ``true``, the parent node will be excluded from collision detection. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_max_results: -- :ref:`int` **max_results** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``32`` | -+-----------+------------------------+ -| *Setter* | set_max_results(value) | -+-----------+------------------------+ -| *Getter* | get_max_results() | -+-----------+------------------------+ +:ref:`int` **max_results** = ``32`` + +.. rst-class:: classref-property-setget + +- void **set_max_results** **(** :ref:`int` value **)** +- :ref:`int` **get_max_results** **(** **)** The number of intersections can be limited with this parameter, to reduce the processing time. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_shape: -- :ref:`Shape3D` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Shape3D` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Shape3D` value **)** +- :ref:`Shape3D` **get_shape** **(** **)** The :ref:`Shape3D`-derived shape to be used for collision queries. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_property_target_position: -- :ref:`Vector3` **target_position** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, -1, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_target_position(value) | -+-----------+----------------------------+ -| *Getter* | get_target_position() | -+-----------+----------------------------+ +:ref:`Vector3` **target_position** = ``Vector3(0, -1, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_target_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_target_position** **(** **)** The shape's destination point, relative to this node's ``position``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ShapeCast3D_method_add_exception: -- void **add_exception** **(** :ref:`Object` node **)** +.. rst-class:: classref-method + +void **add_exception** **(** :ref:`Object` node **)** Adds a collision exception so the shape does not report collisions with the specified :ref:`CollisionObject3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_add_exception_rid: -- void **add_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **add_exception_rid** **(** :ref:`RID` rid **)** Adds a collision exception so the shape does not report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_clear_exceptions: -- void **clear_exceptions** **(** **)** +.. rst-class:: classref-method -Removes all collision exceptions for this ``ShapeCast3D``. +void **clear_exceptions** **(** **)** + +Removes all collision exceptions for this **ShapeCast3D**. + +.. rst-class:: classref-item-separator ---- .. _class_ShapeCast3D_method_force_shapecast_update: -- void **force_shapecast_update** **(** **)** +.. rst-class:: classref-method + +void **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. \ **Note:** ``enabled == true`` is not required for this to work. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_get_closest_collision_safe_fraction: -- :ref:`float` **get_closest_collision_safe_fraction** **(** **)** |const| +.. rst-class:: classref-method -The fraction from the ``ShapeCast3D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. +:ref:`float` **get_closest_collision_safe_fraction** **(** **)** |const| + +The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. + +.. rst-class:: classref-item-separator ---- .. _class_ShapeCast3D_method_get_closest_collision_unsafe_fraction: -- :ref:`float` **get_closest_collision_unsafe_fraction** **(** **)** |const| +.. rst-class:: classref-method -The fraction from the ``ShapeCast3D``'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. +:ref:`float` **get_closest_collision_unsafe_fraction** **(** **)** |const| + +The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. + +.. rst-class:: classref-item-separator ---- .. _class_ShapeCast3D_method_get_collider: -- :ref:`Object` **get_collider** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_collider** **(** :ref:`int` index **)** |const| Returns the collided :ref:`Object` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_get_collider_rid: -- :ref:`RID` **get_collider_rid** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_collider_rid** **(** :ref:`int` index **)** |const| Returns the :ref:`RID` of the collided object of one of the multiple collisions at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_get_collider_shape: -- :ref:`int` **get_collider_shape** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collider_shape** **(** :ref:`int` index **)** |const| 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` returns ``false``). +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_get_collision_count: -- :ref:`int` **get_collision_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_count** **(** **)** |const| The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider`, :ref:`get_collider_shape`, :ref:`get_collision_point`, and :ref:`get_collision_normal` methods. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_get_collision_normal: -- :ref:`Vector3` **get_collision_normal** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collision_normal** **(** :ref:`int` index **)** |const| Returns the normal of one of the multiple collisions at ``index`` of the intersecting object. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_get_collision_point: -- :ref:`Vector3` **get_collision_point** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_collision_point** **(** :ref:`int` index **)** |const| Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. \ **Note:** this point is in the **global** coordinate system. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_is_colliding: -- :ref:`bool` **is_colliding** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_colliding** **(** **)** |const| Returns whether any object is intersecting with the shape's vector (considering the vector length). +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_remove_exception: -- void **remove_exception** **(** :ref:`Object` node **)** +.. rst-class:: classref-method + +void **remove_exception** **(** :ref:`Object` node **)** Removes a collision exception so the shape does report collisions with the specified :ref:`CollisionObject3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_remove_exception_rid: -- void **remove_exception_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **remove_exception_rid** **(** :ref:`RID` rid **)** Removes a collision exception so the shape does report collisions with the specified :ref:`RID`. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_resource_changed: -- void **resource_changed** **(** :ref:`Resource` resource **)** +.. rst-class:: classref-method + +void **resource_changed** **(** :ref:`Resource` resource **)** 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` resource is modified. +.. rst-class:: classref-item-separator + ---- .. _class_ShapeCast3D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst index 930e73f3e..7f89fb2b8 100644 --- a/classes/class_shortcut.rst +++ b/classes/class_shortcut.rst @@ -14,6 +14,8 @@ Shortcut A shortcut for binding input. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,65 +23,96 @@ Shortcuts are commonly used for interacting with a :ref:`Control` One shortcut can contain multiple :ref:`InputEvent`'s, allowing the possibility of triggering one action with multiple different inputs. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------+--------+ -| :ref:`Array` | :ref:`events` | ``[]`` | -+---------------------------+-----------------------------------------------+--------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------+--------+ + | :ref:`Array` | :ref:`events` | ``[]`` | + +---------------------------+-----------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_as_text` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_valid_event` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`matches_event` **(** :ref:`InputEvent` event **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_as_text` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_valid_event` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`matches_event` **(** :ref:`InputEvent` event **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Shortcut_property_events: -- :ref:`Array` **events** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``[]`` | -+-----------+-------------------+ -| *Setter* | set_events(value) | -+-----------+-------------------+ -| *Getter* | get_events() | -+-----------+-------------------+ +:ref:`Array` **events** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_events** **(** :ref:`Array` value **)** +- :ref:`Array` **get_events** **(** **)** The shortcut's :ref:`InputEvent` array. Generally the :ref:`InputEvent` used is an :ref:`InputEventKey`, though it can be any :ref:`InputEvent`, including an :ref:`InputEventAction`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Shortcut_method_get_as_text: -- :ref:`String` **get_as_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_as_text** **(** **)** |const| Returns the shortcut's first valid :ref:`InputEvent` as a :ref:`String`. +.. rst-class:: classref-item-separator + ---- .. _class_Shortcut_method_has_valid_event: -- :ref:`bool` **has_valid_event** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_valid_event** **(** **)** |const| Returns whether :ref:`events` contains an :ref:`InputEvent` which is valid. +.. rst-class:: classref-item-separator + ---- .. _class_Shortcut_method_matches_event: -- :ref:`bool` **matches_event** **(** :ref:`InputEvent` event **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **matches_event** **(** :ref:`InputEvent` event **)** |const| Returns whether any :ref:`InputEvent` in :ref:`events` equals ``event``. diff --git a/classes/class_signal.rst b/classes/class_signal.rst index e7ee28ae1..0a31fad1a 100644 --- a/classes/class_signal.rst +++ b/classes/class_signal.rst @@ -10,7 +10,41 @@ Signal ====== -Class representing a signal defined in an object. +Built-in type representing a signal defined in an object. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**Signal** is a built-in :ref:`Variant` type that represents a signal of an :ref:`Object` instance. Like all :ref:`Variant` types, it can be stored in variables and passed to functions. Signals allow all connected :ref:`Callable`\ s (and by extension their respective objects) to listen and react to events, without directly referencing one another. This keeps the code flexible and easier to manage. + +In GDScript, signals can be declared with the ``signal`` keyword. In C#, you may use the ``\ **Signal**\ `` attribute on a delegate. + + +.. tabs:: + + .. code-tab:: gdscript + + signal attacked + + # Additional arguments may be declared. + # These arguments must be passed when the signal is emitted. + signal item_dropped(item_name, amount) + + .. code-tab:: csharp + + **Signal**\ + delegate void Attacked(); + + // Additional arguments may be declared. + // These arguments must be passed when the signal is emitted. + **Signal**\ + delegate void ItemDropped(itemName: string, amount: int); + + + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -19,173 +53,252 @@ Tutorials - `GDScript Basics <../tutorials/scripting/gdscript/gdscript_basics.html#signals>`__ +.. rst-class:: classref-reftable-group + Constructors ------------ -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Signal` | :ref:`Signal` **(** **)** | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Signal` | :ref:`Signal` **(** :ref:`Signal` from **)** | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Signal` | :ref:`Signal` **(** :ref:`Object` object, :ref:`StringName` signal **)** | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Signal` | :ref:`Signal` **(** **)** | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Signal` | :ref:`Signal` **(** :ref:`Signal` from **)** | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Signal` | :ref:`Signal` **(** :ref:`Object` object, :ref:`StringName` signal **)** | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`connect` **(** :ref:`Callable` callable, :ref:`int` flags=0 **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect` **(** :ref:`Callable` callable **)** | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`emit` **(** ... **)** |vararg| |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_connections` **(** **)** |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_name` **(** **)** |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_object` **(** **)** |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_object_id` **(** **)** |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connected` **(** :ref:`Callable` callable **)** |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_null` **(** **)** |const| | -+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`connect` **(** :ref:`Callable` callable, :ref:`int` flags=0 **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect` **(** :ref:`Callable` callable **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`emit` **(** ... **)** |vararg| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_connections` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_name` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_object` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_object_id` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_connected` **(** :ref:`Callable` callable **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_null` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Signal` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Signal` right **)** | -+-------------------------+--------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Signal` right **)** | + +-------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Signal` right **)** | + +-------------------------+----------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_Signal_constructor_Signal: -- :ref:`Signal` **Signal** **(** **)** +.. rst-class:: classref-constructor -Constructs a null ``Signal`` with no object nor signal name bound. +:ref:`Signal` **Signal** **(** **)** + +Constructs an empty **Signal** with no object nor signal name bound. + +.. rst-class:: classref-item-separator ---- -- :ref:`Signal` **Signal** **(** :ref:`Signal` from **)** +.. rst-class:: classref-constructor -Constructs a ``Signal`` as a copy of the given ``Signal``. +:ref:`Signal` **Signal** **(** :ref:`Signal` from **)** + +Constructs a **Signal** as a copy of the given **Signal**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Signal` **Signal** **(** :ref:`Object` object, :ref:`StringName` signal **)** +.. rst-class:: classref-constructor -Creates a new ``Signal`` with the name ``signal`` in the specified ``object``. +:ref:`Signal` **Signal** **(** :ref:`Object` object, :ref:`StringName` signal **)** + +Creates a new **Signal** named ``signal`` in the specified ``object``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Signal_method_connect: -- :ref:`int` **connect** **(** :ref:`Callable` callable, :ref:`int` flags=0 **)** +.. rst-class:: classref-method -Connects this signal to the specified :ref:`Callable`, optionally providing connection flags. You can provide additional arguments to the connected method call by using :ref:`Callable.bind`. +:ref:`int` **connect** **(** :ref:`Callable` callable, :ref:`int` flags=0 **)** + +Connects this signal to the specified ``callable``. Optional ``flags`` can be also added to configure the connection's behavior (see :ref:`ConnectFlags` constants). You can provide additional arguments to the connected ``callable`` by using :ref:`Callable.bind`. + +A signal can only be connected once to the same :ref:`Callable`. If the signal is already connected, returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` and pushes an error message, unless the signal is connected with :ref:`Object.CONNECT_REFERENCE_COUNTED`. To prevent this, use :ref:`is_connected` first to check for existing connections. :: for button in $Buttons.get_children(): - button.pressed.connect(on_pressed.bind(button)) + button.pressed.connect(_on_pressed.bind(button)) - func on_pressed(button): + func _on_pressed(button): print(button.name, " was pressed") +.. rst-class:: classref-item-separator + ---- .. _class_Signal_method_disconnect: -- void **disconnect** **(** :ref:`Callable` callable **)** +.. rst-class:: classref-method -Disconnects this signal from the specified :ref:`Callable`. +void **disconnect** **(** :ref:`Callable` callable **)** + +Disconnects this signal from the specified :ref:`Callable`. If the connection does not exist, generates an error. Use :ref:`is_connected` to make sure that the connection exists. + +.. rst-class:: classref-item-separator ---- .. _class_Signal_method_emit: -- void **emit** **(** ... **)** |vararg| |const| +.. rst-class:: classref-method -Emits this signal to all connected objects. +void **emit** **(** ... **)** |vararg| |const| + +Emits this signal. All :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_Signal_method_get_connections: -- :ref:`Array` **get_connections** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_connections** **(** **)** |const| Returns the list of :ref:`Callable`\ s connected to this signal. +.. rst-class:: classref-item-separator + ---- .. _class_Signal_method_get_name: -- :ref:`StringName` **get_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_name** **(** **)** |const| Returns the name of this signal. +.. rst-class:: classref-item-separator + ---- .. _class_Signal_method_get_object: -- :ref:`Object` **get_object** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Object` **get_object** **(** **)** |const| Returns the object emitting this signal. +.. rst-class:: classref-item-separator + ---- .. _class_Signal_method_get_object_id: -- :ref:`int` **get_object_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_object_id** **(** **)** |const| Returns the ID of the object emitting this signal (see :ref:`Object.get_instance_id`). +.. rst-class:: classref-item-separator + ---- .. _class_Signal_method_is_connected: -- :ref:`bool` **is_connected** **(** :ref:`Callable` callable **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_connected** **(** :ref:`Callable` callable **)** |const| Returns ``true`` if the specified :ref:`Callable` is connected to this signal. +.. rst-class:: classref-item-separator + ---- .. _class_Signal_method_is_null: -- :ref:`bool` **is_null** **(** **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`bool` **is_null** **(** **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the signal's name does not exist in its object, or the object is not valid. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Signal_operator_neq_bool: +.. _class_Signal_operator_neq_Signal: -- :ref:`bool` **operator !=** **(** :ref:`Signal` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator !=** **(** :ref:`Signal` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the signals do not share the same object and name. + +.. rst-class:: classref-item-separator ---- -.. _class_Signal_operator_eq_bool: +.. _class_Signal_operator_eq_Signal: -- :ref:`bool` **operator ==** **(** :ref:`Signal` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator ==** **(** :ref:`Signal` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if both signals share the same object and 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.)` diff --git a/classes/class_skeleton2d.rst b/classes/class_skeleton2d.rst index 91e3ccefd..43ebf491a 100644 --- a/classes/class_skeleton2d.rst +++ b/classes/class_skeleton2d.rst @@ -14,6 +14,8 @@ Skeleton2D Skeleton for 2D characters and animated objects. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,95 +23,142 @@ Skeleton2D parents a hierarchy of :ref:`Bone2D` objects. It is a r To setup different types of inverse kinematics for the given Skeleton2D, a :ref:`SkeletonModificationStack2D` should be created. They can be applied by creating the desired number of modifications, which can be done by increasing :ref:`SkeletonModificationStack2D.modification_count`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`2D skeletons <../tutorials/animation/2d_skeletons>` +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`execute_modifications` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Bone2D` | :ref:`get_bone` **(** :ref:`int` idx **)** | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`get_bone_local_pose_override` **(** :ref:`int` bone_idx **)** | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModificationStack2D` | :ref:`get_modification_stack` **(** **)** |const| | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_skeleton` **(** **)** |const| | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_local_pose_override` **(** :ref:`int` bone_idx, :ref:`Transform2D` override_pose, :ref:`float` strength, :ref:`bool` persistent **)** | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_modification_stack` **(** :ref:`SkeletonModificationStack2D` modification_stack **)** | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`execute_modifications` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Bone2D` | :ref:`get_bone` **(** :ref:`int` idx **)** | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_bone_local_pose_override` **(** :ref:`int` bone_idx **)** | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack2D` | :ref:`get_modification_stack` **(** **)** |const| | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_skeleton` **(** **)** |const| | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_local_pose_override` **(** :ref:`int` bone_idx, :ref:`Transform2D` override_pose, :ref:`float` strength, :ref:`bool` persistent **)** | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_modification_stack` **(** :ref:`SkeletonModificationStack2D` modification_stack **)** | + +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Skeleton2D_signal_bone_setup_changed: -- **bone_setup_changed** **(** **)** +.. rst-class:: classref-signal + +**bone_setup_changed** **(** **)** Emitted when the :ref:`Bone2D` setup attached to this skeletons changes. This is primarily used internally within the skeleton. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Skeleton2D_method_execute_modifications: -- void **execute_modifications** **(** :ref:`float` delta, :ref:`int` execution_mode **)** +.. rst-class:: classref-method + +void **execute_modifications** **(** :ref:`float` delta, :ref:`int` execution_mode **)** Executes all the modifications on the :ref:`SkeletonModificationStack2D`, if the Skeleton3D has one assigned. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton2D_method_get_bone: -- :ref:`Bone2D` **get_bone** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`Bone2D` **get_bone** **(** :ref:`int` idx **)** Returns a :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton2D_method_get_bone_count: -- :ref:`int` **get_bone_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bone_count** **(** **)** |const| Returns the number of :ref:`Bone2D` nodes in the node hierarchy parented by Skeleton2D. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton2D_method_get_bone_local_pose_override: -- :ref:`Transform2D` **get_bone_local_pose_override** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +:ref:`Transform2D` **get_bone_local_pose_override** **(** :ref:`int` bone_idx **)** Returns the local pose override transform for ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton2D_method_get_modification_stack: -- :ref:`SkeletonModificationStack2D` **get_modification_stack** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SkeletonModificationStack2D` **get_modification_stack** **(** **)** |const| Returns the :ref:`SkeletonModificationStack2D` attached to this skeleton, if one exists. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton2D_method_get_skeleton: -- :ref:`RID` **get_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_skeleton** **(** **)** |const| Returns the :ref:`RID` of a Skeleton2D instance. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton2D_method_set_bone_local_pose_override: -- void **set_bone_local_pose_override** **(** :ref:`int` bone_idx, :ref:`Transform2D` override_pose, :ref:`float` strength, :ref:`bool` persistent **)** +.. rst-class:: classref-method + +void **set_bone_local_pose_override** **(** :ref:`int` bone_idx, :ref:`Transform2D` override_pose, :ref:`float` strength, :ref:`bool` persistent **)** Sets the local pose transform, ``override_pose``, for the bone at ``bone_idx``. @@ -117,11 +166,15 @@ Sets the local pose transform, ``override_pose``, for the bone at ``bone_idx``. \ **Note:** The pose transform needs to be a local transform relative to the :ref:`Bone2D` node at ``bone_idx``! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton2D_method_set_modification_stack: -- void **set_modification_stack** **(** :ref:`SkeletonModificationStack2D` modification_stack **)** +.. rst-class:: classref-method + +void **set_modification_stack** **(** :ref:`SkeletonModificationStack2D` modification_stack **)** Sets the :ref:`SkeletonModificationStack2D` attached to this skeleton. diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 3dec401b5..aab4cd36d 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -14,6 +14,8 @@ Skeleton3D Skeleton for characters and animated objects. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ The overall transform of a bone with respect to the skeleton is determined by th Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,439 +34,610 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`animate_physical_bones` | ``true`` | -+---------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`motion_scale` | ``1.0`` | -+---------------------------+---------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`show_rest_only` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`animate_physical_bones` | ``true`` | + +---------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`motion_scale` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_rest_only` | ``false`` | + +---------------------------+---------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_bone` **(** :ref:`String` name **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_bones` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_bones_global_pose_override` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_bones_local_pose_override` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Skin` | :ref:`create_skin_from_rest_transforms` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`execute_modifications` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_bone` **(** :ref:`String` name **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_update_all_bone_transforms` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_update_bone_child_transform` **(** :ref:`int` bone_idx **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_bone_children` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bone_global_pose` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bone_global_pose_no_override` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bone_global_pose_override` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bone_global_rest` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bone_local_pose_override` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bone_parent` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bone_pose` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_bone_pose_position` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Quaternion` | :ref:`get_bone_pose_rotation` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_bone_pose_scale` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bone_rest` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModificationStack3D` | :ref:`get_modification_stack` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_parentless_bones` **(** **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`global_pose_to_local_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` global_pose **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`global_pose_to_world_transform` **(** :ref:`Transform3D` global_pose **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`global_pose_z_forward_to_bone_forward` **(** :ref:`int` bone_idx, :ref:`Basis` basis **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_bone_enabled` **(** :ref:`int` bone_idx **)** |const| | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`local_pose_to_global_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` local_pose **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`localize_rests` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`physical_bones_add_collision_exception` **(** :ref:`RID` exception **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`physical_bones_remove_collision_exception` **(** :ref:`RID` exception **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`physical_bones_start_simulation` **(** :ref:`StringName[]` bones=[] **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`physical_bones_stop_simulation` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkinReference` | :ref:`register_skin` **(** :ref:`Skin` skin **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reset_bone_pose` **(** :ref:`int` bone_idx **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reset_bone_poses` **(** **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_enabled` **(** :ref:`int` bone_idx, :ref:`bool` enabled=true **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_global_pose_override` **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_local_pose_override` **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_name` **(** :ref:`int` bone_idx, :ref:`String` name **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_parent` **(** :ref:`int` bone_idx, :ref:`int` parent_idx **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_pose_position` **(** :ref:`int` bone_idx, :ref:`Vector3` position **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_pose_rotation` **(** :ref:`int` bone_idx, :ref:`Quaternion` rotation **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_pose_scale` **(** :ref:`int` bone_idx, :ref:`Vector3` scale **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_rest` **(** :ref:`int` bone_idx, :ref:`Transform3D` rest **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_modification_stack` **(** :ref:`SkeletonModificationStack3D` modification_stack **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unparent_bone_and_rest` **(** :ref:`int` bone_idx **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`world_transform_to_global_pose` **(** :ref:`Transform3D` world_transform **)** | -+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_bone` **(** :ref:`String` name **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_bones` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_bones_global_pose_override` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_bones_local_pose_override` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skin` | :ref:`create_skin_from_rest_transforms` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`execute_modifications` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_bone` **(** :ref:`String` name **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_all_bone_transforms` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_bone_child_transform` **(** :ref:`int` bone_idx **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_bone_children` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_count` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_pose` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_pose_no_override` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_pose_override` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_rest` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_local_pose_override` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_parent` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_pose` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_bone_pose_position` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_bone_pose_rotation` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_bone_pose_scale` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_rest` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack3D` | :ref:`get_modification_stack` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_parentless_bones` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`global_pose_to_local_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` global_pose **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`global_pose_to_world_transform` **(** :ref:`Transform3D` global_pose **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`global_pose_z_forward_to_bone_forward` **(** :ref:`int` bone_idx, :ref:`Basis` basis **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bone_enabled` **(** :ref:`int` bone_idx **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`local_pose_to_global_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` local_pose **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`localize_rests` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`physical_bones_add_collision_exception` **(** :ref:`RID` exception **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`physical_bones_remove_collision_exception` **(** :ref:`RID` exception **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`physical_bones_start_simulation` **(** :ref:`StringName[]` bones=[] **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`physical_bones_stop_simulation` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinReference` | :ref:`register_skin` **(** :ref:`Skin` skin **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reset_bone_pose` **(** :ref:`int` bone_idx **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reset_bone_poses` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_enabled` **(** :ref:`int` bone_idx, :ref:`bool` enabled=true **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_global_pose_override` **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_local_pose_override` **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_name` **(** :ref:`int` bone_idx, :ref:`String` name **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_parent` **(** :ref:`int` bone_idx, :ref:`int` parent_idx **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_pose_position` **(** :ref:`int` bone_idx, :ref:`Vector3` position **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_pose_rotation` **(** :ref:`int` bone_idx, :ref:`Quaternion` rotation **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_pose_scale` **(** :ref:`int` bone_idx, :ref:`Vector3` scale **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_rest` **(** :ref:`int` bone_idx, :ref:`Transform3D` rest **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_modification_stack` **(** :ref:`SkeletonModificationStack3D` modification_stack **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unparent_bone_and_rest` **(** :ref:`int` bone_idx **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`world_transform_to_global_pose` **(** :ref:`Transform3D` world_transform **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Skeleton3D_signal_bone_enabled_changed: -- **bone_enabled_changed** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-signal + +**bone_enabled_changed** **(** :ref:`int` bone_idx **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_Skeleton3D_signal_bone_pose_changed: -- **bone_pose_changed** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-signal + +**bone_pose_changed** **(** :ref:`int` bone_idx **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_signal_pose_updated: -- **pose_updated** **(** **)** +.. rst-class:: classref-signal + +**pose_updated** **(** **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator ---- .. _class_Skeleton3D_signal_show_rest_only_changed: -- **show_rest_only_changed** **(** **)** +.. rst-class:: classref-signal + +**show_rest_only_changed** **(** **)** + +.. container:: contribute + + There is currently no description for this signal. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Skeleton3D_constant_NOTIFICATION_UPDATE_SKELETON: -- **NOTIFICATION_UPDATE_SKELETON** = **50** +.. rst-class:: classref-constant + +**NOTIFICATION_UPDATE_SKELETON** = ``50`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Skeleton3D_property_animate_physical_bones: -- :ref:`bool` **animate_physical_bones** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------+ -| *Setter* | set_animate_physical_bones(value) | -+-----------+-----------------------------------+ -| *Getter* | get_animate_physical_bones() | -+-----------+-----------------------------------+ +:ref:`bool` **animate_physical_bones** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_animate_physical_bones** **(** :ref:`bool` value **)** +- :ref:`bool` **get_animate_physical_bones** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_property_motion_scale: -- :ref:`float` **motion_scale** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_motion_scale(value) | -+-----------+-------------------------+ -| *Getter* | get_motion_scale() | -+-----------+-------------------------+ +:ref:`float` **motion_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_motion_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_motion_scale** **(** **)** Multiplies the position 3D track animation. \ **Note:** Unless this value is ``1.0``, the key value in animation will not match the actual position value. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_property_show_rest_only: -- :ref:`bool` **show_rest_only** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_show_rest_only(value) | -+-----------+---------------------------+ -| *Getter* | is_show_rest_only() | -+-----------+---------------------------+ +:ref:`bool` **show_rest_only** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_show_rest_only** **(** :ref:`bool` value **)** +- :ref:`bool` **is_show_rest_only** **(** **)** .. 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 ------------------- .. _class_Skeleton3D_method_add_bone: -- void **add_bone** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **add_bone** **(** :ref:`String` name **)** Adds a bone, with name ``name``. :ref:`get_bone_count` will become the bone index. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_clear_bones: -- void **clear_bones** **(** **)** +.. rst-class:: classref-method + +void **clear_bones** **(** **)** Clear all the bones in this skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_clear_bones_global_pose_override: -- void **clear_bones_global_pose_override** **(** **)** +.. rst-class:: classref-method + +void **clear_bones_global_pose_override** **(** **)** Removes the global pose override on all bones in the skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_clear_bones_local_pose_override: -- void **clear_bones_local_pose_override** **(** **)** +.. rst-class:: classref-method + +void **clear_bones_local_pose_override** **(** **)** Deprecated. Local pose overrides will be removed. Removes the local pose override on all bones in the skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_create_skin_from_rest_transforms: -- :ref:`Skin` **create_skin_from_rest_transforms** **(** **)** +.. rst-class:: classref-method + +:ref:`Skin` **create_skin_from_rest_transforms** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_execute_modifications: -- void **execute_modifications** **(** :ref:`float` delta, :ref:`int` execution_mode **)** +.. rst-class:: classref-method + +void **execute_modifications** **(** :ref:`float` delta, :ref:`int` execution_mode **)** Executes all the modifications on the :ref:`SkeletonModificationStack3D`, if the Skeleton3D has one assigned. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_find_bone: -- :ref:`int` **find_bone** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find_bone** **(** :ref:`String` name **)** |const| Returns the bone index that matches ``name`` as its name. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_force_update_all_bone_transforms: -- void **force_update_all_bone_transforms** **(** **)** +.. rst-class:: classref-method + +void **force_update_all_bone_transforms** **(** **)** Force updates the bone transforms/poses for all bones in the skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_force_update_bone_child_transform: -- void **force_update_bone_child_transform** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **force_update_bone_child_transform** **(** :ref:`int` bone_idx **)** Force updates the bone transform for the bone at ``bone_idx`` and all of its children. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_children: -- :ref:`PackedInt32Array` **get_bone_children** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_bone_children** **(** :ref:`int` bone_idx **)** |const| Returns an array containing the bone indexes of all the children node of the passed in bone, ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_count: -- :ref:`int` **get_bone_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bone_count** **(** **)** |const| Returns the number of bones in the skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_global_pose: -- :ref:`Transform3D` **get_bone_global_pose** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bone_global_pose** **(** :ref:`int` bone_idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_global_pose_no_override: -- :ref:`Transform3D` **get_bone_global_pose_no_override** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bone_global_pose_no_override** **(** :ref:`int` bone_idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_global_pose_override: -- :ref:`Transform3D` **get_bone_global_pose_override** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bone_global_pose_override** **(** :ref:`int` bone_idx **)** |const| Returns the global pose override transform for ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_global_rest: -- :ref:`Transform3D` **get_bone_global_rest** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bone_global_rest** **(** :ref:`int` bone_idx **)** |const| Returns the global rest transform for ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_local_pose_override: -- :ref:`Transform3D` **get_bone_local_pose_override** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bone_local_pose_override** **(** :ref:`int` bone_idx **)** |const| Returns the local pose override transform for ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_name: -- :ref:`String` **get_bone_name** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_bone_name** **(** :ref:`int` bone_idx **)** |const| Returns the name of the bone at index ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_parent: -- :ref:`int` **get_bone_parent** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bone_parent** **(** :ref:`int` bone_idx **)** |const| Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, then bone has no parent. \ **Note:** The parent bone returned will always be less than ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_pose: -- :ref:`Transform3D` **get_bone_pose** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bone_pose** **(** :ref:`int` bone_idx **)** |const| Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_pose_position: -- :ref:`Vector3` **get_bone_pose_position** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_bone_pose_position** **(** :ref:`int` bone_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_pose_rotation: -- :ref:`Quaternion` **get_bone_pose_rotation** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Quaternion` **get_bone_pose_rotation** **(** :ref:`int` bone_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_pose_scale: -- :ref:`Vector3` **get_bone_pose_scale** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_bone_pose_scale** **(** :ref:`int` bone_idx **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_bone_rest: -- :ref:`Transform3D` **get_bone_rest** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bone_rest** **(** :ref:`int` bone_idx **)** |const| Returns the rest transform for a bone ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_modification_stack: -- :ref:`SkeletonModificationStack3D` **get_modification_stack** **(** **)** +.. rst-class:: classref-method + +:ref:`SkeletonModificationStack3D` **get_modification_stack** **(** **)** Returns the modification stack attached to this skeleton, if one exists. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_get_parentless_bones: -- :ref:`PackedInt32Array` **get_parentless_bones** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_parentless_bones** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_global_pose_to_local_pose: -- :ref:`Transform3D` **global_pose_to_local_pose** **(** :ref:`int` bone_idx, :ref:`Transform3D` global_pose **)** +.. rst-class:: classref-method + +:ref:`Transform3D` **global_pose_to_local_pose** **(** :ref:`int` bone_idx, :ref:`Transform3D` global_pose **)** Takes the passed-in global pose and converts it to local pose transform. This can be used to easily convert a global pose from :ref:`get_bone_global_pose` to a global transform in :ref:`set_bone_local_pose_override`. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_global_pose_to_world_transform: -- :ref:`Transform3D` **global_pose_to_world_transform** **(** :ref:`Transform3D` global_pose **)** +.. rst-class:: classref-method + +:ref:`Transform3D` **global_pose_to_world_transform** **(** :ref:`Transform3D` global_pose **)** Deprecated. Use :ref:`Node3D` apis instead. @@ -470,117 +645,169 @@ Takes the passed-in global pose and converts it to a world transform. This can be used to easily convert a global pose from :ref:`get_bone_global_pose` to a global transform usable with a node's transform, like :ref:`Node3D.global_transform` for example. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_global_pose_z_forward_to_bone_forward: -- :ref:`Basis` **global_pose_z_forward_to_bone_forward** **(** :ref:`int` bone_idx, :ref:`Basis` basis **)** +.. rst-class:: classref-method + +:ref:`Basis` **global_pose_z_forward_to_bone_forward** **(** :ref:`int` bone_idx, :ref:`Basis` basis **)** Rotates the given :ref:`Basis` so that the forward axis of the Basis is facing in the forward direction of the bone at ``bone_idx``. This is helper function to make using :ref:`Transform3D.looking_at` easier with bone poses. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_is_bone_enabled: -- :ref:`bool` **is_bone_enabled** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_bone_enabled** **(** :ref:`int` bone_idx **)** |const| Returns whether the bone pose for the bone at ``bone_idx`` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_local_pose_to_global_pose: -- :ref:`Transform3D` **local_pose_to_global_pose** **(** :ref:`int` bone_idx, :ref:`Transform3D` local_pose **)** +.. rst-class:: classref-method + +:ref:`Transform3D` **local_pose_to_global_pose** **(** :ref:`int` bone_idx, :ref:`Transform3D` local_pose **)** Converts the passed-in local pose to a global pose relative to the inputted bone, ``bone_idx``. This could be used to convert :ref:`get_bone_pose` for use with the :ref:`set_bone_global_pose_override` function. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_localize_rests: -- void **localize_rests** **(** **)** +.. rst-class:: classref-method + +void **localize_rests** **(** **)** Returns all bones in the skeleton to their rest poses. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_physical_bones_add_collision_exception: -- void **physical_bones_add_collision_exception** **(** :ref:`RID` exception **)** +.. rst-class:: classref-method + +void **physical_bones_add_collision_exception** **(** :ref:`RID` exception **)** Adds a collision exception to the physical bone. Works just like the :ref:`RigidBody3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_physical_bones_remove_collision_exception: -- void **physical_bones_remove_collision_exception** **(** :ref:`RID` exception **)** +.. rst-class:: classref-method + +void **physical_bones_remove_collision_exception** **(** :ref:`RID` exception **)** Removes a collision exception to the physical bone. Works just like the :ref:`RigidBody3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_physical_bones_start_simulation: -- void **physical_bones_start_simulation** **(** :ref:`StringName[]` bones=[] **)** +.. rst-class:: classref-method + +void **physical_bones_start_simulation** **(** :ref:`StringName[]` bones=[] **)** Tells the :ref:`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_Skeleton3D_method_physical_bones_stop_simulation: -- void **physical_bones_stop_simulation** **(** **)** +.. rst-class:: classref-method + +void **physical_bones_stop_simulation** **(** **)** Tells the :ref:`PhysicalBone3D` nodes in the Skeleton to stop simulating. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_register_skin: -- :ref:`SkinReference` **register_skin** **(** :ref:`Skin` skin **)** +.. rst-class:: classref-method + +:ref:`SkinReference` **register_skin** **(** :ref:`Skin` skin **)** Binds the given Skin to the Skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_reset_bone_pose: -- void **reset_bone_pose** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **reset_bone_pose** **(** :ref:`int` bone_idx **)** Sets the bone pose to rest for ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_reset_bone_poses: -- void **reset_bone_poses** **(** **)** +.. rst-class:: classref-method + +void **reset_bone_poses** **(** **)** Sets all bone poses to rests. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_enabled: -- void **set_bone_enabled** **(** :ref:`int` bone_idx, :ref:`bool` enabled=true **)** +.. rst-class:: classref-method + +void **set_bone_enabled** **(** :ref:`int` bone_idx, :ref:`bool` enabled=true **)** Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone pose if ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_global_pose_override: -- void **set_bone_global_pose_override** **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** +.. rst-class:: classref-method + +void **set_bone_global_pose_override** **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. @@ -588,11 +815,15 @@ Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. \ **Note:** The pose transform needs to be a global pose! To convert a world transform from a :ref:`Node3D` to a global bone pose, multiply the :ref:`Transform3D.affine_inverse` of the node's :ref:`Node3D.global_transform` by the desired world transform +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_local_pose_override: -- void **set_bone_local_pose_override** **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** +.. rst-class:: classref-method + +void **set_bone_local_pose_override** **(** :ref:`int` bone_idx, :ref:`Transform3D` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** Deprecated. Local pose overrides will be removed. @@ -602,85 +833,121 @@ Sets the local pose transform, ``pose``, for the bone at ``bone_idx``. \ **Note:** The pose transform needs to be a local pose! Use :ref:`global_pose_to_local_pose` to convert a global pose to a local pose. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_name: -- void **set_bone_name** **(** :ref:`int` bone_idx, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_bone_name** **(** :ref:`int` bone_idx, :ref:`String` name **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_parent: -- void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`int` parent_idx **)** +.. rst-class:: classref-method + +void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`int` parent_idx **)** Sets the bone index ``parent_idx`` as the parent of the bone at ``bone_idx``. If -1, then bone has no parent. \ **Note:** ``parent_idx`` must be less than ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_pose_position: -- void **set_bone_pose_position** **(** :ref:`int` bone_idx, :ref:`Vector3` position **)** +.. rst-class:: classref-method + +void **set_bone_pose_position** **(** :ref:`int` bone_idx, :ref:`Vector3` position **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_pose_rotation: -- void **set_bone_pose_rotation** **(** :ref:`int` bone_idx, :ref:`Quaternion` rotation **)** +.. rst-class:: classref-method + +void **set_bone_pose_rotation** **(** :ref:`int` bone_idx, :ref:`Quaternion` rotation **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_pose_scale: -- void **set_bone_pose_scale** **(** :ref:`int` bone_idx, :ref:`Vector3` scale **)** +.. rst-class:: classref-method + +void **set_bone_pose_scale** **(** :ref:`int` bone_idx, :ref:`Vector3` scale **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_bone_rest: -- void **set_bone_rest** **(** :ref:`int` bone_idx, :ref:`Transform3D` rest **)** +.. rst-class:: classref-method + +void **set_bone_rest** **(** :ref:`int` bone_idx, :ref:`Transform3D` rest **)** Sets the rest transform for bone ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_set_modification_stack: -- void **set_modification_stack** **(** :ref:`SkeletonModificationStack3D` modification_stack **)** +.. rst-class:: classref-method + +void **set_modification_stack** **(** :ref:`SkeletonModificationStack3D` modification_stack **)** Sets the modification stack for this skeleton to the passed-in modification stack, ``modification_stack``. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_unparent_bone_and_rest: -- void **unparent_bone_and_rest** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **unparent_bone_and_rest** **(** :ref:`int` bone_idx **)** Unparents the bone at ``bone_idx`` and sets its rest position to that of its parent prior to being reset. +.. rst-class:: classref-item-separator + ---- .. _class_Skeleton3D_method_world_transform_to_global_pose: -- :ref:`Transform3D` **world_transform_to_global_pose** **(** :ref:`Transform3D` world_transform **)** +.. rst-class:: classref-method + +:ref:`Transform3D` **world_transform_to_global_pose** **(** :ref:`Transform3D` world_transform **)** Deprecated. Use :ref:`Node3D` apis instead. diff --git a/classes/class_skeletonik3d.rst b/classes/class_skeletonik3d.rst index aed92ad89..d732e0064 100644 --- a/classes/class_skeletonik3d.rst +++ b/classes/class_skeletonik3d.rst @@ -14,6 +14,8 @@ SkeletonIK3D SkeletonIK3D is used to place the end bone of a :ref:`Skeleton3D` bone chain at a certain point in 3D by rotating all bones in the chain accordingly. +.. rst-class:: classref-introduction-group + Description ----------- @@ -39,240 +41,286 @@ SkeletonIK3D is used to place the end bone of a :ref:`Skeleton3D`__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`interpolation` | ``1.0`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`magnet` | ``Vector3(0, 0, 0)`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`int` | :ref:`max_iterations` | ``10`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`float` | :ref:`min_distance` | ``0.01`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`override_tip_basis` | ``true`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`StringName` | :ref:`root_bone` | ``&""`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`target` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`NodePath` | :ref:`target_node` | ``NodePath("")`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`StringName` | :ref:`tip_bone` | ``&""`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`use_magnet` | ``false`` | -+---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`interpolation` | ``1.0`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`magnet` | ``Vector3(0, 0, 0)`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int` | :ref:`max_iterations` | ``10`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`min_distance` | ``0.01`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`override_tip_basis` | ``true`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`StringName` | :ref:`root_bone` | ``&""`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`target` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`NodePath` | :ref:`target_node` | ``NodePath("")`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`StringName` | :ref:`tip_bone` | ``&""`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`use_magnet` | ``false`` | + +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`Skeleton3D` | :ref:`get_parent_skeleton` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_running` **(** **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------+ -| void | :ref:`start` **(** :ref:`bool` one_time=false **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton3D` | :ref:`get_parent_skeleton` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_running` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------+ + | void | :ref:`start` **(** :ref:`bool` one_time=false **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonIK3D_property_interpolation: -- :ref:`float` **interpolation** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------+ -| *Setter* | set_interpolation(value) | -+-----------+--------------------------+ -| *Getter* | get_interpolation() | -+-----------+--------------------------+ +:ref:`float` **interpolation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_interpolation** **(** :ref:`float` value **)** +- :ref:`float` **get_interpolation** **(** **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_magnet: -- :ref:`Vector3` **magnet** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_magnet_position(value) | -+-----------+----------------------------+ -| *Getter* | get_magnet_position() | -+-----------+----------------------------+ +:ref:`Vector3` **magnet** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_magnet_position** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_magnet_position** **(** **)** Secondary target position (first is :ref:`target` property or :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_max_iterations: -- :ref:`int` **max_iterations** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``10`` | -+-----------+---------------------------+ -| *Setter* | set_max_iterations(value) | -+-----------+---------------------------+ -| *Getter* | get_max_iterations() | -+-----------+---------------------------+ +:ref:`int` **max_iterations** = ``10`` + +.. rst-class:: classref-property-setget + +- void **set_max_iterations** **(** :ref:`int` value **)** +- :ref:`int` **get_max_iterations** **(** **)** Number of iteration loops used by the IK solver to produce more accurate (and elegant) bone chain results. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_min_distance: -- :ref:`float` **min_distance** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.01`` | -+-----------+-------------------------+ -| *Setter* | set_min_distance(value) | -+-----------+-------------------------+ -| *Getter* | get_min_distance() | -+-----------+-------------------------+ +:ref:`float` **min_distance** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_min_distance** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_override_tip_basis: -- :ref:`bool` **override_tip_basis** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------+ -| *Setter* | set_override_tip_basis(value) | -+-----------+-------------------------------+ -| *Getter* | is_override_tip_basis() | -+-----------+-------------------------------+ +:ref:`bool` **override_tip_basis** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_override_tip_basis** **(** :ref:`bool` value **)** +- :ref:`bool` **is_override_tip_basis** **(** **)** If ``true`` overwrites the rotation of the tip bone with the rotation of the :ref:`target` (or :ref:`target_node` if defined). +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_root_bone: -- :ref:`StringName` **root_bone** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``&""`` | -+-----------+----------------------+ -| *Setter* | set_root_bone(value) | -+-----------+----------------------+ -| *Getter* | get_root_bone() | -+-----------+----------------------+ +:ref:`StringName` **root_bone** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_root_bone** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_root_bone** **(** **)** The name of the current root bone, the first bone in the IK chain. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_target: -- :ref:`Transform3D` **target** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_target_transform(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_target_transform() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **target** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_target_transform** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_target_transform** **(** **)** First target of the IK chain where the tip bone is placed and, if :ref:`override_tip_basis` is ``true``, how the tip bone is rotated. If a :ref:`target_node` path is available the nodes transform is used instead and this property is ignored. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_target_node: -- :ref:`NodePath` **target_node** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_node** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_target_node** **(** **)** Target node :ref:`NodePath` for the IK chain. If available, the node's current :ref:`Transform3D` is used instead of the :ref:`target` property. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_tip_bone: -- :ref:`StringName` **tip_bone** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``&""`` | -+-----------+---------------------+ -| *Setter* | set_tip_bone(value) | -+-----------+---------------------+ -| *Getter* | get_tip_bone() | -+-----------+---------------------+ +:ref:`StringName` **tip_bone** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_tip_bone** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_tip_bone** **(** **)** The name of the current tip bone, the last bone in the IK chain placed at the :ref:`target` transform (or :ref:`target_node` if defined). +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_property_use_magnet: -- :ref:`bool` **use_magnet** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_use_magnet(value) | -+-----------+-----------------------+ -| *Getter* | is_using_magnet() | -+-----------+-----------------------+ +:ref:`bool` **use_magnet** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_magnet** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonIK3D_method_get_parent_skeleton: -- :ref:`Skeleton3D` **get_parent_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Skeleton3D` **get_parent_skeleton** **(** **)** |const| Returns the parent :ref:`Skeleton3D` Node that was present when SkeletonIK entered the :ref:`SceneTree`. Returns null if the parent node was not a :ref:`Skeleton3D` Node when SkeletonIK3D entered the :ref:`SceneTree`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_method_is_running: -- :ref:`bool` **is_running** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_running** **(** **)** Returns ``true`` if SkeletonIK is applying IK effects on continues frames to the :ref:`Skeleton3D` bones. Returns ``false`` if SkeletonIK is stopped or :ref:`start` was used with the ``one_time`` parameter set to ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_method_start: -- void **start** **(** :ref:`bool` one_time=false **)** +.. rst-class:: classref-method + +void **start** **(** :ref:`bool` one_time=false **)** Starts applying IK effects on each frame to the :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonIK3D_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops applying IK effects on each frame to the :ref:`Skeleton3D` bones and also calls :ref:`Skeleton3D.clear_bones_global_pose_override` to remove existing overrides on all bones. diff --git a/classes/class_skeletonmodification2d.rst b/classes/class_skeletonmodification2d.rst index 65b332e92..a8646b800 100644 --- a/classes/class_skeletonmodification2d.rst +++ b/classes/class_skeletonmodification2d.rst @@ -16,6 +16,8 @@ SkeletonModification2D A resource that operates on :ref:`Bone2D` nodes in a :ref:`Skeleton2D`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,143 +25,199 @@ This resource provides an interface that can be expanded so code that operates o This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`execution_mode` | ``0`` | -+-------------------------+-----------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`execution_mode` | ``0`` | + +-------------------------+-----------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw_editor_gizmo` **(** **)** |virtual| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_execute` **(** :ref:`float` delta **)** |virtual| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_setup_modification` **(** :ref:`SkeletonModificationStack2D` modification_stack **)** |virtual| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`clamp_angle` **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_editor_draw_gizmo` **(** **)** |const| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModificationStack2D` | :ref:`get_modification_stack` **(** **)** | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_editor_draw_gizmo` **(** :ref:`bool` draw_gizmo **)** | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_is_setup` **(** :ref:`bool` is_setup **)** | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw_editor_gizmo` **(** **)** |virtual| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_execute` **(** :ref:`float` delta **)** |virtual| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup_modification` **(** :ref:`SkeletonModificationStack2D` modification_stack **)** |virtual| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`clamp_angle` **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_editor_draw_gizmo` **(** **)** |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack2D` | :ref:`get_modification_stack` **(** **)** | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_editor_draw_gizmo` **(** :ref:`bool` draw_gizmo **)** | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_is_setup` **(** :ref:`bool` is_setup **)** | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification2D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | get_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enabled** **(** **)** If ``true``, the modification's :ref:`_execute` function will be called by the :ref:`SkeletonModificationStack2D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_property_execution_mode: -- :ref:`int` **execution_mode** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_execution_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_execution_mode() | -+-----------+---------------------------+ +:ref:`int` **execution_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_execution_mode** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification2D_method__draw_editor_gizmo: -- void **_draw_editor_gizmo** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_draw_editor_gizmo** **(** **)** |virtual| 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. -\ **Note:** You will need to use the Skeleton2D from :ref:`SkeletonModificationStack2D.get_skeleton` and it's draw functions, as the ``SkeletonModification2D`` resource cannot draw on its own. +\ **Note:** You will need to use the Skeleton2D from :ref:`SkeletonModificationStack2D.get_skeleton` and it's draw functions, as the **SkeletonModification2D** resource cannot draw on its own. + +.. rst-class:: classref-item-separator ---- .. _class_SkeletonModification2D_method__execute: -- void **_execute** **(** :ref:`float` delta **)** |virtual| +.. rst-class:: classref-method + +void **_execute** **(** :ref:`float` delta **)** |virtual| Executes the given modification. This is where the modification performs whatever function it is designed to do. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_method__setup_modification: -- void **_setup_modification** **(** :ref:`SkeletonModificationStack2D` modification_stack **)** |virtual| +.. rst-class:: classref-method + +void **_setup_modification** **(** :ref:`SkeletonModificationStack2D` modification_stack **)** |virtual| Called when the modification is setup. This is where the modification performs initialization. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_method_clamp_angle: -- :ref:`float` **clamp_angle** **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** +.. rst-class:: classref-method + +:ref:`float` **clamp_angle** **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** Takes a 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_method_get_editor_draw_gizmo: -- :ref:`bool` **get_editor_draw_gizmo** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_editor_draw_gizmo** **(** **)** |const| Returns whether this modification will call :ref:`_draw_editor_gizmo` in the Godot editor to draw modification-specific gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_method_get_is_setup: -- :ref:`bool` **get_is_setup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_is_setup** **(** **)** |const| Returns whether this modification has been successfully setup or not. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_method_get_modification_stack: -- :ref:`SkeletonModificationStack2D` **get_modification_stack** **(** **)** +.. rst-class:: classref-method + +:ref:`SkeletonModificationStack2D` **get_modification_stack** **(** **)** Returns the :ref:`SkeletonModificationStack2D` that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_method_set_editor_draw_gizmo: -- void **set_editor_draw_gizmo** **(** :ref:`bool` draw_gizmo **)** +.. rst-class:: classref-method + +void **set_editor_draw_gizmo** **(** :ref:`bool` draw_gizmo **)** Sets whether this modification will call :ref:`_draw_editor_gizmo` in the Godot editor to draw modification-specific gizmos. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2D_method_set_is_setup: -- void **set_is_setup** **(** :ref:`bool` is_setup **)** +.. rst-class:: classref-method + +void **set_is_setup** **(** :ref:`bool` is_setup **)** Manually allows you to set the setup state of the modification. This function should only rarely be used, as the :ref:`SkeletonModificationStack2D` the modification is bound to should handle setting the modification up. diff --git a/classes/class_skeletonmodification2dccdik.rst b/classes/class_skeletonmodification2dccdik.rst index fba4a7ad0..302584c7a 100644 --- a/classes/class_skeletonmodification2dccdik.rst +++ b/classes/class_skeletonmodification2dccdik.rst @@ -14,6 +14,8 @@ SkeletonModification2DCCDIK A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,211 +27,288 @@ CCDIK works by rotating a set of bones, typically called a "bone chain", on a si CCDIK also fully supports angle constraints, allowing for more control over how a solution is met. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`ccdik_data_chain_length` | ``0`` | -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`tip_nodepath` | ``NodePath("")`` | -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`ccdik_data_chain_length` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`tip_nodepath` | ``NodePath("")`` | + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_ccdik_joint_bone2d_node` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_ccdik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_ccdik_joint_constraint_angle_invert` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_ccdik_joint_enable_constraint` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_ccdik_joint_rotate_from_joint` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_bone2d_node` **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_constraint_angle_invert` **(** :ref:`int` joint_idx, :ref:`bool` invert **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx, :ref:`float` angle_max **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx, :ref:`float` angle_min **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_enable_constraint` **(** :ref:`int` joint_idx, :ref:`bool` enable_constraint **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_rotate_from_joint` **(** :ref:`int` joint_idx, :ref:`bool` rotate_from_joint **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_ccdik_joint_bone2d_node` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_ccdik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_ccdik_joint_constraint_angle_invert` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_ccdik_joint_enable_constraint` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_ccdik_joint_rotate_from_joint` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_bone2d_node` **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_constraint_angle_invert` **(** :ref:`int` joint_idx, :ref:`bool` invert **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx, :ref:`float` angle_max **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx, :ref:`float` angle_min **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_enable_constraint` **(** :ref:`int` joint_idx, :ref:`bool` enable_constraint **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_rotate_from_joint` **(** :ref:`int` joint_idx, :ref:`bool` rotate_from_joint **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification2DCCDIK_property_ccdik_data_chain_length: -- :ref:`int` **ccdik_data_chain_length** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------+ -| *Setter* | set_ccdik_data_chain_length(value) | -+-----------+------------------------------------+ -| *Getter* | get_ccdik_data_chain_length() | -+-----------+------------------------------------+ +:ref:`int` **ccdik_data_chain_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_ccdik_data_chain_length** **(** :ref:`int` value **)** +- :ref:`int` **get_ccdik_data_chain_length** **(** **)** The number of CCDIK joints in the CCDIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_property_tip_nodepath: -- :ref:`NodePath` **tip_nodepath** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------+ -| *Setter* | set_tip_node(value) | -+-----------+---------------------+ -| *Getter* | get_tip_node() | -+-----------+---------------------+ +:ref:`NodePath` **tip_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_tip_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_tip_node** **(** **)** The end position of the CCDIK chain. Typically, this should be a child of a :ref:`Bone2D` node attached to the final :ref:`Bone2D` in the CCDIK chain. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone2d_node: -- :ref:`NodePath` **get_ccdik_joint_bone2d_node** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_ccdik_joint_bone2d_node** **(** :ref:`int` joint_idx **)** |const| Returns the :ref:`Bone2D` node assigned to the CCDIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone_index: -- :ref:`int` **get_ccdik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_ccdik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| Returns the index of the :ref:`Bone2D` node assigned to the CCDIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_invert: -- :ref:`bool` **get_ccdik_joint_constraint_angle_invert** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_ccdik_joint_constraint_angle_invert** **(** :ref:`int` joint_idx **)** |const| Returns whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. See :ref:`set_ccdik_joint_constraint_angle_invert` for details. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_max: -- :ref:`float` **get_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx **)** |const| Returns the maximum angle constraint for the joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_min: -- :ref:`float` **get_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx **)** |const| Returns the minimum angle constraint for the joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_enable_constraint: -- :ref:`bool` **get_ccdik_joint_enable_constraint** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_ccdik_joint_enable_constraint** **(** :ref:`int` joint_idx **)** |const| Returns whether angle constraints on the CCDIK joint at ``joint_idx`` are enabled. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_rotate_from_joint: -- :ref:`bool` **get_ccdik_joint_rotate_from_joint** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_ccdik_joint_rotate_from_joint** **(** :ref:`int` joint_idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone2d_node: -- void **set_ccdik_joint_bone2d_node** **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_bone2d_node** **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** Sets the :ref:`Bone2D` node assigned to the CCDIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone_index: -- void **set_ccdik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_invert: -- void **set_ccdik_joint_constraint_angle_invert** **(** :ref:`int` joint_idx, :ref:`bool` invert **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_constraint_angle_invert** **(** :ref:`int` joint_idx, :ref:`bool` invert **)** Sets whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. An inverted joint constraint only constraints the CCDIK joint to the angles *outside of* the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_max: -- void **set_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx, :ref:`float` angle_max **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx, :ref:`float` angle_max **)** Sets the maximum angle constraint for the joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_min: -- void **set_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx, :ref:`float` angle_min **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx, :ref:`float` angle_min **)** Sets the minimum angle constraint for the joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_set_ccdik_joint_enable_constraint: -- void **set_ccdik_joint_enable_constraint** **(** :ref:`int` joint_idx, :ref:`bool` enable_constraint **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_enable_constraint** **(** :ref:`int` joint_idx, :ref:`bool` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DCCDIK_method_set_ccdik_joint_rotate_from_joint: -- void **set_ccdik_joint_rotate_from_joint** **(** :ref:`int` joint_idx, :ref:`bool` rotate_from_joint **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_rotate_from_joint** **(** :ref:`int` joint_idx, :ref:`bool` 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``. diff --git a/classes/class_skeletonmodification2dfabrik.rst b/classes/class_skeletonmodification2dfabrik.rst index f8545da63..70bb66fa5 100644 --- a/classes/class_skeletonmodification2dfabrik.rst +++ b/classes/class_skeletonmodification2dfabrik.rst @@ -14,6 +14,8 @@ SkeletonModification2DFABRIK A modification that uses FABRIK to manipulate a series of :ref:`Bone2D` nodes to reach a target. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,131 +29,183 @@ Because of how FABRIK works, it often gives more natural results than those seen To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`fabrik_data_chain_length` | ``0`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`fabrik_data_chain_length` | ``0`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_fabrik_joint_bone2d_node` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_fabrik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_fabrik_joint_magnet_position` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_fabrik_joint_use_target_rotation` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_bone2d_node` **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_magnet_position` **(** :ref:`int` joint_idx, :ref:`Vector2` magnet_position **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_use_target_rotation` **(** :ref:`int` joint_idx, :ref:`bool` use_target_rotation **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_fabrik_joint_bone2d_node` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_fabrik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_fabrik_joint_magnet_position` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_fabrik_joint_use_target_rotation` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_bone2d_node` **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_magnet_position` **(** :ref:`int` joint_idx, :ref:`Vector2` magnet_position **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_use_target_rotation` **(** :ref:`int` joint_idx, :ref:`bool` use_target_rotation **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification2DFABRIK_property_fabrik_data_chain_length: -- :ref:`int` **fabrik_data_chain_length** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------------+ -| *Setter* | set_fabrik_data_chain_length(value) | -+-----------+-------------------------------------+ -| *Getter* | get_fabrik_data_chain_length() | -+-----------+-------------------------------------+ +:ref:`int` **fabrik_data_chain_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fabrik_data_chain_length** **(** :ref:`int` value **)** +- :ref:`int` **get_fabrik_data_chain_length** **(** **)** The number of FABRIK joints in the FABRIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone2d_node: -- :ref:`NodePath` **get_fabrik_joint_bone2d_node** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_fabrik_joint_bone2d_node** **(** :ref:`int` joint_idx **)** |const| Returns the :ref:`Bone2D` node assigned to the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone_index: -- :ref:`int` **get_fabrik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_fabrik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| Returns the index of the :ref:`Bone2D` node assigned to the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_method_get_fabrik_joint_magnet_position: -- :ref:`Vector2` **get_fabrik_joint_magnet_position** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_fabrik_joint_magnet_position** **(** :ref:`int` joint_idx **)** |const| Returns the magnet position vector for the joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_method_get_fabrik_joint_use_target_rotation: -- :ref:`bool` **get_fabrik_joint_use_target_rotation** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_fabrik_joint_use_target_rotation** **(** :ref:`int` joint_idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone2d_node: -- void **set_fabrik_joint_bone2d_node** **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_bone2d_node** **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_nodepath **)** Sets the :ref:`Bone2D` node assigned to the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone_index: -- void **set_fabrik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_method_set_fabrik_joint_magnet_position: -- void **set_fabrik_joint_magnet_position** **(** :ref:`int` joint_idx, :ref:`Vector2` magnet_position **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_magnet_position** **(** :ref:`int` joint_idx, :ref:`Vector2` magnet_position **)** Sets the magnet position vector for the joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DFABRIK_method_set_fabrik_joint_use_target_rotation: -- void **set_fabrik_joint_use_target_rotation** **(** :ref:`int` joint_idx, :ref:`bool` use_target_rotation **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_use_target_rotation** **(** :ref:`int` joint_idx, :ref:`bool` use_target_rotation **)** Sets whether the joint at ``joint_idx`` will use the target node's rotation rather than letting FABRIK rotate the node. diff --git a/classes/class_skeletonmodification2djiggle.rst b/classes/class_skeletonmodification2djiggle.rst index 647211977..26b33dc40 100644 --- a/classes/class_skeletonmodification2djiggle.rst +++ b/classes/class_skeletonmodification2djiggle.rst @@ -14,6 +14,8 @@ SkeletonModification2DJiggle A modification that jiggles :ref:`Bone2D` nodes as they move towards a target. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,341 +25,446 @@ This modification is useful for adding additional motion to things like hair, th \ **Note:** The Jiggle modifier has ``jiggle_joints``, which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than :ref:`Bone2D` nodes! Jiggle joints hold the data needed for each :ref:`Bone2D` in the bone chain used by the Jiggle modification. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`damping` | ``0.75`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`gravity` | ``Vector2(0, 6)`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`jiggle_data_chain_length` | ``0`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`mass` | ``0.75`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`stiffness` | ``3.0`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`use_gravity` | ``false`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`damping` | ``0.75`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`gravity` | ``Vector2(0, 6)`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`jiggle_data_chain_length` | ``0`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`mass` | ``0.75`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`stiffness` | ``3.0`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`use_gravity` | ``false`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_mask` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_jiggle_joint_bone2d_node` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_jiggle_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_jiggle_joint_damping` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_jiggle_joint_gravity` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_jiggle_joint_mass` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_jiggle_joint_override` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_jiggle_joint_stiffness` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_use_colliders` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask` **(** :ref:`int` collision_mask **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_bone2d_node` **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_node **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_damping` **(** :ref:`int` joint_idx, :ref:`float` damping **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_gravity` **(** :ref:`int` joint_idx, :ref:`Vector2` gravity **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_mass` **(** :ref:`int` joint_idx, :ref:`float` mass **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_override` **(** :ref:`int` joint_idx, :ref:`bool` override **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_stiffness` **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_colliders` **(** :ref:`bool` use_colliders **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_mask` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_jiggle_joint_bone2d_node` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_jiggle_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_jiggle_joint_damping` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_jiggle_joint_gravity` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_jiggle_joint_mass` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_jiggle_joint_override` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_jiggle_joint_stiffness` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_colliders` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask` **(** :ref:`int` collision_mask **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_bone2d_node` **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_node **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_damping` **(** :ref:`int` joint_idx, :ref:`float` damping **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_gravity` **(** :ref:`int` joint_idx, :ref:`Vector2` gravity **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_mass` **(** :ref:`int` joint_idx, :ref:`float` mass **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_override` **(** :ref:`int` joint_idx, :ref:`bool` override **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_stiffness` **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_colliders` **(** :ref:`bool` use_colliders **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification2DJiggle_property_damping: -- :ref:`float` **damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.75`` | -+-----------+--------------------+ -| *Setter* | set_damping(value) | -+-----------+--------------------+ -| *Getter* | get_damping() | -+-----------+--------------------+ +:ref:`float` **damping** = ``0.75`` + +.. rst-class:: classref-property-setget + +- void **set_damping** **(** :ref:`float` value **)** +- :ref:`float` **get_damping** **(** **)** The default amount of dampening applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_property_gravity: -- :ref:`Vector2` **gravity** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2(0, 6)`` | -+-----------+--------------------+ -| *Setter* | set_gravity(value) | -+-----------+--------------------+ -| *Getter* | get_gravity() | -+-----------+--------------------+ +:ref:`Vector2` **gravity** = ``Vector2(0, 6)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_gravity** **(** **)** The default amount of gravity applied to the Jiggle joints, if they are not overridden. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_property_jiggle_data_chain_length: -- :ref:`int` **jiggle_data_chain_length** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------------+ -| *Setter* | set_jiggle_data_chain_length(value) | -+-----------+-------------------------------------+ -| *Getter* | get_jiggle_data_chain_length() | -+-----------+-------------------------------------+ +:ref:`int` **jiggle_data_chain_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_jiggle_data_chain_length** **(** :ref:`int` value **)** +- :ref:`int` **get_jiggle_data_chain_length** **(** **)** The amount of Jiggle joints in the Jiggle modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_property_mass: -- :ref:`float` **mass** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.75`` | -+-----------+-----------------+ -| *Setter* | set_mass(value) | -+-----------+-----------------+ -| *Getter* | get_mass() | -+-----------+-----------------+ +:ref:`float` **mass** = ``0.75`` + +.. rst-class:: classref-property-setget + +- void **set_mass** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_property_stiffness: -- :ref:`float` **stiffness** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``3.0`` | -+-----------+----------------------+ -| *Setter* | set_stiffness(value) | -+-----------+----------------------+ -| *Getter* | get_stiffness() | -+-----------+----------------------+ +:ref:`float` **stiffness** = ``3.0`` + +.. rst-class:: classref-property-setget + +- void **set_stiffness** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_property_use_gravity: -- :ref:`bool` **use_gravity** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_use_gravity(value) | -+-----------+------------------------+ -| *Getter* | get_use_gravity() | -+-----------+------------------------+ +:ref:`bool` **use_gravity** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_gravity** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_gravity** **(** **)** Whether the gravity vector, :ref:`gravity`, should be applied to the Jiggle joints, assuming they are not overriding the default settings. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification2DJiggle_method_get_collision_mask: -- :ref:`int` **get_collision_mask** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_mask** **(** **)** |const| Returns the collision mask used by the Jiggle modifier when collisions are enabled. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone2d_node: -- :ref:`NodePath` **get_jiggle_joint_bone2d_node** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_jiggle_joint_bone2d_node** **(** :ref:`int` joint_idx **)** |const| Returns the :ref:`Bone2D` node assigned to the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone_index: -- :ref:`int` **get_jiggle_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_jiggle_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| Returns the index of the :ref:`Bone2D` node assigned to the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_damping: -- :ref:`float` **get_jiggle_joint_damping** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_jiggle_joint_damping** **(** :ref:`int` joint_idx **)** |const| Returns the amount of damping of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_gravity: -- :ref:`Vector2` **get_jiggle_joint_gravity** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_jiggle_joint_gravity** **(** :ref:`int` joint_idx **)** |const| Returns a :ref:`Vector2` representing the amount of gravity the Jiggle joint at ``joint_idx`` is influenced by. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_mass: -- :ref:`float` **get_jiggle_joint_mass** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_jiggle_joint_mass** **(** :ref:`int` joint_idx **)** |const| Returns the amount of mass of the jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_override: -- :ref:`bool` **get_jiggle_joint_override** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_jiggle_joint_override** **(** :ref:`int` joint_idx **)** |const| Returns a boolean that indicates whether the joint at ``joint_idx`` is overriding the default Jiggle joint data defined in the modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_stiffness: -- :ref:`float` **get_jiggle_joint_stiffness** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_jiggle_joint_stiffness** **(** :ref:`int` joint_idx **)** |const| Returns the stiffness of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_jiggle_joint_use_gravity: -- :ref:`bool` **get_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx **)** |const| Returns a boolean that indicates whether the joint at ``joint_idx`` is using gravity or not. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_get_use_colliders: -- :ref:`bool` **get_use_colliders** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_use_colliders** **(** **)** |const| Returns whether the jiggle modifier is taking physics colliders into account when solving. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_collision_mask: -- void **set_collision_mask** **(** :ref:`int` collision_mask **)** +.. rst-class:: classref-method + +void **set_collision_mask** **(** :ref:`int` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone2d_node: -- void **set_jiggle_joint_bone2d_node** **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_node **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_bone2d_node** **(** :ref:`int` joint_idx, :ref:`NodePath` bone2d_node **)** Sets the :ref:`Bone2D` node assigned to the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone_index: -- void **set_jiggle_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_damping: -- void **set_jiggle_joint_damping** **(** :ref:`int` joint_idx, :ref:`float` damping **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_damping** **(** :ref:`int` joint_idx, :ref:`float` damping **)** Sets the amount of dampening of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_gravity: -- void **set_jiggle_joint_gravity** **(** :ref:`int` joint_idx, :ref:`Vector2` gravity **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_gravity** **(** :ref:`int` joint_idx, :ref:`Vector2` gravity **)** Sets the gravity vector of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_mass: -- void **set_jiggle_joint_mass** **(** :ref:`int` joint_idx, :ref:`float` mass **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_mass** **(** :ref:`int` joint_idx, :ref:`float` mass **)** Sets the of mass of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_override: -- void **set_jiggle_joint_override** **(** :ref:`int` joint_idx, :ref:`bool` override **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_override** **(** :ref:`int` joint_idx, :ref:`bool` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_stiffness: -- void **set_jiggle_joint_stiffness** **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_stiffness** **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** Sets the of stiffness of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_jiggle_joint_use_gravity: -- void **set_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** Sets whether the Jiggle joint at ``joint_idx`` should use gravity. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DJiggle_method_set_use_colliders: -- void **set_use_colliders** **(** :ref:`bool` use_colliders **)** +.. rst-class:: classref-method + +void **set_use_colliders** **(** :ref:`bool` use_colliders **)** If ``true``, the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects. diff --git a/classes/class_skeletonmodification2dlookat.rst b/classes/class_skeletonmodification2dlookat.rst index a7aec4945..3f1fb0919 100644 --- a/classes/class_skeletonmodification2dlookat.rst +++ b/classes/class_skeletonmodification2dlookat.rst @@ -14,176 +14,239 @@ SkeletonModification2DLookAt A modification that rotates a :ref:`Bone2D` node to look at a target. +.. rst-class:: classref-introduction-group + Description ----------- This :ref:`SkeletonModification2D` rotates a bone to look a target. This is extremely helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`bone2d_node` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`bone_index` | ``-1`` | -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`bone2d_node` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`bone_index` | ``-1`` | + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_additional_rotation` **(** **)** |const| | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_constraint_angle_invert` **(** **)** |const| | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_constraint_angle_max` **(** **)** |const| | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_constraint_angle_min` **(** **)** |const| | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_enable_constraint` **(** **)** |const| | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_additional_rotation` **(** :ref:`float` rotation **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constraint_angle_invert` **(** :ref:`bool` invert **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constraint_angle_max` **(** :ref:`float` angle_max **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constraint_angle_min` **(** :ref:`float` angle_min **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enable_constraint` **(** :ref:`bool` enable_constraint **)** | -+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_additional_rotation` **(** **)** |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_constraint_angle_invert` **(** **)** |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_constraint_angle_max` **(** **)** |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_constraint_angle_min` **(** **)** |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_enable_constraint` **(** **)** |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_additional_rotation` **(** :ref:`float` rotation **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constraint_angle_invert` **(** :ref:`bool` invert **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constraint_angle_max` **(** :ref:`float` angle_max **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constraint_angle_min` **(** :ref:`float` angle_min **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_enable_constraint` **(** :ref:`bool` enable_constraint **)** | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification2DLookAt_property_bone2d_node: -- :ref:`NodePath` **bone2d_node** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_bone2d_node(value) | -+-----------+------------------------+ -| *Getter* | get_bone2d_node() | -+-----------+------------------------+ +:ref:`NodePath` **bone2d_node** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_bone2d_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_bone2d_node** **(** **)** The :ref:`Bone2D` node that the modification will operate on. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_property_bone_index: -- :ref:`int` **bone_index** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``-1`` | -+-----------+-----------------------+ -| *Setter* | set_bone_index(value) | -+-----------+-----------------------+ -| *Getter* | get_bone_index() | -+-----------+-----------------------+ +:ref:`int` **bone_index** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_bone_index** **(** :ref:`int` value **)** +- :ref:`int` **get_bone_index** **(** **)** The index of the :ref:`Bone2D` node that the modification will oeprate on. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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` to. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification2DLookAt_method_get_additional_rotation: -- :ref:`float` **get_additional_rotation** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_additional_rotation** **(** **)** |const| Returns the amount of additional rotation that is applied after the LookAt modification executes. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_get_constraint_angle_invert: -- :ref:`bool` **get_constraint_angle_invert** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_constraint_angle_invert** **(** **)** |const| Returns whether the constraints to this modification are inverted or not. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_get_constraint_angle_max: -- :ref:`float` **get_constraint_angle_max** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_constraint_angle_max** **(** **)** |const| Returns the constraint's maximum allowed angle. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_get_constraint_angle_min: -- :ref:`float` **get_constraint_angle_min** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_constraint_angle_min** **(** **)** |const| Returns the constraint's minimum allowed angle. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_get_enable_constraint: -- :ref:`bool` **get_enable_constraint** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_enable_constraint** **(** **)** |const| Returns ``true`` if the LookAt modification is using constraints. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_set_additional_rotation: -- void **set_additional_rotation** **(** :ref:`float` rotation **)** +.. rst-class:: classref-method + +void **set_additional_rotation** **(** :ref:`float` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_set_constraint_angle_invert: -- void **set_constraint_angle_invert** **(** :ref:`bool` invert **)** +.. rst-class:: classref-method + +void **set_constraint_angle_invert** **(** :ref:`bool` invert **)** When ``true``, the modification will use an inverted joint constraint. An inverted joint constraint only constraints the :ref:`Bone2D` to the angles *outside of* the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_set_constraint_angle_max: -- void **set_constraint_angle_max** **(** :ref:`float` angle_max **)** +.. rst-class:: classref-method + +void **set_constraint_angle_max** **(** :ref:`float` angle_max **)** Sets the constraint's maximum allowed angle. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_set_constraint_angle_min: -- void **set_constraint_angle_min** **(** :ref:`float` angle_min **)** +.. rst-class:: classref-method + +void **set_constraint_angle_min** **(** :ref:`float` angle_min **)** Sets the constraint's minimum allowed angle. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DLookAt_method_set_enable_constraint: -- void **set_enable_constraint** **(** :ref:`bool` enable_constraint **)** +.. rst-class:: classref-method + +void **set_enable_constraint** **(** :ref:`bool` enable_constraint **)** Sets whether this modification will use constraints or not. When ``true``, constraints will be applied when solving the LookAt modification. diff --git a/classes/class_skeletonmodification2dphysicalbones.rst b/classes/class_skeletonmodification2dphysicalbones.rst index d3fc4567f..9ee327253 100644 --- a/classes/class_skeletonmodification2dphysicalbones.rst +++ b/classes/class_skeletonmodification2dphysicalbones.rst @@ -14,6 +14,8 @@ SkeletonModification2DPhysicalBones A modification that applies the transforms of :ref:`PhysicalBone2D` nodes to :ref:`Bone2D` nodes. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,87 +23,126 @@ This modification takes the transforms of :ref:`PhysicalBone2D` on their own. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+------------------------------------------------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`physical_bone_chain_length` | ``0`` | -+-----------------------+------------------------------------------------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`physical_bone_chain_length` | ``0`` | + +-----------------------+------------------------------------------------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fetch_physical_bones` **(** **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_physical_bone_node` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physical_bone_node` **(** :ref:`int` joint_idx, :ref:`NodePath` physicalbone2d_node **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`start_simulation` **(** :ref:`StringName[]` bones=[] **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop_simulation` **(** :ref:`StringName[]` bones=[] **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fetch_physical_bones` **(** **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_physical_bone_node` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_physical_bone_node` **(** :ref:`int` joint_idx, :ref:`NodePath` physicalbone2d_node **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`start_simulation` **(** :ref:`StringName[]` bones=[] **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop_simulation` **(** :ref:`StringName[]` bones=[] **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length: -- :ref:`int` **physical_bone_chain_length** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_physical_bone_chain_length(value) | -+-----------+---------------------------------------+ -| *Getter* | get_physical_bone_chain_length() | -+-----------+---------------------------------------+ +:ref:`int` **physical_bone_chain_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_physical_bone_chain_length** **(** :ref:`int` value **)** +- :ref:`int` **get_physical_bone_chain_length** **(** **)** The number of :ref:`PhysicalBone2D` nodes linked in this modification. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones: -- void **fetch_physical_bones** **(** **)** +.. rst-class:: classref-method + +void **fetch_physical_bones** **(** **)** Empties the list of :ref:`PhysicalBone2D` nodes and populates it will all :ref:`PhysicalBone2D` nodes that are children of the :ref:`Skeleton2D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node: -- :ref:`NodePath` **get_physical_bone_node** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_physical_bone_node** **(** :ref:`int` joint_idx **)** |const| Returns the :ref:`PhysicalBone2D` node at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node: -- void **set_physical_bone_node** **(** :ref:`int` joint_idx, :ref:`NodePath` physicalbone2d_node **)** +.. rst-class:: classref-method + +void **set_physical_bone_node** **(** :ref:`int` joint_idx, :ref:`NodePath` physicalbone2d_node **)** Sets the :ref:`PhysicalBone2D` node at ``joint_idx``. \ **Note:** This is just the index used for this modification, not the bone index used in the :ref:`Skeleton2D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DPhysicalBones_method_start_simulation: -- void **start_simulation** **(** :ref:`StringName[]` bones=[] **)** +.. rst-class:: classref-method + +void **start_simulation** **(** :ref:`StringName[]` bones=[] **)** Tell the :ref:`PhysicalBone2D` nodes to start simulating and interacting with the physics world. Optionally, an array of bone names can be passed to this function, and that will cause only :ref:`PhysicalBone2D` nodes with those names to start simulating. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DPhysicalBones_method_stop_simulation: -- void **stop_simulation** **(** :ref:`StringName[]` bones=[] **)** +.. rst-class:: classref-method + +void **stop_simulation** **(** :ref:`StringName[]` bones=[] **)** Tell the :ref:`PhysicalBone2D` nodes to stop simulating and interacting with the physics world. diff --git a/classes/class_skeletonmodification2dstackholder.rst b/classes/class_skeletonmodification2dstackholder.rst index a60077e5b..39d6a721a 100644 --- a/classes/class_skeletonmodification2dstackholder.rst +++ b/classes/class_skeletonmodification2dstackholder.rst @@ -14,6 +14,8 @@ SkeletonModification2DStackHolder A modification that holds and executes a :ref:`SkeletonModificationStack2D`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,29 +23,46 @@ This :ref:`SkeletonModification2D` holds a referen \ **Note:** The modifications in the held :ref:`SkeletonModificationStack2D` will only be executed if their execution mode matches the execution mode of the SkeletonModification2DStackHolder. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModificationStack2D` | :ref:`get_held_modification_stack` **(** **)** |const| | -+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_held_modification_stack` **(** :ref:`SkeletonModificationStack2D` held_modification_stack **)** | -+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack2D` | :ref:`get_held_modification_stack` **(** **)** |const| | + +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_held_modification_stack` **(** :ref:`SkeletonModificationStack2D` held_modification_stack **)** | + +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SkeletonModification2DStackHolder_method_get_held_modification_stack: -- :ref:`SkeletonModificationStack2D` **get_held_modification_stack** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SkeletonModificationStack2D` **get_held_modification_stack** **(** **)** |const| Returns the :ref:`SkeletonModificationStack2D` that this modification is holding. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DStackHolder_method_set_held_modification_stack: -- void **set_held_modification_stack** **(** :ref:`SkeletonModificationStack2D` held_modification_stack **)** +.. rst-class:: classref-method + +void **set_held_modification_stack** **(** :ref:`SkeletonModificationStack2D` held_modification_stack **)** Sets the :ref:`SkeletonModificationStack2D` that this modification is holding. This modification stack will then be executed when this modification is executed. diff --git a/classes/class_skeletonmodification2dtwoboneik.rst b/classes/class_skeletonmodification2dtwoboneik.rst index c725790ce..79c9e4d0b 100644 --- a/classes/class_skeletonmodification2dtwoboneik.rst +++ b/classes/class_skeletonmodification2dtwoboneik.rst @@ -14,6 +14,8 @@ SkeletonModification2DTwoBoneIK A modification that rotates two bones using the law of cosigns to reach the target. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,167 +23,221 @@ This :ref:`SkeletonModification2D` uses an algorit TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than :ref:`SkeletonModification2DFABRIK`, but gives similar, natural looking results. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`flip_bend_direction` | ``false`` | -+---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`target_maximum_distance` | ``0.0`` | -+---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`target_minimum_distance` | ``0.0`` | -+---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`flip_bend_direction` | ``false`` | + +---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`target_maximum_distance` | ``0.0`` | + +---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`target_minimum_distance` | ``0.0`` | + +---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+--------------------------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_joint_one_bone2d_node` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_joint_one_bone_idx` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_joint_two_bone2d_node` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_joint_two_bone_idx` **(** **)** |const| | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_one_bone2d_node` **(** :ref:`NodePath` bone2d_node **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_one_bone_idx` **(** :ref:`int` bone_idx **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_two_bone2d_node` **(** :ref:`NodePath` bone2d_node **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_two_bone_idx` **(** :ref:`int` bone_idx **)** | -+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_joint_one_bone2d_node` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_one_bone_idx` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_joint_two_bone2d_node` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_two_bone_idx` **(** **)** |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_one_bone2d_node` **(** :ref:`NodePath` bone2d_node **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_one_bone_idx` **(** :ref:`int` bone_idx **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_two_bone2d_node` **(** :ref:`NodePath` bone2d_node **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_two_bone_idx` **(** :ref:`int` bone_idx **)** | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification2DTwoBoneIK_property_flip_bend_direction: -- :ref:`bool` **flip_bend_direction** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_flip_bend_direction(value) | -+-----------+--------------------------------+ -| *Getter* | get_flip_bend_direction() | -+-----------+--------------------------------+ +:ref:`bool` **flip_bend_direction** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_bend_direction** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_property_target_maximum_distance: -- :ref:`float` **target_maximum_distance** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------+ -| *Setter* | set_target_maximum_distance(value) | -+-----------+------------------------------------+ -| *Getter* | get_target_maximum_distance() | -+-----------+------------------------------------+ +:ref:`float` **target_maximum_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_target_maximum_distance** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_property_target_minimum_distance: -- :ref:`float` **target_minimum_distance** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------+ -| *Setter* | set_target_minimum_distance(value) | -+-----------+------------------------------------+ -| *Getter* | get_target_minimum_distance() | -+-----------+------------------------------------+ +:ref:`float` **target_minimum_distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_target_minimum_distance** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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` nodes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone2d_node: -- :ref:`NodePath` **get_joint_one_bone2d_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_joint_one_bone2d_node** **(** **)** |const| Returns the :ref:`Bone2D` node that is being used as the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone_idx: -- :ref:`int` **get_joint_one_bone_idx** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_joint_one_bone_idx** **(** **)** |const| Returns the index of the :ref:`Bone2D` node that is being used as the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone2d_node: -- :ref:`NodePath` **get_joint_two_bone2d_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_joint_two_bone2d_node** **(** **)** |const| Returns the :ref:`Bone2D` node that is being used as the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone_idx: -- :ref:`int` **get_joint_two_bone_idx** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_joint_two_bone_idx** **(** **)** |const| Returns the index of the :ref:`Bone2D` node that is being used as the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone2d_node: -- void **set_joint_one_bone2d_node** **(** :ref:`NodePath` bone2d_node **)** +.. rst-class:: classref-method + +void **set_joint_one_bone2d_node** **(** :ref:`NodePath` bone2d_node **)** Sets the :ref:`Bone2D` node that is being used as the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone_idx: -- void **set_joint_one_bone_idx** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_joint_one_bone_idx** **(** :ref:`int` bone_idx **)** Sets the index of the :ref:`Bone2D` node that is being used as the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone2d_node: -- void **set_joint_two_bone2d_node** **(** :ref:`NodePath` bone2d_node **)** +.. rst-class:: classref-method + +void **set_joint_two_bone2d_node** **(** :ref:`NodePath` bone2d_node **)** Sets the :ref:`Bone2D` node that is being used as the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone_idx: -- void **set_joint_two_bone_idx** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_joint_two_bone_idx** **(** :ref:`int` bone_idx **)** Sets the index of the :ref:`Bone2D` node that is being used as the second bone in the TwoBoneIK modification. diff --git a/classes/class_skeletonmodification3d.rst b/classes/class_skeletonmodification3d.rst index 17d64669b..f5a047714 100644 --- a/classes/class_skeletonmodification3d.rst +++ b/classes/class_skeletonmodification3d.rst @@ -16,6 +16,8 @@ SkeletonModification3D A resource that operates on bones in a :ref:`Skeleton3D`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,113 +25,157 @@ This resource provides an interface that can be expanded so code that operates o This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`enabled` | ``true`` | -+-------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`execution_mode` | ``0`` | -+-------------------------+-----------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +-------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`execution_mode` | ``0`` | + +-------------------------+-----------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_execute` **(** :ref:`float` delta **)** |virtual| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_setup_modification` **(** :ref:`SkeletonModificationStack3D` modification_stack **)** |virtual| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`clamp_angle` **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModificationStack3D` | :ref:`get_modification_stack` **(** **)** | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_is_setup` **(** :ref:`bool` is_setup **)** | -+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_execute` **(** :ref:`float` delta **)** |virtual| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup_modification` **(** :ref:`SkeletonModificationStack3D` modification_stack **)** |virtual| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`clamp_angle` **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack3D` | :ref:`get_modification_stack` **(** **)** | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_is_setup` **(** :ref:`bool` is_setup **)** | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification3D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | get_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enabled** **(** **)** When true, the modification's :ref:`_execute` function will be called by the :ref:`SkeletonModificationStack3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3D_property_execution_mode: -- :ref:`int` **execution_mode** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_execution_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_execution_mode() | -+-----------+---------------------------+ +:ref:`int` **execution_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_execution_mode** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification3D_method__execute: -- void **_execute** **(** :ref:`float` delta **)** |virtual| +.. rst-class:: classref-method + +void **_execute** **(** :ref:`float` delta **)** |virtual| Executes the given modification. This is where the modification performs whatever function it is designed to do. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3D_method__setup_modification: -- void **_setup_modification** **(** :ref:`SkeletonModificationStack3D` modification_stack **)** |virtual| +.. rst-class:: classref-method + +void **_setup_modification** **(** :ref:`SkeletonModificationStack3D` modification_stack **)** |virtual| Sets up the modification so it can be executed. This function should be called automatically by the :ref:`SkeletonModificationStack3D` containing this modification. If you need to initialize a modification before use, this is the place to do it! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3D_method_clamp_angle: -- :ref:`float` **clamp_angle** **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** +.. rst-class:: classref-method + +:ref:`float` **clamp_angle** **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** Takes a 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3D_method_get_is_setup: -- :ref:`bool` **get_is_setup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_is_setup** **(** **)** |const| Returns whether this modification has been successfully setup or not. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3D_method_get_modification_stack: -- :ref:`SkeletonModificationStack3D` **get_modification_stack** **(** **)** +.. rst-class:: classref-method + +:ref:`SkeletonModificationStack3D` **get_modification_stack** **(** **)** Returns the :ref:`SkeletonModificationStack3D` that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3D_method_set_is_setup: -- void **set_is_setup** **(** :ref:`bool` is_setup **)** +.. rst-class:: classref-method + +void **set_is_setup** **(** :ref:`bool` is_setup **)** Manually allows you to set the setup state of the modification. This function should only rarely be used, as the :ref:`SkeletonModificationStack3D` the modification is bound to should handle setting the modification up. diff --git a/classes/class_skeletonmodification3dccdik.rst b/classes/class_skeletonmodification3dccdik.rst index 3a3c9e55a..b02472795 100644 --- a/classes/class_skeletonmodification3dccdik.rst +++ b/classes/class_skeletonmodification3dccdik.rst @@ -14,6 +14,8 @@ SkeletonModification3DCCDIK A modification that uses CCDIK to manipulate a series of bones to reach a target. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,229 +27,307 @@ CCDIK works by rotating a set of bones, typically called a "bone chain", on a si CCDIK also fully supports angle constraints, allowing for more control over how a solution is met. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`ccdik_data_chain_length` | ``0`` | -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`high_quality_solve` | ``true`` | -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`tip_nodepath` | ``NodePath("")`` | -+---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`ccdik_data_chain_length` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`high_quality_solve` | ``true`` | + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`tip_nodepath` | ``NodePath("")`` | + +---------------------------------+----------------------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_ccdik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_ccdik_joint_bone_name` **(** :ref:`int` joint_idx **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_ccdik_joint_ccdik_axis` **(** :ref:`int` joint_idx **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_ccdik_joint_constraint_invert` **(** :ref:`int` joint_idx **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_ccdik_joint_enable_joint_constraint` **(** :ref:`int` joint_idx **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_bone_name` **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_ccdik_axis` **(** :ref:`int` joint_idx, :ref:`int` axis **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx, :ref:`float` max_angle **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx, :ref:`float` min_angle **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_constraint_invert` **(** :ref:`int` joint_idx, :ref:`bool` invert **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ccdik_joint_enable_joint_constraint` **(** :ref:`int` joint_idx, :ref:`bool` enable **)** | -+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_ccdik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_ccdik_joint_bone_name` **(** :ref:`int` joint_idx **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_ccdik_joint_ccdik_axis` **(** :ref:`int` joint_idx **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_ccdik_joint_constraint_invert` **(** :ref:`int` joint_idx **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_ccdik_joint_enable_joint_constraint` **(** :ref:`int` joint_idx **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_bone_name` **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_ccdik_axis` **(** :ref:`int` joint_idx, :ref:`int` axis **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_constraint_angle_max` **(** :ref:`int` joint_idx, :ref:`float` max_angle **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_constraint_angle_min` **(** :ref:`int` joint_idx, :ref:`float` min_angle **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_constraint_invert` **(** :ref:`int` joint_idx, :ref:`bool` invert **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ccdik_joint_enable_joint_constraint` **(** :ref:`int` joint_idx, :ref:`bool` enable **)** | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification3DCCDIK_property_ccdik_data_chain_length: -- :ref:`int` **ccdik_data_chain_length** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------+ -| *Setter* | set_ccdik_data_chain_length(value) | -+-----------+------------------------------------+ -| *Getter* | get_ccdik_data_chain_length() | -+-----------+------------------------------------+ +:ref:`int` **ccdik_data_chain_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_ccdik_data_chain_length** **(** :ref:`int` value **)** +- :ref:`int` **get_ccdik_data_chain_length** **(** **)** The number of CCDIK joints in the CCDIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_property_high_quality_solve: -- :ref:`bool` **high_quality_solve** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------------+ -| *Setter* | set_use_high_quality_solve(value) | -+-----------+-----------------------------------+ -| *Getter* | get_use_high_quality_solve() | -+-----------+-----------------------------------+ +:ref:`bool` **high_quality_solve** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_high_quality_solve** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_high_quality_solve** **(** **)** When true, the CCDIK algorithm will perform a higher quality solve that returns more natural results. A high quality solve requires more computation power to solve though, and therefore can be disabled to save performance. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_property_tip_nodepath: -- :ref:`NodePath` **tip_nodepath** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``NodePath("")`` | -+-----------+---------------------+ -| *Setter* | set_tip_node(value) | -+-----------+---------------------+ -| *Getter* | get_tip_node() | -+-----------+---------------------+ +:ref:`NodePath` **tip_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_tip_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_tip_node** **(** **)** The end position of the CCDIK chain. Typically, this should be a child of a :ref:`BoneAttachment3D` node attached to the final bone in the CCDIK chain, where the child node is offset so it is at the end of the final bone. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification3DCCDIK_method_get_ccdik_joint_bone_index: -- :ref:`int` **get_ccdik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_ccdik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| Returns the bone index of the bone assigned to the CCDIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_get_ccdik_joint_bone_name: -- :ref:`String` **get_ccdik_joint_bone_name** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_ccdik_joint_bone_name** **(** :ref:`int` joint_idx **)** |const| Returns the name of the bone that is assigned to the CCDIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_get_ccdik_joint_ccdik_axis: -- :ref:`int` **get_ccdik_joint_ccdik_axis** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_ccdik_joint_ccdik_axis** **(** :ref:`int` joint_idx **)** |const| Returns the integer representing the joint axis of the CCDIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_get_ccdik_joint_constraint_angle_max: -- :ref:`float` **get_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx **)** |const| Returns the maximum angle constraint for the joint at ``joint_idx``. **Note:** This angle is in degrees! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_get_ccdik_joint_constraint_angle_min: -- :ref:`float` **get_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx **)** |const| Returns the minimum angle constraint for the joint at ``joint_idx``. **Note:** This angle is in degrees! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_get_ccdik_joint_constraint_invert: -- :ref:`bool` **get_ccdik_joint_constraint_invert** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_ccdik_joint_constraint_invert** **(** :ref:`int` joint_idx **)** |const| Returns whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. See :ref:`set_ccdik_joint_constraint_invert` for details. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_get_ccdik_joint_enable_joint_constraint: -- :ref:`bool` **get_ccdik_joint_enable_joint_constraint** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_ccdik_joint_enable_joint_constraint** **(** :ref:`int` joint_idx **)** |const| Enables angle constraints to the CCDIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_set_ccdik_joint_bone_index: -- void **set_ccdik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** Sets the bone index, ``bone_index``, of the CCDIK joint at ``joint_idx``. When possible, this will also update the ``bone_name`` of the CCDIK joint based on data provided by the linked skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_set_ccdik_joint_bone_name: -- void **set_ccdik_joint_bone_name** **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_bone_name** **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** Sets the bone name, ``bone_name``, of the CCDIK joint at ``joint_idx``. When possible, this will also update the ``bone_index`` of the CCDIK joint based on data provided by the linked skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_set_ccdik_joint_ccdik_axis: -- void **set_ccdik_joint_ccdik_axis** **(** :ref:`int` joint_idx, :ref:`int` axis **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_ccdik_axis** **(** :ref:`int` joint_idx, :ref:`int` axis **)** Sets the joint axis of the CCDIK joint at ``joint_idx`` to the passed-in joint axis, ``axis``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_set_ccdik_joint_constraint_angle_max: -- void **set_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx, :ref:`float` max_angle **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_constraint_angle_max** **(** :ref:`int` joint_idx, :ref:`float` max_angle **)** Sets the maximum angle constraint for the joint at ``joint_idx``. **Note:** This angle must be in radians! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_set_ccdik_joint_constraint_angle_min: -- void **set_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx, :ref:`float` min_angle **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_constraint_angle_min** **(** :ref:`int` joint_idx, :ref:`float` min_angle **)** Sets the minimum angle constraint for the joint at ``joint_idx``. **Note:** This angle must be in radians! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_set_ccdik_joint_constraint_invert: -- void **set_ccdik_joint_constraint_invert** **(** :ref:`int` joint_idx, :ref:`bool` invert **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_constraint_invert** **(** :ref:`int` joint_idx, :ref:`bool` invert **)** Sets whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. An inverted joint constraint only constraints the CCDIK joint to the angles *outside of* the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DCCDIK_method_set_ccdik_joint_enable_joint_constraint: -- void **set_ccdik_joint_enable_joint_constraint** **(** :ref:`int` joint_idx, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_ccdik_joint_enable_joint_constraint** **(** :ref:`int` joint_idx, :ref:`bool` enable **)** Sets whether joint constraints are enabled for the CCDIK joint at ``joint_idx``. diff --git a/classes/class_skeletonmodification3dfabrik.rst b/classes/class_skeletonmodification3dfabrik.rst index d4e019f61..023ee9785 100644 --- a/classes/class_skeletonmodification3dfabrik.rst +++ b/classes/class_skeletonmodification3dfabrik.rst @@ -14,6 +14,8 @@ SkeletonModification3DFABRIK A modification that uses FABRIK to manipulate a series of bones to reach a target. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,263 +29,353 @@ Because of how FABRIK works, it often gives more natural results than those seen To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`chain_max_iterations` | ``10`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`chain_tolerance` | ``0.01`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`fabrik_data_chain_length` | ``0`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`chain_max_iterations` | ``10`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`chain_tolerance` | ``0.01`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`fabrik_data_chain_length` | ``0`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fabrik_joint_auto_calculate_length` **(** :ref:`int` joint_idx **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_fabrik_joint_auto_calculate_length` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_fabrik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_fabrik_joint_bone_name` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_fabrik_joint_length` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_fabrik_joint_magnet` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_fabrik_joint_tip_node` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_fabrik_joint_use_target_basis` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_fabrik_joint_use_tip_node` **(** :ref:`int` joint_idx **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_auto_calculate_length` **(** :ref:`int` joint_idx, :ref:`bool` auto_calculate_length **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_bone_name` **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_length` **(** :ref:`int` joint_idx, :ref:`float` length **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_magnet` **(** :ref:`int` joint_idx, :ref:`Vector3` magnet_position **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_tip_node` **(** :ref:`int` joint_idx, :ref:`NodePath` tip_node **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_use_target_basis` **(** :ref:`int` joint_idx, :ref:`bool` use_target_basis **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fabrik_joint_use_tip_node` **(** :ref:`int` joint_idx, :ref:`bool` use_tip_node **)** | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fabrik_joint_auto_calculate_length` **(** :ref:`int` joint_idx **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_fabrik_joint_auto_calculate_length` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_fabrik_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_fabrik_joint_bone_name` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_fabrik_joint_length` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_fabrik_joint_magnet` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_fabrik_joint_tip_node` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_fabrik_joint_use_target_basis` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_fabrik_joint_use_tip_node` **(** :ref:`int` joint_idx **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_auto_calculate_length` **(** :ref:`int` joint_idx, :ref:`bool` auto_calculate_length **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_bone_name` **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_length` **(** :ref:`int` joint_idx, :ref:`float` length **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_magnet` **(** :ref:`int` joint_idx, :ref:`Vector3` magnet_position **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_tip_node` **(** :ref:`int` joint_idx, :ref:`NodePath` tip_node **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_use_target_basis` **(** :ref:`int` joint_idx, :ref:`bool` use_target_basis **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fabrik_joint_use_tip_node` **(** :ref:`int` joint_idx, :ref:`bool` use_tip_node **)** | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification3DFABRIK_property_chain_max_iterations: -- :ref:`int` **chain_max_iterations** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``10`` | -+-----------+---------------------------------+ -| *Setter* | set_chain_max_iterations(value) | -+-----------+---------------------------------+ -| *Getter* | get_chain_max_iterations() | -+-----------+---------------------------------+ +:ref:`int` **chain_max_iterations** = ``10`` + +.. rst-class:: classref-property-setget + +- void **set_chain_max_iterations** **(** :ref:`int` value **)** +- :ref:`int` **get_chain_max_iterations** **(** **)** The number of times FABRIK will try to solve each time the ``execute`` function is called. Setting this value to a lower number will be result in better performance, but this can also result in harsher movements and slower solves. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_property_chain_tolerance: -- :ref:`float` **chain_tolerance** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0.01`` | -+-----------+----------------------------+ -| *Setter* | set_chain_tolerance(value) | -+-----------+----------------------------+ -| *Getter* | get_chain_tolerance() | -+-----------+----------------------------+ +:ref:`float` **chain_tolerance** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_chain_tolerance** **(** :ref:`float` value **)** +- :ref:`float` **get_chain_tolerance** **(** **)** The minimum distance the target has to be from the tip of the final bone in the bone chain. Setting this value to a higher number allows for greater performance, but less accurate solves. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_property_fabrik_data_chain_length: -- :ref:`int` **fabrik_data_chain_length** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------------+ -| *Setter* | set_fabrik_data_chain_length(value) | -+-----------+-------------------------------------+ -| *Getter* | get_fabrik_data_chain_length() | -+-----------+-------------------------------------+ +:ref:`int` **fabrik_data_chain_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fabrik_data_chain_length** **(** :ref:`int` value **)** +- :ref:`int` **get_fabrik_data_chain_length** **(** **)** The amount of FABRIK joints in the FABRIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification3DFABRIK_method_fabrik_joint_auto_calculate_length: -- void **fabrik_joint_auto_calculate_length** **(** :ref:`int` joint_idx **)** +.. rst-class:: classref-method + +void **fabrik_joint_auto_calculate_length** **(** :ref:`int` joint_idx **)** Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_auto_calculate_length: -- :ref:`bool` **get_fabrik_joint_auto_calculate_length** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_fabrik_joint_auto_calculate_length** **(** :ref:`int` joint_idx **)** |const| Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_bone_index: -- :ref:`int` **get_fabrik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_fabrik_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| Returns the bone index of the bone assigned to the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_bone_name: -- :ref:`String` **get_fabrik_joint_bone_name** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_fabrik_joint_bone_name** **(** :ref:`int` joint_idx **)** |const| Returns the name of the bone that is assigned to the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_length: -- :ref:`float` **get_fabrik_joint_length** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_fabrik_joint_length** **(** :ref:`int` joint_idx **)** |const| Returns the length of the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_magnet: -- :ref:`Vector3` **get_fabrik_joint_magnet** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_fabrik_joint_magnet** **(** :ref:`int` joint_idx **)** |const| Returns the magnet vector of the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_tip_node: -- :ref:`NodePath` **get_fabrik_joint_tip_node** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_fabrik_joint_tip_node** **(** :ref:`int` joint_idx **)** |const| Returns the :ref:`Node3D`-based node placed at the tip of the FABRIK joint at ``joint_idx``, if one has been set. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_use_target_basis: -- :ref:`bool` **get_fabrik_joint_use_target_basis** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_fabrik_joint_use_target_basis** **(** :ref:`int` joint_idx **)** |const| Returns a boolean indicating whether the FABRIK joint uses the target's :ref:`Basis` for its rotation. \ **Note:** This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_get_fabrik_joint_use_tip_node: -- :ref:`bool` **get_fabrik_joint_use_tip_node** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_fabrik_joint_use_tip_node** **(** :ref:`int` joint_idx **)** |const| Sets the :ref:`Node3D`-based node that will be used as the tip of the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_auto_calculate_length: -- void **set_fabrik_joint_auto_calculate_length** **(** :ref:`int` joint_idx, :ref:`bool` auto_calculate_length **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_auto_calculate_length** **(** :ref:`int` joint_idx, :ref:`bool` auto_calculate_length **)** When ``true``, this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at ``joint_idx``. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification **cannot** autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_bone_index: -- void **set_fabrik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_index **)** Sets the bone index, ``bone_index``, of the FABRIK joint at ``joint_idx``. When possible, this will also update the ``bone_name`` of the FABRIK joint based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_bone_name: -- void **set_fabrik_joint_bone_name** **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_bone_name** **(** :ref:`int` joint_idx, :ref:`String` bone_name **)** Sets the bone name, ``bone_name``, of the FABRIK joint at ``joint_idx``. When possible, this will also update the ``bone_index`` of the FABRIK joint based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_length: -- void **set_fabrik_joint_length** **(** :ref:`int` joint_idx, :ref:`float` length **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_length** **(** :ref:`int` joint_idx, :ref:`float` length **)** Sets the joint length, ``length``, of the FABRIK joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_magnet: -- void **set_fabrik_joint_magnet** **(** :ref:`int` joint_idx, :ref:`Vector3` magnet_position **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_magnet** **(** :ref:`int` joint_idx, :ref:`Vector3` magnet_position **)** Sets the magenet position to ``magnet_position`` for the joint at ``joint_idx``. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_tip_node: -- void **set_fabrik_joint_tip_node** **(** :ref:`int` joint_idx, :ref:`NodePath` tip_node **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_tip_node** **(** :ref:`int` joint_idx, :ref:`NodePath` tip_node **)** Sets the nodepath of the FARIK joint at ``joint_idx`` to ``tip_node``. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length. \ **Note:** The tip node should generally be a child node of a :ref:`BoneAttachment3D` node attached to the bone that this FABRIK joint operates on, with the child node being offset so it is at the end of the bone. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_use_target_basis: -- void **set_fabrik_joint_use_target_basis** **(** :ref:`int` joint_idx, :ref:`bool` use_target_basis **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_use_target_basis** **(** :ref:`int` joint_idx, :ref:`bool` use_target_basis **)** Sets whether the FABRIK joint at ``joint_idx`` uses the target's :ref:`Basis` for its rotation. \ **Note:** This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DFABRIK_method_set_fabrik_joint_use_tip_node: -- void **set_fabrik_joint_use_tip_node** **(** :ref:`int` joint_idx, :ref:`bool` use_tip_node **)** +.. rst-class:: classref-method + +void **set_fabrik_joint_use_tip_node** **(** :ref:`int` joint_idx, :ref:`bool` use_tip_node **)** Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at ``joint_idx``. This will only work if there is a node assigned to the tip nodepath for this joint. diff --git a/classes/class_skeletonmodification3djiggle.rst b/classes/class_skeletonmodification3djiggle.rst index dd619a5cb..2c5346ba5 100644 --- a/classes/class_skeletonmodification3djiggle.rst +++ b/classes/class_skeletonmodification3djiggle.rst @@ -14,6 +14,8 @@ SkeletonModification3DJiggle A modification that jiggles bones as they move towards a target. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,361 +25,474 @@ This modification is useful for adding additional motion to things like hair, th \ **Note:** The Jiggle modifier has ``jiggle_joints``, which are the data objects that hold the data for each joint in the Jiggle chain. This is different from a bone! Jiggle joints hold the data needed for each bone in the bone chain used by the Jiggle modification. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`damping` | ``0.75`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -6, 0)`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`jiggle_data_chain_length` | ``0`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`mass` | ``0.75`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`stiffness` | ``3.0`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`use_gravity` | ``false`` | -+---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`damping` | ``0.75`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -6, 0)`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`jiggle_data_chain_length` | ``0`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mass` | ``0.75`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`stiffness` | ``3.0`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`use_gravity` | ``false`` | + +---------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_mask` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_jiggle_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_jiggle_joint_bone_name` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_jiggle_joint_damping` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_jiggle_joint_gravity` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_jiggle_joint_mass` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_jiggle_joint_override` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_jiggle_joint_roll` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_jiggle_joint_stiffness` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_use_colliders` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask` **(** :ref:`int` mask **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_bone_name` **(** :ref:`int` joint_idx, :ref:`String` name **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_damping` **(** :ref:`int` joint_idx, :ref:`float` damping **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_gravity` **(** :ref:`int` joint_idx, :ref:`Vector3` gravity **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_mass` **(** :ref:`int` joint_idx, :ref:`float` mass **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_override` **(** :ref:`int` joint_idx, :ref:`bool` override **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_roll` **(** :ref:`int` joint_idx, :ref:`float` roll **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_stiffness` **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_colliders` **(** :ref:`bool` use_colliders **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_mask` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_jiggle_joint_bone_index` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_jiggle_joint_bone_name` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_jiggle_joint_damping` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_jiggle_joint_gravity` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_jiggle_joint_mass` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_jiggle_joint_override` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_jiggle_joint_roll` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_jiggle_joint_stiffness` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_colliders` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask` **(** :ref:`int` mask **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_bone_index` **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_bone_name` **(** :ref:`int` joint_idx, :ref:`String` name **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_damping` **(** :ref:`int` joint_idx, :ref:`float` damping **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_gravity` **(** :ref:`int` joint_idx, :ref:`Vector3` gravity **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_mass` **(** :ref:`int` joint_idx, :ref:`float` mass **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_override` **(** :ref:`int` joint_idx, :ref:`bool` override **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_roll` **(** :ref:`int` joint_idx, :ref:`float` roll **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_stiffness` **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_jiggle_joint_use_gravity` **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_colliders` **(** :ref:`bool` use_colliders **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification3DJiggle_property_damping: -- :ref:`float` **damping** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.75`` | -+-----------+--------------------+ -| *Setter* | set_damping(value) | -+-----------+--------------------+ -| *Getter* | get_damping() | -+-----------+--------------------+ +:ref:`float` **damping** = ``0.75`` + +.. rst-class:: classref-property-setget + +- void **set_damping** **(** :ref:`float` value **)** +- :ref:`float` **get_damping** **(** **)** The default amount of dampening applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_property_gravity: -- :ref:`Vector3` **gravity** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector3(0, -6, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_gravity(value) | -+-----------+-----------------------+ -| *Getter* | get_gravity() | -+-----------+-----------------------+ +:ref:`Vector3` **gravity** = ``Vector3(0, -6, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_gravity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_gravity** **(** **)** The default amount of gravity applied to the Jiggle joints, if they are not overridden. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_property_jiggle_data_chain_length: -- :ref:`int` **jiggle_data_chain_length** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------------+ -| *Setter* | set_jiggle_data_chain_length(value) | -+-----------+-------------------------------------+ -| *Getter* | get_jiggle_data_chain_length() | -+-----------+-------------------------------------+ +:ref:`int` **jiggle_data_chain_length** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_jiggle_data_chain_length** **(** :ref:`int` value **)** +- :ref:`int` **get_jiggle_data_chain_length** **(** **)** The amount of Jiggle joints in the Jiggle modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_property_mass: -- :ref:`float` **mass** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.75`` | -+-----------+-----------------+ -| *Setter* | set_mass(value) | -+-----------+-----------------+ -| *Getter* | get_mass() | -+-----------+-----------------+ +:ref:`float` **mass** = ``0.75`` + +.. rst-class:: classref-property-setget + +- void **set_mass** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_property_stiffness: -- :ref:`float` **stiffness** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``3.0`` | -+-----------+----------------------+ -| *Setter* | set_stiffness(value) | -+-----------+----------------------+ -| *Getter* | get_stiffness() | -+-----------+----------------------+ +:ref:`float` **stiffness** = ``3.0`` + +.. rst-class:: classref-property-setget + +- void **set_stiffness** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_property_use_gravity: -- :ref:`bool` **use_gravity** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_use_gravity(value) | -+-----------+------------------------+ -| *Getter* | get_use_gravity() | -+-----------+------------------------+ +:ref:`bool` **use_gravity** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_gravity** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_gravity** **(** **)** Whether the gravity vector, :ref:`gravity`, should be applied to the Jiggle joints, assuming they are not overriding the default settings. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification3DJiggle_method_get_collision_mask: -- :ref:`int` **get_collision_mask** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_mask** **(** **)** |const| Returns the collision mask that the Jiggle modifier will take into account when performing physics calculations. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_bone_index: -- :ref:`int` **get_jiggle_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_jiggle_joint_bone_index** **(** :ref:`int` joint_idx **)** |const| Returns the bone index of the bone assigned to the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_bone_name: -- :ref:`String` **get_jiggle_joint_bone_name** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_jiggle_joint_bone_name** **(** :ref:`int` joint_idx **)** |const| Returns the name of the bone that is assigned to the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_damping: -- :ref:`float` **get_jiggle_joint_damping** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_jiggle_joint_damping** **(** :ref:`int` joint_idx **)** |const| Returns the amount of dampening of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_gravity: -- :ref:`Vector3` **get_jiggle_joint_gravity** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_jiggle_joint_gravity** **(** :ref:`int` joint_idx **)** |const| Returns a :ref:`Vector3` representign the amount of gravity the Jiggle joint at ``joint_idx`` is influenced by. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_mass: -- :ref:`float` **get_jiggle_joint_mass** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_jiggle_joint_mass** **(** :ref:`int` joint_idx **)** |const| Returns the amount of mass of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_override: -- :ref:`bool` **get_jiggle_joint_override** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_jiggle_joint_override** **(** :ref:`int` joint_idx **)** |const| Returns a boolean that indicates whether the joint at ``joint_idx`` is overriding the default jiggle joint data defined in the modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_roll: -- :ref:`float` **get_jiggle_joint_roll** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_jiggle_joint_roll** **(** :ref:`int` joint_idx **)** |const| Returns the amount of roll/twist applied to the bone that the Jiggle joint is applied to. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_stiffness: -- :ref:`float` **get_jiggle_joint_stiffness** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_jiggle_joint_stiffness** **(** :ref:`int` joint_idx **)** |const| Returns the stiffness of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_jiggle_joint_use_gravity: -- :ref:`bool` **get_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx **)** |const| Returns a boolean that indicates whether the joint at ``joint_idx`` is using gravity or not. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_get_use_colliders: -- :ref:`bool` **get_use_colliders** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_use_colliders** **(** **)** |const| Returns whether the Jiggle modifier is taking physics colliders into account when solving. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_collision_mask: -- void **set_collision_mask** **(** :ref:`int` mask **)** +.. rst-class:: classref-method + +void **set_collision_mask** **(** :ref:`int` mask **)** Sets the collision mask that the Jiggle modifier takes into account when performing physics calculations. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_bone_index: -- void **set_jiggle_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_bone_index** **(** :ref:`int` joint_idx, :ref:`int` bone_idx **)** Sets the bone index, ``bone_idx``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone_name`` of the Jiggle joint based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_bone_name: -- void **set_jiggle_joint_bone_name** **(** :ref:`int` joint_idx, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_bone_name** **(** :ref:`int` joint_idx, :ref:`String` name **)** Sets the bone name, ``name``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone_index`` of the Jiggle joint based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_damping: -- void **set_jiggle_joint_damping** **(** :ref:`int` joint_idx, :ref:`float` damping **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_damping** **(** :ref:`int` joint_idx, :ref:`float` damping **)** Sets the amount of dampening of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_gravity: -- void **set_jiggle_joint_gravity** **(** :ref:`int` joint_idx, :ref:`Vector3` gravity **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_gravity** **(** :ref:`int` joint_idx, :ref:`Vector3` gravity **)** Sets the gravity vector of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_mass: -- void **set_jiggle_joint_mass** **(** :ref:`int` joint_idx, :ref:`float` mass **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_mass** **(** :ref:`int` joint_idx, :ref:`float` mass **)** Sets the of mass of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_override: -- void **set_jiggle_joint_override** **(** :ref:`int` joint_idx, :ref:`bool` override **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_override** **(** :ref:`int` joint_idx, :ref:`bool` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_roll: -- void **set_jiggle_joint_roll** **(** :ref:`int` joint_idx, :ref:`float` roll **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_roll** **(** :ref:`int` joint_idx, :ref:`float` roll **)** Sets the amount of roll/twist on the bone the Jiggle joint is attached to. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_stiffness: -- void **set_jiggle_joint_stiffness** **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_stiffness** **(** :ref:`int` joint_idx, :ref:`float` stiffness **)** Sets the of stiffness of the Jiggle joint at ``joint_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_jiggle_joint_use_gravity: -- void **set_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** +.. rst-class:: classref-method + +void **set_jiggle_joint_use_gravity** **(** :ref:`int` joint_idx, :ref:`bool` use_gravity **)** Sets whether the Jiggle joint at ``joint_idx`` should use gravity. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DJiggle_method_set_use_colliders: -- void **set_use_colliders** **(** :ref:`bool` use_colliders **)** +.. rst-class:: classref-method + +void **set_use_colliders** **(** :ref:`bool` use_colliders **)** When ``true``, the Jiggle modifier will use raycasting to prevent the Jiggle joints from rotating themselves into collision objects when solving. diff --git a/classes/class_skeletonmodification3dlookat.rst b/classes/class_skeletonmodification3dlookat.rst index 1201f22d8..5b9503fe6 100644 --- a/classes/class_skeletonmodification3dlookat.rst +++ b/classes/class_skeletonmodification3dlookat.rst @@ -14,140 +14,187 @@ SkeletonModification3DLookAt A modification that rotates a bone to look at a target. +.. rst-class:: classref-introduction-group + Description ----------- This :ref:`SkeletonModification3D` rotates a bone to look a target. This is extremely helpful for moving character's heads to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`bone_index` | ``-2`` | -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`String` | :ref:`bone_name` | ``""`` | -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+-------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`bone_index` | ``-2`` | + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + | :ref:`String` | :ref:`bone_name` | ``""`` | + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+-------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_additional_rotation` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_lock_rotation_plane` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_lock_rotation_to_plane` **(** **)** |const| | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_additional_rotation` **(** :ref:`Vector3` additional_rotation **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_lock_rotation_plane` **(** :ref:`int` plane **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_lock_rotation_to_plane` **(** :ref:`bool` lock_to_plane **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_additional_rotation` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_lock_rotation_plane` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_lock_rotation_to_plane` **(** **)** |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_additional_rotation` **(** :ref:`Vector3` additional_rotation **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_lock_rotation_plane` **(** :ref:`int` plane **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_lock_rotation_to_plane` **(** :ref:`bool` lock_to_plane **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification3DLookAt_property_bone_index: -- :ref:`int` **bone_index** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``-2`` | -+-----------+-----------------------+ -| *Setter* | set_bone_index(value) | -+-----------+-----------------------+ -| *Getter* | get_bone_index() | -+-----------+-----------------------+ +:ref:`int` **bone_index** = ``-2`` + +.. rst-class:: classref-property-setget + +- void **set_bone_index** **(** :ref:`int` value **)** +- :ref:`int` **get_bone_index** **(** **)** The bone index of the bone that should be operated on by this modification. When possible, this will also update the :ref:`bone_name` based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DLookAt_property_bone_name: -- :ref:`String` **bone_name** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``""`` | -+-----------+----------------------+ -| *Setter* | set_bone_name(value) | -+-----------+----------------------+ -| *Getter* | get_bone_name() | -+-----------+----------------------+ +:ref:`String` **bone_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_bone_name** **(** :ref:`String` value **)** +- :ref:`String` **get_bone_name** **(** **)** The name of the bone that should be operated on by this modification. When possible, this will also update the :ref:`bone_index` based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DLookAt_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_target_node** **(** **)** The NodePath to the node that is the target for the modification. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification3DLookAt_method_get_additional_rotation: -- :ref:`Vector3` **get_additional_rotation** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_additional_rotation** **(** **)** |const| Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DLookAt_method_get_lock_rotation_plane: -- :ref:`int` **get_lock_rotation_plane** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_lock_rotation_plane** **(** **)** |const| Returns the plane that the LookAt modification is limiting rotation to. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DLookAt_method_get_lock_rotation_to_plane: -- :ref:`bool` **get_lock_rotation_to_plane** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_lock_rotation_to_plane** **(** **)** |const| Returns whether the LookAt modification is limiting rotation to a single plane in 3D space. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DLookAt_method_set_additional_rotation: -- void **set_additional_rotation** **(** :ref:`Vector3` additional_rotation **)** +.. rst-class:: classref-method + +void **set_additional_rotation** **(** :ref:`Vector3` additional_rotation **)** Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DLookAt_method_set_lock_rotation_plane: -- void **set_lock_rotation_plane** **(** :ref:`int` plane **)** +.. rst-class:: classref-method + +void **set_lock_rotation_plane** **(** :ref:`int` plane **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DLookAt_method_set_lock_rotation_to_plane: -- void **set_lock_rotation_to_plane** **(** :ref:`bool` lock_to_plane **)** +.. rst-class:: classref-method + +void **set_lock_rotation_to_plane** **(** :ref:`bool` lock_to_plane **)** When ``true``, the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the ``set_lock_rotation_plane`` function. diff --git a/classes/class_skeletonmodification3dstackholder.rst b/classes/class_skeletonmodification3dstackholder.rst index 7e0807418..8d4543470 100644 --- a/classes/class_skeletonmodification3dstackholder.rst +++ b/classes/class_skeletonmodification3dstackholder.rst @@ -14,6 +14,8 @@ SkeletonModification3DStackHolder A modification that holds and executes a :ref:`SkeletonModificationStack3D`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,29 +23,46 @@ This :ref:`SkeletonModification3D` holds a referen \ **Note:** The modifications in the held :ref:`SkeletonModificationStack3D` will only be executed if their execution mode matches the execution mode of the SkeletonModification3DStackHolder. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModificationStack3D` | :ref:`get_held_modification_stack` **(** **)** |const| | -+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_held_modification_stack` **(** :ref:`SkeletonModificationStack3D` held_modification_stack **)** | -+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack3D` | :ref:`get_held_modification_stack` **(** **)** |const| | + +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_held_modification_stack` **(** :ref:`SkeletonModificationStack3D` held_modification_stack **)** | + +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SkeletonModification3DStackHolder_method_get_held_modification_stack: -- :ref:`SkeletonModificationStack3D` **get_held_modification_stack** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SkeletonModificationStack3D` **get_held_modification_stack** **(** **)** |const| Returns the :ref:`SkeletonModificationStack3D` that this modification is holding. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DStackHolder_method_set_held_modification_stack: -- void **set_held_modification_stack** **(** :ref:`SkeletonModificationStack3D` held_modification_stack **)** +.. rst-class:: classref-method + +void **set_held_modification_stack** **(** :ref:`SkeletonModificationStack3D` held_modification_stack **)** Sets the :ref:`SkeletonModificationStack3D` that this modification is holding. This modification stack will then be executed when this modification is executed. diff --git a/classes/class_skeletonmodification3dtwoboneik.rst b/classes/class_skeletonmodification3dtwoboneik.rst index e5516bb21..0977f225d 100644 --- a/classes/class_skeletonmodification3dtwoboneik.rst +++ b/classes/class_skeletonmodification3dtwoboneik.rst @@ -14,6 +14,8 @@ SkeletonModification3DTwoBoneIK A modification that moves two bones to reach the target. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,297 +25,420 @@ TwoBoneIK is great for arms, legs, and really any joints that can be represented A :ref:`Node3D`-based node can be used to define the pole, or bend direction, allowing control over which direction the joint takes when bending to reach the target when the target is within reach. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | -+---------------------------------+----------------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`target_nodepath` | ``NodePath("")`` | + +---------------------------------+----------------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_auto_calculate_joint_length` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_joint_one_bone_idx` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_joint_one_bone_name` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_joint_one_length` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_joint_one_roll` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_joint_two_bone_idx` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_joint_two_bone_name` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_joint_two_length` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_joint_two_roll` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_pole_node` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`get_tip_node` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_use_pole_node` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_use_tip_node` **(** **)** |const| | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_auto_calculate_joint_length` **(** :ref:`bool` auto_calculate_joint_length **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_one_bone_idx` **(** :ref:`int` bone_idx **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_one_bone_name` **(** :ref:`String` bone_name **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_one_length` **(** :ref:`float` bone_length **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_one_roll` **(** :ref:`float` roll **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_two_bone_idx` **(** :ref:`int` bone_idx **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_two_bone_name` **(** :ref:`String` bone_name **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_two_length` **(** :ref:`float` bone_length **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_joint_two_roll` **(** :ref:`float` roll **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_pole_node` **(** :ref:`NodePath` pole_nodepath **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tip_node` **(** :ref:`NodePath` tip_nodepath **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_pole_node` **(** :ref:`bool` use_pole_node **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_tip_node` **(** :ref:`bool` use_tip_node **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_auto_calculate_joint_length` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_one_bone_idx` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_joint_one_bone_name` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_one_length` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_one_roll` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_two_bone_idx` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_joint_two_bone_name` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_two_length` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_two_roll` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_pole_node` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_tip_node` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_pole_node` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_tip_node` **(** **)** |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_auto_calculate_joint_length` **(** :ref:`bool` auto_calculate_joint_length **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_one_bone_idx` **(** :ref:`int` bone_idx **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_one_bone_name` **(** :ref:`String` bone_name **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_one_length` **(** :ref:`float` bone_length **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_one_roll` **(** :ref:`float` roll **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_two_bone_idx` **(** :ref:`int` bone_idx **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_two_bone_name` **(** :ref:`String` bone_name **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_two_length` **(** :ref:`float` bone_length **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_joint_two_roll` **(** :ref:`float` roll **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_pole_node` **(** :ref:`NodePath` pole_nodepath **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tip_node` **(** :ref:`NodePath` tip_nodepath **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_pole_node` **(** :ref:`bool` use_pole_node **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_tip_node` **(** :ref:`bool` use_tip_node **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModification3DTwoBoneIK_property_target_nodepath: -- :ref:`NodePath` **target_nodepath** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------+ -| *Setter* | set_target_node(value) | -+-----------+------------------------+ -| *Getter* | get_target_node() | -+-----------+------------------------+ +:ref:`NodePath` **target_nodepath** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_target_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_target_node** **(** **)** The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will attempt to rotate the bones to reach. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModification3DTwoBoneIK_method_get_auto_calculate_joint_length: -- :ref:`bool` **get_auto_calculate_joint_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_auto_calculate_joint_length** **(** **)** |const| Returns whether the TwoBoneIK modification will attempt to autocalculate the lengths of the two bones. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_one_bone_idx: -- :ref:`int` **get_joint_one_bone_idx** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_joint_one_bone_idx** **(** **)** |const| Returns the bone index of the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_one_bone_name: -- :ref:`String` **get_joint_one_bone_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_joint_one_bone_name** **(** **)** |const| Returns the name of the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_one_length: -- :ref:`float` **get_joint_one_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_joint_one_length** **(** **)** |const| Returns the length of the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_one_roll: -- :ref:`float` **get_joint_one_roll** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_joint_one_roll** **(** **)** |const| Returns the amount of roll/twist applied to the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_two_bone_idx: -- :ref:`int` **get_joint_two_bone_idx** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_joint_two_bone_idx** **(** **)** |const| Returns the bone index of the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_two_bone_name: -- :ref:`String` **get_joint_two_bone_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_joint_two_bone_name** **(** **)** |const| Returns the name of the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_two_length: -- :ref:`float` **get_joint_two_length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_joint_two_length** **(** **)** |const| Returns the length of the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_joint_two_roll: -- :ref:`float` **get_joint_two_roll** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_joint_two_roll** **(** **)** |const| Returns the amount of roll/twist applied to the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_pole_node: -- :ref:`NodePath` **get_pole_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_pole_node** **(** **)** |const| Returns the node that is being used as the pole node for the TwoBoneIK modification, if a pole node has been set. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_tip_node: -- :ref:`NodePath` **get_tip_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`NodePath` **get_tip_node** **(** **)** |const| Returns the node that is being used to calculate the tip position of the second bone in the TwoBoneIK modification, if a tip node has been set. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_use_pole_node: -- :ref:`bool` **get_use_pole_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_use_pole_node** **(** **)** |const| Returns whether the TwoBoneIK modification will attempt to use the pole node to figure out which direction to bend, if a pole node has been set. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_get_use_tip_node: -- :ref:`bool` **get_use_tip_node** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_use_tip_node** **(** **)** |const| Returns whether the TwoBoneIK modification will attempt to use the tip node to figure out the length and position of the tip of the second bone. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_auto_calculate_joint_length: -- void **set_auto_calculate_joint_length** **(** :ref:`bool` auto_calculate_joint_length **)** +.. rst-class:: classref-method + +void **set_auto_calculate_joint_length** **(** :ref:`bool` auto_calculate_joint_length **)** If true, the TwoBoneIK modification will attempt to autocalculate the lengths of the bones being used. The first bone will be calculated by using the distance from the origin of the first bone to the origin of the second bone. The second bone will be calculated either using the tip node if that setting is enabled, or by using the distances of the second bone's children. If the tip node is not enabled and the bone has no children, then the length cannot be autocalculated. In this case, the length will either have to be manually inputted or a tip node used to calculate the length. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_one_bone_idx: -- void **set_joint_one_bone_idx** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_joint_one_bone_idx** **(** :ref:`int` bone_idx **)** Sets the bone index, ``bone_idx``, of the first bone. When possible, this will also update the ``bone_name`` of the first bone based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_one_bone_name: -- void **set_joint_one_bone_name** **(** :ref:`String` bone_name **)** +.. rst-class:: classref-method + +void **set_joint_one_bone_name** **(** :ref:`String` bone_name **)** Sets the bone name, ``bone_name``, of the first bone. When possible, this will also update the ``bone_index`` of the first bone based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_one_length: -- void **set_joint_one_length** **(** :ref:`float` bone_length **)** +.. rst-class:: classref-method + +void **set_joint_one_length** **(** :ref:`float` bone_length **)** Sets the length of the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_one_roll: -- void **set_joint_one_roll** **(** :ref:`float` roll **)** +.. rst-class:: classref-method + +void **set_joint_one_roll** **(** :ref:`float` roll **)** Sets the amount of roll/twist applied to the first bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_two_bone_idx: -- void **set_joint_two_bone_idx** **(** :ref:`int` bone_idx **)** +.. rst-class:: classref-method + +void **set_joint_two_bone_idx** **(** :ref:`int` bone_idx **)** Sets the bone index, ``bone_idx``, of the second bone. When possible, this will also update the ``bone_name`` of the second bone based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_two_bone_name: -- void **set_joint_two_bone_name** **(** :ref:`String` bone_name **)** +.. rst-class:: classref-method + +void **set_joint_two_bone_name** **(** :ref:`String` bone_name **)** Sets the bone name, ``bone_name``, of the second bone. When possible, this will also update the ``bone_index`` of the second bone based on data provided by the :ref:`Skeleton3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_two_length: -- void **set_joint_two_length** **(** :ref:`float` bone_length **)** +.. rst-class:: classref-method + +void **set_joint_two_length** **(** :ref:`float` bone_length **)** Sets the length of the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_joint_two_roll: -- void **set_joint_two_roll** **(** :ref:`float` roll **)** +.. rst-class:: classref-method + +void **set_joint_two_roll** **(** :ref:`float` roll **)** Sets the amount of roll/twist applied to the second bone in the TwoBoneIK modification. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_pole_node: -- void **set_pole_node** **(** :ref:`NodePath` pole_nodepath **)** +.. rst-class:: classref-method + +void **set_pole_node** **(** :ref:`NodePath` pole_nodepath **)** Sets the node to be used as the for the pole of the TwoBoneIK. When a node is set and the modification is set to use the pole node, the TwoBoneIK modification will bend the nodes in the direction towards this node when the bones need to bend. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_tip_node: -- void **set_tip_node** **(** :ref:`NodePath` tip_nodepath **)** +.. rst-class:: classref-method + +void **set_tip_node** **(** :ref:`NodePath` tip_nodepath **)** Sets the node to be used as the tip for the second bone. This is used to calculate the length and position of the end of the second bone in the TwoBoneIK modification. \ **Note:** The tip node should generally be a child node of a :ref:`BoneAttachment3D` node attached to the second bone, with the child node being offset so it is at the end of the bone. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_use_pole_node: -- void **set_use_pole_node** **(** :ref:`bool` use_pole_node **)** +.. rst-class:: classref-method + +void **set_use_pole_node** **(** :ref:`bool` use_pole_node **)** When ``true``, the TwoBoneIK modification will bend the bones towards the pole node, if one has been set. This gives control over the direction the TwoBoneIK solver will bend, which is helpful for joints like elbows that only bend in certain directions. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModification3DTwoBoneIK_method_set_use_tip_node: -- void **set_use_tip_node** **(** :ref:`bool` use_tip_node **)** +.. rst-class:: classref-method + +void **set_use_tip_node** **(** :ref:`bool` use_tip_node **)** When ``true``, the TwoBoneIK modification will use the tip node to calculate the distance and position of the end/tip of the second bone. This is the most stable solution for knowing the tip position and length of the second bone. diff --git a/classes/class_skeletonmodificationstack2d.rst b/classes/class_skeletonmodificationstack2d.rst index b570f2fb8..ef537ce44 100644 --- a/classes/class_skeletonmodificationstack2d.rst +++ b/classes/class_skeletonmodificationstack2d.rst @@ -14,6 +14,8 @@ SkeletonModificationStack2D A resource that holds a stack of :ref:`SkeletonModification2D`\ s. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,161 +25,218 @@ This controls the order of the modifications and how they are applied. Modificat This resource also controls how strongly all of the modifications are applied to the :ref:`Skeleton2D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enabled` | ``false`` | -+---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`modification_count` | ``0`` | -+---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`strength` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enabled` | ``false`` | + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`modification_count` | ``0`` | + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`strength` | ``1.0`` | + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_modification` **(** :ref:`SkeletonModification2D` modification **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delete_modification` **(** :ref:`int` mod_idx **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`enable_all_modifications` **(** :ref:`bool` enabled **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`execute` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModification2D` | :ref:`get_modification` **(** :ref:`int` mod_idx **)** |const| | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Skeleton2D` | :ref:`get_skeleton` **(** **)** |const| | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_modification` **(** :ref:`int` mod_idx, :ref:`SkeletonModification2D` modification **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`setup` **(** **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_modification` **(** :ref:`SkeletonModification2D` modification **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`delete_modification` **(** :ref:`int` mod_idx **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`enable_all_modifications` **(** :ref:`bool` enabled **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`execute` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModification2D` | :ref:`get_modification` **(** :ref:`int` mod_idx **)** |const| | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton2D` | :ref:`get_skeleton` **(** **)** |const| | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_modification` **(** :ref:`int` mod_idx, :ref:`SkeletonModification2D` modification **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`setup` **(** **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModificationStack2D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | get_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enabled** **(** **)** If ``true``, the modification's in the stack will be called. This is handled automatically through the :ref:`Skeleton2D` node. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_property_modification_count: -- :ref:`int` **modification_count** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_modification_count(value) | -+-----------+-------------------------------+ -| *Getter* | get_modification_count() | -+-----------+-------------------------------+ +:ref:`int` **modification_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_modification_count** **(** :ref:`int` value **)** +- :ref:`int` **get_modification_count** **(** **)** The number of modifications in the stack. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_property_strength: -- :ref:`float` **strength** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_strength(value) | -+-----------+---------------------+ -| *Getter* | get_strength() | -+-----------+---------------------+ +:ref:`float` **strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_strength** **(** :ref:`float` value **)** +- :ref:`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` :ref:`Bone2D` poses. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModificationStack2D_method_add_modification: -- void **add_modification** **(** :ref:`SkeletonModification2D` modification **)** +.. rst-class:: classref-method + +void **add_modification** **(** :ref:`SkeletonModification2D` modification **)** Adds the passed-in :ref:`SkeletonModification2D` to the stack. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_delete_modification: -- void **delete_modification** **(** :ref:`int` mod_idx **)** +.. rst-class:: classref-method + +void **delete_modification** **(** :ref:`int` mod_idx **)** Deletes the :ref:`SkeletonModification2D` at the index position ``mod_idx``, if it exists. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_enable_all_modifications: -- void **enable_all_modifications** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **enable_all_modifications** **(** :ref:`bool` enabled **)** Enables all :ref:`SkeletonModification2D`\ s in the stack. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_execute: -- void **execute** **(** :ref:`float` delta, :ref:`int` execution_mode **)** +.. rst-class:: classref-method + +void **execute** **(** :ref:`float` delta, :ref:`int` execution_mode **)** Executes all of the :ref:`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`. \ **Note:** The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_get_is_setup: -- :ref:`bool` **get_is_setup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_is_setup** **(** **)** |const| Returns a boolean that indicates whether the modification stack is setup and can execute. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_get_modification: -- :ref:`SkeletonModification2D` **get_modification** **(** :ref:`int` mod_idx **)** |const| +.. rst-class:: classref-method + +:ref:`SkeletonModification2D` **get_modification** **(** :ref:`int` mod_idx **)** |const| Returns the :ref:`SkeletonModification2D` at the passed-in index, ``mod_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_get_skeleton: -- :ref:`Skeleton2D` **get_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Skeleton2D` **get_skeleton** **(** **)** |const| Returns the :ref:`Skeleton2D` node that the SkeletonModificationStack2D is bound to. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_set_modification: -- void **set_modification** **(** :ref:`int` mod_idx, :ref:`SkeletonModification2D` modification **)** +.. rst-class:: classref-method + +void **set_modification** **(** :ref:`int` mod_idx, :ref:`SkeletonModification2D` modification **)** Sets the modification at ``mod_idx`` to the passed-in modification, ``modification``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack2D_method_setup: -- void **setup** **(** **)** +.. rst-class:: classref-method + +void **setup** **(** **)** Sets up the modification stack so it can execute. This function should be called by :ref:`Skeleton2D` and shouldn't be manually called unless you know what you are doing. diff --git a/classes/class_skeletonmodificationstack3d.rst b/classes/class_skeletonmodificationstack3d.rst index 5194de2a0..f453a77b1 100644 --- a/classes/class_skeletonmodificationstack3d.rst +++ b/classes/class_skeletonmodificationstack3d.rst @@ -14,6 +14,8 @@ SkeletonModificationStack3D A resource that holds a stack of :ref:`SkeletonModification3D`\ s. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,161 +23,218 @@ This resource is used by the Skeleton and holds a stack of :ref:`SkeletonModific Additionally, the SkeletonModificationStack3D also controls how strongly the modifications are applied to the :ref:`Skeleton3D` node. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`enabled` | ``false`` | -+---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`modification_count` | ``0`` | -+---------------------------+------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`strength` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`enabled` | ``false`` | + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`modification_count` | ``0`` | + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`strength` | ``1.0`` | + +---------------------------+------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_modification` **(** :ref:`SkeletonModification3D` modification **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delete_modification` **(** :ref:`int` mod_idx **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`enable_all_modifications` **(** :ref:`bool` enabled **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`execute` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkeletonModification3D` | :ref:`get_modification` **(** :ref:`int` mod_idx **)** |const| | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Skeleton3D` | :ref:`get_skeleton` **(** **)** |const| | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_modification` **(** :ref:`int` mod_idx, :ref:`SkeletonModification3D` modification **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`setup` **(** **)** | -+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_modification` **(** :ref:`SkeletonModification3D` modification **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`delete_modification` **(** :ref:`int` mod_idx **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`enable_all_modifications` **(** :ref:`bool` enabled **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`execute` **(** :ref:`float` delta, :ref:`int` execution_mode **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_is_setup` **(** **)** |const| | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModification3D` | :ref:`get_modification` **(** :ref:`int` mod_idx **)** |const| | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton3D` | :ref:`get_skeleton` **(** **)** |const| | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_modification` **(** :ref:`int` mod_idx, :ref:`SkeletonModification3D` modification **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`setup` **(** **)** | + +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonModificationStack3D_property_enabled: -- :ref:`bool` **enabled** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_enabled(value) | -+-----------+--------------------+ -| *Getter* | get_enabled() | -+-----------+--------------------+ +:ref:`bool` **enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_enabled** **(** **)** When true, the modification's in the stack will be called. This is handled automatically through the :ref:`Skeleton3D` node. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_property_modification_count: -- :ref:`int` **modification_count** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_modification_count(value) | -+-----------+-------------------------------+ -| *Getter* | get_modification_count() | -+-----------+-------------------------------+ +:ref:`int` **modification_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_modification_count** **(** :ref:`int` value **)** +- :ref:`int` **get_modification_count** **(** **)** The number of modifications in the stack. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_property_strength: -- :ref:`float` **strength** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_strength(value) | -+-----------+---------------------+ -| *Getter* | get_strength() | -+-----------+---------------------+ +:ref:`float` **strength** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_strength** **(** :ref:`float` value **)** +- :ref:`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 skeleton bone poses. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonModificationStack3D_method_add_modification: -- void **add_modification** **(** :ref:`SkeletonModification3D` modification **)** +.. rst-class:: classref-method + +void **add_modification** **(** :ref:`SkeletonModification3D` modification **)** Adds the passed-in :ref:`SkeletonModification3D` to the stack. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_delete_modification: -- void **delete_modification** **(** :ref:`int` mod_idx **)** +.. rst-class:: classref-method + +void **delete_modification** **(** :ref:`int` mod_idx **)** Deletes the :ref:`SkeletonModification3D` at the index position ``mod_idx``, if it exists. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_enable_all_modifications: -- void **enable_all_modifications** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **enable_all_modifications** **(** :ref:`bool` enabled **)** Enables all :ref:`SkeletonModification3D`\ s in the stack. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_execute: -- void **execute** **(** :ref:`float` delta, :ref:`int` execution_mode **)** +.. rst-class:: classref-method + +void **execute** **(** :ref:`float` delta, :ref:`int` execution_mode **)** Executes all of the :ref:`SkeletonModification3D`\ s in the stack that use the same execution mode as the passed-in ``execution_mode``, starting from index ``0`` to :ref:`modification_count`. \ **Note:** The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_get_is_setup: -- :ref:`bool` **get_is_setup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_is_setup** **(** **)** |const| Returns a boolean that indicates whether the modification stack is setup and can execute. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_get_modification: -- :ref:`SkeletonModification3D` **get_modification** **(** :ref:`int` mod_idx **)** |const| +.. rst-class:: classref-method + +:ref:`SkeletonModification3D` **get_modification** **(** :ref:`int` mod_idx **)** |const| Returns the :ref:`SkeletonModification3D` at the passed-in index, ``mod_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_get_skeleton: -- :ref:`Skeleton3D` **get_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Skeleton3D` **get_skeleton** **(** **)** |const| Returns the :ref:`Skeleton3D` node that the SkeletonModificationStack3D is bound to. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_set_modification: -- void **set_modification** **(** :ref:`int` mod_idx, :ref:`SkeletonModification3D` modification **)** +.. rst-class:: classref-method + +void **set_modification** **(** :ref:`int` mod_idx, :ref:`SkeletonModification3D` modification **)** Sets the modification at ``mod_idx`` to the passed-in modification, ``modification``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonModificationStack3D_method_setup: -- void **setup** **(** **)** +.. rst-class:: classref-method + +void **setup** **(** **)** Sets up the modification stack so it can execute. This function should be called by :ref:`Skeleton3D` and shouldn't be called unless you know what you are doing. diff --git a/classes/class_skeletonprofile.rst b/classes/class_skeletonprofile.rst index fa5199b5a..2180b311c 100644 --- a/classes/class_skeletonprofile.rst +++ b/classes/class_skeletonprofile.rst @@ -16,335 +16,465 @@ SkeletonProfile Profile of a virtual skeleton used as a target for retargeting. +.. rst-class:: classref-introduction-group + Description ----------- -This resource is used in :ref:`EditorScenePostImport`. Some parameters are referring to bones in :ref:`Skeleton3D`, :ref:`Skin`, :ref:`Animation`, and some other nodes are rewritten based on the parameters of ``SkeletonProfile``. +This resource is used in :ref:`EditorScenePostImport`. Some parameters are referring to bones in :ref:`Skeleton3D`, :ref:`Skin`, :ref:`Animation`, and some other nodes are rewritten based on the parameters of **SkeletonProfile**. + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Retargeting 3D Skeletons <../tutorials/assets_pipeline/retargeting_3d_skeletons>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`bone_size` | ``0`` | -+-------------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`group_size` | ``0`` | -+-------------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`StringName` | :ref:`root_bone` | ``&""`` | -+-------------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`StringName` | :ref:`scale_base_bone` | ``&""`` | -+-------------------------------------+------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +-------------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`bone_size` | ``0`` | + +-------------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`group_size` | ``0`` | + +-------------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`StringName` | :ref:`root_bone` | ``&""`` | + +-------------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`StringName` | :ref:`scale_base_bone` | ``&""`` | + +-------------------------------------+------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_bone` **(** :ref:`StringName` bone_name **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_bone_parent` **(** :ref:`int` bone_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_bone_tail` **(** :ref:`int` bone_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_group` **(** :ref:`int` bone_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_group_name` **(** :ref:`int` group_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_handle_offset` **(** :ref:`int` bone_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_reference_pose` **(** :ref:`int` bone_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TailDirection` | :ref:`get_tail_direction` **(** :ref:`int` bone_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_texture` **(** :ref:`int` group_idx **)** |const| | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_name` **(** :ref:`int` bone_idx, :ref:`StringName` bone_name **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_parent` **(** :ref:`int` bone_idx, :ref:`StringName` bone_parent **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bone_tail` **(** :ref:`int` bone_idx, :ref:`StringName` bone_tail **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_group` **(** :ref:`int` bone_idx, :ref:`StringName` group **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_group_name` **(** :ref:`int` group_idx, :ref:`StringName` group_name **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_handle_offset` **(** :ref:`int` bone_idx, :ref:`Vector2` handle_offset **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_reference_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` bone_name **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tail_direction` **(** :ref:`int` bone_idx, :ref:`TailDirection` tail_direction **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture` **(** :ref:`int` group_idx, :ref:`Texture2D` texture **)** | -+----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_bone` **(** :ref:`StringName` bone_name **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_bone_parent` **(** :ref:`int` bone_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_bone_tail` **(** :ref:`int` bone_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_group` **(** :ref:`int` bone_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_group_name` **(** :ref:`int` group_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_handle_offset` **(** :ref:`int` bone_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_reference_pose` **(** :ref:`int` bone_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TailDirection` | :ref:`get_tail_direction` **(** :ref:`int` bone_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_texture` **(** :ref:`int` group_idx **)** |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_name` **(** :ref:`int` bone_idx, :ref:`StringName` bone_name **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_parent` **(** :ref:`int` bone_idx, :ref:`StringName` bone_parent **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bone_tail` **(** :ref:`int` bone_idx, :ref:`StringName` bone_tail **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_group` **(** :ref:`int` bone_idx, :ref:`StringName` group **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_group_name` **(** :ref:`int` group_idx, :ref:`StringName` group_name **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_handle_offset` **(** :ref:`int` bone_idx, :ref:`Vector2` handle_offset **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_reference_pose` **(** :ref:`int` bone_idx, :ref:`Transform3D` bone_name **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tail_direction` **(** :ref:`int` bone_idx, :ref:`TailDirection` tail_direction **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_texture` **(** :ref:`int` group_idx, :ref:`Texture2D` texture **)** | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_SkeletonProfile_signal_profile_updated: -- **profile_updated** **(** **)** +.. rst-class:: classref-signal + +**profile_updated** **(** **)** This signal is emitted when change the value in profile. This is used to update key name in the :ref:`BoneMap` and to redraw the :ref:`BoneMap` editor. \ **Note:** This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the :ref:`BoneMap`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_SkeletonProfile_TailDirection: -.. _class_SkeletonProfile_constant_TAIL_DIRECTION_AVERAGE_CHILDREN: - -.. _class_SkeletonProfile_constant_TAIL_DIRECTION_SPECIFIC_CHILD: - -.. _class_SkeletonProfile_constant_TAIL_DIRECTION_END: +.. rst-class:: classref-enumeration enum **TailDirection**: -- **TAIL_DIRECTION_AVERAGE_CHILDREN** = **0** --- Direction to the average coordinates of bone children. +.. _class_SkeletonProfile_constant_TAIL_DIRECTION_AVERAGE_CHILDREN: -- **TAIL_DIRECTION_SPECIFIC_CHILD** = **1** --- Direction to the coordinates of specified bone child. +.. rst-class:: classref-enumeration-constant -- **TAIL_DIRECTION_END** = **2** --- Direction is not calculated. +:ref:`TailDirection` **TAIL_DIRECTION_AVERAGE_CHILDREN** = ``0`` + +Direction to the average coordinates of bone children. + +.. _class_SkeletonProfile_constant_TAIL_DIRECTION_SPECIFIC_CHILD: + +.. rst-class:: classref-enumeration-constant + +:ref:`TailDirection` **TAIL_DIRECTION_SPECIFIC_CHILD** = ``1`` + +Direction to the coordinates of specified bone child. + +.. _class_SkeletonProfile_constant_TAIL_DIRECTION_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`TailDirection` **TAIL_DIRECTION_END** = ``2`` + +Direction is not calculated. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SkeletonProfile_property_bone_size: -- :ref:`int` **bone_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_bone_size(value) | -+-----------+----------------------+ -| *Getter* | get_bone_size() | -+-----------+----------------------+ +:ref:`int` **bone_size** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_bone_size** **(** :ref:`int` value **)** +- :ref:`int` **get_bone_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_property_group_size: -- :ref:`int` **group_size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_group_size(value) | -+-----------+-----------------------+ -| *Getter* | get_group_size() | -+-----------+-----------------------+ +:ref:`int` **group_size** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_group_size** **(** :ref:`int` value **)** +- :ref:`int` **get_group_size** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_property_root_bone: -- :ref:`StringName` **root_bone** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``&""`` | -+-----------+----------------------+ -| *Setter* | set_root_bone(value) | -+-----------+----------------------+ -| *Getter* | get_root_bone() | -+-----------+----------------------+ +:ref:`StringName` **root_bone** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_root_bone** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_root_bone** **(** **)** A name of bone that will be used as the root bone in :ref:`AnimationTree`. \ **Note:** In most cases, it is the bone of the parent of the hips that exists at the world origin in the humanoid model. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_property_scale_base_bone: -- :ref:`StringName` **scale_base_bone** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``&""`` | -+-----------+----------------------------+ -| *Setter* | set_scale_base_bone(value) | -+-----------+----------------------------+ -| *Getter* | get_scale_base_bone() | -+-----------+----------------------------+ +:ref:`StringName` **scale_base_bone** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_scale_base_bone** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_scale_base_bone** **(** **)** A name of bone which height will be used as the coefficient for normalization. \ **Note:** In most cases, it is hips in the humanoid model. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SkeletonProfile_method_find_bone: -- :ref:`int` **find_bone** **(** :ref:`StringName` bone_name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find_bone** **(** :ref:`StringName` bone_name **)** |const| Returns the bone index that matches ``bone_name`` as its name. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_bone_name: -- :ref:`StringName` **get_bone_name** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_bone_name** **(** :ref:`int` bone_idx **)** |const| Returns the name of the bone at ``bone_idx`` that will be the key name in the :ref:`BoneMap`. In the retargeting process, the returned bone name is the bone name of the target skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_bone_parent: -- :ref:`StringName` **get_bone_parent** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_bone_parent** **(** :ref:`int` bone_idx **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_bone_tail: -- :ref:`StringName` **get_bone_tail** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_bone_tail** **(** :ref:`int` bone_idx **)** |const| Returns the name of the bone which is the tail of the bone at ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_group: -- :ref:`StringName` **get_group** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_group** **(** :ref:`int` bone_idx **)** |const| Returns the group of the bone at ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_group_name: -- :ref:`StringName` **get_group_name** **(** :ref:`int` group_idx **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_group_name** **(** :ref:`int` group_idx **)** |const| Returns the name of the group at ``group_idx`` that will be the drawing group in the :ref:`BoneMap` editor. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_handle_offset: -- :ref:`Vector2` **get_handle_offset** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_handle_offset** **(** :ref:`int` bone_idx **)** |const| Returns the offset of the bone at ``bone_idx`` that will be the button position in the :ref:`BoneMap` editor. This is the offset with origin at the top left corner of the square. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_reference_pose: -- :ref:`Transform3D` **get_reference_pose** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_reference_pose** **(** :ref:`int` bone_idx **)** |const| Returns the reference pose transform for bone ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_tail_direction: -- :ref:`TailDirection` **get_tail_direction** **(** :ref:`int` bone_idx **)** |const| +.. rst-class:: classref-method + +:ref:`TailDirection` **get_tail_direction** **(** :ref:`int` bone_idx **)** |const| Returns the tail direction of the bone at ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_get_texture: -- :ref:`Texture2D` **get_texture** **(** :ref:`int` group_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_texture** **(** :ref:`int` group_idx **)** |const| Returns the texture of the group at ``group_idx`` that will be the drawing group background image in the :ref:`BoneMap` editor. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_bone_name: -- void **set_bone_name** **(** :ref:`int` bone_idx, :ref:`StringName` bone_name **)** +.. rst-class:: classref-method + +void **set_bone_name** **(** :ref:`int` bone_idx, :ref:`StringName` bone_name **)** Sets the name of the bone at ``bone_idx`` that will be the key name in the :ref:`BoneMap`. In the retargeting process, the setting bone name is the bone name of the target skeleton. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_bone_parent: -- void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`StringName` bone_parent **)** +.. rst-class:: classref-method + +void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`StringName` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_bone_tail: -- void **set_bone_tail** **(** :ref:`int` bone_idx, :ref:`StringName` bone_tail **)** +.. rst-class:: classref-method + +void **set_bone_tail** **(** :ref:`int` bone_idx, :ref:`StringName` bone_tail **)** Sets the bone with name ``bone_tail`` as the tail of the bone at ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_group: -- void **set_group** **(** :ref:`int` bone_idx, :ref:`StringName` group **)** +.. rst-class:: classref-method + +void **set_group** **(** :ref:`int` bone_idx, :ref:`StringName` group **)** Sets the group of the bone at ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_group_name: -- void **set_group_name** **(** :ref:`int` group_idx, :ref:`StringName` group_name **)** +.. rst-class:: classref-method + +void **set_group_name** **(** :ref:`int` group_idx, :ref:`StringName` group_name **)** Sets the name of the group at ``group_idx`` that will be the drawing group in the :ref:`BoneMap` editor. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_handle_offset: -- void **set_handle_offset** **(** :ref:`int` bone_idx, :ref:`Vector2` handle_offset **)** +.. rst-class:: classref-method + +void **set_handle_offset** **(** :ref:`int` bone_idx, :ref:`Vector2` handle_offset **)** Sets the offset of the bone at ``bone_idx`` that will be the button position in the :ref:`BoneMap` editor. This is the offset with origin at the top left corner of the square. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_reference_pose: -- void **set_reference_pose** **(** :ref:`int` bone_idx, :ref:`Transform3D` bone_name **)** +.. rst-class:: classref-method + +void **set_reference_pose** **(** :ref:`int` bone_idx, :ref:`Transform3D` bone_name **)** Sets the reference pose transform for bone ``bone_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_tail_direction: -- void **set_tail_direction** **(** :ref:`int` bone_idx, :ref:`TailDirection` tail_direction **)** +.. rst-class:: classref-method + +void **set_tail_direction** **(** :ref:`int` bone_idx, :ref:`TailDirection` tail_direction **)** Sets the tail direction of the bone at ``bone_idx``. \ **Note:** This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally. +.. rst-class:: classref-item-separator + ---- .. _class_SkeletonProfile_method_set_texture: -- void **set_texture** **(** :ref:`int` group_idx, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_texture** **(** :ref:`int` group_idx, :ref:`Texture2D` texture **)** Sets the texture of the group at ``group_idx`` that will be the drawing group background image in the :ref:`BoneMap` editor. diff --git a/classes/class_skeletonprofilehumanoid.rst b/classes/class_skeletonprofilehumanoid.rst index 96f9dd9c1..2a49edcfd 100644 --- a/classes/class_skeletonprofilehumanoid.rst +++ b/classes/class_skeletonprofilehumanoid.rst @@ -12,28 +12,37 @@ SkeletonProfileHumanoid **Inherits:** :ref:`SkeletonProfile` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +.. rst-class:: classref-introduction-group + Description ----------- A :ref:`SkeletonProfile` as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Retargeting 3D Skeletons <../tutorials/assets_pipeline/retargeting_3d_skeletons>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ -| :ref:`int` | bone_size | ``56`` (overrides :ref:`SkeletonProfile`) | -+-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ -| :ref:`int` | group_size | ``4`` (overrides :ref:`SkeletonProfile`) | -+-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | root_bone | ``&"Root"`` (overrides :ref:`SkeletonProfile`) | -+-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | scale_base_bone | ``&"Hips"`` (overrides :ref:`SkeletonProfile`) | -+-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | bone_size | ``56`` (overrides :ref:`SkeletonProfile`) | + +-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | group_size | ``4`` (overrides :ref:`SkeletonProfile`) | + +-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | root_bone | ``&"Root"`` (overrides :ref:`SkeletonProfile`) | + +-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | scale_base_bone | ``&"Hips"`` (overrides :ref:`SkeletonProfile`) | + +-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ .. |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.)` diff --git a/classes/class_skin.rst b/classes/class_skin.rst index d1fc195a2..6cbb035f0 100644 --- a/classes/class_skin.rst +++ b/classes/class_skin.rst @@ -16,139 +16,192 @@ Skin There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_bind` **(** :ref:`int` bone, :ref:`Transform3D` pose **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_named_bind` **(** :ref:`String` name, :ref:`Transform3D` pose **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_binds` **(** **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bind_bone` **(** :ref:`int` bind_index **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_bind_count` **(** **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_bind_name` **(** :ref:`int` bind_index **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_bind_pose` **(** :ref:`int` bind_index **)** |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bind_bone` **(** :ref:`int` bind_index, :ref:`int` bone **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bind_count` **(** :ref:`int` bind_count **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bind_name` **(** :ref:`int` bind_index, :ref:`StringName` name **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bind_pose` **(** :ref:`int` bind_index, :ref:`Transform3D` pose **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_bind` **(** :ref:`int` bone, :ref:`Transform3D` pose **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_named_bind` **(** :ref:`String` name, :ref:`Transform3D` pose **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_binds` **(** **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bind_bone` **(** :ref:`int` bind_index **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bind_count` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_bind_name` **(** :ref:`int` bind_index **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bind_pose` **(** :ref:`int` bind_index **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bind_bone` **(** :ref:`int` bind_index, :ref:`int` bone **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bind_count` **(** :ref:`int` bind_count **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bind_name` **(** :ref:`int` bind_index, :ref:`StringName` name **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bind_pose` **(** :ref:`int` bind_index, :ref:`Transform3D` pose **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Skin_method_add_bind: -- void **add_bind** **(** :ref:`int` bone, :ref:`Transform3D` pose **)** +.. rst-class:: classref-method + +void **add_bind** **(** :ref:`int` bone, :ref:`Transform3D` pose **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_add_named_bind: -- void **add_named_bind** **(** :ref:`String` name, :ref:`Transform3D` pose **)** +.. rst-class:: classref-method + +void **add_named_bind** **(** :ref:`String` name, :ref:`Transform3D` pose **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_clear_binds: -- void **clear_binds** **(** **)** +.. rst-class:: classref-method + +void **clear_binds** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_get_bind_bone: -- :ref:`int` **get_bind_bone** **(** :ref:`int` bind_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bind_bone** **(** :ref:`int` bind_index **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_get_bind_count: -- :ref:`int` **get_bind_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_bind_count** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_get_bind_name: -- :ref:`StringName` **get_bind_name** **(** :ref:`int` bind_index **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_bind_name** **(** :ref:`int` bind_index **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_get_bind_pose: -- :ref:`Transform3D` **get_bind_pose** **(** :ref:`int` bind_index **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_bind_pose** **(** :ref:`int` bind_index **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_set_bind_bone: -- void **set_bind_bone** **(** :ref:`int` bind_index, :ref:`int` bone **)** +.. rst-class:: classref-method + +void **set_bind_bone** **(** :ref:`int` bind_index, :ref:`int` bone **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_set_bind_count: -- void **set_bind_count** **(** :ref:`int` bind_count **)** +.. rst-class:: classref-method + +void **set_bind_count** **(** :ref:`int` bind_count **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_set_bind_name: -- void **set_bind_name** **(** :ref:`int` bind_index, :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **set_bind_name** **(** :ref:`int` bind_index, :ref:`StringName` name **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Skin_method_set_bind_pose: -- void **set_bind_pose** **(** :ref:`int` bind_index, :ref:`Transform3D` pose **)** +.. rst-class:: classref-method + +void **set_bind_pose** **(** :ref:`int` bind_index, :ref:`Transform3D` pose **)** .. container:: contribute diff --git a/classes/class_skinreference.rst b/classes/class_skinreference.rst index a1629e512..85eaf5b25 100644 --- a/classes/class_skinreference.rst +++ b/classes/class_skinreference.rst @@ -16,31 +16,48 @@ SkinReference There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+----------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_skeleton` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------------------------+ -| :ref:`Skin` | :ref:`get_skin` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_skeleton` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------------------------+ + | :ref:`Skin` | :ref:`get_skin` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SkinReference_method_get_skeleton: -- :ref:`RID` **get_skeleton** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_skeleton** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SkinReference_method_get_skin: -- :ref:`Skin` **get_skin** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Skin` **get_skin** **(** **)** |const| .. container:: contribute diff --git a/classes/class_sky.rst b/classes/class_sky.rst index 5557a28af..53a60f60f 100644 --- a/classes/class_sky.rst +++ b/classes/class_sky.rst @@ -14,133 +14,209 @@ Sky Background that uses a :ref:`Material` to draw a sky. +.. rst-class:: classref-introduction-group + Description ----------- -The ``Sky`` class uses a :ref:`Material` to draw the background and update the reflection/radiance cubemaps. +The **Sky** class uses a :ref:`Material` to draw the background and update the reflection/radiance cubemaps. + +.. rst-class:: classref-reftable-group Properties ---------- -+--------------------------------------------+--------------------------------------------------------+-------+ -| :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | -+--------------------------------------------+--------------------------------------------------------+-------+ -| :ref:`RadianceSize` | :ref:`radiance_size` | ``3`` | -+--------------------------------------------+--------------------------------------------------------+-------+ -| :ref:`Material` | :ref:`sky_material` | | -+--------------------------------------------+--------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------+--------------------------------------------------------+-------+ + | :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | + +--------------------------------------------+--------------------------------------------------------+-------+ + | :ref:`RadianceSize` | :ref:`radiance_size` | ``3`` | + +--------------------------------------------+--------------------------------------------------------+-------+ + | :ref:`Material` | :ref:`sky_material` | | + +--------------------------------------------+--------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Sky_RadianceSize: -.. _class_Sky_constant_RADIANCE_SIZE_32: - -.. _class_Sky_constant_RADIANCE_SIZE_64: - -.. _class_Sky_constant_RADIANCE_SIZE_128: - -.. _class_Sky_constant_RADIANCE_SIZE_256: - -.. _class_Sky_constant_RADIANCE_SIZE_512: - -.. _class_Sky_constant_RADIANCE_SIZE_1024: - -.. _class_Sky_constant_RADIANCE_SIZE_2048: - -.. _class_Sky_constant_RADIANCE_SIZE_MAX: +.. rst-class:: classref-enumeration enum **RadianceSize**: -- **RADIANCE_SIZE_32** = **0** --- Radiance texture size is 32×32 pixels. +.. _class_Sky_constant_RADIANCE_SIZE_32: -- **RADIANCE_SIZE_64** = **1** --- Radiance texture size is 64×64 pixels. +.. rst-class:: classref-enumeration-constant -- **RADIANCE_SIZE_128** = **2** --- Radiance texture size is 128×128 pixels. +:ref:`RadianceSize` **RADIANCE_SIZE_32** = ``0`` -- **RADIANCE_SIZE_256** = **3** --- Radiance texture size is 256×256 pixels. +Radiance texture size is 32×32 pixels. -- **RADIANCE_SIZE_512** = **4** --- Radiance texture size is 512×512 pixels. +.. _class_Sky_constant_RADIANCE_SIZE_64: -- **RADIANCE_SIZE_1024** = **5** --- Radiance texture size is 1024×1024 pixels. +.. rst-class:: classref-enumeration-constant -- **RADIANCE_SIZE_2048** = **6** --- Radiance texture size is 2048×2048 pixels. +:ref:`RadianceSize` **RADIANCE_SIZE_64** = ``1`` -- **RADIANCE_SIZE_MAX** = **7** --- Represents the size of the :ref:`RadianceSize` enum. +Radiance texture size is 64×64 pixels. + +.. _class_Sky_constant_RADIANCE_SIZE_128: + +.. rst-class:: classref-enumeration-constant + +:ref:`RadianceSize` **RADIANCE_SIZE_128** = ``2`` + +Radiance texture size is 128×128 pixels. + +.. _class_Sky_constant_RADIANCE_SIZE_256: + +.. rst-class:: classref-enumeration-constant + +:ref:`RadianceSize` **RADIANCE_SIZE_256** = ``3`` + +Radiance texture size is 256×256 pixels. + +.. _class_Sky_constant_RADIANCE_SIZE_512: + +.. rst-class:: classref-enumeration-constant + +:ref:`RadianceSize` **RADIANCE_SIZE_512** = ``4`` + +Radiance texture size is 512×512 pixels. + +.. _class_Sky_constant_RADIANCE_SIZE_1024: + +.. rst-class:: classref-enumeration-constant + +:ref:`RadianceSize` **RADIANCE_SIZE_1024** = ``5`` + +Radiance texture size is 1024×1024 pixels. + +.. _class_Sky_constant_RADIANCE_SIZE_2048: + +.. rst-class:: classref-enumeration-constant + +:ref:`RadianceSize` **RADIANCE_SIZE_2048** = ``6`` + +Radiance texture size is 2048×2048 pixels. + +.. _class_Sky_constant_RADIANCE_SIZE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`RadianceSize` **RADIANCE_SIZE_MAX** = ``7`` + +Represents the size of the :ref:`RadianceSize` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Sky_ProcessMode: -.. _class_Sky_constant_PROCESS_MODE_AUTOMATIC: - -.. _class_Sky_constant_PROCESS_MODE_QUALITY: - -.. _class_Sky_constant_PROCESS_MODE_INCREMENTAL: - -.. _class_Sky_constant_PROCESS_MODE_REALTIME: +.. rst-class:: classref-enumeration enum **ProcessMode**: -- **PROCESS_MODE_AUTOMATIC** = **0** --- Automatically selects the appropriate process mode based on your sky shader. If your shader uses ``TIME`` or ``POSITION``, this will use :ref:`PROCESS_MODE_REALTIME`. If your shader uses any of the ``LIGHT_*`` variables or any custom uniforms, this uses :ref:`PROCESS_MODE_INCREMENTAL`. Otherwise, this defaults to :ref:`PROCESS_MODE_QUALITY`. +.. _class_Sky_constant_PROCESS_MODE_AUTOMATIC: -- **PROCESS_MODE_QUALITY** = **1** --- Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than :ref:`PROCESS_MODE_REALTIME` but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing :ref:`ProjectSettings.rendering/reflections/sky_reflections/ggx_samples`. +.. rst-class:: classref-enumeration-constant -- **PROCESS_MODE_INCREMENTAL** = **2** --- Uses the same high quality importance sampling to process the radiance map as :ref:`PROCESS_MODE_QUALITY`, but updates over several frames. The number of frames is determined by :ref:`ProjectSettings.rendering/reflections/sky_reflections/roughness_layers`. Use this when you need highest quality radiance maps, but have a sky that updates slowly. +:ref:`ProcessMode` **PROCESS_MODE_AUTOMATIC** = ``0`` -- **PROCESS_MODE_REALTIME** = **3** --- Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on :ref:`ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality`. +Automatically selects the appropriate process mode based on your sky shader. If your shader uses ``TIME`` or ``POSITION``, this will use :ref:`PROCESS_MODE_REALTIME`. If your shader uses any of the ``LIGHT_*`` variables or any custom uniforms, this uses :ref:`PROCESS_MODE_INCREMENTAL`. Otherwise, this defaults to :ref:`PROCESS_MODE_QUALITY`. + +.. _class_Sky_constant_PROCESS_MODE_QUALITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessMode` **PROCESS_MODE_QUALITY** = ``1`` + +Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than :ref:`PROCESS_MODE_REALTIME` but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing :ref:`ProjectSettings.rendering/reflections/sky_reflections/ggx_samples`. + +.. _class_Sky_constant_PROCESS_MODE_INCREMENTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessMode` **PROCESS_MODE_INCREMENTAL** = ``2`` + +Uses the same high quality importance sampling to process the radiance map as :ref:`PROCESS_MODE_QUALITY`, but updates over several frames. The number of frames is determined by :ref:`ProjectSettings.rendering/reflections/sky_reflections/roughness_layers`. Use this when you need highest quality radiance maps, but have a sky that updates slowly. + +.. _class_Sky_constant_PROCESS_MODE_REALTIME: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessMode` **PROCESS_MODE_REALTIME** = ``3`` + +Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on :ref:`ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality`. \ **Note:** The fast filtering algorithm is limited to 256x256 cubemaps, so :ref:`radiance_size` must be set to :ref:`RADIANCE_SIZE_256`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Sky_property_process_mode: -- :ref:`ProcessMode` **process_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_process_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_process_mode() | -+-----------+-------------------------+ +:ref:`ProcessMode` **process_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_process_mode** **(** :ref:`ProcessMode` value **)** +- :ref:`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` for options. +.. rst-class:: classref-item-separator + ---- .. _class_Sky_property_radiance_size: -- :ref:`RadianceSize` **radiance_size** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``3`` | -+-----------+--------------------------+ -| *Setter* | set_radiance_size(value) | -+-----------+--------------------------+ -| *Getter* | get_radiance_size() | -+-----------+--------------------------+ +:ref:`RadianceSize` **radiance_size** = ``3`` -The ``Sky``'s radiance map size. The higher the radiance map size, the more detailed the lighting from the ``Sky`` will be. +.. rst-class:: classref-property-setget + +- void **set_radiance_size** **(** :ref:`RadianceSize` value **)** +- :ref:`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. See :ref:`RadianceSize` constants for values. \ **Note:** Some hardware will have trouble with higher radiance sizes, especially :ref:`RADIANCE_SIZE_512` and above. Only use such high values on high-end hardware. +.. rst-class:: classref-item-separator + ---- .. _class_Sky_property_sky_material: -- :ref:`Material` **sky_material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **sky_material** + +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** :ref:`Material` used to draw the background. Can be :ref:`PanoramaSkyMaterial`, :ref:`ProceduralSkyMaterial`, :ref:`PhysicalSkyMaterial`, or even a :ref:`ShaderMaterial` if you want to use your own custom shader. diff --git a/classes/class_slider.rst b/classes/class_slider.rst index 5fd9fa3c4..1c6e3aa5d 100644 --- a/classes/class_slider.rst +++ b/classes/class_slider.rst @@ -16,6 +16,8 @@ Slider Base class for GUI sliders. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,102 +25,127 @@ Base class for GUI sliders. \ **Note:** The :ref:`Range.changed` and :ref:`Range.value_changed` signals are part of the :ref:`Range` class which this class inherits from. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editable` | ``true`` | -+------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scrollable` | ``true`` | -+------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | -+------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`int` | :ref:`tick_count` | ``0`` | -+------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`ticks_on_borders` | ``false`` | -+------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editable` | ``true`` | + +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scrollable` | ``true`` | + +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | + +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int` | :ref:`tick_count` | ``0`` | + +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ticks_on_borders` | ``false`` | + +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Slider_signal_drag_ended: -- **drag_ended** **(** :ref:`bool` value_changed **)** +.. rst-class:: classref-signal + +**drag_ended** **(** :ref:`bool` value_changed **)** Emitted when dragging stops. If ``value_changed`` is true, :ref:`Range.value` is different from the value when you started the dragging. +.. rst-class:: classref-item-separator + ---- .. _class_Slider_signal_drag_started: -- **drag_started** **(** **)** +.. rst-class:: classref-signal + +**drag_started** **(** **)** Emitted when dragging is started. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Slider_property_editable: -- :ref:`bool` **editable** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_editable(value) | -+-----------+---------------------+ -| *Getter* | is_editable() | -+-----------+---------------------+ +:ref:`bool` **editable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_editable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editable** **(** **)** If ``true``, the slider can be interacted with. If ``false``, the value can be changed only by code. +.. rst-class:: classref-item-separator + ---- .. _class_Slider_property_scrollable: -- :ref:`bool` **scrollable** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``true`` | -+-----------+-----------------------+ -| *Setter* | set_scrollable(value) | -+-----------+-----------------------+ -| *Getter* | is_scrollable() | -+-----------+-----------------------+ +:ref:`bool` **scrollable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_scrollable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_scrollable** **(** **)** If ``true``, the value can be changed using the mouse wheel. +.. rst-class:: classref-item-separator + ---- .. _class_Slider_property_tick_count: -- :ref:`int` **tick_count** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_ticks(value) | -+-----------+------------------+ -| *Getter* | get_ticks() | -+-----------+------------------+ +:ref:`int` **tick_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_ticks** **(** :ref:`int` value **)** +- :ref:`int` **get_ticks** **(** **)** Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers. +.. rst-class:: classref-item-separator + ---- .. _class_Slider_property_ticks_on_borders: -- :ref:`bool` **ticks_on_borders** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_ticks_on_borders(value) | -+-----------+-----------------------------+ -| *Getter* | get_ticks_on_borders() | -+-----------+-----------------------------+ +:ref:`bool` **ticks_on_borders** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_ticks_on_borders** **(** :ref:`bool` value **)** +- :ref:`bool` **get_ticks_on_borders** **(** **)** If ``true``, the slider will display ticks for minimum and maximum values. diff --git a/classes/class_sliderjoint3d.rst b/classes/class_sliderjoint3d.rst index 8884ab091..17273b4b4 100644 --- a/classes/class_sliderjoint3d.rst +++ b/classes/class_sliderjoint3d.rst @@ -14,543 +14,693 @@ SliderJoint3D Slider between two PhysicsBodies in 3D. +.. rst-class:: classref-introduction-group + Description ----------- Slides across the X axis of the pivot object. See also :ref:`Generic6DOFJoint3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_limit/damping` | ``0.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_limit/lower_angle` | ``0.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_limit/restitution` | ``0.7`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_limit/softness` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_limit/upper_angle` | ``0.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_motion/damping` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_motion/restitution` | ``0.7`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_motion/softness` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_ortho/damping` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_ortho/restitution` | ``0.7`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`angular_ortho/softness` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_limit/damping` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_limit/lower_distance` | ``-1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_limit/restitution` | ``0.7`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_limit/softness` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_limit/upper_distance` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_motion/damping` | ``0.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_motion/restitution` | ``0.7`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_motion/softness` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_ortho/damping` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_ortho/restitution` | ``0.7`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`linear_ortho/softness` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_limit/damping` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_limit/lower_angle` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_limit/restitution` | ``0.7`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_limit/softness` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_limit/upper_angle` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_motion/damping` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_motion/restitution` | ``0.7`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_motion/softness` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_ortho/damping` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_ortho/restitution` | ``0.7`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`angular_ortho/softness` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_limit/damping` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_limit/lower_distance` | ``-1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_limit/restitution` | ``0.7`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_limit/softness` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_limit/upper_distance` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_motion/damping` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_motion/restitution` | ``0.7`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_motion/softness` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_ortho/damping` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_ortho/restitution` | ``0.7`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`linear_ortho/softness` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_SliderJoint3D_Param: -.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_UPPER: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_LOWER: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_SOFTNESS: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_RESTITUTION: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_DAMPING: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_SOFTNESS: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_RESTITUTION: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_DAMPING: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_SOFTNESS: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_RESTITUTION: - -.. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_DAMPING: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_UPPER: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_LOWER: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_SOFTNESS: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_RESTITUTION: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_DAMPING: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_SOFTNESS: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_RESTITUTION: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_DAMPING: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_SOFTNESS: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_RESTITUTION: - -.. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_DAMPING: - -.. _class_SliderJoint3D_constant_PARAM_MAX: +.. rst-class:: classref-enumeration enum **Param**: -- **PARAM_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their X axis before damping happens. +.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_UPPER: -- **PARAM_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their X axis before damping happens. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`Param` **PARAM_LINEAR_LIMIT_UPPER** = ``0`` -- **PARAM_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. +The maximum difference between the pivot points on their X axis before damping happens. -- **PARAM_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed. +.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_LOWER: -- **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. +.. rst-class:: classref-enumeration-constant -- **PARAM_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits. +:ref:`Param` **PARAM_LINEAR_LIMIT_LOWER** = ``1`` -- **PARAM_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits. +The minimum difference between the pivot points on their X axis before damping happens. -- **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement across axes orthogonal to the slider. +.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_SOFTNESS: -- **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is across axes orthogonal to the slider. +.. rst-class:: classref-enumeration-constant -- **PARAM_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is across axes orthogonal to the slider. +:ref:`Param` **PARAM_LINEAR_LIMIT_SOFTNESS** = ``2`` -- **PARAM_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider. +A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. -- **PARAM_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider. +.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_RESTITUTION: -- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed. +.. rst-class:: classref-enumeration-constant -- **PARAM_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed. +:ref:`Param` **PARAM_LINEAR_LIMIT_RESTITUTION** = ``3`` -- **PARAM_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed. +The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. -- **PARAM_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor applied to the all rotation in the limits. +.. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_DAMPING: -- **PARAM_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits. +.. rst-class:: classref-enumeration-constant -- **PARAM_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits. +:ref:`Param` **PARAM_LINEAR_LIMIT_DAMPING** = ``4`` -- **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor applied to the all rotation across axes orthogonal to the slider. +The amount of damping once the slider limits are surpassed. -- **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider. +.. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_SOFTNESS: -- **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. +.. rst-class:: classref-enumeration-constant -- **PARAM_MAX** = **22** --- Represents the size of the :ref:`Param` enum. +:ref:`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. + +.. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_MOTION_RESTITUTION** = ``6`` + +The amount of restitution inside the slider limits. + +.. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_MOTION_DAMPING** = ``7`` + +The amount of damping inside the slider limits. + +.. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = ``8`` + +A factor applied to the movement across axes orthogonal to the slider. + +.. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = ``9`` + +The amount of restitution when movement is across axes orthogonal to the slider. + +.. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_LINEAR_ORTHOGONAL_DAMPING** = ``10`` + +The amount of damping when movement is across axes orthogonal to the slider. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_LIMIT_UPPER** = ``11`` + +The upper limit of rotation in the slider. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_LIMIT_LOWER** = ``12`` + +The lower limit of rotation in the slider. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_LIMIT_SOFTNESS** = ``13`` + +A factor applied to the all rotation once the limit is surpassed. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_LIMIT_RESTITUTION** = ``14`` + +The amount of restitution of the rotation when the limit is surpassed. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_LIMIT_DAMPING** = ``15`` + +The amount of damping of the rotation when the limit is surpassed. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_MOTION_SOFTNESS** = ``16`` + +A factor applied to the all rotation in the limits. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_MOTION_RESTITUTION** = ``17`` + +The amount of restitution of the rotation in the limits. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_MOTION_DAMPING** = ``18`` + +The amount of damping of the rotation in the limits. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_SOFTNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = ``19`` + +A factor applied to the all rotation across axes orthogonal to the slider. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_RESTITUTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = ``20`` + +The amount of restitution of the rotation across axes orthogonal to the slider. + +.. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = ``21`` + +The amount of damping of the rotation across axes orthogonal to the slider. + +.. _class_SliderJoint3D_constant_PARAM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Param` **PARAM_MAX** = ``22`` + +Represents the size of the :ref:`Param` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SliderJoint3D_property_angular_limit/damping: -- :ref:`float` **angular_limit/damping** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/damping** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of damping of the rotation when the limit is surpassed. A lower damping value allows a rotation initiated by body A to travel to body B slower. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_limit/lower_angle: -- :ref:`float` **angular_limit/lower_angle** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/lower_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The lower limit of rotation in the slider. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_limit/restitution: -- :ref:`float` **angular_limit/restitution** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.7`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/restitution** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of restitution of the rotation when the limit is surpassed. Does not affect damping. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_limit/softness: -- :ref:`float` **angular_limit/softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/softness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| A factor applied to the all rotation once the limit is surpassed. Makes all rotation slower when between 0 and 1. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_limit/upper_angle: -- :ref:`float` **angular_limit/upper_angle** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_limit/upper_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The upper limit of rotation in the slider. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_motion/damping: -- :ref:`float` **angular_motion/damping** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_motion/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of damping of the rotation in the limits. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_motion/restitution: -- :ref:`float` **angular_motion/restitution** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.7`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_motion/restitution** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of restitution of the rotation in the limits. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_motion/softness: -- :ref:`float` **angular_motion/softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_motion/softness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| A factor applied to the all rotation in the limits. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_ortho/damping: -- :ref:`float` **angular_ortho/damping** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_ortho/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of damping of the rotation across axes orthogonal to the slider. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_ortho/restitution: -- :ref:`float` **angular_ortho/restitution** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.7`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_ortho/restitution** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of restitution of the rotation across axes orthogonal to the slider. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_angular_ortho/softness: -- :ref:`float` **angular_ortho/softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **angular_ortho/softness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| A factor applied to the all rotation across axes orthogonal to the slider. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_limit/damping: -- :ref:`float` **linear_limit/damping** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_limit/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of damping that happens once the limit defined by :ref:`linear_limit/lower_distance` and :ref:`linear_limit/upper_distance` is surpassed. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_limit/lower_distance: -- :ref:`float` **linear_limit/lower_distance** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``-1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_limit/lower_distance** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The minimum difference between the pivot points on their X axis before damping happens. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_limit/restitution: -- :ref:`float` **linear_limit/restitution** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.7`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_limit/restitution** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_limit/softness: -- :ref:`float` **linear_limit/softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_limit/softness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_limit/upper_distance: -- :ref:`float` **linear_limit/upper_distance** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_limit/upper_distance** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The maximum difference between the pivot points on their X axis before damping happens. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_motion/damping: -- :ref:`float` **linear_motion/damping** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_motion/damping** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of damping inside the slider limits. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_motion/restitution: -- :ref:`float` **linear_motion/restitution** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.7`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_motion/restitution** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of restitution inside the slider limits. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_motion/softness: -- :ref:`float` **linear_motion/softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_motion/softness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_ortho/damping: -- :ref:`float` **linear_ortho/damping** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_ortho/damping** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of damping when movement is across axes orthogonal to the slider. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_ortho/restitution: -- :ref:`float` **linear_ortho/restitution** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.7`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_ortho/restitution** = ``0.7`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| The amount of restitution when movement is across axes orthogonal to the slider. +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_property_linear_ortho/softness: -- :ref:`float` **linear_ortho/softness** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **linear_ortho/softness** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| A factor applied to the movement across axes orthogonal to the slider. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SliderJoint3D_method_get_param: -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_param** **(** :ref:`Param` param **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SliderJoint3D_method_set_param: -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** .. container:: contribute diff --git a/classes/class_softbody3d.rst b/classes/class_softbody3d.rst index 91df615af..dd2a95e17 100644 --- a/classes/class_softbody3d.rst +++ b/classes/class_softbody3d.rst @@ -14,366 +14,459 @@ SoftBody3D A soft mesh physics body. +.. rst-class:: classref-introduction-group + Description ----------- A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. -\ **Note:** There are many known bugs in ``SoftBody3D``. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies). +\ **Note:** There are many known bugs in **SoftBody3D**. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies). + +.. rst-class:: classref-introduction-group Tutorials --------- - :doc:`SoftBody <../tutorials/physics/soft_body>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`collision_layer` | ``1`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`damping_coefficient` | ``0.01`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`drag_coefficient` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`linear_stiffness` | ``0.5`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`parent_collision_ignore` | ``NodePath("")`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`pressure_coefficient` | ``0.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`ray_pickable` | ``true`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`simulation_precision` | ``5`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`total_mass` | ``1.0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`collision_layer` | ``1`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`damping_coefficient` | ``0.01`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`DisableMode` | :ref:`disable_mode` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`drag_coefficient` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`linear_stiffness` | ``0.5`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`parent_collision_ignore` | ``NodePath("")`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`pressure_coefficient` | ``0.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`bool` | :ref:`ray_pickable` | ``true`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`simulation_precision` | ``5`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`total_mass` | ``1.0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsBody3D[]` | :ref:`get_collision_exceptions` **(** **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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_physics_rid` **(** **)** |const| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_transform` **(** :ref:`int` point_index **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_pinned` **(** :ref:`int` point_index **)** |const| | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_pinned` **(** :ref:`int` point_index, :ref:`bool` pinned, :ref:`NodePath` attachment_path=NodePath("") **)** | -+---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_exception_with` **(** :ref:`Node` body **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsBody3D[]` | :ref:`get_collision_exceptions` **(** **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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_physics_rid` **(** **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_point_transform` **(** :ref:`int` point_index **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_pinned` **(** :ref:`int` point_index **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_collision_exception_with` **(** :ref:`Node` body **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_pinned` **(** :ref:`int` point_index, :ref:`bool` pinned, :ref:`NodePath` attachment_path=NodePath("") **)** | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_SoftBody3D_DisableMode: -.. _class_SoftBody3D_constant_DISABLE_MODE_REMOVE: - -.. _class_SoftBody3D_constant_DISABLE_MODE_KEEP_ACTIVE: +.. rst-class:: classref-enumeration enum **DisableMode**: -- **DISABLE_MODE_REMOVE** = **0** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this ``SoftBody3D``. +.. _class_SoftBody3D_constant_DISABLE_MODE_REMOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_REMOVE** = ``0`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, remove from the physics simulation to stop all physics interactions with this **SoftBody3D**. Automatically re-added to the physics simulation when the :ref:`Node` is processed again. -- **DISABLE_MODE_KEEP_ACTIVE** = **1** --- When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, do not affect the physics simulation. +.. _class_SoftBody3D_constant_DISABLE_MODE_KEEP_ACTIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisableMode` **DISABLE_MODE_KEEP_ACTIVE** = ``1`` + +When :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`, do not affect the physics simulation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SoftBody3D_property_collision_layer: -- :ref:`int` **collision_layer** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``1`` | -+-----------+----------------------------+ -| *Setter* | set_collision_layer(value) | -+-----------+----------------------------+ -| *Getter* | get_collision_layer() | -+-----------+----------------------------+ +:ref:`int` **collision_layer** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_layer** **(** :ref:`int` value **)** +- :ref:`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`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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`. \ **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_damping_coefficient: -- :ref:`float` **damping_coefficient** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.01`` | -+-----------+--------------------------------+ -| *Setter* | set_damping_coefficient(value) | -+-----------+--------------------------------+ -| *Getter* | get_damping_coefficient() | -+-----------+--------------------------------+ +:ref:`float` **damping_coefficient** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_damping_coefficient** **(** :ref:`float` value **)** +- :ref:`float` **get_damping_coefficient** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_disable_mode: -- :ref:`DisableMode` **disable_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_disable_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_disable_mode() | -+-----------+-------------------------+ +:ref:`DisableMode` **disable_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_disable_mode** **(** :ref:`DisableMode` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_drag_coefficient: -- :ref:`float` **drag_coefficient** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------+ -| *Setter* | set_drag_coefficient(value) | -+-----------+-----------------------------+ -| *Getter* | get_drag_coefficient() | -+-----------+-----------------------------+ +:ref:`float` **drag_coefficient** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_drag_coefficient** **(** :ref:`float` value **)** +- :ref:`float` **get_drag_coefficient** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_linear_stiffness: -- :ref:`float` **linear_stiffness** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0.5`` | -+-----------+-----------------------------+ -| *Setter* | set_linear_stiffness(value) | -+-----------+-----------------------------+ -| *Getter* | get_linear_stiffness() | -+-----------+-----------------------------+ +:ref:`float` **linear_stiffness** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_linear_stiffness** **(** :ref:`float` value **)** +- :ref:`float` **get_linear_stiffness** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_parent_collision_ignore: -- :ref:`NodePath` **parent_collision_ignore** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+------------------------------------+ -| *Setter* | set_parent_collision_ignore(value) | -+-----------+------------------------------------+ -| *Getter* | get_parent_collision_ignore() | -+-----------+------------------------------------+ +:ref:`NodePath` **parent_collision_ignore** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_parent_collision_ignore** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_parent_collision_ignore** **(** **)** :ref:`NodePath` to a :ref:`CollisionObject3D` this SoftBody3D should avoid clipping. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_pressure_coefficient: -- :ref:`float` **pressure_coefficient** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_pressure_coefficient(value) | -+-----------+---------------------------------+ -| *Getter* | get_pressure_coefficient() | -+-----------+---------------------------------+ +:ref:`float` **pressure_coefficient** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_pressure_coefficient** **(** :ref:`float` value **)** +- :ref:`float` **get_pressure_coefficient** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_ray_pickable: -- :ref:`bool` **ray_pickable** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_ray_pickable(value) | -+-----------+-------------------------+ -| *Getter* | is_ray_pickable() | -+-----------+-------------------------+ +:ref:`bool` **ray_pickable** = ``true`` -If ``true``, the ``SoftBody3D`` will respond to :ref:`RayCast3D`\ s. +.. rst-class:: classref-property-setget + +- void **set_ray_pickable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_ray_pickable** **(** **)** + +If ``true``, the **SoftBody3D** will respond to :ref:`RayCast3D`\ s. + +.. rst-class:: classref-item-separator ---- .. _class_SoftBody3D_property_simulation_precision: -- :ref:`int` **simulation_precision** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``5`` | -+-----------+---------------------------------+ -| *Setter* | set_simulation_precision(value) | -+-----------+---------------------------------+ -| *Getter* | get_simulation_precision() | -+-----------+---------------------------------+ +:ref:`int` **simulation_precision** = ``5`` + +.. rst-class:: classref-property-setget + +- void **set_simulation_precision** **(** :ref:`int` value **)** +- :ref:`int` **get_simulation_precision** **(** **)** Increasing this value will improve the resulting simulation, but can affect performance. Use with care. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_property_total_mass: -- :ref:`float` **total_mass** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_total_mass(value) | -+-----------+-----------------------+ -| *Getter* | get_total_mass() | -+-----------+-----------------------+ +:ref:`float` **total_mass** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_total_mass** **(** :ref:`float` value **)** +- :ref:`float` **get_total_mass** **(** **)** The SoftBody3D's mass. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SoftBody3D_method_add_collision_exception_with: -- void **add_collision_exception_with** **(** :ref:`Node` body **)** +.. rst-class:: classref-method + +void **add_collision_exception_with** **(** :ref:`Node` body **)** Adds a body to the list of bodies that this body can't collide with. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_get_collision_exceptions: -- :ref:`PhysicsBody3D[]` **get_collision_exceptions** **(** **)** +.. rst-class:: classref-method + +:ref:`PhysicsBody3D[]` **get_collision_exceptions** **(** **)** Returns an array of nodes that were added as collision exceptions for this body. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_get_collision_layer_value: -- :ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_get_collision_mask_value: -- :ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_get_physics_rid: -- :ref:`RID` **get_physics_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_physics_rid** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_get_point_transform: -- :ref:`Vector3` **get_point_transform** **(** :ref:`int` point_index **)** +.. rst-class:: classref-method + +:ref:`Vector3` **get_point_transform** **(** :ref:`int` point_index **)** Returns local translation of a vertex in the surface array. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_is_point_pinned: -- :ref:`bool` **is_point_pinned** **(** :ref:`int` point_index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_point_pinned** **(** :ref:`int` point_index **)** |const| Returns ``true`` if vertex is set to pinned. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_remove_collision_exception_with: -- void **remove_collision_exception_with** **(** :ref:`Node` body **)** +.. rst-class:: classref-method + +void **remove_collision_exception_with** **(** :ref:`Node` body **)** Removes a body from the list of bodies that this body can't collide with. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_set_collision_layer_value: -- void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_set_collision_mask_value: -- void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + ---- .. _class_SoftBody3D_method_set_point_pinned: -- void **set_point_pinned** **(** :ref:`int` point_index, :ref:`bool` pinned, :ref:`NodePath` attachment_path=NodePath("") **)** +.. rst-class:: classref-method + +void **set_point_pinned** **(** :ref:`int` point_index, :ref:`bool` pinned, :ref:`NodePath` attachment_path=NodePath("") **)** Sets the pinned state of a surface vertex. When set to ``true``, the optional ``attachment_path`` can define a :ref:`Node3D` the pinned vertex will be attached to. diff --git a/classes/class_spheremesh.rst b/classes/class_spheremesh.rst index d9001144e..8aa0d40f6 100644 --- a/classes/class_spheremesh.rst +++ b/classes/class_spheremesh.rst @@ -14,106 +14,122 @@ SphereMesh Class representing a spherical :ref:`PrimitiveMesh`. +.. rst-class:: classref-introduction-group + Description ----------- Class representing a spherical :ref:`PrimitiveMesh`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`height` | ``1.0`` | -+---------------------------+-------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`is_hemisphere` | ``false`` | -+---------------------------+-------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`radial_segments` | ``64`` | -+---------------------------+-------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------+-------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`rings` | ``32`` | -+---------------------------+-------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`height` | ``1.0`` | + +---------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`is_hemisphere` | ``false`` | + +---------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`radial_segments` | ``64`` | + +---------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`rings` | ``32`` | + +---------------------------+-------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SphereMesh_property_height: -- :ref:`float` **height** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_height(value) | -+-----------+-------------------+ -| *Getter* | get_height() | -+-----------+-------------------+ +:ref:`float` **height** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_height** **(** :ref:`float` value **)** +- :ref:`float` **get_height** **(** **)** Full height of the sphere. +.. rst-class:: classref-item-separator + ---- .. _class_SphereMesh_property_is_hemisphere: -- :ref:`bool` **is_hemisphere** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_is_hemisphere(value) | -+-----------+--------------------------+ -| *Getter* | get_is_hemisphere() | -+-----------+--------------------------+ +:ref:`bool` **is_hemisphere** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_is_hemisphere** **(** :ref:`bool` value **)** +- :ref:`bool` **get_is_hemisphere** **(** **)** If ``true``, a hemisphere is created rather than a full sphere. \ **Note:** To get a regular hemisphere, the height and radius of the sphere must be equal. +.. rst-class:: classref-item-separator + ---- .. _class_SphereMesh_property_radial_segments: -- :ref:`int` **radial_segments** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``64`` | -+-----------+----------------------------+ -| *Setter* | set_radial_segments(value) | -+-----------+----------------------------+ -| *Getter* | get_radial_segments() | -+-----------+----------------------------+ +:ref:`int` **radial_segments** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_radial_segments** **(** :ref:`int` value **)** +- :ref:`int` **get_radial_segments** **(** **)** Number of radial segments on the sphere. +.. rst-class:: classref-item-separator + ---- .. _class_SphereMesh_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** Radius of sphere. +.. rst-class:: classref-item-separator + ---- .. _class_SphereMesh_property_rings: -- :ref:`int` **rings** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``32`` | -+-----------+------------------+ -| *Setter* | set_rings(value) | -+-----------+------------------+ -| *Getter* | get_rings() | -+-----------+------------------+ +:ref:`int` **rings** = ``32`` + +.. rst-class:: classref-property-setget + +- void **set_rings** **(** :ref:`int` value **)** +- :ref:`int` **get_rings** **(** **)** Number of segments along the height of the sphere. diff --git a/classes/class_sphereoccluder3d.rst b/classes/class_sphereoccluder3d.rst index fcca6ae4c..abfb7a3e1 100644 --- a/classes/class_sphereoccluder3d.rst +++ b/classes/class_sphereoccluder3d.rst @@ -14,34 +14,46 @@ SphereOccluder3D Spherical shape for use with occlusion culling in :ref:`OccluderInstance3D`. +.. rst-class:: classref-introduction-group + Description ----------- -``SphereOccluder3D`` stores a sphere shape that can be used by the engine's occlusion culling system. +**SphereOccluder3D** stores a sphere shape that can be used by the engine's occlusion culling system. See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-------------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | -+---------------------------+-------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +---------------------------+-------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SphereOccluder3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The sphere's radius in 3D units. diff --git a/classes/class_sphereshape3d.rst b/classes/class_sphereshape3d.rst index ecfcc71e8..4ea53c86d 100644 --- a/classes/class_sphereshape3d.rst +++ b/classes/class_sphereshape3d.rst @@ -14,39 +14,53 @@ SphereShape3D Sphere shape resource for 3D collisions. +.. rst-class:: classref-introduction-group + Description ----------- 3D sphere shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is useful for modeling sphere-like 3D objects. -\ **Performance:** Being a primitive collision shape, ``SphereShape3D`` is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. +\ **Performance:** Being a primitive collision shape, **SphereShape3D** is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. + +.. rst-class:: classref-introduction-group Tutorials --------- - `3D Physics Tests Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------+----------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+----------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SphereShape3D_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The sphere's radius. The shape's diameter is double the radius. diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index 14c9fecec..af1e07313 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -14,6 +14,8 @@ SpinBox Numerical input text field. +.. rst-class:: classref-introduction-group + Description ----------- @@ -42,195 +44,239 @@ SpinBox is a numerical input text field. It allows entering integers and floats. -The above code will create a ``SpinBox``, disable context menu on it and set the text alignment to right. +The above code will create a **SpinBox**, disable context menu on it and set the text alignment to right. -See :ref:`Range` class for more options over the ``SpinBox``. +See :ref:`Range` class for more options over the **SpinBox**. -\ **Note:** ``SpinBox`` relies on an underlying :ref:`LineEdit` node. To theme a ``SpinBox``'s background, add theme items for :ref:`LineEdit` and customize them. +\ **Note:** **SpinBox** relies on an underlying :ref:`LineEdit` node. To theme a **SpinBox**'s background, add theme items for :ref:`LineEdit` and customize them. \ **Note:** If you want to implement drag and drop for the underlying :ref:`LineEdit`, you can use :ref:`Control.set_drag_forwarding` on the node returned by :ref:`get_line_edit`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`custom_arrow_step` | ``0.0`` | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editable` | ``true`` | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`prefix` | ``""`` | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`select_all_on_focus` | ``false`` | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`suffix` | ``""`` | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`update_on_text_changed` | ``false`` | -+-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`custom_arrow_step` | ``0.0`` | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editable` | ``true`` | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`prefix` | ``""`` | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_all_on_focus` | ``false`` | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`suffix` | ``""`` | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`update_on_text_changed` | ``false`` | + +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+----------------------------------------------------------------------+ -| void | :ref:`apply` **(** **)** | -+---------------------------------+----------------------------------------------------------------------+ -| :ref:`LineEdit` | :ref:`get_line_edit` **(** **)** | -+---------------------------------+----------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------+ + | void | :ref:`apply` **(** **)** | + +---------------------------------+----------------------------------------------------------------------+ + | :ref:`LineEdit` | :ref:`get_line_edit` **(** **)** | + +---------------------------------+----------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------+ -| :ref:`Texture2D` | :ref:`updown` | -+-----------------------------------+------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------+ + | :ref:`Texture2D` | :ref:`updown` | + +-----------------------------------+------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SpinBox_property_alignment: -- :ref:`HorizontalAlignment` **alignment** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_horizontal_alignment(value) | -+-----------+---------------------------------+ -| *Getter* | get_horizontal_alignment() | -+-----------+---------------------------------+ +:ref:`HorizontalAlignment` **alignment** = ``0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`HorizontalAlignment` **get_horizontal_alignment** **(** **)** + +Changes the alignment of the underlying :ref:`LineEdit`. + +.. rst-class:: classref-item-separator ---- .. _class_SpinBox_property_custom_arrow_step: -- :ref:`float` **custom_arrow_step** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------+ -| *Setter* | set_custom_arrow_step(value) | -+-----------+------------------------------+ -| *Getter* | get_custom_arrow_step() | -+-----------+------------------------------+ +:ref:`float` **custom_arrow_step** = ``0.0`` -If not ``0``, ``value`` will always be rounded to a multiple of ``custom_arrow_step`` when interacting with the arrow buttons of the ``SpinBox``. +.. rst-class:: classref-property-setget + +- void **set_custom_arrow_step** **(** :ref:`float` value **)** +- :ref:`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**. + +.. rst-class:: classref-item-separator ---- .. _class_SpinBox_property_editable: -- :ref:`bool` **editable** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_editable(value) | -+-----------+---------------------+ -| *Getter* | is_editable() | -+-----------+---------------------+ +:ref:`bool` **editable** = ``true`` -If ``true``, the ``SpinBox`` will be editable. Otherwise, it will be read only. +.. rst-class:: classref-property-setget + +- void **set_editable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editable** **(** **)** + +If ``true``, the **SpinBox** will be editable. Otherwise, it will be read only. + +.. rst-class:: classref-item-separator ---- .. _class_SpinBox_property_prefix: -- :ref:`String` **prefix** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``""`` | -+-----------+-------------------+ -| *Setter* | set_prefix(value) | -+-----------+-------------------+ -| *Getter* | get_prefix() | -+-----------+-------------------+ +:ref:`String` **prefix** = ``""`` -Adds the specified ``prefix`` string before the numerical value of the ``SpinBox``. +.. rst-class:: classref-property-setget + +- void **set_prefix** **(** :ref:`String` value **)** +- :ref:`String` **get_prefix** **(** **)** + +Adds the specified ``prefix`` string before the numerical value of the **SpinBox**. + +.. rst-class:: classref-item-separator ---- .. _class_SpinBox_property_select_all_on_focus: -- :ref:`bool` **select_all_on_focus** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_select_all_on_focus(value) | -+-----------+--------------------------------+ -| *Getter* | is_select_all_on_focus() | -+-----------+--------------------------------+ +:ref:`bool` **select_all_on_focus** = ``false`` -If ``true``, the ``SpinBox`` will select the whole text when the :ref:`LineEdit` gains focus. Clicking the up and down arrows won't trigger this behavior. +.. rst-class:: classref-property-setget + +- void **set_select_all_on_focus** **(** :ref:`bool` value **)** +- :ref:`bool` **is_select_all_on_focus** **(** **)** + +If ``true``, the **SpinBox** will select the whole text when the :ref:`LineEdit` gains focus. Clicking the up and down arrows won't trigger this behavior. + +.. rst-class:: classref-item-separator ---- .. _class_SpinBox_property_suffix: -- :ref:`String` **suffix** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``""`` | -+-----------+-------------------+ -| *Setter* | set_suffix(value) | -+-----------+-------------------+ -| *Getter* | get_suffix() | -+-----------+-------------------+ +:ref:`String` **suffix** = ``""`` -Adds the specified ``suffix`` string after the numerical value of the ``SpinBox``. +.. rst-class:: classref-property-setget + +- void **set_suffix** **(** :ref:`String` value **)** +- :ref:`String` **get_suffix** **(** **)** + +Adds the specified ``suffix`` string after the numerical value of the **SpinBox**. + +.. rst-class:: classref-item-separator ---- .. _class_SpinBox_property_update_on_text_changed: -- :ref:`bool` **update_on_text_changed** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_update_on_text_changed(value) | -+-----------+-----------------------------------+ -| *Getter* | get_update_on_text_changed() | -+-----------+-----------------------------------+ +:ref:`bool` **update_on_text_changed** = ``false`` -Sets the value of the :ref:`Range` for this ``SpinBox`` when the :ref:`LineEdit` text is *changed* instead of *submitted*. See :ref:`LineEdit.text_changed` and :ref:`LineEdit.text_submitted`. +.. rst-class:: classref-property-setget + +- void **set_update_on_text_changed** **(** :ref:`bool` value **)** +- :ref:`bool` **get_update_on_text_changed** **(** **)** + +Sets the value of the :ref:`Range` for this **SpinBox** when the :ref:`LineEdit` text is *changed* instead of *submitted*. See :ref:`LineEdit.text_changed` and :ref:`LineEdit.text_submitted`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SpinBox_method_apply: -- void **apply** **(** **)** +.. rst-class:: classref-method -Applies the current value of this ``SpinBox``. +void **apply** **(** **)** + +Applies the current value of this **SpinBox**. + +.. rst-class:: classref-item-separator ---- .. _class_SpinBox_method_get_line_edit: -- :ref:`LineEdit` **get_line_edit** **(** **)** +.. rst-class:: classref-method -Returns the :ref:`LineEdit` instance from this ``SpinBox``. You can use it to access properties and methods of :ref:`LineEdit`. +:ref:`LineEdit` **get_line_edit** **(** **)** + +Returns the :ref:`LineEdit` instance from this **SpinBox**. You can use it to access properties and methods of :ref:`LineEdit`. \ **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` property. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_SpinBox_theme_icon_updown: -- :ref:`Texture2D` **updown** +.. rst-class:: classref-themeproperty -Sets a custom :ref:`Texture2D` for up and down arrows of the ``SpinBox``. +:ref:`Texture2D` **updown** + +Sets a custom :ref:`Texture2D` for up and down arrows of the **SpinBox**. .. |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.)` diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index 75a92b2da..a669ac707 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -16,205 +16,280 @@ SplitContainer Container for splitting and adjusting. +.. rst-class:: classref-introduction-group + Description ----------- Container for splitting two :ref:`Control`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`collapsed` | ``false`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`DraggerVisibility` | :ref:`dragger_visibility` | ``0`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`split_offset` | ``0`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`vertical` | ``false`` | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`collapsed` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`DraggerVisibility` | :ref:`dragger_visibility` | ``0`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`split_offset` | ``0`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`vertical` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+---------------------------------------------------------------------------------------+ -| void | :ref:`clamp_split_offset` **(** **)** | -+------+---------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+---------------------------------------------------------------------------------------+ + | void | :ref:`clamp_split_offset` **(** **)** | + +------+---------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+-------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`autohide` | ``1`` | -+-----------------------------------+-------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | -+-----------------------------------+-------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`separation` | ``12`` | -+-----------------------------------+-------------------------------------------------------------------------------------------+--------+ -| :ref:`Texture2D` | :ref:`h_grabber` | | -+-----------------------------------+-------------------------------------------------------------------------------------------+--------+ -| :ref:`Texture2D` | :ref:`v_grabber` | | -+-----------------------------------+-------------------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`autohide` | ``1`` | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`separation` | ``12`` | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`Texture2D` | :ref:`h_grabber` | | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`Texture2D` | :ref:`v_grabber` | | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_SplitContainer_signal_dragged: -- **dragged** **(** :ref:`int` offset **)** +.. rst-class:: classref-signal + +**dragged** **(** :ref:`int` offset **)** Emitted when the dragger is dragged by user. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_SplitContainer_DraggerVisibility: -.. _class_SplitContainer_constant_DRAGGER_VISIBLE: - -.. _class_SplitContainer_constant_DRAGGER_HIDDEN: - -.. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED: +.. rst-class:: classref-enumeration enum **DraggerVisibility**: -- **DRAGGER_VISIBLE** = **0** --- The split dragger is visible when the cursor hovers it. +.. _class_SplitContainer_constant_DRAGGER_VISIBLE: -- **DRAGGER_HIDDEN** = **1** --- The split dragger is never visible. +.. rst-class:: classref-enumeration-constant -- **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is never visible and its space collapsed. +:ref:`DraggerVisibility` **DRAGGER_VISIBLE** = ``0`` + +The split dragger is visible when the cursor hovers it. + +.. _class_SplitContainer_constant_DRAGGER_HIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`DraggerVisibility` **DRAGGER_HIDDEN** = ``1`` + +The split dragger is never visible. + +.. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DraggerVisibility` **DRAGGER_HIDDEN_COLLAPSED** = ``2`` + +The split dragger is never visible and its space collapsed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SplitContainer_property_collapsed: -- :ref:`bool` **collapsed** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_collapsed(value) | -+-----------+----------------------+ -| *Getter* | is_collapsed() | -+-----------+----------------------+ +:ref:`bool` **collapsed** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collapsed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collapsed** **(** **)** If ``true``, the area of the first :ref:`Control` will be collapsed and the dragger will be disabled. +.. rst-class:: classref-item-separator + ---- .. _class_SplitContainer_property_dragger_visibility: -- :ref:`DraggerVisibility` **dragger_visibility** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_dragger_visibility(value) | -+-----------+-------------------------------+ -| *Getter* | get_dragger_visibility() | -+-----------+-------------------------------+ +:ref:`DraggerVisibility` **dragger_visibility** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_dragger_visibility** **(** :ref:`DraggerVisibility` value **)** +- :ref:`DraggerVisibility` **get_dragger_visibility** **(** **)** Determines the dragger's visibility. See :ref:`DraggerVisibility` for details. +.. rst-class:: classref-item-separator + ---- .. _class_SplitContainer_property_split_offset: -- :ref:`int` **split_offset** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_split_offset(value) | -+-----------+-------------------------+ -| *Getter* | get_split_offset() | -+-----------+-------------------------+ +:ref:`int` **split_offset** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_split_offset** **(** :ref:`int` value **)** +- :ref:`int` **get_split_offset** **(** **)** The initial offset of the splitting between the two :ref:`Control`\ s, with ``0`` being at the end of the first :ref:`Control`. +.. rst-class:: classref-item-separator + ---- .. _class_SplitContainer_property_vertical: -- :ref:`bool` **vertical** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_vertical(value) | -+-----------+---------------------+ -| *Getter* | is_vertical() | -+-----------+---------------------+ +:ref:`bool` **vertical** = ``false`` -If ``true``, the ``SplitContainer`` will arrange its children vertically, rather than horizontally. +.. rst-class:: classref-property-setget + +- void **set_vertical** **(** :ref:`bool` value **)** +- :ref:`bool` **is_vertical** **(** **)** + +If ``true``, the **SplitContainer** will arrange its children vertically, rather than horizontally. Can't be changed when using :ref:`HSplitContainer` and :ref:`VSplitContainer`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SplitContainer_method_clamp_split_offset: -- void **clamp_split_offset** **(** **)** +.. rst-class:: classref-method + +void **clamp_split_offset** **(** **)** Clamps the :ref:`split_offset` value to not go outside the currently possible minimal and maximum values. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_SplitContainer_theme_constant_autohide: -- :ref:`int` **autohide** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`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_SplitContainer_theme_constant_minimum_grab_thickness: -- :ref:`int` **minimum_grab_thickness** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``6`` | -+-----------+-------+ +:ref:`int` **minimum_grab_thickness** = ``6`` The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation` or :ref:`h_grabber` / :ref:`v_grabber`'s thickness are too small, this ensure that the splitting line can still be dragged. +.. rst-class:: classref-item-separator + ---- .. _class_SplitContainer_theme_constant_separation: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``12`` | -+-----------+--------+ +:ref:`int` **separation** = ``12`` The space between sides of the container. +.. rst-class:: classref-item-separator + ---- .. _class_SplitContainer_theme_icon_h_grabber: -- :ref:`Texture2D` **h_grabber** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **h_grabber** The icon used for the grabber drawn in the middle area when :ref:`vertical` is ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_SplitContainer_theme_icon_v_grabber: -- :ref:`Texture2D` **v_grabber** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **v_grabber** The icon used for the grabber drawn in the middle area when :ref:`vertical` is ``true``. diff --git a/classes/class_spotlight3d.rst b/classes/class_spotlight3d.rst index 39342c198..2f7136422 100644 --- a/classes/class_spotlight3d.rst +++ b/classes/class_spotlight3d.rst @@ -14,11 +14,15 @@ SpotLight3D A spotlight, such as a reflector spotlight or a lantern. +.. rst-class:: classref-introduction-group + Description ----------- A Spotlight is a type of :ref:`Light3D` node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of :ref:`Light3D`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,85 +30,98 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`float` | shadow_bias | ``0.03`` (overrides :ref:`Light3D`) | -+---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`float` | :ref:`spot_angle` | ``45.0`` | -+---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`float` | :ref:`spot_angle_attenuation` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`float` | :ref:`spot_attenuation` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`float` | :ref:`spot_range` | ``5.0`` | -+---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`float` | shadow_bias | ``0.03`` (overrides :ref:`Light3D`) | + +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`float` | :ref:`spot_angle` | ``45.0`` | + +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`float` | :ref:`spot_angle_attenuation` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`float` | :ref:`spot_attenuation` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`float` | :ref:`spot_range` | ``5.0`` | + +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SpotLight3D_property_spot_angle: -- :ref:`float` **spot_angle** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``45.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **spot_angle** = ``45.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :ref:`float` **get_param** **(** **)** The spotlight's angle in degrees. \ **Note:** :ref:`spot_angle` is not affected by :ref:`Node3D.scale` (the light's scale or its parent's scale). +.. rst-class:: classref-item-separator + ---- .. _class_SpotLight3D_property_spot_angle_attenuation: -- :ref:`float` **spot_angle_attenuation** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **spot_angle_attenuation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :ref:`float` **get_param** **(** **)** The spotlight's angular attenuation curve. +.. rst-class:: classref-item-separator + ---- .. _class_SpotLight3D_property_spot_attenuation: -- :ref:`float` **spot_attenuation** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``1.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **spot_attenuation** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :ref:`float` **get_param** **(** **)** The spotlight's light energy attenuation curve. +.. rst-class:: classref-item-separator + ---- .. _class_SpotLight3D_property_spot_range: -- :ref:`float` **spot_range** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``5.0`` | -+-----------+------------------+ -| *Setter* | set_param(value) | -+-----------+------------------+ -| *Getter* | get_param() | -+-----------+------------------+ +:ref:`float` **spot_range** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_param** **(** :ref:`float` value **)** +- :ref:`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` in use. No matter the :ref:`spot_attenuation` in use, the light will never reach anything outside this range. diff --git a/classes/class_springarm3d.rst b/classes/class_springarm3d.rst index b23f8a09f..8eadd2d06 100644 --- a/classes/class_springarm3d.rst +++ b/classes/class_springarm3d.rst @@ -14,6 +14,8 @@ SpringArm3D A helper node, mostly used in 3rd person cameras. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,62 +27,78 @@ The SpringArm3D will either cast a ray, or if a shape is given, it will cast the If you use the SpringArm3D as a camera controller for your player, you might need to exclude the player's collider from the SpringArm3D's collision check. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`collision_mask` | ``1`` | -+-------------------------------+------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`margin` | ``0.01`` | -+-------------------------------+------------------------------------------------------------------+----------+ -| :ref:`Shape3D` | :ref:`shape` | | -+-------------------------------+------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`spring_length` | ``1.0`` | -+-------------------------------+------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-------------------------------+------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`margin` | ``0.01`` | + +-------------------------------+------------------------------------------------------------------+----------+ + | :ref:`Shape3D` | :ref:`shape` | | + +-------------------------------+------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`spring_length` | ``1.0`` | + +-------------------------------+------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_excluded_object` **(** :ref:`RID` RID **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_excluded_objects` **(** **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_hit_length` **(** **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`remove_excluded_object` **(** :ref:`RID` RID **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_excluded_object` **(** :ref:`RID` RID **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_excluded_objects` **(** **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_hit_length` **(** **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`remove_excluded_object` **(** :ref:`RID` RID **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SpringArm3D_property_collision_mask: -- :ref:`int` **collision_mask** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_collision_mask(value) | -+-----------+---------------------------+ -| *Getter* | get_collision_mask() | -+-----------+---------------------------+ +:ref:`int` **collision_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_collision_mask** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SpringArm3D_property_margin: -- :ref:`float` **margin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.01`` | -+-----------+-------------------+ -| *Setter* | set_margin(value) | -+-----------+-------------------+ -| *Getter* | get_margin() | -+-----------+-------------------+ +:ref:`float` **margin** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_margin** **(** **)** When the collision check is made, a candidate length for the SpringArm3D is given. @@ -88,70 +106,94 @@ The margin is then subtracted to this length and the translation is applied to t This margin is useful for when the SpringArm3D has a :ref:`Camera3D` as a child node: without the margin, the :ref:`Camera3D` would be placed on the exact point of collision, while with the margin the :ref:`Camera3D` would be placed close to the point of collision. +.. rst-class:: classref-item-separator + ---- .. _class_SpringArm3D_property_shape: -- :ref:`Shape3D` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Shape3D` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Shape3D` value **)** +- :ref:`Shape3D` **get_shape** **(** **)** The :ref:`Shape3D` to use for the SpringArm3D. When the shape is set, the SpringArm3D will cast the :ref:`Shape3D` on its z axis instead of performing a ray cast. +.. rst-class:: classref-item-separator + ---- .. _class_SpringArm3D_property_spring_length: -- :ref:`float` **spring_length** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_length(value) | -+-----------+-------------------+ -| *Getter* | get_length() | -+-----------+-------------------+ +:ref:`float` **spring_length** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_length** **(** :ref:`float` value **)** +- :ref:`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. To know more about how to perform a shape cast or a ray cast, please consult the :ref:`PhysicsDirectSpaceState3D` documentation. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SpringArm3D_method_add_excluded_object: -- void **add_excluded_object** **(** :ref:`RID` RID **)** +.. rst-class:: classref-method + +void **add_excluded_object** **(** :ref:`RID` RID **)** Adds the :ref:`PhysicsBody3D` object with the given :ref:`RID` to the list of :ref:`PhysicsBody3D` objects excluded from the collision check. +.. rst-class:: classref-item-separator + ---- .. _class_SpringArm3D_method_clear_excluded_objects: -- void **clear_excluded_objects** **(** **)** +.. rst-class:: classref-method + +void **clear_excluded_objects** **(** **)** Clears the list of :ref:`PhysicsBody3D` objects excluded from the collision check. +.. rst-class:: classref-item-separator + ---- .. _class_SpringArm3D_method_get_hit_length: -- :ref:`float` **get_hit_length** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **get_hit_length** **(** **)** Returns the spring arm's current length. +.. rst-class:: classref-item-separator + ---- .. _class_SpringArm3D_method_remove_excluded_object: -- :ref:`bool` **remove_excluded_object** **(** :ref:`RID` RID **)** +.. rst-class:: classref-method + +:ref:`bool` **remove_excluded_object** **(** :ref:`RID` RID **)** Removes the given :ref:`RID` from the list of :ref:`PhysicsBody3D` objects excluded from the collision check. diff --git a/classes/class_sprite2d.rst b/classes/class_sprite2d.rst index 117fe1f7e..d741220d4 100644 --- a/classes/class_sprite2d.rst +++ b/classes/class_sprite2d.rst @@ -14,268 +14,320 @@ Sprite2D General-purpose sprite node. +.. rst-class:: classref-introduction-group + Description ----------- A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. +.. rst-class:: classref-introduction-group + Tutorials --------- - `Instancing Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`centered` | ``true`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_h` | ``false`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_v` | ``false`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`frame` | ``0`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2i` | :ref:`frame_coords` | ``Vector2i(0, 0)`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`hframes` | ``1`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`region_enabled` | ``false`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`region_filter_clip_enabled` | ``false`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`vframes` | ``1`` | -+-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`centered` | ``true`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`flip_h` | ``false`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`flip_v` | ``false`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`frame` | ``0`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2i` | :ref:`frame_coords` | ``Vector2i(0, 0)`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`hframes` | ``1`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`region_enabled` | ``false`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`region_filter_clip_enabled` | ``false`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`vframes` | ``1`` | + +-----------------------------------+---------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_rect` **(** **)** |const| | -+---------------------------+---------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_pixel_opaque` **(** :ref:`Vector2` pos **)** |const| | -+---------------------------+---------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_rect` **(** **)** |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_pixel_opaque` **(** :ref:`Vector2` pos **)** |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Sprite2D_signal_frame_changed: -- **frame_changed** **(** **)** +.. rst-class:: classref-signal + +**frame_changed** **(** **)** Emitted when the :ref:`frame` changes. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_signal_texture_changed: -- **texture_changed** **(** **)** +.. rst-class:: classref-signal + +**texture_changed** **(** **)** Emitted when the :ref:`texture` changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Sprite2D_property_centered: -- :ref:`bool` **centered** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_centered(value) | -+-----------+---------------------+ -| *Getter* | is_centered() | -+-----------+---------------------+ +:ref:`bool` **centered** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_centered** **(** :ref:`bool` value **)** +- :ref:`bool` **is_centered** **(** **)** If ``true``, texture is centered. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_flip_h: -- :ref:`bool` **flip_h** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_h(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_h() | -+-----------+-------------------+ +:ref:`bool` **flip_h** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_h** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_h** **(** **)** If ``true``, texture is flipped horizontally. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_flip_v: -- :ref:`bool` **flip_v** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_v(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_v() | -+-----------+-------------------+ +:ref:`bool` **flip_v** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_v** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_v** **(** **)** If ``true``, texture is flipped vertically. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_frame: -- :ref:`int` **frame** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_frame(value) | -+-----------+------------------+ -| *Getter* | get_frame() | -+-----------+------------------+ +:ref:`int` **frame** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_frame** **(** :ref:`int` value **)** +- :ref:`int` **get_frame** **(** **)** Current frame to display from sprite sheet. :ref:`hframes` or :ref:`vframes` must be greater than 1. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_frame_coords: -- :ref:`Vector2i` **frame_coords** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_frame_coords(value) | -+-----------+-------------------------+ -| *Getter* | get_frame_coords() | -+-----------+-------------------------+ +:ref:`Vector2i` **frame_coords** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_frame_coords** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_frame_coords** **(** **)** Coordinates of the frame to display from sprite sheet. This is as an alias for the :ref:`frame` property. :ref:`hframes` or :ref:`vframes` must be greater than 1. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_hframes: -- :ref:`int` **hframes** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_hframes(value) | -+-----------+--------------------+ -| *Getter* | get_hframes() | -+-----------+--------------------+ +:ref:`int` **hframes** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_hframes** **(** :ref:`int` value **)** +- :ref:`int` **get_hframes** **(** **)** The number of columns in the sprite sheet. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The texture's drawing offset. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_region_enabled: -- :ref:`bool` **region_enabled** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_region_enabled(value) | -+-----------+---------------------------+ -| *Getter* | is_region_enabled() | -+-----------+---------------------------+ +:ref:`bool` **region_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_region_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_region_enabled** **(** **)** If ``true``, texture is cut from a larger atlas texture. See :ref:`region_rect`. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_region_filter_clip_enabled: -- :ref:`bool` **region_filter_clip_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------+ -| *Setter* | set_region_filter_clip_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_region_filter_clip_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **region_filter_clip_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_region_filter_clip_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_region_filter_clip_enabled** **(** **)** If ``true``, the outermost pixels get blurred out. :ref:`region_enabled` must be ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_region_rect: -- :ref:`Rect2` **region_rect** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Rect2(0, 0, 0, 0)`` | -+-----------+------------------------+ -| *Setter* | set_region_rect(value) | -+-----------+------------------------+ -| *Getter* | get_region_rect() | -+-----------+------------------------+ +:ref:`Rect2` **region_rect** = ``Rect2(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_region_rect** **(** :ref:`Rect2` value **)** +- :ref:`Rect2` **get_region_rect** **(** **)** The region of the atlas texture to display. :ref:`region_enabled` must be ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** :ref:`Texture2D` object to draw. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_property_vframes: -- :ref:`int` **vframes** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_vframes(value) | -+-----------+--------------------+ -| *Getter* | get_vframes() | -+-----------+--------------------+ +:ref:`int` **vframes** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_vframes** **(** :ref:`int` value **)** +- :ref:`int` **get_vframes** **(** **)** The number of rows in the sprite sheet. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Sprite2D_method_get_rect: -- :ref:`Rect2` **get_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_rect** **(** **)** |const| Returns a :ref:`Rect2` representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. @@ -309,11 +361,15 @@ Returns a :ref:`Rect2` representing the Sprite2D's boundary in loca +.. rst-class:: classref-item-separator + ---- .. _class_Sprite2D_method_is_pixel_opaque: -- :ref:`bool` **is_pixel_opaque** **(** :ref:`Vector2` pos **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_pixel_opaque** **(** :ref:`Vector2` pos **)** |const| Returns ``true``, if the pixel at the given position is opaque and ``false`` in other case. diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst index 164f253c1..e96c3faeb 100644 --- a/classes/class_sprite3d.rst +++ b/classes/class_sprite3d.rst @@ -14,157 +14,187 @@ Sprite3D 2D sprite node in a 3D world. +.. rst-class:: classref-introduction-group + Description ----------- A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. See also :ref:`SpriteBase3D` where properties such as the billboard mode are defined. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`frame` | ``0`` | -+-----------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Vector2i` | :ref:`frame_coords` | ``Vector2i(0, 0)`` | -+-----------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`hframes` | ``1`` | -+-----------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`region_enabled` | ``false`` | -+-----------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | -+-----------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+-----------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`vframes` | ``1`` | -+-----------------------------------+---------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`frame` | ``0`` | + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`Vector2i` | :ref:`frame_coords` | ``Vector2i(0, 0)`` | + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`hframes` | ``1`` | + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`region_enabled` | ``false`` | + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`vframes` | ``1`` | + +-----------------------------------+---------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Sprite3D_signal_frame_changed: -- **frame_changed** **(** **)** +.. rst-class:: classref-signal + +**frame_changed** **(** **)** Emitted when the :ref:`frame` changes. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite3D_signal_texture_changed: -- **texture_changed** **(** **)** +.. rst-class:: classref-signal + +**texture_changed** **(** **)** Emitted when the :ref:`texture` changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Sprite3D_property_frame: -- :ref:`int` **frame** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0`` | -+-----------+------------------+ -| *Setter* | set_frame(value) | -+-----------+------------------+ -| *Getter* | get_frame() | -+-----------+------------------+ +:ref:`int` **frame** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_frame** **(** :ref:`int` value **)** +- :ref:`int` **get_frame** **(** **)** Current frame to display from sprite sheet. :ref:`hframes` or :ref:`vframes` must be greater than 1. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite3D_property_frame_coords: -- :ref:`Vector2i` **frame_coords** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_frame_coords(value) | -+-----------+-------------------------+ -| *Getter* | get_frame_coords() | -+-----------+-------------------------+ +:ref:`Vector2i` **frame_coords** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_frame_coords** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_frame_coords** **(** **)** Coordinates of the frame to display from sprite sheet. This is as an alias for the :ref:`frame` property. :ref:`hframes` or :ref:`vframes` must be greater than 1. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite3D_property_hframes: -- :ref:`int` **hframes** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_hframes(value) | -+-----------+--------------------+ -| *Getter* | get_hframes() | -+-----------+--------------------+ +:ref:`int` **hframes** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_hframes** **(** :ref:`int` value **)** +- :ref:`int` **get_hframes** **(** **)** The number of columns in the sprite sheet. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite3D_property_region_enabled: -- :ref:`bool` **region_enabled** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_region_enabled(value) | -+-----------+---------------------------+ -| *Getter* | is_region_enabled() | -+-----------+---------------------------+ +:ref:`bool` **region_enabled** = ``false`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_region_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_region_enabled** **(** **)** + +If ``true``, the sprite will use :ref:`region_rect` and display only the specified part of its texture. + +.. rst-class:: classref-item-separator ---- .. _class_Sprite3D_property_region_rect: -- :ref:`Rect2` **region_rect** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Rect2(0, 0, 0, 0)`` | -+-----------+------------------------+ -| *Setter* | set_region_rect(value) | -+-----------+------------------------+ -| *Getter* | get_region_rect() | -+-----------+------------------------+ +:ref:`Rect2` **region_rect** = ``Rect2(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_region_rect** **(** :ref:`Rect2` value **)** +- :ref:`Rect2` **get_region_rect** **(** **)** The region of the atlas texture to display. :ref:`region_enabled` must be ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite3D_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** :ref:`Texture2D` object to draw. If :ref:`GeometryInstance3D.material_override` is used, this will be overridden. The size information is still used. +.. rst-class:: classref-item-separator + ---- .. _class_Sprite3D_property_vframes: -- :ref:`int` **vframes** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_vframes(value) | -+-----------+--------------------+ -| *Getter* | get_vframes() | -+-----------+--------------------+ +:ref:`int` **vframes** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_vframes** **(** :ref:`int` value **)** +- :ref:`int` **get_vframes** **(** **)** The number of rows in the sprite sheet. diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index d5ed27d63..0ca4ceee9 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -16,318 +16,395 @@ SpriteBase3D 2D sprite node in 3D environment. +.. rst-class:: classref-introduction-group + Description ----------- A node that displays 2D texture information in a 3D environment. See also :ref:`Sprite3D` where many other properties are defined. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`AlphaCutMode` | :ref:`alpha_cut` | ``0`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| Vector3.Axis | :ref:`axis` | ``2`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`BillboardMode` | :ref:`billboard` | ``0`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`centered` | ``true`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`double_sided` | ``true`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`fixed_size` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_h` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_v` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`no_depth_test` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`pixel_size` | ``0.01`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`render_priority` | ``0`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shaded` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`transparent` | ``true`` | -+---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`AlphaCutMode` | :ref:`alpha_cut` | ``0`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | Vector3.Axis | :ref:`axis` | ``2`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`BillboardMode` | :ref:`billboard` | ``0`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`centered` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`double_sided` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`fixed_size` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`flip_h` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`flip_v` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`no_depth_test` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`pixel_size` | ``0.01`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`render_priority` | ``0`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`shaded` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`transparent` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_draw_flag` **(** :ref:`DrawFlags` flag **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_item_rect` **(** **)** |const| | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_draw_flag` **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** | -+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_draw_flag` **(** :ref:`DrawFlags` flag **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_rect` **(** **)** |const| | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_draw_flag` **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** | + +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_SpriteBase3D_DrawFlags: -.. _class_SpriteBase3D_constant_FLAG_TRANSPARENT: - -.. _class_SpriteBase3D_constant_FLAG_SHADED: - -.. _class_SpriteBase3D_constant_FLAG_DOUBLE_SIDED: - -.. _class_SpriteBase3D_constant_FLAG_DISABLE_DEPTH_TEST: - -.. _class_SpriteBase3D_constant_FLAG_FIXED_SIZE: - -.. _class_SpriteBase3D_constant_FLAG_MAX: +.. rst-class:: classref-enumeration enum **DrawFlags**: -- **FLAG_TRANSPARENT** = **0** --- If set, the texture's transparency and the opacity are used to make those parts of the sprite invisible. +.. _class_SpriteBase3D_constant_FLAG_TRANSPARENT: -- **FLAG_SHADED** = **1** --- If set, lights in the environment affect the sprite. +.. rst-class:: classref-enumeration-constant -- **FLAG_DOUBLE_SIDED** = **2** --- If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind. +:ref:`DrawFlags` **FLAG_TRANSPARENT** = ``0`` -- **FLAG_DISABLE_DEPTH_TEST** = **3** --- Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. +If set, the texture's transparency and the opacity are used to make those parts of the sprite invisible. -- **FLAG_FIXED_SIZE** = **4** --- Label is scaled by depth so that it always appears the same size on screen. +.. _class_SpriteBase3D_constant_FLAG_SHADED: -- **FLAG_MAX** = **5** --- Represents the size of the :ref:`DrawFlags` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_SHADED** = ``1`` + +If set, lights in the environment affect the sprite. + +.. _class_SpriteBase3D_constant_FLAG_DOUBLE_SIDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_DOUBLE_SIDED** = ``2`` + +If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind. + +.. _class_SpriteBase3D_constant_FLAG_DISABLE_DEPTH_TEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_DISABLE_DEPTH_TEST** = ``3`` + +Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. + +.. _class_SpriteBase3D_constant_FLAG_FIXED_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_FIXED_SIZE** = ``4`` + +Label is scaled by depth so that it always appears the same size on screen. + +.. _class_SpriteBase3D_constant_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **FLAG_MAX** = ``5`` + +Represents the size of the :ref:`DrawFlags` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_SpriteBase3D_AlphaCutMode: -.. _class_SpriteBase3D_constant_ALPHA_CUT_DISABLED: - -.. _class_SpriteBase3D_constant_ALPHA_CUT_DISCARD: - -.. _class_SpriteBase3D_constant_ALPHA_CUT_OPAQUE_PREPASS: +.. rst-class:: classref-enumeration enum **AlphaCutMode**: -- **ALPHA_CUT_DISABLED** = **0** --- This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. +.. _class_SpriteBase3D_constant_ALPHA_CUT_DISABLED: -- **ALPHA_CUT_DISCARD** = **1** --- This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa`). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as *alpha testing* or *1-bit transparency*. +.. rst-class:: classref-enumeration-constant -- **ALPHA_CUT_OPAQUE_PREPASS** = **2** --- This mode draws fully opaque pixels in the depth prepass. This is slower than :ref:`ALPHA_CUT_DISABLED` or :ref:`ALPHA_CUT_DISCARD`, but it allows displaying translucent areas and smooth edges while using proper sorting. +:ref:`AlphaCutMode` **ALPHA_CUT_DISABLED** = ``0`` + +This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. + +.. _class_SpriteBase3D_constant_ALPHA_CUT_DISCARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaCutMode` **ALPHA_CUT_DISCARD** = ``1`` + +This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa`). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as *alpha testing* or *1-bit transparency*. + +.. _class_SpriteBase3D_constant_ALPHA_CUT_OPAQUE_PREPASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlphaCutMode` **ALPHA_CUT_OPAQUE_PREPASS** = ``2`` + +This mode draws fully opaque pixels in the depth prepass. This is slower than :ref:`ALPHA_CUT_DISABLED` or :ref:`ALPHA_CUT_DISCARD`, but it allows displaying translucent areas and smooth edges while using proper sorting. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SpriteBase3D_property_alpha_cut: -- :ref:`AlphaCutMode` **alpha_cut** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_alpha_cut_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_alpha_cut_mode() | -+-----------+---------------------------+ +:ref:`AlphaCutMode` **alpha_cut** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_alpha_cut_mode** **(** :ref:`AlphaCutMode` value **)** +- :ref:`AlphaCutMode` **get_alpha_cut_mode** **(** **)** The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_axis: -- Vector3.Axis **axis** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``2`` | -+-----------+-----------------+ -| *Setter* | set_axis(value) | -+-----------+-----------------+ -| *Getter* | get_axis() | -+-----------+-----------------+ +Vector3.Axis **axis** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_axis** **(** Vector3.Axis value **)** +- Vector3.Axis **get_axis** **(** **)** The direction in which the front of the texture faces. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_billboard: -- :ref:`BillboardMode` **billboard** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_billboard_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_billboard_mode() | -+-----------+---------------------------+ +:ref:`BillboardMode` **billboard** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_billboard_mode** **(** :ref:`BillboardMode` value **)** +- :ref:`BillboardMode` **get_billboard_mode** **(** **)** The billboard mode to use for the sprite. See :ref:`BillboardMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_centered: -- :ref:`bool` **centered** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_centered(value) | -+-----------+---------------------+ -| *Getter* | is_centered() | -+-----------+---------------------+ +:ref:`bool` **centered** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_centered** **(** :ref:`bool` value **)** +- :ref:`bool` **is_centered** **(** **)** If ``true``, texture will be centered. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_double_sided: -- :ref:`bool` **double_sided** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **double_sided** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, texture can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_fixed_size: -- :ref:`bool` **fixed_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **fixed_size** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, the label is rendered at the same size regardless of distance. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_flip_h: -- :ref:`bool` **flip_h** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_h(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_h() | -+-----------+-------------------+ +:ref:`bool` **flip_h** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_h** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_h** **(** **)** If ``true``, texture is flipped horizontally. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_flip_v: -- :ref:`bool` **flip_v** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_v(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_v() | -+-----------+-------------------+ +:ref:`bool` **flip_v** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_v** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_v** **(** **)** If ``true``, texture is flipped vertically. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_modulate: -- :ref:`Color` **modulate** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_modulate(value) | -+-----------+-----------------------+ -| *Getter* | get_modulate() | -+-----------+-----------------------+ +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_modulate** **(** :ref:`Color` value **)** +- :ref:`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 light. -\ **Note:** If a :ref:`GeometryInstance3D.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` will be ignored. For 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. +\ **Note:** If a :ref:`GeometryInstance3D.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` will be ignored. For 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. + +.. rst-class:: classref-item-separator ---- .. _class_SpriteBase3D_property_no_depth_test: -- :ref:`bool` **no_depth_test** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **no_depth_test** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, depth testing is disabled and the object will be drawn in render order. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The texture's drawing offset. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_pixel_size: -- :ref:`float` **pixel_size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.01`` | -+-----------+-----------------------+ -| *Setter* | set_pixel_size(value) | -+-----------+-----------------------+ -| *Getter* | get_pixel_size() | -+-----------+-----------------------+ +:ref:`float` **pixel_size** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_pixel_size** **(** :ref:`float` value **)** +- :ref:`float` **get_pixel_size** **(** **)** The size of one pixel's width on the sprite to scale it in 3D. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_render_priority: -- :ref:`int` **render_priority** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_render_priority(value) | -+-----------+----------------------------+ -| *Getter* | get_render_priority() | -+-----------+----------------------------+ +:ref:`int` **render_priority** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_render_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_render_priority** **(** **)** Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects. @@ -335,84 +412,107 @@ Sets the render priority for the sprite. Higher priority objects will be sorted \ **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). +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_shaded: -- :ref:`bool` **shaded** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **shaded** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, the :ref:`Light3D` in the :ref:`Environment` has effects on the sprite. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_texture_filter: -- :ref:`TextureFilter` **texture_filter** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``3`` | -+-----------+---------------------------+ -| *Setter* | set_texture_filter(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_filter() | -+-----------+---------------------------+ +:ref:`TextureFilter` **texture_filter** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** +- :ref:`TextureFilter` **get_texture_filter** **(** **)** Filter flags for the texture. See :ref:`TextureFilter` for options. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_property_transparent: -- :ref:`bool` **transparent** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_draw_flag(value) | -+-----------+----------------------+ -| *Getter* | get_draw_flag() | -+-----------+----------------------+ +:ref:`bool` **transparent** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| If ``true``, the texture's transparency and the opacity are used to make those parts of the sprite invisible. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_SpriteBase3D_method_generate_triangle_mesh: -- :ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| Returns a :ref:`TriangleMesh` with the sprite's vertices following its current configuration (such as its :ref:`axis` and :ref:`pixel_size`). +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_method_get_draw_flag: -- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| Returns the value of the specified flag. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_method_get_item_rect: -- :ref:`Rect2` **get_item_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_item_rect** **(** **)** |const| Returns the rectangle representing this sprite. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteBase3D_method_set_draw_flag: -- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** If ``true``, the specified flag will be enabled. See :ref:`DrawFlags` for a list of flags. diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst index 755c4645c..24a0f4c79 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -14,176 +14,251 @@ SpriteFrames Sprite frame library for AnimatedSprite2D and AnimatedSprite3D. +.. rst-class:: classref-introduction-group + Description ----------- Sprite frame library for an :ref:`AnimatedSprite2D` or :ref:`AnimatedSprite3D` node. Contains frames and animation data for playback. -\ **Note:** You can associate a set of normal or specular maps by creating additional ``SpriteFrames`` resources with a ``_normal`` or ``_specular`` suffix. For example, having 3 ``SpriteFrames`` resources ``run``, ``run_normal``, and ``run_specular`` will make it so the ``run`` animation uses normal and specular maps. +\ **Note:** You can associate a set of normal or specular maps by creating additional **SpriteFrames** resources with a ``_normal`` or ``_specular`` suffix. For example, having 3 **SpriteFrames** resources ``run``, ``run_normal``, and ``run_specular`` will make it so the ``run`` animation uses normal and specular maps. + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_animation` **(** :ref:`StringName` anim **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_frame` **(** :ref:`StringName` anim, :ref:`Texture2D` frame, :ref:`int` at_position=-1 **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** :ref:`StringName` anim **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_all` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_animation_loop` **(** :ref:`StringName` anim **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_animation_names` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_animation_speed` **(** :ref:`StringName` anim **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_frame` **(** :ref:`StringName` anim, :ref:`int` idx **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_frame_count` **(** :ref:`StringName` anim **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` anim **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_animation` **(** :ref:`StringName` anim **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_frame` **(** :ref:`StringName` anim, :ref:`int` idx **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_animation` **(** :ref:`StringName` anim, :ref:`StringName` newname **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_animation_loop` **(** :ref:`StringName` anim, :ref:`bool` loop **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_animation_speed` **(** :ref:`StringName` anim, :ref:`float` speed **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_frame` **(** :ref:`StringName` anim, :ref:`int` idx, :ref:`Texture2D` txt **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_animation` **(** :ref:`StringName` anim **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_frame` **(** :ref:`StringName` anim, :ref:`Texture2D` frame, :ref:`int` at_position=-1 **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** :ref:`StringName` anim **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_all` **(** **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_animation_loop` **(** :ref:`StringName` anim **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_animation_names` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_animation_speed` **(** :ref:`StringName` anim **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_frame` **(** :ref:`StringName` anim, :ref:`int` idx **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frame_count` **(** :ref:`StringName` anim **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` anim **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_animation` **(** :ref:`StringName` anim **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_frame` **(** :ref:`StringName` anim, :ref:`int` idx **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_animation` **(** :ref:`StringName` anim, :ref:`StringName` newname **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_animation_loop` **(** :ref:`StringName` anim, :ref:`bool` loop **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_animation_speed` **(** :ref:`StringName` anim, :ref:`float` speed **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_frame` **(** :ref:`StringName` anim, :ref:`int` idx, :ref:`Texture2D` txt **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SpriteFrames_method_add_animation: -- void **add_animation** **(** :ref:`StringName` anim **)** +.. rst-class:: classref-method + +void **add_animation** **(** :ref:`StringName` anim **)** Adds a new animation to the library. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_add_frame: -- void **add_frame** **(** :ref:`StringName` anim, :ref:`Texture2D` frame, :ref:`int` at_position=-1 **)** +.. rst-class:: classref-method + +void **add_frame** **(** :ref:`StringName` anim, :ref:`Texture2D` frame, :ref:`int` at_position=-1 **)** Adds a frame to the given animation. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_clear: -- void **clear** **(** :ref:`StringName` anim **)** +.. rst-class:: classref-method + +void **clear** **(** :ref:`StringName` anim **)** Removes all frames from the given animation. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_clear_all: -- void **clear_all** **(** **)** +.. rst-class:: classref-method + +void **clear_all** **(** **)** Removes all animations. A "default" animation will be created. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_get_animation_loop: -- :ref:`bool` **get_animation_loop** **(** :ref:`StringName` anim **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_animation_loop** **(** :ref:`StringName` anim **)** |const| Returns ``true`` if the given animation is configured to loop when it finishes playing. Otherwise, returns ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_get_animation_names: -- :ref:`PackedStringArray` **get_animation_names** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_animation_names** **(** **)** |const| Returns an array containing the names associated to each animation. Values are placed in alphabetical order. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_get_animation_speed: -- :ref:`float` **get_animation_speed** **(** :ref:`StringName` anim **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_animation_speed** **(** :ref:`StringName` anim **)** |const| The animation's speed in frames per second. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_get_frame: -- :ref:`Texture2D` **get_frame** **(** :ref:`StringName` anim, :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_frame** **(** :ref:`StringName` anim, :ref:`int` idx **)** |const| Returns the animation's selected frame. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_get_frame_count: -- :ref:`int` **get_frame_count** **(** :ref:`StringName` anim **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_frame_count** **(** :ref:`StringName` anim **)** |const| Returns the number of frames in the animation. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_has_animation: -- :ref:`bool` **has_animation** **(** :ref:`StringName` anim **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_animation** **(** :ref:`StringName` anim **)** |const| If ``true``, the named animation exists. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_remove_animation: -- void **remove_animation** **(** :ref:`StringName` anim **)** +.. rst-class:: classref-method + +void **remove_animation** **(** :ref:`StringName` anim **)** Removes the given animation. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_remove_frame: -- void **remove_frame** **(** :ref:`StringName` anim, :ref:`int` idx **)** +.. rst-class:: classref-method + +void **remove_frame** **(** :ref:`StringName` anim, :ref:`int` idx **)** Removes the animation's selected frame. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_rename_animation: -- void **rename_animation** **(** :ref:`StringName` anim, :ref:`StringName` newname **)** +.. rst-class:: classref-method + +void **rename_animation** **(** :ref:`StringName` anim, :ref:`StringName` newname **)** Changes the animation's name to ``newname``. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_set_animation_loop: -- void **set_animation_loop** **(** :ref:`StringName` anim, :ref:`bool` loop **)** +.. rst-class:: classref-method + +void **set_animation_loop** **(** :ref:`StringName` anim, :ref:`bool` loop **)** If ``true``, the animation will loop. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_set_animation_speed: -- void **set_animation_speed** **(** :ref:`StringName` anim, :ref:`float` speed **)** +.. rst-class:: classref-method + +void **set_animation_speed** **(** :ref:`StringName` anim, :ref:`float` speed **)** The animation's speed in frames per second. +.. rst-class:: classref-item-separator + ---- .. _class_SpriteFrames_method_set_frame: -- void **set_frame** **(** :ref:`StringName` anim, :ref:`int` idx, :ref:`Texture2D` txt **)** +.. rst-class:: classref-method + +void **set_frame** **(** :ref:`StringName` anim, :ref:`int` idx, :ref:`Texture2D` txt **)** Sets the texture of the given frame. diff --git a/classes/class_standardmaterial3d.rst b/classes/class_standardmaterial3d.rst index f54272985..2fecd2f8c 100644 --- a/classes/class_standardmaterial3d.rst +++ b/classes/class_standardmaterial3d.rst @@ -14,10 +14,14 @@ StandardMaterial3D Physically based rendering (PBR) material that can be applied to 3D objects. +.. rst-class:: classref-introduction-group + Description ----------- -``StandardMaterial3D``'s properties are inherited from :ref:`BaseMaterial3D`. ``StandardMaterial3D`` uses separate textures for ambient occlusion, roughness and metallic maps. To use a single ORM map for all 3 textures, use an :ref:`ORMMaterial3D` instead. +**StandardMaterial3D**'s properties are inherited from :ref:`BaseMaterial3D`. **StandardMaterial3D** uses separate textures for ambient occlusion, roughness and metallic maps. To use a single ORM map for all 3 textures, use an :ref:`ORMMaterial3D` instead. + +.. rst-class:: classref-introduction-group Tutorials --------- diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index a6eef6af6..b095b6b06 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -16,6 +16,8 @@ StaticBody2D Physics body for 2D physics which is static or moves only by script. Useful for floor and walls. +.. rst-class:: classref-introduction-group + Description ----------- @@ -29,61 +31,75 @@ They have extra functionalities to move and affect other bodies: \ **Constant velocity:** When :ref:`constant_linear_velocity` or :ref:`constant_angular_velocity` is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`constant_angular_velocity` | ``0.0`` | -+-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`constant_linear_velocity` | ``Vector2(0, 0)`` | -+-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ -| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | -+-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`constant_angular_velocity` | ``0.0`` | + +-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`constant_linear_velocity` | ``Vector2(0, 0)`` | + +-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | + +-----------------------------------------------+-----------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StaticBody2D_property_constant_angular_velocity: -- :ref:`float` **constant_angular_velocity** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------------+ -| *Setter* | set_constant_angular_velocity(value) | -+-----------+--------------------------------------+ -| *Getter* | get_constant_angular_velocity() | -+-----------+--------------------------------------+ +:ref:`float` **constant_angular_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_constant_angular_velocity** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_StaticBody2D_property_constant_linear_velocity: -- :ref:`Vector2` **constant_linear_velocity** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------------------------+ -| *Setter* | set_constant_linear_velocity(value) | -+-----------+-------------------------------------+ -| *Getter* | get_constant_linear_velocity() | -+-----------+-------------------------------------+ +:ref:`Vector2` **constant_linear_velocity** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant_linear_velocity** **(** :ref:`Vector2` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_StaticBody2D_property_physics_material_override: -- :ref:`PhysicsMaterial` **physics_material_override** +.. rst-class:: classref-property -+----------+--------------------------------------+ -| *Setter* | set_physics_material_override(value) | -+----------+--------------------------------------+ -| *Getter* | get_physics_material_override() | -+----------+--------------------------------------+ +:ref:`PhysicsMaterial` **physics_material_override** + +.. rst-class:: classref-property-setget + +- void **set_physics_material_override** **(** :ref:`PhysicsMaterial` value **)** +- :ref:`PhysicsMaterial` **get_physics_material_override** **(** **)** The physics material override for the body. diff --git a/classes/class_staticbody3d.rst b/classes/class_staticbody3d.rst index 24a15df9c..a678fce74 100644 --- a/classes/class_staticbody3d.rst +++ b/classes/class_staticbody3d.rst @@ -16,6 +16,8 @@ StaticBody3D Physics body for 3D physics which is static or moves only by script. Useful for floor and walls. +.. rst-class:: classref-introduction-group + Description ----------- @@ -29,6 +31,8 @@ They have extra functionalities to move and affect other bodies: \ **Constant velocity:** When :ref:`constant_linear_velocity` or :ref:`constant_angular_velocity` is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -38,61 +42,75 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`constant_angular_velocity` | ``Vector3(0, 0, 0)`` | -+-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`constant_linear_velocity` | ``Vector3(0, 0, 0)`` | -+-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ -| :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | -+-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`constant_angular_velocity` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`constant_linear_velocity` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material_override` | | + +-----------------------------------------------+-----------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StaticBody3D_property_constant_angular_velocity: -- :ref:`Vector3` **constant_angular_velocity** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+--------------------------------------+ -| *Setter* | set_constant_angular_velocity(value) | -+-----------+--------------------------------------+ -| *Getter* | get_constant_angular_velocity() | -+-----------+--------------------------------------+ +:ref:`Vector3` **constant_angular_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant_angular_velocity** **(** :ref:`Vector3` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_StaticBody3D_property_constant_linear_velocity: -- :ref:`Vector3` **constant_linear_velocity** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-------------------------------------+ -| *Setter* | set_constant_linear_velocity(value) | -+-----------+-------------------------------------+ -| *Getter* | get_constant_linear_velocity() | -+-----------+-------------------------------------+ +:ref:`Vector3` **constant_linear_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant_linear_velocity** **(** :ref:`Vector3` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_StaticBody3D_property_physics_material_override: -- :ref:`PhysicsMaterial` **physics_material_override** +.. rst-class:: classref-property -+----------+--------------------------------------+ -| *Setter* | set_physics_material_override(value) | -+----------+--------------------------------------+ -| *Getter* | get_physics_material_override() | -+----------+--------------------------------------+ +:ref:`PhysicsMaterial` **physics_material_override** + +.. rst-class:: classref-property-setget + +- void **set_physics_material_override** **(** :ref:`PhysicsMaterial` value **)** +- :ref:`PhysicsMaterial` **get_physics_material_override** **(** **)** The physics material override for the body. diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 2a6dfd0ef..33281f90d 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -16,6 +16,8 @@ StreamPeer Abstraction and base class for stream-based protocols. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,297 +25,416 @@ StreamPeer is an abstraction and base class for stream-based protocols (such as \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+---------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`big_endian` | ``false`` | -+-------------------------+---------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`big_endian` | ``false`` | + +-------------------------+---------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_16` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_32` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_64` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_8` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_available_bytes` **(** **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_data` **(** :ref:`int` bytes **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_double` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_float` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_partial_data` **(** :ref:`int` bytes **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes=-1 **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u16` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u32` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u64` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u8` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes=-1 **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_16` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_32` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_64` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_8` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`put_data` **(** :ref:`PackedByteArray` data **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_double` **(** :ref:`float` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_float` **(** :ref:`float` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`put_partial_data` **(** :ref:`PackedByteArray` data **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_string` **(** :ref:`String` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u16` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u32` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u64` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u8` **(** :ref:`int` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_utf8_string` **(** :ref:`String` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_16` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_32` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_64` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_8` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_available_bytes` **(** **)** |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_data` **(** :ref:`int` bytes **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_double` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_float` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_partial_data` **(** :ref:`int` bytes **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes=-1 **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_u16` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_u32` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_u64` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_u8` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes=-1 **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_16` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_32` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_64` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_8` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`put_data` **(** :ref:`PackedByteArray` data **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_double` **(** :ref:`float` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_float` **(** :ref:`float` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`put_partial_data` **(** :ref:`PackedByteArray` data **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_string` **(** :ref:`String` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_u16` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_u32` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_u64` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_u8` **(** :ref:`int` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_utf8_string` **(** :ref:`String` value **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`put_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StreamPeer_property_big_endian: -- :ref:`bool` **big_endian** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_big_endian(value) | -+-----------+-------------------------+ -| *Getter* | is_big_endian_enabled() | -+-----------+-------------------------+ +:ref:`bool` **big_endian** = ``false`` -If ``true``, this ``StreamPeer`` will using big-endian format for encoding and decoding. +.. rst-class:: classref-property-setget + +- void **set_big_endian** **(** :ref:`bool` value **)** +- :ref:`bool` **is_big_endian_enabled** **(** **)** + +If ``true``, this **StreamPeer** will using big-endian format for encoding and decoding. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_StreamPeer_method_get_16: -- :ref:`int` **get_16** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_16** **(** **)** Gets a signed 16-bit value from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_32: -- :ref:`int` **get_32** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_32** **(** **)** Gets a signed 32-bit value from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_64: -- :ref:`int` **get_64** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_64** **(** **)** Gets a signed 64-bit value from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_8: -- :ref:`int` **get_8** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_8** **(** **)** Gets a signed byte from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_available_bytes: -- :ref:`int` **get_available_bytes** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of bytes this ``StreamPeer`` has available. +:ref:`int` **get_available_bytes** **(** **)** |const| + +Returns the number of bytes this **StreamPeer** has available. + +.. rst-class:: classref-item-separator ---- .. _class_StreamPeer_method_get_data: -- :ref:`Array` **get_data** **(** :ref:`int` bytes **)** +.. rst-class:: classref-method + +:ref:`Array` **get_data** **(** :ref:`int` bytes **)** 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` code and a data array. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_double: -- :ref:`float` **get_double** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **get_double** **(** **)** Gets a double-precision float from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_float: -- :ref:`float` **get_float** **(** **)** +.. rst-class:: classref-method + +:ref:`float` **get_float** **(** **)** Gets a single-precision float from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_partial_data: -- :ref:`Array` **get_partial_data** **(** :ref:`int` bytes **)** +.. rst-class:: classref-method + +:ref:`Array` **get_partial_data** **(** :ref:`int` bytes **)** 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` code, and a data array. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_string: -- :ref:`String` **get_string** **(** :ref:`int` bytes=-1 **)** +.. rst-class:: classref-method + +:ref:`String` **get_string** **(** :ref:`int` bytes=-1 **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_u16: -- :ref:`int` **get_u16** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_u16** **(** **)** Gets an unsigned 16-bit value from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_u32: -- :ref:`int` **get_u32** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_u32** **(** **)** Gets an unsigned 32-bit value from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_u64: -- :ref:`int` **get_u64** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_u64** **(** **)** Gets an unsigned 64-bit value from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_u8: -- :ref:`int` **get_u8** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_u8** **(** **)** Gets an unsigned byte from the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_utf8_string: -- :ref:`String` **get_utf8_string** **(** :ref:`int` bytes=-1 **)** +.. rst-class:: classref-method + +:ref:`String` **get_utf8_string** **(** :ref:`int` bytes=-1 **)** Gets an 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`. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_get_var: -- :ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** +.. rst-class:: classref-method + +:ref:`Variant` **get_var** **(** :ref:`bool` allow_objects=false **)** Gets a Variant from the stream. If ``allow_objects`` is ``true``, decoding objects is allowed. \ **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_16: -- void **put_16** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_16** **(** :ref:`int` value **)** Puts a signed 16-bit value into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_32: -- void **put_32** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_32** **(** :ref:`int` value **)** Puts a signed 32-bit value into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_64: -- void **put_64** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_64** **(** :ref:`int` value **)** Puts a signed 64-bit value into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_8: -- void **put_8** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_8** **(** :ref:`int` value **)** Puts a signed byte into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_data: -- :ref:`Error` **put_data** **(** :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +:ref:`Error` **put_data** **(** :ref:`PackedByteArray` data **)** Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an :ref:`Error` code. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_double: -- void **put_double** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +void **put_double** **(** :ref:`float` value **)** Puts a double-precision float into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_float: -- void **put_float** **(** :ref:`float` value **)** +.. rst-class:: classref-method + +void **put_float** **(** :ref:`float` value **)** Puts a single-precision float into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_partial_data: -- :ref:`Array` **put_partial_data** **(** :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +:ref:`Array` **put_partial_data** **(** :ref:`PackedByteArray` 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` code and an integer, describing how much data was actually sent. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_string: -- void **put_string** **(** :ref:`String` value **)** +.. rst-class:: classref-method + +void **put_string** **(** :ref:`String` value **)** Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. @@ -332,43 +453,63 @@ Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsign +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_u16: -- void **put_u16** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_u16** **(** :ref:`int` value **)** Puts an unsigned 16-bit value into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_u32: -- void **put_u32** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_u32** **(** :ref:`int` value **)** Puts an unsigned 32-bit value into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_u64: -- void **put_u64** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_u64** **(** :ref:`int` value **)** Puts an unsigned 64-bit value into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_u8: -- void **put_u8** **(** :ref:`int` value **)** +.. rst-class:: classref-method + +void **put_u8** **(** :ref:`int` value **)** Puts an unsigned byte into the stream. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_utf8_string: -- void **put_utf8_string** **(** :ref:`String` value **)** +.. rst-class:: classref-method + +void **put_utf8_string** **(** :ref:`String` value **)** Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. @@ -387,11 +528,15 @@ Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsig +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeer_method_put_var: -- void **put_var** **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** +.. rst-class:: classref-method + +void **put_var** **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** Puts a Variant into the stream. If ``full_objects`` is ``true`` encoding objects is allowed (and can potentially include code). diff --git a/classes/class_streampeerbuffer.rst b/classes/class_streampeerbuffer.rst index e1829f383..e0749731c 100644 --- a/classes/class_streampeerbuffer.rst +++ b/classes/class_streampeerbuffer.rst @@ -14,100 +14,145 @@ StreamPeerBuffer Data buffer stream peer. +.. rst-class:: classref-introduction-group + Description ----------- Data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, :ref:`FileAccess` can be used directly. -A ``StreamPeerBuffer`` object keeps an internal cursor which is the offset in bytes to the start of the buffer. Get and put operations are performed at the cursor position and will move the cursor accordingly. +A **StreamPeerBuffer** object keeps an internal cursor which is the offset in bytes to the start of the buffer. Get and put operations are performed at the cursor position and will move the cursor accordingly. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`PackedByteArray` | :ref:`data_array` | ``PackedByteArray()`` | -+-----------------------------------------------+---------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray` | :ref:`data_array` | ``PackedByteArray()`` | + +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+--------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`StreamPeerBuffer` | :ref:`duplicate` **(** **)** |const| | -+-------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_position` **(** **)** |const| | -+-------------------------------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_size` **(** **)** |const| | -+-------------------------------------------------+--------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` size **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------+ -| void | :ref:`seek` **(** :ref:`int` position **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`StreamPeerBuffer` | :ref:`duplicate` **(** **)** |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_position` **(** **)** |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_size` **(** **)** |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + | void | :ref:`resize` **(** :ref:`int` size **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + | void | :ref:`seek` **(** :ref:`int` position **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StreamPeerBuffer_property_data_array: -- :ref:`PackedByteArray` **data_array** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``PackedByteArray()`` | -+-----------+-----------------------+ -| *Setter* | set_data_array(value) | -+-----------+-----------------------+ -| *Getter* | get_data_array() | -+-----------+-----------------------+ +:ref:`PackedByteArray` **data_array** = ``PackedByteArray()`` + +.. rst-class:: classref-property-setget + +- void **set_data_array** **(** :ref:`PackedByteArray` value **)** +- :ref:`PackedByteArray` **get_data_array** **(** **)** The underlying data buffer. Setting this value resets the cursor. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_StreamPeerBuffer_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the :ref:`data_array` and resets the cursor. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerBuffer_method_duplicate: -- :ref:`StreamPeerBuffer` **duplicate** **(** **)** |const| +.. rst-class:: classref-method -Returns a new ``StreamPeerBuffer`` with the same :ref:`data_array` content. +:ref:`StreamPeerBuffer` **duplicate** **(** **)** |const| + +Returns a new **StreamPeerBuffer** with the same :ref:`data_array` content. + +.. rst-class:: classref-item-separator ---- .. _class_StreamPeerBuffer_method_get_position: -- :ref:`int` **get_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_position** **(** **)** |const| Returns the current cursor position. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerBuffer_method_get_size: -- :ref:`int` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_size** **(** **)** |const| Returns the size of :ref:`data_array`. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerBuffer_method_resize: -- void **resize** **(** :ref:`int` size **)** +.. rst-class:: classref-method + +void **resize** **(** :ref:`int` size **)** Resizes the :ref:`data_array`. This *doesn't* update the cursor. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerBuffer_method_seek: -- void **seek** **(** :ref:`int` position **)** +.. rst-class:: classref-method + +void **seek** **(** :ref:`int` position **)** Moves the cursor to the specified position. ``position`` must be a valid index of :ref:`data_array`. diff --git a/classes/class_streampeerextension.rst b/classes/class_streampeerextension.rst index ba79c56ab..8dbb4e6a8 100644 --- a/classes/class_streampeerextension.rst +++ b/classes/class_streampeerextension.rst @@ -16,67 +16,96 @@ StreamPeerExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_available_bytes` **(** **)** |virtual| |const| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_get_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_get_partial_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_put_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_put_partial_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_bytes` **(** **)** |virtual| |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_partial_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_partial_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_StreamPeerExtension_method__get_available_bytes: -- :ref:`int` **_get_available_bytes** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_available_bytes** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerExtension_method__get_data: -- :ref:`Error` **_get_data** **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_get_data** **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerExtension_method__get_partial_data: -- :ref:`Error` **_get_partial_data** **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_get_partial_data** **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerExtension_method__put_data: -- :ref:`Error` **_put_data** **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_put_data** **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerExtension_method__put_partial_data: -- :ref:`Error` **_put_partial_data** **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_put_partial_data** **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| .. container:: contribute diff --git a/classes/class_streampeergzip.rst b/classes/class_streampeergzip.rst index 6a6dba5e6..87ac4dbde 100644 --- a/classes/class_streampeergzip.rst +++ b/classes/class_streampeergzip.rst @@ -14,6 +14,8 @@ StreamPeerGZIP Stream peer handling GZIP and deflate compression/decompresison. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,49 +23,74 @@ This class allows to compress or decompress data using GZIP/deflate in a streami After starting the stream via :ref:`start_compression` (or :ref:`start_decompression`), calling :ref:`StreamPeer.put_partial_data` on this stream will compress (or decompress) the data, writing it to the internal buffer. Calling :ref:`StreamPeer.get_available_bytes` will return the pending bytes in the internal buffer, and :ref:`StreamPeer.get_partial_data` will retrieve the compressed (or decompressed) bytes from it. When the stream is over, you must call :ref:`finish` to ensure the internal buffer is properly flushed (make sure to call :ref:`StreamPeer.get_available_bytes` on last time to check if more data needs to be read after that). +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`finish` **(** **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`start_compression` **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`start_decompression` **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`finish` **(** **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`start_compression` **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`start_decompression` **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_StreamPeerGZIP_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears this stream, resetting the internal state. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerGZIP_method_finish: -- :ref:`Error` **finish** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **finish** **(** **)** Finalizes the stream, compressing or decompressing any buffered chunk left. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerGZIP_method_start_compression: -- :ref:`Error` **start_compression** **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** +.. rst-class:: classref-method + +:ref:`Error` **start_compression** **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** Start the stream in compression mode with the given ``buffer_size``, if ``use_deflate`` is ``true`` uses deflate instead of GZIP. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerGZIP_method_start_decompression: -- :ref:`Error` **start_decompression** **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** +.. rst-class:: classref-method + +:ref:`Error` **start_decompression** **(** :ref:`bool` use_deflate=false, :ref:`int` buffer_size=65535 **)** Start the stream in decompression mode with the given ``buffer_size``, if ``use_deflate`` is ``true`` uses deflate instead of GZIP. diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index 73cb36a11..a7c502b17 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -14,6 +14,8 @@ StreamPeerTCP TCP stream peer. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,124 +23,193 @@ TCP stream peer. This object can be used to connect to TCP servers, or also is r \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-reftable-group + Methods ------- -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`bind` **(** :ref:`int` port, :ref:`String` host="*" **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_to_host` **(** :ref:`String` host, :ref:`int` port **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_from_host` **(** **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_connected_host` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connected_port` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_local_port` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Status` | :ref:`get_status` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`poll` **(** **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_no_delay` **(** :ref:`bool` enabled **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`bind` **(** :ref:`int` port, :ref:`String` host="*" **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_to_host` **(** :ref:`String` host, :ref:`int` port **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect_from_host` **(** **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_connected_host` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connected_port` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_local_port` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`get_status` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`poll` **(** **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_no_delay` **(** :ref:`bool` enabled **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_StreamPeerTCP_Status: -.. _class_StreamPeerTCP_constant_STATUS_NONE: - -.. _class_StreamPeerTCP_constant_STATUS_CONNECTING: - -.. _class_StreamPeerTCP_constant_STATUS_CONNECTED: - -.. _class_StreamPeerTCP_constant_STATUS_ERROR: +.. rst-class:: classref-enumeration enum **Status**: -- **STATUS_NONE** = **0** --- The initial status of the ``StreamPeerTCP``. This is also the status after disconnecting. +.. _class_StreamPeerTCP_constant_STATUS_NONE: -- **STATUS_CONNECTING** = **1** --- A status representing a ``StreamPeerTCP`` that is connecting to a host. +.. rst-class:: classref-enumeration-constant -- **STATUS_CONNECTED** = **2** --- A status representing a ``StreamPeerTCP`` that is connected to a host. +:ref:`Status` **STATUS_NONE** = ``0`` -- **STATUS_ERROR** = **3** --- A status representing a ``StreamPeerTCP`` in error state. +The initial status of the **StreamPeerTCP**. This is also the status after disconnecting. + +.. _class_StreamPeerTCP_constant_STATUS_CONNECTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CONNECTING** = ``1`` + +A status representing a **StreamPeerTCP** that is connecting to a host. + +.. _class_StreamPeerTCP_constant_STATUS_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CONNECTED** = ``2`` + +A status representing a **StreamPeerTCP** that is connected to a host. + +.. _class_StreamPeerTCP_constant_STATUS_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_ERROR** = ``3`` + +A status representing a **StreamPeerTCP** in error state. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_StreamPeerTCP_method_bind: -- :ref:`Error` **bind** **(** :ref:`int` port, :ref:`String` host="*" **)** +.. rst-class:: classref-method + +:ref:`Error` **bind** **(** :ref:`int` port, :ref:`String` host="*" **)** Opens the TCP socket, and binds it to the specified local address. This method is generally not needed, and only used to force the subsequent call to :ref:`connect_to_host` to use the specified ``host`` and ``port`` as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_connect_to_host: -- :ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port **)** +.. rst-class:: classref-method + +:ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port **)** Connects to the specified ``host:port`` pair. A hostname will be resolved if valid. Returns :ref:`@GlobalScope.OK` on success. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_disconnect_from_host: -- void **disconnect_from_host** **(** **)** +.. rst-class:: classref-method + +void **disconnect_from_host** **(** **)** Disconnects from host. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_get_connected_host: -- :ref:`String` **get_connected_host** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_connected_host** **(** **)** |const| Returns the IP of this peer. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_get_connected_port: -- :ref:`int` **get_connected_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_connected_port** **(** **)** |const| Returns the port of this peer. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_get_local_port: -- :ref:`int` **get_local_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_local_port** **(** **)** |const| Returns the local port to which this peer is bound. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_get_status: -- :ref:`Status` **get_status** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Status` **get_status** **(** **)** |const| Returns the status of the connection, see :ref:`Status`. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_poll: -- :ref:`Error` **poll** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **poll** **(** **)** Poll the socket, updating its state. See :ref:`get_status`. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTCP_method_set_no_delay: -- void **set_no_delay** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_no_delay** **(** :ref:`bool` enabled **)** 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 `__. diff --git a/classes/class_streampeertls.rst b/classes/class_streampeertls.rst index 0b107cadd..248029edb 100644 --- a/classes/class_streampeertls.rst +++ b/classes/class_streampeertls.rst @@ -14,6 +14,8 @@ StreamPeerTLS TLS stream peer. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,129 +23,202 @@ TLS stream peer. This object can be used to connect to an TLS server or accept a \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`TLS certificates <../tutorials/networking/ssl_certificates>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+----------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`blocking_handshake` | ``true`` | -+-------------------------+----------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`blocking_handshake` | ``true`` | + +-------------------------+----------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`accept_stream` **(** :ref:`StreamPeer` stream, :ref:`CryptoKey` private_key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** | -+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_to_stream` **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** | -+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_from_stream` **(** **)** | -+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Status` | :ref:`get_status` **(** **)** |const| | -+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StreamPeer` | :ref:`get_stream` **(** **)** |const| | -+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`poll` **(** **)** | -+------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`accept_stream` **(** :ref:`StreamPeer` stream, :ref:`CryptoKey` private_key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_to_stream` **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect_from_stream` **(** **)** | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status` | :ref:`get_status` **(** **)** |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StreamPeer` | :ref:`get_stream` **(** **)** |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`poll` **(** **)** | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_StreamPeerTLS_Status: -.. _class_StreamPeerTLS_constant_STATUS_DISCONNECTED: - -.. _class_StreamPeerTLS_constant_STATUS_HANDSHAKING: - -.. _class_StreamPeerTLS_constant_STATUS_CONNECTED: - -.. _class_StreamPeerTLS_constant_STATUS_ERROR: - -.. _class_StreamPeerTLS_constant_STATUS_ERROR_HOSTNAME_MISMATCH: +.. rst-class:: classref-enumeration enum **Status**: -- **STATUS_DISCONNECTED** = **0** --- A status representing a ``StreamPeerTLS`` that is disconnected. +.. _class_StreamPeerTLS_constant_STATUS_DISCONNECTED: -- **STATUS_HANDSHAKING** = **1** --- A status representing a ``StreamPeerTLS`` during handshaking. +.. rst-class:: classref-enumeration-constant -- **STATUS_CONNECTED** = **2** --- A status representing a ``StreamPeerTLS`` that is connected to a host. +:ref:`Status` **STATUS_DISCONNECTED** = ``0`` -- **STATUS_ERROR** = **3** --- A status representing a ``StreamPeerTLS`` in error state. +A status representing a **StreamPeerTLS** that is disconnected. -- **STATUS_ERROR_HOSTNAME_MISMATCH** = **4** --- An error status that shows a mismatch in the TLS certificate domain presented by the host and the domain requested for validation. +.. _class_StreamPeerTLS_constant_STATUS_HANDSHAKING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_HANDSHAKING** = ``1`` + +A status representing a **StreamPeerTLS** during handshaking. + +.. _class_StreamPeerTLS_constant_STATUS_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_CONNECTED** = ``2`` + +A status representing a **StreamPeerTLS** that is connected to a host. + +.. _class_StreamPeerTLS_constant_STATUS_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_ERROR** = ``3`` + +A status representing a **StreamPeerTLS** in error state. + +.. _class_StreamPeerTLS_constant_STATUS_ERROR_HOSTNAME_MISMATCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Status` **STATUS_ERROR_HOSTNAME_MISMATCH** = ``4`` + +An error status that shows a mismatch in the TLS certificate domain presented by the host and the domain requested for validation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StreamPeerTLS_property_blocking_handshake: -- :ref:`bool` **blocking_handshake** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------------+ -| *Setter* | set_blocking_handshake_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_blocking_handshake_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **blocking_handshake** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_blocking_handshake_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_blocking_handshake_enabled** **(** **)** .. 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 ------------------- .. _class_StreamPeerTLS_method_accept_stream: -- :ref:`Error` **accept_stream** **(** :ref:`StreamPeer` stream, :ref:`CryptoKey` private_key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** +.. rst-class:: classref-method + +:ref:`Error` **accept_stream** **(** :ref:`StreamPeer` stream, :ref:`CryptoKey` private_key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** Accepts a peer connection as a server using the given ``private_key`` and providing the given ``certificate`` to the client. You can pass the optional ``chain`` parameter to provide additional CA chain information along with the certificate. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTLS_method_connect_to_stream: -- :ref:`Error` **connect_to_stream** **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** +.. rst-class:: classref-method -Connects to a peer using an underlying :ref:`StreamPeer` ``stream``. If ``validate_certs`` is ``true``, ``StreamPeerTLS`` will validate that the certificate presented by the peer matches the ``for_hostname``. +:ref:`Error` **connect_to_stream** **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** + +Connects to a peer using an underlying :ref:`StreamPeer` ``stream``. If ``validate_certs`` is ``true``, **StreamPeerTLS** will validate that the certificate presented by the peer matches the ``for_hostname``. \ **Note:** Specifying a custom ``valid_certificate`` is not supported in Web exports due to browsers restrictions. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTLS_method_disconnect_from_stream: -- void **disconnect_from_stream** **(** **)** +.. rst-class:: classref-method + +void **disconnect_from_stream** **(** **)** Disconnects from host. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTLS_method_get_status: -- :ref:`Status` **get_status** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Status` **get_status** **(** **)** |const| Returns the status of the connection. See :ref:`Status` for values. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTLS_method_get_stream: -- :ref:`StreamPeer` **get_stream** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StreamPeer` **get_stream** **(** **)** |const| Returns the underlying :ref:`StreamPeer` connection, used in :ref:`accept_stream` or :ref:`connect_to_stream`. +.. rst-class:: classref-item-separator + ---- .. _class_StreamPeerTLS_method_poll: -- void **poll** **(** **)** +.. rst-class:: classref-method + +void **poll** **(** **)** Poll the connection to check for incoming bytes. Call this right before :ref:`StreamPeer.get_available_bytes` for it to work properly. diff --git a/classes/class_string.rst b/classes/class_string.rst index a05bce38a..b5fbf67b5 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -12,310 +12,365 @@ String Built-in string class. +.. rst-class:: classref-introduction-group + Description ----------- This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference-counted and use a copy-on-write approach, so passing them around is cheap in resources. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GDScript format strings <../tutorials/scripting/gdscript/gdscript_format_string>` +.. rst-class:: classref-reftable-group + Constructors ------------ -+-----------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`String` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`String` **(** :ref:`String` from **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`String` **(** :ref:`NodePath` from **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`String` **(** :ref:`StringName` from **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`String` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`String` **(** :ref:`String` from **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`String` **(** :ref:`NodePath` from **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`String` **(** :ref:`StringName` from **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`begins_with` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`bigrams` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bin_to_int` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`c_escape` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`c_unescape` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`capitalize` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`casecmp_to` **(** :ref:`String` to **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`chr` **(** :ref:`int` char **)** |static| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`contains` **(** :ref:`String` what **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`countn` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`dedent` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`ends_with` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`findn` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`format` **(** :ref:`Variant` values, :ref:`String` placeholder="{_}" **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_base_dir` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_basename` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_extension` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_slice` **(** :ref:`String` delimiter, :ref:`int` slice **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_slice_count` **(** :ref:`String` delimiter **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_slicec` **(** :ref:`int` delimiter, :ref:`int` slice **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hash` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`humanize_size` **(** :ref:`int` size **)** |static| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`indent` **(** :ref:`String` prefix **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`insert` **(** :ref:`int` position, :ref:`String` what **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_absolute_path` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_relative_path` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_subsequence_of` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_subsequence_ofn` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_filename` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_float` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_hex_number` **(** :ref:`bool` with_prefix=false **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_html_color` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_identifier` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_int` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_ip_address` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`join` **(** :ref:`PackedStringArray` parts **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`json_escape` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`left` **(** :ref:`int` length **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`length` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`lpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`lstrip` **(** :ref:`String` chars **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`match` **(** :ref:`String` expr **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`matchn` **(** :ref:`String` expr **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`md5_buffer` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`md5_text` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`naturalnocasecmp_to` **(** :ref:`String` to **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`nocasecmp_to` **(** :ref:`String` to **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`num` **(** :ref:`float` number, :ref:`int` decimals=-1 **)** |static| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`num_int64` **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`num_scientific` **(** :ref:`float` number **)** |static| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`num_uint64` **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`pad_decimals` **(** :ref:`int` digits **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`pad_zeros` **(** :ref:`int` digits **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`path_join` **(** :ref:`String` file **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`repeat` **(** :ref:`int` count **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`replace` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`replacen` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfindn` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`right` **(** :ref:`int` length **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`rsplit` **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rstrip` **(** :ref:`String` chars **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`sha1_buffer` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`sha1_text` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`sha256_buffer` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`sha256_text` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`similarity` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`simplify_path` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`split` **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`split_floats` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`strip_edges` **(** :ref:`bool` left=true, :ref:`bool` right=true **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`strip_escapes` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`substr` **(** :ref:`int` from, :ref:`int` len=-1 **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_ascii_buffer` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_camel_case` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`to_float` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_int` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_lower` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_pascal_case` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_snake_case` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_upper` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_utf16_buffer` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_utf32_buffer` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`trim_suffix` **(** :ref:`String` suffix **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`unicode_at` **(** :ref:`int` at **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`uri_decode` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`uri_encode` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`validate_node_name` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`xml_escape` **(** :ref:`bool` escape_quotes=false **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`xml_unescape` **(** **)** |const| | -+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`begins_with` **(** :ref:`String` text **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`bigrams` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bin_to_int` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`c_escape` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`c_unescape` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`capitalize` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`casecmp_to` **(** :ref:`String` to **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`chr` **(** :ref:`int` char **)** |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`contains` **(** :ref:`String` what **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`countn` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`dedent` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ends_with` **(** :ref:`String` text **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`findn` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`format` **(** :ref:`Variant` values, :ref:`String` placeholder="{_}" **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_base_dir` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_basename` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_extension` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_slice` **(** :ref:`String` delimiter, :ref:`int` slice **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_slice_count` **(** :ref:`String` delimiter **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_slicec` **(** :ref:`int` delimiter, :ref:`int` slice **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hash` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`humanize_size` **(** :ref:`int` size **)** |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`indent` **(** :ref:`String` prefix **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`insert` **(** :ref:`int` position, :ref:`String` what **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_absolute_path` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_relative_path` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_subsequence_of` **(** :ref:`String` text **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_subsequence_ofn` **(** :ref:`String` text **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_filename` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_float` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_hex_number` **(** :ref:`bool` with_prefix=false **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_html_color` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_identifier` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_int` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_ip_address` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`join` **(** :ref:`PackedStringArray` parts **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`json_escape` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`left` **(** :ref:`int` length **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`length` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`lpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`lstrip` **(** :ref:`String` chars **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`match` **(** :ref:`String` expr **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`matchn` **(** :ref:`String` expr **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`md5_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`md5_text` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`naturalnocasecmp_to` **(** :ref:`String` to **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`nocasecmp_to` **(** :ref:`String` to **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`num` **(** :ref:`float` number, :ref:`int` decimals=-1 **)** |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`num_int64` **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`num_scientific` **(** :ref:`float` number **)** |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`num_uint64` **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`pad_decimals` **(** :ref:`int` digits **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`pad_zeros` **(** :ref:`int` digits **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`path_join` **(** :ref:`String` file **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`repeat` **(** :ref:`int` count **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`replace` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`replacen` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfindn` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`right` **(** :ref:`int` length **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`rsplit` **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`rstrip` **(** :ref:`String` chars **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`sha1_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`sha1_text` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`sha256_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`sha256_text` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`similarity` **(** :ref:`String` text **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`simplify_path` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`split` **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`split_floats` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`strip_edges` **(** :ref:`bool` left=true, :ref:`bool` right=true **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`strip_escapes` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`substr` **(** :ref:`int` from, :ref:`int` len=-1 **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_ascii_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_camel_case` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`to_float` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`to_int` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_lower` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_pascal_case` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_snake_case` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_upper` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_utf16_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_utf32_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`trim_suffix` **(** :ref:`String` suffix **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`unicode_at` **(** :ref:`int` at **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`uri_decode` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`uri_encode` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`validate_node_name` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xml_escape` **(** :ref:`bool` escape_quotes=false **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xml_unescape` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`StringName` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`operator %` **(** :ref:`Variant` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`operator +` **(** :ref:`String` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`String` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`String` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`String` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`String` right **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`operator []` **(** :ref:`int` index **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`StringName` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`operator %` **(** :ref:`Variant` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`operator +` **(** :ref:`String` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`String` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`String` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`String` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`String` right **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`operator []` **(** :ref:`int` index **)** | + +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_String_constructor_String: -- :ref:`String` **String** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``String`` (``""``). +:ref:`String` **String** **(** **)** + +Constructs an empty **String** (``""``). + +.. rst-class:: classref-item-separator ---- -- :ref:`String` **String** **(** :ref:`String` from **)** +.. rst-class:: classref-constructor -Constructs a ``String`` as a copy of the given ``String``. +:ref:`String` **String** **(** :ref:`String` from **)** + +Constructs a **String** as a copy of the given **String**. + +.. rst-class:: classref-item-separator ---- -- :ref:`String` **String** **(** :ref:`NodePath` from **)** +.. rst-class:: classref-constructor -Constructs a new String from the given :ref:`NodePath`. +:ref:`String` **String** **(** :ref:`NodePath` from **)** + +Constructs a new **String** from the given :ref:`NodePath`. + +.. rst-class:: classref-item-separator ---- -- :ref:`String` **String** **(** :ref:`StringName` from **)** +.. rst-class:: classref-constructor -Constructs a new String from the given :ref:`StringName`. +:ref:`String` **String** **(** :ref:`StringName` from **)** + +Constructs a new **String** from the given :ref:`StringName`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_String_method_begins_with: -- :ref:`bool` **begins_with** **(** :ref:`String` text **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **begins_with** **(** :ref:`String` text **)** |const| Returns ``true`` if the string begins with the given string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_bigrams: -- :ref:`PackedStringArray` **bigrams** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **bigrams** **(** **)** |const| Returns an array containing the bigrams (pairs of consecutive letters) of this string. :: - print("Bigrams".bigrams()) # Prints "[Bi, ig, gr, ra, am, ms]" + print("Bigrams".bigrams()) # Prints ["Bi", "ig", "gr", "ra", "am", "ms"] + +.. rst-class:: classref-item-separator ---- .. _class_String_method_bin_to_int: -- :ref:`int` **bin_to_int** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **bin_to_int** **(** **)** |const| Converts a string containing a binary number into an integer. Binary strings can either be prefixed with ``0b`` or not, and they can also start with a ``-`` before the optional prefix. @@ -334,37 +389,53 @@ Converts a string containing a binary number into an integer. Binary strings can +.. rst-class:: classref-item-separator + ---- .. _class_String_method_c_escape: -- :ref:`String` **c_escape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **c_escape** **(** **)** |const| Returns a copy of the string with special characters escaped using the C language standard. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_c_unescape: -- :ref:`String` **c_unescape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **c_unescape** **(** **)** |const| Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are ``\'``, ``\"``, ``\\``, ``\a``, ``\b``, ``\f``, ``\n``, ``\r``, ``\t``, ``\v``. \ **Note:** Unlike the GDScript parser, this method doesn't support the ``\uXXXX`` escape sequence. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_capitalize: -- :ref:`String` **capitalize** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **capitalize** **(** **)** |const| Changes the case of some letters. Replaces underscores with spaces, adds spaces before in-word uppercase characters, converts all letters to lowercase, then capitalizes the first letter and every letter following a space character. For ``capitalize camelCase mixed_with_underscores``, it will return ``Capitalize Camel Case Mixed With Underscores``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_casecmp_to: -- :ref:`int` **casecmp_to** **(** :ref:`String` to **)** |const| +.. rst-class:: classref-method + +:ref:`int` **casecmp_to** **(** :ref:`String` to **)** |const| Performs a case-sensitive 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 `__ of each string, which roughly matches the alphabetical order. @@ -374,11 +445,15 @@ Performs a case-sensitive comparison to another string. Returns ``-1`` if less t To get a boolean result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to` and :ref:`naturalnocasecmp_to`. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_chr: -- :ref:`String` **chr** **(** :ref:`int` char **)** |static| +.. rst-class:: classref-method + +:ref:`String` **chr** **(** :ref:`int` char **)** |static| Directly converts an decimal integer to a unicode character. Tables of these characters can be found in various locations, for example `here. `__\ @@ -387,51 +462,75 @@ Directly converts an decimal integer to a unicode character. Tables of these cha print(String.chr(65)) # Prints "A" print(String.chr(129302)) # Prints "🤖" (robot face emoji) +.. rst-class:: classref-item-separator + ---- .. _class_String_method_contains: -- :ref:`bool` **contains** **(** :ref:`String` what **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **contains** **(** :ref:`String` what **)** |const| Returns ``true`` if the string contains the given string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_count: -- :ref:`int` **count** **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **count** **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| Returns the number of occurrences of substring ``what`` between ``from`` and ``to`` positions. If ``from`` and ``to`` equals 0 the whole string will be used. If only ``to`` equals 0 the remained substring will be used. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_countn: -- :ref:`int` **countn** **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **countn** **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| Returns the number of occurrences of substring ``what`` (ignoring case) between ``from`` and ``to`` positions. If ``from`` and ``to`` equals 0 the whole string will be used. If only ``to`` equals 0 the remained substring will be used. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_dedent: -- :ref:`String` **dedent** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **dedent** **(** **)** |const| Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent` to add indentation. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_ends_with: -- :ref:`bool` **ends_with** **(** :ref:`String` text **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **ends_with** **(** :ref:`String` text **)** |const| Returns ``true`` if the string ends with the given string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_find: -- :ref:`int` **find** **(** :ref:`String` what, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **find** **(** :ref:`String` what, :ref:`int` from=0 **)** |const| Returns the index of the **first** case-sensitive occurrence of the specified string in this instance, or ``-1``. Optionally, the starting search index can be specified, continuing to the end of the string. @@ -451,19 +550,27 @@ Returns the index of the **first** case-sensitive occurrence of the specified st +.. rst-class:: classref-item-separator + ---- .. _class_String_method_findn: -- :ref:`int` **findn** **(** :ref:`String` what, :ref:`int` from=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **findn** **(** :ref:`String` what, :ref:`int` from=0 **)** |const| Returns the index of the **first** case-insensitive occurrence of the specified string in this instance, or ``-1``. Optionally, the starting search index can be specified, continuing to the end of the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_format: -- :ref:`String` **format** **(** :ref:`Variant` values, :ref:`String` placeholder="{_}" **)** |const| +.. rst-class:: classref-method + +:ref:`String` **format** **(** :ref:`Variant` values, :ref:`String` placeholder="{_}" **)** |const| Formats the string by replacing all occurrences of ``placeholder`` with the elements of ``values``. @@ -486,27 +593,39 @@ Some additional handling is performed when ``values`` is an array. If ``placehol print("User {} is {}.".format([42, "Godot"], "{}")) print("User {id} is {name}.".format([["id", 42], ["name", "Godot"]])) +.. rst-class:: classref-item-separator + ---- .. _class_String_method_get_base_dir: -- :ref:`String` **get_base_dir** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_base_dir** **(** **)** |const| If the string is a valid file path, returns the base directory name. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_get_basename: -- :ref:`String` **get_basename** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_basename** **(** **)** |const| If the string is a valid file path, returns the full file path without the extension. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_get_extension: -- :ref:`String` **get_extension** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_extension** **(** **)** |const| Returns the extension without the leading period character (``.``) if the string is a valid file name or path. If the string does not contain an extension, returns an empty string instead. @@ -521,19 +640,27 @@ Returns the extension without the leading period character (``.``) if the string print("txt".get_extension()) # "" (empty string) print("".get_extension()) # "" (empty string) +.. rst-class:: classref-item-separator + ---- .. _class_String_method_get_file: -- :ref:`String` **get_file** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_file** **(** **)** |const| If the string is a valid file path, returns the filename. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_get_slice: -- :ref:`String` **get_slice** **(** :ref:`String` delimiter, :ref:`int` slice **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_slice** **(** :ref:`String` delimiter, :ref:`int` slice **)** |const| Splits a string using a ``delimiter`` and returns a substring at index ``slice``. Returns an empty string if the index doesn't exist. @@ -545,39 +672,55 @@ This is a more performant alternative to :ref:`split` print("i/am/example/string".get_slice("/", 2)) # Prints 'example'. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_get_slice_count: -- :ref:`int` **get_slice_count** **(** :ref:`String` delimiter **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_slice_count** **(** :ref:`String` delimiter **)** |const| Splits a string using a ``delimiter`` and returns a number of slices. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_get_slicec: -- :ref:`String` **get_slicec** **(** :ref:`int` delimiter, :ref:`int` slice **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_slicec** **(** :ref:`int` delimiter, :ref:`int` slice **)** |const| Splits a string using a Unicode character with code ``delimiter`` and returns a substring at index ``slice``. Returns an empty string if the index doesn't exist. This is a more performant alternative to :ref:`split` for cases when you need only one element from the array at a fixed index. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_hash: -- :ref:`int` **hash** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **hash** **(** **)** |const| Returns the 32-bit hash value representing the string's contents. -\ **Note:** ``String``\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the strings are equal, because different strings can have identical hash values due to hash collisions. +\ **Note:** **String**\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the strings are equal, because different strings can have identical hash values due to hash collisions. + +.. rst-class:: classref-item-separator ---- .. _class_String_method_hex_to_int: -- :ref:`int` **hex_to_int** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **hex_to_int** **(** **)** |const| Converts a string containing a hexadecimal number into an integer. Hexadecimal strings can either be prefixed with ``0x`` or not, and they can also start with a ``-`` before the optional prefix. @@ -596,21 +739,29 @@ Converts a string containing a hexadecimal number into an integer. Hexadecimal s +.. rst-class:: classref-item-separator + ---- .. _class_String_method_humanize_size: -- :ref:`String` **humanize_size** **(** :ref:`int` size **)** |static| +.. rst-class:: classref-method + +:ref:`String` **humanize_size** **(** :ref:`int` size **)** |static| Converts an integer representing a number of bytes into a human-readable form. Note that this output is in `IEC prefix format `__, and includes ``B``, ``KiB``, ``MiB``, ``GiB``, ``TiB``, ``PiB``, and ``EiB``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_indent: -- :ref:`String` **indent** **(** :ref:`String` prefix **)** |const| +.. rst-class:: classref-method + +:ref:`String` **indent** **(** :ref:`String` prefix **)** |const| Returns a copy of the string with lines indented with ``prefix``. @@ -618,69 +769,101 @@ For example, the string can be indented with two tabs using ``"\t\t"``, or four \ **Note:** Empty lines are kept empty. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_insert: -- :ref:`String` **insert** **(** :ref:`int` position, :ref:`String` what **)** |const| +.. rst-class:: classref-method + +:ref:`String` **insert** **(** :ref:`int` position, :ref:`String` what **)** |const| Returns a copy of the string with the substring ``what`` inserted at the given ``position``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_absolute_path: -- :ref:`bool` **is_absolute_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_absolute_path** **(** **)** |const| Returns ``true`` if the string is a path to a file or directory and its starting point is explicitly defined. This includes ``res://``, ``user://``, ``C:\``, ``/``, etc. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns ``true`` if the length of the string equals ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_relative_path: -- :ref:`bool` **is_relative_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_relative_path** **(** **)** |const| Returns ``true`` if the string is a path to a file or directory and its starting point is implicitly defined within the context it is being used. The starting point may refer to the current directory (``./``), or the current :ref:`Node`. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_subsequence_of: -- :ref:`bool` **is_subsequence_of** **(** :ref:`String` text **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_subsequence_of** **(** :ref:`String` text **)** |const| Returns ``true`` if this string is a subsequence of the given string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_subsequence_ofn: -- :ref:`bool` **is_subsequence_ofn** **(** :ref:`String` text **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_subsequence_ofn** **(** :ref:`String` text **)** |const| Returns ``true`` if this string is a subsequence of the given string, without considering case. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_valid_filename: -- :ref:`bool` **is_valid_filename** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_filename** **(** **)** |const| Returns ``true`` if this string is free from characters that aren't allowed in file names, those being: \ ``: / \ ? * " | % < >`` +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_valid_float: -- :ref:`bool` **is_valid_float** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_float** **(** **)** |const| Returns ``true`` if this string contains a valid float. This is inclusive of integers, and also supports exponents: @@ -691,27 +874,39 @@ Returns ``true`` if this string contains a valid float. This is inclusive of int print("7e3".is_valid_float()) # Prints "true" print("Hello".is_valid_float()) # Prints "false" +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_valid_hex_number: -- :ref:`bool` **is_valid_hex_number** **(** :ref:`bool` with_prefix=false **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_hex_number** **(** :ref:`bool` with_prefix=false **)** |const| Returns ``true`` if this string contains a valid hexadecimal number. If ``with_prefix`` is ``true``, then a validity of the hexadecimal number is determined by the ``0x`` prefix, for example: ``0xDEADC0DE``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_valid_html_color: -- :ref:`bool` **is_valid_html_color** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_html_color** **(** **)** |const| Returns ``true`` if this string contains a valid color in hexadecimal HTML notation. Other HTML notations such as named colors or ``hsl()`` colors aren't considered valid by this method and will return ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_valid_identifier: -- :ref:`bool` **is_valid_identifier** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_identifier** **(** **)** |const| 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. @@ -721,11 +916,15 @@ Returns ``true`` if this string is a valid identifier. A valid identifier may co print("1st_bad_ident".is_valid_identifier()) # Prints "false" print("bad_ident_#2".is_valid_identifier()) # Prints "false" +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_valid_int: -- :ref:`bool` **is_valid_int** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_int** **(** **)** |const| Returns ``true`` if this string contains a valid integer. @@ -737,21 +936,29 @@ Returns ``true`` if this string contains a valid integer. print("+3".is_valid_int()) # Prints "true" print("-12".is_valid_int()) # Prints "true" +.. rst-class:: classref-item-separator + ---- .. _class_String_method_is_valid_ip_address: -- :ref:`bool` **is_valid_ip_address** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_ip_address** **(** **)** |const| Returns ``true`` if this string contains only a well-formatted IPv4 or IPv6 address. This method considers `reserved IP addresses `__ such as ``0.0.0.0`` as valid. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_join: -- :ref:`String` **join** **(** :ref:`PackedStringArray` parts **)** |const| +.. rst-class:: classref-method -Returns a ``String`` which is the concatenation of the ``parts``. The separator between elements is the string providing this method. +:ref:`String` **join** **(** :ref:`PackedStringArray` parts **)** |const| + +Returns a **String** which is the concatenation of the ``parts``. The separator between elements is the string providing this method. \ **Example:**\ @@ -768,21 +975,29 @@ Returns a ``String`` which is the concatenation of the ``parts``. The separator +.. rst-class:: classref-item-separator + ---- .. _class_String_method_json_escape: -- :ref:`String` **json_escape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **json_escape** **(** **)** |const| Returns a copy of the string with special characters escaped using the JSON standard. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_left: -- :ref:`String` **left** **(** :ref:`int` length **)** |const| +.. rst-class:: classref-method -Returns a number of characters from the left of the string. If negative ``length`` is used, the characters are counted downwards from ``String``'s length. +:ref:`String` **left** **(** :ref:`int` length **)** |const| + +Returns a number of characters from the left of the string. If negative ``length`` is used, the characters are counted downwards from **String**'s length. \ **Example:**\ @@ -791,69 +1006,101 @@ Returns a number of characters from the left of the string. If negative ``length print("sample text".left(3)) #prints "sam" print("sample text".left(-3)) #prints "sample t" +.. rst-class:: classref-item-separator + ---- .. _class_String_method_length: -- :ref:`int` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **length** **(** **)** |const| Returns the number of characters in the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_lpad: -- :ref:`String` **lpad** **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| +.. rst-class:: classref-method + +:ref:`String` **lpad** **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| Formats a string to be at least ``min_length`` long by adding ``character``\ s to the left of the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_lstrip: -- :ref:`String` **lstrip** **(** :ref:`String` chars **)** |const| +.. rst-class:: classref-method + +:ref:`String` **lstrip** **(** :ref:`String` chars **)** |const| Returns a copy of the string with characters removed from the left. The ``chars`` argument is a string specifying the set of characters to be removed. \ **Note:** The ``chars`` is not a prefix. See :ref:`trim_prefix` method that will remove a single prefix string rather than a set of characters. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_match: -- :ref:`bool` **match** **(** :ref:`String` expr **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **match** **(** :ref:`String` expr **)** |const| Does a simple case-sensitive 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``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_matchn: -- :ref:`bool` **matchn** **(** :ref:`String` expr **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **matchn** **(** :ref:`String` expr **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_md5_buffer: -- :ref:`PackedByteArray` **md5_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **md5_buffer** **(** **)** |const| Returns the MD5 hash of the string as an array of bytes. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_md5_text: -- :ref:`String` **md5_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **md5_text** **(** **)** |const| Returns the MD5 hash of the string as a string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_naturalnocasecmp_to: -- :ref:`int` **naturalnocasecmp_to** **(** :ref:`String` to **)** |const| +.. rst-class:: classref-method + +:ref:`int` **naturalnocasecmp_to** **(** :ref:`String` to **)** |const| 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 `__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. @@ -865,11 +1112,15 @@ When used for sorting, natural order comparison will order suites of numbers as To get a boolean result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to` and :ref:`casecmp_to`. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_nocasecmp_to: -- :ref:`int` **nocasecmp_to** **(** :ref:`String` to **)** |const| +.. rst-class:: classref-method + +:ref:`int` **nocasecmp_to** **(** :ref:`String` to **)** |const| 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 `__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. @@ -879,11 +1130,15 @@ Performs a case-insensitive comparison to another string. Returns ``-1`` if less To get a boolean result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to` and :ref:`naturalnocasecmp_to`. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_num: -- :ref:`String` **num** **(** :ref:`float` number, :ref:`int` decimals=-1 **)** |static| +.. rst-class:: classref-method + +:ref:`String` **num** **(** :ref:`float` number, :ref:`int` decimals=-1 **)** |static| Converts a :ref:`float` to a string representation of a decimal number. @@ -905,103 +1160,151 @@ Trailing zeros are not included in the string. The last digit will be rounded an String.num(-0.0000012345432123454321) # "-0.00000123454321" String.num(-10000.0000012345432123454321) # "-10000.0000012345" +.. rst-class:: classref-item-separator + ---- .. _class_String_method_num_int64: -- :ref:`String` **num_int64** **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| +.. rst-class:: classref-method + +:ref:`String` **num_int64** **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| Converts a signed :ref:`int` to a string representation of a number. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_num_scientific: -- :ref:`String` **num_scientific** **(** :ref:`float` number **)** |static| +.. rst-class:: classref-method + +:ref:`String` **num_scientific** **(** :ref:`float` number **)** |static| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_String_method_num_uint64: -- :ref:`String` **num_uint64** **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| +.. rst-class:: classref-method + +:ref:`String` **num_uint64** **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| Converts a unsigned :ref:`int` to a string representation of a number. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_pad_decimals: -- :ref:`String` **pad_decimals** **(** :ref:`int` digits **)** |const| +.. rst-class:: classref-method + +:ref:`String` **pad_decimals** **(** :ref:`int` digits **)** |const| Formats a number to have an exact number of ``digits`` after the decimal point. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_pad_zeros: -- :ref:`String` **pad_zeros** **(** :ref:`int` digits **)** |const| +.. rst-class:: classref-method + +:ref:`String` **pad_zeros** **(** :ref:`int` digits **)** |const| Formats a number to have an exact number of ``digits`` before the decimal point. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_path_join: -- :ref:`String` **path_join** **(** :ref:`String` file **)** |const| +.. rst-class:: classref-method + +:ref:`String` **path_join** **(** :ref:`String` file **)** |const| If the string is a path, this concatenates ``file`` at the end of the string as a subpath. E.g. ``"this/is".path_join("path") == "this/is/path"``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_repeat: -- :ref:`String` **repeat** **(** :ref:`int` count **)** |const| +.. rst-class:: classref-method + +:ref:`String` **repeat** **(** :ref:`int` count **)** |const| Returns original string repeated a number of times. The number of repetitions is given by the argument. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_replace: -- :ref:`String` **replace** **(** :ref:`String` what, :ref:`String` forwhat **)** |const| +.. rst-class:: classref-method + +:ref:`String` **replace** **(** :ref:`String` what, :ref:`String` forwhat **)** |const| Replaces occurrences of a case-sensitive substring with the given one inside the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_replacen: -- :ref:`String` **replacen** **(** :ref:`String` what, :ref:`String` forwhat **)** |const| +.. rst-class:: classref-method + +:ref:`String` **replacen** **(** :ref:`String` what, :ref:`String` forwhat **)** |const| Replaces occurrences of a case-insensitive substring with the given one inside the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_rfind: -- :ref:`int` **rfind** **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfind** **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| Returns the index of the **last** case-sensitive occurrence of the specified string in this instance, or ``-1``. Optionally, the starting search index can be specified, continuing to the beginning of the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_rfindn: -- :ref:`int` **rfindn** **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **rfindn** **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| Returns the index of the **last** case-insensitive occurrence of the specified string in this instance, or ``-1``. Optionally, the starting search index can be specified, continuing to the beginning of the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_right: -- :ref:`String` **right** **(** :ref:`int` length **)** |const| +.. rst-class:: classref-method -Returns a number of characters from the right of the string. If negative ``length`` is used, the characters are counted downwards from ``String``'s length. +:ref:`String` **right** **(** :ref:`int` length **)** |const| + +Returns a number of characters from the right of the string. If negative ``length`` is used, the characters are counted downwards from **String**'s length. \ **Example:**\ @@ -1010,19 +1313,27 @@ Returns a number of characters from the right of the string. If negative ``lengt print("sample text".right(3)) #prints "ext" print("sample text".right(-3)) #prints "ple text" +.. rst-class:: classref-item-separator + ---- .. _class_String_method_rpad: -- :ref:`String` **rpad** **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| +.. rst-class:: classref-method + +:ref:`String` **rpad** **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| Formats a string to be at least ``min_length`` long by adding ``character``\ s to the right of the string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_rsplit: -- :ref:`PackedStringArray` **rsplit** **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **rsplit** **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| Splits the string by a ``delimiter`` string and returns an array of the substrings, starting from right. If ``delimiter`` is an empty string, each substring will be a single character. @@ -1051,53 +1362,77 @@ If ``maxsplit`` is specified, it defines the number of splits to do from the rig +.. rst-class:: classref-item-separator + ---- .. _class_String_method_rstrip: -- :ref:`String` **rstrip** **(** :ref:`String` chars **)** |const| +.. rst-class:: classref-method + +:ref:`String` **rstrip** **(** :ref:`String` chars **)** |const| Returns a copy of the string with characters removed from the right. The ``chars`` argument is a string specifying the set of characters to be removed. \ **Note:** The ``chars`` is not a suffix. See :ref:`trim_suffix` method that will remove a single suffix string rather than a set of characters. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_sha1_buffer: -- :ref:`PackedByteArray` **sha1_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **sha1_buffer** **(** **)** |const| Returns the SHA-1 hash of the string as an array of bytes. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_sha1_text: -- :ref:`String` **sha1_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **sha1_text** **(** **)** |const| Returns the SHA-1 hash of the string as a string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_sha256_buffer: -- :ref:`PackedByteArray` **sha256_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **sha256_buffer** **(** **)** |const| Returns the SHA-256 hash of the string as an array of bytes. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_sha256_text: -- :ref:`String` **sha256_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **sha256_text** **(** **)** |const| Returns the SHA-256 hash of the string as a string. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_similarity: -- :ref:`float` **similarity** **(** :ref:`String` text **)** |const| +.. rst-class:: classref-method + +:ref:`float` **similarity** **(** :ref:`String` text **)** |const| Returns the similarity index (`Sorensen-Dice coefficient `__) of this string compared to another. A result of 1.0 means totally similar, while 0.0 means totally dissimilar. @@ -1108,19 +1443,27 @@ Returns the similarity index (`Sorensen-Dice coefficient ` **simplify_path** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **simplify_path** **(** **)** |const| Returns a simplified canonical path. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_split: -- :ref:`PackedStringArray` **split** **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **split** **(** :ref:`String` delimiter="", :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| Splits the string by a ``delimiter`` string and returns an array of the substrings. The ``delimiter`` can be of any length. If ``delimiter`` is an empty string, each substring will be a single character. @@ -1154,11 +1497,15 @@ If you need only one element from the array at a specific index, :ref:`get_slice If you need to split strings with more complex rules, use the :ref:`RegEx` class instead. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_split_floats: -- :ref:`PackedFloat32Array` **split_floats** **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true **)** |const| +.. rst-class:: classref-method + +:ref:`PackedFloat64Array` **split_floats** **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true **)** |const| Splits the string in floats by using a delimiter string and returns an array of the substrings. @@ -1166,51 +1513,75 @@ For example, ``"1,2.5,3"`` will return ``[1,2.5,3]`` if split by ``","``. If ``allow_empty`` is ``true``, and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_strip_edges: -- :ref:`String` **strip_edges** **(** :ref:`bool` left=true, :ref:`bool` right=true **)** |const| +.. rst-class:: classref-method + +:ref:`String` **strip_edges** **(** :ref:`bool` left=true, :ref:`bool` right=true **)** |const| Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_strip_escapes: -- :ref:`String` **strip_escapes** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **strip_escapes** **(** **)** |const| Returns a copy of the string stripped of any escape character. These include all non-printable control characters of the first page of the ASCII table (< 32), such as tabulation (``\t`` in C) and newline (``\n`` and ``\r``) characters, but not spaces. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_substr: -- :ref:`String` **substr** **(** :ref:`int` from, :ref:`int` len=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`String` **substr** **(** :ref:`int` from, :ref:`int` len=-1 **)** |const| Returns part of the string from the position ``from`` with length ``len``. Argument ``len`` is optional and using ``-1`` will return remaining characters from given position. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_ascii_buffer: -- :ref:`PackedByteArray` **to_ascii_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_ascii_buffer** **(** **)** |const| Converts the String (which is a character array) to ASCII/Latin-1 encoded :ref:`PackedByteArray` (which is an array of bytes). The conversion is faster compared to :ref:`to_utf8_buffer`, as this method assumes that all the characters in the String are ASCII/Latin-1 characters, unsupported characters are replaced with spaces. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_camel_case: -- :ref:`String` **to_camel_case** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **to_camel_case** **(** **)** |const| Returns the string converted to ``camelCase``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_float: -- :ref:`float` **to_float** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **to_float** **(** **)** |const| Converts a string containing a decimal number into a ``float``. The method will stop on the first non-number character except the first ``.`` (decimal point), and ``e`` which is used for exponential. @@ -1221,11 +1592,15 @@ Converts a string containing a decimal number into a ``float``. The method will print("12ab3".to_float()) # 12 print("1e3".to_float()) # 1000 +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_int: -- :ref:`int` **to_int** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **to_int** **(** **)** |const| Converts a string containing an integer number into an ``int``. The method will remove any non-number character and stop if it encounters a ``.``. @@ -1235,91 +1610,135 @@ Converts a string containing an integer number into an ``int``. The method will print("a1b2c3".to_int()) # 123 print("1.2.3".to_int()) # 1 +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_lower: -- :ref:`String` **to_lower** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **to_lower** **(** **)** |const| Returns the string converted to lowercase. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_pascal_case: -- :ref:`String` **to_pascal_case** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **to_pascal_case** **(** **)** |const| Returns the string converted to ``PascalCase``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_snake_case: -- :ref:`String` **to_snake_case** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **to_snake_case** **(** **)** |const| Returns the string converted to ``snake_case``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_upper: -- :ref:`String` **to_upper** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **to_upper** **(** **)** |const| Returns the string converted to uppercase. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_utf16_buffer: -- :ref:`PackedByteArray` **to_utf16_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_utf16_buffer** **(** **)** |const| Converts the String (which is an array of characters) to UTF-16 encoded :ref:`PackedByteArray` (which is an array of bytes). +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_utf32_buffer: -- :ref:`PackedByteArray` **to_utf32_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_utf32_buffer** **(** **)** |const| Converts the String (which is an array of characters) to UTF-32 encoded :ref:`PackedByteArray` (which is an array of bytes). +.. rst-class:: classref-item-separator + ---- .. _class_String_method_to_utf8_buffer: -- :ref:`PackedByteArray` **to_utf8_buffer** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_utf8_buffer** **(** **)** |const| Converts the String (which is an array of characters) to UTF-8 encode :ref:`PackedByteArray` (which is an array of bytes). The conversion is a bit slower than :ref:`to_ascii_buffer`, but supports all UTF-8 characters. Therefore, you should prefer this function over :ref:`to_ascii_buffer`. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_trim_prefix: -- :ref:`String` **trim_prefix** **(** :ref:`String` prefix **)** |const| +.. rst-class:: classref-method + +:ref:`String` **trim_prefix** **(** :ref:`String` prefix **)** |const| Removes a given string from the start if it starts with it or leaves the string unchanged. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_trim_suffix: -- :ref:`String` **trim_suffix** **(** :ref:`String` suffix **)** |const| +.. rst-class:: classref-method + +:ref:`String` **trim_suffix** **(** :ref:`String` suffix **)** |const| Removes a given string from the end if it ends with it or leaves the string unchanged. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_unicode_at: -- :ref:`int` **unicode_at** **(** :ref:`int` at **)** |const| +.. rst-class:: classref-method + +:ref:`int` **unicode_at** **(** :ref:`int` at **)** |const| Returns the character code at position ``at``. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_uri_decode: -- :ref:`String` **uri_decode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **uri_decode** **(** **)** |const| Decodes a string in URL encoded format. This is meant to decode parameters in a URL when receiving an HTTP request. @@ -1336,11 +1755,15 @@ Decodes a string in URL encoded format. This is meant to decode parameters in a +.. rst-class:: classref-item-separator + ---- .. _class_String_method_uri_encode: -- :ref:`String` **uri_encode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **uri_encode** **(** **)** |const| Encodes a string to URL friendly format. This is meant to encode parameters in a URL when sending an HTTP request. @@ -1357,136 +1780,193 @@ Encodes a string to URL friendly format. This is meant to encode parameters in a +.. rst-class:: classref-item-separator + ---- .. _class_String_method_validate_node_name: -- :ref:`String` **validate_node_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **validate_node_name** **(** **)** |const| Removes any characters from the string that are prohibited in :ref:`Node` names (``.`` ``:`` ``@`` ``/`` ``"``). +.. rst-class:: classref-item-separator + ---- .. _class_String_method_xml_escape: -- :ref:`String` **xml_escape** **(** :ref:`bool` escape_quotes=false **)** |const| +.. rst-class:: classref-method + +:ref:`String` **xml_escape** **(** :ref:`bool` escape_quotes=false **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_String_method_xml_unescape: -- :ref:`String` **xml_unescape** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **xml_unescape** **(** **)** |const| Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_String_operator_neq_bool: +.. _class_String_operator_neq_String: -- :ref:`bool` **operator !=** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator !=** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if both strings do not contain the same sequence of characters. + +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator !=** **(** :ref:`StringName` right **)** +.. _class_String_operator_neq_StringName: -.. container:: contribute +.. rst-class:: classref-operator - There is currently no description for this operator. Please help us by :ref:`contributing one `! +:ref:`bool` **operator !=** **(** :ref:`StringName` right **)** + +Returns ``true`` if this **String** is not equivalent to the given :ref:`StringName`. + +.. rst-class:: classref-item-separator ---- -.. _class_String_operator_mod_String: +.. _class_String_operator_mod_Variant: -- :ref:`String` **operator %** **(** :ref:`Variant` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`String` **operator %** **(** :ref:`Variant` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Formats the **String**, replacing the placeholders with one or more parameters. + +To pass multiple parameters, ``right`` needs to be an :ref:`Array`. + +:: + + print("I caught %d fishes!" % 2) # Prints "I caught 2 fishes!" + + var my_message = "Travelling to %s, at %2.2f per second." + var location = "Deep Valley" + var speed = 40.3485 + print(my_message % [location, speed]) # Prints "Travelling to Deep Valley, at 40.35 km/h." + +In C#, there is no direct equivalent to this operator. Use the :ref:`format` method, instead. + +For more information, see the :doc:`GDScript format strings <../tutorials/scripting/gdscript/gdscript_format_string>` tutorial. + +.. rst-class:: classref-item-separator ---- .. _class_String_operator_sum_String: -- :ref:`String` **operator +** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`String` **operator +** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Appends ``right`` at the end of this **String**, also known as a string concatenation. + +.. rst-class:: classref-item-separator ---- -.. _class_String_operator_lt_bool: +.. _class_String_operator_lt_String: -- :ref:`bool` **operator <** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator <** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left **String** comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. + +.. rst-class:: classref-item-separator ---- -.. _class_String_operator_lte_bool: +.. _class_String_operator_lte_String: -- :ref:`bool` **operator <=** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator <=** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left **String** comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are equal. + +.. rst-class:: classref-item-separator ---- -.. _class_String_operator_eq_bool: +.. _class_String_operator_eq_String: -- :ref:`bool` **operator ==** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator ==** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if both strings contain the same sequence of characters. + +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator ==** **(** :ref:`StringName` right **)** +.. _class_String_operator_eq_StringName: -.. container:: contribute +.. rst-class:: classref-operator - There is currently no description for this operator. Please help us by :ref:`contributing one `! +:ref:`bool` **operator ==** **(** :ref:`StringName` right **)** + +Returns ``true`` if this **String** is equivalent to the given :ref:`StringName`. + +.. rst-class:: classref-item-separator ---- -.. _class_String_operator_gt_bool: +.. _class_String_operator_gt_String: -- :ref:`bool` **operator >** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator >** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left **String** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. + +.. rst-class:: classref-item-separator ---- -.. _class_String_operator_gte_bool: +.. _class_String_operator_gte_String: -- :ref:`bool` **operator >=** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator >=** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left **String** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are equal. + +.. rst-class:: classref-item-separator ---- -.. _class_String_operator_idx_String: +.. _class_String_operator_idx_int: -- :ref:`String` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`String` **operator []** **(** :ref:`int` index **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +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. .. |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.)` diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 44d285c79..949dfb9a0 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -12,160 +12,225 @@ StringName An optimized string type for unique names. +.. rst-class:: classref-introduction-group + Description ----------- -``StringName``\ s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). ``StringName`` ensures that only one instance of a given name exists (so two ``StringName``\ s with the same value are the same object). Comparing them is much faster than with regular :ref:`String`\ s, because only the pointers are compared, not the whole strings. +**StringName**\ s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). **StringName** ensures that only one instance of a given name exists (so two **StringName**\ s with the same value are the same object). Comparing them is much faster than with regular :ref:`String`\ s, because only the pointers are compared, not the whole strings. -You will usually just pass a :ref:`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 ``StringName`` or the literal syntax ``&"example"``. +You will usually just pass a :ref:`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 **StringName** or, in GDScript, the literal syntax ``&"example"``. See also :ref:`NodePath`, which is a similar concept specifically designed to store pre-parsed node paths. +.. rst-class:: classref-reftable-group + Constructors ------------ -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`StringName` **(** **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`StringName` **(** :ref:`StringName` from **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`StringName` **(** :ref:`String` from **)** | -+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`StringName` **(** **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`StringName` **(** :ref:`StringName` from **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`StringName` **(** :ref:`String` from **)** | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+---------------------------------------------------------------+ -| :ref:`int` | :ref:`hash` **(** **)** |const| | -+-----------------------+---------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+---------------------------------------------------------------+ + | :ref:`int` | :ref:`hash` **(** **)** |const| | + +-----------------------+---------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`StringName` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`StringName` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`StringName` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`StringName` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`StringName` right **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`StringName` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`StringName` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`StringName` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`StringName` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`StringName` right **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constructor Descriptions ------------------------ .. _class_StringName_constructor_StringName: -- :ref:`StringName` **StringName** **(** **)** +.. rst-class:: classref-constructor -Constructs an empty ``StringName``. +:ref:`StringName` **StringName** **(** **)** + +Constructs an empty **StringName**. + +.. rst-class:: classref-item-separator ---- -- :ref:`StringName` **StringName** **(** :ref:`StringName` from **)** +.. rst-class:: classref-constructor -Constructs a ``StringName`` as a copy of the given ``StringName``. +:ref:`StringName` **StringName** **(** :ref:`StringName` from **)** + +Constructs a **StringName** as a copy of the given **StringName**. + +.. rst-class:: classref-item-separator ---- -- :ref:`StringName` **StringName** **(** :ref:`String` from **)** +.. rst-class:: classref-constructor -Creates a new ``StringName`` from the given :ref:`String`. ``StringName("example")`` is equivalent to ``&"example"``. +:ref:`StringName` **StringName** **(** :ref:`String` from **)** + +Creates a new **StringName** from the given :ref:`String`. In GDScript, ``StringName("example")`` is equivalent to ``&"example"``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_StringName_method_hash: -- :ref:`int` **hash** **(** **)** |const| +.. rst-class:: classref-method -Returns the 32-bit hash value representing the ``StringName``'s contents. +:ref:`int` **hash** **(** **)** |const| + +Returns the 32-bit hash value representing the **StringName**'s contents. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_StringName_operator_neq_bool: +.. _class_StringName_operator_neq_String: -- :ref:`bool` **operator !=** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator !=** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if this **StringName** is not equivalent to the given :ref:`String`. + +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator !=** **(** :ref:`StringName` right **)** +.. _class_StringName_operator_neq_StringName: -.. container:: contribute +.. rst-class:: classref-operator - There is currently no description for this operator. Please help us by :ref:`contributing one `! +:ref:`bool` **operator !=** **(** :ref:`StringName` right **)** + +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` comparisons. + +.. rst-class:: classref-item-separator ---- -.. _class_StringName_operator_lt_bool: +.. _class_StringName_operator_lt_StringName: -- :ref:`bool` **operator <** **(** :ref:`StringName` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator <** **(** :ref:`StringName` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left :ref:`String` comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. + +.. rst-class:: classref-item-separator ---- -.. _class_StringName_operator_lte_bool: +.. _class_StringName_operator_lte_StringName: -- :ref:`bool` **operator <=** **(** :ref:`StringName` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator <=** **(** :ref:`StringName` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left :ref:`String` comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are equal. + +.. rst-class:: classref-item-separator ---- -.. _class_StringName_operator_eq_bool: +.. _class_StringName_operator_eq_String: -- :ref:`bool` **operator ==** **(** :ref:`String` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator ==** **(** :ref:`String` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if this **StringName** is equivalent to the given :ref:`String`. + +.. rst-class:: classref-item-separator ---- -- :ref:`bool` **operator ==** **(** :ref:`StringName` right **)** +.. _class_StringName_operator_eq_StringName: -.. container:: contribute +.. rst-class:: classref-operator - There is currently no description for this operator. Please help us by :ref:`contributing one `! +:ref:`bool` **operator ==** **(** :ref:`StringName` right **)** + +Returns ``true`` if the **StringName** and ``right`` refer to the same name. Comparisons between **StringName**\ s are much faster than regular :ref:`String` comparisons. + +.. rst-class:: classref-item-separator ---- -.. _class_StringName_operator_gt_bool: +.. _class_StringName_operator_gt_StringName: -- :ref:`bool` **operator >** **(** :ref:`StringName` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator >** **(** :ref:`StringName` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. + +.. rst-class:: classref-item-separator ---- -.. _class_StringName_operator_gte_bool: +.. _class_StringName_operator_gte_StringName: -- :ref:`bool` **operator >=** **(** :ref:`StringName` right **)** +.. rst-class:: classref-operator -.. container:: contribute +:ref:`bool` **operator >=** **(** :ref:`StringName` right **)** - There is currently no description for this operator. Please help us by :ref:`contributing one `! +Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are 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.)` diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index e6896c90a..7524e6537 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -16,75 +16,92 @@ StyleBox Base class for drawing stylized boxes for the UI. +.. rst-class:: classref-introduction-group + Description ----------- StyleBox is :ref:`Resource` that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. -\ **Note:** For children of :ref:`Control` that have *Theme Properties*, the ``focus`` ``StyleBox`` is displayed over the ``normal``, ``hover`` or ``pressed`` ``StyleBox``. This makes the ``focus`` ``StyleBox`` more reusable across different nodes. +\ **Note:** For children of :ref:`Control` that have *Theme Properties*, the ``focus`` **StyleBox** is displayed over the ``normal``, ``hover`` or ``pressed`` **StyleBox**. This makes the ``focus`` **StyleBox** more reusable across different nodes. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_bottom` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_left` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_right` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_top` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`content_margin_bottom` | ``-1.0`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`content_margin_left` | ``-1.0`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`content_margin_right` | ``-1.0`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`content_margin_top` | ``-1.0`` | + +---------------------------+-----------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_center_size` **(** **)** |virtual| |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`_get_draw_rect` **(** :ref:`Rect2` rect **)** |virtual| |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_get_style_margin` **(** :ref:`Side` side **)** |virtual| |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_center_size` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CanvasItem` | :ref:`get_current_item_drawn` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_default_margin` **(** :ref:`Side` margin **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_margin` **(** :ref:`Side` margin **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_offset` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_margin` **(** :ref:`Side` margin, :ref:`float` offset **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_margin_all` **(** :ref:`float` offset **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_center_size` **(** **)** |virtual| |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`_get_draw_rect` **(** :ref:`Rect2` rect **)** |virtual| |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_style_margin` **(** :ref:`Side` side **)** |virtual| |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_center_size` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CanvasItem` | :ref:`get_current_item_drawn` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_default_margin` **(** :ref:`Side` margin **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_margin` **(** :ref:`Side` margin **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_offset` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_margin` **(** :ref:`Side` margin, :ref:`float` offset **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_margin_all` **(** :ref:`float` offset **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StyleBox_property_content_margin_bottom: -- :ref:`float` **content_margin_bottom** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ +:ref:`float` **content_margin_bottom** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_default_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** +- :ref:`float` **get_default_margin** **(** :ref:`Side` margin **)** |const| The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom. @@ -94,192 +111,259 @@ It is up to the code using this style box to decide what these contents are: for \ :ref:`get_margin` should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_property_content_margin_left: -- :ref:`float` **content_margin_left** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ +:ref:`float` **content_margin_left** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_default_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** +- :ref:`float` **get_default_margin** **(** :ref:`Side` margin **)** |const| 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` for extra considerations. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_property_content_margin_right: -- :ref:`float` **content_margin_right** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ +:ref:`float` **content_margin_right** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_default_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** +- :ref:`float` **get_default_margin** **(** :ref:`Side` margin **)** |const| The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right. Refer to :ref:`content_margin_bottom` for extra considerations. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_property_content_margin_top: -- :ref:`float` **content_margin_top** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ +:ref:`float` **content_margin_top** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_default_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** +- :ref:`float` **get_default_margin** **(** :ref:`Side` margin **)** |const| The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top. Refer to :ref:`content_margin_bottom` for extra considerations. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_StyleBox_method__draw: -- void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| +.. rst-class:: classref-method + +void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method__get_center_size: -- :ref:`Vector2` **_get_center_size** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_center_size** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method__get_draw_rect: -- :ref:`Rect2` **_get_draw_rect** **(** :ref:`Rect2` rect **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Rect2` **_get_draw_rect** **(** :ref:`Rect2` rect **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method__get_style_margin: -- :ref:`float` **_get_style_margin** **(** :ref:`Side` side **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_get_style_margin** **(** :ref:`Side` side **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method__test_mask: -- :ref:`bool` **_test_mask** **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_test_mask** **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_draw: -- void **draw** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| +.. rst-class:: classref-method + +void **draw** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| Draws this stylebox using a canvas item identified by the given :ref:`RID`. The :ref:`RID` value can either be the result of :ref:`CanvasItem.get_canvas_item` called on an existing :ref:`CanvasItem`-derived node, or directly from creating a canvas item in the :ref:`RenderingServer` with :ref:`RenderingServer.canvas_item_create`. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_get_center_size: -- :ref:`Vector2` **get_center_size** **(** **)** |const| +.. rst-class:: classref-method -Returns the size of this ``StyleBox`` without the margins. +:ref:`Vector2` **get_center_size** **(** **)** |const| + +Returns the size of this **StyleBox** without the margins. + +.. rst-class:: classref-item-separator ---- .. _class_StyleBox_method_get_current_item_drawn: -- :ref:`CanvasItem` **get_current_item_drawn** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`CanvasItem` **get_current_item_drawn** **(** **)** |const| Returns the :ref:`CanvasItem` that handles its :ref:`CanvasItem.NOTIFICATION_DRAW` or :ref:`CanvasItem._draw` callback at this moment. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_get_default_margin: -- :ref:`float` **get_default_margin** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_default_margin** **(** :ref:`Side` margin **)** |const| Returns the default margin of the specified :ref:`Side`. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_get_margin: -- :ref:`float` **get_margin** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_margin** **(** :ref:`Side` margin **)** |const| Returns the content margin offset for the specified :ref:`Side`. Positive values reduce size inwards, unlike :ref:`Control`'s margin values. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_get_minimum_size: -- :ref:`Vector2` **get_minimum_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_minimum_size** **(** **)** |const| Returns the minimum size that this stylebox can be shrunk to. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_get_offset: -- :ref:`Vector2` **get_offset** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_offset** **(** **)** |const| 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))``. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_set_default_margin: -- void **set_default_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** +.. rst-class:: classref-method + +void **set_default_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** Sets the default value of the specified :ref:`Side` to ``offset`` pixels. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_set_default_margin_all: -- void **set_default_margin_all** **(** :ref:`float` offset **)** +.. rst-class:: classref-method + +void **set_default_margin_all** **(** :ref:`float` offset **)** Sets the default margin to ``offset`` pixels for all sides. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBox_method_test_mask: -- :ref:`bool` **test_mask** **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **test_mask** **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |const| Test a position in a rectangle, return whether it passes the mask test. diff --git a/classes/class_styleboxempty.rst b/classes/class_styleboxempty.rst index a2c99024c..e9eb75427 100644 --- a/classes/class_styleboxempty.rst +++ b/classes/class_styleboxempty.rst @@ -14,6 +14,8 @@ StyleBoxEmpty Empty stylebox (does not display anything). +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index a29966d5e..5cc02259e 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -14,6 +14,8 @@ StyleBoxFlat Customizable :ref:`StyleBox` with a given set of parameters (no texture required). +.. rst-class:: classref-introduction-group + Description ----------- @@ -44,242 +46,266 @@ The relative system now would take the 1:2 ratio of the two left corners to calc corner_radius_top_left: 10 corner_radius_bottom_left: 20 +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`anti_aliasing` | ``true`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`anti_aliasing_size` | ``0.625`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`bg_color` | ``Color(0.6, 0.6, 0.6, 1)`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`border_blend` | ``false`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`border_color` | ``Color(0.8, 0.8, 0.8, 1)`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`border_width_bottom` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`border_width_left` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`border_width_right` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`border_width_top` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`corner_detail` | ``8`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`corner_radius_bottom_left` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`corner_radius_bottom_right` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`corner_radius_top_left` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`corner_radius_top_right` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`draw_center` | ``true`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`expand_margin_bottom` | ``0.0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`expand_margin_left` | ``0.0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`expand_margin_right` | ``0.0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`expand_margin_top` | ``0.0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0.6)`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(0, 0)`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`shadow_size` | ``0`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`Vector2` | :ref:`skew` | ``Vector2(0, 0)`` | -+-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`bool` | :ref:`anti_aliasing` | ``true`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`float` | :ref:`anti_aliasing_size` | ``0.625`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`bg_color` | ``Color(0.6, 0.6, 0.6, 1)`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`bool` | :ref:`border_blend` | ``false`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`border_color` | ``Color(0.8, 0.8, 0.8, 1)`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`border_width_bottom` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`border_width_left` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`border_width_right` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`border_width_top` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`corner_detail` | ``8`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`corner_radius_bottom_left` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`corner_radius_bottom_right` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`corner_radius_top_left` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`corner_radius_top_right` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`bool` | :ref:`draw_center` | ``true`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`float` | :ref:`expand_margin_bottom` | ``0.0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`float` | :ref:`expand_margin_left` | ``0.0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`float` | :ref:`expand_margin_right` | ``0.0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`float` | :ref:`expand_margin_top` | ``0.0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0.6)`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(0, 0)`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`int` | :ref:`shadow_size` | ``0`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + | :ref:`Vector2` | :ref:`skew` | ``Vector2(0, 0)`` | + +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_border_width` **(** :ref:`Side` margin **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_border_width_min` **(** **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_corner_radius` **(** :ref:`Corner` corner **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_expand_margin` **(** :ref:`Side` margin **)** |const| | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_border_width` **(** :ref:`Side` margin, :ref:`int` width **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_border_width_all` **(** :ref:`int` width **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_corner_radius` **(** :ref:`Corner` corner, :ref:`int` radius **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_corner_radius_all` **(** :ref:`int` radius **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand_margin` **(** :ref:`Side` margin, :ref:`float` size **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand_margin_all` **(** :ref:`float` size **)** | -+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_border_width` **(** :ref:`Side` margin **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_border_width_min` **(** **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_corner_radius` **(** :ref:`Corner` corner **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_expand_margin` **(** :ref:`Side` margin **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_border_width` **(** :ref:`Side` margin, :ref:`int` width **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_border_width_all` **(** :ref:`int` width **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_corner_radius` **(** :ref:`Corner` corner, :ref:`int` radius **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_corner_radius_all` **(** :ref:`int` radius **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_expand_margin` **(** :ref:`Side` margin, :ref:`float` size **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_expand_margin_all` **(** :ref:`float` size **)** | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StyleBoxFlat_property_anti_aliasing: -- :ref:`bool` **anti_aliasing** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_anti_aliased(value) | -+-----------+-------------------------+ -| *Getter* | is_anti_aliased() | -+-----------+-------------------------+ +:ref:`bool` **anti_aliasing** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_anti_aliased** **(** :ref:`bool` value **)** +- :ref:`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`. \ **Note:** When using beveled corners with 45-degree angles (:ref:`corner_detail` = 1), it is recommended to set :ref:`anti_aliasing` to ``false`` to ensure crisp visuals and avoid possible visual glitches. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_anti_aliasing_size: -- :ref:`float` **anti_aliasing_size** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0.625`` | -+-----------+--------------------+ -| *Setter* | set_aa_size(value) | -+-----------+--------------------+ -| *Getter* | get_aa_size() | -+-----------+--------------------+ +:ref:`float` **anti_aliasing_size** = ``0.625`` + +.. rst-class:: classref-property-setget + +- void **set_aa_size** **(** :ref:`float` value **)** +- :ref:`float` **get_aa_size** **(** **)** This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_bg_color: -- :ref:`Color` **bg_color** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(0.6, 0.6, 0.6, 1)`` | -+-----------+-----------------------------+ -| *Setter* | set_bg_color(value) | -+-----------+-----------------------------+ -| *Getter* | get_bg_color() | -+-----------+-----------------------------+ +:ref:`Color` **bg_color** = ``Color(0.6, 0.6, 0.6, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_bg_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_bg_color** **(** **)** The background color of the stylebox. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_border_blend: -- :ref:`bool` **border_blend** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_border_blend(value) | -+-----------+-------------------------+ -| *Getter* | get_border_blend() | -+-----------+-------------------------+ +:ref:`bool` **border_blend** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_border_blend** **(** :ref:`bool` value **)** +- :ref:`bool` **get_border_blend** **(** **)** If ``true``, the border will fade into the background color. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_border_color: -- :ref:`Color` **border_color** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Color(0.8, 0.8, 0.8, 1)`` | -+-----------+-----------------------------+ -| *Setter* | set_border_color(value) | -+-----------+-----------------------------+ -| *Getter* | get_border_color() | -+-----------+-----------------------------+ +:ref:`Color` **border_color** = ``Color(0.8, 0.8, 0.8, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_border_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_border_color** **(** **)** Sets the color of the border. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_border_width_bottom: -- :ref:`int` **border_width_bottom** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_border_width(value) | -+-----------+-------------------------+ -| *Getter* | get_border_width() | -+-----------+-------------------------+ +:ref:`int` **border_width_bottom** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_border_width** **(** :ref:`Side` margin, :ref:`int` width **)** +- :ref:`int` **get_border_width** **(** :ref:`Side` margin **)** |const| Border width for the bottom border. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_border_width_left: -- :ref:`int` **border_width_left** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_border_width(value) | -+-----------+-------------------------+ -| *Getter* | get_border_width() | -+-----------+-------------------------+ +:ref:`int` **border_width_left** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_border_width** **(** :ref:`Side` margin, :ref:`int` width **)** +- :ref:`int` **get_border_width** **(** :ref:`Side` margin **)** |const| Border width for the left border. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_border_width_right: -- :ref:`int` **border_width_right** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_border_width(value) | -+-----------+-------------------------+ -| *Getter* | get_border_width() | -+-----------+-------------------------+ +:ref:`int` **border_width_right** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_border_width** **(** :ref:`Side` margin, :ref:`int` width **)** +- :ref:`int` **get_border_width** **(** :ref:`Side` margin **)** |const| Border width for the right border. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_border_width_top: -- :ref:`int` **border_width_top** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_border_width(value) | -+-----------+-------------------------+ -| *Getter* | get_border_width() | -+-----------+-------------------------+ +:ref:`int` **border_width_top** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_border_width** **(** :ref:`Side` margin, :ref:`int` width **)** +- :ref:`int` **get_border_width** **(** :ref:`Side` margin **)** |const| Border width for the top border. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_corner_detail: -- :ref:`int` **corner_detail** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``8`` | -+-----------+--------------------------+ -| *Setter* | set_corner_detail(value) | -+-----------+--------------------------+ -| *Getter* | get_corner_detail() | -+-----------+--------------------------+ +:ref:`int` **corner_detail** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_corner_detail** **(** :ref:`int` value **)** +- :ref:`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`) into account. @@ -287,302 +313,359 @@ For corner radii less than 10, ``4`` or ``5`` should be enough. For corner radii A corner detail of ``1`` will result in chamfered corners instead of rounded corners, which is useful for some artistic effects. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_corner_radius_bottom_left: -- :ref:`int` **corner_radius_bottom_left** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_corner_radius(value) | -+-----------+--------------------------+ -| *Getter* | get_corner_radius() | -+-----------+--------------------------+ +:ref:`int` **corner_radius_bottom_left** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_corner_radius** **(** :ref:`Corner` corner, :ref:`int` radius **)** +- :ref:`int` **get_corner_radius** **(** :ref:`Corner` corner **)** |const| The bottom-left corner's radius. If ``0``, the corner is not rounded. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_corner_radius_bottom_right: -- :ref:`int` **corner_radius_bottom_right** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_corner_radius(value) | -+-----------+--------------------------+ -| *Getter* | get_corner_radius() | -+-----------+--------------------------+ +:ref:`int` **corner_radius_bottom_right** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_corner_radius** **(** :ref:`Corner` corner, :ref:`int` radius **)** +- :ref:`int` **get_corner_radius** **(** :ref:`Corner` corner **)** |const| The bottom-right corner's radius. If ``0``, the corner is not rounded. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_corner_radius_top_left: -- :ref:`int` **corner_radius_top_left** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_corner_radius(value) | -+-----------+--------------------------+ -| *Getter* | get_corner_radius() | -+-----------+--------------------------+ +:ref:`int` **corner_radius_top_left** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_corner_radius** **(** :ref:`Corner` corner, :ref:`int` radius **)** +- :ref:`int` **get_corner_radius** **(** :ref:`Corner` corner **)** |const| The top-left corner's radius. If ``0``, the corner is not rounded. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_corner_radius_top_right: -- :ref:`int` **corner_radius_top_right** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_corner_radius(value) | -+-----------+--------------------------+ -| *Getter* | get_corner_radius() | -+-----------+--------------------------+ +:ref:`int` **corner_radius_top_right** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_corner_radius** **(** :ref:`Corner` corner, :ref:`int` radius **)** +- :ref:`int` **get_corner_radius** **(** :ref:`Corner` corner **)** |const| The top-right corner's radius. If ``0``, the corner is not rounded. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_draw_center: -- :ref:`bool` **draw_center** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_draw_center(value) | -+-----------+--------------------------+ -| *Getter* | is_draw_center_enabled() | -+-----------+--------------------------+ +:ref:`bool` **draw_center** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draw_center** **(** :ref:`bool` value **)** +- :ref:`bool` **is_draw_center_enabled** **(** **)** Toggles drawing of the inner part of the stylebox. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_expand_margin_bottom: -- :ref:`float` **expand_margin_bottom** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_expand_margin(value) | -+-----------+--------------------------+ -| *Getter* | get_expand_margin() | -+-----------+--------------------------+ +:ref:`float` **expand_margin_bottom** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin** **(** :ref:`Side` margin **)** |const| Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with :ref:`border_width_bottom` to draw a border outside the control rect. \ **Note:** Unlike :ref:`StyleBox.content_margin_bottom`, :ref:`expand_margin_bottom` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_expand_margin_left: -- :ref:`float` **expand_margin_left** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_expand_margin(value) | -+-----------+--------------------------+ -| *Getter* | get_expand_margin() | -+-----------+--------------------------+ +:ref:`float` **expand_margin_left** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin** **(** :ref:`Side` margin **)** |const| Expands the stylebox outside of the control rect on the left edge. Useful in combination with :ref:`border_width_left` to draw a border outside the control rect. \ **Note:** Unlike :ref:`StyleBox.content_margin_left`, :ref:`expand_margin_left` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_expand_margin_right: -- :ref:`float` **expand_margin_right** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_expand_margin(value) | -+-----------+--------------------------+ -| *Getter* | get_expand_margin() | -+-----------+--------------------------+ +:ref:`float` **expand_margin_right** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin** **(** :ref:`Side` margin **)** |const| Expands the stylebox outside of the control rect on the right edge. Useful in combination with :ref:`border_width_right` to draw a border outside the control rect. \ **Note:** Unlike :ref:`StyleBox.content_margin_right`, :ref:`expand_margin_right` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_expand_margin_top: -- :ref:`float` **expand_margin_top** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_expand_margin(value) | -+-----------+--------------------------+ -| *Getter* | get_expand_margin() | -+-----------+--------------------------+ +:ref:`float` **expand_margin_top** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin** **(** :ref:`Side` margin **)** |const| Expands the stylebox outside of the control rect on the top edge. Useful in combination with :ref:`border_width_top` to draw a border outside the control rect. \ **Note:** Unlike :ref:`StyleBox.content_margin_top`, :ref:`expand_margin_top` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_shadow_color: -- :ref:`Color` **shadow_color** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 0.6)`` | -+-----------+-------------------------+ -| *Setter* | set_shadow_color(value) | -+-----------+-------------------------+ -| *Getter* | get_shadow_color() | -+-----------+-------------------------+ +:ref:`Color` **shadow_color** = ``Color(0, 0, 0, 0.6)`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_shadow_color** **(** **)** The color of the shadow. This has no effect if :ref:`shadow_size` is lower than 1. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_shadow_offset: -- :ref:`Vector2` **shadow_offset** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_shadow_offset(value) | -+-----------+--------------------------+ -| *Getter* | get_shadow_offset() | -+-----------+--------------------------+ +:ref:`Vector2` **shadow_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_shadow_offset** **(** **)** The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_shadow_size: -- :ref:`int` **shadow_size** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_shadow_size(value) | -+-----------+------------------------+ -| *Getter* | get_shadow_size() | -+-----------+------------------------+ +:ref:`int` **shadow_size** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_shadow_size** **(** :ref:`int` value **)** +- :ref:`int` **get_shadow_size** **(** **)** The shadow size in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_property_skew: -- :ref:`Vector2` **skew** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_skew(value) | -+-----------+-------------------+ -| *Getter* | get_skew() | -+-----------+-------------------+ +:ref:`Vector2` **skew** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_skew** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_skew** **(** **)** If set to a non-zero value on either axis, :ref:`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). \ **Note:** To ensure text does not touch the StyleBox's edges, consider increasing the :ref:`StyleBox`'s content margin (see :ref:`StyleBox.content_margin_bottom`). It is preferable to increase the content margin instead of the expand margin (see :ref:`expand_margin_bottom`), as increasing the expand margin does not increase the size of the clickable area for :ref:`Control`\ s. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_StyleBoxFlat_method_get_border_width: -- :ref:`int` **get_border_width** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_border_width** **(** :ref:`Side` margin **)** |const| Returns the specified :ref:`Side`'s border width. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_get_border_width_min: -- :ref:`int` **get_border_width_min** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_border_width_min** **(** **)** |const| Returns the smallest border width out of all four borders. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_get_corner_radius: -- :ref:`int` **get_corner_radius** **(** :ref:`Corner` corner **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_corner_radius** **(** :ref:`Corner` corner **)** |const| Returns the given ``corner``'s radius. See :ref:`Corner` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_get_expand_margin: -- :ref:`float` **get_expand_margin** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_expand_margin** **(** :ref:`Side` margin **)** |const| Returns the size of the specified :ref:`Side`'s expand margin. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_set_border_width: -- void **set_border_width** **(** :ref:`Side` margin, :ref:`int` width **)** +.. rst-class:: classref-method + +void **set_border_width** **(** :ref:`Side` margin, :ref:`int` width **)** Sets the specified :ref:`Side`'s border width to ``width`` pixels. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_set_border_width_all: -- void **set_border_width_all** **(** :ref:`int` width **)** +.. rst-class:: classref-method + +void **set_border_width_all** **(** :ref:`int` width **)** Sets the border width to ``width`` pixels for all sides. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_set_corner_radius: -- void **set_corner_radius** **(** :ref:`Corner` corner, :ref:`int` radius **)** +.. rst-class:: classref-method + +void **set_corner_radius** **(** :ref:`Corner` corner, :ref:`int` radius **)** Sets the corner radius to ``radius`` pixels for the given ``corner``. See :ref:`Corner` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_set_corner_radius_all: -- void **set_corner_radius_all** **(** :ref:`int` radius **)** +.. rst-class:: classref-method + +void **set_corner_radius_all** **(** :ref:`int` radius **)** Sets the corner radius to ``radius`` pixels for all corners. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_set_expand_margin: -- void **set_expand_margin** **(** :ref:`Side` margin, :ref:`float` size **)** +.. rst-class:: classref-method + +void **set_expand_margin** **(** :ref:`Side` margin, :ref:`float` size **)** Sets the expand margin to ``size`` pixels for the specified :ref:`Side`. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxFlat_method_set_expand_margin_all: -- void **set_expand_margin_all** **(** :ref:`float` size **)** +.. rst-class:: classref-method + +void **set_expand_margin_all** **(** :ref:`float` size **)** Sets the expand margin to ``size`` pixels for all margins. diff --git a/classes/class_styleboxline.rst b/classes/class_styleboxline.rst index c78a30fe1..3d942771a 100644 --- a/classes/class_styleboxline.rst +++ b/classes/class_styleboxline.rst @@ -14,104 +14,120 @@ StyleBoxLine :ref:`StyleBox` that displays a single line. +.. rst-class:: classref-introduction-group + Description ----------- :ref:`StyleBox` that displays a single line of a given color and thickness. It can be used to draw things like separators. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | -+---------------------------+-----------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`grow_begin` | ``1.0`` | -+---------------------------+-----------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`grow_end` | ``1.0`` | -+---------------------------+-----------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`thickness` | ``1`` | -+---------------------------+-----------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`vertical` | ``false`` | -+---------------------------+-----------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | + +---------------------------+-----------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`grow_begin` | ``1.0`` | + +---------------------------+-----------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`grow_end` | ``1.0`` | + +---------------------------+-----------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`thickness` | ``1`` | + +---------------------------+-----------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`vertical` | ``false`` | + +---------------------------+-----------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StyleBoxLine_property_color: -- :ref:`Color` **color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_color(value) | -+-----------+-----------------------+ -| *Getter* | get_color() | -+-----------+-----------------------+ +:ref:`Color` **color** = ``Color(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_color** **(** :ref:`Color` value **)** +- :ref:`Color` **get_color** **(** **)** The line's color. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxLine_property_grow_begin: -- :ref:`float` **grow_begin** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------+ -| *Setter* | set_grow_begin(value) | -+-----------+-----------------------+ -| *Getter* | get_grow_begin() | -+-----------+-----------------------+ +:ref:`float` **grow_begin** = ``1.0`` -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. +.. rst-class:: classref-property-setget + +- void **set_grow_begin** **(** :ref:`float` value **)** +- :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_StyleBoxLine_property_grow_end: -- :ref:`float` **grow_end** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_grow_end(value) | -+-----------+---------------------+ -| *Getter* | get_grow_end() | -+-----------+---------------------+ +:ref:`float` **grow_end** = ``1.0`` -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. +.. rst-class:: classref-property-setget + +- void **set_grow_end** **(** :ref:`float` value **)** +- :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_StyleBoxLine_property_thickness: -- :ref:`int` **thickness** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1`` | -+-----------+----------------------+ -| *Setter* | set_thickness(value) | -+-----------+----------------------+ -| *Getter* | get_thickness() | -+-----------+----------------------+ +:ref:`int` **thickness** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_thickness** **(** :ref:`int` value **)** +- :ref:`int` **get_thickness** **(** **)** The line's thickness in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxLine_property_vertical: -- :ref:`bool` **vertical** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_vertical(value) | -+-----------+---------------------+ -| *Getter* | is_vertical() | -+-----------+---------------------+ +:ref:`bool` **vertical** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_vertical** **(** :ref:`bool` value **)** +- :ref:`bool` **is_vertical** **(** **)** If ``true``, the line will be vertical. If ``false``, the line will be horizontal. diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst index 263c517b0..e02519830 100644 --- a/classes/class_styleboxtexture.rst +++ b/classes/class_styleboxtexture.rst @@ -14,206 +14,250 @@ StyleBoxTexture Texture-based nine-patch :ref:`StyleBox`. +.. rst-class:: classref-introduction-group + Description ----------- Texture-based nine-patch :ref:`StyleBox`, in a way similar to :ref:`NinePatchRect`. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`AxisStretchMode` | :ref:`axis_stretch_horizontal` | ``0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`AxisStretchMode` | :ref:`axis_stretch_vertical` | ``0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`draw_center` | ``true`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`expand_margin_bottom` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`expand_margin_left` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`expand_margin_right` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`expand_margin_top` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`margin_bottom` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`margin_left` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`margin_right` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`margin_top` | ``0.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`modulate_color` | ``Color(1, 1, 1, 1)`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`AxisStretchMode` | :ref:`axis_stretch_horizontal` | ``0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`AxisStretchMode` | :ref:`axis_stretch_vertical` | ``0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`draw_center` | ``true`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`expand_margin_bottom` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`expand_margin_left` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`expand_margin_right` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`expand_margin_top` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`margin_bottom` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`margin_left` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`margin_right` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`margin_top` | ``0.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`modulate_color` | ``Color(1, 1, 1, 1)`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Rect2` | :ref:`region_rect` | ``Rect2(0, 0, 0, 0)`` | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_expand_margin_size` **(** :ref:`Side` margin **)** |const| | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_margin_size` **(** :ref:`Side` margin **)** |const| | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand_margin_all` **(** :ref:`float` size **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand_margin_size` **(** :ref:`Side` margin, :ref:`float` size **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_margin_size` **(** :ref:`Side` margin, :ref:`float` size **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_margin_size_all` **(** :ref:`float` size **)** | -+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_expand_margin_size` **(** :ref:`Side` margin **)** |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_margin_size` **(** :ref:`Side` margin **)** |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_expand_margin_all` **(** :ref:`float` size **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_expand_margin_size` **(** :ref:`Side` margin, :ref:`float` size **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_margin_size` **(** :ref:`Side` margin, :ref:`float` size **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_margin_size_all` **(** :ref:`float` size **)** | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_StyleBoxTexture_AxisStretchMode: -.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_STRETCH: - -.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE: - -.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE_FIT: +.. rst-class:: classref-enumeration enum **AxisStretchMode**: -- **AXIS_STRETCH_MODE_STRETCH** = **0** --- Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly. +.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_STRETCH: -- **AXIS_STRETCH_MODE_TILE** = **1** --- Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. +.. rst-class:: classref-enumeration-constant -- **AXIS_STRETCH_MODE_TILE_FIT** = **2** --- Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike :ref:`AXIS_STRETCH_MODE_TILE`, the texture may be slightly stretched to make the nine-patch texture tile seamlessly. +:ref:`AxisStretchMode` **AXIS_STRETCH_MODE_STRETCH** = ``0`` + +Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly. + +.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisStretchMode` **AXIS_STRETCH_MODE_TILE** = ``1`` + +Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. + +.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE_FIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisStretchMode` **AXIS_STRETCH_MODE_TILE_FIT** = ``2`` + +Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike :ref:`AXIS_STRETCH_MODE_TILE`, the texture may be slightly stretched to make the nine-patch texture tile seamlessly. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StyleBoxTexture_property_axis_stretch_horizontal: -- :ref:`AxisStretchMode` **axis_stretch_horizontal** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_h_axis_stretch_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_h_axis_stretch_mode() | -+-----------+--------------------------------+ +:ref:`AxisStretchMode` **axis_stretch_horizontal** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_h_axis_stretch_mode** **(** :ref:`AxisStretchMode` value **)** +- :ref:`AxisStretchMode` **get_h_axis_stretch_mode** **(** **)** Controls how the stylebox's texture will be stretched or tiled horizontally. See :ref:`AxisStretchMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_axis_stretch_vertical: -- :ref:`AxisStretchMode` **axis_stretch_vertical** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_v_axis_stretch_mode(value) | -+-----------+--------------------------------+ -| *Getter* | get_v_axis_stretch_mode() | -+-----------+--------------------------------+ +:ref:`AxisStretchMode` **axis_stretch_vertical** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_v_axis_stretch_mode** **(** :ref:`AxisStretchMode` value **)** +- :ref:`AxisStretchMode` **get_v_axis_stretch_mode** **(** **)** Controls how the stylebox's texture will be stretched or tiled vertically. See :ref:`AxisStretchMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_draw_center: -- :ref:`bool` **draw_center** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_draw_center(value) | -+-----------+--------------------------+ -| *Getter* | is_draw_center_enabled() | -+-----------+--------------------------+ +:ref:`bool` **draw_center** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draw_center** **(** :ref:`bool` value **)** +- :ref:`bool` **is_draw_center_enabled** **(** **)** If ``true``, the nine-patch texture's center tile will be drawn. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_expand_margin_bottom: -- :ref:`float` **expand_margin_bottom** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_expand_margin_size(value) | -+-----------+-------------------------------+ -| *Getter* | get_expand_margin_size() | -+-----------+-------------------------------+ +:ref:`float` **expand_margin_bottom** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin_size** **(** :ref:`Side` margin **)** |const| Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_expand_margin_left: -- :ref:`float` **expand_margin_left** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_expand_margin_size(value) | -+-----------+-------------------------------+ -| *Getter* | get_expand_margin_size() | -+-----------+-------------------------------+ +:ref:`float` **expand_margin_left** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin_size** **(** :ref:`Side` margin **)** |const| Expands the left margin of this style box when drawing, causing it to be drawn larger than requested. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_expand_margin_right: -- :ref:`float` **expand_margin_right** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_expand_margin_size(value) | -+-----------+-------------------------------+ -| *Getter* | get_expand_margin_size() | -+-----------+-------------------------------+ +:ref:`float` **expand_margin_right** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin_size** **(** :ref:`Side` margin **)** |const| Expands the right margin of this style box when drawing, causing it to be drawn larger than requested. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_expand_margin_top: -- :ref:`float` **expand_margin_top** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_expand_margin_size(value) | -+-----------+-------------------------------+ -| *Getter* | get_expand_margin_size() | -+-----------+-------------------------------+ +:ref:`float` **expand_margin_top** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_expand_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_expand_margin_size** **(** :ref:`Side` margin **)** |const| Expands the top margin of this style box when drawing, causing it to be drawn larger than requested. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_margin_bottom: -- :ref:`float` **margin_bottom** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_margin_size(value) | -+-----------+------------------------+ -| *Getter* | get_margin_size() | -+-----------+------------------------+ +:ref:`float` **margin_bottom** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_margin_size** **(** :ref:`Side` margin **)** |const| Increases the bottom margin of the 3×3 texture box. @@ -221,19 +265,20 @@ A higher value means more of the source texture is considered to be part of the This is also the value used as fallback for :ref:`StyleBox.content_margin_bottom` if it is negative. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_margin_left: -- :ref:`float` **margin_left** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_margin_size(value) | -+-----------+------------------------+ -| *Getter* | get_margin_size() | -+-----------+------------------------+ +:ref:`float` **margin_left** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_margin_size** **(** :ref:`Side` margin **)** |const| Increases the left margin of the 3×3 texture box. @@ -241,19 +286,20 @@ A higher value means more of the source texture is considered to be part of the This is also the value used as fallback for :ref:`StyleBox.content_margin_left` if it is negative. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_margin_right: -- :ref:`float` **margin_right** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_margin_size(value) | -+-----------+------------------------+ -| *Getter* | get_margin_size() | -+-----------+------------------------+ +:ref:`float` **margin_right** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_margin_size** **(** :ref:`Side` margin **)** |const| Increases the right margin of the 3×3 texture box. @@ -261,19 +307,20 @@ A higher value means more of the source texture is considered to be part of the This is also the value used as fallback for :ref:`StyleBox.content_margin_right` if it is negative. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_margin_top: -- :ref:`float` **margin_top** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_margin_size(value) | -+-----------+------------------------+ -| *Getter* | get_margin_size() | -+-----------+------------------------+ +:ref:`float` **margin_top** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +- :ref:`float` **get_margin_size** **(** :ref:`Side` margin **)** |const| Increases the top margin of the 3×3 texture box. @@ -281,100 +328,133 @@ A higher value means more of the source texture is considered to be part of the This is also the value used as fallback for :ref:`StyleBox.content_margin_top` if it is negative. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_modulate_color: -- :ref:`Color` **modulate_color** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_modulate(value) | -+-----------+-----------------------+ -| *Getter* | get_modulate() | -+-----------+-----------------------+ +:ref:`Color` **modulate_color** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_modulate** **(** :ref:`Color` value **)** +- :ref:`Color` **get_modulate** **(** **)** Modulates the color of the texture when this style box is drawn. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_region_rect: -- :ref:`Rect2` **region_rect** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Rect2(0, 0, 0, 0)`` | -+-----------+------------------------+ -| *Setter* | set_region_rect(value) | -+-----------+------------------------+ -| *Getter* | get_region_rect() | -+-----------+------------------------+ +:ref:`Rect2` **region_rect** = ``Rect2(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_region_rect** **(** :ref:`Rect2` value **)** +- :ref:`Rect2` **get_region_rect** **(** **)** Species a sub-region of the texture to use. This is equivalent to first wrapping the texture in an :ref:`AtlasTexture` with the same region. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The texture to use when drawing this style box. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_StyleBoxTexture_method_get_expand_margin_size: -- :ref:`float` **get_expand_margin_size** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_expand_margin_size** **(** :ref:`Side` margin **)** |const| Returns the expand margin size of the specified :ref:`Side`. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_method_get_margin_size: -- :ref:`float` **get_margin_size** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_margin_size** **(** :ref:`Side` margin **)** |const| Returns the margin size of the specified :ref:`Side`. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_method_set_expand_margin_all: -- void **set_expand_margin_all** **(** :ref:`float` size **)** +.. rst-class:: classref-method + +void **set_expand_margin_all** **(** :ref:`float` size **)** Sets the expand margin to ``size`` pixels for all margins. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_method_set_expand_margin_size: -- void **set_expand_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +.. rst-class:: classref-method + +void **set_expand_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** Sets the expand margin to ``size`` pixels for the specified :ref:`Side`. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_method_set_margin_size: -- void **set_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** +.. rst-class:: classref-method + +void **set_margin_size** **(** :ref:`Side` margin, :ref:`float` size **)** Sets the margin to ``size`` pixels for the specified :ref:`Side`. +.. rst-class:: classref-item-separator + ---- .. _class_StyleBoxTexture_method_set_margin_size_all: -- void **set_margin_size_all** **(** :ref:`float` size **)** +.. rst-class:: classref-method + +void **set_margin_size_all** **(** :ref:`float` size **)** Sets the margin to ``size`` pixels for all sides. diff --git a/classes/class_subviewport.rst b/classes/class_subviewport.rst index 442fa5f7d..59f3a1320 100644 --- a/classes/class_subviewport.rst +++ b/classes/class_subviewport.rst @@ -14,10 +14,14 @@ SubViewport Creates a sub-view into the screen. +.. rst-class:: classref-introduction-group + Description ----------- -``SubViewport`` is a :ref:`Viewport` that isn't a :ref:`Window`, i.e. it doesn't draw anything by itself. To display something, ``SubViewport``'s :ref:`size` must be non-zero and it should be either put inside a :ref:`SubViewportContainer` or assigned to a :ref:`ViewportTexture`. +**SubViewport** is a :ref:`Viewport` that isn't a :ref:`Window`, i.e. it doesn't draw anything by itself. To display something, **SubViewport**'s :ref:`size` must be non-zero and it should be either put inside a :ref:`SubViewportContainer` or assigned to a :ref:`ViewportTexture`. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -38,146 +42,204 @@ Tutorials - `3D Viewport Scaling Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ -| :ref:`ClearMode` | :ref:`render_target_clear_mode` | ``0`` | -+------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ -| :ref:`UpdateMode` | :ref:`render_target_update_mode` | ``2`` | -+------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ -| :ref:`Vector2i` | :ref:`size` | ``Vector2i(512, 512)`` | -+------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ -| :ref:`Vector2i` | :ref:`size_2d_override` | ``Vector2i(0, 0)`` | -+------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`size_2d_override_stretch` | ``false`` | -+------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ + | :ref:`ClearMode` | :ref:`render_target_clear_mode` | ``0`` | + +------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ + | :ref:`UpdateMode` | :ref:`render_target_update_mode` | ``2`` | + +------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`size` | ``Vector2i(512, 512)`` | + +------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`size_2d_override` | ``Vector2i(0, 0)`` | + +------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`size_2d_override_stretch` | ``false`` | + +------------------------------------------------+----------------------------------------------------------------------------------------+------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_SubViewport_ClearMode: -.. _class_SubViewport_constant_CLEAR_MODE_ALWAYS: - -.. _class_SubViewport_constant_CLEAR_MODE_NEVER: - -.. _class_SubViewport_constant_CLEAR_MODE_ONCE: +.. rst-class:: classref-enumeration enum **ClearMode**: -- **CLEAR_MODE_ALWAYS** = **0** --- Always clear the render target before drawing. +.. _class_SubViewport_constant_CLEAR_MODE_ALWAYS: -- **CLEAR_MODE_NEVER** = **1** --- Never clear the render target. +.. rst-class:: classref-enumeration-constant -- **CLEAR_MODE_ONCE** = **2** --- Clear the render target on the next frame, then switch to :ref:`CLEAR_MODE_NEVER`. +:ref:`ClearMode` **CLEAR_MODE_ALWAYS** = ``0`` + +Always clear the render target before drawing. + +.. _class_SubViewport_constant_CLEAR_MODE_NEVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ClearMode` **CLEAR_MODE_NEVER** = ``1`` + +Never clear the render target. + +.. _class_SubViewport_constant_CLEAR_MODE_ONCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ClearMode` **CLEAR_MODE_ONCE** = ``2`` + +Clear the render target on the next frame, then switch to :ref:`CLEAR_MODE_NEVER`. + +.. rst-class:: classref-item-separator ---- .. _enum_SubViewport_UpdateMode: -.. _class_SubViewport_constant_UPDATE_DISABLED: - -.. _class_SubViewport_constant_UPDATE_ONCE: - -.. _class_SubViewport_constant_UPDATE_WHEN_VISIBLE: - -.. _class_SubViewport_constant_UPDATE_WHEN_PARENT_VISIBLE: - -.. _class_SubViewport_constant_UPDATE_ALWAYS: +.. rst-class:: classref-enumeration enum **UpdateMode**: -- **UPDATE_DISABLED** = **0** --- Do not update the render target. +.. _class_SubViewport_constant_UPDATE_DISABLED: -- **UPDATE_ONCE** = **1** --- Update the render target once, then switch to :ref:`UPDATE_DISABLED`. +.. rst-class:: classref-enumeration-constant -- **UPDATE_WHEN_VISIBLE** = **2** --- Update the render target only when it is visible. This is the default value. +:ref:`UpdateMode` **UPDATE_DISABLED** = ``0`` -- **UPDATE_WHEN_PARENT_VISIBLE** = **3** --- Update the render target only when its parent is visible. +Do not update the render target. -- **UPDATE_ALWAYS** = **4** --- Always update the render target. +.. _class_SubViewport_constant_UPDATE_ONCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_ONCE** = ``1`` + +Update the render target once, then switch to :ref:`UPDATE_DISABLED`. + +.. _class_SubViewport_constant_UPDATE_WHEN_VISIBLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_WHEN_VISIBLE** = ``2`` + +Update the render target only when it is visible. This is the default value. + +.. _class_SubViewport_constant_UPDATE_WHEN_PARENT_VISIBLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_WHEN_PARENT_VISIBLE** = ``3`` + +Update the render target only when its parent is visible. + +.. _class_SubViewport_constant_UPDATE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`UpdateMode` **UPDATE_ALWAYS** = ``4`` + +Always update the render target. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SubViewport_property_render_target_clear_mode: -- :ref:`ClearMode` **render_target_clear_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_clear_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_clear_mode() | -+-----------+-----------------------+ +:ref:`ClearMode` **render_target_clear_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_clear_mode** **(** :ref:`ClearMode` value **)** +- :ref:`ClearMode` **get_clear_mode** **(** **)** The clear mode when the sub-viewport is used as a render target. \ **Note:** This property is intended for 2D usage. +.. rst-class:: classref-item-separator + ---- .. _class_SubViewport_property_render_target_update_mode: -- :ref:`UpdateMode` **render_target_update_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``2`` | -+-----------+------------------------+ -| *Setter* | set_update_mode(value) | -+-----------+------------------------+ -| *Getter* | get_update_mode() | -+-----------+------------------------+ +:ref:`UpdateMode` **render_target_update_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_update_mode** **(** :ref:`UpdateMode` value **)** +- :ref:`UpdateMode` **get_update_mode** **(** **)** The update mode when the sub-viewport is used as a render target. +.. rst-class:: classref-item-separator + ---- .. _class_SubViewport_property_size: -- :ref:`Vector2i` **size** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Vector2i(512, 512)`` | -+-----------+------------------------+ -| *Setter* | set_size(value) | -+-----------+------------------------+ -| *Getter* | get_size() | -+-----------+------------------------+ +:ref:`Vector2i` **size** = ``Vector2i(512, 512)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2i` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SubViewport_property_size_2d_override: -- :ref:`Vector2i` **size_2d_override** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+-----------------------------+ -| *Setter* | set_size_2d_override(value) | -+-----------+-----------------------------+ -| *Getter* | get_size_2d_override() | -+-----------+-----------------------------+ +:ref:`Vector2i` **size_2d_override** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_size_2d_override** **(** :ref:`Vector2i` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SubViewport_property_size_2d_override_stretch: -- :ref:`bool` **size_2d_override_stretch** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------+ -| *Setter* | set_size_2d_override_stretch(value) | -+-----------+---------------------------------------+ -| *Getter* | is_size_2d_override_stretch_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **size_2d_override_stretch** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_size_2d_override_stretch** **(** :ref:`bool` value **)** +- :ref:`bool` **is_size_2d_override_stretch_enabled** **(** **)** If ``true``, the 2D size override affects stretch as well. diff --git a/classes/class_subviewportcontainer.rst b/classes/class_subviewportcontainer.rst index 447579fe0..c94fbfd8d 100644 --- a/classes/class_subviewportcontainer.rst +++ b/classes/class_subviewportcontainer.rst @@ -14,6 +14,8 @@ SubViewportContainer Control for holding :ref:`SubViewport`\ s. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,45 +25,56 @@ A :ref:`Container` node that holds a :ref:`SubViewport` | :ref:`stretch` | ``false`` | -+-------------------------+---------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`stretch_shrink` | ``1`` | -+-------------------------+---------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`stretch` | ``false`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`stretch_shrink` | ``1`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_SubViewportContainer_property_stretch: -- :ref:`bool` **stretch** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_stretch(value) | -+-----------+----------------------+ -| *Getter* | is_stretch_enabled() | -+-----------+----------------------+ +:ref:`bool` **stretch** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_stretch** **(** :ref:`bool` value **)** +- :ref:`bool` **is_stretch_enabled** **(** **)** If ``true``, the sub-viewport will be automatically resized to the control's size. +.. rst-class:: classref-item-separator + ---- .. _class_SubViewportContainer_property_stretch_shrink: -- :ref:`int` **stretch_shrink** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_stretch_shrink(value) | -+-----------+---------------------------+ -| *Getter* | get_stretch_shrink() | -+-----------+---------------------------+ +:ref:`int` **stretch_shrink** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_shrink** **(** :ref:`int` value **)** +- :ref:`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. diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 859df7c41..fc1c199c4 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -14,10 +14,12 @@ SurfaceTool Helper tool to create geometry. +.. rst-class:: classref-introduction-group + Description ----------- -The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from a script. All properties except indices need to be added before calling :ref:`add_vertex`. For example, to add vertex colors and UVs: +The **SurfaceTool** is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from a script. All properties except indices need to be added before calling :ref:`add_vertex`. For example, to add vertex colors and UVs: .. tabs:: @@ -40,7 +42,7 @@ The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying -The above ``SurfaceTool`` now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calling :ref:`set_uv` or :ref:`set_color`, then the last values would be used. +The above **SurfaceTool** now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calling :ref:`set_uv` or :ref:`set_color`, then the last values would be used. Vertex attributes must be passed **before** calling :ref:`add_vertex`. Failure to do so will result in an error when committing the vertex information to a mesh. @@ -50,245 +52,364 @@ See also :ref:`ArrayMesh`, :ref:`ImmediateMesh`__ for front faces of triangle primitive modes. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_index` **(** :ref:`int` index **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_triangle_fan` **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Array` tangents=[] **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_vertex` **(** :ref:`Vector3` vertex **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_from` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`Transform3D` transform **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`begin` **(** :ref:`PrimitiveType` primitive **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ArrayMesh` | :ref:`commit` **(** :ref:`ArrayMesh` existing=null, :ref:`int` flags=0 **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`commit_to_arrays` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_from` **(** :ref:`Mesh` existing, :ref:`int` surface **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_from_blend_shape` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`String` blend_shape **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deindex` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`generate_lod` **(** :ref:`float` nd_threshold, :ref:`int` target_index_count=3 **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generate_normals` **(** :ref:`bool` flip=false **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generate_tangents` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CustomFormat` | :ref:`get_custom_format` **(** :ref:`int` channel_index **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PrimitiveType` | :ref:`get_primitive_type` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SkinWeightCount` | :ref:`get_skin_weight_count` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`index` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`optimize_indices_for_cache` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bones` **(** :ref:`PackedInt32Array` bones **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_color` **(** :ref:`Color` color **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom` **(** :ref:`int` channel_index, :ref:`Color` custom_color **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_format` **(** :ref:`int` channel_index, :ref:`CustomFormat` format **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_material` **(** :ref:`Material` material **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_normal` **(** :ref:`Vector3` normal **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skin_weight_count` **(** :ref:`SkinWeightCount` count **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_smooth_group` **(** :ref:`int` index **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tangent` **(** :ref:`Plane` tangent **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_uv` **(** :ref:`Vector2` uv **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_uv2` **(** :ref:`Vector2` uv2 **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_weights` **(** :ref:`PackedFloat32Array` weights **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_index` **(** :ref:`int` index **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_triangle_fan` **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Array` tangents=[] **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_vertex` **(** :ref:`Vector3` vertex **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_from` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`Transform3D` transform **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`begin` **(** :ref:`PrimitiveType` primitive **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh` | :ref:`commit` **(** :ref:`ArrayMesh` existing=null, :ref:`int` flags=0 **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`commit_to_arrays` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_from` **(** :ref:`Mesh` existing, :ref:`int` surface **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_from_blend_shape` **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`String` blend_shape **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deindex` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`generate_lod` **(** :ref:`float` nd_threshold, :ref:`int` target_index_count=3 **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generate_normals` **(** :ref:`bool` flip=false **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`generate_tangents` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CustomFormat` | :ref:`get_custom_format` **(** :ref:`int` channel_index **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PrimitiveType` | :ref:`get_primitive_type` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinWeightCount` | :ref:`get_skin_weight_count` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`index` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`optimize_indices_for_cache` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bones` **(** :ref:`PackedInt32Array` bones **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_color` **(** :ref:`Color` color **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom` **(** :ref:`int` channel_index, :ref:`Color` custom_color **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_format` **(** :ref:`int` channel_index, :ref:`CustomFormat` format **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_material` **(** :ref:`Material` material **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_normal` **(** :ref:`Vector3` normal **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_skin_weight_count` **(** :ref:`SkinWeightCount` count **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_smooth_group` **(** :ref:`int` index **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tangent` **(** :ref:`Plane` tangent **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_uv` **(** :ref:`Vector2` uv **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_uv2` **(** :ref:`Vector2` uv2 **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_weights` **(** :ref:`PackedFloat32Array` weights **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_SurfaceTool_CustomFormat: -.. _class_SurfaceTool_constant_CUSTOM_RGBA8_UNORM: - -.. _class_SurfaceTool_constant_CUSTOM_RGBA8_SNORM: - -.. _class_SurfaceTool_constant_CUSTOM_RG_HALF: - -.. _class_SurfaceTool_constant_CUSTOM_RGBA_HALF: - -.. _class_SurfaceTool_constant_CUSTOM_R_FLOAT: - -.. _class_SurfaceTool_constant_CUSTOM_RG_FLOAT: - -.. _class_SurfaceTool_constant_CUSTOM_RGB_FLOAT: - -.. _class_SurfaceTool_constant_CUSTOM_RGBA_FLOAT: - -.. _class_SurfaceTool_constant_CUSTOM_MAX: +.. rst-class:: classref-enumeration enum **CustomFormat**: -- **CUSTOM_RGBA8_UNORM** = **0** --- Limits range of data passed to :ref:`set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_UNORM`. +.. _class_SurfaceTool_constant_CUSTOM_RGBA8_UNORM: -- **CUSTOM_RGBA8_SNORM** = **1** --- Limits range of data passed to :ref:`set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_SNORM`. +.. rst-class:: classref-enumeration-constant -- **CUSTOM_RG_HALF** = **2** --- Stores data passed to :ref:`set_custom` as half precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_HALF`. +:ref:`CustomFormat` **CUSTOM_RGBA8_UNORM** = ``0`` -- **CUSTOM_RGBA_HALF** = **3** --- Stores data passed to :ref:`set_custom` as half precision floats and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_HALF`. +Limits range of data passed to :ref:`set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_UNORM`. -- **CUSTOM_R_FLOAT** = **4** --- Stores data passed to :ref:`set_custom` as full precision floats, and uses only red color channel. See :ref:`Mesh.ARRAY_CUSTOM_R_FLOAT`. +.. _class_SurfaceTool_constant_CUSTOM_RGBA8_SNORM: -- **CUSTOM_RG_FLOAT** = **5** --- Stores data passed to :ref:`set_custom` as full precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_FLOAT`. +.. rst-class:: classref-enumeration-constant -- **CUSTOM_RGB_FLOAT** = **6** --- Stores data passed to :ref:`set_custom` as full precision floats, and uses only red, green and blue color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGB_FLOAT`. +:ref:`CustomFormat` **CUSTOM_RGBA8_SNORM** = ``1`` -- **CUSTOM_RGBA_FLOAT** = **7** --- Stores data passed to :ref:`set_custom` as full precision floats, and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_FLOAT`. +Limits range of data passed to :ref:`set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See :ref:`Mesh.ARRAY_CUSTOM_RGBA8_SNORM`. -- **CUSTOM_MAX** = **8** --- Used to indicate a disabled custom channel. +.. _class_SurfaceTool_constant_CUSTOM_RG_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomFormat` **CUSTOM_RG_HALF** = ``2`` + +Stores data passed to :ref:`set_custom` as half precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_HALF`. + +.. _class_SurfaceTool_constant_CUSTOM_RGBA_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomFormat` **CUSTOM_RGBA_HALF** = ``3`` + +Stores data passed to :ref:`set_custom` as half precision floats and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_HALF`. + +.. _class_SurfaceTool_constant_CUSTOM_R_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomFormat` **CUSTOM_R_FLOAT** = ``4`` + +Stores data passed to :ref:`set_custom` as full precision floats, and uses only red color channel. See :ref:`Mesh.ARRAY_CUSTOM_R_FLOAT`. + +.. _class_SurfaceTool_constant_CUSTOM_RG_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomFormat` **CUSTOM_RG_FLOAT** = ``5`` + +Stores data passed to :ref:`set_custom` as full precision floats, and uses only red and green color channels. See :ref:`Mesh.ARRAY_CUSTOM_RG_FLOAT`. + +.. _class_SurfaceTool_constant_CUSTOM_RGB_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomFormat` **CUSTOM_RGB_FLOAT** = ``6`` + +Stores data passed to :ref:`set_custom` as full precision floats, and uses only red, green and blue color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGB_FLOAT`. + +.. _class_SurfaceTool_constant_CUSTOM_RGBA_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomFormat` **CUSTOM_RGBA_FLOAT** = ``7`` + +Stores data passed to :ref:`set_custom` as full precision floats, and uses all color channels. See :ref:`Mesh.ARRAY_CUSTOM_RGBA_FLOAT`. + +.. _class_SurfaceTool_constant_CUSTOM_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CustomFormat` **CUSTOM_MAX** = ``8`` + +Used to indicate a disabled custom channel. + +.. rst-class:: classref-item-separator ---- .. _enum_SurfaceTool_SkinWeightCount: -.. _class_SurfaceTool_constant_SKIN_4_WEIGHTS: - -.. _class_SurfaceTool_constant_SKIN_8_WEIGHTS: +.. rst-class:: classref-enumeration enum **SkinWeightCount**: -- **SKIN_4_WEIGHTS** = **0** --- Each individual vertex can be influenced by only 4 bone weights. +.. _class_SurfaceTool_constant_SKIN_4_WEIGHTS: -- **SKIN_8_WEIGHTS** = **1** --- Each individual vertex can be influenced by up to 8 bone weights. +.. rst-class:: classref-enumeration-constant + +:ref:`SkinWeightCount` **SKIN_4_WEIGHTS** = ``0`` + +Each individual vertex can be influenced by only 4 bone weights. + +.. _class_SurfaceTool_constant_SKIN_8_WEIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkinWeightCount` **SKIN_8_WEIGHTS** = ``1`` + +Each individual vertex can be influenced by up to 8 bone weights. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SurfaceTool_method_add_index: -- void **add_index** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **add_index** **(** :ref:`int` index **)** Adds a vertex to index array if you are using indexed vertices. Does not need to be called before adding vertices. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_add_triangle_fan: -- void **add_triangle_fan** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Array` tangents=[] **)** +.. rst-class:: classref-method + +void **add_triangle_fan** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`PackedColorArray` colors=PackedColorArray(), :ref:`PackedVector2Array` uv2s=PackedVector2Array(), :ref:`PackedVector3Array` normals=PackedVector3Array(), :ref:`Array` tangents=[] **)** Inserts a triangle fan made of array data into :ref:`Mesh` being constructed. Requires the primitive type be set to :ref:`Mesh.PRIMITIVE_TRIANGLES`. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_add_vertex: -- void **add_vertex** **(** :ref:`Vector3` vertex **)** +.. rst-class:: classref-method + +void **add_vertex** **(** :ref:`Vector3` vertex **)** Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV). +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_append_from: -- void **append_from** **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`Transform3D` transform **)** +.. rst-class:: classref-method + +void **append_from** **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`Transform3D` transform **)** Append vertices from a given :ref:`Mesh` surface onto the current vertex array with specified :ref:`Transform3D`. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_begin: -- void **begin** **(** :ref:`PrimitiveType` primitive **)** +.. rst-class:: classref-method + +void **begin** **(** :ref:`PrimitiveType` primitive **)** Called before adding any vertices. Takes the primitive type as an argument (e.g. :ref:`Mesh.PRIMITIVE_TRIANGLES`). +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clear all information passed into the surface tool so far. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_commit: -- :ref:`ArrayMesh` **commit** **(** :ref:`ArrayMesh` existing=null, :ref:`int` flags=0 **)** +.. rst-class:: classref-method + +:ref:`ArrayMesh` **commit** **(** :ref:`ArrayMesh` existing=null, :ref:`int` flags=0 **)** Returns a constructed :ref:`ArrayMesh` from current information passed in. If an existing :ref:`ArrayMesh` is passed in as an argument, will add an extra surface to the existing :ref:`ArrayMesh`. \ **FIXME:** Document possible values for ``flags``, it changed in 4.0. Likely some combinations of :ref:`ArrayFormat`. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_commit_to_arrays: -- :ref:`Array` **commit_to_arrays** **(** **)** +.. rst-class:: classref-method + +:ref:`Array` **commit_to_arrays** **(** **)** Commits the data to the same format used by :ref:`ArrayMesh.add_surface_from_arrays`. This way you can further process the mesh data using the :ref:`ArrayMesh` API. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_create_from: -- void **create_from** **(** :ref:`Mesh` existing, :ref:`int` surface **)** +.. rst-class:: classref-method + +void **create_from** **(** :ref:`Mesh` existing, :ref:`int` surface **)** Creates a vertex array from an existing :ref:`Mesh`. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_create_from_blend_shape: -- void **create_from_blend_shape** **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`String` blend_shape **)** +.. rst-class:: classref-method + +void **create_from_blend_shape** **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`String` blend_shape **)** Creates a vertex array from the specified blend shape of an existing :ref:`Mesh`. This can be used to extract a specific pose from a blend shape. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_deindex: -- void **deindex** **(** **)** +.. rst-class:: classref-method + +void **deindex** **(** **)** Removes the index array by expanding the vertex array. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_generate_lod: -- :ref:`PackedInt32Array` **generate_lod** **(** :ref:`float` nd_threshold, :ref:`int` target_index_count=3 **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **generate_lod** **(** :ref:`float` nd_threshold, :ref:`int` target_index_count=3 **)** 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. Unused internally and neglects to preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods` instead. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_generate_normals: -- void **generate_normals** **(** :ref:`bool` flip=false **)** +.. rst-class:: classref-method + +void **generate_normals** **(** :ref:`bool` flip=false **)** 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` should be called *after* generating geometry and *before* committing the mesh using :ref:`commit` or :ref:`commit_to_arrays`. For correct display of normal-mapped surfaces, you will also have to generate tangents using :ref:`generate_tangents`. @@ -296,43 +417,63 @@ Generates normals from vertices so you do not have to do it manually. If ``flip` \ **Note:** :ref:`generate_normals` takes smooth groups into account. If you don't specify any smooth group for each vertex, :ref:`generate_normals` will smooth normals for you. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_generate_tangents: -- void **generate_tangents** **(** **)** +.. rst-class:: classref-method + +void **generate_tangents** **(** **)** Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see :ref:`generate_normals`). +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_get_aabb: -- :ref:`AABB` **get_aabb** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **get_aabb** **(** **)** |const| Returns the axis-aligned bounding box of the vertex positions. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_get_custom_format: -- :ref:`CustomFormat` **get_custom_format** **(** :ref:`int` channel_index **)** |const| +.. rst-class:: classref-method + +:ref:`CustomFormat` **get_custom_format** **(** :ref:`int` channel_index **)** |const| Returns the format for custom ``channel_index`` (currently up to 4). Returns :ref:`CUSTOM_MAX` if this custom channel is unused. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_get_primitive_type: -- :ref:`PrimitiveType` **get_primitive_type** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PrimitiveType` **get_primitive_type** **(** **)** |const| Returns the type of mesh geometry, such as :ref:`Mesh.PRIMITIVE_TRIANGLES`. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_get_skin_weight_count: -- :ref:`SkinWeightCount` **get_skin_weight_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SkinWeightCount` **get_skin_weight_count** **(** **)** |const| By default, returns :ref:`SKIN_4_WEIGHTS` to indicate only 4 bone influences per vertex are used. @@ -340,81 +481,117 @@ Returns :ref:`SKIN_8_WEIGHTS` if up t \ **Note:** This function returns an enum, not the exact number of weights. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_index: -- void **index** **(** **)** +.. rst-class:: classref-method + +void **index** **(** **)** Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_optimize_indices_for_cache: -- void **optimize_indices_for_cache** **(** **)** +.. rst-class:: classref-method + +void **optimize_indices_for_cache** **(** **)** Optimizes triangle sorting for performance. Requires that :ref:`get_primitive_type` is :ref:`Mesh.PRIMITIVE_TRIANGLES`. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_bones: -- void **set_bones** **(** :ref:`PackedInt32Array` bones **)** +.. rst-class:: classref-method + +void **set_bones** **(** :ref:`PackedInt32Array` bones **)** Specifies an array of bones to use for the *next* vertex. ``bones`` must contain 4 integers. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_color: -- void **set_color** **(** :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_color** **(** :ref:`Color` color **)** Specifies a :ref:`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. \ **Note:** The material must have :ref:`BaseMaterial3D.vertex_color_use_as_albedo` enabled for the vertex color to be visible. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_custom: -- void **set_custom** **(** :ref:`int` channel_index, :ref:`Color` custom_color **)** +.. rst-class:: classref-method + +void **set_custom** **(** :ref:`int` channel_index, :ref:`Color` custom_color **)** Sets the custom value on this vertex for ``channel_index``. \ :ref:`set_custom_format` must be called first for this ``channel_index``. Formats which are not RGBA will ignore other color channels. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_custom_format: -- void **set_custom_format** **(** :ref:`int` channel_index, :ref:`CustomFormat` format **)** +.. rst-class:: classref-method + +void **set_custom_format** **(** :ref:`int` channel_index, :ref:`CustomFormat` format **)** Sets the color format for this custom ``channel_index``. Use :ref:`CUSTOM_MAX` to disable. Must be invoked after :ref:`begin` and should be set before :ref:`commit` or :ref:`commit_to_arrays`. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_material: -- void **set_material** **(** :ref:`Material` material **)** +.. rst-class:: classref-method + +void **set_material** **(** :ref:`Material` material **)** Sets :ref:`Material` to be used by the :ref:`Mesh` you are constructing. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_normal: -- void **set_normal** **(** :ref:`Vector3` normal **)** +.. rst-class:: classref-method + +void **set_normal** **(** :ref:`Vector3` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_skin_weight_count: -- void **set_skin_weight_count** **(** :ref:`SkinWeightCount` count **)** +.. rst-class:: classref-method + +void **set_skin_weight_count** **(** :ref:`SkinWeightCount` count **)** Set to :ref:`SKIN_8_WEIGHTS` to indicate that up to 8 bone influences per vertex may be used. @@ -422,43 +599,63 @@ By default, only 4 bone influences are used (:ref:`SKIN_4_WEIGHTS` index **)** +.. rst-class:: classref-method + +void **set_smooth_group** **(** :ref:`int` index **)** Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_tangent: -- void **set_tangent** **(** :ref:`Plane` tangent **)** +.. rst-class:: classref-method + +void **set_tangent** **(** :ref:`Plane` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_uv: -- void **set_uv** **(** :ref:`Vector2` uv **)** +.. rst-class:: classref-method + +void **set_uv** **(** :ref:`Vector2` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_uv2: -- void **set_uv2** **(** :ref:`Vector2` uv2 **)** +.. rst-class:: classref-method + +void **set_uv2** **(** :ref:`Vector2` 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. +.. rst-class:: classref-item-separator + ---- .. _class_SurfaceTool_method_set_weights: -- void **set_weights** **(** :ref:`PackedFloat32Array` weights **)** +.. rst-class:: classref-method + +void **set_weights** **(** :ref:`PackedFloat32Array` 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. diff --git a/classes/class_syntaxhighlighter.rst b/classes/class_syntaxhighlighter.rst index 8b6607c91..1f356b8be 100644 --- a/classes/class_syntaxhighlighter.rst +++ b/classes/class_syntaxhighlighter.rst @@ -16,76 +16,107 @@ SyntaxHighlighter Base Syntax highlighter resource for :ref:`TextEdit`. +.. rst-class:: classref-introduction-group + Description ----------- Base syntax highlighter resource all syntax highlighters extend from, provides syntax highlighting data to :ref:`TextEdit`. -The associated :ref:`TextEdit` node will call into the ``SyntaxHighlighter`` on a as needed basis. +The associated :ref:`TextEdit` node will call into the **SyntaxHighlighter** on a as needed basis. \ **Note:** Each Syntax highlighter instance should not be shared across multiple :ref:`TextEdit` nodes. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_clear_highlighting_cache` **(** **)** |virtual| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_line_syntax_highlighting` **(** :ref:`int` line **)** |virtual| |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_update_cache` **(** **)** |virtual| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_highlighting_cache` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_line_syntax_highlighting` **(** :ref:`int` line **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_cache` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_clear_highlighting_cache` **(** **)** |virtual| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_line_syntax_highlighting` **(** :ref:`int` line **)** |virtual| |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_update_cache` **(** **)** |virtual| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_highlighting_cache` **(** **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_line_syntax_highlighting` **(** :ref:`int` line **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_cache` **(** **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_SyntaxHighlighter_method__clear_highlighting_cache: -- void **_clear_highlighting_cache** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_clear_highlighting_cache** **(** **)** |virtual| Virtual method which can be overridden to clear any local caches. +.. rst-class:: classref-item-separator + ---- .. _class_SyntaxHighlighter_method__get_line_syntax_highlighting: -- :ref:`Dictionary` **_get_line_syntax_highlighting** **(** :ref:`int` line **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_line_syntax_highlighting** **(** :ref:`int` line **)** |virtual| |const| Virtual method which can be overridden to return syntax highlighting data. See :ref:`get_line_syntax_highlighting` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_SyntaxHighlighter_method__update_cache: -- void **_update_cache** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_update_cache** **(** **)** |virtual| Virtual method which can be overridden to update any local caches. +.. rst-class:: classref-item-separator + ---- .. _class_SyntaxHighlighter_method_clear_highlighting_cache: -- void **clear_highlighting_cache** **(** **)** +.. rst-class:: classref-method + +void **clear_highlighting_cache** **(** **)** Clears all cached syntax highlighting data. Then calls overridable method :ref:`_clear_highlighting_cache`. +.. rst-class:: classref-item-separator + ---- .. _class_SyntaxHighlighter_method_get_line_syntax_highlighting: -- :ref:`Dictionary` **get_line_syntax_highlighting** **(** :ref:`int` line **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_line_syntax_highlighting** **(** :ref:`int` line **)** Returns syntax highlighting data for a single line. If the line is not cached, calls :ref:`_get_line_syntax_highlighting` to calculate the data. @@ -106,21 +137,29 @@ The return :ref:`Dictionary` is column number to :ref:`Diction This will color columns 0-4 red, and columns 5-eol in green. +.. rst-class:: classref-item-separator + ---- .. _class_SyntaxHighlighter_method_get_text_edit: -- :ref:`TextEdit` **get_text_edit** **(** **)** +.. rst-class:: classref-method + +:ref:`TextEdit` **get_text_edit** **(** **)** Returns the associated :ref:`TextEdit` node. +.. rst-class:: classref-item-separator + ---- .. _class_SyntaxHighlighter_method_update_cache: -- void **update_cache** **(** **)** +.. rst-class:: classref-method -Clears then updates the ``SyntaxHighlighter`` caches. Override :ref:`_update_cache` for a callback. +void **update_cache** **(** **)** + +Clears then updates the **SyntaxHighlighter** caches. Override :ref:`_update_cache` for a callback. \ **Note:** This is called automatically when the associated :ref:`TextEdit` node, updates its own cache. diff --git a/classes/class_systemfont.rst b/classes/class_systemfont.rst index 487386111..1be07f7a0 100644 --- a/classes/class_systemfont.rst +++ b/classes/class_systemfont.rst @@ -16,200 +16,278 @@ Font loaded from a system font. \ **Note:** This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font. +.. rst-class:: classref-introduction-group + Description ----------- -``SystemFont`` loads a font from a system font with the first matching name from :ref:`font_names`. +**SystemFont** loads a font from a system font with the first matching name from :ref:`font_names`. 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" and/or "italic" features set. +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` of the system font for fine control over its features. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`font_names` | ``PackedStringArray()`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`FontStyle` | :ref:`font_style` | ``0`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`force_autohinter` | ``false`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Hinting` | :ref:`hinting` | ``1`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`multichannel_signed_distance_field` | ``false`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`oversampling` | ``0.0`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`allow_system_fallback` | ``true`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`font_italic` | ``false`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`font_names` | ``PackedStringArray()`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`font_stretch` | ``100`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`font_weight` | ``400`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`force_autohinter` | ``false`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Hinting` | :ref:`hinting` | ``1`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`multichannel_signed_distance_field` | ``false`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`oversampling` | ``0.0`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`SubpixelPositioning` | :ref:`subpixel_positioning` | ``1`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- +.. _class_SystemFont_property_allow_system_fallback: + +.. rst-class:: classref-property + +:ref:`bool` **allow_system_fallback** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_allow_system_fallback** **(** :ref:`bool` value **)** +- :ref:`bool` **is_allow_system_fallback** **(** **)** + +If set to ``true``, system fonts can be automatically used as fallbacks. + +.. rst-class:: classref-item-separator + +---- + .. _class_SystemFont_property_antialiasing: -- :ref:`FontAntialiasing` **antialiasing** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_antialiasing(value) | -+-----------+-------------------------+ -| *Getter* | get_antialiasing() | -+-----------+-------------------------+ +:ref:`FontAntialiasing` **antialiasing** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_antialiasing** **(** :ref:`FontAntialiasing` value **)** +- :ref:`FontAntialiasing` **get_antialiasing** **(** **)** Font anti-aliasing mode. +.. rst-class:: classref-item-separator + ---- .. _class_SystemFont_property_fallbacks: -- :ref:`Font[]` **fallbacks** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``[]`` | -+-----------+----------------------+ -| *Setter* | set_fallbacks(value) | -+-----------+----------------------+ -| *Getter* | get_fallbacks() | -+-----------+----------------------+ +:ref:`Font[]` **fallbacks** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_fallbacks** **(** :ref:`Font[]` value **)** +- :ref:`Font[]` **get_fallbacks** **(** **)** Array of fallback :ref:`Font`\ s. +.. rst-class:: classref-item-separator + +---- + +.. _class_SystemFont_property_font_italic: + +.. rst-class:: classref-property + +:ref:`bool` **font_italic** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_font_italic** **(** :ref:`bool` value **)** +- :ref:`bool` **get_font_italic** **(** **)** + +If set to ``true``, italic or oblique font is preferred. + +.. rst-class:: classref-item-separator + ---- .. _class_SystemFont_property_font_names: -- :ref:`PackedStringArray` **font_names** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+-------------------------+ -| *Setter* | set_font_names(value) | -+-----------+-------------------------+ -| *Getter* | get_font_names() | -+-----------+-------------------------+ +:ref:`PackedStringArray` **font_names** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_font_names** **(** :ref:`PackedStringArray` value **)** +- :ref:`PackedStringArray` **get_font_names** **(** **)** Array of font family names to search, first matching font found is used. +.. rst-class:: classref-item-separator + ---- -.. _class_SystemFont_property_font_style: +.. _class_SystemFont_property_font_stretch: -- :ref:`FontStyle` **font_style** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_font_style(value) | -+-----------+-----------------------+ -| *Getter* | get_font_style() | -+-----------+-----------------------+ +:ref:`int` **font_stretch** = ``100`` -Font style flags, see :ref:`FontStyle`. +.. rst-class:: classref-property-setget + +- void **set_font_stretch** **(** :ref:`int` value **)** +- :ref:`int` **get_font_stretch** **(** **)** + +Preferred font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SystemFont_property_font_weight: + +.. rst-class:: classref-property + +:ref:`int` **font_weight** = ``400`` + +.. rst-class:: classref-property-setget + +- void **set_font_weight** **(** :ref:`int` value **)** +- :ref:`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``. + +.. rst-class:: classref-item-separator ---- .. _class_SystemFont_property_force_autohinter: -- :ref:`bool` **force_autohinter** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_force_autohinter(value) | -+-----------+-----------------------------+ -| *Getter* | is_force_autohinter() | -+-----------+-----------------------------+ +:ref:`bool` **force_autohinter** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_force_autohinter** **(** :ref:`bool` value **)** +- :ref:`bool` **is_force_autohinter** **(** **)** If set to ``true``, auto-hinting is supported and preferred over font built-in hinting. +.. rst-class:: classref-item-separator + ---- .. _class_SystemFont_property_generate_mipmaps: -- :ref:`bool` **generate_mipmaps** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_generate_mipmaps(value) | -+-----------+-----------------------------+ -| *Getter* | get_generate_mipmaps() | -+-----------+-----------------------------+ +:ref:`bool` **generate_mipmaps** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_generate_mipmaps** **(** :ref:`bool` value **)** +- :ref:`bool` **get_generate_mipmaps** **(** **)** If set to ``true``, generate mipmaps for the font textures. +.. rst-class:: classref-item-separator + ---- .. _class_SystemFont_property_hinting: -- :ref:`Hinting` **hinting** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_hinting(value) | -+-----------+--------------------+ -| *Getter* | get_hinting() | -+-----------+--------------------+ +:ref:`Hinting` **hinting** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_hinting** **(** :ref:`Hinting` value **)** +- :ref:`Hinting` **get_hinting** **(** **)** Font hinting mode. +.. rst-class:: classref-item-separator + ---- .. _class_SystemFont_property_multichannel_signed_distance_field: -- :ref:`bool` **multichannel_signed_distance_field** +.. rst-class:: classref-property -+-----------+-----------------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------------+ -| *Setter* | set_multichannel_signed_distance_field(value) | -+-----------+-----------------------------------------------+ -| *Getter* | is_multichannel_signed_distance_field() | -+-----------+-----------------------------------------------+ +:ref:`bool` **multichannel_signed_distance_field** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_multichannel_signed_distance_field** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_SystemFont_property_oversampling: -- :ref:`float` **oversampling** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_oversampling(value) | -+-----------+-------------------------+ -| *Getter* | get_oversampling() | -+-----------+-------------------------+ +:ref:`float` **oversampling** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_oversampling** **(** :ref:`float` value **)** +- :ref:`float` **get_oversampling** **(** **)** Font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. +.. rst-class:: classref-item-separator + ---- .. _class_SystemFont_property_subpixel_positioning: -- :ref:`SubpixelPositioning` **subpixel_positioning** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_subpixel_positioning(value) | -+-----------+---------------------------------+ -| *Getter* | get_subpixel_positioning() | -+-----------+---------------------------------+ +:ref:`SubpixelPositioning` **subpixel_positioning** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_subpixel_positioning** **(** :ref:`SubpixelPositioning` value **)** +- :ref:`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` to automatically enable it based on the font size. diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index 6e68d6b62..255740ab3 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -14,172 +14,213 @@ TabBar Tab bar control. +.. rst-class:: classref-introduction-group + Description ----------- Simple tabs control, similar to :ref:`TabContainer` but is only in charge of drawing tabs, not interacting with children. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`clip_tabs` | ``true`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`current_tab` | ``0`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`max_tab_width` | ``0`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`scroll_to_selected` | ``true`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`scrolling_enabled` | ``true`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`select_with_rmb` | ``false`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`CloseButtonDisplayPolicy` | :ref:`tab_close_display_policy` | ``0`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`tab_count` | ``0`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | -+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`clip_tabs` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`current_tab` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`max_tab_width` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`scroll_to_selected` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`scrolling_enabled` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`select_with_rmb` | ``false`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`CloseButtonDisplayPolicy` | :ref:`tab_close_display_policy` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`tab_count` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_tab` **(** :ref:`String` title="", :ref:`Texture2D` icon=null **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ensure_tab_visible` **(** :ref:`int` idx **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_offset_buttons_visible` **(** **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_previous_tab` **(** **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_tab_button_icon` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tab_language` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_offset` **(** **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_tab_rect` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`get_tab_text_direction` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_tab` **(** :ref:`int` from, :ref:`int` to **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_tab` **(** :ref:`int` tab_idx **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_button_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_disabled` **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_hidden` **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_language` **(** :ref:`int` tab_idx, :ref:`String` language **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_text_direction` **(** :ref:`int` tab_idx, :ref:`TextDirection` direction **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | -+--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_tab` **(** :ref:`String` title="", :ref:`Texture2D` icon=null **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ensure_tab_visible` **(** :ref:`int` idx **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_offset_buttons_visible` **(** **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_previous_tab` **(** **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_tab_button_icon` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tab_language` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_offset` **(** **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_tab_rect` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_tab_text_direction` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_tab` **(** :ref:`int` from, :ref:`int` to **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_tab` **(** :ref:`int` tab_idx **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_button_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_disabled` **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_hidden` **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_language` **(** :ref:`int` tab_idx, :ref:`String` language **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_text_direction` **(** :ref:`int` tab_idx, :ref:`TextDirection` direction **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`drop_mark_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_selected_color` | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_unselected_color` | ``Color(0.7, 0.7, 0.7, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`close` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement_highlight` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`drop_mark` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`increment` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`increment_highlight` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`button_highlight` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`button_pressed` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`tab_disabled` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`tab_selected` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`tab_unselected` | | -+-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`drop_mark_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_selected_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_unselected_color` | ``Color(0.7, 0.7, 0.7, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`close` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_highlight` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`drop_mark` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`increment` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_highlight` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`button_highlight` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`button_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_disabled` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_selected` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_unselected` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_TabBar_signal_active_tab_rearranged: -- **active_tab_rearranged** **(** :ref:`int` idx_to **)** +.. rst-class:: classref-signal + +**active_tab_rearranged** **(** :ref:`int` idx_to **)** Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled`. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_signal_tab_button_pressed: -- **tab_button_pressed** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_button_pressed** **(** :ref:`int` tab **)** Emitted when a tab's right button is pressed. See :ref:`set_tab_button_icon`. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_signal_tab_changed: -- **tab_changed** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_changed** **(** :ref:`int` tab **)** Emitted when switching to another tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_signal_tab_clicked: -- **tab_clicked** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_clicked** **(** :ref:`int` tab **)** Emitted when a tab is clicked, even if it is the current tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_signal_tab_close_pressed: -- **tab_close_pressed** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_close_pressed** **(** :ref:`int` tab **)** Emitted when a tab's close button is pressed. @@ -198,625 +239,848 @@ Emitted when a tab's close button is pressed. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_signal_tab_hovered: -- **tab_hovered** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_hovered** **(** :ref:`int` tab **)** Emitted when a tab is hovered by the mouse. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_signal_tab_rmb_clicked: -- **tab_rmb_clicked** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_rmb_clicked** **(** :ref:`int` tab **)** Emitted when a tab is right-clicked. :ref:`select_with_rmb` must be enabled. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_signal_tab_selected: -- **tab_selected** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_selected** **(** :ref:`int` tab **)** Emitted when a tab is selected via click or script, even if it is the current tab. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_TabBar_AlignmentMode: -.. _class_TabBar_constant_ALIGNMENT_LEFT: - -.. _class_TabBar_constant_ALIGNMENT_CENTER: - -.. _class_TabBar_constant_ALIGNMENT_RIGHT: - -.. _class_TabBar_constant_ALIGNMENT_MAX: +.. rst-class:: classref-enumeration enum **AlignmentMode**: -- **ALIGNMENT_LEFT** = **0** --- Places tabs to the left. +.. _class_TabBar_constant_ALIGNMENT_LEFT: -- **ALIGNMENT_CENTER** = **1** --- Places tabs in the middle. +.. rst-class:: classref-enumeration-constant -- **ALIGNMENT_RIGHT** = **2** --- Places tabs to the right. +:ref:`AlignmentMode` **ALIGNMENT_LEFT** = ``0`` -- **ALIGNMENT_MAX** = **3** --- Represents the size of the :ref:`AlignmentMode` enum. +Places tabs to the left. + +.. _class_TabBar_constant_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_CENTER** = ``1`` + +Places tabs in the middle. + +.. _class_TabBar_constant_ALIGNMENT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_RIGHT** = ``2`` + +Places tabs to the right. + +.. _class_TabBar_constant_ALIGNMENT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`AlignmentMode` **ALIGNMENT_MAX** = ``3`` + +Represents the size of the :ref:`AlignmentMode` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_TabBar_CloseButtonDisplayPolicy: -.. _class_TabBar_constant_CLOSE_BUTTON_SHOW_NEVER: - -.. _class_TabBar_constant_CLOSE_BUTTON_SHOW_ACTIVE_ONLY: - -.. _class_TabBar_constant_CLOSE_BUTTON_SHOW_ALWAYS: - -.. _class_TabBar_constant_CLOSE_BUTTON_MAX: +.. rst-class:: classref-enumeration enum **CloseButtonDisplayPolicy**: -- **CLOSE_BUTTON_SHOW_NEVER** = **0** --- Never show the close buttons. +.. _class_TabBar_constant_CLOSE_BUTTON_SHOW_NEVER: -- **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = **1** --- Only show the close button on the currently active tab. +.. rst-class:: classref-enumeration-constant -- **CLOSE_BUTTON_SHOW_ALWAYS** = **2** --- Show the close button on all tabs. +:ref:`CloseButtonDisplayPolicy` **CLOSE_BUTTON_SHOW_NEVER** = ``0`` -- **CLOSE_BUTTON_MAX** = **3** --- Represents the size of the :ref:`CloseButtonDisplayPolicy` enum. +Never show the close buttons. + +.. _class_TabBar_constant_CLOSE_BUTTON_SHOW_ACTIVE_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CloseButtonDisplayPolicy` **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = ``1`` + +Only show the close button on the currently active tab. + +.. _class_TabBar_constant_CLOSE_BUTTON_SHOW_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`CloseButtonDisplayPolicy` **CLOSE_BUTTON_SHOW_ALWAYS** = ``2`` + +Show the close button on all tabs. + +.. _class_TabBar_constant_CLOSE_BUTTON_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CloseButtonDisplayPolicy` **CLOSE_BUTTON_MAX** = ``3`` + +Represents the size of the :ref:`CloseButtonDisplayPolicy` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TabBar_property_clip_tabs: -- :ref:`bool` **clip_tabs** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_clip_tabs(value) | -+-----------+----------------------+ -| *Getter* | get_clip_tabs() | -+-----------+----------------------+ +:ref:`bool` **clip_tabs** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_clip_tabs** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_current_tab: -- :ref:`int` **current_tab** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_current_tab(value) | -+-----------+------------------------+ -| *Getter* | get_current_tab() | -+-----------+------------------------+ +:ref:`int` **current_tab** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_current_tab** **(** :ref:`int` value **)** +- :ref:`int` **get_current_tab** **(** **)** Select tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_drag_to_rearrange_enabled: -- :ref:`bool` **drag_to_rearrange_enabled** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------+ -| *Setter* | set_drag_to_rearrange_enabled(value) | -+-----------+--------------------------------------+ -| *Getter* | get_drag_to_rearrange_enabled() | -+-----------+--------------------------------------+ +:ref:`bool` **drag_to_rearrange_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_drag_to_rearrange_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_drag_to_rearrange_enabled** **(** **)** If ``true``, tabs can be rearranged with mouse drag. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_max_tab_width: -- :ref:`int` **max_tab_width** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_max_tab_width(value) | -+-----------+--------------------------+ -| *Getter* | get_max_tab_width() | -+-----------+--------------------------+ +:ref:`int` **max_tab_width** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_max_tab_width** **(** :ref:`int` value **)** +- :ref:`int` **get_max_tab_width** **(** **)** Sets the maximum width which all tabs should be limited to. Unlimited if set to ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_scroll_to_selected: -- :ref:`bool` **scroll_to_selected** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------+ -| *Setter* | set_scroll_to_selected(value) | -+-----------+-------------------------------+ -| *Getter* | get_scroll_to_selected() | -+-----------+-------------------------------+ +:ref:`bool` **scroll_to_selected** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_to_selected** **(** :ref:`bool` value **)** +- :ref:`bool` **get_scroll_to_selected** **(** **)** If ``true``, the tab offset will be changed to keep the the currently selected tab visible. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_scrolling_enabled: -- :ref:`bool` **scrolling_enabled** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_scrolling_enabled(value) | -+-----------+------------------------------+ -| *Getter* | get_scrolling_enabled() | -+-----------+------------------------------+ +:ref:`bool` **scrolling_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_scrolling_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_scrolling_enabled** **(** **)** if ``true``, the mouse's scroll wheel can be used to navigate the scroll view. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_select_with_rmb: -- :ref:`bool` **select_with_rmb** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_select_with_rmb(value) | -+-----------+----------------------------+ -| *Getter* | get_select_with_rmb() | -+-----------+----------------------------+ +:ref:`bool` **select_with_rmb** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_select_with_rmb** **(** :ref:`bool` value **)** +- :ref:`bool` **get_select_with_rmb** **(** **)** If ``true``, enables selecting a tab with the right mouse button. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_tab_alignment: -- :ref:`AlignmentMode` **tab_alignment** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_tab_alignment(value) | -+-----------+--------------------------+ -| *Getter* | get_tab_alignment() | -+-----------+--------------------------+ +:ref:`AlignmentMode` **tab_alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tab_alignment** **(** :ref:`AlignmentMode` value **)** +- :ref:`AlignmentMode` **get_tab_alignment** **(** **)** Sets the position at which tabs will be placed. See :ref:`AlignmentMode` for details. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_tab_close_display_policy: -- :ref:`CloseButtonDisplayPolicy` **tab_close_display_policy** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------------+ -| *Setter* | set_tab_close_display_policy(value) | -+-----------+-------------------------------------+ -| *Getter* | get_tab_close_display_policy() | -+-----------+-------------------------------------+ +:ref:`CloseButtonDisplayPolicy` **tab_close_display_policy** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tab_close_display_policy** **(** :ref:`CloseButtonDisplayPolicy` value **)** +- :ref:`CloseButtonDisplayPolicy` **get_tab_close_display_policy** **(** **)** Sets when the close button will appear on the tabs. See :ref:`CloseButtonDisplayPolicy` for details. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_tab_count: -- :ref:`int` **tab_count** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_tab_count(value) | -+-----------+----------------------+ -| *Getter* | get_tab_count() | -+-----------+----------------------+ +:ref:`int` **tab_count** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tab_count** **(** :ref:`int` value **)** +- :ref:`int` **get_tab_count** **(** **)** The number of tabs currently in the bar. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_property_tabs_rearrange_group: -- :ref:`int` **tabs_rearrange_group** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``-1`` | -+-----------+---------------------------------+ -| *Setter* | set_tabs_rearrange_group(value) | -+-----------+---------------------------------+ -| *Getter* | get_tabs_rearrange_group() | -+-----------+---------------------------------+ +:ref:`int` **tabs_rearrange_group** = ``-1`` -``TabBar``\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled`. +.. rst-class:: classref-property-setget -Setting this to ``-1`` will disable rearranging between ``TabBar``\ s. +- void **set_tabs_rearrange_group** **(** :ref:`int` value **)** +- :ref:`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`. + +Setting this to ``-1`` will disable rearranging between **TabBar**\ s. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TabBar_method_add_tab: -- void **add_tab** **(** :ref:`String` title="", :ref:`Texture2D` icon=null **)** +.. rst-class:: classref-method + +void **add_tab** **(** :ref:`String` title="", :ref:`Texture2D` icon=null **)** Adds a new tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_ensure_tab_visible: -- void **ensure_tab_visible** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +void **ensure_tab_visible** **(** :ref:`int` idx **)** Moves the scroll view to make the tab visible. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_offset_buttons_visible: -- :ref:`bool` **get_offset_buttons_visible** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_offset_buttons_visible** **(** **)** |const| Returns ``true`` if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_previous_tab: -- :ref:`int` **get_previous_tab** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_previous_tab** **(** **)** |const| Returns the previously active tab index. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_button_icon: -- :ref:`Texture2D` **get_tab_button_icon** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_tab_button_icon** **(** :ref:`int` tab_idx **)** |const| Returns the :ref:`Texture2D` for the right button of the tab at index ``tab_idx`` or ``null`` if the button has no :ref:`Texture2D`. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_icon: -- :ref:`Texture2D` **get_tab_icon** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_tab_icon** **(** :ref:`int` tab_idx **)** |const| Returns the :ref:`Texture2D` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D`. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_idx_at_point: -- :ref:`int` **get_tab_idx_at_point** **(** :ref:`Vector2` point **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_tab_idx_at_point** **(** :ref:`Vector2` point **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_language: -- :ref:`String` **get_tab_language** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_tab_language** **(** :ref:`int` tab_idx **)** |const| Returns tab title language code. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_offset: -- :ref:`int` **get_tab_offset** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_tab_offset** **(** **)** |const| Returns the number of hidden tabs offsetted to the left. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_rect: -- :ref:`Rect2` **get_tab_rect** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_tab_rect** **(** :ref:`int` tab_idx **)** |const| Returns tab :ref:`Rect2` with local position and size. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_text_direction: -- :ref:`TextDirection` **get_tab_text_direction** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`TextDirection` **get_tab_text_direction** **(** :ref:`int` tab_idx **)** |const| Returns tab title text base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_get_tab_title: -- :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** |const| Returns the title of the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_is_tab_disabled: -- :ref:`bool` **is_tab_disabled** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_tab_disabled** **(** :ref:`int` tab_idx **)** |const| Returns ``true`` if the tab at index ``tab_idx`` is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_is_tab_hidden: -- :ref:`bool` **is_tab_hidden** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_tab_hidden** **(** :ref:`int` tab_idx **)** |const| Returns ``true`` if the tab at index ``tab_idx`` is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_move_tab: -- void **move_tab** **(** :ref:`int` from, :ref:`int` to **)** +.. rst-class:: classref-method + +void **move_tab** **(** :ref:`int` from, :ref:`int` to **)** Moves a tab from ``from`` to ``to``. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_remove_tab: -- void **remove_tab** **(** :ref:`int` tab_idx **)** +.. rst-class:: classref-method + +void **remove_tab** **(** :ref:`int` tab_idx **)** Removes the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_set_tab_button_icon: -- void **set_tab_button_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **set_tab_button_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` 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`). Giving it a ``null`` value will hide the button. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_set_tab_disabled: -- void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_set_tab_hidden: -- void **set_tab_hidden** **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** +.. rst-class:: classref-method + +void **set_tab_hidden** **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_set_tab_icon: -- void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** Sets an ``icon`` for the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_set_tab_language: -- void **set_tab_language** **(** :ref:`int` tab_idx, :ref:`String` language **)** +.. rst-class:: classref-method + +void **set_tab_language** **(** :ref:`int` tab_idx, :ref:`String` language **)** Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_set_tab_text_direction: -- void **set_tab_text_direction** **(** :ref:`int` tab_idx, :ref:`TextDirection` direction **)** +.. rst-class:: classref-method + +void **set_tab_text_direction** **(** :ref:`int` tab_idx, :ref:`TextDirection` direction **)** Sets tab title base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_method_set_tab_title: -- void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** +.. rst-class:: classref-method + +void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** Sets a ``title`` for the tab at index ``tab_idx``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_TabBar_theme_color_drop_mark_color: -- :ref:`Color` **drop_mark_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **drop_mark_color** = ``Color(1, 1, 1, 1)`` Modulation color for the :ref:`drop_mark` icon. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` Font color of disabled tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` The tint of text outline of the tab name. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` Font color of the currently selected tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_color_font_unselected_color: -- :ref:`Color` **font_unselected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.7, 0.7, 0.7, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` Font color of the other, unselected tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal separation between the elements inside tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the tab text outline. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** The font used to draw tab names. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Font size of the tab names. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_icon_close: -- :ref:`Texture2D` **close** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **close** The icon for the close button (see :ref:`tab_close_display_policy`). +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_icon_decrement: -- :ref:`Texture2D` **decrement** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_icon_decrement_highlight: -- :ref:`Texture2D` **decrement_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_icon_drop_mark: -- :ref:`Texture2D` **drop_mark** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **drop_mark** Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled`). +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_icon_increment: -- :ref:`Texture2D` **increment** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_icon_increment_highlight: -- :ref:`Texture2D` **increment_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_style_button_highlight: -- :ref:`StyleBox` **button_highlight** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **button_highlight** Background of the tab and close buttons when they're being hovered with the cursor. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_style_button_pressed: -- :ref:`StyleBox` **button_pressed** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **button_pressed** Background of the tab and close buttons when it's being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_style_tab_disabled: -- :ref:`StyleBox` **tab_disabled** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_disabled** The style of disabled tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_style_tab_selected: -- :ref:`StyleBox` **tab_selected** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_selected** The style of the currently selected tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabBar_theme_style_tab_unselected: -- :ref:`StyleBox` **tab_unselected** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_unselected** The style of the other, unselected tabs. diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 1cac5558c..ef4a681d0 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -14,6 +14,8 @@ TabContainer Tabbed container. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,641 +25,826 @@ Ignores non-:ref:`Control` children. \ **Note:** The drawing of the clickable tabs themselves is handled by this node. Adding :ref:`TabBar`\ s as children is not needed. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`all_tabs_in_front` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`clip_tabs` | ``true`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`current_tab` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`tabs_visible` | ``true`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_hidden_tabs_for_min_size` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`all_tabs_in_front` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`clip_tabs` | ``true`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`current_tab` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`tabs_visible` | ``true`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_hidden_tabs_for_min_size` | ``false`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`get_current_tab_control` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Popup` | :ref:`get_popup` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_previous_tab` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_tab_button_icon` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`get_tab_control` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_count` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_idx_from_control` **(** :ref:`Control` control **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_popup` **(** :ref:`Node` popup **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_button_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_disabled` **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_hidden` **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_current_tab_control` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Popup` | :ref:`get_popup` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_previous_tab` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_tab_button_icon` **(** :ref:`int` tab_idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_tab_control` **(** :ref:`int` tab_idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_count` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_idx_from_control` **(** :ref:`Control` control **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_popup` **(** :ref:`Node` popup **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_button_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_disabled` **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_hidden` **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`drop_mark_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_selected_color` | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`font_unselected_color` | ``Color(0.7, 0.7, 0.7, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`icon_separation` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`side_margin` | ``8`` | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement_highlight` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`drop_mark` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`increment` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`increment_highlight` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`menu` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`menu_highlight` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`tab_disabled` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`tab_selected` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`tab_unselected` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`tabbar_background` | | -+-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`drop_mark_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_selected_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_unselected_color` | ``Color(0.7, 0.7, 0.7, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`side_margin` | ``8`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_highlight` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`drop_mark` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`increment` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_highlight` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`menu` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`menu_highlight` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_disabled` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_selected` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_unselected` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tabbar_background` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_TabContainer_signal_pre_popup_pressed: -- **pre_popup_pressed** **(** **)** +.. rst-class:: classref-signal -Emitted when the ``TabContainer``'s :ref:`Popup` button is clicked. See :ref:`set_popup` for details. +**pre_popup_pressed** **(** **)** + +Emitted when the **TabContainer**'s :ref:`Popup` button is clicked. See :ref:`set_popup` for details. + +.. rst-class:: classref-item-separator ---- .. _class_TabContainer_signal_tab_button_pressed: -- **tab_button_pressed** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_button_pressed** **(** :ref:`int` tab **)** Emitted when the user clicks on the button icon on this tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_signal_tab_changed: -- **tab_changed** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_changed** **(** :ref:`int` tab **)** Emitted when switching to another tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_signal_tab_selected: -- **tab_selected** **(** :ref:`int` tab **)** +.. rst-class:: classref-signal + +**tab_selected** **(** :ref:`int` tab **)** Emitted when a tab is selected, even if it is the current tab. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_TabContainer_property_all_tabs_in_front: -- :ref:`bool` **all_tabs_in_front** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_all_tabs_in_front(value) | -+-----------+------------------------------+ -| *Getter* | is_all_tabs_in_front() | -+-----------+------------------------------+ +:ref:`bool` **all_tabs_in_front** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_all_tabs_in_front** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_property_clip_tabs: -- :ref:`bool` **clip_tabs** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``true`` | -+-----------+----------------------+ -| *Setter* | set_clip_tabs(value) | -+-----------+----------------------+ -| *Getter* | get_clip_tabs() | -+-----------+----------------------+ +:ref:`bool` **clip_tabs** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_clip_tabs** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_property_current_tab: -- :ref:`int` **current_tab** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_current_tab(value) | -+-----------+------------------------+ -| *Getter* | get_current_tab() | -+-----------+------------------------+ +:ref:`int` **current_tab** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_current_tab** **(** :ref:`int` value **)** +- :ref:`int` **get_current_tab** **(** **)** The current tab index. When set, this index's :ref:`Control` node's ``visible`` property is set to ``true`` and all others are set to ``false``. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_property_drag_to_rearrange_enabled: -- :ref:`bool` **drag_to_rearrange_enabled** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------+ -| *Setter* | set_drag_to_rearrange_enabled(value) | -+-----------+--------------------------------------+ -| *Getter* | get_drag_to_rearrange_enabled() | -+-----------+--------------------------------------+ +:ref:`bool` **drag_to_rearrange_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_drag_to_rearrange_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_drag_to_rearrange_enabled** **(** **)** If ``true``, tabs can be rearranged with mouse drag. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_property_tab_alignment: -- :ref:`AlignmentMode` **tab_alignment** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_tab_alignment(value) | -+-----------+--------------------------+ -| *Getter* | get_tab_alignment() | -+-----------+--------------------------+ +:ref:`AlignmentMode` **tab_alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tab_alignment** **(** :ref:`AlignmentMode` value **)** +- :ref:`AlignmentMode` **get_tab_alignment** **(** **)** Sets the position at which tabs will be placed. See :ref:`AlignmentMode` for details. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_property_tabs_rearrange_group: -- :ref:`int` **tabs_rearrange_group** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``-1`` | -+-----------+---------------------------------+ -| *Setter* | set_tabs_rearrange_group(value) | -+-----------+---------------------------------+ -| *Getter* | get_tabs_rearrange_group() | -+-----------+---------------------------------+ +:ref:`int` **tabs_rearrange_group** = ``-1`` -``TabContainer``\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled`. +.. rst-class:: classref-property-setget -Setting this to ``-1`` will disable rearranging between ``TabContainer``\ s. +- void **set_tabs_rearrange_group** **(** :ref:`int` value **)** +- :ref:`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`. + +Setting this to ``-1`` will disable rearranging between **TabContainer**\ s. + +.. rst-class:: classref-item-separator ---- .. _class_TabContainer_property_tabs_visible: -- :ref:`bool` **tabs_visible** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_tabs_visible(value) | -+-----------+-------------------------+ -| *Getter* | are_tabs_visible() | -+-----------+-------------------------+ +:ref:`bool` **tabs_visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_tabs_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **are_tabs_visible** **(** **)** If ``true``, tabs are visible. If ``false``, tabs' content and titles are hidden. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_property_use_hidden_tabs_for_min_size: -- :ref:`bool` **use_hidden_tabs_for_min_size** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------------+ -| *Setter* | set_use_hidden_tabs_for_min_size(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_use_hidden_tabs_for_min_size() | -+-----------+-----------------------------------------+ +:ref:`bool` **use_hidden_tabs_for_min_size** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_hidden_tabs_for_min_size** **(** :ref:`bool` value **)** +- :ref:`bool` **get_use_hidden_tabs_for_min_size** **(** **)** If ``true``, children :ref:`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 + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TabContainer_method_get_current_tab_control: -- :ref:`Control` **get_current_tab_control** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Control` **get_current_tab_control** **(** **)** |const| Returns the child :ref:`Control` node located at the active tab index. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_popup: -- :ref:`Popup` **get_popup** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Popup` **get_popup** **(** **)** |const| Returns the :ref:`Popup` node instance if one has been set already with :ref:`set_popup`. \ **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:`Window.visible` property. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_previous_tab: -- :ref:`int` **get_previous_tab** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_previous_tab** **(** **)** |const| Returns the previously active tab index. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_tab_button_icon: -- :ref:`Texture2D` **get_tab_button_icon** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_tab_button_icon** **(** :ref:`int` tab_idx **)** |const| Returns the button icon from the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_tab_control: -- :ref:`Control` **get_tab_control** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Control` **get_tab_control** **(** :ref:`int` tab_idx **)** |const| Returns the :ref:`Control` node from the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_tab_count: -- :ref:`int` **get_tab_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_tab_count** **(** **)** |const| Returns the number of tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_tab_icon: -- :ref:`Texture2D` **get_tab_icon** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_tab_icon** **(** :ref:`int` tab_idx **)** |const| Returns the :ref:`Texture2D` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D`. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_tab_idx_at_point: -- :ref:`int` **get_tab_idx_at_point** **(** :ref:`Vector2` point **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_tab_idx_at_point** **(** :ref:`Vector2` point **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_get_tab_idx_from_control: -- :ref:`int` **get_tab_idx_from_control** **(** :ref:`Control` control **)** |const| +.. rst-class:: classref-method -Returns the index of the tab tied to the given ``control``. The control must be a child of the ``TabContainer``. +:ref:`int` **get_tab_idx_from_control** **(** :ref:`Control` control **)** |const| + +Returns the index of the tab tied to the given ``control``. The control must be a child of the **TabContainer**. + +.. rst-class:: classref-item-separator ---- .. _class_TabContainer_method_get_tab_title: -- :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_is_tab_disabled: -- :ref:`bool` **is_tab_disabled** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_tab_disabled** **(** :ref:`int` tab_idx **)** |const| Returns ``true`` if the tab at index ``tab_idx`` is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_is_tab_hidden: -- :ref:`bool` **is_tab_hidden** **(** :ref:`int` tab_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_tab_hidden** **(** :ref:`int` tab_idx **)** |const| Returns ``true`` if the tab at index ``tab_idx`` is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_set_popup: -- void **set_popup** **(** :ref:`Node` popup **)** +.. rst-class:: classref-method -If set on a :ref:`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` node. +void **set_popup** **(** :ref:`Node` popup **)** + +If set on a :ref:`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` node. + +.. rst-class:: classref-item-separator ---- .. _class_TabContainer_method_set_tab_button_icon: -- void **set_tab_button_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **set_tab_button_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** Sets the button icon from the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_set_tab_disabled: -- void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_set_tab_hidden: -- void **set_tab_hidden** **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** +.. rst-class:: classref-method + +void **set_tab_hidden** **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_set_tab_icon: -- void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** Sets an icon for the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_method_set_tab_title: -- void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** +.. rst-class:: classref-method + +void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` 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-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_TabContainer_theme_color_drop_mark_color: -- :ref:`Color` **drop_mark_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **drop_mark_color** = ``Color(1, 1, 1, 1)`` Modulation color for the :ref:`drop_mark` icon. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_color_font_disabled_color: -- :ref:`Color` **font_disabled_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` Font color of disabled tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` The tint of text outline of the tab name. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` Font color of the currently selected tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_color_font_unselected_color: -- :ref:`Color` **font_unselected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.7, 0.7, 0.7, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` Font color of the other, unselected tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_constant_icon_separation: -- :ref:`int` **icon_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **icon_separation** = ``4`` Space between tab's name and its icon. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the tab text outline. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_constant_side_margin: -- :ref:`int` **side_margin** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``8`` | -+-----------+-------+ +:ref:`int` **side_margin** = ``8`` The space at the left or right edges of the tab bar, accordingly with the current :ref:`tab_alignment`. The margin is ignored with :ref:`TabBar.ALIGNMENT_RIGHT` if the tabs are clipped (see :ref:`clip_tabs`) or a popup has been set (see :ref:`set_popup`). The margin is always ignored with :ref:`TabBar.ALIGNMENT_CENTER`. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** The font used to draw tab names. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Font size of the tab names. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_icon_decrement: -- :ref:`Texture2D` **decrement** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_icon_decrement_highlight: -- :ref:`Texture2D` **decrement_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_icon_drop_mark: -- :ref:`Texture2D` **drop_mark** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **drop_mark** Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled`). +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_icon_increment: -- :ref:`Texture2D` **increment** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_icon_increment_highlight: -- :ref:`Texture2D` **increment_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **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. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_icon_menu: -- :ref:`Texture2D` **menu** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **menu** The icon for the menu button (see :ref:`set_popup`). +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_icon_menu_highlight: -- :ref:`Texture2D` **menu_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **menu_highlight** The icon for the menu button (see :ref:`set_popup`) when it's being hovered with the cursor. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **panel** The style for the background fill. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_style_tab_disabled: -- :ref:`StyleBox` **tab_disabled** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_disabled** The style of disabled tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_style_tab_selected: -- :ref:`StyleBox` **tab_selected** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_selected** The style of the currently selected tab. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_style_tab_unselected: -- :ref:`StyleBox` **tab_unselected** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tab_unselected** The style of the other, unselected tabs. +.. rst-class:: classref-item-separator + ---- .. _class_TabContainer_theme_style_tabbar_background: -- :ref:`StyleBox` **tabbar_background** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **tabbar_background** The style for the background fill of the :ref:`TabBar` area. diff --git a/classes/class_tcpserver.rst b/classes/class_tcpserver.rst index 9223a144b..39422b6d7 100644 --- a/classes/class_tcpserver.rst +++ b/classes/class_tcpserver.rst @@ -14,6 +14,8 @@ TCPServer A TCP server. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,53 +23,78 @@ A TCP server. Listens to connections on a port and returns a :ref:`StreamPeerTCP \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_local_port` **(** **)** |const| | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connection_available` **(** **)** |const| | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_listening` **(** **)** |const| | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`listen` **(** :ref:`int` port, :ref:`String` bind_address="*" **)** | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StreamPeerTCP` | :ref:`take_connection` **(** **)** | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_local_port` **(** **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_connection_available` **(** **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_listening` **(** **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`listen` **(** :ref:`int` port, :ref:`String` bind_address="*" **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StreamPeerTCP` | :ref:`take_connection` **(** **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TCPServer_method_get_local_port: -- :ref:`int` **get_local_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_local_port** **(** **)** |const| Returns the local port this server is listening to. +.. rst-class:: classref-item-separator + ---- .. _class_TCPServer_method_is_connection_available: -- :ref:`bool` **is_connection_available** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_connection_available** **(** **)** |const| Returns ``true`` if a connection is available for taking. +.. rst-class:: classref-item-separator + ---- .. _class_TCPServer_method_is_listening: -- :ref:`bool` **is_listening** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_listening** **(** **)** |const| Returns ``true`` if the server is currently listening for connections. +.. rst-class:: classref-item-separator + ---- .. _class_TCPServer_method_listen: -- :ref:`Error` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*" **)** +.. rst-class:: classref-method + +:ref:`Error` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*" **)** Listen on the ``port`` binding to ``bind_address``. @@ -77,19 +104,27 @@ If ``bind_address`` is set as ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), t 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). +.. rst-class:: classref-item-separator + ---- .. _class_TCPServer_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops listening. +.. rst-class:: classref-item-separator + ---- .. _class_TCPServer_method_take_connection: -- :ref:`StreamPeerTCP` **take_connection** **(** **)** +.. rst-class:: classref-method + +:ref:`StreamPeerTCP` **take_connection** **(** **)** If a connection is available, returns a StreamPeerTCP with the connection. diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 8af85c5e0..2c5e3ab44 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -16,6 +16,8 @@ TextEdit Multiline text editing control. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,2148 +27,2892 @@ TextEdit is meant for editing large, multiline text. It also has facilities for \ **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. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_blink` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_multiple` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CaretType` | :ref:`caret_type` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_control_chars` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_spaces` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_tabs` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editable` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`highlight_all_occurrences` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`highlight_current_line` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`minimap_draw` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`minimap_width` | ``80`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`placeholder_text` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_fit_content_height` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_horizontal` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_past_end_of_file` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_smooth` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`scroll_v_scroll_speed` | ``80.0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`scroll_vertical` | ``0.0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`selecting_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`SyntaxHighlighter` | :ref:`syntax_highlighter` | | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`LineWrappingMode` | :ref:`wrap_mode` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_blink` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_multiple` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CaretType` | :ref:`caret_type` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_control_chars` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_spaces` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_tabs` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editable` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`highlight_all_occurrences` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`highlight_current_line` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`minimap_draw` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`minimap_width` | ``80`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`placeholder_text` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_fit_content_height` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scroll_horizontal` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_past_end_of_file` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_smooth` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scroll_v_scroll_speed` | ``80.0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scroll_vertical` | ``0.0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selecting_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`SyntaxHighlighter` | :ref:`syntax_highlighter` | | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`LineWrappingMode` | :ref:`wrap_mode` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_backspace` **(** :ref:`int` caret_index **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_copy` **(** :ref:`int` caret_index **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_cut` **(** :ref:`int` caret_index **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_handle_unicode_input` **(** :ref:`int` unicode_char, :ref:`int` caret_index **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_paste` **(** :ref:`int` caret_index **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_paste_primary_clipboard` **(** :ref:`int` caret_index **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_caret` **(** :ref:`int` line, :ref:`int` col **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_caret_at_carets` **(** :ref:`bool` below **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_gutter` **(** :ref:`int` at=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_selection_for_next_occurrence` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`adjust_carets_after_edit` **(** :ref:`int` caret, :ref:`int` from_line, :ref:`int` from_col, :ref:`int` to_line, :ref:`int` to_col **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`adjust_viewport_to_caret` **(** :ref:`int` caret_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`backspace` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`begin_complex_operation` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`center_viewport_to_caret` **(** :ref:`int` caret_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_undo_history` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`copy` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cut` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delete_selection` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`end_action` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`end_complex_operation` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_caret_column` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_caret_count` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_caret_draw_pos` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_caret_index_edit_order` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_caret_line` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_caret_wrap_index` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_first_non_whitespace_column` **(** :ref:`int` line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_first_visible_line` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_gutter_count` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_gutter_name` **(** :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GutterType` | :ref:`get_gutter_type` **(** :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_gutter_width` **(** :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`HScrollBar` | :ref:`get_h_scroll_bar` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_indent_level` **(** :ref:`int` line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_last_full_visible_line` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_last_full_visible_line_wrap_index` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_last_unhidden_line` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_line` **(** :ref:`int` line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_line_background_color` **(** :ref:`int` line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_line_column_at_pos` **(** :ref:`Vector2i` position, :ref:`bool` allow_out_of_bounds=true **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_count` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_line_gutter_icon` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_line_gutter_item_color` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_line_gutter_metadata` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_line_gutter_text` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_height` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_width` **(** :ref:`int` line, :ref:`int` wrap_index=-1 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_wrap_count` **(** :ref:`int` line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_wrap_index_at_column` **(** :ref:`int` line, :ref:`int` column **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_line_wrapped_text` **(** :ref:`int` line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_local_mouse_pos` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_minimap_line_at_pos` **(** :ref:`Vector2i` position **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_minimap_visible_lines` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_next_visible_line_index_offset_from` **(** :ref:`int` line, :ref:`int` wrap_index, :ref:`int` visible_amount **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_next_visible_line_offset_from` **(** :ref:`int` line, :ref:`int` visible_amount **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_pos_at_line_column` **(** :ref:`int` line, :ref:`int` column **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`get_rect_at_line_column` **(** :ref:`int` line, :ref:`int` column **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_saved_version` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_scroll_pos_for_line` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_selected_text` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_column` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_from_column` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_from_line` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_line` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SelectionMode` | :ref:`get_selection_mode` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_to_column` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_to_line` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_size` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_total_gutter_width` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_total_visible_line_count` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_version` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_visible_line_count_in_range` **(** :ref:`int` from_line, :ref:`int` to_line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_word_at_pos` **(** :ref:`Vector2` position **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_word_under_caret` **(** :ref:`int` caret_index=-1 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_ime_text` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_redo` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_selection` **(** :ref:`int` caret_index=-1 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_undo` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`insert_line_at` **(** :ref:`int` line, :ref:`String` text **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`insert_text_at_caret` **(** :ref:`String` text, :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_caret_visible` **(** :ref:`int` caret_index=0 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_dragging_cursor` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_gutter_clickable` **(** :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_gutter_drawn` **(** :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_gutter_overwritable` **(** :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_line_gutter_clickable` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_line_wrapped` **(** :ref:`int` line **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_mouse_over_selection` **(** :ref:`bool` edges, :ref:`int` caret_index=-1 **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_overtype_mode_enabled` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`menu_option` **(** :ref:`int` option **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`merge_gutters` **(** :ref:`int` from_line, :ref:`int` to_line **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`merge_overlapping_carets` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`paste` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`paste_primary_clipboard` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`redo` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_caret` **(** :ref:`int` caret **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_gutter` **(** :ref:`int` gutter **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_secondary_carets` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_text` **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`search` **(** :ref:`String` text, :ref:`int` flags, :ref:`int` from_line, :ref:`int` from_colum **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column, :ref:`int` caret_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select_all` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select_word_under_caret` **(** :ref:`int` caret_index=-1 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_caret_column` **(** :ref:`int` column, :ref:`bool` adjust_viewport=true, :ref:`int` caret_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_caret_line` **(** :ref:`int` line, :ref:`bool` adjust_viewport=true, :ref:`bool` can_be_hidden=true, :ref:`int` wrap_index=0, :ref:`int` caret_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gutter_clickable` **(** :ref:`int` gutter, :ref:`bool` clickable **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gutter_custom_draw` **(** :ref:`int` column, :ref:`Callable` draw_callback **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gutter_draw` **(** :ref:`int` gutter, :ref:`bool` draw **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gutter_name` **(** :ref:`int` gutter, :ref:`String` name **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gutter_overwritable` **(** :ref:`int` gutter, :ref:`bool` overwritable **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gutter_type` **(** :ref:`int` gutter, :ref:`GutterType` type **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gutter_width` **(** :ref:`int` gutter, :ref:`int` width **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line` **(** :ref:`int` line, :ref:`String` new_text **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_as_center_visible` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_as_first_visible` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_as_last_visible` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_background_color` **(** :ref:`int` line, :ref:`Color` color **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_gutter_clickable` **(** :ref:`int` line, :ref:`int` gutter, :ref:`bool` clickable **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_gutter_icon` **(** :ref:`int` line, :ref:`int` gutter, :ref:`Texture2D` icon **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_gutter_item_color` **(** :ref:`int` line, :ref:`int` gutter, :ref:`Color` color **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_gutter_metadata` **(** :ref:`int` line, :ref:`int` gutter, :ref:`Variant` metadata **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_line_gutter_text` **(** :ref:`int` line, :ref:`int` gutter, :ref:`String` text **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_overtype_mode_enabled` **(** :ref:`bool` enabled **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_search_flags` **(** :ref:`int` flags **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_search_text` **(** :ref:`String` search_text **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_selection_mode` **(** :ref:`SelectionMode` mode, :ref:`int` line=-1, :ref:`int` column=-1, :ref:`int` caret_index=0 **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_size` **(** :ref:`int` size **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tooltip_request_func` **(** :ref:`Callable` callback **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`start_action` **(** :ref:`EditAction` action **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`swap_lines` **(** :ref:`int` from_line, :ref:`int` to_line **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`tag_saved_version` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`undo` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_backspace` **(** :ref:`int` caret_index **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_copy` **(** :ref:`int` caret_index **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_cut` **(** :ref:`int` caret_index **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_handle_unicode_input` **(** :ref:`int` unicode_char, :ref:`int` caret_index **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_paste` **(** :ref:`int` caret_index **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_paste_primary_clipboard` **(** :ref:`int` caret_index **)** |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_caret` **(** :ref:`int` line, :ref:`int` col **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_caret_at_carets` **(** :ref:`bool` below **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_gutter` **(** :ref:`int` at=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_selection_for_next_occurrence` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`adjust_carets_after_edit` **(** :ref:`int` caret, :ref:`int` from_line, :ref:`int` from_col, :ref:`int` to_line, :ref:`int` to_col **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`adjust_viewport_to_caret` **(** :ref:`int` caret_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`backspace` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`begin_complex_operation` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`center_viewport_to_caret` **(** :ref:`int` caret_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_undo_history` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`copy` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`cut` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`delete_selection` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`end_action` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`end_complex_operation` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_caret_column` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_caret_count` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_caret_draw_pos` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_caret_index_edit_order` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_caret_line` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_caret_wrap_index` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_first_non_whitespace_column` **(** :ref:`int` line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_first_visible_line` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_gutter_count` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_gutter_name` **(** :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GutterType` | :ref:`get_gutter_type` **(** :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_gutter_width` **(** :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HScrollBar` | :ref:`get_h_scroll_bar` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_indent_level` **(** :ref:`int` line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_last_full_visible_line` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_last_full_visible_line_wrap_index` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_last_unhidden_line` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_line` **(** :ref:`int` line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_line_background_color` **(** :ref:`int` line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_line_column_at_pos` **(** :ref:`Vector2i` position, :ref:`bool` allow_out_of_bounds=true **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_line_gutter_icon` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_line_gutter_item_color` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_line_gutter_metadata` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_line_gutter_text` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_height` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_width` **(** :ref:`int` line, :ref:`int` wrap_index=-1 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_wrap_count` **(** :ref:`int` line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_wrap_index_at_column` **(** :ref:`int` line, :ref:`int` column **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_line_wrapped_text` **(** :ref:`int` line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_local_mouse_pos` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_minimap_line_at_pos` **(** :ref:`Vector2i` position **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_minimap_visible_lines` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_next_visible_line_index_offset_from` **(** :ref:`int` line, :ref:`int` wrap_index, :ref:`int` visible_amount **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_next_visible_line_offset_from` **(** :ref:`int` line, :ref:`int` visible_amount **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_pos_at_line_column` **(** :ref:`int` line, :ref:`int` column **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_rect_at_line_column` **(** :ref:`int` line, :ref:`int` column **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_saved_version` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_scroll_pos_for_line` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_column` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from_column` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from_line` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_line` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SelectionMode` | :ref:`get_selection_mode` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to_column` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to_line` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_size` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_gutter_width` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_visible_line_count` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_version` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count_in_range` **(** :ref:`int` from_line, :ref:`int` to_line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_word_at_pos` **(** :ref:`Vector2` position **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_word_under_caret` **(** :ref:`int` caret_index=-1 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_ime_text` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_redo` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_selection` **(** :ref:`int` caret_index=-1 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_undo` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`insert_line_at` **(** :ref:`int` line, :ref:`String` text **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`insert_text_at_caret` **(** :ref:`String` text, :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_caret_visible` **(** :ref:`int` caret_index=0 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dragging_cursor` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_gutter_clickable` **(** :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_gutter_drawn` **(** :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_gutter_overwritable` **(** :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_gutter_clickable` **(** :ref:`int` line, :ref:`int` gutter **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_wrapped` **(** :ref:`int` line **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_mouse_over_selection` **(** :ref:`bool` edges, :ref:`int` caret_index=-1 **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_overtype_mode_enabled` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`menu_option` **(** :ref:`int` option **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`merge_gutters` **(** :ref:`int` from_line, :ref:`int` to_line **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`merge_overlapping_carets` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`paste` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`paste_primary_clipboard` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`redo` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_caret` **(** :ref:`int` caret **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_gutter` **(** :ref:`int` gutter **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_secondary_carets` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_text` **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`search` **(** :ref:`String` text, :ref:`int` flags, :ref:`int` from_line, :ref:`int` from_colum **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select` **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column, :ref:`int` caret_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_all` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_word_under_caret` **(** :ref:`int` caret_index=-1 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_caret_column` **(** :ref:`int` column, :ref:`bool` adjust_viewport=true, :ref:`int` caret_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_caret_line` **(** :ref:`int` line, :ref:`bool` adjust_viewport=true, :ref:`bool` can_be_hidden=true, :ref:`int` wrap_index=0, :ref:`int` caret_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gutter_clickable` **(** :ref:`int` gutter, :ref:`bool` clickable **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gutter_custom_draw` **(** :ref:`int` column, :ref:`Callable` draw_callback **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gutter_draw` **(** :ref:`int` gutter, :ref:`bool` draw **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gutter_name` **(** :ref:`int` gutter, :ref:`String` name **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gutter_overwritable` **(** :ref:`int` gutter, :ref:`bool` overwritable **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gutter_type` **(** :ref:`int` gutter, :ref:`GutterType` type **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_gutter_width` **(** :ref:`int` gutter, :ref:`int` width **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line` **(** :ref:`int` line, :ref:`String` new_text **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_as_center_visible` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_as_first_visible` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_as_last_visible` **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_background_color` **(** :ref:`int` line, :ref:`Color` color **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_gutter_clickable` **(** :ref:`int` line, :ref:`int` gutter, :ref:`bool` clickable **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_gutter_icon` **(** :ref:`int` line, :ref:`int` gutter, :ref:`Texture2D` icon **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_gutter_item_color` **(** :ref:`int` line, :ref:`int` gutter, :ref:`Color` color **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_gutter_metadata` **(** :ref:`int` line, :ref:`int` gutter, :ref:`Variant` metadata **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_line_gutter_text` **(** :ref:`int` line, :ref:`int` gutter, :ref:`String` text **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_overtype_mode_enabled` **(** :ref:`bool` enabled **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_search_flags` **(** :ref:`int` flags **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_search_text` **(** :ref:`String` search_text **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_selection_mode` **(** :ref:`SelectionMode` mode, :ref:`int` line=-1, :ref:`int` column=-1, :ref:`int` caret_index=0 **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_size` **(** :ref:`int` size **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tooltip_request_func` **(** :ref:`Callable` callback **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`start_action` **(** :ref:`EditAction` action **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`swap_lines` **(** :ref:`int` from_line, :ref:`int` to_line **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`tag_saved_version` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`undo` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 0)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :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:`current_line_color` | ``Color(0.25, 0.25, 0.26, 0.8)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :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:`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.5, 0.5, 0.5, 0.25)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`caret_width` | ``1`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`line_spacing` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`space` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`Texture2D` | :ref:`tab` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`normal` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`StyleBox` | :ref:`read_only` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 0)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :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:`current_line_color` | ``Color(0.25, 0.25, 0.26, 0.8)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :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:`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.5, 0.5, 0.5, 0.25)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`caret_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`line_spacing` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`space` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`tab` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`read_only` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_TextEdit_signal_caret_changed: -- **caret_changed** **(** **)** +.. rst-class:: classref-signal + +**caret_changed** **(** **)** Emitted when the caret changes position. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_signal_gutter_added: -- **gutter_added** **(** **)** +.. rst-class:: classref-signal + +**gutter_added** **(** **)** Emitted when a gutter is added. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_signal_gutter_clicked: -- **gutter_clicked** **(** :ref:`int` line, :ref:`int` gutter **)** +.. rst-class:: classref-signal + +**gutter_clicked** **(** :ref:`int` line, :ref:`int` gutter **)** Emitted when a gutter is clicked. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_signal_gutter_removed: -- **gutter_removed** **(** **)** +.. rst-class:: classref-signal + +**gutter_removed** **(** **)** Emitted when a gutter is removed. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_signal_lines_edited_from: -- **lines_edited_from** **(** :ref:`int` from_line, :ref:`int` to_line **)** +.. rst-class:: classref-signal + +**lines_edited_from** **(** :ref:`int` from_line, :ref:`int` to_line **)** 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``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_signal_text_changed: -- **text_changed** **(** **)** +.. rst-class:: classref-signal + +**text_changed** **(** **)** Emitted when the text changes. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_signal_text_set: -- **text_set** **(** **)** +.. rst-class:: classref-signal + +**text_set** **(** **)** Emitted when :ref:`clear` is called or :ref:`text` is set. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_TextEdit_MenuItems: -.. _class_TextEdit_constant_MENU_CUT: - -.. _class_TextEdit_constant_MENU_COPY: - -.. _class_TextEdit_constant_MENU_PASTE: - -.. _class_TextEdit_constant_MENU_CLEAR: - -.. _class_TextEdit_constant_MENU_SELECT_ALL: - -.. _class_TextEdit_constant_MENU_UNDO: - -.. _class_TextEdit_constant_MENU_REDO: - -.. _class_TextEdit_constant_MENU_DIR_INHERITED: - -.. _class_TextEdit_constant_MENU_DIR_AUTO: - -.. _class_TextEdit_constant_MENU_DIR_LTR: - -.. _class_TextEdit_constant_MENU_DIR_RTL: - -.. _class_TextEdit_constant_MENU_DISPLAY_UCC: - -.. _class_TextEdit_constant_MENU_INSERT_LRM: - -.. _class_TextEdit_constant_MENU_INSERT_RLM: - -.. _class_TextEdit_constant_MENU_INSERT_LRE: - -.. _class_TextEdit_constant_MENU_INSERT_RLE: - -.. _class_TextEdit_constant_MENU_INSERT_LRO: - -.. _class_TextEdit_constant_MENU_INSERT_RLO: - -.. _class_TextEdit_constant_MENU_INSERT_PDF: - -.. _class_TextEdit_constant_MENU_INSERT_ALM: - -.. _class_TextEdit_constant_MENU_INSERT_LRI: - -.. _class_TextEdit_constant_MENU_INSERT_RLI: - -.. _class_TextEdit_constant_MENU_INSERT_FSI: - -.. _class_TextEdit_constant_MENU_INSERT_PDI: - -.. _class_TextEdit_constant_MENU_INSERT_ZWJ: - -.. _class_TextEdit_constant_MENU_INSERT_ZWNJ: - -.. _class_TextEdit_constant_MENU_INSERT_WJ: - -.. _class_TextEdit_constant_MENU_INSERT_SHY: - -.. _class_TextEdit_constant_MENU_MAX: +.. rst-class:: classref-enumeration enum **MenuItems**: -- **MENU_CUT** = **0** --- Cuts (copies and clears) the selected text. +.. _class_TextEdit_constant_MENU_CUT: -- **MENU_COPY** = **1** --- Copies the selected text. +.. rst-class:: classref-enumeration-constant -- **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the cursor's position). +:ref:`MenuItems` **MENU_CUT** = ``0`` -- **MENU_CLEAR** = **3** --- Erases the whole ``TextEdit`` text. +Cuts (copies and clears) the selected text. -- **MENU_SELECT_ALL** = **4** --- Selects the whole ``TextEdit`` text. +.. _class_TextEdit_constant_MENU_COPY: -- **MENU_UNDO** = **5** --- Undoes the previous action. +.. rst-class:: classref-enumeration-constant -- **MENU_REDO** = **6** --- Redoes the previous action. +:ref:`MenuItems` **MENU_COPY** = ``1`` -- **MENU_DIR_INHERITED** = **7** --- Sets text direction to inherited. +Copies the selected text. -- **MENU_DIR_AUTO** = **8** --- Sets text direction to automatic. +.. _class_TextEdit_constant_MENU_PASTE: -- **MENU_DIR_LTR** = **9** --- Sets text direction to left-to-right. +.. rst-class:: classref-enumeration-constant -- **MENU_DIR_RTL** = **10** --- Sets text direction to right-to-left. +:ref:`MenuItems` **MENU_PASTE** = ``2`` -- **MENU_DISPLAY_UCC** = **11** --- Toggles control character display. +Pastes the clipboard text over the selected text (or at the cursor's position). -- **MENU_INSERT_LRM** = **12** --- Inserts left-to-right mark (LRM) character. +.. _class_TextEdit_constant_MENU_CLEAR: -- **MENU_INSERT_RLM** = **13** --- Inserts right-to-left mark (RLM) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_LRE** = **14** --- Inserts start of left-to-right embedding (LRE) character. +:ref:`MenuItems` **MENU_CLEAR** = ``3`` -- **MENU_INSERT_RLE** = **15** --- Inserts start of right-to-left embedding (RLE) character. +Erases the whole **TextEdit** text. -- **MENU_INSERT_LRO** = **16** --- Inserts start of left-to-right override (LRO) character. +.. _class_TextEdit_constant_MENU_SELECT_ALL: -- **MENU_INSERT_RLO** = **17** --- Inserts start of right-to-left override (RLO) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_PDF** = **18** --- Inserts pop direction formatting (PDF) character. +:ref:`MenuItems` **MENU_SELECT_ALL** = ``4`` -- **MENU_INSERT_ALM** = **19** --- Inserts Arabic letter mark (ALM) character. +Selects the whole **TextEdit** text. -- **MENU_INSERT_LRI** = **20** --- Inserts left-to-right isolate (LRI) character. +.. _class_TextEdit_constant_MENU_UNDO: -- **MENU_INSERT_RLI** = **21** --- Inserts right-to-left isolate (RLI) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_FSI** = **22** --- Inserts first strong isolate (FSI) character. +:ref:`MenuItems` **MENU_UNDO** = ``5`` -- **MENU_INSERT_PDI** = **23** --- Inserts pop direction isolate (PDI) character. +Undoes the previous action. -- **MENU_INSERT_ZWJ** = **24** --- Inserts zero width joiner (ZWJ) character. +.. _class_TextEdit_constant_MENU_REDO: -- **MENU_INSERT_ZWNJ** = **25** --- Inserts zero width non-joiner (ZWNJ) character. +.. rst-class:: classref-enumeration-constant -- **MENU_INSERT_WJ** = **26** --- Inserts word joiner (WJ) character. +:ref:`MenuItems` **MENU_REDO** = ``6`` -- **MENU_INSERT_SHY** = **27** --- Inserts soft hyphen (SHY) character. +Redoes the previous action. -- **MENU_MAX** = **28** --- Represents the size of the :ref:`MenuItems` enum. +.. _class_TextEdit_constant_MENU_DIR_INHERITED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DIR_INHERITED** = ``7`` + +Sets text direction to inherited. + +.. _class_TextEdit_constant_MENU_DIR_AUTO: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DIR_AUTO** = ``8`` + +Sets text direction to automatic. + +.. _class_TextEdit_constant_MENU_DIR_LTR: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DIR_LTR** = ``9`` + +Sets text direction to left-to-right. + +.. _class_TextEdit_constant_MENU_DIR_RTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DIR_RTL** = ``10`` + +Sets text direction to right-to-left. + +.. _class_TextEdit_constant_MENU_DISPLAY_UCC: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_DISPLAY_UCC** = ``11`` + +Toggles control character display. + +.. _class_TextEdit_constant_MENU_INSERT_LRM: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRM** = ``12`` + +Inserts left-to-right mark (LRM) character. + +.. _class_TextEdit_constant_MENU_INSERT_RLM: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLM** = ``13`` + +Inserts right-to-left mark (RLM) character. + +.. _class_TextEdit_constant_MENU_INSERT_LRE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRE** = ``14`` + +Inserts start of left-to-right embedding (LRE) character. + +.. _class_TextEdit_constant_MENU_INSERT_RLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLE** = ``15`` + +Inserts start of right-to-left embedding (RLE) character. + +.. _class_TextEdit_constant_MENU_INSERT_LRO: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRO** = ``16`` + +Inserts start of left-to-right override (LRO) character. + +.. _class_TextEdit_constant_MENU_INSERT_RLO: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLO** = ``17`` + +Inserts start of right-to-left override (RLO) character. + +.. _class_TextEdit_constant_MENU_INSERT_PDF: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_PDF** = ``18`` + +Inserts pop direction formatting (PDF) character. + +.. _class_TextEdit_constant_MENU_INSERT_ALM: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_ALM** = ``19`` + +Inserts Arabic letter mark (ALM) character. + +.. _class_TextEdit_constant_MENU_INSERT_LRI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_LRI** = ``20`` + +Inserts left-to-right isolate (LRI) character. + +.. _class_TextEdit_constant_MENU_INSERT_RLI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_RLI** = ``21`` + +Inserts right-to-left isolate (RLI) character. + +.. _class_TextEdit_constant_MENU_INSERT_FSI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_FSI** = ``22`` + +Inserts first strong isolate (FSI) character. + +.. _class_TextEdit_constant_MENU_INSERT_PDI: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_PDI** = ``23`` + +Inserts pop direction isolate (PDI) character. + +.. _class_TextEdit_constant_MENU_INSERT_ZWJ: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_ZWJ** = ``24`` + +Inserts zero width joiner (ZWJ) character. + +.. _class_TextEdit_constant_MENU_INSERT_ZWNJ: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_ZWNJ** = ``25`` + +Inserts zero width non-joiner (ZWNJ) character. + +.. _class_TextEdit_constant_MENU_INSERT_WJ: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_WJ** = ``26`` + +Inserts word joiner (WJ) character. + +.. _class_TextEdit_constant_MENU_INSERT_SHY: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_INSERT_SHY** = ``27`` + +Inserts soft hyphen (SHY) character. + +.. _class_TextEdit_constant_MENU_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`MenuItems` **MENU_MAX** = ``28`` + +Represents the size of the :ref:`MenuItems` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_TextEdit_EditAction: -.. _class_TextEdit_constant_ACTION_NONE: - -.. _class_TextEdit_constant_ACTION_TYPING: - -.. _class_TextEdit_constant_ACTION_BACKSPACE: - -.. _class_TextEdit_constant_ACTION_DELETE: +.. rst-class:: classref-enumeration enum **EditAction**: -- **ACTION_NONE** = **0** --- No current action. +.. _class_TextEdit_constant_ACTION_NONE: -- **ACTION_TYPING** = **1** --- A typing action. +.. rst-class:: classref-enumeration-constant -- **ACTION_BACKSPACE** = **2** --- A backwards delete action. +:ref:`EditAction` **ACTION_NONE** = ``0`` -- **ACTION_DELETE** = **3** --- A forward delete action. +No current action. + +.. _class_TextEdit_constant_ACTION_TYPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`EditAction` **ACTION_TYPING** = ``1`` + +A typing action. + +.. _class_TextEdit_constant_ACTION_BACKSPACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EditAction` **ACTION_BACKSPACE** = ``2`` + +A backwards delete action. + +.. _class_TextEdit_constant_ACTION_DELETE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EditAction` **ACTION_DELETE** = ``3`` + +A forward delete action. + +.. rst-class:: classref-item-separator ---- .. _enum_TextEdit_SearchFlags: -.. _class_TextEdit_constant_SEARCH_MATCH_CASE: - -.. _class_TextEdit_constant_SEARCH_WHOLE_WORDS: - -.. _class_TextEdit_constant_SEARCH_BACKWARDS: +.. rst-class:: classref-enumeration enum **SearchFlags**: -- **SEARCH_MATCH_CASE** = **1** --- Match case when searching. +.. _class_TextEdit_constant_SEARCH_MATCH_CASE: -- **SEARCH_WHOLE_WORDS** = **2** --- Match whole words when searching. +.. rst-class:: classref-enumeration-constant -- **SEARCH_BACKWARDS** = **4** --- Search from end to beginning. +:ref:`SearchFlags` **SEARCH_MATCH_CASE** = ``1`` + +Match case when searching. + +.. _class_TextEdit_constant_SEARCH_WHOLE_WORDS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SearchFlags` **SEARCH_WHOLE_WORDS** = ``2`` + +Match whole words when searching. + +.. _class_TextEdit_constant_SEARCH_BACKWARDS: + +.. rst-class:: classref-enumeration-constant + +:ref:`SearchFlags` **SEARCH_BACKWARDS** = ``4`` + +Search from end to beginning. + +.. rst-class:: classref-item-separator ---- .. _enum_TextEdit_CaretType: -.. _class_TextEdit_constant_CARET_TYPE_LINE: - -.. _class_TextEdit_constant_CARET_TYPE_BLOCK: +.. rst-class:: classref-enumeration enum **CaretType**: -- **CARET_TYPE_LINE** = **0** --- Vertical line caret. +.. _class_TextEdit_constant_CARET_TYPE_LINE: -- **CARET_TYPE_BLOCK** = **1** --- Block caret. +.. rst-class:: classref-enumeration-constant + +:ref:`CaretType` **CARET_TYPE_LINE** = ``0`` + +Vertical line caret. + +.. _class_TextEdit_constant_CARET_TYPE_BLOCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`CaretType` **CARET_TYPE_BLOCK** = ``1`` + +Block caret. + +.. rst-class:: classref-item-separator ---- .. _enum_TextEdit_SelectionMode: -.. _class_TextEdit_constant_SELECTION_MODE_NONE: - -.. _class_TextEdit_constant_SELECTION_MODE_SHIFT: - -.. _class_TextEdit_constant_SELECTION_MODE_POINTER: - -.. _class_TextEdit_constant_SELECTION_MODE_WORD: - -.. _class_TextEdit_constant_SELECTION_MODE_LINE: +.. rst-class:: classref-enumeration enum **SelectionMode**: -- **SELECTION_MODE_NONE** = **0** --- Not selecting. +.. _class_TextEdit_constant_SELECTION_MODE_NONE: -- **SELECTION_MODE_SHIFT** = **1** --- Select as if ``shift`` is pressed. +.. rst-class:: classref-enumeration-constant -- **SELECTION_MODE_POINTER** = **2** --- Select single characters as if the user single clicked. +:ref:`SelectionMode` **SELECTION_MODE_NONE** = ``0`` -- **SELECTION_MODE_WORD** = **3** --- Select whole words as if the user double clicked. +Not selecting. -- **SELECTION_MODE_LINE** = **4** --- Select whole lines as if the user tripped clicked. +.. _class_TextEdit_constant_SELECTION_MODE_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectionMode` **SELECTION_MODE_SHIFT** = ``1`` + +Select as if ``shift`` is pressed. + +.. _class_TextEdit_constant_SELECTION_MODE_POINTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectionMode` **SELECTION_MODE_POINTER** = ``2`` + +Select single characters as if the user single clicked. + +.. _class_TextEdit_constant_SELECTION_MODE_WORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectionMode` **SELECTION_MODE_WORD** = ``3`` + +Select whole words as if the user double clicked. + +.. _class_TextEdit_constant_SELECTION_MODE_LINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectionMode` **SELECTION_MODE_LINE** = ``4`` + +Select whole lines as if the user tripped clicked. + +.. rst-class:: classref-item-separator ---- .. _enum_TextEdit_LineWrappingMode: -.. _class_TextEdit_constant_LINE_WRAPPING_NONE: - -.. _class_TextEdit_constant_LINE_WRAPPING_BOUNDARY: +.. rst-class:: classref-enumeration enum **LineWrappingMode**: -- **LINE_WRAPPING_NONE** = **0** --- Line wrapping is disabled. +.. _class_TextEdit_constant_LINE_WRAPPING_NONE: -- **LINE_WRAPPING_BOUNDARY** = **1** --- Line wrapping occurs at the control boundary, beyond what would normally be visible. +.. rst-class:: classref-enumeration-constant + +:ref:`LineWrappingMode` **LINE_WRAPPING_NONE** = ``0`` + +Line wrapping is disabled. + +.. _class_TextEdit_constant_LINE_WRAPPING_BOUNDARY: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineWrappingMode` **LINE_WRAPPING_BOUNDARY** = ``1`` + +Line wrapping occurs at the control boundary, beyond what would normally be visible. + +.. rst-class:: classref-item-separator ---- .. _enum_TextEdit_GutterType: -.. _class_TextEdit_constant_GUTTER_TYPE_STRING: - -.. _class_TextEdit_constant_GUTTER_TYPE_ICON: - -.. _class_TextEdit_constant_GUTTER_TYPE_CUSTOM: +.. rst-class:: classref-enumeration enum **GutterType**: -- **GUTTER_TYPE_STRING** = **0** --- Draw a string. +.. _class_TextEdit_constant_GUTTER_TYPE_STRING: -- **GUTTER_TYPE_ICON** = **1** --- Draw an icon. +.. rst-class:: classref-enumeration-constant -- **GUTTER_TYPE_CUSTOM** = **2** --- Custom draw. +:ref:`GutterType` **GUTTER_TYPE_STRING** = ``0`` + +Draw a string. + +.. _class_TextEdit_constant_GUTTER_TYPE_ICON: + +.. rst-class:: classref-enumeration-constant + +:ref:`GutterType` **GUTTER_TYPE_ICON** = ``1`` + +Draw an icon. + +.. _class_TextEdit_constant_GUTTER_TYPE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`GutterType` **GUTTER_TYPE_CUSTOM** = ``2`` + +Custom draw. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextEdit_property_caret_blink: -- :ref:`bool` **caret_blink** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_caret_blink_enabled(value) | -+-----------+--------------------------------+ -| *Getter* | is_caret_blink_enabled() | -+-----------+--------------------------------+ +:ref:`bool` **caret_blink** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_caret_blink_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_caret_blink_enabled** **(** **)** Sets if the caret should blink. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_caret_blink_interval: -- :ref:`float` **caret_blink_interval** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.65`` | -+-----------+---------------------------------+ -| *Setter* | set_caret_blink_interval(value) | -+-----------+---------------------------------+ -| *Getter* | get_caret_blink_interval() | -+-----------+---------------------------------+ +:ref:`float` **caret_blink_interval** = ``0.65`` + +.. rst-class:: classref-property-setget + +- void **set_caret_blink_interval** **(** :ref:`float` value **)** +- :ref:`float` **get_caret_blink_interval** **(** **)** Duration (in seconds) of a caret's blinking cycle. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_caret_mid_grapheme: -- :ref:`bool` **caret_mid_grapheme** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------------+ -| *Setter* | set_caret_mid_grapheme_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_caret_mid_grapheme_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **caret_mid_grapheme** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_caret_mid_grapheme_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_caret_mid_grapheme_enabled** **(** **)** Allow moving caret, selecting and removing the individual composite character components. \ **Note:** :kbd:`Backspace` is always removing individual composite character components. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_caret_move_on_right_click: -- :ref:`bool` **caret_move_on_right_click** +.. rst-class:: classref-property -+-----------+----------------------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------------------+ -| *Setter* | set_move_caret_on_right_click_enabled(value) | -+-----------+----------------------------------------------+ -| *Getter* | is_move_caret_on_right_click_enabled() | -+-----------+----------------------------------------------+ +:ref:`bool` **caret_move_on_right_click** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_move_caret_on_right_click_enabled** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_caret_multiple: -- :ref:`bool` **caret_multiple** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------------+ -| *Setter* | set_multiple_carets_enabled(value) | -+-----------+------------------------------------+ -| *Getter* | is_multiple_carets_enabled() | -+-----------+------------------------------------+ +:ref:`bool` **caret_multiple** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_multiple_carets_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_multiple_carets_enabled** **(** **)** Sets if multiple carets are allowed. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_caret_type: -- :ref:`CaretType` **caret_type** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_caret_type(value) | -+-----------+-----------------------+ -| *Getter* | get_caret_type() | -+-----------+-----------------------+ +:ref:`CaretType` **caret_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_caret_type** **(** :ref:`CaretType` value **)** +- :ref:`CaretType` **get_caret_type** **(** **)** Set the type of caret to draw. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_context_menu_enabled: -- :ref:`bool` **context_menu_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_context_menu_enabled(value) | -+-----------+---------------------------------+ -| *Getter* | is_context_menu_enabled() | -+-----------+---------------------------------+ +:ref:`bool` **context_menu_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_context_menu_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_context_menu_enabled** **(** **)** If ``true``, a right-click displays the context menu. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_deselect_on_focus_loss_enabled: -- :ref:`bool` **deselect_on_focus_loss_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------------+ -| *Setter* | set_deselect_on_focus_loss_enabled(value) | -+-----------+-------------------------------------------+ -| *Getter* | is_deselect_on_focus_loss_enabled() | -+-----------+-------------------------------------------+ +:ref:`bool` **deselect_on_focus_loss_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_deselect_on_focus_loss_enabled** **(** **)** If ``true``, the selected text will be deselected when focus is lost. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_drag_and_drop_selection_enabled: -- :ref:`bool` **drag_and_drop_selection_enabled** +.. rst-class:: classref-property -+-----------+--------------------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------------------+ -| *Setter* | set_drag_and_drop_selection_enabled(value) | -+-----------+--------------------------------------------+ -| *Getter* | is_drag_and_drop_selection_enabled() | -+-----------+--------------------------------------------+ +:ref:`bool` **drag_and_drop_selection_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_drag_and_drop_selection_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drag_and_drop_selection_enabled** **(** **)** If ``true``, allow drag and drop of selected text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_draw_control_chars: -- :ref:`bool` **draw_control_chars** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_draw_control_chars(value) | -+-----------+-------------------------------+ -| *Getter* | get_draw_control_chars() | -+-----------+-------------------------------+ +:ref:`bool` **draw_control_chars** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_control_chars** **(** :ref:`bool` value **)** +- :ref:`bool` **get_draw_control_chars** **(** **)** If ``true``, control characters are displayed. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_draw_spaces: -- :ref:`bool` **draw_spaces** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_draw_spaces(value) | -+-----------+------------------------+ -| *Getter* | is_drawing_spaces() | -+-----------+------------------------+ +:ref:`bool` **draw_spaces** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_spaces** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_spaces** **(** **)** If ``true``, the "space" character will have a visible representation. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_draw_tabs: -- :ref:`bool` **draw_tabs** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_draw_tabs(value) | -+-----------+----------------------+ -| *Getter* | is_drawing_tabs() | -+-----------+----------------------+ +:ref:`bool` **draw_tabs** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_tabs** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_tabs** **(** **)** If ``true``, the "tab" character will have a visible representation. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_editable: -- :ref:`bool` **editable** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``true`` | -+-----------+---------------------+ -| *Setter* | set_editable(value) | -+-----------+---------------------+ -| *Getter* | is_editable() | -+-----------+---------------------+ +:ref:`bool` **editable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_editable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_editable** **(** **)** If ``false``, existing text cannot be modified and new text cannot be added. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_highlight_all_occurrences: -- :ref:`bool` **highlight_all_occurrences** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------------+ -| *Setter* | set_highlight_all_occurrences(value) | -+-----------+----------------------------------------+ -| *Getter* | is_highlight_all_occurrences_enabled() | -+-----------+----------------------------------------+ +:ref:`bool` **highlight_all_occurrences** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_highlight_all_occurrences** **(** :ref:`bool` value **)** +- :ref:`bool` **is_highlight_all_occurrences_enabled** **(** **)** If ``true``, all occurrences of the selected text will be highlighted. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_highlight_current_line: -- :ref:`bool` **highlight_current_line** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------+ -| *Setter* | set_highlight_current_line(value) | -+-----------+-------------------------------------+ -| *Getter* | is_highlight_current_line_enabled() | -+-----------+-------------------------------------+ +:ref:`bool` **highlight_current_line** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_highlight_current_line** **(** :ref:`bool` value **)** +- :ref:`bool` **is_highlight_current_line_enabled** **(** **)** If ``true``, the line containing the cursor is highlighted. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`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_TextEdit_property_middle_mouse_paste_enabled: -- :ref:`bool` **middle_mouse_paste_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------------+ -| *Setter* | set_middle_mouse_paste_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_middle_mouse_paste_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **middle_mouse_paste_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_middle_mouse_paste_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_middle_mouse_paste_enabled** **(** **)** If ``false``, using middle mouse button to paste clipboard will be disabled. \ **Note:** This method is only implemented on Linux. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_minimap_draw: -- :ref:`bool` **minimap_draw** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_draw_minimap(value) | -+-----------+-------------------------+ -| *Getter* | is_drawing_minimap() | -+-----------+-------------------------+ +:ref:`bool` **minimap_draw** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_minimap** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_minimap** **(** **)** If ``true``, a minimap is shown, providing an outline of your source code. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_minimap_width: -- :ref:`int` **minimap_width** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``80`` | -+-----------+--------------------------+ -| *Setter* | set_minimap_width(value) | -+-----------+--------------------------+ -| *Getter* | get_minimap_width() | -+-----------+--------------------------+ +:ref:`int` **minimap_width** = ``80`` + +.. rst-class:: classref-property-setget + +- void **set_minimap_width** **(** :ref:`int` value **)** +- :ref:`int` **get_minimap_width** **(** **)** The width, in pixels, of the minimap. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_placeholder_text: -- :ref:`String` **placeholder_text** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``""`` | -+-----------+------------------------+ -| *Setter* | set_placeholder(value) | -+-----------+------------------------+ -| *Getter* | get_placeholder() | -+-----------+------------------------+ +:ref:`String` **placeholder_text** = ``""`` -Text shown when the ``TextEdit`` is empty. It is **not** the ``TextEdit``'s default value (see :ref:`text`). +.. rst-class:: classref-property-setget + +- void **set_placeholder** **(** :ref:`String` value **)** +- :ref:`String` **get_placeholder** **(** **)** + +Text shown when the **TextEdit** is empty. It is **not** the **TextEdit**'s default value (see :ref:`text`). + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_property_scroll_fit_content_height: -- :ref:`bool` **scroll_fit_content_height** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------+ -| *Setter* | set_fit_content_height_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_fit_content_height_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **scroll_fit_content_height** = ``false`` -If ``true``, ``TextEdit`` will disable vertical scroll and fit minimum height to the number of visible lines. +.. rst-class:: classref-property-setget + +- void **set_fit_content_height_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_fit_content_height_enabled** **(** **)** + +If ``true``, **TextEdit** will disable vertical scroll and fit minimum height to the number of visible lines. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_property_scroll_horizontal: -- :ref:`int` **scroll_horizontal** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_h_scroll(value) | -+-----------+---------------------+ -| *Getter* | get_h_scroll() | -+-----------+---------------------+ +:ref:`int` **scroll_horizontal** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_h_scroll** **(** :ref:`int` value **)** +- :ref:`int` **get_h_scroll** **(** **)** If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_scroll_past_end_of_file: -- :ref:`bool` **scroll_past_end_of_file** +.. rst-class:: classref-property -+-----------+--------------------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------------------+ -| *Setter* | set_scroll_past_end_of_file_enabled(value) | -+-----------+--------------------------------------------+ -| *Getter* | is_scroll_past_end_of_file_enabled() | -+-----------+--------------------------------------------+ +:ref:`bool` **scroll_past_end_of_file** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_scroll_past_end_of_file_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_scroll_past_end_of_file_enabled** **(** **)** Allow scrolling past the last line into "virtual" space. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_scroll_smooth: -- :ref:`bool` **scroll_smooth** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_smooth_scroll_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_smooth_scroll_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **scroll_smooth** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_smooth_scroll_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_smooth_scroll_enabled** **(** **)** Scroll smoothly over the text rather then jumping to the next location. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_scroll_v_scroll_speed: -- :ref:`float` **scroll_v_scroll_speed** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``80.0`` | -+-----------+---------------------------+ -| *Setter* | set_v_scroll_speed(value) | -+-----------+---------------------------+ -| *Getter* | get_v_scroll_speed() | -+-----------+---------------------------+ +:ref:`float` **scroll_v_scroll_speed** = ``80.0`` + +.. rst-class:: classref-property-setget + +- void **set_v_scroll_speed** **(** :ref:`float` value **)** +- :ref:`float` **get_v_scroll_speed** **(** **)** Sets the scroll speed with the minimap or when :ref:`scroll_smooth` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_scroll_vertical: -- :ref:`float` **scroll_vertical** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_v_scroll(value) | -+-----------+---------------------+ -| *Getter* | get_v_scroll() | -+-----------+---------------------+ +:ref:`float` **scroll_vertical** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_v_scroll** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_selecting_enabled: -- :ref:`bool` **selecting_enabled** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``true`` | -+-----------+------------------------------+ -| *Setter* | set_selecting_enabled(value) | -+-----------+------------------------------+ -| *Getter* | is_selecting_enabled() | -+-----------+------------------------------+ +:ref:`bool` **selecting_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_selecting_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_selecting_enabled** **(** **)** If ``true``, text can be selected. If ``false``, text can not be selected by the user or by the :ref:`select` or :ref:`select_all` methods. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_shortcut_keys_enabled: -- :ref:`bool` **shortcut_keys_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_shortcut_keys_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_shortcut_keys_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **shortcut_keys_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_shortcut_keys_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shortcut_keys_enabled** **(** **)** If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_structured_text_bidi_override(value) | -+-----------+------------------------------------------+ -| *Getter* | get_structured_text_bidi_override() | -+-----------+------------------------------------------+ +:ref:`StructuredTextParser` **structured_text_bidi_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser` value **)** +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** **)** Set BiDi algorithm override for the structured text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_structured_text_bidi_override_options: -- :ref:`Array` **structured_text_bidi_override_options** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``[]`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_structured_text_bidi_override_options(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_structured_text_bidi_override_options() | -+-----------+--------------------------------------------------+ +:ref:`Array` **structured_text_bidi_override_options** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override_options** **(** :ref:`Array` value **)** +- :ref:`Array` **get_structured_text_bidi_override_options** **(** **)** Set additional options for BiDi override. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_syntax_highlighter: -- :ref:`SyntaxHighlighter` **syntax_highlighter** +.. rst-class:: classref-property -+----------+-------------------------------+ -| *Setter* | set_syntax_highlighter(value) | -+----------+-------------------------------+ -| *Getter* | get_syntax_highlighter() | -+----------+-------------------------------+ +:ref:`SyntaxHighlighter` **syntax_highlighter** + +.. rst-class:: classref-property-setget + +- void **set_syntax_highlighter** **(** :ref:`SyntaxHighlighter` value **)** +- :ref:`SyntaxHighlighter` **get_syntax_highlighter** **(** **)** Sets the :ref:`SyntaxHighlighter` to use. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` -String value of the ``TextEdit``. +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** + +String value of the **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_property_text_direction: -- :ref:`TextDirection` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`TextDirection` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`TextDirection` value **)** +- :ref:`TextDirection` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_virtual_keyboard_enabled: -- :ref:`bool` **virtual_keyboard_enabled** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------+ -| *Setter* | set_virtual_keyboard_enabled(value) | -+-----------+-------------------------------------+ -| *Getter* | is_virtual_keyboard_enabled() | -+-----------+-------------------------------------+ +:ref:`bool` **virtual_keyboard_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_virtual_keyboard_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_virtual_keyboard_enabled** **(** **)** If ``true``, the native virtual keyboard is shown when focused on platforms that support it. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_property_wrap_mode: -- :ref:`LineWrappingMode` **wrap_mode** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_line_wrapping_mode(value) | -+-----------+-------------------------------+ -| *Getter* | get_line_wrapping_mode() | -+-----------+-------------------------------+ +:ref:`LineWrappingMode` **wrap_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_line_wrapping_mode** **(** :ref:`LineWrappingMode` value **)** +- :ref:`LineWrappingMode` **get_line_wrapping_mode** **(** **)** Sets the line wrapping mode to use. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TextEdit_method__backspace: -- void **_backspace** **(** :ref:`int` caret_index **)** |virtual| +.. rst-class:: classref-method + +void **_backspace** **(** :ref:`int` caret_index **)** |virtual| Override this method to define what happens when the user presses the backspace key. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method__copy: -- void **_copy** **(** :ref:`int` caret_index **)** |virtual| +.. rst-class:: classref-method + +void **_copy** **(** :ref:`int` caret_index **)** |virtual| Override this method to define what happens when the user performs a copy operation. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method__cut: -- void **_cut** **(** :ref:`int` caret_index **)** |virtual| +.. rst-class:: classref-method + +void **_cut** **(** :ref:`int` caret_index **)** |virtual| Override this method to define what happens when the user performs a cut operation. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method__handle_unicode_input: -- void **_handle_unicode_input** **(** :ref:`int` unicode_char, :ref:`int` caret_index **)** |virtual| +.. rst-class:: classref-method + +void **_handle_unicode_input** **(** :ref:`int` unicode_char, :ref:`int` caret_index **)** |virtual| Override this method to define what happens when the user types in the provided key ``unicode_char``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method__paste: -- void **_paste** **(** :ref:`int` caret_index **)** |virtual| +.. rst-class:: classref-method + +void **_paste** **(** :ref:`int` caret_index **)** |virtual| Override this method to define what happens when the user performs a paste operation. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method__paste_primary_clipboard: -- void **_paste_primary_clipboard** **(** :ref:`int` caret_index **)** |virtual| +.. rst-class:: classref-method + +void **_paste_primary_clipboard** **(** :ref:`int` caret_index **)** |virtual| Override this method to define what happens when the user performs a paste operation with middle mouse button. \ **Note:** This method is only implemented on Linux. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_add_caret: -- :ref:`int` **add_caret** **(** :ref:`int` line, :ref:`int` col **)** +.. rst-class:: classref-method + +:ref:`int` **add_caret** **(** :ref:`int` line, :ref:`int` col **)** Adds a new caret at the given location. Returns the index of the new caret, or ``-1`` if the location is invalid. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_add_caret_at_carets: -- void **add_caret_at_carets** **(** :ref:`bool` below **)** +.. rst-class:: classref-method + +void **add_caret_at_carets** **(** :ref:`bool` below **)** 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 + ---- .. _class_TextEdit_method_add_gutter: -- void **add_gutter** **(** :ref:`int` at=-1 **)** +.. rst-class:: classref-method -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. +void **add_gutter** **(** :ref:`int` at=-1 **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_add_selection_for_next_occurrence: -- void **add_selection_for_next_occurrence** **(** **)** +.. rst-class:: classref-method + +void **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. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_adjust_carets_after_edit: -- void **adjust_carets_after_edit** **(** :ref:`int` caret, :ref:`int` from_line, :ref:`int` from_col, :ref:`int` to_line, :ref:`int` to_col **)** +.. rst-class:: classref-method + +void **adjust_carets_after_edit** **(** :ref:`int` caret, :ref:`int` from_line, :ref:`int` from_col, :ref:`int` to_line, :ref:`int` to_col **)** Reposition the carets affected by the edit. This assumes edits are applied in edit order, see :ref:`get_caret_index_edit_order`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_adjust_viewport_to_caret: -- void **adjust_viewport_to_caret** **(** :ref:`int` caret_index=0 **)** +.. rst-class:: classref-method + +void **adjust_viewport_to_caret** **(** :ref:`int` caret_index=0 **)** Adjust the viewport so the caret is visible. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_backspace: -- void **backspace** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **backspace** **(** :ref:`int` caret_index=-1 **)** Called when the user presses the backspace key. Can be overridden with :ref:`_backspace`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_begin_complex_operation: -- void **begin_complex_operation** **(** **)** +.. rst-class:: classref-method + +void **begin_complex_operation** **(** **)** Starts a multipart edit. All edits will be treated as one action until :ref:`end_complex_operation` is called. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_center_viewport_to_caret: -- void **center_viewport_to_caret** **(** :ref:`int` caret_index=0 **)** +.. rst-class:: classref-method + +void **center_viewport_to_caret** **(** :ref:`int` caret_index=0 **)** Centers the viewport on the line the editing caret is at. This also resets the :ref:`scroll_horizontal` value to ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method -Performs a full reset of ``TextEdit``, including undo history. +void **clear** **(** **)** + +Performs a full reset of **TextEdit**, including undo history. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_clear_undo_history: -- void **clear_undo_history** **(** **)** +.. rst-class:: classref-method + +void **clear_undo_history** **(** **)** Clears the undo history. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_copy: -- void **copy** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **copy** **(** :ref:`int` caret_index=-1 **)** Copies the current text selection. Can be overridden with :ref:`_copy`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_cut: -- void **cut** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **cut** **(** :ref:`int` caret_index=-1 **)** Cut's the current selection. Can be overridden with :ref:`_cut`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_delete_selection: -- void **delete_selection** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **delete_selection** **(** :ref:`int` caret_index=-1 **)** Deletes the selected text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_deselect: -- void **deselect** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **deselect** **(** :ref:`int` caret_index=-1 **)** Deselects the current selection. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_end_action: -- void **end_action** **(** **)** +.. rst-class:: classref-method + +void **end_action** **(** **)** Marks the end of steps in the current action started with :ref:`start_action`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_end_complex_operation: -- void **end_complex_operation** **(** **)** +.. rst-class:: classref-method + +void **end_complex_operation** **(** **)** Ends a multipart edit, started with :ref:`begin_complex_operation`. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_caret_column: -- :ref:`int` **get_caret_column** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_caret_column** **(** :ref:`int` caret_index=0 **)** |const| Returns the column the editing caret is at. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_caret_count: -- :ref:`int` **get_caret_count** **(** **)** |const| +.. rst-class:: classref-method -Returns the number of carets in this ``TextEdit``. +:ref:`int` **get_caret_count** **(** **)** |const| + +Returns the number of carets in this **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_get_caret_draw_pos: -- :ref:`Vector2` **get_caret_draw_pos** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_caret_draw_pos** **(** :ref:`int` caret_index=0 **)** |const| Returns the caret pixel draw position. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_caret_index_edit_order: -- :ref:`PackedInt32Array` **get_caret_index_edit_order** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_caret_index_edit_order** **(** **)** 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` are applied. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_caret_line: -- :ref:`int` **get_caret_line** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_caret_line** **(** :ref:`int` caret_index=0 **)** |const| Returns the line the editing caret is on. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_caret_wrap_index: -- :ref:`int` **get_caret_wrap_index** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_caret_wrap_index** **(** :ref:`int` caret_index=0 **)** |const| Returns the wrap index the editing caret is on. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_first_non_whitespace_column: -- :ref:`int` **get_first_non_whitespace_column** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_first_non_whitespace_column** **(** :ref:`int` line **)** |const| Returns the first column containing a non-whitespace character. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_first_visible_line: -- :ref:`int` **get_first_visible_line** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_first_visible_line** **(** **)** |const| Returns the first visible line. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_gutter_count: -- :ref:`int` **get_gutter_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_gutter_count** **(** **)** |const| Returns the number of gutters registered. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_gutter_name: -- :ref:`String` **get_gutter_name** **(** :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_gutter_name** **(** :ref:`int` gutter **)** |const| Returns the name of the gutter at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_gutter_type: -- :ref:`GutterType` **get_gutter_type** **(** :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`GutterType` **get_gutter_type** **(** :ref:`int` gutter **)** |const| Returns the type of the gutter at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_gutter_width: -- :ref:`int` **get_gutter_width** **(** :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_gutter_width** **(** :ref:`int` gutter **)** |const| Returns the width of the gutter at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_h_scroll_bar: -- :ref:`HScrollBar` **get_h_scroll_bar** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`HScrollBar` used by ``TextEdit``. +:ref:`HScrollBar` **get_h_scroll_bar** **(** **)** |const| + +Returns the :ref:`HScrollBar` used by **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_get_indent_level: -- :ref:`int` **get_indent_level** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_indent_level** **(** :ref:`int` line **)** |const| Returns the number of spaces and ``tab * tab_size`` before the first char. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_last_full_visible_line: -- :ref:`int` **get_last_full_visible_line** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_last_full_visible_line** **(** **)** |const| Returns the last visible line. Use :ref:`get_last_full_visible_line_wrap_index` for the wrap index. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_last_full_visible_line_wrap_index: -- :ref:`int` **get_last_full_visible_line_wrap_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_last_full_visible_line_wrap_index** **(** **)** |const| Returns the last visible wrap index of the last visible line. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_last_unhidden_line: -- :ref:`int` **get_last_unhidden_line** **(** **)** |const| +.. rst-class:: classref-method -Returns the last unhidden line in the entire ``TextEdit``. +:ref:`int` **get_last_unhidden_line** **(** **)** |const| + +Returns the last unhidden line in the entire **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_get_line: -- :ref:`String` **get_line** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_line** **(** :ref:`int` line **)** |const| Returns the text of a specific line. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_background_color: -- :ref:`Color` **get_line_background_color** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_line_background_color** **(** :ref:`int` line **)** |const| Returns the current background color of the line. ``Color(0, 0, 0, 0)`` is returned if no color is set. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_column_at_pos: -- :ref:`Vector2i` **get_line_column_at_pos** **(** :ref:`Vector2i` position, :ref:`bool` allow_out_of_bounds=true **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_line_column_at_pos** **(** :ref:`Vector2i` position, :ref:`bool` allow_out_of_bounds=true **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_count: -- :ref:`int` **get_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_count** **(** **)** |const| Returns the number of lines in the text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_gutter_icon: -- :ref:`Texture2D` **get_line_gutter_icon** **(** :ref:`int` line, :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_line_gutter_icon** **(** :ref:`int` line, :ref:`int` gutter **)** |const| Returns the icon currently in ``gutter`` at ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_gutter_item_color: -- :ref:`Color` **get_line_gutter_item_color** **(** :ref:`int` line, :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_line_gutter_item_color** **(** :ref:`int` line, :ref:`int` gutter **)** |const| Returns the color currently in ``gutter`` at ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_gutter_metadata: -- :ref:`Variant` **get_line_gutter_metadata** **(** :ref:`int` line, :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_line_gutter_metadata** **(** :ref:`int` line, :ref:`int` gutter **)** |const| Returns the metadata currently in ``gutter`` at ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_gutter_text: -- :ref:`String` **get_line_gutter_text** **(** :ref:`int` line, :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_line_gutter_text** **(** :ref:`int` line, :ref:`int` gutter **)** |const| Returns the text currently in ``gutter`` at ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_height: -- :ref:`int` **get_line_height** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_height** **(** **)** |const| Returns the height of a largest line. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_width: -- :ref:`int` **get_line_width** **(** :ref:`int` line, :ref:`int` wrap_index=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_width** **(** :ref:`int` line, :ref:`int` wrap_index=-1 **)** |const| Returns the width in pixels of the ``wrap_index`` on ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_wrap_count: -- :ref:`int` **get_line_wrap_count** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_wrap_count** **(** :ref:`int` line **)** |const| Returns the number of times the given line is wrapped. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_wrap_index_at_column: -- :ref:`int` **get_line_wrap_index_at_column** **(** :ref:`int` line, :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_wrap_index_at_column** **(** :ref:`int` line, :ref:`int` column **)** |const| Returns the wrap index of the given line column. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_line_wrapped_text: -- :ref:`PackedStringArray` **get_line_wrapped_text** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_line_wrapped_text** **(** :ref:`int` line **)** |const| Returns an array of :ref:`String`\ s representing each wrapped index. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_local_mouse_pos: -- :ref:`Vector2` **get_local_mouse_pos** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_local_mouse_pos** **(** **)** |const| Returns the local mouse position adjusted for the text direction. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_menu: -- :ref:`PopupMenu` **get_menu** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`PopupMenu` of this ``TextEdit``. By default, this menu is displayed when right-clicking on the ``TextEdit``. +:ref:`PopupMenu` **get_menu** **(** **)** |const| + +Returns the :ref:`PopupMenu` of this **TextEdit**. By default, this menu is displayed when right-clicking on the **TextEdit**. \ **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:`Window.visible` property. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_minimap_line_at_pos: -- :ref:`int` **get_minimap_line_at_pos** **(** :ref:`Vector2i` position **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_minimap_line_at_pos** **(** :ref:`Vector2i` position **)** |const| Returns the equivalent minimap line at ``position`` +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_minimap_visible_lines: -- :ref:`int` **get_minimap_visible_lines** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_minimap_visible_lines** **(** **)** |const| Returns the number of lines that may be drawn on the minimap. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_next_visible_line_index_offset_from: -- :ref:`Vector2i` **get_next_visible_line_index_offset_from** **(** :ref:`int` line, :ref:`int` wrap_index, :ref:`int` visible_amount **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_next_visible_line_index_offset_from** **(** :ref:`int` line, :ref:`int` wrap_index, :ref:`int` visible_amount **)** |const| Similar to :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_next_visible_line_offset_from: -- :ref:`int` **get_next_visible_line_offset_from** **(** :ref:`int` line, :ref:`int` visible_amount **)** |const| +.. rst-class:: classref-method -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. +:ref:`int` **get_next_visible_line_offset_from** **(** :ref:`int` line, :ref:`int` visible_amount **)** |const| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_get_pos_at_line_column: -- :ref:`Vector2i` **get_pos_at_line_column** **(** :ref:`int` line, :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_pos_at_line_column** **(** :ref:`int` line, :ref:`int` column **)** |const| 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. \ **Note:** The Y position corresponds to the bottom side of the line. Use :ref:`get_rect_at_line_column` to get the top side position. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_rect_at_line_column: -- :ref:`Rect2i` **get_rect_at_line_column** **(** :ref:`int` line, :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2i` **get_rect_at_line_column** **(** :ref:`int` line, :ref:`int` column **)** |const| 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. \ **Note:** The Y position of the returned rect corresponds to the top side of the line, unlike :ref:`get_pos_at_line_column` which returns the bottom side. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_saved_version: -- :ref:`int` **get_saved_version** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_saved_version** **(** **)** |const| Returns the last tagged saved version from :ref:`tag_saved_version` +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_scroll_pos_for_line: -- :ref:`float` **get_scroll_pos_for_line** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_scroll_pos_for_line** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** |const| Returns the scroll position for ``wrap_index`` of ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selected_text: -- :ref:`String` **get_selected_text** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +:ref:`String` **get_selected_text** **(** :ref:`int` caret_index=-1 **)** Returns the text inside the selection. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selection_column: -- :ref:`int` **get_selection_column** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_column** **(** :ref:`int` caret_index=0 **)** |const| Returns the original start column of the selection. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selection_from_column: -- :ref:`int` **get_selection_from_column** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_from_column** **(** :ref:`int` caret_index=0 **)** |const| Returns the selection begin column. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selection_from_line: -- :ref:`int` **get_selection_from_line** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_from_line** **(** :ref:`int` caret_index=0 **)** |const| Returns the selection begin line. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selection_line: -- :ref:`int` **get_selection_line** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_line** **(** :ref:`int` caret_index=0 **)** |const| Returns the original start line of the selection. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selection_mode: -- :ref:`SelectionMode` **get_selection_mode** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SelectionMode` **get_selection_mode** **(** **)** |const| Returns the current selection mode. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selection_to_column: -- :ref:`int` **get_selection_to_column** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_to_column** **(** :ref:`int` caret_index=0 **)** |const| Returns the selection end column. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_selection_to_line: -- :ref:`int` **get_selection_to_line** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selection_to_line** **(** :ref:`int` caret_index=0 **)** |const| Returns the selection end line. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_tab_size: -- :ref:`int` **get_tab_size** **(** **)** |const| +.. rst-class:: classref-method -Returns the ``TextEdit``'s' tab size. +:ref:`int` **get_tab_size** **(** **)** |const| + +Returns the **TextEdit**'s' tab size. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_get_total_gutter_width: -- :ref:`int` **get_total_gutter_width** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_total_gutter_width** **(** **)** |const| Returns the total width of all gutters and internal padding. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_total_visible_line_count: -- :ref:`int` **get_total_visible_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_total_visible_line_count** **(** **)** |const| Returns the number of lines that may be drawn. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_v_scroll_bar: -- :ref:`VScrollBar` **get_v_scroll_bar** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`VScrollBar` of the ``TextEdit``. +:ref:`VScrollBar` **get_v_scroll_bar** **(** **)** |const| + +Returns the :ref:`VScrollBar` of the **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_get_version: -- :ref:`int` **get_version** **(** **)** |const| +.. rst-class:: classref-method -Returns the current version of the ``TextEdit``. The version is a count of recorded operations by the undo/redo history. +:ref:`int` **get_version** **(** **)** |const| + +Returns the current version of the **TextEdit**. The version is a count of recorded operations by the undo/redo history. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_get_visible_line_count: -- :ref:`int` **get_visible_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_visible_line_count** **(** **)** |const| Returns the number of visible lines, including wrapped text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_visible_line_count_in_range: -- :ref:`int` **get_visible_line_count_in_range** **(** :ref:`int` from_line, :ref:`int` to_line **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_visible_line_count_in_range** **(** :ref:`int` from_line, :ref:`int` to_line **)** |const| Returns the total number of visible + wrapped lines between the two lines. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_word_at_pos: -- :ref:`String` **get_word_at_pos** **(** :ref:`Vector2` position **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_word_at_pos** **(** :ref:`Vector2` position **)** |const| Returns the word at ``position``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_get_word_under_caret: -- :ref:`String` **get_word_under_caret** **(** :ref:`int` caret_index=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_word_under_caret** **(** :ref:`int` caret_index=-1 **)** |const| Returns a :ref:`String` text with the word under the caret's location. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_has_ime_text: -- :ref:`bool` **has_ime_text** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_ime_text** **(** **)** |const| Returns if the user has IME text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_has_redo: -- :ref:`bool` **has_redo** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_redo** **(** **)** |const| Returns ``true`` if a "redo" action is available. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_has_selection: -- :ref:`bool` **has_selection** **(** :ref:`int` caret_index=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_selection** **(** :ref:`int` caret_index=-1 **)** |const| Returns ``true`` if the user has selected text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_has_undo: -- :ref:`bool` **has_undo** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_undo** **(** **)** |const| Returns ``true`` if an "undo" action is available. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_insert_line_at: -- void **insert_line_at** **(** :ref:`int` line, :ref:`String` text **)** +.. rst-class:: classref-method + +void **insert_line_at** **(** :ref:`int` line, :ref:`String` text **)** Inserts a new line with ``text`` at ``line``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_insert_text_at_caret: -- void **insert_text_at_caret** **(** :ref:`String` text, :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **insert_text_at_caret** **(** :ref:`String` text, :ref:`int` caret_index=-1 **)** Insert the specified text at the caret position. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_caret_visible: -- :ref:`bool` **is_caret_visible** **(** :ref:`int` caret_index=0 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_caret_visible** **(** :ref:`int` caret_index=0 **)** |const| Returns ``true`` if the caret is visible on the screen. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_dragging_cursor: -- :ref:`bool` **is_dragging_cursor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_dragging_cursor** **(** **)** |const| Returns ``true`` if the user is dragging their mouse for scrolling or selecting. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_gutter_clickable: -- :ref:`bool` **is_gutter_clickable** **(** :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_gutter_clickable** **(** :ref:`int` gutter **)** |const| Returns whether the gutter is clickable. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_gutter_drawn: -- :ref:`bool` **is_gutter_drawn** **(** :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_gutter_drawn** **(** :ref:`int` gutter **)** |const| Returns whether the gutter is currently drawn. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_gutter_overwritable: -- :ref:`bool` **is_gutter_overwritable** **(** :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_gutter_overwritable** **(** :ref:`int` gutter **)** |const| Returns whether the gutter is overwritable. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_line_gutter_clickable: -- :ref:`bool` **is_line_gutter_clickable** **(** :ref:`int` line, :ref:`int` gutter **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_line_gutter_clickable** **(** :ref:`int` line, :ref:`int` gutter **)** |const| Returns whether the gutter on the given line is clickable. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_line_wrapped: -- :ref:`bool` **is_line_wrapped** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_line_wrapped** **(** :ref:`int` line **)** |const| Returns if the given line is wrapped. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_menu_visible: -- :ref:`bool` **is_menu_visible** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_menu_visible** **(** **)** |const| Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_mouse_over_selection: -- :ref:`bool` **is_mouse_over_selection** **(** :ref:`bool` edges, :ref:`int` caret_index=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_mouse_over_selection** **(** :ref:`bool` edges, :ref:`int` caret_index=-1 **)** |const| Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges are considered part of the selection. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_is_overtype_mode_enabled: -- :ref:`bool` **is_overtype_mode_enabled** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_overtype_mode_enabled** **(** **)** |const| Returns whether the user is in overtype mode. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_menu_option: -- void **menu_option** **(** :ref:`int` option **)** +.. rst-class:: classref-method + +void **menu_option** **(** :ref:`int` option **)** Triggers a right-click menu action by the specified index. See :ref:`MenuItems` for a list of available indexes. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_merge_gutters: -- void **merge_gutters** **(** :ref:`int` from_line, :ref:`int` to_line **)** +.. rst-class:: classref-method + +void **merge_gutters** **(** :ref:`int` from_line, :ref:`int` to_line **)** Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_merge_overlapping_carets: -- void **merge_overlapping_carets** **(** **)** +.. rst-class:: classref-method + +void **merge_overlapping_carets** **(** **)** Merges any overlapping carets. Will favour the newest caret, or the caret with a selection. \ **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_paste: -- void **paste** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **paste** **(** :ref:`int` caret_index=-1 **)** Paste at the current location. Can be overridden with :ref:`_paste`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_paste_primary_clipboard: -- void **paste_primary_clipboard** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **paste_primary_clipboard** **(** :ref:`int` caret_index=-1 **)** Pastes the primary clipboard. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_redo: -- void **redo** **(** **)** +.. rst-class:: classref-method + +void **redo** **(** **)** Perform redo operation. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_remove_caret: -- void **remove_caret** **(** :ref:`int` caret **)** +.. rst-class:: classref-method + +void **remove_caret** **(** :ref:`int` caret **)** Removes the given caret index. \ **Note:** This can result in adjustment of all other caret indices. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_remove_gutter: -- void **remove_gutter** **(** :ref:`int` gutter **)** +.. rst-class:: classref-method -Removes the gutter from this ``TextEdit``. +void **remove_gutter** **(** :ref:`int` gutter **)** + +Removes the gutter from this **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_remove_secondary_carets: -- void **remove_secondary_carets** **(** **)** +.. rst-class:: classref-method + +void **remove_secondary_carets** **(** **)** Removes all additional carets. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_remove_text: -- void **remove_text** **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** +.. rst-class:: classref-method + +void **remove_text** **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** 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 + ---- .. _class_TextEdit_method_search: -- :ref:`Vector2i` **search** **(** :ref:`String` text, :ref:`int` flags, :ref:`int` from_line, :ref:`int` from_colum **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **search** **(** :ref:`String` text, :ref:`int` flags, :ref:`int` from_line, :ref:`int` from_colum **)** |const| Perform a search inside the text. Search flags can be specified in the :ref:`SearchFlags` enum. @@ -2195,39 +2941,55 @@ In the returned vector, ``x`` is the column, ``y`` is the line. If no results ar +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_select: -- void **select** **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column, :ref:`int` caret_index=0 **)** +.. rst-class:: classref-method + +void **select** **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column, :ref:`int` caret_index=0 **)** Perform selection, from line/column to line/column. If :ref:`selecting_enabled` is ``false``, no selection will occur. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_select_all: -- void **select_all** **(** **)** +.. rst-class:: classref-method + +void **select_all** **(** **)** Select all the text. If :ref:`selecting_enabled` is ``false``, no selection will occur. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_select_word_under_caret: -- void **select_word_under_caret** **(** :ref:`int` caret_index=-1 **)** +.. rst-class:: classref-method + +void **select_word_under_caret** **(** :ref:`int` caret_index=-1 **)** Selects the word under the caret. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_caret_column: -- void **set_caret_column** **(** :ref:`int` column, :ref:`bool` adjust_viewport=true, :ref:`int` caret_index=0 **)** +.. rst-class:: classref-method + +void **set_caret_column** **(** :ref:`int` column, :ref:`bool` adjust_viewport=true, :ref:`int` caret_index=0 **)** Moves the caret to the specified ``column`` index. @@ -2235,11 +2997,15 @@ If ``adjust_viewport`` is ``true``, the viewport will center at the caret positi \ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_caret_line: -- void **set_caret_line** **(** :ref:`int` line, :ref:`bool` adjust_viewport=true, :ref:`bool` can_be_hidden=true, :ref:`int` wrap_index=0, :ref:`int` caret_index=0 **)** +.. rst-class:: classref-method + +void **set_caret_line** **(** :ref:`int` line, :ref:`bool` adjust_viewport=true, :ref:`bool` can_be_hidden=true, :ref:`int` wrap_index=0, :ref:`int` caret_index=0 **)** Moves the caret to the specified ``line`` index. @@ -2249,472 +3015,612 @@ If ``can_be_hidden`` is ``true``, the specified ``line`` can be hidden. \ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_gutter_clickable: -- void **set_gutter_clickable** **(** :ref:`int` gutter, :ref:`bool` clickable **)** +.. rst-class:: classref-method + +void **set_gutter_clickable** **(** :ref:`int` gutter, :ref:`bool` clickable **)** Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_gutter_custom_draw: -- void **set_gutter_custom_draw** **(** :ref:`int` column, :ref:`Callable` draw_callback **)** +.. rst-class:: classref-method + +void **set_gutter_custom_draw** **(** :ref:`int` column, :ref:`Callable` draw_callback **)** Set a custom draw method for the gutter. The callback method must take the following args: ``line: int, gutter: int, Area: Rect2``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_gutter_draw: -- void **set_gutter_draw** **(** :ref:`int` gutter, :ref:`bool` draw **)** +.. rst-class:: classref-method + +void **set_gutter_draw** **(** :ref:`int` gutter, :ref:`bool` draw **)** Sets whether the gutter should be drawn. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_gutter_name: -- void **set_gutter_name** **(** :ref:`int` gutter, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_gutter_name** **(** :ref:`int` gutter, :ref:`String` name **)** Sets the name of the gutter. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_gutter_overwritable: -- void **set_gutter_overwritable** **(** :ref:`int` gutter, :ref:`bool` overwritable **)** +.. rst-class:: classref-method + +void **set_gutter_overwritable** **(** :ref:`int` gutter, :ref:`bool` overwritable **)** Sets the gutter to overwritable. See :ref:`merge_gutters`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_gutter_type: -- void **set_gutter_type** **(** :ref:`int` gutter, :ref:`GutterType` type **)** +.. rst-class:: classref-method + +void **set_gutter_type** **(** :ref:`int` gutter, :ref:`GutterType` type **)** Sets the type of gutter. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_gutter_width: -- void **set_gutter_width** **(** :ref:`int` gutter, :ref:`int` width **)** +.. rst-class:: classref-method + +void **set_gutter_width** **(** :ref:`int` gutter, :ref:`int` width **)** Set the width of the gutter. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line: -- void **set_line** **(** :ref:`int` line, :ref:`String` new_text **)** +.. rst-class:: classref-method + +void **set_line** **(** :ref:`int` line, :ref:`String` new_text **)** Sets the text for a specific line. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_as_center_visible: -- void **set_line_as_center_visible** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** +.. rst-class:: classref-method + +void **set_line_as_center_visible** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** Positions the ``wrap_index`` of ``line`` at the center of the viewport. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_as_first_visible: -- void **set_line_as_first_visible** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** +.. rst-class:: classref-method + +void **set_line_as_first_visible** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** Positions the ``wrap_index`` of ``line`` at the top of the viewport. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_as_last_visible: -- void **set_line_as_last_visible** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** +.. rst-class:: classref-method + +void **set_line_as_last_visible** **(** :ref:`int` line, :ref:`int` wrap_index=0 **)** Positions the ``wrap_index`` of ``line`` at the bottom of the viewport. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_background_color: -- void **set_line_background_color** **(** :ref:`int` line, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_line_background_color** **(** :ref:`int` line, :ref:`Color` color **)** Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for no color. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_gutter_clickable: -- void **set_line_gutter_clickable** **(** :ref:`int` line, :ref:`int` gutter, :ref:`bool` clickable **)** +.. rst-class:: classref-method + +void **set_line_gutter_clickable** **(** :ref:`int` line, :ref:`int` gutter, :ref:`bool` clickable **)** If ``clickable`` is ``true``, makes the ``gutter`` on ``line`` clickable. See :ref:`gutter_clicked`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_gutter_icon: -- void **set_line_gutter_icon** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Texture2D` icon **)** +.. rst-class:: classref-method + +void **set_line_gutter_icon** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Texture2D` icon **)** Sets the icon for ``gutter`` on ``line`` to ``icon``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_gutter_item_color: -- void **set_line_gutter_item_color** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_line_gutter_item_color** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Color` color **)** Sets the color for ``gutter`` on ``line`` to ``color``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_gutter_metadata: -- void **set_line_gutter_metadata** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Variant` metadata **)** +.. rst-class:: classref-method + +void **set_line_gutter_metadata** **(** :ref:`int` line, :ref:`int` gutter, :ref:`Variant` metadata **)** Sets the metadata for ``gutter`` on ``line`` to ``metadata``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_line_gutter_text: -- void **set_line_gutter_text** **(** :ref:`int` line, :ref:`int` gutter, :ref:`String` text **)** +.. rst-class:: classref-method + +void **set_line_gutter_text** **(** :ref:`int` line, :ref:`int` gutter, :ref:`String` text **)** Sets the text for ``gutter`` on ``line`` to ``text``. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_overtype_mode_enabled: -- void **set_overtype_mode_enabled** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_overtype_mode_enabled** **(** :ref:`bool` enabled **)** If ``true``, sets the user into overtype mode. When the user types in this mode, it will override existing text. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_search_flags: -- void **set_search_flags** **(** :ref:`int` flags **)** +.. rst-class:: classref-method + +void **set_search_flags** **(** :ref:`int` flags **)** Sets the search ``flags``. This is used with :ref:`set_search_text` to highlight occurrences of the searched text. Search flags can be specified from the :ref:`SearchFlags` enum. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_search_text: -- void **set_search_text** **(** :ref:`String` search_text **)** +.. rst-class:: classref-method + +void **set_search_text** **(** :ref:`String` search_text **)** Sets the search text. See :ref:`set_search_flags`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_selection_mode: -- void **set_selection_mode** **(** :ref:`SelectionMode` mode, :ref:`int` line=-1, :ref:`int` column=-1, :ref:`int` caret_index=0 **)** +.. rst-class:: classref-method + +void **set_selection_mode** **(** :ref:`SelectionMode` mode, :ref:`int` line=-1, :ref:`int` column=-1, :ref:`int` caret_index=0 **)** Sets the current selection mode. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_set_tab_size: -- void **set_tab_size** **(** :ref:`int` size **)** +.. rst-class:: classref-method -Sets the tab size for the ``TextEdit`` to use. +void **set_tab_size** **(** :ref:`int` size **)** + +Sets the tab size for the **TextEdit** to use. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_method_set_tooltip_request_func: -- void **set_tooltip_request_func** **(** :ref:`Callable` callback **)** +.. rst-class:: classref-method + +void **set_tooltip_request_func** **(** :ref:`Callable` callback **)** Provide custom tooltip text. The callback method must take the following args: ``hovered_word: String`` +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_start_action: -- void **start_action** **(** :ref:`EditAction` action **)** +.. rst-class:: classref-method + +void **start_action** **(** :ref:`EditAction` action **)** Starts an action, will end the current action if ``action`` is different. An action will also end after a call to :ref:`end_action`, after :ref:`ProjectSettings.gui/timers/text_edit_idle_detect_sec` is triggered or a new undoable step outside the :ref:`start_action` and :ref:`end_action` calls. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_swap_lines: -- void **swap_lines** **(** :ref:`int` from_line, :ref:`int` to_line **)** +.. rst-class:: classref-method + +void **swap_lines** **(** :ref:`int` from_line, :ref:`int` to_line **)** Swaps the two lines. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_tag_saved_version: -- void **tag_saved_version** **(** **)** +.. rst-class:: classref-method + +void **tag_saved_version** **(** **)** Tag the current version as saved. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_method_undo: -- void **undo** **(** **)** +.. rst-class:: classref-method + +void **undo** **(** **)** Perform undo operation. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_TextEdit_theme_color_background_color: -- :ref:`Color` **background_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +:ref:`Color` **background_color** = ``Color(0, 0, 0, 0)`` -Sets the background :ref:`Color` of this ``TextEdit``. +Sets the background :ref:`Color` of this **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_theme_color_caret_background_color: -- :ref:`Color` **caret_background_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **caret_background_color** = ``Color(0, 0, 0, 1)`` :ref:`Color` of the text behind the caret when using a block caret. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_color_caret_color: -- :ref:`Color` **caret_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`Color` of the caret. This can be set to a fully transparent color to hide the caret entirely. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_color_current_line_color: -- :ref:`Color` **current_line_color** +.. rst-class:: classref-themeproperty -+-----------+----------------------------------+ -| *Default* | ``Color(0.25, 0.25, 0.26, 0.8)`` | -+-----------+----------------------------------+ +: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_TextEdit_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` Sets the font :ref:`Color`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` -The tint of text outline of the ``TextEdit``. +The tint of text outline of the **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_theme_color_font_placeholder_color: -- :ref:`Color` **font_placeholder_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.6)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` Font color for :ref:`placeholder_text`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_color_font_readonly_color: -- :ref:`Color` **font_readonly_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 0.5)`` | -+-----------+-------------------------------------+ +:ref:`Color` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` Sets the font :ref:`Color` when :ref:`editable` is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(0, 0, 0, 0)`` | -+-----------+-----------------------+ +: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. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_color_search_result_border_color: -- :ref:`Color` **search_result_border_color** +.. rst-class:: classref-themeproperty -+-----------+-------------------------------+ -| *Default* | ``Color(0.3, 0.3, 0.3, 0.4)`` | -+-----------+-------------------------------+ +: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_TextEdit_theme_color_search_result_color: -- :ref:`Color` **search_result_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.3, 0.3, 0.3, 1)`` | -+-----------+-----------------------------+ +: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_TextEdit_theme_color_selection_color: -- :ref:`Color` **selection_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.5, 0.5, 0.5, 1)`` | -+-----------+-----------------------------+ +: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_TextEdit_theme_color_word_highlighted_color: -- :ref:`Color` **word_highlighted_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.5, 0.5, 0.5, 0.25)`` | -+-----------+--------------------------------+ +:ref:`Color` **word_highlighted_color** = ``Color(0.5, 0.5, 0.5, 0.25)`` Sets the highlight :ref:`Color` of multiple occurrences. :ref:`highlight_all_occurrences` has to be enabled. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_constant_caret_width: -- :ref:`int` **caret_width** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **caret_width** = ``1`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_constant_line_spacing: -- :ref:`int` **line_spacing** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **line_spacing** = ``4`` Sets the spacing between the lines. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** Sets the default :ref:`Font`. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Sets default font size. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_icon_space: -- :ref:`Texture2D` **space** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **space** Sets a custom :ref:`Texture2D` for space text characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_icon_tab: -- :ref:`Texture2D` **tab** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **tab** Sets a custom :ref:`Texture2D` for tab text characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextEdit_theme_style_focus: -- :ref:`StyleBox` **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_TextEdit_theme_style_normal: -- :ref:`StyleBox` **normal** +.. rst-class:: classref-themeproperty -Sets the :ref:`StyleBox` of this ``TextEdit``. +:ref:`StyleBox` **normal** + +Sets the :ref:`StyleBox` of this **TextEdit**. + +.. rst-class:: classref-item-separator ---- .. _class_TextEdit_theme_style_read_only: -- :ref:`StyleBox` **read_only** +.. rst-class:: classref-themeproperty -Sets the :ref:`StyleBox` of this ``TextEdit`` when :ref:`editable` is disabled. +:ref:`StyleBox` **read_only** + +Sets the :ref:`StyleBox` of this **TextEdit** when :ref:`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.)` diff --git a/classes/class_textline.rst b/classes/class_textline.rst index d50b2478b..147e08146 100644 --- a/classes/class_textline.rst +++ b/classes/class_textline.rst @@ -14,346 +14,446 @@ TextLine Holds a line of text. +.. rst-class:: classref-introduction-group + Description ----------- Abstraction over :ref:`TextServer` for handling single line of text. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`Direction` | :ref:`direction` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`JustificationFlag` | :ref:`flags` | ``3`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`Orientation` | :ref:`orientation` | ``0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`preserve_control` | ``false`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`preserve_invalid` | ``true`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``3`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`width` | ``-1.0`` | -+-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`Direction` | :ref:`direction` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`JustificationFlag` | :ref:`flags` | ``3`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`Orientation` | :ref:`orientation` | ``0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`preserve_control` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`preserve_invalid` | ``true`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``3`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`width` | ``-1.0`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`add_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`add_string` **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_ascent` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_descent` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_underline_position` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_underline_thickness` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_width` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_object_rect` **(** :ref:`Variant` key **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_objects` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hit_test` **(** :ref:`float` coords **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`resize_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bidi_override` **(** :ref:`Array` override **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`tab_align` **(** :ref:`PackedFloat32Array` tab_stops **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`add_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`add_string` **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_ascent` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_descent` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_underline_position` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_underline_thickness` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_width` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_object_rect` **(** :ref:`Variant` key **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_objects` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hit_test` **(** :ref:`float` coords **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`resize_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bidi_override` **(** :ref:`Array` override **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`tab_align` **(** :ref:`PackedFloat32Array` tab_stops **)** | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextLine_property_alignment: -- :ref:`HorizontalAlignment` **alignment** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_horizontal_alignment(value) | -+-----------+---------------------------------+ -| *Getter* | get_horizontal_alignment() | -+-----------+---------------------------------+ +:ref:`HorizontalAlignment` **alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`HorizontalAlignment` **get_horizontal_alignment** **(** **)** Sets text alignment within the line as if the line was horizontal. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_property_direction: -- :ref:`Direction` **direction** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_direction(value) | -+-----------+----------------------+ -| *Getter* | get_direction() | -+-----------+----------------------+ +:ref:`Direction` **direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_direction** **(** :ref:`Direction` value **)** +- :ref:`Direction` **get_direction** **(** **)** Text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_property_flags: -- :ref:`JustificationFlag` **flags** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``3`` | -+-----------+------------------+ -| *Setter* | set_flags(value) | -+-----------+------------------+ -| *Getter* | get_flags() | -+-----------+------------------+ +:ref:`JustificationFlag` **flags** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_flags** **(** **)** Line alignment rules. For more info see :ref:`TextServer`. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_property_orientation: -- :ref:`Orientation` **orientation** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_orientation(value) | -+-----------+------------------------+ -| *Getter* | get_orientation() | -+-----------+------------------------+ +:ref:`Orientation` **orientation** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_orientation** **(** :ref:`Orientation` value **)** +- :ref:`Orientation` **get_orientation** **(** **)** Text orientation. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_property_preserve_control: -- :ref:`bool` **preserve_control** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_preserve_control(value) | -+-----------+-----------------------------+ -| *Getter* | get_preserve_control() | -+-----------+-----------------------------+ +:ref:`bool` **preserve_control** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_preserve_control** **(** :ref:`bool` value **)** +- :ref:`bool` **get_preserve_control** **(** **)** If set to ``true`` text will display control characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_property_preserve_invalid: -- :ref:`bool` **preserve_invalid** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_preserve_invalid(value) | -+-----------+-----------------------------+ -| *Getter* | get_preserve_invalid() | -+-----------+-----------------------------+ +:ref:`bool` **preserve_invalid** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_preserve_invalid** **(** :ref:`bool` value **)** +- :ref:`bool` **get_preserve_invalid** **(** **)** If set to ``true`` text will display invalid characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_property_text_overrun_behavior: -- :ref:`OverrunBehavior` **text_overrun_behavior** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``3`` | -+-----------+----------------------------------+ -| *Setter* | set_text_overrun_behavior(value) | -+-----------+----------------------------------+ -| *Getter* | get_text_overrun_behavior() | -+-----------+----------------------------------+ +:ref:`OverrunBehavior` **text_overrun_behavior** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior` value **)** +- :ref:`OverrunBehavior` **get_text_overrun_behavior** **(** **)** Sets the clipping behavior when the text exceeds the text line's set width. See :ref:`OverrunBehavior` for a description of all modes. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_property_width: -- :ref:`float` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``-1.0`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`float` **width** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`float` value **)** +- :ref:`float` **get_width** **(** **)** Text line width. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TextLine_method_add_object: -- :ref:`bool` **add_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** +.. rst-class:: classref-method + +:ref:`bool` **add_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** 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_TextLine_method_add_string: -- :ref:`bool` **add_string** **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** +.. rst-class:: classref-method + +:ref:`bool` **add_string** **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** Adds text span and font to draw it. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears text line (removes text and inline objects). +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_draw: -- void **draw** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| Draw text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_draw_outline: -- void **draw_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| Draw text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_get_line_ascent: -- :ref:`float` **get_line_ascent** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_ascent** **(** **)** |const| 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_TextLine_method_get_line_descent: -- :ref:`float` **get_line_descent** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_descent** **(** **)** |const| 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_TextLine_method_get_line_underline_position: -- :ref:`float` **get_line_underline_position** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_underline_position** **(** **)** |const| Returns pixel offset of the underline below the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_get_line_underline_thickness: -- :ref:`float` **get_line_underline_thickness** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_underline_thickness** **(** **)** |const| Returns thickness of the underline. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_get_line_width: -- :ref:`float` **get_line_width** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_width** **(** **)** |const| Returns width (for horizontal layout) or height (for vertical) of the text. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_get_object_rect: -- :ref:`Rect2` **get_object_rect** **(** :ref:`Variant` key **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_object_rect** **(** :ref:`Variant` key **)** |const| Returns bounding rectangle of the inline object. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_get_objects: -- :ref:`Array` **get_objects** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_objects** **(** **)** |const| Returns array of inline objects. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns TextServer buffer RID. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_get_size: -- :ref:`Vector2` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_size** **(** **)** |const| Returns size of the bounding box of the text. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_hit_test: -- :ref:`int` **hit_test** **(** :ref:`float` coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **hit_test** **(** :ref:`float` coords **)** |const| 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_TextLine_method_resize_object: -- :ref:`bool` **resize_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** +.. rst-class:: classref-method + +:ref:`bool` **resize_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** Sets new size and alignment of embedded object. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_set_bidi_override: -- void **set_bidi_override** **(** :ref:`Array` override **)** +.. rst-class:: classref-method + +void **set_bidi_override** **(** :ref:`Array` override **)** Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately. +.. rst-class:: classref-item-separator + ---- .. _class_TextLine_method_tab_align: -- void **tab_align** **(** :ref:`PackedFloat32Array` tab_stops **)** +.. rst-class:: classref-method + +void **tab_align** **(** :ref:`PackedFloat32Array` tab_stops **)** Aligns text to the given tab-stops. diff --git a/classes/class_textmesh.rst b/classes/class_textmesh.rst index 549f6ff87..fd70f2637 100644 --- a/classes/class_textmesh.rst +++ b/classes/class_textmesh.rst @@ -14,6 +14,8 @@ TextMesh Generate an :ref:`PrimitiveMesh` from the text. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,313 +25,341 @@ 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-reftable-group + Properties ---------- -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`curve_step` | ``0.5`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`depth` | ``0.05`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Font` | :ref:`font` | | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`font_size` | ``16`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`line_spacing` | ``0.0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`pixel_size` | ``0.01`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Direction` | :ref:`text_direction` | ``0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`uppercase` | ``false`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``1`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`width` | ``500.0`` | -+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`curve_step` | ``0.5`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`depth` | ``0.05`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Font` | :ref:`font` | | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`font_size` | ``16`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`String` | :ref:`language` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`line_spacing` | ``0.0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`pixel_size` | ``0.01`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`String` | :ref:`text` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Direction` | :ref:`text_direction` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`uppercase` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``1`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`width` | ``500.0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextMesh_property_autowrap_mode: -- :ref:`AutowrapMode` **autowrap_mode** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_autowrap_mode(value) | -+-----------+--------------------------+ -| *Getter* | get_autowrap_mode() | -+-----------+--------------------------+ +:ref:`AutowrapMode` **autowrap_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_autowrap_mode** **(** :ref:`AutowrapMode` value **)** +- :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. 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`. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_curve_step: -- :ref:`float` **curve_step** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.5`` | -+-----------+-----------------------+ -| *Setter* | set_curve_step(value) | -+-----------+-----------------------+ -| *Getter* | get_curve_step() | -+-----------+-----------------------+ +:ref:`float` **curve_step** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_curve_step** **(** :ref:`float` value **)** +- :ref:`float` **get_curve_step** **(** **)** Step (in pixels) used to approximate Bézier curves. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_depth: -- :ref:`float` **depth** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.05`` | -+-----------+------------------+ -| *Setter* | set_depth(value) | -+-----------+------------------+ -| *Getter* | get_depth() | -+-----------+------------------+ +:ref:`float` **depth** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_depth** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_font: -- :ref:`Font` **font** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_font(value) | -+----------+-----------------+ -| *Getter* | get_font() | -+----------+-----------------+ +:ref:`Font` **font** + +.. rst-class:: classref-property-setget + +- void **set_font** **(** :ref:`Font` value **)** +- :ref:`Font` **get_font** **(** **)** Font configuration used to display text. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``16`` | -+-----------+----------------------+ -| *Setter* | set_font_size(value) | -+-----------+----------------------+ -| *Getter* | get_font_size() | -+-----------+----------------------+ +:ref:`int` **font_size** = ``16`` -Font size of the ``TextMesh``'s text. +.. rst-class:: classref-property-setget + +- void **set_font_size** **(** :ref:`int` value **)** +- :ref:`int` **get_font_size** **(** **)** + +Font size of the **TextMesh**'s text. + +.. rst-class:: classref-item-separator ---- .. _class_TextMesh_property_horizontal_alignment: -- :ref:`HorizontalAlignment` **horizontal_alignment** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_horizontal_alignment(value) | -+-----------+---------------------------------+ -| *Getter* | get_horizontal_alignment() | -+-----------+---------------------------------+ +:ref:`HorizontalAlignment` **horizontal_alignment** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`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` constants. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_language: -- :ref:`String` **language** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``""`` | -+-----------+---------------------+ -| *Setter* | set_language(value) | -+-----------+---------------------+ -| *Getter* | get_language() | -+-----------+---------------------+ +:ref:`String` **language** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_language** **(** :ref:`String` value **)** +- :ref:`String` **get_language** **(** **)** Language code used for text shaping algorithms, if left empty current locale is used instead. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_line_spacing: -- :ref:`float` **line_spacing** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_line_spacing(value) | -+-----------+-------------------------+ -| *Getter* | get_line_spacing() | -+-----------+-------------------------+ +:ref:`float` **line_spacing** = ``0.0`` -Vertical space between lines in multiline ``TextMesh``. +.. rst-class:: classref-property-setget + +- void **set_line_spacing** **(** :ref:`float` value **)** +- :ref:`float` **get_line_spacing** **(** **)** + +Vertical space between lines in multiline **TextMesh**. + +.. rst-class:: classref-item-separator ---- .. _class_TextMesh_property_offset: -- :ref:`Vector2` **offset** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_offset(value) | -+-----------+-------------------+ -| *Getter* | get_offset() | -+-----------+-------------------+ +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_offset** **(** **)** The text drawing offset (in pixels). +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_pixel_size: -- :ref:`float` **pixel_size** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0.01`` | -+-----------+-----------------------+ -| *Setter* | set_pixel_size(value) | -+-----------+-----------------------+ -| *Getter* | get_pixel_size() | -+-----------+-----------------------+ +:ref:`float` **pixel_size** = ``0.01`` + +.. rst-class:: classref-property-setget + +- void **set_pixel_size** **(** :ref:`float` value **)** +- :ref:`float` **get_pixel_size** **(** **)** The size of one pixel's width on the text to scale it in 3D. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``0`` | -+-----------+------------------------------------------+ -| *Setter* | set_structured_text_bidi_override(value) | -+-----------+------------------------------------------+ -| *Getter* | get_structured_text_bidi_override() | -+-----------+------------------------------------------+ +:ref:`StructuredTextParser` **structured_text_bidi_override** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser` value **)** +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** **)** Set BiDi algorithm override for the structured text. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_structured_text_bidi_override_options: -- :ref:`Array` **structured_text_bidi_override_options** +.. rst-class:: classref-property -+-----------+--------------------------------------------------+ -| *Default* | ``[]`` | -+-----------+--------------------------------------------------+ -| *Setter* | set_structured_text_bidi_override_options(value) | -+-----------+--------------------------------------------------+ -| *Getter* | get_structured_text_bidi_override_options() | -+-----------+--------------------------------------------------+ +:ref:`Array` **structured_text_bidi_override_options** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_structured_text_bidi_override_options** **(** :ref:`Array` value **)** +- :ref:`Array` **get_structured_text_bidi_override_options** **(** **)** Set additional options for BiDi override. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_text: -- :ref:`String` **text** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``""`` | -+-----------+-----------------+ -| *Setter* | set_text(value) | -+-----------+-----------------+ -| *Getter* | get_text() | -+-----------+-----------------+ +:ref:`String` **text** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_text** **(** :ref:`String` value **)** +- :ref:`String` **get_text** **(** **)** The text to generate mesh from. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_text_direction: -- :ref:`Direction` **text_direction** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_text_direction(value) | -+-----------+---------------------------+ -| *Getter* | get_text_direction() | -+-----------+---------------------------+ +:ref:`Direction` **text_direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_direction** **(** :ref:`Direction` value **)** +- :ref:`Direction` **get_text_direction** **(** **)** Base text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_uppercase: -- :ref:`bool` **uppercase** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_uppercase(value) | -+-----------+----------------------+ -| *Getter* | is_uppercase() | -+-----------+----------------------+ +:ref:`bool` **uppercase** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_uppercase** **(** :ref:`bool` value **)** +- :ref:`bool` **is_uppercase** **(** **)** If ``true``, all the text displays as UPPERCASE. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_vertical_alignment: -- :ref:`VerticalAlignment` **vertical_alignment** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------------+ -| *Setter* | set_vertical_alignment(value) | -+-----------+-------------------------------+ -| *Getter* | get_vertical_alignment() | -+-----------+-------------------------------+ +:ref:`VerticalAlignment` **vertical_alignment** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_vertical_alignment** **(** :ref:`VerticalAlignment` value **)** +- :ref:`VerticalAlignment` **get_vertical_alignment** **(** **)** Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VerticalAlignment` constants. +.. rst-class:: classref-item-separator + ---- .. _class_TextMesh_property_width: -- :ref:`float` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``500.0`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`float` **width** = ``500.0`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`float` value **)** +- :ref:`float` **get_width** **(** **)** Text width (in pixels), used for fill alignment. diff --git a/classes/class_textparagraph.rst b/classes/class_textparagraph.rst index 9269f1166..6038875d7 100644 --- a/classes/class_textparagraph.rst +++ b/classes/class_textparagraph.rst @@ -14,540 +14,699 @@ TextParagraph Holds a paragraph of text. +.. rst-class:: classref-introduction-group + Description ----------- Abstraction over :ref:`TextServer` for handling paragraph of text. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`LineBreakFlag` | :ref:`break_flags` | ``3`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`custom_punctuation` | ``""`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`Direction` | :ref:`direction` | ``0`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`JustificationFlag` | :ref:`justification_flags` | ``3`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`max_lines_visible` | ``-1`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`Orientation` | :ref:`orientation` | ``0`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`preserve_control` | ``false`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`preserve_invalid` | ``true`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`width` | ``-1.0`` | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`HorizontalAlignment` | :ref:`alignment` | ``0`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`LineBreakFlag` | :ref:`break_flags` | ``3`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`custom_punctuation` | ``""`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`Direction` | :ref:`direction` | ``0`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``3`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`max_lines_visible` | ``-1`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`Orientation` | :ref:`orientation` | ``0`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`preserve_control` | ``false`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`preserve_invalid` | ``true`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`OverrunBehavior` | :ref:`text_overrun_behavior` | ``0`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`width` | ``-1.0`` | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`add_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`add_string` **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_dropcap` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_dropcap` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_dropcap_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_line` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_line_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_dropcap_lines` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_dropcap_rid` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_dropcap_size` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_ascent` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_count` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_descent` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_line_object_rect` **(** :ref:`int` line, :ref:`Variant` key **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_line_objects` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_line_range` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_line_rid` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_line_size` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_underline_position` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_underline_thickness` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_line_width` **(** :ref:`int` line **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_non_wrapped_size` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hit_test` **(** :ref:`Vector2` coords **)** |const| | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`resize_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bidi_override` **(** :ref:`Array` override **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`set_dropcap` **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`String` language="" **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`tab_align` **(** :ref:`PackedFloat32Array` tab_stops **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`add_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`add_string` **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_dropcap` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_dropcap` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_dropcap_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_line` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_line_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_outline` **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_dropcap_lines` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_dropcap_rid` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_dropcap_size` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_ascent` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_descent` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_line_object_rect` **(** :ref:`int` line, :ref:`Variant` key **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_line_objects` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_line_range` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_line_rid` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_line_size` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_underline_position` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_underline_thickness` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_width` **(** :ref:`int` line **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_non_wrapped_size` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hit_test` **(** :ref:`Vector2` coords **)** |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`resize_object` **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_bidi_override` **(** :ref:`Array` override **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set_dropcap` **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`String` language="" **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`tab_align` **(** :ref:`PackedFloat32Array` tab_stops **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextParagraph_property_alignment: -- :ref:`HorizontalAlignment` **alignment** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_alignment(value) | -+-----------+----------------------+ -| *Getter* | get_alignment() | -+-----------+----------------------+ +:ref:`HorizontalAlignment` **alignment** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_alignment** **(** :ref:`HorizontalAlignment` value **)** +- :ref:`HorizontalAlignment` **get_alignment** **(** **)** Paragraph horizontal alignment. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_break_flags: -- :ref:`LineBreakFlag` **break_flags** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``3`` | -+-----------+------------------------+ -| *Setter* | set_break_flags(value) | -+-----------+------------------------+ -| *Getter* | get_break_flags() | -+-----------+------------------------+ +:ref:`LineBreakFlag` **break_flags** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_break_flags** **(** :ref:`LineBreakFlag` value **)** +- :ref:`LineBreakFlag` **get_break_flags** **(** **)** Line breaking rules. For more info see :ref:`TextServer`. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_custom_punctuation: -- :ref:`String` **custom_punctuation** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------------+ -| *Setter* | set_custom_punctuation(value) | -+-----------+-------------------------------+ -| *Getter* | get_custom_punctuation() | -+-----------+-------------------------------+ +:ref:`String` **custom_punctuation** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_custom_punctuation** **(** :ref:`String` value **)** +- :ref:`String` **get_custom_punctuation** **(** **)** Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_direction: -- :ref:`Direction` **direction** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_direction(value) | -+-----------+----------------------+ -| *Getter* | get_direction() | -+-----------+----------------------+ +:ref:`Direction` **direction** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_direction** **(** :ref:`Direction` value **)** +- :ref:`Direction` **get_direction** **(** **)** Text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_justification_flags: -- :ref:`JustificationFlag` **justification_flags** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``3`` | -+-----------+--------------------------------+ -| *Setter* | set_justification_flags(value) | -+-----------+--------------------------------+ -| *Getter* | get_justification_flags() | -+-----------+--------------------------------+ +:ref:`JustificationFlag` **justification_flags** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_justification_flags** **(** **)** Line alignment rules. For more info see :ref:`TextServer`. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_max_lines_visible: -- :ref:`int` **max_lines_visible** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------------+ -| *Setter* | set_max_lines_visible(value) | -+-----------+------------------------------+ -| *Getter* | get_max_lines_visible() | -+-----------+------------------------------+ +:ref:`int` **max_lines_visible** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_max_lines_visible** **(** :ref:`int` value **)** +- :ref:`int` **get_max_lines_visible** **(** **)** Limits the lines of text shown. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_orientation: -- :ref:`Orientation` **orientation** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_orientation(value) | -+-----------+------------------------+ -| *Getter* | get_orientation() | -+-----------+------------------------+ +:ref:`Orientation` **orientation** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_orientation** **(** :ref:`Orientation` value **)** +- :ref:`Orientation` **get_orientation** **(** **)** Text orientation. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_preserve_control: -- :ref:`bool` **preserve_control** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_preserve_control(value) | -+-----------+-----------------------------+ -| *Getter* | get_preserve_control() | -+-----------+-----------------------------+ +:ref:`bool` **preserve_control** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_preserve_control** **(** :ref:`bool` value **)** +- :ref:`bool` **get_preserve_control** **(** **)** If set to ``true`` text will display control characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_preserve_invalid: -- :ref:`bool` **preserve_invalid** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_preserve_invalid(value) | -+-----------+-----------------------------+ -| *Getter* | get_preserve_invalid() | -+-----------+-----------------------------+ +:ref:`bool` **preserve_invalid** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_preserve_invalid** **(** :ref:`bool` value **)** +- :ref:`bool` **get_preserve_invalid** **(** **)** If set to ``true`` text will display invalid characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_text_overrun_behavior: -- :ref:`OverrunBehavior` **text_overrun_behavior** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------------+ -| *Setter* | set_text_overrun_behavior(value) | -+-----------+----------------------------------+ -| *Getter* | get_text_overrun_behavior() | -+-----------+----------------------------------+ +:ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior` value **)** +- :ref:`OverrunBehavior` **get_text_overrun_behavior** **(** **)** Sets the clipping behavior when the text exceeds the paragraph's set width. See :ref:`OverrunBehavior` for a description of all modes. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_property_width: -- :ref:`float` **width** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``-1.0`` | -+-----------+------------------+ -| *Setter* | set_width(value) | -+-----------+------------------+ -| *Getter* | get_width() | -+-----------+------------------+ +:ref:`float` **width** = ``-1.0`` + +.. rst-class:: classref-property-setget + +- void **set_width** **(** :ref:`float` value **)** +- :ref:`float` **get_width** **(** **)** Paragraph width. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TextParagraph_method_add_object: -- :ref:`bool` **add_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** +.. rst-class:: classref-method + +:ref:`bool` **add_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** 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_TextParagraph_method_add_string: -- :ref:`bool` **add_string** **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** +.. rst-class:: classref-method + +:ref:`bool` **add_string** **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`String` language="", :ref:`Variant` meta=null **)** Adds text span and font to draw it. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears text paragraph (removes text and inline objects). +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_clear_dropcap: -- void **clear_dropcap** **(** **)** +.. rst-class:: classref-method + +void **clear_dropcap** **(** **)** Removes dropcap. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_draw: -- void **draw** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_draw_dropcap: -- void **draw_dropcap** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw_dropcap** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| Draw drop cap into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_draw_dropcap_outline: -- void **draw_dropcap_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw_dropcap_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| Draw drop cap outline into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_draw_line: -- void **draw_line** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw_line** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_draw_line_outline: -- void **draw_line_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw_line_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` line, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_draw_outline: -- void **draw_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **draw_outline** **(** :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`Color` dc_color=Color(1, 1, 1, 1) **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_dropcap_lines: -- :ref:`int` **get_dropcap_lines** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_dropcap_lines** **(** **)** |const| Returns number of lines used by dropcap. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_dropcap_rid: -- :ref:`RID` **get_dropcap_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_dropcap_rid** **(** **)** |const| Returns drop cap text buffer RID. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_dropcap_size: -- :ref:`Vector2` **get_dropcap_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_dropcap_size** **(** **)** |const| Returns drop cap bounding box size. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_ascent: -- :ref:`float` **get_line_ascent** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_ascent** **(** :ref:`int` line **)** |const| Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_count: -- :ref:`int` **get_line_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_line_count** **(** **)** |const| Returns number of lines in the paragraph. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_descent: -- :ref:`float` **get_line_descent** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_descent** **(** :ref:`int` line **)** |const| Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_object_rect: -- :ref:`Rect2` **get_line_object_rect** **(** :ref:`int` line, :ref:`Variant` key **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_line_object_rect** **(** :ref:`int` line, :ref:`Variant` key **)** |const| Returns bounding rectangle of the inline object. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_objects: -- :ref:`Array` **get_line_objects** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_line_objects** **(** :ref:`int` line **)** |const| Returns array of inline objects in the line. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_range: -- :ref:`Vector2i` **get_line_range** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_line_range** **(** :ref:`int` line **)** |const| Returns character range of the line. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_rid: -- :ref:`RID` **get_line_rid** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_line_rid** **(** :ref:`int` line **)** |const| Returns TextServer line buffer RID. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_size: -- :ref:`Vector2` **get_line_size** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_line_size** **(** :ref:`int` line **)** |const| Returns size of the bounding box of the line of text. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_underline_position: -- :ref:`float` **get_line_underline_position** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_underline_position** **(** :ref:`int` line **)** |const| Returns pixel offset of the underline below the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_underline_thickness: -- :ref:`float` **get_line_underline_thickness** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_underline_thickness** **(** :ref:`int` line **)** |const| Returns thickness of the underline. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_line_width: -- :ref:`float` **get_line_width** **(** :ref:`int` line **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_line_width** **(** :ref:`int` line **)** |const| Returns width (for horizontal layout) or height (for vertical) of the line of text. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_non_wrapped_size: -- :ref:`Vector2` **get_non_wrapped_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_non_wrapped_size** **(** **)** |const| Returns the size of the bounding box of the paragraph, without line breaks. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_rid: -- :ref:`RID` **get_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| Returns TextServer full string buffer RID. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_get_size: -- :ref:`Vector2` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_size** **(** **)** |const| Returns the size of the bounding box of the paragraph. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_hit_test: -- :ref:`int` **hit_test** **(** :ref:`Vector2` coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **hit_test** **(** :ref:`Vector2` coords **)** |const| Returns caret character offset at the specified coordinates. This function always returns a valid position. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_resize_object: -- :ref:`bool` **resize_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** +.. rst-class:: classref-method + +:ref:`bool` **resize_object** **(** :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** Sets new size and alignment of embedded object. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_set_bidi_override: -- void **set_bidi_override** **(** :ref:`Array` override **)** +.. rst-class:: classref-method + +void **set_bidi_override** **(** :ref:`Array` override **)** Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_set_dropcap: -- :ref:`bool` **set_dropcap** **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`String` language="" **)** +.. rst-class:: classref-method + +:ref:`bool` **set_dropcap** **(** :ref:`String` text, :ref:`Font` font, :ref:`int` font_size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`String` language="" **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_TextParagraph_method_tab_align: -- void **tab_align** **(** :ref:`PackedFloat32Array` tab_stops **)** +.. rst-class:: classref-method + +void **tab_align** **(** :ref:`PackedFloat32Array` tab_stops **)** Aligns paragraph to the given tab-stops. diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index ce635cd82..b71a5d7ad 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -16,923 +16,1430 @@ TextServer Interface for the fonts and complex text layouts. +.. rst-class:: classref-introduction-group + Description ----------- -``TextServer`` is the API backend for managing fonts, and rendering complex text. +**TextServer** is the API backend for managing fonts, and rendering complex text. + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`create_font` **(** **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`create_shaped_text` **(** :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_clear_size_cache` **(** :ref:`RID` font_rid **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FontAntialiasing` | :ref:`font_get_antialiasing` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_embolden` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_face_count` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_face_index` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_fixed_size` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_global_oversampling` **(** **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`font_get_glyph_contours` **(** :ref:`RID` font, :ref:`int` size, :ref:`int` index **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Hinting` | :ref:`font_get_hinting` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_msdf_size` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`font_get_name` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_oversampling` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FontStyle` | :ref:`font_get_style` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`font_get_style_name` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SubpixelPositioning` | :ref:`font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`font_get_supported_chars` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`font_get_transform` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_face_index` **(** :ref:`RID` font_rid, :ref:`int` face_index **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_global_oversampling` **(** :ref:`float` oversampling **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_style` **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`font_supported_feature_list` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`font_supported_variation_list` **(** :ref:`RID` font_rid **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`format_number` **(** :ref:`String` number, :ref:`String` language="" **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_features` **(** **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_support_data_filename` **(** **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_support_data_info` **(** **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`RID` rid **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_locale_right_to_left` **(** :ref:`String` locale **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_identifier` **(** :ref:`String` string **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`load_support_data` **(** :ref:`String` filename **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`name_to_tag` **(** :ref:`String` name **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`parse_number` **(** :ref:`String` number, :ref:`String` language="" **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`percent_sign` **(** :ref:`String` language="" **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`save_support_data` **(** :ref:`String` filename **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_get_span_count` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={} **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={}, :ref:`String` language="", :ref:`Variant` meta=null **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_clear` **(** :ref:`RID` rid **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`shaped_text_get_descent` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`shaped_text_get_direction` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start=0, :ref:`LineBreakFlag` break_flags=3 **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start=0, :ref:`bool` once=true, :ref:`LineBreakFlag` break_flags=3 **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`shaped_text_get_objects` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Orientation` | :ref:`shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shaped_text_get_parent` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`shaped_text_get_range` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`shaped_text_get_size` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_get_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`shaped_text_get_width` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags=264 **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaped_text_is_ready` **(** :ref:`RID` shaped **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width=0, :ref:`TextOverrunFlag` overrun_trim_flags=0 **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction=0 **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation=0 **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shaped_text_set_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shaped_text_shape` **(** :ref:`RID` shaped **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`shaped_text_sort_logical` **(** :ref:`RID` shaped **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`spoof_check` **(** :ref:`String` string **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`string_to_lower` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`string_to_upper` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`strip_diacritics` **(** :ref:`String` string **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`tag_to_name` **(** :ref:`int` tag **)** |const| | -+-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_font` **(** **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_shaped_text` **(** :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_clear_size_cache` **(** :ref:`RID` font_rid **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontAntialiasing` | :ref:`font_get_antialiasing` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_embolden` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_face_count` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_face_index` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_fixed_size` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_global_oversampling` **(** **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`font_get_glyph_contours` **(** :ref:`RID` font, :ref:`int` size, :ref:`int` index **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Hinting` | :ref:`font_get_hinting` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_msdf_size` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`font_get_name` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_oversampling` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_stretch` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontStyle` | :ref:`font_get_style` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`font_get_style_name` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubpixelPositioning` | :ref:`font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`font_get_supported_chars` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`font_get_transform` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_weight` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_is_allow_system_fallback` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_allow_system_fallback` **(** :ref:`RID` font_rid, :ref:`bool` allow_system_fallback **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_face_index` **(** :ref:`RID` font_rid, :ref:`int` face_index **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_global_oversampling` **(** :ref:`float` oversampling **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_stretch` **(** :ref:`RID` font_rid, :ref:`int` weight **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_style` **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_weight` **(** :ref:`RID` font_rid, :ref:`int` weight **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`font_supported_feature_list` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`font_supported_variation_list` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`format_number` **(** :ref:`String` number, :ref:`String` language="" **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_features` **(** **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_name` **(** **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_support_data_filename` **(** **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_support_data_info` **(** **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has` **(** :ref:`RID` rid **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_locale_right_to_left` **(** :ref:`String` locale **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_identifier` **(** :ref:`String` string **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`load_support_data` **(** :ref:`String` filename **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`name_to_tag` **(** :ref:`String` name **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`parse_number` **(** :ref:`String` number, :ref:`String` language="" **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`percent_sign` **(** :ref:`String` language="" **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`save_support_data` **(** :ref:`String` filename **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_get_span_count` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={} **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={}, :ref:`String` language="", :ref:`Variant` meta=null **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_clear` **(** :ref:`RID` rid **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`shaped_text_get_descent` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`shaped_text_get_direction` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start=0, :ref:`LineBreakFlag` break_flags=3 **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start=0, :ref:`bool` once=true, :ref:`LineBreakFlag` break_flags=3 **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`shaped_text_get_objects` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Orientation` | :ref:`shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`shaped_text_get_parent` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`shaped_text_get_range` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`shaped_text_get_size` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`shaped_text_get_width` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags=264 **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_is_ready` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width=0, :ref:`TextOverrunFlag` overrun_trim_flags=0 **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction=0 **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation=0 **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_shape` **(** :ref:`RID` shaped **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`shaped_text_sort_logical` **(** :ref:`RID` shaped **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`spoof_check` **(** :ref:`String` string **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`string_to_lower` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`string_to_upper` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`strip_diacritics` **(** :ref:`String` string **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tag_to_name` **(** :ref:`int` tag **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_TextServer_FontAntialiasing: -.. _class_TextServer_constant_FONT_ANTIALIASING_NONE: - -.. _class_TextServer_constant_FONT_ANTIALIASING_GRAY: - -.. _class_TextServer_constant_FONT_ANTIALIASING_LCD: +.. rst-class:: classref-enumeration enum **FontAntialiasing**: -- **FONT_ANTIALIASING_NONE** = **0** --- Font glyphs are rasterized as 1-bit bitmaps. +.. _class_TextServer_constant_FONT_ANTIALIASING_NONE: -- **FONT_ANTIALIASING_GRAY** = **1** --- Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps. +.. rst-class:: classref-enumeration-constant -- **FONT_ANTIALIASING_LCD** = **2** --- Font glyphs are rasterized for LCD screens. +:ref:`FontAntialiasing` **FONT_ANTIALIASING_NONE** = ``0`` + +Font glyphs are rasterized as 1-bit bitmaps. + +.. _class_TextServer_constant_FONT_ANTIALIASING_GRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontAntialiasing` **FONT_ANTIALIASING_GRAY** = ``1`` + +Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps. + +.. _class_TextServer_constant_FONT_ANTIALIASING_LCD: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontAntialiasing` **FONT_ANTIALIASING_LCD** = ``2`` + +Font glyphs are rasterized for LCD screens. LCD subpixel layout is determined by the value of ``gui/theme/lcd_subpixel_layout`` project settings. LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D. +.. rst-class:: classref-item-separator + ---- .. _enum_TextServer_FontLCDSubpixelLayout: -.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE: - -.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB: - -.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR: - -.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB: - -.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR: - -.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX: +.. rst-class:: classref-enumeration enum **FontLCDSubpixelLayout**: -- **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = **0** --- Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled. +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE: -- **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = **1** --- Horizontal RGB subpixel layout. +.. rst-class:: classref-enumeration-constant -- **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = **2** --- Horizontal BGR subpixel layout. +:ref:`FontLCDSubpixelLayout` **FONT_LCD_SUBPIXEL_LAYOUT_NONE** = ``0`` -- **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = **3** --- Vertical RGB subpixel layout. +Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled. -- **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = **4** --- Vertical BGR subpixel layout. +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HRGB: -- **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = **5** +.. rst-class:: classref-enumeration-constant + +:ref:`FontLCDSubpixelLayout` **FONT_LCD_SUBPIXEL_LAYOUT_HRGB** = ``1`` + +Horizontal RGB subpixel layout. + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_HBGR: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontLCDSubpixelLayout` **FONT_LCD_SUBPIXEL_LAYOUT_HBGR** = ``2`` + +Horizontal BGR subpixel layout. + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontLCDSubpixelLayout` **FONT_LCD_SUBPIXEL_LAYOUT_VRGB** = ``3`` + +Vertical RGB subpixel layout. + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_VBGR: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontLCDSubpixelLayout` **FONT_LCD_SUBPIXEL_LAYOUT_VBGR** = ``4`` + +Vertical BGR subpixel layout. + +.. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontLCDSubpixelLayout` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_Direction: -.. _class_TextServer_constant_DIRECTION_AUTO: - -.. _class_TextServer_constant_DIRECTION_LTR: - -.. _class_TextServer_constant_DIRECTION_RTL: +.. rst-class:: classref-enumeration enum **Direction**: -- **DIRECTION_AUTO** = **0** --- Text direction is determined based on contents and current locale. +.. _class_TextServer_constant_DIRECTION_AUTO: -- **DIRECTION_LTR** = **1** --- Text is written from left to right. +.. rst-class:: classref-enumeration-constant -- **DIRECTION_RTL** = **2** --- Text is written from right to left. +:ref:`Direction` **DIRECTION_AUTO** = ``0`` + +Text direction is determined based on contents and current locale. + +.. _class_TextServer_constant_DIRECTION_LTR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Direction` **DIRECTION_LTR** = ``1`` + +Text is written from left to right. + +.. _class_TextServer_constant_DIRECTION_RTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Direction` **DIRECTION_RTL** = ``2`` + +Text is written from right to left. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_Orientation: -.. _class_TextServer_constant_ORIENTATION_HORIZONTAL: - -.. _class_TextServer_constant_ORIENTATION_VERTICAL: +.. rst-class:: classref-enumeration enum **Orientation**: -- **ORIENTATION_HORIZONTAL** = **0** --- Text is written horizontally. +.. _class_TextServer_constant_ORIENTATION_HORIZONTAL: -- **ORIENTATION_VERTICAL** = **1** --- Left to right text is written vertically from top to bottom. +.. rst-class:: classref-enumeration-constant + +:ref:`Orientation` **ORIENTATION_HORIZONTAL** = ``0`` + +Text is written horizontally. + +.. _class_TextServer_constant_ORIENTATION_VERTICAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Orientation` **ORIENTATION_VERTICAL** = ``1`` + +Left to right text is written vertically from top to bottom. Right to left text is written vertically from bottom to top. +.. rst-class:: classref-item-separator + ---- .. _enum_TextServer_JustificationFlag: -.. _class_TextServer_constant_JUSTIFICATION_NONE: - -.. _class_TextServer_constant_JUSTIFICATION_KASHIDA: - -.. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND: - -.. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES: - -.. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB: - -.. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS: +.. rst-class:: classref-enumeration flags **JustificationFlag**: -- **JUSTIFICATION_NONE** = **0** --- Do not justify text. +.. _class_TextServer_constant_JUSTIFICATION_NONE: -- **JUSTIFICATION_KASHIDA** = **1** --- Justify text by adding and removing kashidas. +.. rst-class:: classref-enumeration-constant -- **JUSTIFICATION_WORD_BOUND** = **2** --- Justify text by changing width of the spaces between the words. +:ref:`JustificationFlag` **JUSTIFICATION_NONE** = ``0`` -- **JUSTIFICATION_TRIM_EDGE_SPACES** = **4** --- Remove trailing and leading spaces from the justified text. +Do not justify text. -- **JUSTIFICATION_AFTER_LAST_TAB** = **8** --- Only apply justification to the part of the text after the last tab. +.. _class_TextServer_constant_JUSTIFICATION_KASHIDA: -- **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = **16** --- Apply justification to the trimmed line with ellipsis. +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_KASHIDA** = ``1`` + +Justify text by adding and removing kashidas. + +.. _class_TextServer_constant_JUSTIFICATION_WORD_BOUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_WORD_BOUND** = ``2`` + +Justify text by changing width of the spaces between the words. + +.. _class_TextServer_constant_JUSTIFICATION_TRIM_EDGE_SPACES: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_TRIM_EDGE_SPACES** = ``4`` + +Remove trailing and leading spaces from the justified text. + +.. _class_TextServer_constant_JUSTIFICATION_AFTER_LAST_TAB: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_AFTER_LAST_TAB** = ``8`` + +Only apply justification to the part of the text after the last tab. + +.. _class_TextServer_constant_JUSTIFICATION_CONSTRAIN_ELLIPSIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_CONSTRAIN_ELLIPSIS** = ``16`` + +Apply justification to the trimmed line with ellipsis. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_AutowrapMode: -.. _class_TextServer_constant_AUTOWRAP_OFF: - -.. _class_TextServer_constant_AUTOWRAP_ARBITRARY: - -.. _class_TextServer_constant_AUTOWRAP_WORD: - -.. _class_TextServer_constant_AUTOWRAP_WORD_SMART: +.. rst-class:: classref-enumeration enum **AutowrapMode**: -- **AUTOWRAP_OFF** = **0** --- Autowrap is disabled. +.. _class_TextServer_constant_AUTOWRAP_OFF: -- **AUTOWRAP_ARBITRARY** = **1** --- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available. +.. rst-class:: classref-enumeration-constant -- **AUTOWRAP_WORD** = **2** --- Wraps the text inside the node's bounding rectangle by soft-breaking between words. +:ref:`AutowrapMode` **AUTOWRAP_OFF** = ``0`` -- **AUTOWRAP_WORD_SMART** = **3** --- Behaves similarly to :ref:`AUTOWRAP_WORD`, but force-breaks a word if that single word does not fit in one line. +Autowrap is disabled. + +.. _class_TextServer_constant_AUTOWRAP_ARBITRARY: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutowrapMode` **AUTOWRAP_ARBITRARY** = ``1`` + +Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available. + +.. _class_TextServer_constant_AUTOWRAP_WORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutowrapMode` **AUTOWRAP_WORD** = ``2`` + +Wraps the text inside the node's bounding rectangle by soft-breaking between words. + +.. _class_TextServer_constant_AUTOWRAP_WORD_SMART: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutowrapMode` **AUTOWRAP_WORD_SMART** = ``3`` + +Behaves similarly to :ref:`AUTOWRAP_WORD`, but force-breaks a word if that single word does not fit in one line. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_LineBreakFlag: -.. _class_TextServer_constant_BREAK_NONE: - -.. _class_TextServer_constant_BREAK_MANDATORY: - -.. _class_TextServer_constant_BREAK_WORD_BOUND: - -.. _class_TextServer_constant_BREAK_GRAPHEME_BOUND: - -.. _class_TextServer_constant_BREAK_ADAPTIVE: - -.. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES: +.. rst-class:: classref-enumeration flags **LineBreakFlag**: -- **BREAK_NONE** = **0** --- Do not break the line. +.. _class_TextServer_constant_BREAK_NONE: -- **BREAK_MANDATORY** = **1** --- Break the line at the line mandatory break characters (e.g. ``"\n"``). +.. rst-class:: classref-enumeration-constant -- **BREAK_WORD_BOUND** = **2** --- Break the line between the words. +:ref:`LineBreakFlag` **BREAK_NONE** = ``0`` -- **BREAK_GRAPHEME_BOUND** = **4** --- Break the line between any unconnected graphemes. +Do not break the line. -- **BREAK_ADAPTIVE** = **8** --- Should be used only in conjunction with :ref:`BREAK_WORD_BOUND`, break the line between any unconnected graphemes, if it's impossible to break it between the words. +.. _class_TextServer_constant_BREAK_MANDATORY: -- **BREAK_TRIM_EDGE_SPACES** = **16** --- Remove edge spaces from the broken line segments. +.. rst-class:: classref-enumeration-constant + +:ref:`LineBreakFlag` **BREAK_MANDATORY** = ``1`` + +Break the line at the line mandatory break characters (e.g. ``"\n"``). + +.. _class_TextServer_constant_BREAK_WORD_BOUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineBreakFlag` **BREAK_WORD_BOUND** = ``2`` + +Break the line between the words. + +.. _class_TextServer_constant_BREAK_GRAPHEME_BOUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineBreakFlag` **BREAK_GRAPHEME_BOUND** = ``4`` + +Break the line between any unconnected graphemes. + +.. _class_TextServer_constant_BREAK_ADAPTIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineBreakFlag` **BREAK_ADAPTIVE** = ``8`` + +Should be used only in conjunction with :ref:`BREAK_WORD_BOUND`, break the line between any unconnected graphemes, if it's impossible to break it between the words. + +.. _class_TextServer_constant_BREAK_TRIM_EDGE_SPACES: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineBreakFlag` **BREAK_TRIM_EDGE_SPACES** = ``16`` + +Remove edge spaces from the broken line segments. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_VisibleCharactersBehavior: -.. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING: - -.. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING: - -.. _class_TextServer_constant_VC_GLYPHS_AUTO: - -.. _class_TextServer_constant_VC_GLYPHS_LTR: - -.. _class_TextServer_constant_VC_GLYPHS_RTL: +.. rst-class:: classref-enumeration enum **VisibleCharactersBehavior**: -- **VC_CHARS_BEFORE_SHAPING** = **0** --- Trims text before the shaping. e.g, increasing :ref:`Label.visible_characters` or :ref:`RichTextLabel.visible_characters` value is visually identical to typing the text. +.. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING: -- **VC_CHARS_AFTER_SHAPING** = **1** --- Displays glyphs that are mapped to the first :ref:`Label.visible_characters` or :ref:`RichTextLabel.visible_characters` characters from the beginning of the text. +.. rst-class:: classref-enumeration-constant -- **VC_GLYPHS_AUTO** = **2** --- Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the left or from the right, depending on :ref:`Control.layout_direction` value. +:ref:`VisibleCharactersBehavior` **VC_CHARS_BEFORE_SHAPING** = ``0`` -- **VC_GLYPHS_LTR** = **3** --- Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the left. +Trims text before the shaping. e.g, increasing :ref:`Label.visible_characters` or :ref:`RichTextLabel.visible_characters` value is visually identical to typing the text. -- **VC_GLYPHS_RTL** = **4** --- Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the right. +.. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibleCharactersBehavior` **VC_CHARS_AFTER_SHAPING** = ``1`` + +Displays glyphs that are mapped to the first :ref:`Label.visible_characters` or :ref:`RichTextLabel.visible_characters` characters from the beginning of the text. + +.. _class_TextServer_constant_VC_GLYPHS_AUTO: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibleCharactersBehavior` **VC_GLYPHS_AUTO** = ``2`` + +Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the left or from the right, depending on :ref:`Control.layout_direction` value. + +.. _class_TextServer_constant_VC_GLYPHS_LTR: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibleCharactersBehavior` **VC_GLYPHS_LTR** = ``3`` + +Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the left. + +.. _class_TextServer_constant_VC_GLYPHS_RTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibleCharactersBehavior` **VC_GLYPHS_RTL** = ``4`` + +Displays :ref:`Label.visible_ratio` or :ref:`RichTextLabel.visible_ratio` glyphs, starting from the right. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_OverrunBehavior: -.. _class_TextServer_constant_OVERRUN_NO_TRIMMING: - -.. _class_TextServer_constant_OVERRUN_TRIM_CHAR: - -.. _class_TextServer_constant_OVERRUN_TRIM_WORD: - -.. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS: - -.. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS: +.. rst-class:: classref-enumeration enum **OverrunBehavior**: -- **OVERRUN_NO_TRIMMING** = **0** --- No text trimming is performed. +.. _class_TextServer_constant_OVERRUN_NO_TRIMMING: -- **OVERRUN_TRIM_CHAR** = **1** --- Trims the text per character. +.. rst-class:: classref-enumeration-constant -- **OVERRUN_TRIM_WORD** = **2** --- Trims the text per word. +:ref:`OverrunBehavior` **OVERRUN_NO_TRIMMING** = ``0`` -- **OVERRUN_TRIM_ELLIPSIS** = **3** --- Trims the text per character and adds an ellipsis to indicate that parts are hidden. +No text trimming is performed. -- **OVERRUN_TRIM_WORD_ELLIPSIS** = **4** --- Trims the text per word and adds an ellipsis to indicate that parts are hidden. +.. _class_TextServer_constant_OVERRUN_TRIM_CHAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OverrunBehavior` **OVERRUN_TRIM_CHAR** = ``1`` + +Trims the text per character. + +.. _class_TextServer_constant_OVERRUN_TRIM_WORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`OverrunBehavior` **OVERRUN_TRIM_WORD** = ``2`` + +Trims the text per word. + +.. _class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`OverrunBehavior` **OVERRUN_TRIM_ELLIPSIS** = ``3`` + +Trims the text per character and adds an ellipsis to indicate that parts are hidden. + +.. _class_TextServer_constant_OVERRUN_TRIM_WORD_ELLIPSIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`OverrunBehavior` **OVERRUN_TRIM_WORD_ELLIPSIS** = ``4`` + +Trims the text per word and adds an ellipsis to indicate that parts are hidden. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_TextOverrunFlag: -.. _class_TextServer_constant_OVERRUN_NO_TRIM: - -.. _class_TextServer_constant_OVERRUN_TRIM: - -.. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY: - -.. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS: - -.. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS: - -.. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE: +.. rst-class:: classref-enumeration flags **TextOverrunFlag**: -- **OVERRUN_NO_TRIM** = **0** --- No trimming is performed. +.. _class_TextServer_constant_OVERRUN_NO_TRIM: -- **OVERRUN_TRIM** = **1** --- Trims the text when it exceeds the given width. +.. rst-class:: classref-enumeration-constant -- **OVERRUN_TRIM_WORD_ONLY** = **2** --- Trims the text per word instead of per grapheme. +:ref:`TextOverrunFlag` **OVERRUN_NO_TRIM** = ``0`` -- **OVERRUN_ADD_ELLIPSIS** = **4** --- Determines whether an ellipsis should be added at the end of the text. +No trimming is performed. -- **OVERRUN_ENFORCE_ELLIPSIS** = **8** --- Determines whether the ellipsis at the end of the text is enforced and may not be hidden. +.. _class_TextServer_constant_OVERRUN_TRIM: -- **OVERRUN_JUSTIFICATION_AWARE** = **16** +.. rst-class:: classref-enumeration-constant + +:ref:`TextOverrunFlag` **OVERRUN_TRIM** = ``1`` + +Trims the text when it exceeds the given width. + +.. _class_TextServer_constant_OVERRUN_TRIM_WORD_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextOverrunFlag` **OVERRUN_TRIM_WORD_ONLY** = ``2`` + +Trims the text per word instead of per grapheme. + +.. _class_TextServer_constant_OVERRUN_ADD_ELLIPSIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextOverrunFlag` **OVERRUN_ADD_ELLIPSIS** = ``4`` + +Determines whether an ellipsis should be added at the end of the text. + +.. _class_TextServer_constant_OVERRUN_ENFORCE_ELLIPSIS: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextOverrunFlag` **OVERRUN_ENFORCE_ELLIPSIS** = ``8`` + +Determines whether the ellipsis at the end of the text is enforced and may not be hidden. + +.. _class_TextServer_constant_OVERRUN_JUSTIFICATION_AWARE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextOverrunFlag` **OVERRUN_JUSTIFICATION_AWARE** = ``16`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_GraphemeFlag: -.. _class_TextServer_constant_GRAPHEME_IS_VALID: - -.. _class_TextServer_constant_GRAPHEME_IS_RTL: - -.. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL: - -.. _class_TextServer_constant_GRAPHEME_IS_SPACE: - -.. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD: - -.. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT: - -.. _class_TextServer_constant_GRAPHEME_IS_TAB: - -.. _class_TextServer_constant_GRAPHEME_IS_ELONGATION: - -.. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION: - -.. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE: - -.. _class_TextServer_constant_GRAPHEME_IS_CONNECTED: - -.. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL: +.. rst-class:: classref-enumeration flags **GraphemeFlag**: -- **GRAPHEME_IS_VALID** = **1** --- Grapheme is supported by the font, and can be drawn. +.. _class_TextServer_constant_GRAPHEME_IS_VALID: -- **GRAPHEME_IS_RTL** = **2** --- Grapheme is part of right-to-left or bottom-to-top run. +.. rst-class:: classref-enumeration-constant -- **GRAPHEME_IS_VIRTUAL** = **4** --- Grapheme is not part of source text, it was added by justification process. +:ref:`GraphemeFlag` **GRAPHEME_IS_VALID** = ``1`` -- **GRAPHEME_IS_SPACE** = **8** --- Grapheme is whitespace. +Grapheme is supported by the font, and can be drawn. -- **GRAPHEME_IS_BREAK_HARD** = **16** --- Grapheme is mandatory break point (e.g. ``"\n"``). +.. _class_TextServer_constant_GRAPHEME_IS_RTL: -- **GRAPHEME_IS_BREAK_SOFT** = **32** --- Grapheme is optional break point (e.g. space). +.. rst-class:: classref-enumeration-constant -- **GRAPHEME_IS_TAB** = **64** --- Grapheme is the tabulation character. +:ref:`GraphemeFlag` **GRAPHEME_IS_RTL** = ``2`` -- **GRAPHEME_IS_ELONGATION** = **128** --- Grapheme is kashida. +Grapheme is part of right-to-left or bottom-to-top run. -- **GRAPHEME_IS_PUNCTUATION** = **256** --- Grapheme is punctuation character. +.. _class_TextServer_constant_GRAPHEME_IS_VIRTUAL: -- **GRAPHEME_IS_UNDERSCORE** = **512** --- Grapheme is underscore character. +.. rst-class:: classref-enumeration-constant -- **GRAPHEME_IS_CONNECTED** = **1024** --- Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe. +:ref:`GraphemeFlag` **GRAPHEME_IS_VIRTUAL** = ``4`` -- **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = **2048** --- It is safe to insert a U+0640 before this grapheme for elongation. +Grapheme is not part of source text, it was added by justification process. + +.. _class_TextServer_constant_GRAPHEME_IS_SPACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_SPACE** = ``8`` + +Grapheme is whitespace. + +.. _class_TextServer_constant_GRAPHEME_IS_BREAK_HARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_BREAK_HARD** = ``16`` + +Grapheme is mandatory break point (e.g. ``"\n"``). + +.. _class_TextServer_constant_GRAPHEME_IS_BREAK_SOFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_BREAK_SOFT** = ``32`` + +Grapheme is optional break point (e.g. space). + +.. _class_TextServer_constant_GRAPHEME_IS_TAB: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_TAB** = ``64`` + +Grapheme is the tabulation character. + +.. _class_TextServer_constant_GRAPHEME_IS_ELONGATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_ELONGATION** = ``128`` + +Grapheme is kashida. + +.. _class_TextServer_constant_GRAPHEME_IS_PUNCTUATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_PUNCTUATION** = ``256`` + +Grapheme is punctuation character. + +.. _class_TextServer_constant_GRAPHEME_IS_UNDERSCORE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_UNDERSCORE** = ``512`` + +Grapheme is underscore character. + +.. _class_TextServer_constant_GRAPHEME_IS_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_CONNECTED** = ``1024`` + +Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe. + +.. _class_TextServer_constant_GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL** = ``2048`` + +It is safe to insert a U+0640 before this grapheme for elongation. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_Hinting: -.. _class_TextServer_constant_HINTING_NONE: - -.. _class_TextServer_constant_HINTING_LIGHT: - -.. _class_TextServer_constant_HINTING_NORMAL: +.. rst-class:: classref-enumeration enum **Hinting**: -- **HINTING_NONE** = **0** --- Disables font hinting (smoother but less crisp). +.. _class_TextServer_constant_HINTING_NONE: -- **HINTING_LIGHT** = **1** --- Use the light font hinting mode. +.. rst-class:: classref-enumeration-constant -- **HINTING_NORMAL** = **2** --- Use the default font hinting mode (crisper but less smooth). +:ref:`Hinting` **HINTING_NONE** = ``0`` + +Disables font hinting (smoother but less crisp). + +.. _class_TextServer_constant_HINTING_LIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hinting` **HINTING_LIGHT** = ``1`` + +Use the light font hinting mode. + +.. _class_TextServer_constant_HINTING_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hinting` **HINTING_NORMAL** = ``2`` + +Use the default font hinting mode (crisper but less smooth). \ **Note:** This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width. +.. rst-class:: classref-item-separator + ---- .. _enum_TextServer_SubpixelPositioning: -.. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED: - -.. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO: - -.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF: - -.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER: - -.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE: - -.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE: +.. rst-class:: classref-enumeration enum **SubpixelPositioning**: -- **SUBPIXEL_POSITIONING_DISABLED** = **0** --- Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once. +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED: -- **SUBPIXEL_POSITIONING_AUTO** = **1** --- Glyph horizontal position is rounded based on font size. +.. rst-class:: classref-enumeration-constant - - To one quarter of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE`. +:ref:`SubpixelPositioning` **SUBPIXEL_POSITIONING_DISABLED** = ``0`` - - To one half of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE`. +Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once. - - To the whole pixel size for larger fonts. +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO: -- **SUBPIXEL_POSITIONING_ONE_HALF** = **2** --- Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times. +.. rst-class:: classref-enumeration-constant -- **SUBPIXEL_POSITIONING_ONE_QUARTER** = **3** --- Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times. +:ref:`SubpixelPositioning` **SUBPIXEL_POSITIONING_AUTO** = ``1`` -- **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = **20** --- Maximum font size which will use one half of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO` mode. +Glyph horizontal position is rounded based on font size. -- **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = **16** --- Maximum font size which will use one quarter of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO` mode. +- To one quarter of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE`. + +- To one half of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE`. + +- To the whole pixel size for larger fonts. + +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubpixelPositioning` **SUBPIXEL_POSITIONING_ONE_HALF** = ``2`` + +Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times. + +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubpixelPositioning` **SUBPIXEL_POSITIONING_ONE_QUARTER** = ``3`` + +Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times. + +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubpixelPositioning` **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = ``20`` + +Maximum font size which will use one half of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO` mode. + +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SubpixelPositioning` **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = ``16`` + +Maximum font size which will use one quarter of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO` mode. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_Feature: -.. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT: - -.. _class_TextServer_constant_FEATURE_BIDI_LAYOUT: - -.. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT: - -.. _class_TextServer_constant_FEATURE_SHAPING: - -.. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION: - -.. _class_TextServer_constant_FEATURE_BREAK_ITERATORS: - -.. _class_TextServer_constant_FEATURE_FONT_BITMAP: - -.. _class_TextServer_constant_FEATURE_FONT_DYNAMIC: - -.. _class_TextServer_constant_FEATURE_FONT_MSDF: - -.. _class_TextServer_constant_FEATURE_FONT_SYSTEM: - -.. _class_TextServer_constant_FEATURE_FONT_VARIABLE: - -.. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION: - -.. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA: - -.. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS: - -.. _class_TextServer_constant_FEATURE_UNICODE_SECURITY: +.. rst-class:: classref-enumeration enum **Feature**: -- **FEATURE_SIMPLE_LAYOUT** = **1** --- TextServer supports simple text layouts. +.. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT: -- **FEATURE_BIDI_LAYOUT** = **2** --- TextServer supports bidirectional text layouts. +.. rst-class:: classref-enumeration-constant -- **FEATURE_VERTICAL_LAYOUT** = **4** --- TextServer supports vertical layouts. +:ref:`Feature` **FEATURE_SIMPLE_LAYOUT** = ``1`` -- **FEATURE_SHAPING** = **8** --- TextServer supports complex text shaping. +TextServer supports simple text layouts. -- **FEATURE_KASHIDA_JUSTIFICATION** = **16** --- TextServer supports justification using kashidas. +.. _class_TextServer_constant_FEATURE_BIDI_LAYOUT: -- **FEATURE_BREAK_ITERATORS** = **32** --- TextServer supports complex line/word breaking rules (e.g. dictionary based). +.. rst-class:: classref-enumeration-constant -- **FEATURE_FONT_BITMAP** = **64** --- TextServer supports loading bitmap fonts. +:ref:`Feature` **FEATURE_BIDI_LAYOUT** = ``2`` -- **FEATURE_FONT_DYNAMIC** = **128** --- TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts. +TextServer supports bidirectional text layouts. -- **FEATURE_FONT_MSDF** = **256** --- TextServer supports multichannel signed distance field dynamic font rendering. +.. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT: -- **FEATURE_FONT_SYSTEM** = **512** --- TextServer supports loading system fonts. +.. rst-class:: classref-enumeration-constant -- **FEATURE_FONT_VARIABLE** = **1024** --- TextServer supports variable fonts. +:ref:`Feature` **FEATURE_VERTICAL_LAYOUT** = ``4`` -- **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = **2048** --- TextServer supports locale dependent and context sensitive case conversion. +TextServer supports vertical layouts. -- **FEATURE_USE_SUPPORT_DATA** = **4096** --- TextServer require external data file for some features, see :ref:`load_support_data`. +.. _class_TextServer_constant_FEATURE_SHAPING: -- **FEATURE_UNICODE_IDENTIFIERS** = **8192** --- TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier`. +.. rst-class:: classref-enumeration-constant -- **FEATURE_UNICODE_SECURITY** = **16384** --- TextServer supports `Unicode Technical Report #36 `__ and `Unicode Technical Standard #39 `__ based spoof detection features. +:ref:`Feature` **FEATURE_SHAPING** = ``8`` + +TextServer supports complex text shaping. + +.. _class_TextServer_constant_FEATURE_KASHIDA_JUSTIFICATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_KASHIDA_JUSTIFICATION** = ``16`` + +TextServer supports justification using kashidas. + +.. _class_TextServer_constant_FEATURE_BREAK_ITERATORS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_BREAK_ITERATORS** = ``32`` + +TextServer supports complex line/word breaking rules (e.g. dictionary based). + +.. _class_TextServer_constant_FEATURE_FONT_BITMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_FONT_BITMAP** = ``64`` + +TextServer supports loading bitmap fonts. + +.. _class_TextServer_constant_FEATURE_FONT_DYNAMIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_FONT_DYNAMIC** = ``128`` + +TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts. + +.. _class_TextServer_constant_FEATURE_FONT_MSDF: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_FONT_MSDF** = ``256`` + +TextServer supports multichannel signed distance field dynamic font rendering. + +.. _class_TextServer_constant_FEATURE_FONT_SYSTEM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_FONT_SYSTEM** = ``512`` + +TextServer supports loading system fonts. + +.. _class_TextServer_constant_FEATURE_FONT_VARIABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_FONT_VARIABLE** = ``1024`` + +TextServer supports variable fonts. + +.. _class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = ``2048`` + +TextServer supports locale dependent and context sensitive case conversion. + +.. _class_TextServer_constant_FEATURE_USE_SUPPORT_DATA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_USE_SUPPORT_DATA** = ``4096`` + +TextServer require external data file for some features, see :ref:`load_support_data`. + +.. _class_TextServer_constant_FEATURE_UNICODE_IDENTIFIERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_UNICODE_IDENTIFIERS** = ``8192`` + +TextServer supports UAX #31 identifier validation, see :ref:`is_valid_identifier`. + +.. _class_TextServer_constant_FEATURE_UNICODE_SECURITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_UNICODE_SECURITY** = ``16384`` + +TextServer supports `Unicode Technical Report #36 `__ and `Unicode Technical Standard #39 `__ based spoof detection features. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_ContourPointTag: -.. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON: - -.. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC: - -.. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC: +.. rst-class:: classref-enumeration enum **ContourPointTag**: -- **CONTOUR_CURVE_TAG_ON** = **1** --- Contour point is on the curve. +.. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON: -- **CONTOUR_CURVE_TAG_OFF_CONIC** = **0** --- Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc. +.. rst-class:: classref-enumeration-constant -- **CONTOUR_CURVE_TAG_OFF_CUBIC** = **2** --- Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc. +:ref:`ContourPointTag` **CONTOUR_CURVE_TAG_ON** = ``1`` + +Contour point is on the curve. + +.. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CONIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContourPointTag` **CONTOUR_CURVE_TAG_OFF_CONIC** = ``0`` + +Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc. + +.. _class_TextServer_constant_CONTOUR_CURVE_TAG_OFF_CUBIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContourPointTag` **CONTOUR_CURVE_TAG_OFF_CUBIC** = ``2`` + +Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_SpacingType: -.. _class_TextServer_constant_SPACING_GLYPH: - -.. _class_TextServer_constant_SPACING_SPACE: - -.. _class_TextServer_constant_SPACING_TOP: - -.. _class_TextServer_constant_SPACING_BOTTOM: - -.. _class_TextServer_constant_SPACING_MAX: +.. rst-class:: classref-enumeration enum **SpacingType**: -- **SPACING_GLYPH** = **0** --- Spacing for each glyph. +.. _class_TextServer_constant_SPACING_GLYPH: -- **SPACING_SPACE** = **1** --- Spacing for the space character. +.. rst-class:: classref-enumeration-constant -- **SPACING_TOP** = **2** --- Spacing at the top of the line. +:ref:`SpacingType` **SPACING_GLYPH** = ``0`` -- **SPACING_BOTTOM** = **3** --- Spacing at the bottom of the line. +Spacing for each glyph. -- **SPACING_MAX** = **4** +.. _class_TextServer_constant_SPACING_SPACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpacingType` **SPACING_SPACE** = ``1`` + +Spacing for the space character. + +.. _class_TextServer_constant_SPACING_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpacingType` **SPACING_TOP** = ``2`` + +Spacing at the top of the line. + +.. _class_TextServer_constant_SPACING_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpacingType` **SPACING_BOTTOM** = ``3`` + +Spacing at the bottom of the line. + +.. _class_TextServer_constant_SPACING_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SpacingType` **SPACING_MAX** = ``4`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_FontStyle: -.. _class_TextServer_constant_FONT_BOLD: - -.. _class_TextServer_constant_FONT_ITALIC: - -.. _class_TextServer_constant_FONT_FIXED_WIDTH: +.. rst-class:: classref-enumeration flags **FontStyle**: -- **FONT_BOLD** = **1** --- Font is bold. +.. _class_TextServer_constant_FONT_BOLD: -- **FONT_ITALIC** = **2** --- Font is italic or oblique. +.. rst-class:: classref-enumeration-constant -- **FONT_FIXED_WIDTH** = **4** --- Font have fixed-width characters. +:ref:`FontStyle` **FONT_BOLD** = ``1`` + +Font is bold. + +.. _class_TextServer_constant_FONT_ITALIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontStyle` **FONT_ITALIC** = ``2`` + +Font is italic or oblique. + +.. _class_TextServer_constant_FONT_FIXED_WIDTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`FontStyle` **FONT_FIXED_WIDTH** = ``4`` + +Font have fixed-width characters. + +.. rst-class:: classref-item-separator ---- .. _enum_TextServer_StructuredTextParser: -.. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT: - -.. _class_TextServer_constant_STRUCTURED_TEXT_URI: - -.. _class_TextServer_constant_STRUCTURED_TEXT_FILE: - -.. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL: - -.. _class_TextServer_constant_STRUCTURED_TEXT_LIST: - -.. _class_TextServer_constant_STRUCTURED_TEXT_NONE: - -.. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM: +.. rst-class:: classref-enumeration enum **StructuredTextParser**: -- **STRUCTURED_TEXT_DEFAULT** = **0** --- Use default behavior. Same as :ref:`STRUCTURED_TEXT_NONE` unless specified otherwise in the control description. +.. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT: -- **STRUCTURED_TEXT_URI** = **1** --- BiDi override for URI. +.. rst-class:: classref-enumeration-constant -- **STRUCTURED_TEXT_FILE** = **2** --- BiDi override for file path. +:ref:`StructuredTextParser` **STRUCTURED_TEXT_DEFAULT** = ``0`` -- **STRUCTURED_TEXT_EMAIL** = **3** --- BiDi override for email. +Use default behavior. Same as :ref:`STRUCTURED_TEXT_NONE` unless specified otherwise in the control description. -- **STRUCTURED_TEXT_LIST** = **4** --- BiDi override for lists. +.. _class_TextServer_constant_STRUCTURED_TEXT_URI: + +.. rst-class:: classref-enumeration-constant + +:ref:`StructuredTextParser` **STRUCTURED_TEXT_URI** = ``1`` + +BiDi override for URI. + +.. _class_TextServer_constant_STRUCTURED_TEXT_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`StructuredTextParser` **STRUCTURED_TEXT_FILE** = ``2`` + +BiDi override for file path. + +.. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`StructuredTextParser` **STRUCTURED_TEXT_EMAIL** = ``3`` + +BiDi override for email. + +.. _class_TextServer_constant_STRUCTURED_TEXT_LIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`StructuredTextParser` **STRUCTURED_TEXT_LIST** = ``4`` + +BiDi override for lists. Structured text options: list separator ``String``. -- **STRUCTURED_TEXT_NONE** = **5** --- Use default Unicode BiDi algorithm. +.. _class_TextServer_constant_STRUCTURED_TEXT_NONE: -- **STRUCTURED_TEXT_CUSTOM** = **6** --- User defined structured text BiDi override function. +.. rst-class:: classref-enumeration-constant + +:ref:`StructuredTextParser` **STRUCTURED_TEXT_NONE** = ``5`` + +Use default Unicode BiDi algorithm. + +.. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`StructuredTextParser` **STRUCTURED_TEXT_CUSTOM** = ``6`` + +User defined structured text BiDi override function. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TextServer_method_create_font: -- :ref:`RID` **create_font** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **create_font** **(** **)** Creates new, empty font cache entry resource. To free the resulting resourec, use :ref:`free_rid` method. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_create_shaped_text: -- :ref:`RID` **create_shaped_text** **(** :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** +.. rst-class:: classref-method + +:ref:`RID` **create_shaped_text** **(** :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid` method. @@ -940,55 +1447,79 @@ Creates new buffer for complex text layout, with the given ``direction`` and ``o \ **Note:** Orientation is ignored if server does not support :ref:`FEATURE_VERTICAL_LAYOUT` feature (supported by :ref:`TextServerAdvanced`). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_draw_hex_code_box: -- void **draw_hex_code_box** **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |const| +.. rst-class:: classref-method + +void **draw_hex_code_box** **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |const| Draws box displaying character hexadecimal code. Used for replacing missing characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_clear_glyphs: -- void **font_clear_glyphs** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **font_clear_glyphs** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** Removes all rendered glyphs information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture` to remove them manually. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_clear_kerning_map: -- void **font_clear_kerning_map** **(** :ref:`RID` font_rid, :ref:`int` size **)** +.. rst-class:: classref-method + +void **font_clear_kerning_map** **(** :ref:`RID` font_rid, :ref:`int` size **)** Removes all kerning overrides. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_clear_size_cache: -- void **font_clear_size_cache** **(** :ref:`RID` font_rid **)** +.. rst-class:: classref-method + +void **font_clear_size_cache** **(** :ref:`RID` font_rid **)** Removes all font sizes from the cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_clear_textures: -- void **font_clear_textures** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **font_clear_textures** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** Removes all textures from font cache entry. \ **Note:** This function will not remove glyphs associated with the texture, use :ref:`font_remove_glyph` to remove them manually. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_draw_glyph: -- void **font_draw_glyph** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **font_draw_glyph** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``. @@ -996,11 +1527,15 @@ Draws single glyph into a canvas item at the position, using ``font_rid`` at the \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_draw_glyph_outline: -- void **font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``. @@ -1008,93 +1543,137 @@ Draws single glyph outline of size ``outline_size`` into a canvas item at the po \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_antialiasing: -- :ref:`FontAntialiasing` **font_get_antialiasing** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`FontAntialiasing` **font_get_antialiasing** **(** :ref:`RID` font_rid **)** |const| Returns font anti-aliasing mode. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_ascent: -- :ref:`float` **font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| Returns the font ascent (number of pixels above the baseline). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_descent: -- :ref:`float` **font_get_descent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_descent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| Returns the font descent (number of pixels below the baseline). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_embolden: -- :ref:`float` **font_get_embolden** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_embolden** **(** :ref:`RID` font_rid **)** |const| Returns font embolden strength. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_face_count: -- :ref:`int` **font_get_face_count** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_face_count** **(** :ref:`RID` font_rid **)** |const| Returns number of faces in the TrueType / OpenType collection. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_face_index: -- :ref:`int` **font_get_face_index** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_face_index** **(** :ref:`RID` font_rid **)** |const| Recturns an active face index in the TrueType / OpenType collection. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_fixed_size: -- :ref:`int` **font_get_fixed_size** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_fixed_size** **(** :ref:`RID` font_rid **)** |const| Returns bitmap font fixed size. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_generate_mipmaps: -- :ref:`bool` **font_get_generate_mipmaps** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **font_get_generate_mipmaps** **(** :ref:`RID` font_rid **)** |const| Returns ``true`` if font texture mipmap generation is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_global_oversampling: -- :ref:`float` **font_get_global_oversampling** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_global_oversampling** **(** **)** |const| Returns the font oversampling factor, shared by all fonts in the TextServer. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_advance: -- :ref:`Vector2` **font_get_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **font_get_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |const| Returns glyph advance (offset of the next glyph). \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_contours: -- :ref:`Dictionary` **font_get_glyph_contours** **(** :ref:`RID` font, :ref:`int` size, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **font_get_glyph_contours** **(** :ref:`RID` font, :ref:`int` size, :ref:`int` index **)** |const| Returns outline contours of the glyph as a ``Dictionary`` with the following contents: @@ -1104,763 +1683,1213 @@ Returns outline contours of the glyph as a ``Dictionary`` with the following con \ ``orientation`` - :ref:`bool`, contour orientation. If ``true``, clockwise contours must be filled. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_index: -- :ref:`int` **font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_list: -- :ref:`PackedInt32Array` **font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| Returns list of rendered glyphs in the cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_offset: -- :ref:`Vector2` **font_get_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **font_get_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns glyph offset from the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_size: -- :ref:`Vector2` **font_get_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **font_get_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns size of the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_texture_idx: -- :ref:`int` **font_get_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns index of the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_texture_rid: -- :ref:`RID` **font_get_glyph_texture_rid** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **font_get_glyph_texture_rid** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns resource id of the cache texture containing the glyph. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_texture_size: -- :ref:`Vector2` **font_get_glyph_texture_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **font_get_glyph_texture_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns size of the cache texture containing the glyph. \ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_glyph_uv_rect: -- :ref:`Rect2` **font_get_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **font_get_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| Returns rectangle in the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_hinting: -- :ref:`Hinting` **font_get_hinting** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`Hinting` **font_get_hinting** **(** :ref:`RID` font_rid **)** |const| Returns the font hinting mode. Used by dynamic fonts only. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_kerning: -- :ref:`Vector2` **font_get_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **font_get_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |const| Returns kerning for the pair of glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_kerning_list: -- :ref:`Vector2i[]` **font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| Returns list of the kerning overrides. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_language_support_override: -- :ref:`bool` **font_get_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** +.. rst-class:: classref-method + +:ref:`bool` **font_get_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** Returns ``true`` if support override is enabled for the ``language``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_language_support_overrides: -- :ref:`PackedStringArray` **font_get_language_support_overrides** **(** :ref:`RID` font_rid **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **font_get_language_support_overrides** **(** :ref:`RID` font_rid **)** Returns list of language support overrides. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_msdf_pixel_range: -- :ref:`int` **font_get_msdf_pixel_range** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_msdf_pixel_range** **(** :ref:`RID` font_rid **)** |const| Returns the width of the range around the shape between the minimum and maximum representable signed distance. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_msdf_size: -- :ref:`int` **font_get_msdf_size** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_msdf_size** **(** :ref:`RID` font_rid **)** |const| Returns source font size used to generate MSDF textures. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_name: -- :ref:`String` **font_get_name** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`String` **font_get_name** **(** :ref:`RID` font_rid **)** |const| Returns font family name. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_opentype_feature_overrides: -- :ref:`Dictionary` **font_get_opentype_feature_overrides** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **font_get_opentype_feature_overrides** **(** :ref:`RID` font_rid **)** |const| Returns font OpenType feature set override. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_oversampling: -- :ref:`float` **font_get_oversampling** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_oversampling** **(** :ref:`RID` font_rid **)** |const| 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_TextServer_method_font_get_scale: -- :ref:`float` **font_get_scale** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_scale** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| Returns scaling factor of the color bitmap font. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_script_support_override: -- :ref:`bool` **font_get_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** +.. rst-class:: classref-method + +:ref:`bool` **font_get_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** Returns ``true`` if support override is enabled for the ``script``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_script_support_overrides: -- :ref:`PackedStringArray` **font_get_script_support_overrides** **(** :ref:`RID` font_rid **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **font_get_script_support_overrides** **(** :ref:`RID` font_rid **)** Returns list of script support overrides. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_size_cache_list: -- :ref:`Vector2i[]` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |const| Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_get_stretch: + +.. rst-class:: classref-method + +:ref:`int` **font_get_stretch** **(** :ref:`RID` font_rid **)** |const| + +Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. + +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_style: -- :ref:`FontStyle` **font_get_style** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`FontStyle` **font_get_style** **(** :ref:`RID` font_rid **)** |const| Returns font style flags, see :ref:`FontStyle`. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_style_name: -- :ref:`String` **font_get_style_name** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`String` **font_get_style_name** **(** :ref:`RID` font_rid **)** |const| Returns font style name. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_subpixel_positioning: -- :ref:`SubpixelPositioning` **font_get_subpixel_positioning** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`SubpixelPositioning` **font_get_subpixel_positioning** **(** :ref:`RID` font_rid **)** |const| Returns font subpixel glyph positioning mode. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_supported_chars: -- :ref:`String` **font_get_supported_chars** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`String` **font_get_supported_chars** **(** :ref:`RID` font_rid **)** |const| Returns a string containing all the characters available in the font. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_texture_count: -- :ref:`int` **font_get_texture_count** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| +.. rst-class:: classref-method + +:ref:`int` **font_get_texture_count** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |const| Returns number of textures used by font cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_texture_image: -- :ref:`Image` **font_get_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **font_get_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| Returns font cache texture image data. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_texture_offsets: -- :ref:`PackedInt32Array` **font_get_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **font_get_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |const| Returns array containing glyph packing data. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_transform: -- :ref:`Transform2D` **font_get_transform** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **font_get_transform** **(** :ref:`RID` font_rid **)** |const| Returns 2D transform applied to the font outlines. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_underline_position: -- :ref:`float` **font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| Returns pixel offset of the underline below the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_underline_thickness: -- :ref:`float` **font_get_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| +.. rst-class:: classref-method + +:ref:`float` **font_get_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| Returns thickness of the underline in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_get_variation_coordinates: -- :ref:`Dictionary` **font_get_variation_coordinates** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **font_get_variation_coordinates** **(** :ref:`RID` font_rid **)** |const| Returns variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list` for more info. +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_get_weight: + +.. rst-class:: classref-method + +:ref:`int` **font_get_weight** **(** :ref:`RID` font_rid **)** |const| + +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_TextServer_method_font_has_char: -- :ref:`bool` **font_has_char** **(** :ref:`RID` font_rid, :ref:`int` char **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **font_has_char** **(** :ref:`RID` font_rid, :ref:`int` char **)** |const| Returns ``true`` if a Unicode ``char`` is available in the font. +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_is_allow_system_fallback: + +.. rst-class:: classref-method + +:ref:`bool` **font_is_allow_system_fallback** **(** :ref:`RID` font_rid **)** |const| + +Returns ``true`` if system fonts can be automatically used as fallbacks. + +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_is_force_autohinter: -- :ref:`bool` **font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |const| Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_is_language_supported: -- :ref:`bool` **font_is_language_supported** **(** :ref:`RID` font_rid, :ref:`String` language **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **font_is_language_supported** **(** :ref:`RID` font_rid, :ref:`String` language **)** |const| Returns ``true``, if font supports given language (`ISO 639 `__ code). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_is_multichannel_signed_distance_field: -- :ref:`bool` **font_is_multichannel_signed_distance_field** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **font_is_multichannel_signed_distance_field** **(** :ref:`RID` font_rid **)** |const| 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_TextServer_method_font_is_script_supported: -- :ref:`bool` **font_is_script_supported** **(** :ref:`RID` font_rid, :ref:`String` script **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **font_is_script_supported** **(** :ref:`RID` font_rid, :ref:`String` script **)** |const| Returns ``true``, if font supports given script (ISO 15924 code). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_remove_glyph: -- void **font_remove_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** +.. rst-class:: classref-method + +void **font_remove_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** Removes specified rendered glyph information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture` to remove them manually. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_remove_kerning: -- void **font_remove_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** +.. rst-class:: classref-method + +void **font_remove_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** Removes kerning override for the pair of glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_remove_language_support_override: -- void **font_remove_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** +.. rst-class:: classref-method + +void **font_remove_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** Remove language support override. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_remove_script_support_override: -- void **font_remove_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** +.. rst-class:: classref-method + +void **font_remove_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** Removes script support override. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_remove_size_cache: -- void **font_remove_size_cache** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **font_remove_size_cache** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** Removes specified font size from the cache entry. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_remove_texture: -- void **font_remove_texture** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** +.. rst-class:: classref-method + +void **font_remove_texture** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** Removes specified texture from the cache entry. \ **Note:** This function will not remove glyphs associated with the texture, remove them manually, using :ref:`font_remove_glyph`. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_render_glyph: -- void **font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** +.. rst-class:: classref-method + +void **font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** Renders specified glyph to the font cache texture. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_render_range: -- void **font_render_range** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** +.. rst-class:: classref-method + +void **font_render_range** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** Renders the range of characters to the font cache texture. +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_set_allow_system_fallback: + +.. rst-class:: classref-method + +void **font_set_allow_system_fallback** **(** :ref:`RID` font_rid, :ref:`bool` allow_system_fallback **)** + +If set to ``true``, system fonts can be automatically used as fallbacks. + +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_antialiasing: -- void **font_set_antialiasing** **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** +.. rst-class:: classref-method + +void **font_set_antialiasing** **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** Sets font anti-aliasing mode. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_ascent: -- void **font_set_ascent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** +.. rst-class:: classref-method + +void **font_set_ascent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** Sets the font ascent (number of pixels above the baseline). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_data: -- void **font_set_data** **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +void **font_set_data** **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** Sets font source data, e.g contents of the dynamic font source file. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_descent: -- void **font_set_descent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** +.. rst-class:: classref-method + +void **font_set_descent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** Sets the font descent (number of pixels below the baseline). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_embolden: -- void **font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** +.. rst-class:: classref-method + +void **font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** 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_TextServer_method_font_set_face_index: -- void **font_set_face_index** **(** :ref:`RID` font_rid, :ref:`int` face_index **)** +.. rst-class:: classref-method + +void **font_set_face_index** **(** :ref:`RID` font_rid, :ref:`int` face_index **)** Sets an active face index in the TrueType / OpenType collection. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_fixed_size: -- void **font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** +.. rst-class:: classref-method + +void **font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** 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_TextServer_method_font_set_force_autohinter: -- void **font_set_force_autohinter** **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** +.. rst-class:: classref-method + +void **font_set_force_autohinter** **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** If set to ``true`` auto-hinting is preferred over font built-in hinting. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_generate_mipmaps: -- void **font_set_generate_mipmaps** **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** +.. rst-class:: classref-method + +void **font_set_generate_mipmaps** **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** If set to ``true`` font texture mipmap generation is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_global_oversampling: -- void **font_set_global_oversampling** **(** :ref:`float` oversampling **)** +.. rst-class:: classref-method + +void **font_set_global_oversampling** **(** :ref:`float` oversampling **)** Sets oversampling factor, shared by all font in the TextServer. \ **Note:** This value can be automatically changed by display server. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_glyph_advance: -- void **font_set_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** +.. rst-class:: classref-method + +void **font_set_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** Sets glyph advance (offset of the next glyph). \ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_glyph_offset: -- void **font_set_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** +.. rst-class:: classref-method + +void **font_set_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** Sets glyph offset from the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_glyph_size: -- void **font_set_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** +.. rst-class:: classref-method + +void **font_set_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** Sets size of the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_glyph_texture_idx: -- void **font_set_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** +.. rst-class:: classref-method + +void **font_set_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** Sets index of the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_glyph_uv_rect: -- void **font_set_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** +.. rst-class:: classref-method + +void **font_set_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** Sets rectangle in the cache texture containing the glyph. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_hinting: -- void **font_set_hinting** **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** +.. rst-class:: classref-method + +void **font_set_hinting** **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** Sets font hinting mode. Used by dynamic fonts only. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_kerning: -- void **font_set_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** +.. rst-class:: classref-method + +void **font_set_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** Sets kerning for the pair of glyphs. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_language_support_override: -- void **font_set_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** +.. rst-class:: classref-method + +void **font_set_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** Adds override for :ref:`font_is_language_supported`. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_msdf_pixel_range: -- void **font_set_msdf_pixel_range** **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** +.. rst-class:: classref-method + +void **font_set_msdf_pixel_range** **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** Sets the width of the range around the shape between the minimum and maximum representable signed distance. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_msdf_size: -- void **font_set_msdf_size** **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** +.. rst-class:: classref-method + +void **font_set_msdf_size** **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** Sets source font size used to generate MSDF textures. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_multichannel_signed_distance_field: -- void **font_set_multichannel_signed_distance_field** **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** +.. rst-class:: classref-method + +void **font_set_multichannel_signed_distance_field** **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** 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. \ **Note:** MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_name: -- void **font_set_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** +.. rst-class:: classref-method + +void **font_set_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** Sets the font family name. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_opentype_feature_overrides: -- void **font_set_opentype_feature_overrides** **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** +.. rst-class:: classref-method + +void **font_set_opentype_feature_overrides** **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** Sets font OpenType feature set override. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_oversampling: -- void **font_set_oversampling** **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** +.. rst-class:: classref-method + +void **font_set_oversampling** **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** 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_TextServer_method_font_set_scale: -- void **font_set_scale** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** +.. rst-class:: classref-method + +void **font_set_scale** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** Sets scaling factor of the color bitmap font. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_script_support_override: -- void **font_set_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** +.. rst-class:: classref-method + +void **font_set_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** Adds override for :ref:`font_is_script_supported`. +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_set_stretch: + +.. rst-class:: classref-method + +void **font_set_stretch** **(** :ref:`RID` font_rid, :ref:`int` weight **)** + +Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. + +\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index`, :ref:`font_set_variation_coordinates`, or :ref:`font_set_transform` instead. + +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_style: -- void **font_set_style** **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** +.. rst-class:: classref-method + +void **font_set_style** **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** Sets the font style flags, see :ref:`FontStyle`. +\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index`, :ref:`font_set_variation_coordinates`, :ref:`font_set_embolden`, or :ref:`font_set_transform` instead. + +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_style_name: -- void **font_set_style_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** +.. rst-class:: classref-method + +void **font_set_style_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** Sets the font style name. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_subpixel_positioning: -- void **font_set_subpixel_positioning** **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** +.. rst-class:: classref-method + +void **font_set_subpixel_positioning** **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** Sets font subpixel glyph positioning mode. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_texture_image: -- void **font_set_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** +.. rst-class:: classref-method + +void **font_set_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** Sets font cache texture image data. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_texture_offsets: -- void **font_set_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** +.. rst-class:: classref-method + +void **font_set_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** Sets array containing glyph packing data. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_transform: -- void **font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** +.. rst-class:: classref-method + +void **font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_underline_position: -- void **font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** +.. rst-class:: classref-method + +void **font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** Sets pixel offset of the underline below the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_underline_thickness: -- void **font_set_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** +.. rst-class:: classref-method + +void **font_set_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** Sets thickness of the underline in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_set_variation_coordinates: -- void **font_set_variation_coordinates** **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** +.. rst-class:: classref-method + +void **font_set_variation_coordinates** **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** Sets variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list` for more info. +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_set_weight: + +.. rst-class:: classref-method + +void **font_set_weight** **(** :ref:`RID` font_rid, :ref:`int` weight **)** + +Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. + +\ **Note:** This value is used for font matching only and will not affect font rendering. Use :ref:`font_set_face_index`, :ref:`font_set_variation_coordinates`, or :ref:`font_set_embolden` instead. + +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_supported_feature_list: -- :ref:`Dictionary` **font_supported_feature_list** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **font_supported_feature_list** **(** :ref:`RID` font_rid **)** |const| Returns the dictionary of the supported OpenType features. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_font_supported_variation_list: -- :ref:`Dictionary` **font_supported_variation_list** **(** :ref:`RID` font_rid **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **font_supported_variation_list** **(** :ref:`RID` font_rid **)** |const| Returns the dictionary of the supported OpenType variation coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_format_number: -- :ref:`String` **format_number** **(** :ref:`String` number, :ref:`String` language="" **)** |const| +.. rst-class:: classref-method + +:ref:`String` **format_number** **(** :ref:`String` number, :ref:`String` language="" **)** |const| Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_free_rid: -- void **free_rid** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method -Frees an object created by this ``TextServer``. +void **free_rid** **(** :ref:`RID` rid **)** + +Frees an object created by this **TextServer**. + +.. rst-class:: classref-item-separator ---- .. _class_TextServer_method_get_features: -- :ref:`int` **get_features** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_features** **(** **)** |const| Returns text server features, see :ref:`Feature`. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_get_hex_code_box_size: -- :ref:`Vector2` **get_hex_code_box_size** **(** :ref:`int` size, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_hex_code_box_size** **(** :ref:`int` size, :ref:`int` index **)** |const| 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_TextServer_method_get_name: -- :ref:`String` **get_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_name** **(** **)** |const| Returns the name of the server interface. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_get_support_data_filename: -- :ref:`String` **get_support_data_filename** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_support_data_filename** **(** **)** |const| Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_get_support_data_info: -- :ref:`String` **get_support_data_info** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_support_data_info** **(** **)** |const| Returns TextServer database (e.g. ICU break iterators and dictionaries) description. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_has: -- :ref:`bool` **has** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +:ref:`bool` **has** **(** :ref:`RID` rid **)** Returns ``true`` if ``rid`` is valid resource owned by this text server. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_has_feature: -- :ref:`bool` **has_feature** **(** :ref:`Feature` feature **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_feature** **(** :ref:`Feature` feature **)** |const| Returns ``true`` if the server supports a feature. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_is_confusable: -- :ref:`int` **is_confusable** **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |const| +.. rst-class:: classref-method + +:ref:`int` **is_confusable** **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |const| Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found. @@ -1868,19 +2897,27 @@ Returns index of the first string in ``dict`` which is visually confusable with \ **Note:** Always returns ``-1`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY` feature. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_is_locale_right_to_left: -- :ref:`bool` **is_locale_right_to_left** **(** :ref:`String` locale **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_locale_right_to_left** **(** :ref:`String` locale **)** |const| Returns ``true`` if locale is right-to-left. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_is_valid_identifier: -- :ref:`bool` **is_valid_identifier** **(** :ref:`String` string **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_identifier** **(** :ref:`String` string **)** |const| Returns ``true`` is ``string`` is a valid identifier. @@ -1900,551 +2937,815 @@ If the :ref:`FEATURE_UNICODE_IDENTIFIERS` **load_support_data** **(** :ref:`String` filename **)** +.. rst-class:: classref-method + +:ref:`bool` **load_support_data** **(** :ref:`String` filename **)** Loads optional TextServer database (e.g. ICU break iterators and dictionaries). \ **Note:** This function should be called before any other TextServer functions used, otherwise it won't have any effect. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_name_to_tag: -- :ref:`int` **name_to_tag** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **name_to_tag** **(** :ref:`String` name **)** |const| Converts readable feature, variation, script or language name to OpenType tag. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_parse_number: -- :ref:`String` **parse_number** **(** :ref:`String` number, :ref:`String` language="" **)** |const| +.. rst-class:: classref-method + +:ref:`String` **parse_number** **(** :ref:`String` number, :ref:`String` language="" **)** |const| Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_parse_structured_text: -- :ref:`Vector2i[]` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser` for more info. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_percent_sign: -- :ref:`String` **percent_sign** **(** :ref:`String` language="" **)** |const| +.. rst-class:: classref-method + +:ref:`String` **percent_sign** **(** :ref:`String` language="" **)** |const| Returns percent sign used in the ``language``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_save_support_data: -- :ref:`bool` **save_support_data** **(** :ref:`String` filename **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **save_support_data** **(** :ref:`String` filename **)** |const| Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. \ **Note:** This function is used by during project export, to include TextServer database. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_get_span_count: -- :ref:`int` **shaped_get_span_count** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_get_span_count** **(** :ref:`RID` shaped **)** |const| Returns number of text spans added using :ref:`shaped_text_add_string` or :ref:`shaped_text_add_object`. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_get_span_meta: -- :ref:`Variant` **shaped_get_span_meta** **(** :ref:`RID` shaped, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **shaped_get_span_meta** **(** :ref:`RID` shaped, :ref:`int` index **)** |const| Returns text span metadata. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_set_span_update_font: -- void **shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={} **)** +.. rst-class:: classref-method + +void **shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={} **)** Changes text span font, font size and OpenType features, without changing the text. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_add_object: -- :ref:`bool` **shaped_text_add_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_add_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5, :ref:`int` length=1 **)** 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_TextServer_method_shaped_text_add_string: -- :ref:`bool` **shaped_text_add_string** **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={}, :ref:`String` language="", :ref:`Variant` meta=null **)** +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_add_string** **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features={}, :ref:`String` language="", :ref:`Variant` meta=null **)** Adds text span and font to draw it to the text buffer. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_clear: -- void **shaped_text_clear** **(** :ref:`RID` rid **)** +.. rst-class:: classref-method + +void **shaped_text_clear** **(** :ref:`RID` rid **)** Clears text buffer (removes text and inline objects). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_draw: -- void **shaped_text_draw** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **shaped_text_draw** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| 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_TextServer_method_shaped_text_draw_outline: -- void **shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| +.. rst-class:: classref-method + +void **shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| 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_TextServer_method_shaped_text_fit_to_width: -- :ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** +.. rst-class:: classref-method + +:ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** Adjusts text with to fit to specified width, returns new text width. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_ascent: -- :ref:`float` **shaped_text_get_ascent** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`float` **shaped_text_get_ascent** **(** :ref:`RID` shaped **)** |const| Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). \ **Note:** Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_carets: -- :ref:`Dictionary` **shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` position **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` position **)** |const| 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_TextServer_method_shaped_text_get_custom_punctuation: -- :ref:`String` **shaped_text_get_custom_punctuation** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`String` **shaped_text_get_custom_punctuation** **(** :ref:`RID` shaped **)** |const| Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_descent: -- :ref:`float` **shaped_text_get_descent** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`float` **shaped_text_get_descent** **(** :ref:`RID` shaped **)** |const| Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). \ **Note:** Overall descent can be higher than font descent, if some glyphs are displaced from the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_direction: -- :ref:`Direction` **shaped_text_get_direction** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Direction` **shaped_text_get_direction** **(** :ref:`RID` shaped **)** |const| Returns direction of the text. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_dominant_direction_in_range: -- :ref:`Direction` **shaped_text_get_dominant_direction_in_range** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| +.. rst-class:: classref-method + +:ref:`Direction` **shaped_text_get_dominant_direction_in_range** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| Returns dominant direction of in the range of text. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_ellipsis_glyph_count: -- :ref:`int` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID` shaped **)** |const| Returns number of glyphs in the ellipsis. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_ellipsis_glyphs: -- :ref:`Dictionary[]` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |const| Returns array of the glyphs in the ellipsis. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_ellipsis_pos: -- :ref:`int` **shaped_text_get_ellipsis_pos** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_ellipsis_pos** **(** :ref:`RID` shaped **)** |const| Returns position of the ellipsis. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_glyph_count: -- :ref:`int` **shaped_text_get_glyph_count** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_glyph_count** **(** :ref:`RID` shaped **)** |const| Returns number of glyphs in the buffer. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_glyphs: -- :ref:`Dictionary[]` **shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |const| Returns an array of glyphs in the visual order. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_grapheme_bounds: -- :ref:`Vector2` **shaped_text_get_grapheme_bounds** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **shaped_text_get_grapheme_bounds** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| Returns composite character's bounds as offsets from the start of the line. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_inferred_direction: -- :ref:`Direction` **shaped_text_get_inferred_direction** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Direction` **shaped_text_get_inferred_direction** **(** :ref:`RID` shaped **)** |const| Returns direction of the text, inferred by the BiDi algorithm. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_line_breaks: -- :ref:`PackedInt32Array` **shaped_text_get_line_breaks** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start=0, :ref:`LineBreakFlag` break_flags=3 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **shaped_text_get_line_breaks** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start=0, :ref:`LineBreakFlag` break_flags=3 **)** |const| Breaks text to the lines and returns character ranges for each line. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_line_breaks_adv: -- :ref:`PackedInt32Array` **shaped_text_get_line_breaks_adv** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start=0, :ref:`bool` once=true, :ref:`LineBreakFlag` break_flags=3 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **shaped_text_get_line_breaks_adv** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start=0, :ref:`bool` once=true, :ref:`LineBreakFlag` break_flags=3 **)** |const| Breaks text to the lines and columns. Returns character ranges for each segment. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_object_rect: -- :ref:`Rect2` **shaped_text_get_object_rect** **(** :ref:`RID` shaped, :ref:`Variant` key **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **shaped_text_get_object_rect** **(** :ref:`RID` shaped, :ref:`Variant` key **)** |const| Returns bounding rectangle of the inline object. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_objects: -- :ref:`Array` **shaped_text_get_objects** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **shaped_text_get_objects** **(** :ref:`RID` shaped **)** |const| Returns array of inline objects. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_orientation: -- :ref:`Orientation` **shaped_text_get_orientation** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Orientation` **shaped_text_get_orientation** **(** :ref:`RID` shaped **)** |const| Returns text orientation. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_parent: -- :ref:`RID` **shaped_text_get_parent** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **shaped_text_get_parent** **(** :ref:`RID` shaped **)** |const| Returns the parent buffer from which the substring originates. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_preserve_control: -- :ref:`bool` **shaped_text_get_preserve_control** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_get_preserve_control** **(** :ref:`RID` shaped **)** |const| Returns ``true`` if text buffer is configured to display control characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_preserve_invalid: -- :ref:`bool` **shaped_text_get_preserve_invalid** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_get_preserve_invalid** **(** :ref:`RID` shaped **)** |const| Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters. \ **Note:** If set to ``false``, nothing is displayed in place of invalid characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_range: -- :ref:`Vector2i` **shaped_text_get_range** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **shaped_text_get_range** **(** :ref:`RID` shaped **)** |const| Returns substring buffer character range in the parent buffer. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_selection: -- :ref:`PackedVector2Array` **shaped_text_get_selection** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **shaped_text_get_selection** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |const| Returns selection rectangles for the specified character range. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_size: -- :ref:`Vector2` **shaped_text_get_size** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **shaped_text_get_size** **(** :ref:`RID` shaped **)** |const| Returns size of the text. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_spacing: -- :ref:`int` **shaped_text_get_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |const| Returns extra spacing added between glyphs or lines in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_trim_pos: -- :ref:`int` **shaped_text_get_trim_pos** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_trim_pos** **(** :ref:`RID` shaped **)** |const| Returns the position of the overrun trim. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_underline_position: -- :ref:`float` **shaped_text_get_underline_position** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`float` **shaped_text_get_underline_position** **(** :ref:`RID` shaped **)** |const| Returns pixel offset of the underline below the baseline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_underline_thickness: -- :ref:`float` **shaped_text_get_underline_thickness** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`float` **shaped_text_get_underline_thickness** **(** :ref:`RID` shaped **)** |const| Returns thickness of the underline. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_width: -- :ref:`float` **shaped_text_get_width** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`float` **shaped_text_get_width** **(** :ref:`RID` shaped **)** |const| Returns width (for horizontal layout) or height (for vertical) of the text. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_get_word_breaks: -- :ref:`PackedInt32Array` **shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags=264 **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags=264 **)** |const| Breaks text into words and returns array of character ranges. Use ``grapheme_flags`` to set what characters are used for breaking (see :ref:`GraphemeFlag`). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_hit_test_grapheme: -- :ref:`int` **shaped_text_hit_test_grapheme** **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_hit_test_grapheme** **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_hit_test_position: -- :ref:`int` **shaped_text_hit_test_position** **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_hit_test_position** **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| 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_TextServer_method_shaped_text_is_ready: -- :ref:`bool` **shaped_text_is_ready** **(** :ref:`RID` shaped **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_is_ready** **(** :ref:`RID` shaped **)** |const| Returns ``true`` if buffer is successfully shaped. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_next_grapheme_pos: -- :ref:`int` **shaped_text_next_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_next_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| Returns composite character end position closest to the ``pos``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_overrun_trim_to_width: -- void **shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, :ref:`float` width=0, :ref:`TextOverrunFlag` overrun_trim_flags=0 **)** +.. rst-class:: classref-method + +void **shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, :ref:`float` width=0, :ref:`TextOverrunFlag` overrun_trim_flags=0 **)** Trims text if it exceeds the given width. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_prev_grapheme_pos: -- :ref:`int` **shaped_text_prev_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| +.. rst-class:: classref-method + +:ref:`int` **shaped_text_prev_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| Returns composite character start position closest to the ``pos``. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_resize_object: -- :ref:`bool` **shaped_text_resize_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_resize_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align=5 **)** Sets new size and alignment of embedded object. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_set_bidi_override: -- void **shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref:`Array` override **)** +.. rst-class:: classref-method + +void **shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref:`Array` override **)** Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_set_custom_punctuation: -- void **shaped_text_set_custom_punctuation** **(** :ref:`RID` shaped, :ref:`String` punct **)** +.. rst-class:: classref-method + +void **shaped_text_set_custom_punctuation** **(** :ref:`RID` shaped, :ref:`String` punct **)** Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_set_direction: -- void **shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Direction` direction=0 **)** +.. rst-class:: classref-method + +void **shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Direction` direction=0 **)** Sets desired text direction. If set to :ref:`DIRECTION_AUTO`, direction will be detected based on the buffer contents and current locale. \ **Note:** Direction is ignored if server does not support :ref:`FEATURE_BIDI_LAYOUT` feature (supported by :ref:`TextServerAdvanced`). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_set_orientation: -- void **shaped_text_set_orientation** **(** :ref:`RID` shaped, :ref:`Orientation` orientation=0 **)** +.. rst-class:: classref-method + +void **shaped_text_set_orientation** **(** :ref:`RID` shaped, :ref:`Orientation` orientation=0 **)** Sets desired text orientation. \ **Note:** Orientation is ignored if server does not support :ref:`FEATURE_VERTICAL_LAYOUT` feature (supported by :ref:`TextServerAdvanced`). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_set_preserve_control: -- void **shaped_text_set_preserve_control** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **shaped_text_set_preserve_control** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** If set to ``true`` text buffer will display control characters. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_set_preserve_invalid: -- void **shaped_text_set_preserve_invalid** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **shaped_text_set_preserve_invalid** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_set_spacing: -- void **shaped_text_set_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** +.. rst-class:: classref-method + +void **shaped_text_set_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** Sets extra spacing added between glyphs or lines in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_shape: -- :ref:`bool` **shaped_text_shape** **(** :ref:`RID` shaped **)** +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_shape** **(** :ref:`RID` shaped **)** Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully. \ **Note:** It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_sort_logical: -- :ref:`Dictionary[]` **shaped_text_sort_logical** **(** :ref:`RID` shaped **)** +.. rst-class:: classref-method + +:ref:`Dictionary[]` **shaped_text_sort_logical** **(** :ref:`RID` shaped **)** Returns text glyphs in the logical order. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_substr: -- :ref:`RID` **shaped_text_substr** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **shaped_text_substr** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |const| Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects). +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_shaped_text_tab_align: -- :ref:`float` **shaped_text_tab_align** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** +.. rst-class:: classref-method + +:ref:`float` **shaped_text_tab_align** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** Aligns shaped text to the given tab-stops. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_spoof_check: -- :ref:`bool` **spoof_check** **(** :ref:`String` string **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **spoof_check** **(** :ref:`String` string **)** |const| Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader. \ **Note:** Always returns ``false`` if the server does not support the :ref:`FEATURE_UNICODE_SECURITY` feature. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_string_get_word_breaks: -- :ref:`PackedInt32Array` **string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language="" **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language="" **)** |const| Returns array of the word break character offsets. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_string_to_lower: -- :ref:`String` **string_to_lower** **(** :ref:`String` string, :ref:`String` language="" **)** |const| +.. rst-class:: classref-method + +:ref:`String` **string_to_lower** **(** :ref:`String` string, :ref:`String` language="" **)** |const| Returns the string converted to lowercase. @@ -2452,11 +3753,15 @@ Returns the string converted to lowercase. \ **Note:** The result may be longer or shorter than the original. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_string_to_upper: -- :ref:`String` **string_to_upper** **(** :ref:`String` string, :ref:`String` language="" **)** |const| +.. rst-class:: classref-method + +:ref:`String` **string_to_upper** **(** :ref:`String` string, :ref:`String` language="" **)** |const| Returns the string converted to uppercase. @@ -2464,21 +3769,29 @@ Returns the string converted to uppercase. \ **Note:** The result may be longer or shorter than the original. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_strip_diacritics: -- :ref:`String` **strip_diacritics** **(** :ref:`String` string **)** |const| +.. rst-class:: classref-method + +:ref:`String` **strip_diacritics** **(** :ref:`String` string **)** |const| Strips diacritics from the string. \ **Note:** The result may be longer or shorter than the original. +.. rst-class:: classref-item-separator + ---- .. _class_TextServer_method_tag_to_name: -- :ref:`String` **tag_to_name** **(** :ref:`int` tag **)** |const| +.. rst-class:: classref-method + +:ref:`String` **tag_to_name** **(** :ref:`int` tag **)** |const| Converts OpenType tag to readable feature, variation, script or language name. diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 6b1421d71..4b33a307e 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -16,2256 +16,3127 @@ TextServerExtension Base class for TextServer custom implementations (plugins). +.. rst-class:: classref-introduction-group + Description ----------- External TextServer implementations should inherit from this class. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_create_font` **(** **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_create_shaped_text` **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_size_cache` **(** :ref:`RID` font_rid **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FontAntialiasing` | :ref:`_font_get_antialiasing` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_face_count` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_face_index` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_fixed_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_global_oversampling` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_get_glyph_contours` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`_font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Hinting` | :ref:`_font_get_hinting` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`_font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_msdf_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_font_get_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_oversampling` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`_font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FontStyle` | :ref:`_font_get_style` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_font_get_style_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SubpixelPositioning` | :ref:`_font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_font_get_supported_chars` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`_font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`_font_get_transform` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_data_ptr` **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_face_index` **(** :ref:`RID` font_rid, :ref:`int` face_index **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_global_oversampling` **(** :ref:`float` oversampling **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_style` **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_supported_feature_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_supported_variation_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_format_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_features` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_support_data_filename` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_support_data_info` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has` **(** :ref:`RID` rid **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_feature` **(** :ref:`Feature` feature **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_locale_right_to_left` **(** :ref:`String` locale **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_valid_identifier` **(** :ref:`String` string **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_load_support_data` **(** :ref:`String` filename **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_name_to_tag` **(** :ref:`String` name **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_parse_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`_parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_percent_sign` **(** :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_save_support_data` **(** :ref:`String` filename **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_get_span_count` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_clear` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`_shaped_text_get_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| const Glyph* | :ref:`_shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| const Glyph* | :ref:`_shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`_shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`_shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_shaped_text_get_objects` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Orientation` | :ref:`_shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_shaped_text_get_parent` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`_shaped_text_get_range` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`_shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_shaped_text_get_size` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_width` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_is_ready` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`TextOverrunFlag` trim_flags **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_shape` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| const Glyph* | :ref:`_shaped_text_sort_logical` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_update_breaks` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_update_justification_ops` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_spoof_check` **(** :ref:`String` string **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_string_to_lower` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_string_to_upper` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_strip_diacritics` **(** :ref:`String` string **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_tag_to_name` **(** :ref:`int` tag **)** |virtual| |const| | -+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_cleanup` **(** **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_create_font` **(** **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_create_shaped_text` **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_size_cache` **(** :ref:`RID` font_rid **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontAntialiasing` | :ref:`_font_get_antialiasing` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_face_count` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_face_index` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_fixed_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_global_oversampling` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_glyph_contours` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`_font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Hinting` | :ref:`_font_get_hinting` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`_font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_msdf_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_font_get_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_oversampling` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`_font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_stretch` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontStyle` | :ref:`_font_get_style` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_font_get_style_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubpixelPositioning` | :ref:`_font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_font_get_supported_chars` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`_font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_font_get_transform` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_weight` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_allow_system_fallback` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_allow_system_fallback` **(** :ref:`RID` font_rid, :ref:`bool` allow_system_fallback **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_data_ptr` **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_face_index` **(** :ref:`RID` font_rid, :ref:`int` face_index **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_global_oversampling` **(** :ref:`float` oversampling **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_stretch` **(** :ref:`RID` font_rid, :ref:`int` stretch **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_style` **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_weight` **(** :ref:`RID` font_rid, :ref:`int` weight **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_supported_feature_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_supported_variation_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_format_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_features` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_support_data_filename` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_support_data_info` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has` **(** :ref:`RID` rid **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_feature` **(** :ref:`Feature` feature **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_locale_right_to_left` **(** :ref:`String` locale **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_valid_identifier` **(** :ref:`String` string **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_load_support_data` **(** :ref:`String` filename **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_name_to_tag` **(** :ref:`String` name **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_parse_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`_parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_percent_sign` **(** :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_save_support_data` **(** :ref:`String` filename **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_get_span_count` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_clear` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`_shaped_text_get_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | const Glyph* | :ref:`_shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | const Glyph* | :ref:`_shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`_shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`_shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_shaped_text_get_objects` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Orientation` | :ref:`_shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_shaped_text_get_parent` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`_shaped_text_get_range` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`_shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_shaped_text_get_size` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_width` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_is_ready` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`TextOverrunFlag` trim_flags **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_shape` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | const Glyph* | :ref:`_shaped_text_sort_logical` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_update_breaks` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_update_justification_ops` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_spoof_check` **(** :ref:`String` string **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_string_to_lower` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_string_to_upper` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_strip_diacritics` **(** :ref:`String` string **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_tag_to_name` **(** :ref:`int` tag **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- -.. _class_TextServerExtension_method__create_font: +.. _class_TextServerExtension_method__cleanup: -- :ref:`RID` **_create_font** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_cleanup** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_method__create_font: + +.. rst-class:: classref-method + +:ref:`RID` **_create_font** **(** **)** |virtual| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__create_shaped_text: -- :ref:`RID` **_create_shaped_text** **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_create_shaped_text** **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__draw_hex_code_box: -- void **_draw_hex_code_box** **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| +.. rst-class:: classref-method + +void **_draw_hex_code_box** **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_clear_glyphs: -- void **_font_clear_glyphs** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| +.. rst-class:: classref-method + +void **_font_clear_glyphs** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_clear_kerning_map: -- void **_font_clear_kerning_map** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| +.. rst-class:: classref-method + +void **_font_clear_kerning_map** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_clear_size_cache: -- void **_font_clear_size_cache** **(** :ref:`RID` font_rid **)** |virtual| +.. rst-class:: classref-method + +void **_font_clear_size_cache** **(** :ref:`RID` font_rid **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_clear_textures: -- void **_font_clear_textures** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| +.. rst-class:: classref-method + +void **_font_clear_textures** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_draw_glyph: -- void **_font_draw_glyph** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| +.. rst-class:: classref-method + +void **_font_draw_glyph** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_draw_glyph_outline: -- void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| +.. rst-class:: classref-method + +void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_antialiasing: -- :ref:`FontAntialiasing` **_font_get_antialiasing** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`FontAntialiasing` **_font_get_antialiasing** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_ascent: -- :ref:`float` **_font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_descent: -- :ref:`float` **_font_get_descent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_descent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_embolden: -- :ref:`float` **_font_get_embolden** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_embolden** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_face_count: -- :ref:`int` **_font_get_face_count** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_face_count** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_face_index: -- :ref:`int` **_font_get_face_index** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_face_index** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_fixed_size: -- :ref:`int` **_font_get_fixed_size** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_fixed_size** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_generate_mipmaps: -- :ref:`bool` **_font_get_generate_mipmaps** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_font_get_generate_mipmaps** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_global_oversampling: -- :ref:`float` **_font_get_global_oversampling** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_global_oversampling** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_advance: -- :ref:`Vector2` **_font_get_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_font_get_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_contours: -- :ref:`Dictionary` **_font_get_glyph_contours** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_font_get_glyph_contours** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_index: -- :ref:`int` **_font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_list: -- :ref:`PackedInt32Array` **_font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_offset: -- :ref:`Vector2` **_font_get_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_font_get_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_size: -- :ref:`Vector2` **_font_get_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_font_get_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_texture_idx: -- :ref:`int` **_font_get_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_texture_rid: -- :ref:`RID` **_font_get_glyph_texture_rid** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_font_get_glyph_texture_rid** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_texture_size: -- :ref:`Vector2` **_font_get_glyph_texture_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_font_get_glyph_texture_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_glyph_uv_rect: -- :ref:`Rect2` **_font_get_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Rect2` **_font_get_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_hinting: -- :ref:`Hinting` **_font_get_hinting** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Hinting` **_font_get_hinting** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_kerning: -- :ref:`Vector2` **_font_get_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_font_get_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_kerning_list: -- :ref:`Vector2i[]` **_font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **_font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_language_support_override: -- :ref:`bool` **_font_get_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_font_get_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_language_support_overrides: -- :ref:`PackedStringArray` **_font_get_language_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_font_get_language_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_msdf_pixel_range: -- :ref:`int` **_font_get_msdf_pixel_range** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_msdf_pixel_range** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_msdf_size: -- :ref:`int` **_font_get_msdf_size** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_msdf_size** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_name: -- :ref:`String` **_font_get_name** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_font_get_name** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_opentype_feature_overrides: -- :ref:`Dictionary` **_font_get_opentype_feature_overrides** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_font_get_opentype_feature_overrides** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_oversampling: -- :ref:`float` **_font_get_oversampling** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_oversampling** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_scale: -- :ref:`float` **_font_get_scale** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_scale** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_script_support_override: -- :ref:`bool` **_font_get_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_font_get_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_script_support_overrides: -- :ref:`PackedStringArray` **_font_get_script_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_font_get_script_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_size_cache_list: -- :ref:`Vector2i[]` **_font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **_font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_method__font_get_stretch: + +.. rst-class:: classref-method + +:ref:`int` **_font_get_stretch** **(** :ref:`RID` font_rid **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_style: -- :ref:`FontStyle` **_font_get_style** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`FontStyle` **_font_get_style** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_style_name: -- :ref:`String` **_font_get_style_name** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_font_get_style_name** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_subpixel_positioning: -- :ref:`SubpixelPositioning` **_font_get_subpixel_positioning** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`SubpixelPositioning` **_font_get_subpixel_positioning** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_supported_chars: -- :ref:`String` **_font_get_supported_chars** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_font_get_supported_chars** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_texture_count: -- :ref:`int` **_font_get_texture_count** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_font_get_texture_count** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_texture_image: -- :ref:`Image` **_font_get_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Image` **_font_get_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_texture_offsets: -- :ref:`PackedInt32Array` **_font_get_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_font_get_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_transform: -- :ref:`Transform2D` **_font_get_transform** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **_font_get_transform** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_underline_position: -- :ref:`float` **_font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_underline_thickness: -- :ref:`float` **_font_get_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_font_get_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_get_variation_coordinates: -- :ref:`Dictionary` **_font_get_variation_coordinates** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_font_get_variation_coordinates** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_method__font_get_weight: + +.. rst-class:: classref-method + +:ref:`int` **_font_get_weight** **(** :ref:`RID` font_rid **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_has_char: -- :ref:`bool` **_font_has_char** **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_font_has_char** **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_method__font_is_allow_system_fallback: + +.. rst-class:: classref-method + +:ref:`bool` **_font_is_allow_system_fallback** **(** :ref:`RID` font_rid **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_is_force_autohinter: -- :ref:`bool` **_font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_is_language_supported: -- :ref:`bool` **_font_is_language_supported** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_font_is_language_supported** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_is_multichannel_signed_distance_field: -- :ref:`bool` **_font_is_multichannel_signed_distance_field** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_font_is_multichannel_signed_distance_field** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_is_script_supported: -- :ref:`bool` **_font_is_script_supported** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_font_is_script_supported** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_remove_glyph: -- void **_font_remove_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| +.. rst-class:: classref-method + +void **_font_remove_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_remove_kerning: -- void **_font_remove_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| +.. rst-class:: classref-method + +void **_font_remove_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_remove_language_support_override: -- void **_font_remove_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| +.. rst-class:: classref-method + +void **_font_remove_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_remove_script_support_override: -- void **_font_remove_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| +.. rst-class:: classref-method + +void **_font_remove_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_remove_size_cache: -- void **_font_remove_size_cache** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| +.. rst-class:: classref-method + +void **_font_remove_size_cache** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_remove_texture: -- void **_font_remove_texture** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| +.. rst-class:: classref-method + +void **_font_remove_texture** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_render_glyph: -- void **_font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| +.. rst-class:: classref-method + +void **_font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_render_range: -- void **_font_render_range** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| +.. rst-class:: classref-method + +void **_font_render_range** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_method__font_set_allow_system_fallback: + +.. rst-class:: classref-method + +void **_font_set_allow_system_fallback** **(** :ref:`RID` font_rid, :ref:`bool` allow_system_fallback **)** |virtual| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_antialiasing: -- void **_font_set_antialiasing** **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_antialiasing** **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_ascent: -- void **_font_set_ascent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_ascent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_data: -- void **_font_set_data** **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_data** **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_data_ptr: -- void **_font_set_data_ptr** **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_data_ptr** **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_descent: -- void **_font_set_descent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_descent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_embolden: -- void **_font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_face_index: -- void **_font_set_face_index** **(** :ref:`RID` font_rid, :ref:`int` face_index **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_face_index** **(** :ref:`RID` font_rid, :ref:`int` face_index **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_fixed_size: -- void **_font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_force_autohinter: -- void **_font_set_force_autohinter** **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_force_autohinter** **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_generate_mipmaps: -- void **_font_set_generate_mipmaps** **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_generate_mipmaps** **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_global_oversampling: -- void **_font_set_global_oversampling** **(** :ref:`float` oversampling **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_global_oversampling** **(** :ref:`float` oversampling **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_glyph_advance: -- void **_font_set_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_glyph_offset: -- void **_font_set_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_glyph_size: -- void **_font_set_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_glyph_texture_idx: -- void **_font_set_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_glyph_uv_rect: -- void **_font_set_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_hinting: -- void **_font_set_hinting** **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_hinting** **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_kerning: -- void **_font_set_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_language_support_override: -- void **_font_set_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_msdf_pixel_range: -- void **_font_set_msdf_pixel_range** **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_msdf_pixel_range** **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_msdf_size: -- void **_font_set_msdf_size** **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_msdf_size** **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_multichannel_signed_distance_field: -- void **_font_set_multichannel_signed_distance_field** **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_multichannel_signed_distance_field** **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_name: -- void **_font_set_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_opentype_feature_overrides: -- void **_font_set_opentype_feature_overrides** **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_opentype_feature_overrides** **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_oversampling: -- void **_font_set_oversampling** **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_oversampling** **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_scale: -- void **_font_set_scale** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_scale** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_script_support_override: -- void **_font_set_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_method__font_set_stretch: + +.. rst-class:: classref-method + +void **_font_set_stretch** **(** :ref:`RID` font_rid, :ref:`int` stretch **)** |virtual| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_style: -- void **_font_set_style** **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_style** **(** :ref:`RID` font_rid, :ref:`FontStyle` style **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_style_name: -- void **_font_set_style_name** **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_style_name** **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_subpixel_positioning: -- void **_font_set_subpixel_positioning** **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_subpixel_positioning** **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_texture_image: -- void **_font_set_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_texture_offsets: -- void **_font_set_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_transform: -- void **_font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_underline_position: -- void **_font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_underline_thickness: -- void **_font_set_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_set_variation_coordinates: -- void **_font_set_variation_coordinates** **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| +.. rst-class:: classref-method + +void **_font_set_variation_coordinates** **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_method__font_set_weight: + +.. rst-class:: classref-method + +void **_font_set_weight** **(** :ref:`RID` font_rid, :ref:`int` weight **)** |virtual| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_supported_feature_list: -- :ref:`Dictionary` **_font_supported_feature_list** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_font_supported_feature_list** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__font_supported_variation_list: -- :ref:`Dictionary` **_font_supported_variation_list** **(** :ref:`RID` font_rid **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **_font_supported_variation_list** **(** :ref:`RID` font_rid **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__format_number: -- :ref:`String` **_format_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_format_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__free_rid: -- void **_free_rid** **(** :ref:`RID` rid **)** |virtual| +.. rst-class:: classref-method + +void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__get_features: -- :ref:`int` **_get_features** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_features** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__get_hex_code_box_size: -- :ref:`Vector2` **_get_hex_code_box_size** **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_hex_code_box_size** **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__get_name: -- :ref:`String` **_get_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_name** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__get_support_data_filename: -- :ref:`String` **_get_support_data_filename** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_support_data_filename** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__get_support_data_info: -- :ref:`String` **_get_support_data_info** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_support_data_info** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__has: -- :ref:`bool` **_has** **(** :ref:`RID` rid **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_has** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__has_feature: -- :ref:`bool` **_has_feature** **(** :ref:`Feature` feature **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_has_feature** **(** :ref:`Feature` feature **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__is_confusable: -- :ref:`int` **_is_confusable** **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_is_confusable** **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__is_locale_right_to_left: -- :ref:`bool` **_is_locale_right_to_left** **(** :ref:`String` locale **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_locale_right_to_left** **(** :ref:`String` locale **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__is_valid_identifier: -- :ref:`bool` **_is_valid_identifier** **(** :ref:`String` string **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_valid_identifier** **(** :ref:`String` string **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__load_support_data: -- :ref:`bool` **_load_support_data** **(** :ref:`String` filename **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_load_support_data** **(** :ref:`String` filename **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__name_to_tag: -- :ref:`int` **_name_to_tag** **(** :ref:`String` name **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_name_to_tag** **(** :ref:`String` name **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__parse_number: -- :ref:`String` **_parse_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_parse_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__parse_structured_text: -- :ref:`Vector2i[]` **_parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **_parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__percent_sign: -- :ref:`String` **_percent_sign** **(** :ref:`String` language **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_percent_sign** **(** :ref:`String` language **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__save_support_data: -- :ref:`bool` **_save_support_data** **(** :ref:`String` filename **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_save_support_data** **(** :ref:`String` filename **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_get_span_count: -- :ref:`int` **_shaped_get_span_count** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_get_span_count** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_get_span_meta: -- :ref:`Variant` **_shaped_get_span_meta** **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Variant` **_shaped_get_span_meta** **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_set_span_update_font: -- void **_shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_add_object: -- :ref:`bool` **_shaped_text_add_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_add_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_add_string: -- :ref:`bool` **_shaped_text_add_string** **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_add_string** **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_clear: -- void **_shaped_text_clear** **(** :ref:`RID` shaped **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_clear** **(** :ref:`RID` shaped **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_draw: -- void **_shaped_text_draw** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| +.. rst-class:: classref-method + +void **_shaped_text_draw** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_draw_outline: -- void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| +.. rst-class:: classref-method + +void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_fit_to_width: -- :ref:`float` **_shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| +.. rst-class:: classref-method + +:ref:`float` **_shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_ascent: -- :ref:`float` **_shaped_text_get_ascent** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shaped_text_get_ascent** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_carets: -- void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| +.. rst-class:: classref-method + +void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_custom_punctuation: -- :ref:`String` **_shaped_text_get_custom_punctuation** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_shaped_text_get_custom_punctuation** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_descent: -- :ref:`float` **_shaped_text_get_descent** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shaped_text_get_descent** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_direction: -- :ref:`Direction` **_shaped_text_get_direction** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Direction` **_shaped_text_get_direction** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_dominant_direction_in_range: -- :ref:`int` **_shaped_text_get_dominant_direction_in_range** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_get_dominant_direction_in_range** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyph_count: -- :ref:`int` **_shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyphs: -- const Glyph* **_shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +const Glyph* **_shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_ellipsis_pos: -- :ref:`int` **_shaped_text_get_ellipsis_pos** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_get_ellipsis_pos** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_glyph_count: -- :ref:`int` **_shaped_text_get_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_get_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_glyphs: -- const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_grapheme_bounds: -- :ref:`Vector2` **_shaped_text_get_grapheme_bounds** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_shaped_text_get_grapheme_bounds** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_inferred_direction: -- :ref:`Direction` **_shaped_text_get_inferred_direction** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Direction` **_shaped_text_get_inferred_direction** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_line_breaks: -- :ref:`PackedInt32Array` **_shaped_text_get_line_breaks** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_shaped_text_get_line_breaks** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_line_breaks_adv: -- :ref:`PackedInt32Array` **_shaped_text_get_line_breaks_adv** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_shaped_text_get_line_breaks_adv** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`LineBreakFlag` break_flags **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_object_rect: -- :ref:`Rect2` **_shaped_text_get_object_rect** **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Rect2` **_shaped_text_get_object_rect** **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_objects: -- :ref:`Array` **_shaped_text_get_objects** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Array` **_shaped_text_get_objects** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_orientation: -- :ref:`Orientation` **_shaped_text_get_orientation** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Orientation` **_shaped_text_get_orientation** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_parent: -- :ref:`RID` **_shaped_text_get_parent** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_shaped_text_get_parent** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_preserve_control: -- :ref:`bool` **_shaped_text_get_preserve_control** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_get_preserve_control** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_preserve_invalid: -- :ref:`bool` **_shaped_text_get_preserve_invalid** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_get_preserve_invalid** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_range: -- :ref:`Vector2i` **_shaped_text_get_range** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **_shaped_text_get_range** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_selection: -- :ref:`PackedVector2Array` **_shaped_text_get_selection** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **_shaped_text_get_selection** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_size: -- :ref:`Vector2` **_shaped_text_get_size** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`Vector2` **_shaped_text_get_size** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_spacing: -- :ref:`int` **_shaped_text_get_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_get_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_trim_pos: -- :ref:`int` **_shaped_text_get_trim_pos** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_get_trim_pos** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_underline_position: -- :ref:`float` **_shaped_text_get_underline_position** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shaped_text_get_underline_position** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_underline_thickness: -- :ref:`float` **_shaped_text_get_underline_thickness** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shaped_text_get_underline_thickness** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_width: -- :ref:`float` **_shaped_text_get_width** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`float` **_shaped_text_get_width** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_get_word_breaks: -- :ref:`PackedInt32Array` **_shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_hit_test_grapheme: -- :ref:`int` **_shaped_text_hit_test_grapheme** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_hit_test_grapheme** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_hit_test_position: -- :ref:`int` **_shaped_text_hit_test_position** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_hit_test_position** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_is_ready: -- :ref:`bool` **_shaped_text_is_ready** **(** :ref:`RID` shaped **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_is_ready** **(** :ref:`RID` shaped **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_next_grapheme_pos: -- :ref:`int` **_shaped_text_next_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_next_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_overrun_trim_to_width: -- void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`TextOverrunFlag` trim_flags **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`TextOverrunFlag` trim_flags **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_prev_grapheme_pos: -- :ref:`int` **_shaped_text_prev_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_shaped_text_prev_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_resize_object: -- :ref:`bool` **_shaped_text_resize_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_resize_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_set_bidi_override: -- void **_shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_set_custom_punctuation: -- void **_shaped_text_set_custom_punctuation** **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_set_custom_punctuation** **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_set_direction: -- void **_shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_set_orientation: -- void **_shaped_text_set_orientation** **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_set_orientation** **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_set_preserve_control: -- void **_shaped_text_set_preserve_control** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_set_preserve_control** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_set_preserve_invalid: -- void **_shaped_text_set_preserve_invalid** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_set_preserve_invalid** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_set_spacing: -- void **_shaped_text_set_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| +.. rst-class:: classref-method + +void **_shaped_text_set_spacing** **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_shape: -- :ref:`bool` **_shaped_text_shape** **(** :ref:`RID` shaped **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_shape** **(** :ref:`RID` shaped **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_sort_logical: -- const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped **)** |virtual| +.. rst-class:: classref-method + +const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_substr: -- :ref:`RID` **_shaped_text_substr** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`RID` **_shaped_text_substr** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_tab_align: -- :ref:`float` **_shaped_text_tab_align** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| +.. rst-class:: classref-method + +:ref:`float` **_shaped_text_tab_align** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_update_breaks: -- :ref:`bool` **_shaped_text_update_breaks** **(** :ref:`RID` shaped **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_update_breaks** **(** :ref:`RID` shaped **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__shaped_text_update_justification_ops: -- :ref:`bool` **_shaped_text_update_justification_ops** **(** :ref:`RID` shaped **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_shaped_text_update_justification_ops** **(** :ref:`RID` shaped **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__spoof_check: -- :ref:`bool` **_spoof_check** **(** :ref:`String` string **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_spoof_check** **(** :ref:`String` string **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__string_get_word_breaks: -- :ref:`PackedInt32Array` **_string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__string_to_lower: -- :ref:`String` **_string_to_lower** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_string_to_lower** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__string_to_upper: -- :ref:`String` **_string_to_upper** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_string_to_upper** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__strip_diacritics: -- :ref:`String` **_strip_diacritics** **(** :ref:`String` string **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_strip_diacritics** **(** :ref:`String` string **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TextServerExtension_method__tag_to_name: -- :ref:`String` **_tag_to_name** **(** :ref:`int` tag **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_tag_to_name** **(** :ref:`int` tag **)** |virtual| |const| .. container:: contribute diff --git a/classes/class_textservermanager.rst b/classes/class_textservermanager.rst index 6cf3d1c55..378e1fd86 100644 --- a/classes/class_textservermanager.rst +++ b/classes/class_textservermanager.rst @@ -14,113 +14,168 @@ TextServerManager Manager for the font and complex text layout servers. +.. rst-class:: classref-introduction-group + Description ----------- -``TextServerManager`` is the API backend for loading, enumeration and switching :ref:`TextServer`\ s. +**TextServerManager** is the API backend for loading, enumeration and switching :ref:`TextServer`\ s. \ **Note:** Switching text server at runtime is possible, but will invalidate all fonts and text buffers. Make sure to unload all controls, fonts, and themes before doing so. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_interface` **(** :ref:`TextServer` interface **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextServer` | :ref:`find_interface` **(** :ref:`String` name **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextServer` | :ref:`get_interface` **(** :ref:`int` idx **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_interface_count` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_interfaces` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextServer` | :ref:`get_primary_interface` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_interface` **(** :ref:`TextServer` interface **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_primary_interface` **(** :ref:`TextServer` index **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_interface` **(** :ref:`TextServer` interface **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextServer` | :ref:`find_interface` **(** :ref:`String` name **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextServer` | :ref:`get_interface` **(** :ref:`int` idx **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_interface_count` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_interfaces` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextServer` | :ref:`get_primary_interface` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_interface` **(** :ref:`TextServer` interface **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_primary_interface` **(** :ref:`TextServer` index **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_TextServerManager_signal_interface_added: -- **interface_added** **(** :ref:`StringName` interface_name **)** +.. rst-class:: classref-signal + +**interface_added** **(** :ref:`StringName` interface_name **)** Emitted when a new interface has been added. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_signal_interface_removed: -- **interface_removed** **(** :ref:`StringName` interface_name **)** +.. rst-class:: classref-signal + +**interface_removed** **(** :ref:`StringName` interface_name **)** Emitted when an interface is removed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TextServerManager_method_add_interface: -- void **add_interface** **(** :ref:`TextServer` interface **)** +.. rst-class:: classref-method + +void **add_interface** **(** :ref:`TextServer` interface **)** Registers an :ref:`TextServer` interface. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_method_find_interface: -- :ref:`TextServer` **find_interface** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`TextServer` **find_interface** **(** :ref:`String` name **)** |const| Finds an interface by its name. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_method_get_interface: -- :ref:`TextServer` **get_interface** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`TextServer` **get_interface** **(** :ref:`int` idx **)** |const| Returns the interface registered at a given index. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_method_get_interface_count: -- :ref:`int` **get_interface_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_interface_count** **(** **)** |const| Returns the number of interfaces currently registered. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_method_get_interfaces: -- :ref:`Dictionary[]` **get_interfaces** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_interfaces** **(** **)** |const| Returns a list of available interfaces the index and name of each interface. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_method_get_primary_interface: -- :ref:`TextServer` **get_primary_interface** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TextServer` **get_primary_interface** **(** **)** |const| Returns the primary :ref:`TextServer` interface currently in use. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_method_remove_interface: -- void **remove_interface** **(** :ref:`TextServer` interface **)** +.. rst-class:: classref-method + +void **remove_interface** **(** :ref:`TextServer` interface **)** Removes interface. All fonts and shaped text caches should be freed before removing interface. +.. rst-class:: classref-item-separator + ---- .. _class_TextServerManager_method_set_primary_interface: -- void **set_primary_interface** **(** :ref:`TextServer` index **)** +.. rst-class:: classref-method + +void **set_primary_interface** **(** :ref:`TextServer` index **)** Sets the primary :ref:`TextServer` interface. diff --git a/classes/class_texture.rst b/classes/class_texture.rst index 23e51a139..501e6b3ff 100644 --- a/classes/class_texture.rst +++ b/classes/class_texture.rst @@ -16,10 +16,12 @@ Texture Base class for all texture types. +.. rst-class:: classref-introduction-group + Description ----------- -``Texture`` is the base class for all texture types. Common texture types are :ref:`Texture2D` and :ref:`ImageTexture`. See also :ref:`Image`. +**Texture** is the base class for all texture types. Common texture types are :ref:`Texture2D` and :ref:`ImageTexture`. See also :ref:`Image`. .. |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.)` diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index ace8cf1c2..a0851a82b 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -16,6 +16,8 @@ Texture2D Texture for 2D and 3D. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,173 +25,242 @@ A texture works by registering an image in the video hardware, which then can be Textures are often created by loading them from a file. See :ref:`@GDScript.load`. -\ ``Texture2D`` is a base for other resources. It cannot be used directly. +\ **Texture2D** is a base for other resources. It cannot be used directly. \ **Note:** The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. Larger textures may fail to import. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw_rect` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw_rect_region` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_alpha` **(** **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_pixel_opaque` **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_rect` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_rect_region` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_height` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_image` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_width` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_alpha` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw_rect` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw_rect_region` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_alpha` **(** **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_pixel_opaque` **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_rect` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_rect_region` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_height` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_image` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_size` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_width` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_alpha` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Texture2D_method__draw: -- void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| +.. rst-class:: classref-method -Called when the entire ``Texture2D`` is requested to be drawn over a :ref:`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). +void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| + +Called when the entire **Texture2D** is requested to be drawn over a :ref:`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). \ **Note:** This is only used in 2D rendering, not 3D. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method__draw_rect: -- void **_draw_rect** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture2D`` is requested to be drawn onto :ref:`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). +void **_draw_rect** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| + +Called when the **Texture2D** is requested to be drawn onto :ref:`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). \ **Note:** This is only used in 2D rendering, not 3D. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method__draw_rect_region: -- void **_draw_rect_region** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| +.. rst-class:: classref-method -Called when a part of the ``Texture2D`` specified by ``src_rect``'s coordinates is requested to be drawn onto :ref:`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). +void **_draw_rect_region** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| + +Called when a part of the **Texture2D** specified by ``src_rect``'s coordinates is requested to be drawn onto :ref:`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). \ **Note:** This is only used in 2D rendering, not 3D. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method__get_height: -- :ref:`int` **_get_height** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture2D``'s height is queried. +:ref:`int` **_get_height** **(** **)** |virtual| |const| + +Called when the **Texture2D**'s height is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture2D_method__get_width: -- :ref:`int` **_get_width** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture2D``'s width is queried. +:ref:`int` **_get_width** **(** **)** |virtual| |const| + +Called when the **Texture2D**'s width is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture2D_method__has_alpha: -- :ref:`bool` **_has_alpha** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the presence of an alpha channel in the ``Texture2D`` is queried. +:ref:`bool` **_has_alpha** **(** **)** |virtual| |const| + +Called when the presence of an alpha channel in the **Texture2D** is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture2D_method__is_pixel_opaque: -- :ref:`bool` **_is_pixel_opaque** **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| +.. rst-class:: classref-method -Called when a pixel's opaque state in the ``Texture2D`` is queried at the specified ``(x, y)`` position. +:ref:`bool` **_is_pixel_opaque** **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| + +Called when a pixel's opaque state in the **Texture2D** is queried at the specified ``(x, y)`` position. + +.. rst-class:: classref-item-separator ---- .. _class_Texture2D_method_draw: -- void **draw** **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| +.. rst-class:: classref-method + +void **draw** **(** :ref:`RID` canvas_item, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| Draws the texture using a :ref:`CanvasItem` with the :ref:`RenderingServer` API at the specified ``position``. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method_draw_rect: -- void **draw_rect** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| +.. rst-class:: classref-method + +void **draw_rect** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** |const| Draws the texture using a :ref:`CanvasItem` with the :ref:`RenderingServer` API. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method_draw_rect_region: -- void **draw_rect_region** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** |const| +.. rst-class:: classref-method + +void **draw_rect_region** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** |const| Draws a part of the texture using a :ref:`CanvasItem` with the :ref:`RenderingServer` API. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method_get_height: -- :ref:`int` **get_height** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_height** **(** **)** |const| Returns the texture height in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method_get_image: -- :ref:`Image` **get_image** **(** **)** |const| +.. rst-class:: classref-method -Returns an :ref:`Image` that is a copy of data from this ``Texture2D`` (a new :ref:`Image` is created each time). :ref:`Image`\ s can be accessed and manipulated directly. +:ref:`Image` **get_image** **(** **)** |const| + +Returns an :ref:`Image` that is a copy of data from this **Texture2D** (a new :ref:`Image` is created each time). :ref:`Image`\ s can be accessed and manipulated directly. \ **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method_get_size: -- :ref:`Vector2` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_size** **(** **)** |const| Returns the texture size in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method_get_width: -- :ref:`int` **get_width** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_width** **(** **)** |const| Returns the texture width in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Texture2D_method_has_alpha: -- :ref:`bool` **has_alpha** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Texture2D`` has an alpha channel. +:ref:`bool` **has_alpha** **(** **)** |const| + +Returns ``true`` if this **Texture2D** has an alpha channel. .. |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.)` diff --git a/classes/class_texture2darray.rst b/classes/class_texture2darray.rst index fe56ca570..d393cd26a 100644 --- a/classes/class_texture2darray.rst +++ b/classes/class_texture2darray.rst @@ -14,6 +14,8 @@ Texture2DArray A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_texture3d.rst b/classes/class_texture3d.rst index 788f3f69e..7ecde5f09 100644 --- a/classes/class_texture3d.rst +++ b/classes/class_texture3d.rst @@ -16,140 +16,199 @@ Texture3D Base class for 3-dimensionnal textures. +.. rst-class:: classref-introduction-group + Description ----------- -Base class for :ref:`ImageTexture3D` and :ref:`CompressedTexture3D`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. ``Texture3D`` is the base class for all 3-dimensional texture types. See also :ref:`TextureLayered`. +Base class for :ref:`ImageTexture3D` and :ref:`CompressedTexture3D`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. **Texture3D** is the base class for all 3-dimensional texture types. See also :ref:`TextureLayered`. All images need to have the same width, height and number of mipmap levels. To create such a texture file yourself, reimport your image files using the Godot Editor import presets. +.. rst-class:: classref-reftable-group + Methods ------- -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Image[]` | :ref:`_get_data` **(** **)** |virtual| |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_depth` **(** **)** |virtual| |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Image[]` | :ref:`get_data` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_depth` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`get_format` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_height` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_width` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | -+----------------------------------+----------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`_get_data` **(** **)** |virtual| |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_depth` **(** **)** |virtual| |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`get_data` **(** **)** |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_depth` **(** **)** |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_height` **(** **)** |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_width` **(** **)** |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | + +----------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Texture3D_method__get_data: -- :ref:`Image[]` **_get_data** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture3D``'s data is queried. +:ref:`Image[]` **_get_data** **(** **)** |virtual| |const| + +Called when the **Texture3D**'s data is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method__get_depth: -- :ref:`int` **_get_depth** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture3D``'s depth is queried. +:ref:`int` **_get_depth** **(** **)** |virtual| |const| + +Called when the **Texture3D**'s depth is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method__get_format: -- :ref:`Format` **_get_format** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture3D``'s format is queried. +:ref:`Format` **_get_format** **(** **)** |virtual| |const| + +Called when the **Texture3D**'s format is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method__get_height: -- :ref:`int` **_get_height** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture3D``'s height is queried. +:ref:`int` **_get_height** **(** **)** |virtual| |const| + +Called when the **Texture3D**'s height is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method__get_width: -- :ref:`int` **_get_width** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``Texture3D``'s width is queried. +:ref:`int` **_get_width** **(** **)** |virtual| |const| + +Called when the **Texture3D**'s width is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method__has_mipmaps: -- :ref:`bool` **_has_mipmaps** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the presence of mipmaps in the ``Texture3D`` is queried. +:ref:`bool` **_has_mipmaps** **(** **)** |virtual| |const| + +Called when the presence of mipmaps in the **Texture3D** is queried. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method_get_data: -- :ref:`Image[]` **get_data** **(** **)** |const| +.. rst-class:: classref-method -Returns the ``Texture3D``'s data as an array of :ref:`Image`\ s. Each :ref:`Image` represents a *slice* of the ``Texture3D``, with different slices mapping to different depth (Z axis) levels. +:ref:`Image[]` **get_data** **(** **)** |const| + +Returns the **Texture3D**'s data as an array of :ref:`Image`\ s. Each :ref:`Image` represents a *slice* of the **Texture3D**, with different slices mapping to different depth (Z axis) levels. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method_get_depth: -- :ref:`int` **get_depth** **(** **)** |const| +.. rst-class:: classref-method -Returns the ``Texture3D``'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in :ref:`Texture2D`). +:ref:`int` **get_depth** **(** **)** |const| + +Returns the **Texture3D**'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in :ref:`Texture2D`). + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method_get_format: -- :ref:`Format` **get_format** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Format` **get_format** **(** **)** |const| Returns the current format being used by this texture. See :ref:`Format` for details. +.. rst-class:: classref-item-separator + ---- .. _class_Texture3D_method_get_height: -- :ref:`int` **get_height** **(** **)** |const| +.. rst-class:: classref-method -Returns the ``Texture3D``'s height in pixels. Width is typically represented by the Y axis. +:ref:`int` **get_height** **(** **)** |const| + +Returns the **Texture3D**'s height in pixels. Width is typically represented by the Y axis. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method_get_width: -- :ref:`int` **get_width** **(** **)** |const| +.. rst-class:: classref-method -Returns the ``Texture3D``'s width in pixels. Width is typically represented by the X axis. +:ref:`int` **get_width** **(** **)** |const| + +Returns the **Texture3D**'s width in pixels. Width is typically represented by the X axis. + +.. rst-class:: classref-item-separator ---- .. _class_Texture3D_method_has_mipmaps: -- :ref:`bool` **has_mipmaps** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``Texture3D`` has generated mipmaps. +:ref:`bool` **has_mipmaps** **(** **)** |const| + +Returns ``true`` if the **Texture3D** has generated mipmaps. .. |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.)` diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index 59b7249fc..465845e92 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -14,226 +14,297 @@ TextureButton Texture-based button. Supports Pressed, Hover, Disabled and Focused states. +.. rst-class:: classref-introduction-group + Description ----------- -``TextureButton`` has the same functionality as :ref:`Button`, except it uses sprites instead of Godot's :ref:`Theme` resource. It is faster to create, but it doesn't support localization like more complex :ref:`Control`\ s. +**TextureButton** has the same functionality as :ref:`Button`, except it uses sprites instead of Godot's :ref:`Theme` resource. It is faster to create, but it doesn't support localization like more complex :ref:`Control`\ s. The "normal" state must contain a texture (:ref:`texture_normal`); other textures are optional. See also :ref:`BaseButton` which contains common properties and methods associated with this node. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`flip_h` | ``false`` | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`flip_v` | ``false`` | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`ignore_texture_size` | ``false`` | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`StretchMode` | :ref:`stretch_mode` | ``2`` | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`BitMap` | :ref:`texture_click_mask` | | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`texture_disabled` | | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`texture_focused` | | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`texture_hover` | | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`texture_normal` | | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`texture_pressed` | | -+----------------------------------------------------+------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`flip_h` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`flip_v` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`ignore_texture_size` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`StretchMode` | :ref:`stretch_mode` | ``2`` | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`BitMap` | :ref:`texture_click_mask` | | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`texture_disabled` | | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`texture_focused` | | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`texture_hover` | | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`texture_normal` | | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`texture_pressed` | | + +----------------------------------------------------+------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_TextureButton_StretchMode: -.. _class_TextureButton_constant_STRETCH_SCALE: - -.. _class_TextureButton_constant_STRETCH_TILE: - -.. _class_TextureButton_constant_STRETCH_KEEP: - -.. _class_TextureButton_constant_STRETCH_KEEP_CENTERED: - -.. _class_TextureButton_constant_STRETCH_KEEP_ASPECT: - -.. _class_TextureButton_constant_STRETCH_KEEP_ASPECT_CENTERED: - -.. _class_TextureButton_constant_STRETCH_KEEP_ASPECT_COVERED: +.. rst-class:: classref-enumeration enum **StretchMode**: -- **STRETCH_SCALE** = **0** --- Scale to fit the node's bounding rectangle. +.. _class_TextureButton_constant_STRETCH_SCALE: -- **STRETCH_TILE** = **1** --- Tile inside the node's bounding rectangle. +.. rst-class:: classref-enumeration-constant -- **STRETCH_KEEP** = **2** --- The texture keeps its original size and stays in the bounding rectangle's top-left corner. +:ref:`StretchMode` **STRETCH_SCALE** = ``0`` -- **STRETCH_KEEP_CENTERED** = **3** --- The texture keeps its original size and stays centered in the node's bounding rectangle. +Scale to fit the node's bounding rectangle. -- **STRETCH_KEEP_ASPECT** = **4** --- Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. +.. _class_TextureButton_constant_STRETCH_TILE: -- **STRETCH_KEEP_ASPECT_CENTERED** = **5** --- Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio. +.. rst-class:: classref-enumeration-constant -- **STRETCH_KEEP_ASPECT_COVERED** = **6** --- Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. +:ref:`StretchMode` **STRETCH_TILE** = ``1`` + +Tile inside the node's bounding rectangle. + +.. _class_TextureButton_constant_STRETCH_KEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP** = ``2`` + +The texture keeps its original size and stays in the bounding rectangle's top-left corner. + +.. _class_TextureButton_constant_STRETCH_KEEP_CENTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_CENTERED** = ``3`` + +The texture keeps its original size and stays centered in the node's bounding rectangle. + +.. _class_TextureButton_constant_STRETCH_KEEP_ASPECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_ASPECT** = ``4`` + +Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. + +.. _class_TextureButton_constant_STRETCH_KEEP_ASPECT_CENTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_ASPECT_CENTERED** = ``5`` + +Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio. + +.. _class_TextureButton_constant_STRETCH_KEEP_ASPECT_COVERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_ASPECT_COVERED** = ``6`` + +Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextureButton_property_flip_h: -- :ref:`bool` **flip_h** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_h(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_h() | -+-----------+-------------------+ +:ref:`bool` **flip_h** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_h** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_h** **(** **)** If ``true``, texture is flipped horizontally. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_flip_v: -- :ref:`bool` **flip_v** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_v(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_v() | -+-----------+-------------------+ +:ref:`bool` **flip_v** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_v** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_v** **(** **)** If ``true``, texture is flipped vertically. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_ignore_texture_size: -- :ref:`bool` **ignore_texture_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_ignore_texture_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_ignore_texture_size() | -+-----------+--------------------------------+ +:ref:`bool` **ignore_texture_size** = ``false`` -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. +.. rst-class:: classref-property-setget + +- void **set_ignore_texture_size** **(** :ref:`bool` value **)** +- :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_TextureButton_property_stretch_mode: -- :ref:`StretchMode` **stretch_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``2`` | -+-----------+-------------------------+ -| *Setter* | set_stretch_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_stretch_mode() | -+-----------+-------------------------+ +:ref:`StretchMode` **stretch_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_mode** **(** :ref:`StretchMode` value **)** +- :ref:`StretchMode` **get_stretch_mode** **(** **)** Controls the texture's behavior when you resize the node's bounding rectangle. See the :ref:`StretchMode` constants for available options. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_texture_click_mask: -- :ref:`BitMap` **texture_click_mask** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_click_mask(value) | -+----------+-----------------------+ -| *Getter* | get_click_mask() | -+----------+-----------------------+ +:ref:`BitMap` **texture_click_mask** + +.. rst-class:: classref-property-setget + +- void **set_click_mask** **(** :ref:`BitMap` value **)** +- :ref:`BitMap` **get_click_mask** **(** **)** Pure black and white :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_texture_disabled: -- :ref:`Texture2D` **texture_disabled** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_disabled_texture(value) | -+----------+-----------------------------+ -| *Getter* | get_disabled_texture() | -+----------+-----------------------------+ +:ref:`Texture2D` **texture_disabled** + +.. rst-class:: classref-property-setget + +- void **set_texture_disabled** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture_disabled** **(** **)** Texture to display when the node is disabled. See :ref:`BaseButton.disabled`. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_texture_focused: -- :ref:`Texture2D` **texture_focused** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_focused_texture(value) | -+----------+----------------------------+ -| *Getter* | get_focused_texture() | -+----------+----------------------------+ +:ref:`Texture2D` **texture_focused** + +.. rst-class:: classref-property-setget + +- void **set_texture_focused** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture_focused** **(** **)** Texture to display when the node has mouse or keyboard focus. :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_texture_hover: -- :ref:`Texture2D` **texture_hover** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_hover_texture(value) | -+----------+--------------------------+ -| *Getter* | get_hover_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **texture_hover** + +.. rst-class:: classref-property-setget + +- void **set_texture_hover** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture_hover** **(** **)** Texture to display when the mouse hovers the node. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_texture_normal: -- :ref:`Texture2D` **texture_normal** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_normal_texture(value) | -+----------+---------------------------+ -| *Getter* | get_normal_texture() | -+----------+---------------------------+ +:ref:`Texture2D` **texture_normal** + +.. rst-class:: classref-property-setget + +- void **set_texture_normal** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture_normal** **(** **)** Texture to display by default, when the node is **not** in the disabled, focused, hover or pressed state. +.. rst-class:: classref-item-separator + ---- .. _class_TextureButton_property_texture_pressed: -- :ref:`Texture2D` **texture_pressed** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_pressed_texture(value) | -+----------+----------------------------+ -| *Getter* | get_pressed_texture() | -+----------+----------------------------+ +:ref:`Texture2D` **texture_pressed** + +.. rst-class:: classref-property-setget + +- void **set_texture_pressed** **(** :ref:`Texture2D` value **)** +- :ref:`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` key. diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 2de43d355..c86cff274 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -16,6 +16,8 @@ TextureLayered Base class for texture types which contain the data of multiple :ref:`Image`\ s. Each image is of the same size and format. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,172 +27,257 @@ Data is set on a per-layer basis. For :ref:`Texture2DArray All images need to have the same width, height and number of mipmap levels. -A ``TextureLayered`` can be loaded with :ref:`ResourceLoader.load`. +A **TextureLayered** can be loaded with :ref:`ResourceLoader.load`. Internally, Godot maps these files to their respective counterparts in the target rendering driver (Vulkan, GLES3). +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`_get_layer_data` **(** :ref:`int` layer_index **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_layered_type` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_layers` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Format` | :ref:`get_format` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_height` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_layer_data` **(** :ref:`int` layer **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`LayeredType` | :ref:`get_layered_type` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_layers` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_width` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`_get_layer_data` **(** :ref:`int` layer_index **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_layered_type` **(** **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_layers` **(** **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_height` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_layer_data` **(** :ref:`int` layer **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LayeredType` | :ref:`get_layered_type` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_layers` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_width` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_TextureLayered_LayeredType: -.. _class_TextureLayered_constant_LAYERED_TYPE_2D_ARRAY: - -.. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP: - -.. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP_ARRAY: +.. rst-class:: classref-enumeration enum **LayeredType**: -- **LAYERED_TYPE_2D_ARRAY** = **0** --- Texture is a generic :ref:`Texture2DArray`. +.. _class_TextureLayered_constant_LAYERED_TYPE_2D_ARRAY: -- **LAYERED_TYPE_CUBEMAP** = **1** --- Texture is a :ref:`Cubemap`, with each side in its own layer (6 in total). +.. rst-class:: classref-enumeration-constant -- **LAYERED_TYPE_CUBEMAP_ARRAY** = **2** --- Texture is a :ref:`CubemapArray`, with each cubemap being made of 6 layers. +:ref:`LayeredType` **LAYERED_TYPE_2D_ARRAY** = ``0`` + +Texture is a generic :ref:`Texture2DArray`. + +.. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayeredType` **LAYERED_TYPE_CUBEMAP** = ``1`` + +Texture is a :ref:`Cubemap`, with each side in its own layer (6 in total). + +.. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayeredType` **LAYERED_TYPE_CUBEMAP_ARRAY** = ``2`` + +Texture is a :ref:`CubemapArray`, with each cubemap being made of 6 layers. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TextureLayered_method__get_format: -- :ref:`Format` **_get_format** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``TextureLayered``'s format is queried. +:ref:`Format` **_get_format** **(** **)** |virtual| |const| + +Called when the **TextureLayered**'s format is queried. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method__get_height: -- :ref:`int` **_get_height** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the the ``TextureLayered``'s height is queried. +:ref:`int` **_get_height** **(** **)** |virtual| |const| + +Called when the the **TextureLayered**'s height is queried. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method__get_layer_data: -- :ref:`Image` **_get_layer_data** **(** :ref:`int` layer_index **)** |virtual| |const| +.. rst-class:: classref-method -Called when the data for a layer in the ``TextureLayered`` is queried. +:ref:`Image` **_get_layer_data** **(** :ref:`int` layer_index **)** |virtual| |const| + +Called when the data for a layer in the **TextureLayered** is queried. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method__get_layered_type: -- :ref:`int` **_get_layered_type** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the layers' type in the ``TextureLayered`` is queried. +:ref:`int` **_get_layered_type** **(** **)** |virtual| |const| + +Called when the layers' type in the **TextureLayered** is queried. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method__get_layers: -- :ref:`int` **_get_layers** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the number of layers in the ``TextureLayered`` is queried. +:ref:`int` **_get_layers** **(** **)** |virtual| |const| + +Called when the number of layers in the **TextureLayered** is queried. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method__get_width: -- :ref:`int` **_get_width** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the ``TextureLayered``'s width queried. +:ref:`int` **_get_width** **(** **)** |virtual| |const| + +Called when the **TextureLayered**'s width queried. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method__has_mipmaps: -- :ref:`bool` **_has_mipmaps** **(** **)** |virtual| |const| +.. rst-class:: classref-method -Called when the presence of mipmaps in the ``TextureLayered`` is queried. +:ref:`bool` **_has_mipmaps** **(** **)** |virtual| |const| + +Called when the presence of mipmaps in the **TextureLayered** is queried. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method_get_format: -- :ref:`Format` **get_format** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Format` **get_format** **(** **)** |const| Returns the current format being used by this texture. See :ref:`Format` for details. +.. rst-class:: classref-item-separator + ---- .. _class_TextureLayered_method_get_height: -- :ref:`int` **get_height** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_height** **(** **)** |const| Returns the height of the texture in pixels. Height is typically represented by the Y axis. +.. rst-class:: classref-item-separator + ---- .. _class_TextureLayered_method_get_layer_data: -- :ref:`Image` **get_layer_data** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`Image` **get_layer_data** **(** :ref:`int` layer **)** |const| Returns an :ref:`Image` resource with the data from specified ``layer``. +.. rst-class:: classref-item-separator + ---- .. _class_TextureLayered_method_get_layered_type: -- :ref:`LayeredType` **get_layered_type** **(** **)** |const| +.. rst-class:: classref-method -Returns the ``TextureLayered``'s type. The type determines how the data is accessed, with cubemaps having special types. +:ref:`LayeredType` **get_layered_type** **(** **)** |const| + +Returns the **TextureLayered**'s type. The type determines how the data is accessed, with cubemaps having special types. + +.. rst-class:: classref-item-separator ---- .. _class_TextureLayered_method_get_layers: -- :ref:`int` **get_layers** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_layers** **(** **)** |const| Returns the number of referenced :ref:`Image`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_TextureLayered_method_get_width: -- :ref:`int` **get_width** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_width** **(** **)** |const| Returns the width of the texture in pixels. Width is typically represented by the X axis. +.. rst-class:: classref-item-separator + ---- .. _class_TextureLayered_method_has_mipmaps: -- :ref:`bool` **has_mipmaps** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_mipmaps** **(** **)** |const| Returns ``true`` if the layers have generated mipmaps. diff --git a/classes/class_textureprogressbar.rst b/classes/class_textureprogressbar.rst index fa0fd0064..5554d3f5d 100644 --- a/classes/class_textureprogressbar.rst +++ b/classes/class_textureprogressbar.rst @@ -14,381 +14,471 @@ TextureProgressBar Texture-based progress bar. Useful for loading screens and life or stamina bars. +.. rst-class:: classref-introduction-group + Description ----------- TextureProgressBar works like :ref:`ProgressBar`, but uses up to 3 textures instead of Godot's :ref:`Theme` resource. It can be used to create horizontal, vertical and radial progress bars. +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`fill_mode` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``1`` (overrides :ref:`Control`) | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`nine_patch_stretch` | ``false`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`radial_center_offset` | ``Vector2(0, 0)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`radial_fill_degrees` | ``360.0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`radial_initial_angle` | ``0.0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_bottom` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_left` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_right` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_top` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture_over` | | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture_progress` | | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`texture_progress_offset` | ``Vector2(0, 0)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture_under` | | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`tint_over` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`tint_progress` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`tint_under` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`fill_mode` | ``0`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``1`` (overrides :ref:`Control`) | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`nine_patch_stretch` | ``false`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`radial_center_offset` | ``Vector2(0, 0)`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`radial_fill_degrees` | ``360.0`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`radial_initial_angle` | ``0.0`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`stretch_margin_bottom` | ``0`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`stretch_margin_left` | ``0`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`stretch_margin_right` | ``0`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`stretch_margin_top` | ``0`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture_over` | | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture_progress` | | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`texture_progress_offset` | ``Vector2(0, 0)`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture_under` | | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`tint_over` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`tint_progress` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`tint_under` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_stretch_margin` **(** :ref:`Side` margin **)** |const| | -+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stretch_margin` **(** :ref:`Side` margin, :ref:`int` value **)** | -+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_stretch_margin` **(** :ref:`Side` margin **)** |const| | + +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_stretch_margin` **(** :ref:`Side` margin, :ref:`int` value **)** | + +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_TextureProgressBar_FillMode: -.. _class_TextureProgressBar_constant_FILL_LEFT_TO_RIGHT: - -.. _class_TextureProgressBar_constant_FILL_RIGHT_TO_LEFT: - -.. _class_TextureProgressBar_constant_FILL_TOP_TO_BOTTOM: - -.. _class_TextureProgressBar_constant_FILL_BOTTOM_TO_TOP: - -.. _class_TextureProgressBar_constant_FILL_CLOCKWISE: - -.. _class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE: - -.. _class_TextureProgressBar_constant_FILL_BILINEAR_LEFT_AND_RIGHT: - -.. _class_TextureProgressBar_constant_FILL_BILINEAR_TOP_AND_BOTTOM: - -.. _class_TextureProgressBar_constant_FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE: +.. rst-class:: classref-enumeration enum **FillMode**: -- **FILL_LEFT_TO_RIGHT** = **0** --- The :ref:`texture_progress` fills from left to right. +.. _class_TextureProgressBar_constant_FILL_LEFT_TO_RIGHT: -- **FILL_RIGHT_TO_LEFT** = **1** --- The :ref:`texture_progress` fills from right to left. +.. rst-class:: classref-enumeration-constant -- **FILL_TOP_TO_BOTTOM** = **2** --- The :ref:`texture_progress` fills from top to bottom. +:ref:`FillMode` **FILL_LEFT_TO_RIGHT** = ``0`` -- **FILL_BOTTOM_TO_TOP** = **3** --- The :ref:`texture_progress` fills from bottom to top. +The :ref:`texture_progress` fills from left to right. -- **FILL_CLOCKWISE** = **4** --- Turns the node into a radial bar. The :ref:`texture_progress` fills clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. +.. _class_TextureProgressBar_constant_FILL_RIGHT_TO_LEFT: -- **FILL_COUNTER_CLOCKWISE** = **5** --- Turns the node into a radial bar. The :ref:`texture_progress` fills counterclockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. +.. rst-class:: classref-enumeration-constant -- **FILL_BILINEAR_LEFT_AND_RIGHT** = **6** --- The :ref:`texture_progress` fills from the center, expanding both towards the left and the right. +:ref:`FillMode` **FILL_RIGHT_TO_LEFT** = ``1`` -- **FILL_BILINEAR_TOP_AND_BOTTOM** = **7** --- The :ref:`texture_progress` fills from the center, expanding both towards the top and the bottom. +The :ref:`texture_progress` fills from right to left. -- **FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE** = **8** --- Turns the node into a radial bar. The :ref:`texture_progress` fills radially from the center, expanding both clockwise and counterclockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. +.. _class_TextureProgressBar_constant_FILL_TOP_TO_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_TOP_TO_BOTTOM** = ``2`` + +The :ref:`texture_progress` fills from top to bottom. + +.. _class_TextureProgressBar_constant_FILL_BOTTOM_TO_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_BOTTOM_TO_TOP** = ``3`` + +The :ref:`texture_progress` fills from bottom to top. + +.. _class_TextureProgressBar_constant_FILL_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_CLOCKWISE** = ``4`` + +Turns the node into a radial bar. The :ref:`texture_progress` fills clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. + +.. _class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_COUNTER_CLOCKWISE** = ``5`` + +Turns the node into a radial bar. The :ref:`texture_progress` fills counterclockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. + +.. _class_TextureProgressBar_constant_FILL_BILINEAR_LEFT_AND_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_BILINEAR_LEFT_AND_RIGHT** = ``6`` + +The :ref:`texture_progress` fills from the center, expanding both towards the left and the right. + +.. _class_TextureProgressBar_constant_FILL_BILINEAR_TOP_AND_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_BILINEAR_TOP_AND_BOTTOM** = ``7`` + +The :ref:`texture_progress` fills from the center, expanding both towards the top and the bottom. + +.. _class_TextureProgressBar_constant_FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FillMode` **FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE** = ``8`` + +Turns the node into a radial bar. The :ref:`texture_progress` fills radially from the center, expanding both clockwise and counterclockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextureProgressBar_property_fill_mode: -- :ref:`int` **fill_mode** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_fill_mode(value) | -+-----------+----------------------+ -| *Getter* | get_fill_mode() | -+-----------+----------------------+ +:ref:`int` **fill_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fill_mode** **(** :ref:`int` value **)** +- :ref:`int` **get_fill_mode** **(** **)** The fill direction. See :ref:`FillMode` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_nine_patch_stretch: -- :ref:`bool` **nine_patch_stretch** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_nine_patch_stretch(value) | -+-----------+-------------------------------+ -| *Getter* | get_nine_patch_stretch() | -+-----------+-------------------------------+ +:ref:`bool` **nine_patch_stretch** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_nine_patch_stretch** **(** :ref:`bool` value **)** +- :ref:`bool` **get_nine_patch_stretch** **(** **)** If ``true``, Godot treats the bar's textures like in :ref:`NinePatchRect`. Use the ``stretch_margin_*`` properties like :ref:`stretch_margin_bottom` to set up the nine patch's 3×3 grid. When using a radial :ref:`fill_mode`, this setting will enable stretching. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_radial_center_offset: -- :ref:`Vector2` **radial_center_offset** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------------------+ -| *Setter* | set_radial_center_offset(value) | -+-----------+---------------------------------+ -| *Getter* | get_radial_center_offset() | -+-----------+---------------------------------+ +:ref:`Vector2` **radial_center_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_radial_center_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_radial_center_offset** **(** **)** Offsets :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_radial_fill_degrees: -- :ref:`float` **radial_fill_degrees** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``360.0`` | -+-----------+-------------------------+ -| *Setter* | set_fill_degrees(value) | -+-----------+-------------------------+ -| *Getter* | get_fill_degrees() | -+-----------+-------------------------+ +:ref:`float` **radial_fill_degrees** = ``360.0`` + +.. rst-class:: classref-property-setget + +- void **set_fill_degrees** **(** :ref:`float` value **)** +- :ref:`float` **get_fill_degrees** **(** **)** Upper limit for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. See :ref:`Range.value`, :ref:`Range.max_value`. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_radial_initial_angle: -- :ref:`float` **radial_initial_angle** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_radial_initial_angle(value) | -+-----------+---------------------------------+ -| *Getter* | get_radial_initial_angle() | -+-----------+---------------------------------+ +:ref:`float` **radial_initial_angle** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_radial_initial_angle** **(** :ref:`float` value **)** +- :ref:`float` **get_radial_initial_angle** **(** **)** Starting angle for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`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`. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_stretch_margin_bottom: -- :ref:`int` **stretch_margin_bottom** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_stretch_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_stretch_margin() | -+-----------+---------------------------+ +:ref:`int` **stretch_margin_bottom** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |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. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_stretch_margin_left: -- :ref:`int` **stretch_margin_left** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_stretch_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_stretch_margin() | -+-----------+---------------------------+ +:ref:`int` **stretch_margin_left** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| The width of the 9-patch's left column. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_stretch_margin_right: -- :ref:`int` **stretch_margin_right** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_stretch_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_stretch_margin() | -+-----------+---------------------------+ +:ref:`int` **stretch_margin_right** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| The width of the 9-patch's right column. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_stretch_margin_top: -- :ref:`int` **stretch_margin_top** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_stretch_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_stretch_margin() | -+-----------+---------------------------+ +:ref:`int` **stretch_margin_top** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +- :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| The height of the 9-patch's top row. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_texture_over: -- :ref:`Texture2D` **texture_over** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_over_texture(value) | -+----------+-------------------------+ -| *Getter* | get_over_texture() | -+----------+-------------------------+ +:ref:`Texture2D` **texture_over** + +.. rst-class:: classref-property-setget + +- void **set_over_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_over_texture** **(** **)** :ref:`Texture2D` that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of :ref:`texture_progress`. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_texture_progress: -- :ref:`Texture2D` **texture_progress** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_progress_texture(value) | -+----------+-----------------------------+ -| *Getter* | get_progress_texture() | -+----------+-----------------------------+ +:ref:`Texture2D` **texture_progress** + +.. rst-class:: classref-property-setget + +- void **set_progress_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_progress_texture** **(** **)** :ref:`Texture2D` that clips based on the node's ``value`` and :ref:`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``. The ``value`` property comes from :ref:`Range`. See :ref:`Range.value`, :ref:`Range.min_value`, :ref:`Range.max_value`. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_texture_progress_offset: -- :ref:`Vector2` **texture_progress_offset** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+------------------------------------+ -| *Setter* | set_texture_progress_offset(value) | -+-----------+------------------------------------+ -| *Getter* | get_texture_progress_offset() | -+-----------+------------------------------------+ +:ref:`Vector2` **texture_progress_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_texture_progress_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_texture_progress_offset** **(** **)** The offset of :ref:`texture_progress`. Useful for :ref:`texture_over` and :ref:`texture_under` with fancy borders, to avoid transparent margins in your progress texture. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_texture_under: -- :ref:`Texture2D` **texture_under** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_under_texture(value) | -+----------+--------------------------+ -| *Getter* | get_under_texture() | -+----------+--------------------------+ +:ref:`Texture2D` **texture_under** + +.. rst-class:: classref-property-setget + +- void **set_under_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_under_texture** **(** **)** :ref:`Texture2D` that draws under the progress bar. The bar's background. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_tint_over: -- :ref:`Color` **tint_over** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_tint_over(value) | -+-----------+-----------------------+ -| *Getter* | get_tint_over() | -+-----------+-----------------------+ +:ref:`Color` **tint_over** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_tint_over** **(** :ref:`Color` value **)** +- :ref:`Color` **get_tint_over** **(** **)** Multiplies the color of the bar's ``texture_over`` texture. The effect is similar to :ref:`CanvasItem.modulate`, except it only affects this specific texture instead of the entire node. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_tint_progress: -- :ref:`Color` **tint_progress** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_tint_progress(value) | -+-----------+--------------------------+ -| *Getter* | get_tint_progress() | -+-----------+--------------------------+ +:ref:`Color` **tint_progress** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_tint_progress** **(** :ref:`Color` value **)** +- :ref:`Color` **get_tint_progress** **(** **)** Multiplies the color of the bar's ``texture_progress`` texture. +.. rst-class:: classref-item-separator + ---- .. _class_TextureProgressBar_property_tint_under: -- :ref:`Color` **tint_under** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_tint_under(value) | -+-----------+-----------------------+ -| *Getter* | get_tint_under() | -+-----------+-----------------------+ +:ref:`Color` **tint_under** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_tint_under** **(** :ref:`Color` value **)** +- :ref:`Color` **get_tint_under** **(** **)** Multiplies the color of the bar's ``texture_under`` texture. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TextureProgressBar_method_get_stretch_margin: -- :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the stretch margin with the specified index. See :ref:`stretch_margin_bottom` and related properties. + +.. rst-class:: classref-item-separator ---- .. _class_TextureProgressBar_method_set_stretch_margin: -- void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** +.. rst-class:: classref-method -.. container:: contribute +void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the stretch margin with the specified index. See :ref:`stretch_margin_bottom` and related 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.)` diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index ec57affa5..5d48638ee 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -14,144 +14,200 @@ TextureRect Control for drawing textures. +.. rst-class:: classref-introduction-group + Description ----------- Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the :ref:`stretch_mode` property. It can scale, tile, or stay centered inside its bounding rectangle. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`flip_h` | ``false`` | -+--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`flip_v` | ``false`` | -+--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`ignore_texture_size` | ``false`` | -+--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``1`` (overrides :ref:`Control`) | -+--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`StretchMode` | :ref:`stretch_mode` | ``0`` | -+--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`flip_h` | ``false`` | + +--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`flip_v` | ``false`` | + +--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ignore_texture_size` | ``false`` | + +--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``1`` (overrides :ref:`Control`) | + +--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`StretchMode` | :ref:`stretch_mode` | ``0`` | + +--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +--------------------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_TextureRect_StretchMode: -.. _class_TextureRect_constant_STRETCH_SCALE: - -.. _class_TextureRect_constant_STRETCH_TILE: - -.. _class_TextureRect_constant_STRETCH_KEEP: - -.. _class_TextureRect_constant_STRETCH_KEEP_CENTERED: - -.. _class_TextureRect_constant_STRETCH_KEEP_ASPECT: - -.. _class_TextureRect_constant_STRETCH_KEEP_ASPECT_CENTERED: - -.. _class_TextureRect_constant_STRETCH_KEEP_ASPECT_COVERED: +.. rst-class:: classref-enumeration enum **StretchMode**: -- **STRETCH_SCALE** = **0** --- Scale to fit the node's bounding rectangle. +.. _class_TextureRect_constant_STRETCH_SCALE: -- **STRETCH_TILE** = **1** --- Tile inside the node's bounding rectangle. +.. rst-class:: classref-enumeration-constant -- **STRETCH_KEEP** = **2** --- The texture keeps its original size and stays in the bounding rectangle's top-left corner. +:ref:`StretchMode` **STRETCH_SCALE** = ``0`` -- **STRETCH_KEEP_CENTERED** = **3** --- The texture keeps its original size and stays centered in the node's bounding rectangle. +Scale to fit the node's bounding rectangle. -- **STRETCH_KEEP_ASPECT** = **4** --- Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. +.. _class_TextureRect_constant_STRETCH_TILE: -- **STRETCH_KEEP_ASPECT_CENTERED** = **5** --- Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio. +.. rst-class:: classref-enumeration-constant -- **STRETCH_KEEP_ASPECT_COVERED** = **6** --- Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. +:ref:`StretchMode` **STRETCH_TILE** = ``1`` + +Tile inside the node's bounding rectangle. + +.. _class_TextureRect_constant_STRETCH_KEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP** = ``2`` + +The texture keeps its original size and stays in the bounding rectangle's top-left corner. + +.. _class_TextureRect_constant_STRETCH_KEEP_CENTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_CENTERED** = ``3`` + +The texture keeps its original size and stays centered in the node's bounding rectangle. + +.. _class_TextureRect_constant_STRETCH_KEEP_ASPECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_ASPECT** = ``4`` + +Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. + +.. _class_TextureRect_constant_STRETCH_KEEP_ASPECT_CENTERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_ASPECT_CENTERED** = ``5`` + +Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio. + +.. _class_TextureRect_constant_STRETCH_KEEP_ASPECT_COVERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StretchMode` **STRETCH_KEEP_ASPECT_COVERED** = ``6`` + +Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TextureRect_property_flip_h: -- :ref:`bool` **flip_h** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_h(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_h() | -+-----------+-------------------+ +:ref:`bool` **flip_h** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_h** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_h** **(** **)** If ``true``, texture is flipped horizontally. +.. rst-class:: classref-item-separator + ---- .. _class_TextureRect_property_flip_v: -- :ref:`bool` **flip_v** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_v(value) | -+-----------+-------------------+ -| *Getter* | is_flipped_v() | -+-----------+-------------------+ +:ref:`bool` **flip_v** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flip_v** **(** :ref:`bool` value **)** +- :ref:`bool` **is_flipped_v** **(** **)** If ``true``, texture is flipped vertically. +.. rst-class:: classref-item-separator + ---- .. _class_TextureRect_property_ignore_texture_size: -- :ref:`bool` **ignore_texture_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------------+ -| *Setter* | set_ignore_texture_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_ignore_texture_size() | -+-----------+--------------------------------+ +:ref:`bool` **ignore_texture_size** = ``false`` -If ``true``, the size of the texture won't be considered for minimum size calculation, so the ``TextureRect`` can be shrunk down past the texture size. Useful for preventing ``TextureRect``\ s from breaking GUI layout regardless of their texture size. +.. rst-class:: classref-property-setget + +- void **set_ignore_texture_size** **(** :ref:`bool` value **)** +- :ref:`bool` **get_ignore_texture_size** **(** **)** + +If ``true``, the size of the texture won't be considered for minimum size calculation, so the **TextureRect** can be shrunk down past the texture size. Useful for preventing **TextureRect**\ s from breaking GUI layout regardless of their texture size. + +.. rst-class:: classref-item-separator ---- .. _class_TextureRect_property_stretch_mode: -- :ref:`StretchMode` **stretch_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_stretch_mode(value) | -+-----------+-------------------------+ -| *Getter* | get_stretch_mode() | -+-----------+-------------------------+ +:ref:`StretchMode` **stretch_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_stretch_mode** **(** :ref:`StretchMode` value **)** +- :ref:`StretchMode` **get_stretch_mode** **(** **)** Controls the texture's behavior when resizing the node's bounding rectangle. See :ref:`StretchMode`. +.. rst-class:: classref-item-separator + ---- .. _class_TextureRect_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The node's :ref:`Texture2D` resource. diff --git a/classes/class_theme.rst b/classes/class_theme.rst index a66a646fc..e67084ecf 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -14,6 +14,8 @@ Theme Theme resource for styling/skinning :ref:`Control`\ s and :ref:`Window`\ s. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ Use :ref:`ProjectSettings.gui/theme/custom` of any control node to set up a theme that will be available to that control and all of its direct and indirect children. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,318 +34,413 @@ Tutorials - :doc:`Using the theme editor <../tutorials/ui/gui_using_theme_editor>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`default_base_scale` | ``0.0`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`Font` | :ref:`default_font` | | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`default_font_size` | ``-1`` | -+---------------------------+--------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`default_base_scale` | ``0.0`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`Font` | :ref:`default_font` | | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`default_font_size` | ``-1`` | + +---------------------------+--------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_type` **(** :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_type_variation` **(** :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_color_list` **(** :ref:`String` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_color_type_list` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_constant_list` **(** :ref:`String` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_constant_type_list` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Font` | :ref:`get_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_font_list` **(** :ref:`String` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_font_size_list` **(** :ref:`String` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_font_size_type_list` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_font_type_list` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_icon_list` **(** :ref:`String` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_icon_type_list` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`get_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_stylebox_list` **(** :ref:`String` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_stylebox_type_list` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_theme_item_list` **(** :ref:`DataType` data_type, :ref:`String` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_theme_item_type_list` **(** :ref:`DataType` data_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_type_list` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_type_variation_base` **(** :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_type_variation_list` **(** :ref:`StringName` base_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_default_base_scale` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_default_font` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_default_font_size` **(** **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_type_variation` **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** |const| | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`merge_with` **(** :ref:`Theme` other **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_type` **(** :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_color` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_constant` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_font` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_font_size` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_icon` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_stylebox` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Color` color **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` constant **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Font` font **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` font_size **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Texture2D` texture **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`StyleBox` texture **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Variant` value **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_type_variation` **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** | -+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_type` **(** :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_type_variation` **(** :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_color_list` **(** :ref:`String` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_color_type_list` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_constant_list` **(** :ref:`String` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_constant_type_list` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_font_list` **(** :ref:`String` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_font_size_list` **(** :ref:`String` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_font_size_type_list` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_font_type_list` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_icon_list` **(** :ref:`String` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_icon_type_list` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`get_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_stylebox_list` **(** :ref:`String` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_stylebox_type_list` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_theme_item_list` **(** :ref:`DataType` data_type, :ref:`String` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_theme_item_type_list` **(** :ref:`DataType` data_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_type_list` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_type_variation_base` **(** :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_type_variation_list` **(** :ref:`StringName` base_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_default_base_scale` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_default_font` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_default_font_size` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_type_variation` **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`merge_with` **(** :ref:`Theme` other **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_type` **(** :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_color` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_constant` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_font` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_font_size` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_icon` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_stylebox` **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Color` color **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` constant **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Font` font **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` font_size **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Texture2D` texture **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`StyleBox` texture **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_theme_item` **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Variant` value **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_type_variation` **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Theme_DataType: -.. _class_Theme_constant_DATA_TYPE_COLOR: - -.. _class_Theme_constant_DATA_TYPE_CONSTANT: - -.. _class_Theme_constant_DATA_TYPE_FONT: - -.. _class_Theme_constant_DATA_TYPE_FONT_SIZE: - -.. _class_Theme_constant_DATA_TYPE_ICON: - -.. _class_Theme_constant_DATA_TYPE_STYLEBOX: - -.. _class_Theme_constant_DATA_TYPE_MAX: +.. rst-class:: classref-enumeration enum **DataType**: -- **DATA_TYPE_COLOR** = **0** --- Theme's :ref:`Color` item type. +.. _class_Theme_constant_DATA_TYPE_COLOR: -- **DATA_TYPE_CONSTANT** = **1** --- Theme's constant item type. +.. rst-class:: classref-enumeration-constant -- **DATA_TYPE_FONT** = **2** --- Theme's :ref:`Font` item type. +:ref:`DataType` **DATA_TYPE_COLOR** = ``0`` -- **DATA_TYPE_FONT_SIZE** = **3** --- Theme's font size item type. +Theme's :ref:`Color` item type. -- **DATA_TYPE_ICON** = **4** --- Theme's icon :ref:`Texture2D` item type. +.. _class_Theme_constant_DATA_TYPE_CONSTANT: -- **DATA_TYPE_STYLEBOX** = **5** --- Theme's :ref:`StyleBox` item type. +.. rst-class:: classref-enumeration-constant -- **DATA_TYPE_MAX** = **6** --- Maximum value for the DataType enum. +:ref:`DataType` **DATA_TYPE_CONSTANT** = ``1`` + +Theme's constant item type. + +.. _class_Theme_constant_DATA_TYPE_FONT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataType` **DATA_TYPE_FONT** = ``2`` + +Theme's :ref:`Font` item type. + +.. _class_Theme_constant_DATA_TYPE_FONT_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataType` **DATA_TYPE_FONT_SIZE** = ``3`` + +Theme's font size item type. + +.. _class_Theme_constant_DATA_TYPE_ICON: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataType` **DATA_TYPE_ICON** = ``4`` + +Theme's icon :ref:`Texture2D` item type. + +.. _class_Theme_constant_DATA_TYPE_STYLEBOX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataType` **DATA_TYPE_STYLEBOX** = ``5`` + +Theme's :ref:`StyleBox` item type. + +.. _class_Theme_constant_DATA_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DataType` **DATA_TYPE_MAX** = ``6`` + +Maximum value for the DataType enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Theme_property_default_base_scale: -- :ref:`float` **default_base_scale** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------------+ -| *Setter* | set_default_base_scale(value) | -+-----------+-------------------------------+ -| *Getter* | get_default_base_scale() | -+-----------+-------------------------------+ +:ref:`float` **default_base_scale** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_default_base_scale** **(** :ref:`float` value **)** +- :ref:`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`). Use :ref:`has_default_base_scale` to check if this value is valid. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_property_default_font: -- :ref:`Font` **default_font** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_default_font(value) | -+----------+-------------------------+ -| *Getter* | get_default_font() | -+----------+-------------------------+ +:ref:`Font` **default_font** + +.. rst-class:: classref-property-setget + +- void **set_default_font** **(** :ref:`Font` value **)** +- :ref:`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`). Use :ref:`has_default_font` to check if this value is valid. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_property_default_font_size: -- :ref:`int` **default_font_size** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------------+ -| *Setter* | set_default_font_size(value) | -+-----------+------------------------------+ -| *Getter* | get_default_font_size() | -+-----------+------------------------------+ +:ref:`int` **default_font_size** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_default_font_size** **(** :ref:`int` value **)** +- :ref:`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`). Values below ``0`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size` to check if this value is valid. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Theme_method_add_type: -- void **add_type** **(** :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **add_type** **(** :ref:`StringName` theme_type **)** Adds an empty theme type for every valid data type. \ **Note:** Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available ``set_*`` methods to add theme items. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Removes all the theme properties defined on the theme resource. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear_color: -- void **clear_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **clear_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** Removes the :ref:`Color` property defined by ``name`` and ``theme_type``, if it exists. Fails if it doesn't exist. Use :ref:`has_color` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear_constant: -- void **clear_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **clear_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** Removes the constant property defined by ``name`` and ``theme_type``, if it exists. Fails if it doesn't exist. Use :ref:`has_constant` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear_font: -- void **clear_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **clear_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** Removes the :ref:`Font` property defined by ``name`` and ``theme_type``, if it exists. Fails if it doesn't exist. Use :ref:`has_font` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear_font_size: -- void **clear_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **clear_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** Removes the font size property defined by ``name`` and ``theme_type``, if it exists. Fails if it doesn't exist. Use :ref:`has_font_size` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear_icon: -- void **clear_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **clear_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** Removes the icon property defined by ``name`` and ``theme_type``, if it exists. Fails if it doesn't exist. Use :ref:`has_icon` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear_stylebox: -- void **clear_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **clear_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** Removes the :ref:`StyleBox` property defined by ``name`` and ``theme_type``, if it exists. Fails if it doesn't exist. Use :ref:`has_stylebox` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_clear_theme_item: -- void **clear_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **clear_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** Removes the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists. @@ -349,71 +448,103 @@ Fails if it doesn't exist. Use :ref:`has_theme_item` theme_type **)** +.. rst-class:: classref-method + +void **clear_type_variation** **(** :ref:`StringName` theme_type **)** Unmarks ``theme_type`` as being a variation of another theme type. See :ref:`set_type_variation`. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_color: -- :ref:`Color` **get_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns the :ref:`Color` property defined by ``name`` and ``theme_type``, if it exists. Returns the default color value if the property doesn't exist. Use :ref:`has_color` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_color_list: -- :ref:`PackedStringArray` **get_color_list** **(** :ref:`String` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_color_list** **(** :ref:`String` theme_type **)** |const| Returns a list of names for :ref:`Color` properties defined with ``theme_type``. Use :ref:`get_color_type_list` to get a list of possible theme type names. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_color_type_list: -- :ref:`PackedStringArray` **get_color_type_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_color_type_list** **(** **)** |const| Returns a list of all unique theme type names for :ref:`Color` properties. Use :ref:`get_type_list` to get a list of all unique theme types. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_constant: -- :ref:`int` **get_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns the constant property defined by ``name`` and ``theme_type``, if it exists. Returns ``0`` if the property doesn't exist. Use :ref:`has_constant` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_constant_list: -- :ref:`PackedStringArray` **get_constant_list** **(** :ref:`String` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_constant_list** **(** :ref:`String` theme_type **)** |const| Returns a list of names for constant properties defined with ``theme_type``. Use :ref:`get_constant_type_list` to get a list of possible theme type names. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_constant_type_list: -- :ref:`PackedStringArray` **get_constant_type_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_constant_type_list** **(** **)** |const| Returns a list of all unique theme type names for constant properties. Use :ref:`get_type_list` to get a list of all unique theme types. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_font: -- :ref:`Font` **get_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`Font` **get_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns the :ref:`Font` property defined by ``name`` and ``theme_type``, if it exists. @@ -421,19 +552,27 @@ Returns the default theme font if the property doesn't exist and the default the Returns the engine fallback font value, if neither exist (see :ref:`ThemeDB.fallback_font`). +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_font_list: -- :ref:`PackedStringArray` **get_font_list** **(** :ref:`String` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_font_list** **(** :ref:`String` theme_type **)** |const| Returns a list of names for :ref:`Font` properties defined with ``theme_type``. Use :ref:`get_font_type_list` to get a list of possible theme type names. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_font_size: -- :ref:`int` **get_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns the font size property defined by ``name`` and ``theme_type``, if it exists. @@ -441,87 +580,127 @@ Returns the default theme font size if the property doesn't exist and the defaul Returns the engine fallback font size value, if neither exist (see :ref:`ThemeDB.fallback_font_size`). +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_font_size_list: -- :ref:`PackedStringArray` **get_font_size_list** **(** :ref:`String` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_font_size_list** **(** :ref:`String` theme_type **)** |const| Returns a list of names for font size properties defined with ``theme_type``. Use :ref:`get_font_size_type_list` to get a list of possible theme type names. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_font_size_type_list: -- :ref:`PackedStringArray` **get_font_size_type_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_font_size_type_list** **(** **)** |const| Returns a list of all unique theme type names for font size properties. Use :ref:`get_type_list` to get a list of all unique theme types. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_font_type_list: -- :ref:`PackedStringArray` **get_font_type_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_font_type_list** **(** **)** |const| Returns a list of all unique theme type names for :ref:`Font` properties. Use :ref:`get_type_list` to get a list of all unique theme types. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_icon: -- :ref:`Texture2D` **get_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns the icon property defined by ``name`` and ``theme_type``, if it exists. Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB.fallback_icon`). Use :ref:`has_icon` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_icon_list: -- :ref:`PackedStringArray` **get_icon_list** **(** :ref:`String` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_icon_list** **(** :ref:`String` theme_type **)** |const| Returns a list of names for icon properties defined with ``theme_type``. Use :ref:`get_icon_type_list` to get a list of possible theme type names. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_icon_type_list: -- :ref:`PackedStringArray` **get_icon_type_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_icon_type_list** **(** **)** |const| Returns a list of all unique theme type names for icon properties. Use :ref:`get_type_list` to get a list of all unique theme types. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_stylebox: -- :ref:`StyleBox` **get_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`StyleBox` **get_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns the :ref:`StyleBox` property defined by ``name`` and ``theme_type``, if it exists. Returns the engine fallback stylebox value if the property doesn't exist (see :ref:`ThemeDB.fallback_stylebox`). Use :ref:`has_stylebox` to check for existence. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_stylebox_list: -- :ref:`PackedStringArray` **get_stylebox_list** **(** :ref:`String` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_stylebox_list** **(** :ref:`String` theme_type **)** |const| Returns a list of names for :ref:`StyleBox` properties defined with ``theme_type``. Use :ref:`get_stylebox_type_list` to get a list of possible theme type names. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_stylebox_type_list: -- :ref:`PackedStringArray` **get_stylebox_type_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_stylebox_type_list** **(** **)** |const| Returns a list of all unique theme type names for :ref:`StyleBox` properties. Use :ref:`get_type_list` to get a list of all unique theme types. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_theme_item: -- :ref:`Variant` **get_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists. @@ -529,145 +708,205 @@ Returns the engine fallback icon value if the property doesn't exist (see :ref:` \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_theme_item_list: -- :ref:`PackedStringArray` **get_theme_item_list** **(** :ref:`DataType` data_type, :ref:`String` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_theme_item_list** **(** :ref:`DataType` data_type, :ref:`String` theme_type **)** |const| Returns a list of names for properties of ``data_type`` defined with ``theme_type``. Use :ref:`get_theme_item_type_list` to get a list of possible theme type names. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_theme_item_type_list: -- :ref:`PackedStringArray` **get_theme_item_type_list** **(** :ref:`DataType` data_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_theme_item_type_list** **(** :ref:`DataType` data_type **)** |const| Returns a list of all unique theme type names for ``data_type`` properties. Use :ref:`get_type_list` to get a list of all unique theme types. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_type_list: -- :ref:`PackedStringArray` **get_type_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_type_list** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_type_variation_base: -- :ref:`StringName` **get_type_variation_base** **(** :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_type_variation_base** **(** :ref:`StringName` theme_type **)** |const| Returns the name of the base theme type if ``theme_type`` is a valid variation type. Returns an empty string otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_get_type_variation_list: -- :ref:`PackedStringArray` **get_type_variation_list** **(** :ref:`StringName` base_type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_type_variation_list** **(** :ref:`StringName` base_type **)** |const| Returns a list of all type variations for the given ``base_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_color: -- :ref:`bool` **has_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns ``true`` if the :ref:`Color` property defined by ``name`` and ``theme_type`` exists. Returns ``false`` if it doesn't exist. Use :ref:`set_color` to define it. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_constant: -- :ref:`bool` **has_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns ``true`` if the constant property defined by ``name`` and ``theme_type`` exists. Returns ``false`` if it doesn't exist. Use :ref:`set_constant` to define it. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_default_base_scale: -- :ref:`bool` **has_default_base_scale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_default_base_scale** **(** **)** |const| Returns ``true`` if :ref:`default_base_scale` has a valid value. Returns ``false`` if it doesn't. The value must be greater than ``0.0`` to be considered valid. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_default_font: -- :ref:`bool` **has_default_font** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_default_font** **(** **)** |const| Returns ``true`` if :ref:`default_font` has a valid value. Returns ``false`` if it doesn't. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_default_font_size: -- :ref:`bool` **has_default_font_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_default_font_size** **(** **)** |const| Returns ``true`` if :ref:`default_font_size` has a valid value. Returns ``false`` if it doesn't. The value must be greater than ``0`` to be considered valid. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_font: -- :ref:`bool` **has_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns ``true`` if the :ref:`Font` property defined by ``name`` and ``theme_type`` exists, or if the default theme font is set up (see :ref:`has_default_font`). Returns ``false`` if neither exist. Use :ref:`set_font` to define the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_font_size: -- :ref:`bool` **has_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| 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`). Returns ``false`` if neither exist. Use :ref:`set_font_size` to define the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_icon: -- :ref:`bool` **has_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns ``true`` if the icon property defined by ``name`` and ``theme_type`` exists. Returns ``false`` if it doesn't exist. Use :ref:`set_icon` to define it. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_stylebox: -- :ref:`bool` **has_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns ``true`` if the :ref:`StyleBox` property defined by ``name`` and ``theme_type`` exists. Returns ``false`` if it doesn't exist. Use :ref:`set_stylebox` to define it. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_has_theme_item: -- :ref:`bool` **has_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type **)** |const| Returns ``true`` if the theme property of ``data_type`` defined by ``name`` and ``theme_type`` exists. @@ -675,97 +914,137 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_theme_item` **is_type_variation** **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_type_variation** **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** |const| Returns ``true`` if ``theme_type`` is marked as a variation of ``base_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_merge_with: -- void **merge_with** **(** :ref:`Theme` other **)** +.. rst-class:: classref-method + +void **merge_with** **(** :ref:`Theme` other **)** Adds missing and overrides existing definitions with values from the ``other`` theme resource. \ **Note:** This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_remove_type: -- void **remove_type** **(** :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **remove_type** **(** :ref:`StringName` theme_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. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_rename_color: -- void **rename_color** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **rename_color** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** Renames the :ref:`Color` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_color` to check for existence, and :ref:`clear_color` to remove the existing property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_rename_constant: -- void **rename_constant** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **rename_constant** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** Renames the constant property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_constant` to check for existence, and :ref:`clear_constant` to remove the existing property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_rename_font: -- void **rename_font** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **rename_font** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** Renames the :ref:`Font` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font` to check for existence, and :ref:`clear_font` to remove the existing property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_rename_font_size: -- void **rename_font_size** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **rename_font_size** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** Renames the font size property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_font_size` to check for existence, and :ref:`clear_font_size` to remove the existing property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_rename_icon: -- void **rename_icon** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **rename_icon** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** Renames the icon property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_icon` to check for existence, and :ref:`clear_icon` to remove the existing property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_rename_stylebox: -- void **rename_stylebox** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **rename_stylebox** **(** :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** Renames the :ref:`StyleBox` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use :ref:`has_stylebox` to check for existence, and :ref:`clear_stylebox` to remove the existing property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_rename_theme_item: -- void **rename_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** +.. rst-class:: classref-method + +void **rename_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` old_name, :ref:`StringName` name, :ref:`StringName` theme_type **)** Renames the theme property of ``data_type`` defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -773,59 +1052,87 @@ Fails if it doesn't exist, or if a similar property with the new name already ex \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_color: -- void **set_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Color` color **)** Creates or changes the value of the :ref:`Color` property defined by ``name`` and ``theme_type``. Use :ref:`clear_color` to remove the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_constant: -- void **set_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` constant **)** +.. rst-class:: classref-method + +void **set_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` constant **)** Creates or changes the value of the constant property defined by ``name`` and ``theme_type``. Use :ref:`clear_constant` to remove the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_font: -- void **set_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Font` font **)** +.. rst-class:: classref-method + +void **set_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Font` font **)** Creates or changes the value of the :ref:`Font` property defined by ``name`` and ``theme_type``. Use :ref:`clear_font` to remove the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_font_size: -- void **set_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` font_size **)** +.. rst-class:: classref-method + +void **set_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`int` font_size **)** Creates or changes the value of the font size property defined by ``name`` and ``theme_type``. Use :ref:`clear_font_size` to remove the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_icon: -- void **set_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Texture2D` texture **)** Creates or changes the value of the icon property defined by ``name`` and ``theme_type``. Use :ref:`clear_icon` to remove the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_stylebox: -- void **set_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`StyleBox` texture **)** +.. rst-class:: classref-method + +void **set_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`StyleBox` texture **)** Creates or changes the value of the :ref:`StyleBox` property defined by ``name`` and ``theme_type``. Use :ref:`clear_stylebox` to remove the property. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_theme_item: -- void **set_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_theme_item** **(** :ref:`DataType` data_type, :ref:`StringName` name, :ref:`StringName` theme_type, :ref:`Variant` value **)** Creates or changes the value of the theme property of ``data_type`` defined by ``name`` and ``theme_type``. Use :ref:`clear_theme_item` to remove the property. @@ -833,11 +1140,15 @@ Fails if the ``value`` type is not accepted by ``data_type``. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. +.. rst-class:: classref-item-separator + ---- .. _class_Theme_method_set_type_variation: -- void **set_type_variation** **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** +.. rst-class:: classref-method + +void **set_type_variation** **(** :ref:`StringName` theme_type, :ref:`StringName` base_type **)** Marks ``theme_type`` as a variation of ``base_type``. diff --git a/classes/class_themedb.rst b/classes/class_themedb.rst index 15660097b..7bc3472ea 100644 --- a/classes/class_themedb.rst +++ b/classes/class_themedb.rst @@ -14,141 +14,188 @@ ThemeDB An engine singleton providing access to static :ref:`Theme` information, such as default and project theme, and fallback values. +.. rst-class:: classref-introduction-group + Description ----------- This engine singleton provides access to static information about :ref:`Theme` resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme. -\ ``ThemeDB`` also contains fallback values for theme properties. +\ **ThemeDB** also contains fallback values for theme properties. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`fallback_base_scale` | ``1.0`` | -+-----------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`Font` | :ref:`fallback_font` | | -+-----------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`fallback_font_size` | ``16`` | -+-----------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`Texture2D` | :ref:`fallback_icon` | | -+-----------------------------------+------------------------------------------------------------------------+---------+ -| :ref:`StyleBox` | :ref:`fallback_stylebox` | | -+-----------------------------------+------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`fallback_base_scale` | ``1.0`` | + +-----------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`Font` | :ref:`fallback_font` | | + +-----------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`fallback_font_size` | ``16`` | + +-----------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`fallback_icon` | | + +-----------------------------------+------------------------------------------------------------------------+---------+ + | :ref:`StyleBox` | :ref:`fallback_stylebox` | | + +-----------------------------------+------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------+------------------------------------------------------------------------------+ -| :ref:`Theme` | :ref:`get_default_theme` **(** **)** | -+---------------------------+------------------------------------------------------------------------------+ -| :ref:`Theme` | :ref:`get_project_theme` **(** **)** | -+---------------------------+------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------------+ + | :ref:`Theme` | :ref:`get_default_theme` **(** **)** | + +---------------------------+------------------------------------------------------------------------------+ + | :ref:`Theme` | :ref:`get_project_theme` **(** **)** | + +---------------------------+------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_ThemeDB_signal_fallback_changed: -- **fallback_changed** **(** **)** +.. rst-class:: classref-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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_ThemeDB_property_fallback_base_scale: -- :ref:`float` **fallback_base_scale** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``1.0`` | -+-----------+--------------------------------+ -| *Setter* | set_fallback_base_scale(value) | -+-----------+--------------------------------+ -| *Getter* | get_fallback_base_scale() | -+-----------+--------------------------------+ +:ref:`float` **fallback_base_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_fallback_base_scale** **(** :ref:`float` value **)** +- :ref:`float` **get_fallback_base_scale** **(** **)** The fallback base scale factor of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. See also :ref:`Theme.default_base_scale`. +.. rst-class:: classref-item-separator + ---- .. _class_ThemeDB_property_fallback_font: -- :ref:`Font` **fallback_font** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_fallback_font(value) | -+----------+--------------------------+ -| *Getter* | get_fallback_font() | -+----------+--------------------------+ +:ref:`Font` **fallback_font** + +.. rst-class:: classref-property-setget + +- void **set_fallback_font** **(** :ref:`Font` value **)** +- :ref:`Font` **get_fallback_font** **(** **)** The fallback font of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. See also :ref:`Theme.default_font`. +.. rst-class:: classref-item-separator + ---- .. _class_ThemeDB_property_fallback_font_size: -- :ref:`int` **fallback_font_size** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``16`` | -+-----------+-------------------------------+ -| *Setter* | set_fallback_font_size(value) | -+-----------+-------------------------------+ -| *Getter* | get_fallback_font_size() | -+-----------+-------------------------------+ +:ref:`int` **fallback_font_size** = ``16`` + +.. rst-class:: classref-property-setget + +- void **set_fallback_font_size** **(** :ref:`int` value **)** +- :ref:`int` **get_fallback_font_size** **(** **)** The fallback font size of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. See also :ref:`Theme.default_font_size`. +.. rst-class:: classref-item-separator + ---- .. _class_ThemeDB_property_fallback_icon: -- :ref:`Texture2D` **fallback_icon** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_fallback_icon(value) | -+----------+--------------------------+ -| *Getter* | get_fallback_icon() | -+----------+--------------------------+ +:ref:`Texture2D` **fallback_icon** + +.. rst-class:: classref-property-setget + +- void **set_fallback_icon** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_fallback_icon** **(** **)** The fallback icon of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. +.. rst-class:: classref-item-separator + ---- .. _class_ThemeDB_property_fallback_stylebox: -- :ref:`StyleBox` **fallback_stylebox** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_fallback_stylebox(value) | -+----------+------------------------------+ -| *Getter* | get_fallback_stylebox() | -+----------+------------------------------+ +:ref:`StyleBox` **fallback_stylebox** + +.. rst-class:: classref-property-setget + +- void **set_fallback_stylebox** **(** :ref:`StyleBox` value **)** +- :ref:`StyleBox` **get_fallback_stylebox** **(** **)** The fallback stylebox of every :ref:`Control` node and :ref:`Theme` resource. Used when no other value is available to the control. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_ThemeDB_method_get_default_theme: -- :ref:`Theme` **get_default_theme** **(** **)** +.. rst-class:: classref-method + +:ref:`Theme` **get_default_theme** **(** **)** Returns a reference to the default engine :ref:`Theme`. This theme resource is responsible for the out-of-the-box look of :ref:`Control` nodes and cannot be overridden. +.. rst-class:: classref-item-separator + ---- .. _class_ThemeDB_method_get_project_theme: -- :ref:`Theme` **get_project_theme** **(** **)** +.. rst-class:: classref-method + +:ref:`Theme` **get_project_theme** **(** **)** Returns a reference to the custom project :ref:`Theme`. This theme resources allows to override the default engine theme for every control node in the project. diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 6f6e5430e..da9c11b6c 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -14,6 +14,8 @@ Thread A unit of execution in a process. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ A unit of execution in a process. Can run methods on :ref:`Object` \ **Note:** Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,94 +34,143 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_id` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_alive` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_started` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`start` **(** :ref:`Callable` callable, :ref:`Priority` priority=1 **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`wait_to_finish` **(** **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_id` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_alive` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_started` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`start` **(** :ref:`Callable` callable, :ref:`Priority` priority=1 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`wait_to_finish` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Thread_Priority: -.. _class_Thread_constant_PRIORITY_LOW: - -.. _class_Thread_constant_PRIORITY_NORMAL: - -.. _class_Thread_constant_PRIORITY_HIGH: +.. rst-class:: classref-enumeration enum **Priority**: -- **PRIORITY_LOW** = **0** --- A thread running with lower priority than normally. +.. _class_Thread_constant_PRIORITY_LOW: -- **PRIORITY_NORMAL** = **1** --- A thread with a standard priority. +.. rst-class:: classref-enumeration-constant -- **PRIORITY_HIGH** = **2** --- A thread running with higher priority than normally. +:ref:`Priority` **PRIORITY_LOW** = ``0`` + +A thread running with lower priority than normally. + +.. _class_Thread_constant_PRIORITY_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Priority` **PRIORITY_NORMAL** = ``1`` + +A thread with a standard priority. + +.. _class_Thread_constant_PRIORITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Priority` **PRIORITY_HIGH** = ``2`` + +A thread running with higher priority than normally. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Thread_method_get_id: -- :ref:`String` **get_id** **(** **)** |const| +.. rst-class:: classref-method -Returns the current ``Thread``'s ID, uniquely identifying it among all threads. If the ``Thread`` is not running this returns an empty string. +:ref:`String` **get_id** **(** **)** |const| + +Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** is not running this returns an empty string. + +.. rst-class:: classref-item-separator ---- .. _class_Thread_method_is_alive: -- :ref:`bool` **is_alive** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Thread`` is currently running. This is useful for determining if :ref:`wait_to_finish` can be called without blocking the calling thread. +:ref:`bool` **is_alive** **(** **)** |const| -To check if a ``Thread`` is joinable, use :ref:`is_started`. +Returns ``true`` if this **Thread** is currently running. This is useful for determining if :ref:`wait_to_finish` can be called without blocking the calling thread. + +To check if a **Thread** is joinable, use :ref:`is_started`. + +.. rst-class:: classref-item-separator ---- .. _class_Thread_method_is_started: -- :ref:`bool` **is_started** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if this ``Thread`` has been started. Once started, this will return ``true`` until it is joined using :ref:`wait_to_finish`. For checking if a ``Thread`` is still executing its task, use :ref:`is_alive`. +:ref:`bool` **is_started** **(** **)** |const| + +Returns ``true`` if this **Thread** has been started. Once started, this will return ``true`` until it is joined using :ref:`wait_to_finish`. For checking if a **Thread** is still executing its task, use :ref:`is_alive`. + +.. rst-class:: classref-item-separator ---- .. _class_Thread_method_start: -- :ref:`Error` **start** **(** :ref:`Callable` callable, :ref:`Priority` priority=1 **)** +.. rst-class:: classref-method -Starts a new ``Thread`` that calls ``callable``. +:ref:`Error` **start** **(** :ref:`Callable` callable, :ref:`Priority` priority=1 **)** + +Starts a new **Thread** that calls ``callable``. If the method takes some arguments, you can pass them using :ref:`Callable.bind`. -The ``priority`` of the ``Thread`` can be changed by passing a value from the :ref:`Priority` enum. +The ``priority`` of the **Thread** can be changed by passing a value from the :ref:`Priority` enum. Returns :ref:`@GlobalScope.OK` on success, or :ref:`@GlobalScope.ERR_CANT_CREATE` on failure. +.. rst-class:: classref-item-separator + ---- .. _class_Thread_method_wait_to_finish: -- :ref:`Variant` **wait_to_finish** **(** **)** +.. rst-class:: classref-method -Joins the ``Thread`` and waits for it to finish. Returns the output of the :ref:`Callable` passed to :ref:`start`. +:ref:`Variant` **wait_to_finish** **(** **)** -Should either be used when you want to retrieve the value returned from the method called by the ``Thread`` or before freeing the instance that contains the ``Thread``. +Joins the **Thread** and waits for it to finish. Returns the output of the :ref:`Callable` passed to :ref:`start`. + +Should either be used when you want to retrieve the value returned from the method called by the **Thread** or before freeing the instance that contains the **Thread**. To determine if this can be called without blocking the calling thread, check if :ref:`is_alive` is ``false``. -\ **Note:** After the ``Thread`` finishes joining it will be disposed. If you want to use it again you will have to create a new instance of it. +\ **Note:** After the **Thread** finishes joining it will be disposed. If you want to use it again you will have to create a new instance of it. .. |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.)` diff --git a/classes/class_tiledata.rst b/classes/class_tiledata.rst index 902de4e09..07f77499e 100644 --- a/classes/class_tiledata.rst +++ b/classes/class_tiledata.rst @@ -12,482 +12,604 @@ TileData **Inherits:** :ref:`Object` -.. container:: contribute +Settings for a single tile in a :ref:`TileSet`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +**TileData** object represents a single tile in a :ref:`TileSet`. It is usually edited using the tileset editor, but it can be modified at runtime using :ref:`TileMap._tile_data_runtime_update`. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_h` | ``false`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_v` | ``false`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Material` | :ref:`material` | | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`probability` | ``1.0`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`terrain` | ``-1`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`terrain_set` | ``-1`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Vector2i` | :ref:`texture_offset` | ``Vector2i(0, 0)`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`transpose` | ``false`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`y_sort_origin` | ``0`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`int` | :ref:`z_index` | ``0`` | -+---------------------------------+---------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`flip_h` | ``false`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`flip_v` | ``false`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`Material` | :ref:`material` | | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`probability` | ``1.0`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`terrain` | ``-1`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`terrain_set` | ``-1`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`Vector2i` | :ref:`texture_offset` | ``Vector2i(0, 0)`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`transpose` | ``false`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`y_sort_origin` | ``0`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`z_index` | ``0`` | + +---------------------------------+---------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_polygon` **(** :ref:`int` layer_id **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_polygons_count` **(** :ref:`int` layer_id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_constant_angular_velocity` **(** :ref:`int` layer_id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_constant_linear_velocity` **(** :ref:`int` layer_id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_custom_data` **(** :ref:`String` layer_name **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_custom_data_by_layer_id` **(** :ref:`int` layer_id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NavigationPolygon` | :ref:`get_navigation_polygon` **(** :ref:`int` layer_id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`OccluderPolygon2D` | :ref:`get_occluder` **(** :ref:`int` layer_id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_collision_polygon` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_polygons_count` **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constant_angular_velocity` **(** :ref:`int` layer_id, :ref:`float` velocity **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_constant_linear_velocity` **(** :ref:`int` layer_id, :ref:`Vector2` velocity **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_data` **(** :ref:`String` layer_name, :ref:`Variant` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_data_by_layer_id` **(** :ref:`int` layer_id, :ref:`Variant` value **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_polygon` **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_occluder` **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_polygon` **(** :ref:`int` layer_id **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_polygons_count` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_constant_angular_velocity` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_constant_linear_velocity` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data` **(** :ref:`String` layer_name **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data_by_layer_id` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPolygon` | :ref:`get_navigation_polygon` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OccluderPolygon2D` | :ref:`get_occluder` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_collision_polygon` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygons_count` **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_angular_velocity` **(** :ref:`int` layer_id, :ref:`float` velocity **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_linear_velocity` **(** :ref:`int` layer_id, :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data` **(** :ref:`String` layer_name, :ref:`Variant` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data_by_layer_id` **(** :ref:`int` layer_id, :ref:`Variant` value **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_polygon` **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_occluder` **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_TileData_signal_changed: -- **changed** **(** **)** +.. rst-class:: classref-signal + +**changed** **(** **)** + +Emitted when any of the properties are changed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TileData_property_flip_h: -- :ref:`bool` **flip_h** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_h(value) | -+-----------+-------------------+ -| *Getter* | get_flip_h() | -+-----------+-------------------+ +:ref:`bool` **flip_h** = ``false`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_flip_h** **(** :ref:`bool` value **)** +- :ref:`bool` **get_flip_h** **(** **)** + +If ``true``, the tile will have its texture flipped horizontally. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_flip_v: -- :ref:`bool` **flip_v** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_flip_v(value) | -+-----------+-------------------+ -| *Getter* | get_flip_v() | -+-----------+-------------------+ +:ref:`bool` **flip_v** = ``false`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_flip_v** **(** :ref:`bool` value **)** +- :ref:`bool` **get_flip_v** **(** **)** + +If ``true``, the tile will have its texture flipped vertically. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_material: -- :ref:`Material` **material** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_material(value) | -+----------+---------------------+ -| *Getter* | get_material() | -+----------+---------------------+ +:ref:`Material` **material** -The :ref:`Material` to use for this ``TileData``. This can be a :ref:`CanvasItemMaterial` to use the default shader, or a :ref:`ShaderMaterial` to use a custom shader. +.. rst-class:: classref-property-setget + +- void **set_material** **(** :ref:`Material` value **)** +- :ref:`Material` **get_material** **(** **)** + +The :ref:`Material` to use for this **TileData**. This can be a :ref:`CanvasItemMaterial` to use the default shader, or a :ref:`ShaderMaterial` to use a custom shader. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_modulate: -- :ref:`Color` **modulate** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_modulate(value) | -+-----------+-----------------------+ -| *Getter* | get_modulate() | -+-----------+-----------------------+ +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_modulate** **(** :ref:`Color` value **)** +- :ref:`Color` **get_modulate** **(** **)** + +Color modulation of the tile. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_probability: -- :ref:`float` **probability** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_probability(value) | -+-----------+------------------------+ -| *Getter* | get_probability() | -+-----------+------------------------+ +:ref:`float` **probability** = ``1.0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_probability** **(** :ref:`float` value **)** +- :ref:`float` **get_probability** **(** **)** + +Relative probability of this tile being selected when drawing a pattern of random tiles. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_terrain: -- :ref:`int` **terrain** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``-1`` | -+-----------+--------------------+ -| *Setter* | set_terrain(value) | -+-----------+--------------------+ -| *Getter* | get_terrain() | -+-----------+--------------------+ +:ref:`int` **terrain** = ``-1`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_terrain** **(** :ref:`int` value **)** +- :ref:`int` **get_terrain** **(** **)** + +ID of the terrain from the terrain set that the tile uses. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_terrain_set: -- :ref:`int` **terrain_set** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------+ -| *Setter* | set_terrain_set(value) | -+-----------+------------------------+ -| *Getter* | get_terrain_set() | -+-----------+------------------------+ +:ref:`int` **terrain_set** = ``-1`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_terrain_set** **(** :ref:`int` value **)** +- :ref:`int` **get_terrain_set** **(** **)** + +ID of the terrain set that the tile uses. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_texture_offset: -- :ref:`Vector2i` **texture_offset** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+---------------------------+ -| *Setter* | set_texture_offset(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_offset() | -+-----------+---------------------------+ +:ref:`Vector2i` **texture_offset** = ``Vector2i(0, 0)`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_texture_offset** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_texture_offset** **(** **)** + +Offsets the position of where the tile is drawn. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_transpose: -- :ref:`bool` **transpose** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_transpose(value) | -+-----------+----------------------+ -| *Getter* | get_transpose() | -+-----------+----------------------+ +:ref:`bool` **transpose** = ``false`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_transpose** **(** :ref:`bool` value **)** +- :ref:`bool` **get_transpose** **(** **)** + +If ``true``, the tile will display transposed, i.e. with horizontal and vertical texture UVs swapped. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_y_sort_origin: -- :ref:`int` **y_sort_origin** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_y_sort_origin(value) | -+-----------+--------------------------+ -| *Getter* | get_y_sort_origin() | -+-----------+--------------------------+ +:ref:`int` **y_sort_origin** = ``0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_y_sort_origin** **(** :ref:`int` value **)** +- :ref:`int` **get_y_sort_origin** **(** **)** + +Vertical point of the tile used for determining y-sorted order. + +.. rst-class:: classref-item-separator ---- .. _class_TileData_property_z_index: -- :ref:`int` **z_index** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_z_index(value) | -+-----------+--------------------+ -| *Getter* | get_z_index() | -+-----------+--------------------+ +:ref:`int` **z_index** = ``0`` -.. container:: contribute +.. rst-class:: classref-property-setget - There is currently no description for this property. Please help us by :ref:`contributing one `! +- void **set_z_index** **(** :ref:`int` value **)** +- :ref:`int` **get_z_index** **(** **)** + +Ordering index of this tile, relative to :ref:`TileMap`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TileData_method_add_collision_polygon: -- void **add_collision_polygon** **(** :ref:`int` layer_id **)** +.. rst-class:: classref-method + +void **add_collision_polygon** **(** :ref:`int` layer_id **)** Adds a collision polygon to the tile on the given TileSet physics layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_collision_polygon_one_way_margin: -- :ref:`float` **get_collision_polygon_one_way_margin** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_collision_polygon_one_way_margin** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| Returns the one-way margin (for one-way platforms) of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_collision_polygon_points: -- :ref:`PackedVector2Array` **get_collision_polygon_points** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_collision_polygon_points** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| Returns the points of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_collision_polygons_count: -- :ref:`int` **get_collision_polygons_count** **(** :ref:`int` layer_id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_collision_polygons_count** **(** :ref:`int` layer_id **)** |const| Returns how many polygons the tile has for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_constant_angular_velocity: -- :ref:`float` **get_constant_angular_velocity** **(** :ref:`int` layer_id **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_constant_angular_velocity** **(** :ref:`int` layer_id **)** |const| Returns the constant angular velocity applied to objects colliding with this tile. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_constant_linear_velocity: -- :ref:`Vector2` **get_constant_linear_velocity** **(** :ref:`int` layer_id **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_constant_linear_velocity** **(** :ref:`int` layer_id **)** |const| Returns the constant linear velocity applied to objects colliding with this tile. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_custom_data: -- :ref:`Variant` **get_custom_data** **(** :ref:`String` layer_name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_custom_data** **(** :ref:`String` layer_name **)** |const| Returns the custom data value for custom data layer named ``layer_name``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_custom_data_by_layer_id: -- :ref:`Variant` **get_custom_data_by_layer_id** **(** :ref:`int` layer_id **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_custom_data_by_layer_id** **(** :ref:`int` layer_id **)** |const| Returns the custom data value for custom data layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_navigation_polygon: -- :ref:`NavigationPolygon` **get_navigation_polygon** **(** :ref:`int` layer_id **)** |const| +.. rst-class:: classref-method + +:ref:`NavigationPolygon` **get_navigation_polygon** **(** :ref:`int` layer_id **)** |const| Returns the navigation polygon of the tile for the TileSet navigation layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_occluder: -- :ref:`OccluderPolygon2D` **get_occluder** **(** :ref:`int` layer_id **)** |const| +.. rst-class:: classref-method + +:ref:`OccluderPolygon2D` **get_occluder** **(** :ref:`int` layer_id **)** |const| Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_get_terrain_peering_bit: -- :ref:`int` **get_terrain_peering_bit** **(** :ref:`CellNeighbor` peering_bit **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_terrain_peering_bit** **(** :ref:`CellNeighbor` peering_bit **)** |const| Returns the tile's terrain bit for the given ``peering_bit`` direction. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_is_collision_polygon_one_way: -- :ref:`bool` **is_collision_polygon_one_way** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_collision_polygon_one_way** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| Returns whether one-way collisions are enabled for the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_remove_collision_polygon: -- void **remove_collision_polygon** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** +.. rst-class:: classref-method + +void **remove_collision_polygon** **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** Removes the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_collision_polygon_one_way: -- void **set_collision_polygon_one_way** **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** +.. rst-class:: classref-method + +void **set_collision_polygon_one_way** **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** Enables/disables one-way collisions on the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_collision_polygon_one_way_margin: -- void **set_collision_polygon_one_way_margin** **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** +.. rst-class:: classref-method + +void **set_collision_polygon_one_way_margin** **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** Enables/disables one-way collisions on the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_collision_polygon_points: -- void **set_collision_polygon_points** **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** +.. rst-class:: classref-method + +void **set_collision_polygon_points** **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** Sets the points of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_collision_polygons_count: -- void **set_collision_polygons_count** **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** +.. rst-class:: classref-method + +void **set_collision_polygons_count** **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** Sets the polygons count for TileSet physics layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_constant_angular_velocity: -- void **set_constant_angular_velocity** **(** :ref:`int` layer_id, :ref:`float` velocity **)** +.. rst-class:: classref-method + +void **set_constant_angular_velocity** **(** :ref:`int` layer_id, :ref:`float` velocity **)** Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_constant_linear_velocity: -- void **set_constant_linear_velocity** **(** :ref:`int` layer_id, :ref:`Vector2` velocity **)** +.. rst-class:: classref-method + +void **set_constant_linear_velocity** **(** :ref:`int` layer_id, :ref:`Vector2` 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_custom_data: -- void **set_custom_data** **(** :ref:`String` layer_name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_custom_data** **(** :ref:`String` layer_name, :ref:`Variant` value **)** Sets the tile's custom data value for the TileSet custom data layer with name ``layer_name``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_custom_data_by_layer_id: -- void **set_custom_data_by_layer_id** **(** :ref:`int` layer_id, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_custom_data_by_layer_id** **(** :ref:`int` layer_id, :ref:`Variant` value **)** Sets the tile's custom data value for the TileSet custom data layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_navigation_polygon: -- void **set_navigation_polygon** **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** +.. rst-class:: classref-method + +void **set_navigation_polygon** **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** Sets the navigation polygon for the TileSet navigation layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_occluder: -- void **set_occluder** **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** +.. rst-class:: classref-method + +void **set_occluder** **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** Sets the occluder for the TileSet occlusion layer with index ``layer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileData_method_set_terrain_peering_bit: -- void **set_terrain_peering_bit** **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** +.. rst-class:: classref-method + +void **set_terrain_peering_bit** **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** Sets the tile's terrain bit for the given ``peering_bit`` direction. diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 6cdfbf6b7..891d9e0ce 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -14,11 +14,15 @@ TileMap Node for 2D tile-based maps. +.. rst-class:: classref-introduction-group + Description ----------- Node for 2D tile-based maps. Tilemaps use a :ref:`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. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,221 +40,278 @@ Tutorials - `2D Kinematic Character Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`cell_quadrant_size` | ``16`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`collision_animatable` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`VisibilityMode` | :ref:`collision_visibility_mode` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`VisibilityMode` | :ref:`navigation_visibility_mode` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ -| :ref:`TileSet` | :ref:`tile_set` | | -+----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`cell_quadrant_size` | ``16`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`collision_animatable` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`VisibilityMode` | :ref:`collision_visibility_mode` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`VisibilityMode` | :ref:`navigation_visibility_mode` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`TileSet` | :ref:`tile_set` | | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`TileData` tile_data **)** |virtual| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_use_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_layer` **(** :ref:`int` to_position **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_layer` **(** :ref:`int` layer **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fix_invalid_tiles` **(** **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_update` **(** :ref:`int` layer=-1 **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_alternative_tile` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_cell_atlas_coords` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_source_id` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TileData` | :ref:`get_cell_tile_data` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_coords_for_body_rid` **(** :ref:`RID` body **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_layer_modulate` **(** :ref:`int` layer **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_layer_name` **(** :ref:`int` layer **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_layer_y_sort_origin` **(** :ref:`int` layer **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_layer_z_index` **(** :ref:`int` layer **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_layers_count` **(** **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_neighbor_cell` **(** :ref:`Vector2i` coords, :ref:`CellNeighbor` neighbor **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TileMapPattern` | :ref:`get_pattern` **(** :ref:`int` layer, :ref:`Vector2i[]` coords_array **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`get_surrounding_tiles` **(** :ref:`Vector2i` coords **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`get_used_cells` **(** :ref:`int` layer **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`get_used_rect` **(** **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_layer_enabled` **(** :ref:`int` layer **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_layer_y_sort_enabled` **(** :ref:`int` layer **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`local_to_map` **(** :ref:`Vector2` local_position **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`map_pattern` **(** :ref:`Vector2i` position_in_tilemap, :ref:`Vector2i` coords_in_pattern, :ref:`TileMapPattern` pattern **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`map_to_local` **(** :ref:`Vector2i` map_position **)** |const| | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_layer` **(** :ref:`int` layer, :ref:`int` to_position **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_layer` **(** :ref:`int` layer **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cells_terrain_connect` **(** :ref:`int` layer, :ref:`Vector2i[]` cells, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cells_terrain_path` **(** :ref:`int` layer, :ref:`Vector2i[]` path, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_enabled` **(** :ref:`int` layer, :ref:`bool` enabled **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_modulate` **(** :ref:`int` layer, :ref:`Color` modulate **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_name` **(** :ref:`int` layer, :ref:`String` name **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_y_sort_enabled` **(** :ref:`int` layer, :ref:`bool` y_sort_enabled **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_y_sort_origin` **(** :ref:`int` layer, :ref:`int` y_sort_origin **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_z_index` **(** :ref:`int` layer, :ref:`int` z_index **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_pattern` **(** :ref:`int` layer, :ref:`Vector2i` position, :ref:`TileMapPattern` pattern **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`TileData` tile_data **)** |virtual| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_use_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_layer` **(** :ref:`int` to_position **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_layer` **(** :ref:`int` layer **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fix_invalid_tiles` **(** **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update` **(** :ref:`int` layer=-1 **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_alternative_tile` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_cell_atlas_coords` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_source_id` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileData` | :ref:`get_cell_tile_data` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_coords_for_body_rid` **(** :ref:`RID` body **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_layer_modulate` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_layer_name` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_layer_y_sort_origin` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_layer_z_index` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_layers_count` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_neighbor_cell` **(** :ref:`Vector2i` coords, :ref:`CellNeighbor` neighbor **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileMapPattern` | :ref:`get_pattern` **(** :ref:`int` layer, :ref:`Vector2i[]` coords_array **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`get_surrounding_tiles` **(** :ref:`Vector2i` coords **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`get_used_cells` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_used_rect` **(** **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_layer_enabled` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_layer_y_sort_enabled` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`local_to_map` **(** :ref:`Vector2` local_position **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`map_pattern` **(** :ref:`Vector2i` position_in_tilemap, :ref:`Vector2i` coords_in_pattern, :ref:`TileMapPattern` pattern **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`map_to_local` **(** :ref:`Vector2i` map_position **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_layer` **(** :ref:`int` layer, :ref:`int` to_position **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_layer` **(** :ref:`int` layer **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cells_terrain_connect` **(** :ref:`int` layer, :ref:`Vector2i[]` cells, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cells_terrain_path` **(** :ref:`int` layer, :ref:`Vector2i[]` path, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_enabled` **(** :ref:`int` layer, :ref:`bool` enabled **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_modulate` **(** :ref:`int` layer, :ref:`Color` modulate **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_name` **(** :ref:`int` layer, :ref:`String` name **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_y_sort_enabled` **(** :ref:`int` layer, :ref:`bool` y_sort_enabled **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_y_sort_origin` **(** :ref:`int` layer, :ref:`int` y_sort_origin **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_z_index` **(** :ref:`int` layer, :ref:`int` z_index **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_pattern` **(** :ref:`int` layer, :ref:`Vector2i` position, :ref:`TileMapPattern` pattern **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_TileMap_signal_changed: -- **changed** **(** **)** +.. rst-class:: classref-signal + +**changed** **(** **)** Emitted when the :ref:`TileSet` of this TileMap changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_TileMap_VisibilityMode: -.. _class_TileMap_constant_VISIBILITY_MODE_DEFAULT: - -.. _class_TileMap_constant_VISIBILITY_MODE_FORCE_HIDE: - -.. _class_TileMap_constant_VISIBILITY_MODE_FORCE_SHOW: +.. rst-class:: classref-enumeration enum **VisibilityMode**: -- **VISIBILITY_MODE_DEFAULT** = **0** --- Use the debug settings to determine visibility. +.. _class_TileMap_constant_VISIBILITY_MODE_DEFAULT: -- **VISIBILITY_MODE_FORCE_HIDE** = **2** --- Always hide. +.. rst-class:: classref-enumeration-constant -- **VISIBILITY_MODE_FORCE_SHOW** = **1** --- Always show. +:ref:`VisibilityMode` **VISIBILITY_MODE_DEFAULT** = ``0`` + +Use the debug settings to determine visibility. + +.. _class_TileMap_constant_VISIBILITY_MODE_FORCE_HIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityMode` **VISIBILITY_MODE_FORCE_HIDE** = ``2`` + +Always hide. + +.. _class_TileMap_constant_VISIBILITY_MODE_FORCE_SHOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityMode` **VISIBILITY_MODE_FORCE_SHOW** = ``1`` + +Always show. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TileMap_property_cell_quadrant_size: -- :ref:`int` **cell_quadrant_size** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``16`` | -+-----------+--------------------------+ -| *Setter* | set_quadrant_size(value) | -+-----------+--------------------------+ -| *Getter* | get_quadrant_size() | -+-----------+--------------------------+ +:ref:`int` **cell_quadrant_size** = ``16`` + +.. rst-class:: classref-property-setget + +- void **set_quadrant_size** **(** :ref:`int` value **)** +- :ref:`int` **get_quadrant_size** **(** **)** The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_property_collision_animatable: -- :ref:`bool` **collision_animatable** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_collision_animatable(value) | -+-----------+---------------------------------+ -| *Getter* | is_collision_animatable() | -+-----------+---------------------------------+ +:ref:`bool` **collision_animatable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_collision_animatable** **(** :ref:`bool` value **)** +- :ref:`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. \ **Note:** Enabling ``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_visibility_mode: -- :ref:`VisibilityMode` **collision_visibility_mode** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------------+ -| *Setter* | set_collision_visibility_mode(value) | -+-----------+--------------------------------------+ -| *Getter* | get_collision_visibility_mode() | -+-----------+--------------------------------------+ +:ref:`VisibilityMode` **collision_visibility_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_collision_visibility_mode** **(** :ref:`VisibilityMode` value **)** +- :ref:`VisibilityMode` **get_collision_visibility_mode** **(** **)** Show or hide the TileMap's collision shapes. If set to :ref:`VISIBILITY_MODE_DEFAULT`, this depends on the show collision debug settings. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_property_navigation_visibility_mode: -- :ref:`VisibilityMode` **navigation_visibility_mode** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_navigation_visibility_mode(value) | -+-----------+---------------------------------------+ -| *Getter* | get_navigation_visibility_mode() | -+-----------+---------------------------------------+ +:ref:`VisibilityMode` **navigation_visibility_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_navigation_visibility_mode** **(** :ref:`VisibilityMode` value **)** +- :ref:`VisibilityMode` **get_navigation_visibility_mode** **(** **)** Show or hide the TileMap's navigation meshes. If set to :ref:`VISIBILITY_MODE_DEFAULT`, this depends on the show navigation debug settings. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_property_tile_set: -- :ref:`TileSet` **tile_set** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_tileset(value) | -+----------+--------------------+ -| *Getter* | get_tileset() | -+----------+--------------------+ +:ref:`TileSet` **tile_set** + +.. rst-class:: classref-property-setget + +- void **set_tileset** **(** :ref:`TileSet` value **)** +- :ref:`TileSet` **get_tileset** **(** **)** The assigned :ref:`TileSet`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TileMap_method__tile_data_runtime_update: -- void **_tile_data_runtime_update** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`TileData` tile_data **)** |virtual| +.. rst-class:: classref-method + +void **_tile_data_runtime_update** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`TileData` tile_data **)** |virtual| Called with a TileData object about to be used internally by the TileMap, allowing its modification at runtime. @@ -260,61 +321,89 @@ This method is only called if :ref:`_use_tile_data_runtime_update` to trigger a TileMap update. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method__use_tile_data_runtime_update: -- :ref:`bool` **_use_tile_data_runtime_update** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_use_tile_data_runtime_update** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_add_layer: -- void **add_layer** **(** :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **add_layer** **(** :ref:`int` to_position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears all cells. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_clear_layer: -- void **clear_layer** **(** :ref:`int` layer **)** +.. rst-class:: classref-method + +void **clear_layer** **(** :ref:`int` layer **)** Clears all cells on the given layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_erase_cell: -- void **erase_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** +.. rst-class:: classref-method + +void **erase_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** Erases the cell on layer ``layer`` at coordinates ``coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_fix_invalid_tiles: -- void **fix_invalid_tiles** **(** **)** +.. rst-class:: classref-method + +void **fix_invalid_tiles** **(** **)** Clears cells that do not exist in the tileset. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_force_update: -- void **force_update** **(** :ref:`int` layer=-1 **)** +.. rst-class:: classref-method + +void **force_update** **(** :ref:`int` layer=-1 **)** Triggers an update of the TileMap. If ``layer`` is provided, only updates the given layer. @@ -322,191 +411,283 @@ Triggers an update of the TileMap. If ``layer`` is provided, only updates the gi \ **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). +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_cell_alternative_tile: -- :ref:`int` **get_cell_alternative_tile** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_cell_alternative_tile** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_cell_atlas_coords: -- :ref:`Vector2i` **get_cell_atlas_coords** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_cell_atlas_coords** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordinates ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_cell_source_id: -- :ref:`int` **get_cell_source_id** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_cell_source_id** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| Returns the tile source ID of the cell on layer ``layer`` at coordinates ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_cell_tile_data: -- :ref:`TileData` **get_cell_tile_data** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| +.. rst-class:: classref-method + +:ref:`TileData` **get_cell_tile_data** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| Returns the :ref:`TileData` object associated with the given cell, or ``null`` if the cell is not a :ref:`TileSetAtlasSource`. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_coords_for_body_rid: -- :ref:`Vector2i` **get_coords_for_body_rid** **(** :ref:`RID` body **)** +.. rst-class:: classref-method + +:ref:`Vector2i` **get_coords_for_body_rid** **(** :ref:`RID` body **)** Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from :ref:`KinematicCollision2D.get_collider_rid`, when colliding with a tile. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_layer_modulate: -- :ref:`Color` **get_layer_modulate** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_layer_modulate** **(** :ref:`int` layer **)** |const| Returns a TileMap layer's modulate. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_layer_name: -- :ref:`String` **get_layer_name** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_layer_name** **(** :ref:`int` layer **)** |const| Returns a TileMap layer's name. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_layer_y_sort_origin: -- :ref:`int` **get_layer_y_sort_origin** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_layer_y_sort_origin** **(** :ref:`int` layer **)** |const| Returns a TileMap layer's Y sort origin. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_layer_z_index: -- :ref:`int` **get_layer_z_index** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_layer_z_index** **(** :ref:`int` layer **)** |const| Returns a TileMap layer's Z-index value. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_layers_count: -- :ref:`int` **get_layers_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_layers_count** **(** **)** |const| Returns the number of layers in the TileMap. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_neighbor_cell: -- :ref:`Vector2i` **get_neighbor_cell** **(** :ref:`Vector2i` coords, :ref:`CellNeighbor` neighbor **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_neighbor_cell** **(** :ref:`Vector2i` coords, :ref:`CellNeighbor` neighbor **)** |const| 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_TileMap_method_get_pattern: -- :ref:`TileMapPattern` **get_pattern** **(** :ref:`int` layer, :ref:`Vector2i[]` coords_array **)** +.. rst-class:: classref-method + +:ref:`TileMapPattern` **get_pattern** **(** :ref:`int` layer, :ref:`Vector2i[]` coords_array **)** Creates a new :ref:`TileMapPattern` from the given layer and set of cells. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_surrounding_tiles: -- :ref:`Vector2i[]` **get_surrounding_tiles** **(** :ref:`Vector2i` coords **)** +.. rst-class:: classref-method + +:ref:`Vector2i[]` **get_surrounding_tiles** **(** :ref:`Vector2i` coords **)** Returns the list of all neighbourings cells to the one at ``coords`` +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_used_cells: -- :ref:`Vector2i[]` **get_used_cells** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **get_used_cells** **(** :ref:`int` layer **)** |const| Returns a :ref:`Vector2` 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_get_used_rect: -- :ref:`Rect2i` **get_used_rect** **(** **)** +.. rst-class:: classref-method + +:ref:`Rect2i` **get_used_rect** **(** **)** Returns a rectangle enclosing the used (non-empty) tiles of the map, including all layers. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_is_layer_enabled: -- :ref:`bool` **is_layer_enabled** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_layer_enabled** **(** :ref:`int` layer **)** |const| Returns if a layer is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_is_layer_y_sort_enabled: -- :ref:`bool` **is_layer_y_sort_enabled** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_layer_y_sort_enabled** **(** :ref:`int` layer **)** |const| Returns if a layer Y-sorts its tiles. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_local_to_map: -- :ref:`Vector2i` **local_to_map** **(** :ref:`Vector2` local_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **local_to_map** **(** :ref:`Vector2` local_position **)** |const| 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` before passing it to this method. See also :ref:`map_to_local`. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_map_pattern: -- :ref:`Vector2i` **map_pattern** **(** :ref:`Vector2i` position_in_tilemap, :ref:`Vector2i` coords_in_pattern, :ref:`TileMapPattern` pattern **)** +.. rst-class:: classref-method + +:ref:`Vector2i` **map_pattern** **(** :ref:`Vector2i` position_in_tilemap, :ref:`Vector2i` coords_in_pattern, :ref:`TileMapPattern` pattern **)** Returns for the given coordinate ``coords_in_pattern`` in a :ref:`TileMapPattern` the corresponding cell coordinates if the pattern was pasted at the ``position_in_tilemap`` coordinates (see :ref:`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_TileMap_method_map_to_local: -- :ref:`Vector2` **map_to_local** **(** :ref:`Vector2i` map_position **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **map_to_local** **(** :ref:`Vector2i` map_position **)** |const| 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`. See also :ref:`local_to_map`. \ **Note:** This may not correspond to the visual position of the tile, i.e. it ignores the :ref:`TileData.texture_offset` property of individual tiles. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_move_layer: -- void **move_layer** **(** :ref:`int` layer, :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **move_layer** **(** :ref:`int` layer, :ref:`int` to_position **)** Moves the layer at index ``layer`` to the given position ``to_position`` in the array. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_remove_layer: -- void **remove_layer** **(** :ref:`int` layer **)** +.. rst-class:: classref-method + +void **remove_layer** **(** :ref:`int` layer **)** Removes the layer at index ``layer``. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_set_cell: -- void **set_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** +.. rst-class:: classref-method + +void **set_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** Sets the tile indentifiers for the cell on layer ``layer`` at coordinates ``coords``. Each tile of the :ref:`TileSet` is identified using three parts: @@ -516,11 +697,15 @@ Sets the tile indentifiers for the cell on layer ``layer`` at coordinates ``coor - The alternative tile identifier ``alternative_tile`` identifies a tile alternative the source is a :ref:`TileSetAtlasSource`, and the scene for a :ref:`TileSetScenesCollectionSource`. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_set_cells_terrain_connect: -- void **set_cells_terrain_connect** **(** :ref:`int` layer, :ref:`Vector2i[]` cells, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** +.. rst-class:: classref-method + +void **set_cells_terrain_connect** **(** :ref:`int` layer, :ref:`Vector2i[]` cells, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** 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. @@ -528,11 +713,15 @@ If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying \ **Note:** To work correctly, ``set_cells_terrain_connect`` 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 + ---- .. _class_TileMap_method_set_cells_terrain_path: -- void **set_cells_terrain_path** **(** :ref:`int` layer, :ref:`Vector2i[]` path, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** +.. rst-class:: classref-method + +void **set_cells_terrain_path** **(** :ref:`int` layer, :ref:`Vector2i[]` path, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** 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. @@ -540,41 +729,57 @@ If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying \ **Note:** To work correctly, ``set_cells_terrain_path`` 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 + ---- .. _class_TileMap_method_set_layer_enabled: -- void **set_layer_enabled** **(** :ref:`int` layer, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_layer_enabled** **(** :ref:`int` layer, :ref:`bool` enabled **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_set_layer_modulate: -- void **set_layer_modulate** **(** :ref:`int` layer, :ref:`Color` modulate **)** +.. rst-class:: classref-method + +void **set_layer_modulate** **(** :ref:`int` layer, :ref:`Color` modulate **)** Sets a layer's color. It will be multiplied by tile's color and TileMap's modulate. If ``layer`` is negative, the layers are accessed from the last one. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_set_layer_name: -- void **set_layer_name** **(** :ref:`int` layer, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_layer_name** **(** :ref:`int` layer, :ref:`String` name **)** Sets a layer's name. This is mostly useful in the editor. 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: -- void **set_layer_y_sort_enabled** **(** :ref:`int` layer, :ref:`bool` y_sort_enabled **)** +.. rst-class:: classref-method + +void **set_layer_y_sort_enabled** **(** :ref:`int` layer, :ref:`bool` 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. @@ -582,11 +787,15 @@ Y-sorted layers should usually be on different Z-index values than not Y-sorted If ``layer`` is negative, the layers are accessed from the last one. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_set_layer_y_sort_origin: -- void **set_layer_y_sort_origin** **(** :ref:`int` layer, :ref:`int` y_sort_origin **)** +.. rst-class:: classref-method + +void **set_layer_y_sort_origin** **(** :ref:`int` layer, :ref:`int` 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. @@ -594,21 +803,29 @@ This allows, for example, to fake a different height level on each layer. This c If ``layer`` is negative, the layers are accessed from the last one. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_set_layer_z_index: -- void **set_layer_z_index** **(** :ref:`int` layer, :ref:`int` z_index **)** +.. rst-class:: classref-method + +void **set_layer_z_index** **(** :ref:`int` layer, :ref:`int` z_index **)** Sets a layers Z-index value. This Z-index is added to each tile's Z-index value. If ``layer`` is negative, the layers are accessed from the last one. +.. rst-class:: classref-item-separator + ---- .. _class_TileMap_method_set_pattern: -- void **set_pattern** **(** :ref:`int` layer, :ref:`Vector2i` position, :ref:`TileMapPattern` pattern **)** +.. rst-class:: classref-method + +void **set_pattern** **(** :ref:`int` layer, :ref:`Vector2i` position, :ref:`TileMapPattern` pattern **)** Paste the given :ref:`TileMapPattern` at the given ``position`` and ``layer`` in the tile map. diff --git a/classes/class_tilemappattern.rst b/classes/class_tilemappattern.rst index b1ee89637..a06050dff 100644 --- a/classes/class_tilemappattern.rst +++ b/classes/class_tilemappattern.rst @@ -14,6 +14,8 @@ TileMapPattern Holds a pattern to be copied from or pasted into :ref:`TileMap`\ s. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,109 +23,158 @@ This resource holds a set of cells to help bulk manipulations of :ref:`TileMap` | :ref:`get_cell_alternative_tile` **(** :ref:`Vector2i` coords **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_cell_atlas_coords` **(** :ref:`Vector2i` coords **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cell_source_id` **(** :ref:`Vector2i` coords **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i[]` | :ref:`get_used_cells` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_cell` **(** :ref:`Vector2i` coords **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_cell` **(** :ref:`Vector2i` coords, :ref:`bool` update_size **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell` **(** :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_size` **(** :ref:`Vector2i` size **)** | -+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_alternative_tile` **(** :ref:`Vector2i` coords **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_cell_atlas_coords` **(** :ref:`Vector2i` coords **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_cell_source_id` **(** :ref:`Vector2i` coords **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`get_used_cells` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_cell` **(** :ref:`Vector2i` coords **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_cell` **(** :ref:`Vector2i` coords, :ref:`bool` update_size **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell` **(** :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_size` **(** :ref:`Vector2i` size **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TileMapPattern_method_get_cell_alternative_tile: -- :ref:`int` **get_cell_alternative_tile** **(** :ref:`Vector2i` coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_cell_alternative_tile** **(** :ref:`Vector2i` coords **)** |const| Returns the tile alternative ID of the cell at ``coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_get_cell_atlas_coords: -- :ref:`Vector2i` **get_cell_atlas_coords** **(** :ref:`Vector2i` coords **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_cell_atlas_coords** **(** :ref:`Vector2i` coords **)** |const| Returns the tile atlas coordinates ID of the cell at ``coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_get_cell_source_id: -- :ref:`int` **get_cell_source_id** **(** :ref:`Vector2i` coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_cell_source_id** **(** :ref:`Vector2i` coords **)** |const| Returns the tile source ID of the cell at ``coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_get_size: -- :ref:`Vector2i` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_size** **(** **)** |const| Returns the size, in cells, of the pattern. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_get_used_cells: -- :ref:`Vector2i[]` **get_used_cells** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i[]` **get_used_cells** **(** **)** |const| Returns the list of used cell coordinates in the pattern. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_has_cell: -- :ref:`bool` **has_cell** **(** :ref:`Vector2i` coords **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_cell** **(** :ref:`Vector2i` coords **)** |const| Returns whether the pattern has a tile at the given coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Returns whether the pattern is empty or not. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_remove_cell: -- void **remove_cell** **(** :ref:`Vector2i` coords, :ref:`bool` update_size **)** +.. rst-class:: classref-method + +void **remove_cell** **(** :ref:`Vector2i` coords, :ref:`bool` update_size **)** Remove the cell at the given coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_set_cell: -- void **set_cell** **(** :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** +.. rst-class:: classref-method + +void **set_cell** **(** :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** Sets the tile indentifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell`. +.. rst-class:: classref-item-separator + ---- .. _class_TileMapPattern_method_set_size: -- void **set_size** **(** :ref:`Vector2i` size **)** +.. rst-class:: classref-method + +void **set_size** **(** :ref:`Vector2i` size **)** Sets the size of the pattern. diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index 2ff49e7d1..049fd2d09 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -14,6 +14,8 @@ TileSet Tile library for tilemaps. +.. rst-class:: classref-introduction-group + Description ----------- @@ -29,6 +31,8 @@ For example, adding a physics layer allows giving collision shapes to your tiles See the functions to add new layers for more information. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -46,760 +50,1099 @@ Tutorials - `2D Kinematic Character Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`TileLayout` | :ref:`tile_layout` | ``0`` | -+----------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`TileOffsetAxis` | :ref:`tile_offset_axis` | ``0`` | -+----------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`TileShape` | :ref:`tile_shape` | ``0`` | -+----------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`Vector2i` | :ref:`tile_size` | ``Vector2i(16, 16)`` | -+----------------------------------------------------+------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`uv_clipping` | ``false`` | -+----------------------------------------------------+------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`TileLayout` | :ref:`tile_layout` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`TileOffsetAxis` | :ref:`tile_offset_axis` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`TileShape` | :ref:`tile_shape` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`Vector2i` | :ref:`tile_size` | ``Vector2i(16, 16)`` | + +----------------------------------------------------+------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`uv_clipping` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_data_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_navigation_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_occlusion_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_pattern` **(** :ref:`TileMapPattern` pattern, :ref:`int` index=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_physics_layer` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_source` **(** :ref:`TileSetSource` source, :ref:`int` atlas_source_id_override=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_terrain` **(** :ref:`int` terrain_set, :ref:`int` to_position=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_terrain_set` **(** :ref:`int` to_position=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cleanup_invalid_tile_proxies` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_tile_proxies` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_custom_data_layer_by_name` **(** :ref:`String` layer_name **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_custom_data_layer_name` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant.Type` | :ref:`get_custom_data_layer_type` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_custom_data_layers_count` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_navigation_layer_layers` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_navigation_layers_count` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_next_source_id` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_occlusion_layer_light_mask` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_occlusion_layers_count` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TileMapPattern` | :ref:`get_pattern` **(** :ref:`int` index=-1 **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_patterns_count` **(** **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_physics_layer_collision_layer` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_physics_layer_collision_mask` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsMaterial` | :ref:`get_physics_layer_physics_material` **(** :ref:`int` layer_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_physics_layers_count` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TileSetSource` | :ref:`get_source` **(** :ref:`int` source_id **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_source_count` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_source_id` **(** :ref:`int` index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_source_level_tile_proxy` **(** :ref:`int` source_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TerrainMode` | :ref:`get_terrain_set_mode` **(** :ref:`int` terrain_set **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_terrain_sets_count` **(** **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_terrains_count` **(** :ref:`int` terrain_set **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_source` **(** :ref:`int` source_id **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_source_level_tile_proxy` **(** :ref:`int` source_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`map_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_custom_data_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_navigation_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_occlusion_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_physics_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`int` to_position **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_terrain_set` **(** :ref:`int` terrain_set, :ref:`int` to_position **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_data_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_navigation_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_occlusion_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_pattern` **(** :ref:`int` index **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_physics_layer` **(** :ref:`int` layer_index **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_source` **(** :ref:`int` source_id **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_source_level_tile_proxy` **(** :ref:`int` source_from **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_terrain_set` **(** :ref:`int` terrain_set **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from, :ref:`int` source_to, :ref:`Vector2i` coords_to, :ref:`int` alternative_to **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_coords_level_tile_proxy` **(** :ref:`int` p_source_from, :ref:`Vector2i` coords_from, :ref:`int` source_to, :ref:`Vector2i` coords_to **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_data_layer_name` **(** :ref:`int` layer_index, :ref:`String` layer_name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_data_layer_type` **(** :ref:`int` layer_index, :ref:`Variant.Type` layer_type **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_layer_layers` **(** :ref:`int` layer_index, :ref:`int` layers **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_occlusion_layer_light_mask` **(** :ref:`int` layer_index, :ref:`int` light_mask **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_layer_collision_layer` **(** :ref:`int` layer_index, :ref:`int` layer **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_layer_collision_mask` **(** :ref:`int` layer_index, :ref:`int` mask **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_layer_physics_material` **(** :ref:`int` layer_index, :ref:`PhysicsMaterial` physics_material **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_source_id` **(** :ref:`int` source_id, :ref:`int` new_source_id **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_source_level_tile_proxy` **(** :ref:`int` source_from, :ref:`int` source_to **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`Color` color **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`String` name **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_terrain_set_mode` **(** :ref:`int` terrain_set, :ref:`TerrainMode` mode **)** | -+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_custom_data_layer` **(** :ref:`int` to_position=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_navigation_layer` **(** :ref:`int` to_position=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_occlusion_layer` **(** :ref:`int` to_position=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_pattern` **(** :ref:`TileMapPattern` pattern, :ref:`int` index=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_physics_layer` **(** :ref:`int` to_position=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_source` **(** :ref:`TileSetSource` source, :ref:`int` atlas_source_id_override=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_terrain` **(** :ref:`int` terrain_set, :ref:`int` to_position=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_terrain_set` **(** :ref:`int` to_position=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`cleanup_invalid_tile_proxies` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_tile_proxies` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_custom_data_layer_by_name` **(** :ref:`String` layer_name **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_custom_data_layer_name` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant.Type` | :ref:`get_custom_data_layer_type` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_custom_data_layers_count` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_navigation_layer_layers` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_navigation_layers_count` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_next_source_id` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_occlusion_layer_light_mask` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_occlusion_layers_count` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileMapPattern` | :ref:`get_pattern` **(** :ref:`int` index=-1 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_patterns_count` **(** **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_physics_layer_collision_layer` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_physics_layer_collision_mask` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsMaterial` | :ref:`get_physics_layer_physics_material` **(** :ref:`int` layer_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_physics_layers_count` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileSetSource` | :ref:`get_source` **(** :ref:`int` source_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_source_count` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_source_id` **(** :ref:`int` index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_source_level_tile_proxy` **(** :ref:`int` source_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TerrainMode` | :ref:`get_terrain_set_mode` **(** :ref:`int` terrain_set **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_terrain_sets_count` **(** **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_terrains_count` **(** :ref:`int` terrain_set **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_source` **(** :ref:`int` source_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_source_level_tile_proxy` **(** :ref:`int` source_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`map_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_custom_data_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_navigation_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_occlusion_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_physics_layer` **(** :ref:`int` layer_index, :ref:`int` to_position **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`int` to_position **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_terrain_set` **(** :ref:`int` terrain_set, :ref:`int` to_position **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_coords_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_custom_data_layer` **(** :ref:`int` layer_index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_navigation_layer` **(** :ref:`int` layer_index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_occlusion_layer` **(** :ref:`int` layer_index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_pattern` **(** :ref:`int` index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_physics_layer` **(** :ref:`int` layer_index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_source` **(** :ref:`int` source_id **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_source_level_tile_proxy` **(** :ref:`int` source_from **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_terrain` **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_terrain_set` **(** :ref:`int` terrain_set **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_alternative_level_tile_proxy` **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from, :ref:`int` source_to, :ref:`Vector2i` coords_to, :ref:`int` alternative_to **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_coords_level_tile_proxy` **(** :ref:`int` p_source_from, :ref:`Vector2i` coords_from, :ref:`int` source_to, :ref:`Vector2i` coords_to **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data_layer_name` **(** :ref:`int` layer_index, :ref:`String` layer_name **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data_layer_type` **(** :ref:`int` layer_index, :ref:`Variant.Type` layer_type **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_layers` **(** :ref:`int` layer_index, :ref:`int` layers **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_occlusion_layer_light_mask` **(** :ref:`int` layer_index, :ref:`int` light_mask **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_occlusion_layer_sdf_collision` **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_physics_layer_collision_layer` **(** :ref:`int` layer_index, :ref:`int` layer **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_physics_layer_collision_mask` **(** :ref:`int` layer_index, :ref:`int` mask **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_physics_layer_physics_material` **(** :ref:`int` layer_index, :ref:`PhysicsMaterial` physics_material **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_source_id` **(** :ref:`int` source_id, :ref:`int` new_source_id **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_source_level_tile_proxy` **(** :ref:`int` source_from, :ref:`int` source_to **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_terrain_color` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`Color` color **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_terrain_name` **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`String` name **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_terrain_set_mode` **(** :ref:`int` terrain_set, :ref:`TerrainMode` mode **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_TileSet_TileShape: -.. _class_TileSet_constant_TILE_SHAPE_SQUARE: - -.. _class_TileSet_constant_TILE_SHAPE_ISOMETRIC: - -.. _class_TileSet_constant_TILE_SHAPE_HALF_OFFSET_SQUARE: - -.. _class_TileSet_constant_TILE_SHAPE_HEXAGON: +.. rst-class:: classref-enumeration enum **TileShape**: -- **TILE_SHAPE_SQUARE** = **0** --- Rectangular tile shape. +.. _class_TileSet_constant_TILE_SHAPE_SQUARE: -- **TILE_SHAPE_ISOMETRIC** = **1** --- Diamond tile shape (for isometric look). +.. rst-class:: classref-enumeration-constant -- **TILE_SHAPE_HALF_OFFSET_SQUARE** = **2** --- Rectangular tile shape with one row/column out of two offset by half a tile. +:ref:`TileShape` **TILE_SHAPE_SQUARE** = ``0`` -- **TILE_SHAPE_HEXAGON** = **3** --- Hexagonal tile shape. +Rectangular tile shape. + +.. _class_TileSet_constant_TILE_SHAPE_ISOMETRIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileShape` **TILE_SHAPE_ISOMETRIC** = ``1`` + +Diamond tile shape (for isometric look). + +.. _class_TileSet_constant_TILE_SHAPE_HALF_OFFSET_SQUARE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileShape` **TILE_SHAPE_HALF_OFFSET_SQUARE** = ``2`` + +Rectangular tile shape with one row/column out of two offset by half a tile. + +.. _class_TileSet_constant_TILE_SHAPE_HEXAGON: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileShape` **TILE_SHAPE_HEXAGON** = ``3`` + +Hexagonal tile shape. + +.. rst-class:: classref-item-separator ---- .. _enum_TileSet_TileLayout: -.. _class_TileSet_constant_TILE_LAYOUT_STACKED: - -.. _class_TileSet_constant_TILE_LAYOUT_STACKED_OFFSET: - -.. _class_TileSet_constant_TILE_LAYOUT_STAIRS_RIGHT: - -.. _class_TileSet_constant_TILE_LAYOUT_STAIRS_DOWN: - -.. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_RIGHT: - -.. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_DOWN: +.. rst-class:: classref-enumeration enum **TileLayout**: -- **TILE_LAYOUT_STACKED** = **0** --- Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis. +.. _class_TileSet_constant_TILE_LAYOUT_STACKED: -- **TILE_LAYOUT_STACKED_OFFSET** = **1** --- Same as :ref:`TILE_LAYOUT_STACKED`, but the first half-offset is negative instead of positive. +.. rst-class:: classref-enumeration-constant -- **TILE_LAYOUT_STAIRS_RIGHT** = **2** --- Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right. +:ref:`TileLayout` **TILE_LAYOUT_STACKED** = ``0`` -- **TILE_LAYOUT_STAIRS_DOWN** = **3** --- Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right. +Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis. -- **TILE_LAYOUT_DIAMOND_RIGHT** = **4** --- Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right. +.. _class_TileSet_constant_TILE_LAYOUT_STACKED_OFFSET: -- **TILE_LAYOUT_DIAMOND_DOWN** = **5** --- Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left. +.. rst-class:: classref-enumeration-constant + +:ref:`TileLayout` **TILE_LAYOUT_STACKED_OFFSET** = ``1`` + +Same as :ref:`TILE_LAYOUT_STACKED`, but the first half-offset is negative instead of positive. + +.. _class_TileSet_constant_TILE_LAYOUT_STAIRS_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileLayout` **TILE_LAYOUT_STAIRS_RIGHT** = ``2`` + +Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right. + +.. _class_TileSet_constant_TILE_LAYOUT_STAIRS_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileLayout` **TILE_LAYOUT_STAIRS_DOWN** = ``3`` + +Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right. + +.. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileLayout` **TILE_LAYOUT_DIAMOND_RIGHT** = ``4`` + +Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right. + +.. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileLayout` **TILE_LAYOUT_DIAMOND_DOWN** = ``5`` + +Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left. + +.. rst-class:: classref-item-separator ---- .. _enum_TileSet_TileOffsetAxis: -.. _class_TileSet_constant_TILE_OFFSET_AXIS_HORIZONTAL: - -.. _class_TileSet_constant_TILE_OFFSET_AXIS_VERTICAL: +.. rst-class:: classref-enumeration enum **TileOffsetAxis**: -- **TILE_OFFSET_AXIS_HORIZONTAL** = **0** --- Horizontal half-offset. +.. _class_TileSet_constant_TILE_OFFSET_AXIS_HORIZONTAL: -- **TILE_OFFSET_AXIS_VERTICAL** = **1** --- Vertical half-offset. +.. rst-class:: classref-enumeration-constant + +:ref:`TileOffsetAxis` **TILE_OFFSET_AXIS_HORIZONTAL** = ``0`` + +Horizontal half-offset. + +.. _class_TileSet_constant_TILE_OFFSET_AXIS_VERTICAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`TileOffsetAxis` **TILE_OFFSET_AXIS_VERTICAL** = ``1`` + +Vertical half-offset. + +.. rst-class:: classref-item-separator ---- .. _enum_TileSet_CellNeighbor: -.. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_CORNER: - -.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER: - -.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_CORNER: - -.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_CORNER: - -.. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_CORNER: - -.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_CORNER: - -.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_CORNER: - -.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_SIDE: - -.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_CORNER: +.. rst-class:: classref-enumeration enum **CellNeighbor**: -- **CELL_NEIGHBOR_RIGHT_SIDE** = **0** --- Neighbor on the right side. +.. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_SIDE: -- **CELL_NEIGHBOR_RIGHT_CORNER** = **1** --- Neighbor in the right corner. +.. rst-class:: classref-enumeration-constant -- **CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE** = **2** --- Neighbor on the bottom right side. +:ref:`CellNeighbor` **CELL_NEIGHBOR_RIGHT_SIDE** = ``0`` -- **CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER** = **3** --- Neighbor in the bottom right corner. +Neighbor on the right side. -- **CELL_NEIGHBOR_BOTTOM_SIDE** = **4** --- Neighbor on the bottom side. +.. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_CORNER: -- **CELL_NEIGHBOR_BOTTOM_CORNER** = **5** --- Neighbor in the bottom corner. +.. rst-class:: classref-enumeration-constant -- **CELL_NEIGHBOR_BOTTOM_LEFT_SIDE** = **6** --- Neighbor on the bottom left side. +:ref:`CellNeighbor` **CELL_NEIGHBOR_RIGHT_CORNER** = ``1`` -- **CELL_NEIGHBOR_BOTTOM_LEFT_CORNER** = **7** --- Neighbor in the bottom left corner. +Neighbor in the right corner. -- **CELL_NEIGHBOR_LEFT_SIDE** = **8** --- Neighbor on the left side. +.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE: -- **CELL_NEIGHBOR_LEFT_CORNER** = **9** --- Neighbor in the left corner. +.. rst-class:: classref-enumeration-constant -- **CELL_NEIGHBOR_TOP_LEFT_SIDE** = **10** --- Neighbor on the top left side. +:ref:`CellNeighbor` **CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE** = ``2`` -- **CELL_NEIGHBOR_TOP_LEFT_CORNER** = **11** --- Neighbor in the top left corner. +Neighbor on the bottom right side. -- **CELL_NEIGHBOR_TOP_SIDE** = **12** --- Neighbor on the top side. +.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER: -- **CELL_NEIGHBOR_TOP_CORNER** = **13** --- Neighbor in the top corner. +.. rst-class:: classref-enumeration-constant -- **CELL_NEIGHBOR_TOP_RIGHT_SIDE** = **14** --- Neighbor on the top right side. +:ref:`CellNeighbor` **CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER** = ``3`` -- **CELL_NEIGHBOR_TOP_RIGHT_CORNER** = **15** --- Neighbor in the top right corner. +Neighbor in the bottom right corner. + +.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_SIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_BOTTOM_SIDE** = ``4`` + +Neighbor on the bottom side. + +.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_CORNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_BOTTOM_CORNER** = ``5`` + +Neighbor in the bottom corner. + +.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_SIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_BOTTOM_LEFT_SIDE** = ``6`` + +Neighbor on the bottom left side. + +.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_CORNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_BOTTOM_LEFT_CORNER** = ``7`` + +Neighbor in the bottom left corner. + +.. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_SIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_LEFT_SIDE** = ``8`` + +Neighbor on the left side. + +.. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_CORNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_LEFT_CORNER** = ``9`` + +Neighbor in the left corner. + +.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_SIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_TOP_LEFT_SIDE** = ``10`` + +Neighbor on the top left side. + +.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_CORNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_TOP_LEFT_CORNER** = ``11`` + +Neighbor in the top left corner. + +.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_SIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_TOP_SIDE** = ``12`` + +Neighbor on the top side. + +.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_CORNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_TOP_CORNER** = ``13`` + +Neighbor in the top corner. + +.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_SIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_TOP_RIGHT_SIDE** = ``14`` + +Neighbor on the top right side. + +.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_CORNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellNeighbor` **CELL_NEIGHBOR_TOP_RIGHT_CORNER** = ``15`` + +Neighbor in the top right corner. + +.. rst-class:: classref-item-separator ---- .. _enum_TileSet_TerrainMode: -.. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS_AND_SIDES: - -.. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS: - -.. _class_TileSet_constant_TERRAIN_MODE_MATCH_SIDES: +.. rst-class:: classref-enumeration enum **TerrainMode**: -- **TERRAIN_MODE_MATCH_CORNERS_AND_SIDES** = **0** --- Requires both corners and side to match with neighboring tiles' terrains. +.. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS_AND_SIDES: -- **TERRAIN_MODE_MATCH_CORNERS** = **1** --- Requires corners to match with neighboring tiles' terrains. +.. rst-class:: classref-enumeration-constant -- **TERRAIN_MODE_MATCH_SIDES** = **2** --- Requires sides to match with neighboring tiles' terrains. +:ref:`TerrainMode` **TERRAIN_MODE_MATCH_CORNERS_AND_SIDES** = ``0`` + +Requires both corners and side to match with neighboring tiles' terrains. + +.. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`TerrainMode` **TERRAIN_MODE_MATCH_CORNERS** = ``1`` + +Requires corners to match with neighboring tiles' terrains. + +.. _class_TileSet_constant_TERRAIN_MODE_MATCH_SIDES: + +.. rst-class:: classref-enumeration-constant + +:ref:`TerrainMode` **TERRAIN_MODE_MATCH_SIDES** = ``2`` + +Requires sides to match with neighboring tiles' terrains. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TileSet_property_tile_layout: -- :ref:`TileLayout` **tile_layout** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_tile_layout(value) | -+-----------+------------------------+ -| *Getter* | get_tile_layout() | -+-----------+------------------------+ +:ref:`TileLayout` **tile_layout** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tile_layout** **(** :ref:`TileLayout` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_property_tile_offset_axis: -- :ref:`TileOffsetAxis` **tile_offset_axis** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------+ -| *Setter* | set_tile_offset_axis(value) | -+-----------+-----------------------------+ -| *Getter* | get_tile_offset_axis() | -+-----------+-----------------------------+ +:ref:`TileOffsetAxis` **tile_offset_axis** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tile_offset_axis** **(** :ref:`TileOffsetAxis` value **)** +- :ref:`TileOffsetAxis` **get_tile_offset_axis** **(** **)** For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_property_tile_shape: -- :ref:`TileShape` **tile_shape** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_tile_shape(value) | -+-----------+-----------------------+ -| *Getter* | get_tile_shape() | -+-----------+-----------------------+ +:ref:`TileShape` **tile_shape** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tile_shape** **(** :ref:`TileShape` value **)** +- :ref:`TileShape` **get_tile_shape** **(** **)** The tile shape. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_property_tile_size: -- :ref:`Vector2i` **tile_size** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector2i(16, 16)`` | -+-----------+----------------------+ -| *Setter* | set_tile_size(value) | -+-----------+----------------------+ -| *Getter* | get_tile_size() | -+-----------+----------------------+ +:ref:`Vector2i` **tile_size** = ``Vector2i(16, 16)`` + +.. rst-class:: classref-property-setget + +- void **set_tile_size** **(** :ref:`Vector2i` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_property_uv_clipping: -- :ref:`bool` **uv_clipping** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_uv_clipping(value) | -+-----------+------------------------+ -| *Getter* | is_uv_clipping() | -+-----------+------------------------+ +:ref:`bool` **uv_clipping** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_uv_clipping** **(** :ref:`bool` value **)** +- :ref:`bool` **is_uv_clipping** **(** **)** Enables/Disable uv clipping when rendering the tiles. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TileSet_method_add_custom_data_layer: -- void **add_custom_data_layer** **(** :ref:`int` to_position=-1 **)** +.. rst-class:: classref-method + +void **add_custom_data_layer** **(** :ref:`int` to_position=-1 **)** 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. Custom data layers allow assigning custom properties to atlas tiles. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_add_navigation_layer: -- void **add_navigation_layer** **(** :ref:`int` to_position=-1 **)** +.. rst-class:: classref-method + +void **add_navigation_layer** **(** :ref:`int` to_position=-1 **)** 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. Navigation layers allow assigning a navigable area to atlas tiles. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_add_occlusion_layer: -- void **add_occlusion_layer** **(** :ref:`int` to_position=-1 **)** +.. rst-class:: classref-method + +void **add_occlusion_layer** **(** :ref:`int` to_position=-1 **)** 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. Occlusion layers allow assigning occlusion polygons to atlas tiles. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_add_pattern: -- :ref:`int` **add_pattern** **(** :ref:`TileMapPattern` pattern, :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **add_pattern** **(** :ref:`TileMapPattern` pattern, :ref:`int` index=-1 **)** Adds a :ref:`TileMapPattern` to be stored in the TileSet resource. If provided, insert it at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_add_physics_layer: -- void **add_physics_layer** **(** :ref:`int` to_position=-1 **)** +.. rst-class:: classref-method + +void **add_physics_layer** **(** :ref:`int` to_position=-1 **)** 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. Physics layers allow assigning collision polygons to atlas tiles. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_add_source: -- :ref:`int` **add_source** **(** :ref:`TileSetSource` source, :ref:`int` atlas_source_id_override=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **add_source** **(** :ref:`TileSetSource` source, :ref:`int` atlas_source_id_override=-1 **)** Adds a :ref:`TileSetSource` to the TileSet. If ``atlas_source_id_override`` is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. The function returns the added source source ID or -1 if the source could not be added. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_add_terrain: -- void **add_terrain** **(** :ref:`int` terrain_set, :ref:`int` to_position=-1 **)** +.. rst-class:: classref-method + +void **add_terrain** **(** :ref:`int` terrain_set, :ref:`int` to_position=-1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_add_terrain_set: -- void **add_terrain_set** **(** :ref:`int` to_position=-1 **)** +.. rst-class:: classref-method + +void **add_terrain_set** **(** :ref:`int` to_position=-1 **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_cleanup_invalid_tile_proxies: -- void **cleanup_invalid_tile_proxies** **(** **)** +.. rst-class:: classref-method + +void **cleanup_invalid_tile_proxies** **(** **)** Clears tile proxies pointing to invalid tiles. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_clear_tile_proxies: -- void **clear_tile_proxies** **(** **)** +.. rst-class:: classref-method + +void **clear_tile_proxies** **(** **)** Clears all tile proxies. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_alternative_level_tile_proxy: -- :ref:`Array` **get_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** +.. rst-class:: classref-method + +:ref:`Array` **get_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** 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). If the TileSet has no proxy for the given identifiers, returns an empty Array. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_coords_level_tile_proxy: -- :ref:`Array` **get_coords_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** +.. rst-class:: classref-method + +:ref:`Array` **get_coords_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** 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). If the TileSet has no proxy for the given identifiers, returns an empty Array. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_custom_data_layer_by_name: -- :ref:`int` **get_custom_data_layer_by_name** **(** :ref:`String` layer_name **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_custom_data_layer_by_name** **(** :ref:`String` layer_name **)** |const| Returns the index of the custom data layer identified by the given name. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_custom_data_layer_name: -- :ref:`String` **get_custom_data_layer_name** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_custom_data_layer_name** **(** :ref:`int` layer_index **)** |const| Returns the name of the custom data layer identified by the given index. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_custom_data_layer_type: -- :ref:`Variant.Type` **get_custom_data_layer_type** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`Variant.Type` **get_custom_data_layer_type** **(** :ref:`int` layer_index **)** |const| Returns the type of the custom data layer identified by the given index. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_custom_data_layers_count: -- :ref:`int` **get_custom_data_layers_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_custom_data_layers_count** **(** **)** |const| Returns the custom data layers count. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_navigation_layer_layers: -- :ref:`int` **get_navigation_layer_layers** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_navigation_layer_layers** **(** :ref:`int` layer_index **)** |const| Returns the navigation layers (as in the Navigation server) of the gives TileSet navigation layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_navigation_layers_count: -- :ref:`int` **get_navigation_layers_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_navigation_layers_count** **(** **)** |const| Returns the navigation layers count. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_next_source_id: -- :ref:`int` **get_next_source_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_next_source_id** **(** **)** |const| Returns a new unused source ID. This generated ID is the same that a call to ``add_source`` would return. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_occlusion_layer_light_mask: -- :ref:`int` **get_occlusion_layer_light_mask** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_occlusion_layer_light_mask** **(** :ref:`int` layer_index **)** |const| Returns the light mask of the occlusion layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_occlusion_layer_sdf_collision: -- :ref:`bool` **get_occlusion_layer_sdf_collision** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_occlusion_layer_sdf_collision** **(** :ref:`int` layer_index **)** |const| Returns if the occluders from this layer use ``sdf_collision``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_occlusion_layers_count: -- :ref:`int` **get_occlusion_layers_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_occlusion_layers_count** **(** **)** |const| Returns the occlusion layers count. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_pattern: -- :ref:`TileMapPattern` **get_pattern** **(** :ref:`int` index=-1 **)** +.. rst-class:: classref-method + +:ref:`TileMapPattern` **get_pattern** **(** :ref:`int` index=-1 **)** Returns the :ref:`TileMapPattern` at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_patterns_count: -- :ref:`int` **get_patterns_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_patterns_count** **(** **)** Returns the number of :ref:`TileMapPattern` this tile set handles. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_physics_layer_collision_layer: -- :ref:`int` **get_physics_layer_collision_layer** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_physics_layer_collision_layer** **(** :ref:`int` layer_index **)** |const| Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_physics_layer_collision_mask: -- :ref:`int` **get_physics_layer_collision_mask** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_physics_layer_collision_mask** **(** :ref:`int` layer_index **)** |const| Returns the collision mask of bodies on the given TileSet's physics layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_physics_layer_physics_material: -- :ref:`PhysicsMaterial` **get_physics_layer_physics_material** **(** :ref:`int` layer_index **)** |const| +.. rst-class:: classref-method + +:ref:`PhysicsMaterial` **get_physics_layer_physics_material** **(** :ref:`int` layer_index **)** |const| Returns the physics material of bodies on the given TileSet's physics layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_physics_layers_count: -- :ref:`int` **get_physics_layers_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_physics_layers_count** **(** **)** |const| Returns the physics layers count. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_source: -- :ref:`TileSetSource` **get_source** **(** :ref:`int` source_id **)** |const| +.. rst-class:: classref-method + +:ref:`TileSetSource` **get_source** **(** :ref:`int` source_id **)** |const| Returns the :ref:`TileSetSource` with ID ``source_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_source_count: -- :ref:`int` **get_source_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_source_count** **(** **)** |const| Returns the number of :ref:`TileSetSource` in this TileSet. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_source_id: -- :ref:`int` **get_source_id** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_source_id** **(** :ref:`int` index **)** |const| Returns the source ID for source with index ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_source_level_tile_proxy: -- :ref:`int` **get_source_level_tile_proxy** **(** :ref:`int` source_from **)** +.. rst-class:: classref-method + +:ref:`int` **get_source_level_tile_proxy** **(** :ref:`int` source_from **)** Returns the source-level proxy for the given source identifier. If the TileSet has no proxy for the given identifier, returns -1. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_terrain_color: -- :ref:`Color` **get_terrain_color** **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_terrain_color** **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| Returns a terrain's color. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_terrain_name: -- :ref:`String` **get_terrain_name** **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_terrain_name** **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** |const| Returns a terrain's name. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_terrain_set_mode: -- :ref:`TerrainMode` **get_terrain_set_mode** **(** :ref:`int` terrain_set **)** |const| +.. rst-class:: classref-method + +:ref:`TerrainMode` **get_terrain_set_mode** **(** :ref:`int` terrain_set **)** |const| Returns a terrain set mode. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_terrain_sets_count: -- :ref:`int` **get_terrain_sets_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_terrain_sets_count** **(** **)** |const| Returns the terrain sets count. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_get_terrains_count: -- :ref:`int` **get_terrains_count** **(** :ref:`int` terrain_set **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_terrains_count** **(** :ref:`int` terrain_set **)** |const| Returns the number of terrains in the given terrain set. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_has_alternative_level_tile_proxy: -- :ref:`bool` **has_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** +.. rst-class:: classref-method + +:ref:`bool` **has_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** Returns if there is and alternative-level proxy for the given identifiers. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_has_coords_level_tile_proxy: -- :ref:`bool` **has_coords_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** +.. rst-class:: classref-method + +:ref:`bool` **has_coords_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** Returns if there is a coodinates-level proxy for the given identifiers. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_has_source: -- :ref:`bool` **has_source** **(** :ref:`int` source_id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_source** **(** :ref:`int` source_id **)** |const| Returns if this TileSet has a source for the given source ID. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_has_source_level_tile_proxy: -- :ref:`bool` **has_source_level_tile_proxy** **(** :ref:`int` source_from **)** +.. rst-class:: classref-method + +:ref:`bool` **has_source_level_tile_proxy** **(** :ref:`int` source_from **)** Returns if there is a source-level proxy for the given source ID. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_map_tile_proxy: -- :ref:`Array` **map_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **map_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| 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. @@ -807,147 +1150,219 @@ This function first look for matching alternative-level proxies, then coordinate If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_move_custom_data_layer: -- void **move_custom_data_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **move_custom_data_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** Moves the custom data layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_move_navigation_layer: -- void **move_navigation_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **move_navigation_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** Moves the navigation layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_move_occlusion_layer: -- void **move_occlusion_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **move_occlusion_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** Moves the occlusion layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_move_physics_layer: -- void **move_physics_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **move_physics_layer** **(** :ref:`int` layer_index, :ref:`int` to_position **)** Moves the physics layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_move_terrain: -- void **move_terrain** **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **move_terrain** **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`int` to_position **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_move_terrain_set: -- void **move_terrain_set** **(** :ref:`int` terrain_set, :ref:`int` to_position **)** +.. rst-class:: classref-method + +void **move_terrain_set** **(** :ref:`int` terrain_set, :ref:`int` to_position **)** Moves the terrain set at index ``terrain_set`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_alternative_level_tile_proxy: -- void **remove_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** +.. rst-class:: classref-method + +void **remove_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** Removes an alternative-level proxy for the given identifiers. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_coords_level_tile_proxy: -- void **remove_coords_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** +.. rst-class:: classref-method + +void **remove_coords_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** Removes a coordinates-level proxy for the given identifiers. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_custom_data_layer: -- void **remove_custom_data_layer** **(** :ref:`int` layer_index **)** +.. rst-class:: classref-method + +void **remove_custom_data_layer** **(** :ref:`int` layer_index **)** Removes the custom data layer at index ``layer_index``. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_navigation_layer: -- void **remove_navigation_layer** **(** :ref:`int` layer_index **)** +.. rst-class:: classref-method + +void **remove_navigation_layer** **(** :ref:`int` layer_index **)** Removes the navigation layer at index ``layer_index``. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_occlusion_layer: -- void **remove_occlusion_layer** **(** :ref:`int` layer_index **)** +.. rst-class:: classref-method + +void **remove_occlusion_layer** **(** :ref:`int` layer_index **)** Removes the occlusion layer at index ``layer_index``. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_pattern: -- void **remove_pattern** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_pattern** **(** :ref:`int` index **)** Remove the :ref:`TileMapPattern` at the given index. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_physics_layer: -- void **remove_physics_layer** **(** :ref:`int` layer_index **)** +.. rst-class:: classref-method + +void **remove_physics_layer** **(** :ref:`int` layer_index **)** Removes the physics layer at index ``layer_index``. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_source: -- void **remove_source** **(** :ref:`int` source_id **)** +.. rst-class:: classref-method + +void **remove_source** **(** :ref:`int` source_id **)** Removes the source with the given source ID. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_source_level_tile_proxy: -- void **remove_source_level_tile_proxy** **(** :ref:`int` source_from **)** +.. rst-class:: classref-method + +void **remove_source_level_tile_proxy** **(** :ref:`int` source_from **)** Removes a source-level tile proxy. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_terrain: -- void **remove_terrain** **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** +.. rst-class:: classref-method + +void **remove_terrain** **(** :ref:`int` terrain_set, :ref:`int` terrain_index **)** Removes the terrain at index ``terrain_index`` in the given terrain set ``terrain_set``. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_remove_terrain_set: -- void **remove_terrain_set** **(** :ref:`int` terrain_set **)** +.. rst-class:: classref-method + +void **remove_terrain_set** **(** :ref:`int` terrain_set **)** Removes the terrain set at index ``terrain_set``. Also updates the atlas tiles accordingly. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_alternative_level_tile_proxy: -- void **set_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from, :ref:`int` source_to, :ref:`Vector2i` coords_to, :ref:`int` alternative_to **)** +.. rst-class:: classref-method + +void **set_alternative_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from, :ref:`int` source_to, :ref:`Vector2i` coords_to, :ref:`int` alternative_to **)** Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. @@ -955,11 +1370,15 @@ This can be used to replace a tile in all TileMaps using this TileSet, as TileMa Proxied tiles can be automatically replaced in TileMap nodes using the editor. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_coords_level_tile_proxy: -- void **set_coords_level_tile_proxy** **(** :ref:`int` p_source_from, :ref:`Vector2i` coords_from, :ref:`int` source_to, :ref:`Vector2i` coords_to **)** +.. rst-class:: classref-method + +void **set_coords_level_tile_proxy** **(** :ref:`int` p_source_from, :ref:`Vector2i` coords_from, :ref:`int` source_to, :ref:`Vector2i` coords_to **)** 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. @@ -967,83 +1386,123 @@ This can be used to replace a tile in all TileMaps using this TileSet, as TileMa Proxied tiles can be automatically replaced in TileMap nodes using the editor. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_custom_data_layer_name: -- void **set_custom_data_layer_name** **(** :ref:`int` layer_index, :ref:`String` layer_name **)** +.. rst-class:: classref-method + +void **set_custom_data_layer_name** **(** :ref:`int` layer_index, :ref:`String` 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_custom_data_layer_type: -- void **set_custom_data_layer_type** **(** :ref:`int` layer_index, :ref:`Variant.Type` layer_type **)** +.. rst-class:: classref-method + +void **set_custom_data_layer_type** **(** :ref:`int` layer_index, :ref:`Variant.Type` layer_type **)** Sets the type of the custom data layer identified by the given index. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_navigation_layer_layers: -- void **set_navigation_layer_layers** **(** :ref:`int` layer_index, :ref:`int` layers **)** +.. rst-class:: classref-method + +void **set_navigation_layer_layers** **(** :ref:`int` layer_index, :ref:`int` layers **)** Sets the navigation layers (as in the navigation server) for navigation regions is the given TileSet navigation layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_occlusion_layer_light_mask: -- void **set_occlusion_layer_light_mask** **(** :ref:`int` layer_index, :ref:`int` light_mask **)** +.. rst-class:: classref-method + +void **set_occlusion_layer_light_mask** **(** :ref:`int` layer_index, :ref:`int` light_mask **)** Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_occlusion_layer_sdf_collision: -- void **set_occlusion_layer_sdf_collision** **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** +.. rst-class:: classref-method + +void **set_occlusion_layer_sdf_collision** **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** Enables or disables sdf collision for occluders in the given TileSet occlusion layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_physics_layer_collision_layer: -- void **set_physics_layer_collision_layer** **(** :ref:`int` layer_index, :ref:`int` layer **)** +.. rst-class:: classref-method + +void **set_physics_layer_collision_layer** **(** :ref:`int` layer_index, :ref:`int` layer **)** Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_physics_layer_collision_mask: -- void **set_physics_layer_collision_mask** **(** :ref:`int` layer_index, :ref:`int` mask **)** +.. rst-class:: classref-method + +void **set_physics_layer_collision_mask** **(** :ref:`int` layer_index, :ref:`int` mask **)** Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_physics_layer_physics_material: -- void **set_physics_layer_physics_material** **(** :ref:`int` layer_index, :ref:`PhysicsMaterial` physics_material **)** +.. rst-class:: classref-method + +void **set_physics_layer_physics_material** **(** :ref:`int` layer_index, :ref:`PhysicsMaterial` physics_material **)** Sets the physics material for bodies in the given TileSet physics layer. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_source_id: -- void **set_source_id** **(** :ref:`int` source_id, :ref:`int` new_source_id **)** +.. rst-class:: classref-method + +void **set_source_id** **(** :ref:`int` source_id, :ref:`int` new_source_id **)** Changes a source's ID. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_source_level_tile_proxy: -- void **set_source_level_tile_proxy** **(** :ref:`int` source_from, :ref:`int` source_to **)** +.. rst-class:: classref-method + +void **set_source_level_tile_proxy** **(** :ref:`int` source_from, :ref:`int` source_to **)** 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 atlac coordinates ID and the alternative tile ID are kept the same when using source-level proxies. @@ -1051,27 +1510,39 @@ This can be used to replace a source in all TileMaps using this TileSet, as Tile Proxied tiles can be automatically replaced in TileMap nodes using the editor. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_terrain_color: -- void **set_terrain_color** **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_terrain_color** **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`Color` color **)** Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_terrain_name: -- void **set_terrain_name** **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_terrain_name** **(** :ref:`int` terrain_set, :ref:`int` terrain_index, :ref:`String` name **)** Sets a terrain's name. +.. rst-class:: classref-item-separator + ---- .. _class_TileSet_method_set_terrain_set_mode: -- void **set_terrain_set_mode** **(** :ref:`int` terrain_set, :ref:`TerrainMode` mode **)** +.. rst-class:: classref-method + +void **set_terrain_set_mode** **(** :ref:`int` terrain_set, :ref:`TerrainMode` mode **)** Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighbouring tiles' terrains. diff --git a/classes/class_tilesetatlassource.rst b/classes/class_tilesetatlassource.rst index 2892eb5b4..f9ee419a6 100644 --- a/classes/class_tilesetatlassource.rst +++ b/classes/class_tilesetatlassource.rst @@ -14,6 +14,8 @@ TileSetAtlasSource Exposes a 2D atlas texture as a set of tiles for a :ref:`TileSet` resource. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,315 +29,416 @@ Each tile alternate has a set of properties that is defined by the source's :ref As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using ``TileSetAtlasSource.set("://")``. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector2i` | :ref:`margins` | ``Vector2i(0, 0)`` | -+-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector2i` | :ref:`separation` | ``Vector2i(0, 0)`` | -+-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ -| :ref:`Texture2D` | :ref:`texture` | | -+-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector2i` | :ref:`texture_region_size` | ``Vector2i(16, 16)`` | -+-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`use_texture_padding` | ``true`` | -+-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector2i` | :ref:`margins` | ``Vector2i(0, 0)`` | + +-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector2i` | :ref:`separation` | ``Vector2i(0, 0)`` | + +-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector2i` | :ref:`texture_region_size` | ``Vector2i(16, 16)`` | + +-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`use_texture_padding` | ``true`` | + +-----------------------------------+-----------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_alternative_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_id_override=-1 **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size=Vector2i(1, 1) **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_atlas_grid_size` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_next_alternative_tile_id` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_runtime_texture` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`get_runtime_tile_texture_region` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tile_animation_columns` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_tile_animation_frame_duration` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tile_animation_frames_count` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_tile_animation_separation` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_tile_animation_speed` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_tile_animation_total_duration` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_tile_at_coords` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TileData` | :ref:`get_tile_data` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_tile_size_in_atlas` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`get_tile_texture_region` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame=0 **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`get_tiles_to_be_removed_on_change` **(** :ref:`Texture2D` texture, :ref:`Vector2i` margins, :ref:`Vector2i` separation, :ref:`Vector2i` texture_region_size **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_room_for_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size, :ref:`int` animation_columns, :ref:`Vector2i` animation_separation, :ref:`int` frames_count, :ref:`Vector2i` ignored_tile=Vector2i(-1, -1) **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_tile_in_atlas` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` new_atlas_coords=Vector2i(-1, -1), :ref:`Vector2i` new_size=Vector2i(-1, -1) **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_alternative_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_tile` **(** :ref:`Vector2i` atlas_coords **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_alternative_tile_id` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile, :ref:`int` new_id **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tile_animation_columns` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_columns **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tile_animation_frame_duration` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index, :ref:`float` duration **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tile_animation_frames_count` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frames_count **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tile_animation_separation` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` separation **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tile_animation_speed` **(** :ref:`Vector2i` atlas_coords, :ref:`float` speed **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_alternative_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_id_override=-1 **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size=Vector2i(1, 1) **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_atlas_grid_size` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_next_alternative_tile_id` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_runtime_texture` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_runtime_tile_texture_region` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tile_animation_columns` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_tile_animation_frame_duration` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tile_animation_frames_count` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_tile_animation_separation` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_tile_animation_speed` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_tile_animation_total_duration` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_tile_at_coords` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileData` | :ref:`get_tile_data` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_tile_size_in_atlas` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_tile_texture_region` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame=0 **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_tiles_to_be_removed_on_change` **(** :ref:`Texture2D` texture, :ref:`Vector2i` margins, :ref:`Vector2i` separation, :ref:`Vector2i` texture_region_size **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_room_for_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size, :ref:`int` animation_columns, :ref:`Vector2i` animation_separation, :ref:`int` frames_count, :ref:`Vector2i` ignored_tile=Vector2i(-1, -1) **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_tile_in_atlas` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` new_atlas_coords=Vector2i(-1, -1), :ref:`Vector2i` new_size=Vector2i(-1, -1) **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_alternative_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_tile` **(** :ref:`Vector2i` atlas_coords **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_alternative_tile_id` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile, :ref:`int` new_id **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tile_animation_columns` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_columns **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tile_animation_frame_duration` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index, :ref:`float` duration **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tile_animation_frames_count` **(** :ref:`Vector2i` atlas_coords, :ref:`int` frames_count **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tile_animation_separation` **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` separation **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tile_animation_speed` **(** :ref:`Vector2i` atlas_coords, :ref:`float` speed **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TileSetAtlasSource_property_margins: -- :ref:`Vector2i` **margins** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+--------------------+ -| *Setter* | set_margins(value) | -+-----------+--------------------+ -| *Getter* | get_margins() | -+-----------+--------------------+ +:ref:`Vector2i` **margins** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_margins** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_margins** **(** **)** Margins, in pixels, to offset the origin of the grid in the texture. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_property_separation: -- :ref:`Vector2i` **separation** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_separation(value) | -+-----------+-----------------------+ -| *Getter* | get_separation() | -+-----------+-----------------------+ +:ref:`Vector2i` **separation** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_separation** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_separation** **(** **)** Separation, in pixels, between each tile texture region of the grid. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The atlas texture. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_property_texture_region_size: -- :ref:`Vector2i` **texture_region_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``Vector2i(16, 16)`` | -+-----------+--------------------------------+ -| *Setter* | set_texture_region_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_texture_region_size() | -+-----------+--------------------------------+ +:ref:`Vector2i` **texture_region_size** = ``Vector2i(16, 16)`` + +.. rst-class:: classref-property-setget + +- void **set_texture_region_size** **(** :ref:`Vector2i` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_property_use_texture_padding: -- :ref:`bool` **use_texture_padding** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------+ -| *Setter* | set_use_texture_padding(value) | -+-----------+--------------------------------+ -| *Getter* | get_use_texture_padding() | -+-----------+--------------------------------+ +:ref:`bool` **use_texture_padding** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_texture_padding** **(** :ref:`bool` value **)** +- :ref:`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. Disabling this setting might lead a small performance improvement, as generating the internal texture requires both memory and processing time when the TileSetAtlasSource resource is modified. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TileSetAtlasSource_method_create_alternative_tile: -- :ref:`int` **create_alternative_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_id_override=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **create_alternative_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_id_override=-1 **)** 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. Returns the new alternative identifier, or -1 if the alternative could not be created with a provided ``alternative_id_override``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_create_tile: -- void **create_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size=Vector2i(1, 1) **)** +.. rst-class:: classref-method + +void **create_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size=Vector2i(1, 1) **)** Creates a new tile at coordinates ``atlas_coords`` with the given ``size``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_atlas_grid_size: -- :ref:`Vector2i` **get_atlas_grid_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_atlas_grid_size** **(** **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_next_alternative_tile_id: -- :ref:`int` **get_next_alternative_tile_id** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_next_alternative_tile_id** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns the alternative ID a following call to :ref:`create_alternative_tile` would return. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_runtime_texture: -- :ref:`Texture2D` **get_runtime_texture** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_runtime_texture** **(** **)** |const| If :ref:`use_texture_padding` is ``false``, returns :ref:`texture`. Otherwise, returns and internal :ref:`ImageTexture` created that includes the padding. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_runtime_tile_texture_region: -- :ref:`Rect2i` **get_runtime_tile_texture_region** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2i` **get_runtime_tile_texture_region** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame **)** |const| Returns the region of the tile at coordinates ``atlas_coords`` for the given ``frame`` inside the texture returned by :ref:`get_runtime_texture`. \ **Note:** If :ref:`use_texture_padding` is ``false``, returns the same as :ref:`get_tile_texture_region`. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_animation_columns: -- :ref:`int` **get_tile_animation_columns** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_tile_animation_columns** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns how many columns the tile at ``atlas_coords`` has in its animation layout. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_animation_frame_duration: -- :ref:`float` **get_tile_animation_frame_duration** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_tile_animation_frame_duration** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index **)** |const| Returns the animation frame duration of frame ``frame_index`` for the tile at coordinates ``atlas_coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_animation_frames_count: -- :ref:`int` **get_tile_animation_frames_count** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_tile_animation_frames_count** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns how many animation frames has the tile at coordinates ``atlas_coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_animation_separation: -- :ref:`Vector2i` **get_tile_animation_separation** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_tile_animation_separation** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns the separation (as in the atlas grid) between each frame of an animated tile at coordinates ``atlas_coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_animation_speed: -- :ref:`float` **get_tile_animation_speed** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_tile_animation_speed** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns the animation speed of the tile at coordinates ``atlas_coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_animation_total_duration: -- :ref:`float` **get_tile_animation_total_duration** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_tile_animation_total_duration** **(** :ref:`Vector2i` atlas_coords **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_at_coords: -- :ref:`Vector2i` **get_tile_at_coords** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_tile_at_coords** **(** :ref:`Vector2i` atlas_coords **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_data: -- :ref:`TileData` **get_tile_data** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| +.. rst-class:: classref-method + +:ref:`TileData` **get_tile_data** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| Returns the :ref:`TileData` object for the given atlas coordinates and alternative ID. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_size_in_atlas: -- :ref:`Vector2i` **get_tile_size_in_atlas** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_tile_size_in_atlas** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns the size of the tile (in the grid coordinates system) at coordinates ``atlas_coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tile_texture_region: -- :ref:`Rect2i` **get_tile_texture_region** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame=0 **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2i` **get_tile_texture_region** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame=0 **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_get_tiles_to_be_removed_on_change: -- :ref:`PackedVector2Array` **get_tiles_to_be_removed_on_change** **(** :ref:`Texture2D` texture, :ref:`Vector2i` margins, :ref:`Vector2i` separation, :ref:`Vector2i` texture_region_size **)** +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_tiles_to_be_removed_on_change** **(** :ref:`Texture2D` texture, :ref:`Vector2i` margins, :ref:`Vector2i` separation, :ref:`Vector2i` texture_region_size **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_has_room_for_tile: -- :ref:`bool` **has_room_for_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size, :ref:`int` animation_columns, :ref:`Vector2i` animation_separation, :ref:`int` frames_count, :ref:`Vector2i` ignored_tile=Vector2i(-1, -1) **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_room_for_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` size, :ref:`int` animation_columns, :ref:`Vector2i` animation_separation, :ref:`int` frames_count, :ref:`Vector2i` ignored_tile=Vector2i(-1, -1) **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_move_tile_in_atlas: -- void **move_tile_in_atlas** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` new_atlas_coords=Vector2i(-1, -1), :ref:`Vector2i` new_size=Vector2i(-1, -1) **)** +.. rst-class:: classref-method + +void **move_tile_in_atlas** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` new_atlas_coords=Vector2i(-1, -1), :ref:`Vector2i` new_size=Vector2i(-1, -1) **)** 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. @@ -343,71 +446,103 @@ If ``new_atlas_coords`` is ``Vector2i(-1, -1)``, keeps the tile's coordinates. I To avoid an error, first check if a move is possible using :ref:`has_room_for_tile`. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_remove_alternative_tile: -- void **remove_alternative_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** +.. rst-class:: classref-method + +void **remove_alternative_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** Remove a tile's alternative with alternative ID ``alternative_tile``. Calling this function with ``alternative_tile`` equals to 0 will fail, as the base tile alternative cannot be removed. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_remove_tile: -- void **remove_tile** **(** :ref:`Vector2i` atlas_coords **)** +.. rst-class:: classref-method + +void **remove_tile** **(** :ref:`Vector2i` atlas_coords **)** Remove a tile and its alternative at coordinates ``atlas_coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_set_alternative_tile_id: -- void **set_alternative_tile_id** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile, :ref:`int` new_id **)** +.. rst-class:: classref-method + +void **set_alternative_tile_id** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile, :ref:`int` new_id **)** Change a tile's alternative ID from ``alternative_tile`` to ``new_id``. Calling this function with ``new_id`` of 0 will fail, as the base tile alternative cannot be moved. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_set_tile_animation_columns: -- void **set_tile_animation_columns** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_columns **)** +.. rst-class:: classref-method + +void **set_tile_animation_columns** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_set_tile_animation_frame_duration: -- void **set_tile_animation_frame_duration** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index, :ref:`float` duration **)** +.. rst-class:: classref-method + +void **set_tile_animation_frame_duration** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frame_index, :ref:`float` duration **)** Sets the animation frame ``duration`` of frame ``frame_index`` for the tile at coordinates ``atlas_coords``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_set_tile_animation_frames_count: -- void **set_tile_animation_frames_count** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frames_count **)** +.. rst-class:: classref-method + +void **set_tile_animation_frames_count** **(** :ref:`Vector2i` atlas_coords, :ref:`int` frames_count **)** Sets how many animation frames the tile at coordinates ``atlas_coords`` has. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_set_tile_animation_separation: -- void **set_tile_animation_separation** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` separation **)** +.. rst-class:: classref-method + +void **set_tile_animation_separation** **(** :ref:`Vector2i` atlas_coords, :ref:`Vector2i` separation **)** Sets the margin (in grid tiles) between each tile in the animation layout of the tile at coordinates ``atlas_coords`` has. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetAtlasSource_method_set_tile_animation_speed: -- void **set_tile_animation_speed** **(** :ref:`Vector2i` atlas_coords, :ref:`float` speed **)** +.. rst-class:: classref-method + +void **set_tile_animation_speed** **(** :ref:`Vector2i` atlas_coords, :ref:`float` speed **)** Sets the animation speed of the tile at coordinates ``atlas_coords`` has. diff --git a/classes/class_tilesetscenescollectionsource.rst b/classes/class_tilesetscenescollectionsource.rst index e146e747c..dc66578fa 100644 --- a/classes/class_tilesetscenescollectionsource.rst +++ b/classes/class_tilesetscenescollectionsource.rst @@ -14,128 +14,183 @@ TileSetScenesCollectionSource Exposes a set of scenes as tiles for a :ref:`TileSet` resource. +.. rst-class:: classref-introduction-group + Description ----------- -When placed on a :ref:`TileMap`, tiles from ``TileSetScenesCollectionSource`` will automatically instantiate an associated scene at the cell's position in the TileMap. +When placed on a :ref:`TileMap`, tiles from **TileSetScenesCollectionSource** will automatically instantiate an associated scene at the cell's position in the TileMap. Scenes are instantiated as children of the :ref:`TileMap` when it enters the tree. If you add/remove a scene tile in the :ref:`TileMap` that is already inside the tree, the :ref:`TileMap` will automatically instantiate/free the scene accordingly. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_scene_tile` **(** :ref:`PackedScene` packed_scene, :ref:`int` id_override=-1 **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_next_scene_tile_id` **(** **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_scene_tile_display_placeholder` **(** :ref:`int` id **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_scene_tile_id` **(** :ref:`int` index **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedScene` | :ref:`get_scene_tile_scene` **(** :ref:`int` id **)** |const| | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_scene_tiles_count` **(** **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_scene_tile_id` **(** :ref:`int` id **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_scene_tile` **(** :ref:`int` id **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scene_tile_display_placeholder` **(** :ref:`int` id, :ref:`bool` display_placeholder **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scene_tile_id` **(** :ref:`int` id, :ref:`int` new_id **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scene_tile_scene` **(** :ref:`int` id, :ref:`PackedScene` packed_scene **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_scene_tile` **(** :ref:`PackedScene` packed_scene, :ref:`int` id_override=-1 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_next_scene_tile_id` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_scene_tile_display_placeholder` **(** :ref:`int` id **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_scene_tile_id` **(** :ref:`int` index **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedScene` | :ref:`get_scene_tile_scene` **(** :ref:`int` id **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_scene_tiles_count` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_scene_tile_id` **(** :ref:`int` id **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_scene_tile` **(** :ref:`int` id **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_scene_tile_display_placeholder` **(** :ref:`int` id, :ref:`bool` display_placeholder **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_scene_tile_id` **(** :ref:`int` id, :ref:`int` new_id **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_scene_tile_scene` **(** :ref:`int` id, :ref:`PackedScene` packed_scene **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TileSetScenesCollectionSource_method_create_scene_tile: -- :ref:`int` **create_scene_tile** **(** :ref:`PackedScene` packed_scene, :ref:`int` id_override=-1 **)** +.. rst-class:: classref-method + +:ref:`int` **create_scene_tile** **(** :ref:`PackedScene` packed_scene, :ref:`int` id_override=-1 **)** Creates a scene-based tile out of the given scene. Returns a newly generated unique ID. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_get_next_scene_tile_id: -- :ref:`int` **get_next_scene_tile_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_next_scene_tile_id** **(** **)** |const| Returns the scene ID a following call to :ref:`create_scene_tile` would return. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_get_scene_tile_display_placeholder: -- :ref:`bool` **get_scene_tile_display_placeholder** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_scene_tile_display_placeholder** **(** :ref:`int` id **)** |const| Returns whether the scene tile with ``id`` displays a placeholder in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_get_scene_tile_id: -- :ref:`int` **get_scene_tile_id** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +:ref:`int` **get_scene_tile_id** **(** :ref:`int` index **)** Returns the scene tile ID of the scene tile at ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_get_scene_tile_scene: -- :ref:`PackedScene` **get_scene_tile_scene** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`PackedScene` **get_scene_tile_scene** **(** :ref:`int` id **)** |const| Returns the :ref:`PackedScene` resource of scene tile with ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_get_scene_tiles_count: -- :ref:`int` **get_scene_tiles_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_scene_tiles_count** **(** **)** Returns the number or scene tiles this TileSet source has. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_has_scene_tile_id: -- :ref:`bool` **has_scene_tile_id** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +:ref:`bool` **has_scene_tile_id** **(** :ref:`int` id **)** Returns whether this TileSet source has a scene tile with ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_remove_scene_tile: -- void **remove_scene_tile** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_scene_tile** **(** :ref:`int` id **)** Remove the scene tile with ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_set_scene_tile_display_placeholder: -- void **set_scene_tile_display_placeholder** **(** :ref:`int` id, :ref:`bool` display_placeholder **)** +.. rst-class:: classref-method + +void **set_scene_tile_display_placeholder** **(** :ref:`int` id, :ref:`bool` 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. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_set_scene_tile_id: -- void **set_scene_tile_id** **(** :ref:`int` id, :ref:`int` new_id **)** +.. rst-class:: classref-method + +void **set_scene_tile_id** **(** :ref:`int` id, :ref:`int` new_id **)** Changes a scene tile's ID from ``id`` to ``new_id``. This will fail if there is already a tile with a ID equal to ``new_id``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetScenesCollectionSource_method_set_scene_tile_scene: -- void **set_scene_tile_scene** **(** :ref:`int` id, :ref:`PackedScene` packed_scene **)** +.. rst-class:: classref-method + +void **set_scene_tile_scene** **(** :ref:`int` id, :ref:`PackedScene` packed_scene **)** Assigns a :ref:`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. diff --git a/classes/class_tilesetsource.rst b/classes/class_tilesetsource.rst index 1295377a3..6559929d4 100644 --- a/classes/class_tilesetsource.rst +++ b/classes/class_tilesetsource.rst @@ -16,6 +16,8 @@ TileSetSource Exposes a set of tiles for a :ref:`TileSet` resource. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,41 +25,58 @@ Exposes a set of tiles for a :ref:`TileSet` resource. Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the :ref:`TileSetAtlasSource` class. -Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base ``TileSetSource`` class only exposes getters for them. +Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base **TileSetSource** class only exposes getters for them. You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using :ref:`get_tiles_count` and :ref:`get_tile_id`, then over alternative IDs using :ref:`get_alternative_tiles_count` and :ref:`get_alternative_tile_id`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_alternative_tile_id` **(** :ref:`Vector2i` atlas_coords, :ref:`int` index **)** |const| | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_alternative_tiles_count` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_tile_id` **(** :ref:`int` index **)** |const| | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tiles_count` **(** **)** |const| | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_alternative_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_tile` **(** :ref:`Vector2i` atlas_coords **)** |const| | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_alternative_tile_id` **(** :ref:`Vector2i` atlas_coords, :ref:`int` index **)** |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_alternative_tiles_count` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_tile_id` **(** :ref:`int` index **)** |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tiles_count` **(** **)** |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_alternative_tile` **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_tile` **(** :ref:`Vector2i` atlas_coords **)** |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TileSetSource_method_get_alternative_tile_id: -- :ref:`int` **get_alternative_tile_id** **(** :ref:`Vector2i` atlas_coords, :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_alternative_tile_id** **(** :ref:`Vector2i` atlas_coords, :ref:`int` index **)** |const| Returns the alternative ID for the tile with coordinates ID ``atlas_coords`` at index ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetSource_method_get_alternative_tiles_count: -- :ref:`int` **get_alternative_tiles_count** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_alternative_tiles_count** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns the number of alternatives tiles for the coordinates ID ``atlas_coords``. @@ -65,35 +84,51 @@ For :ref:`TileSetAtlasSource`, this always return at l Returns -1 if there is not tile at the given coords. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetSource_method_get_tile_id: -- :ref:`Vector2i` **get_tile_id** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_tile_id** **(** :ref:`int` index **)** |const| Returns the tile coordinates ID of the tile with index ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetSource_method_get_tiles_count: -- :ref:`int` **get_tiles_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_tiles_count** **(** **)** |const| Returns how many tiles this atlas source defines (not including alternative tiles). +.. rst-class:: classref-item-separator + ---- .. _class_TileSetSource_method_has_alternative_tile: -- :ref:`bool` **has_alternative_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_alternative_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`int` alternative_tile **)** |const| Returns if the base tile at coordinates ``atlas_coords`` has an alternative with ID ``alternative_tile``. +.. rst-class:: classref-item-separator + ---- .. _class_TileSetSource_method_has_tile: -- :ref:`bool` **has_tile** **(** :ref:`Vector2i` atlas_coords **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_tile** **(** :ref:`Vector2i` atlas_coords **)** |const| Returns if this atlas has a tile with coordinates ID ``atlas_coords``. diff --git a/classes/class_time.rst b/classes/class_time.rst index 09c053bfc..6fa2b348d 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -14,6 +14,8 @@ Time Time singleton for working with time. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,184 +29,301 @@ When getting time information from the system, the time can either be in the loc \ **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` or :ref:`get_ticks_msec` for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease). +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_date_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_date_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_date_string_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_date_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_datetime_dict_from_datetime_string` **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_datetime_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_datetime_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_datetime_string_from_datetime_dict` **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_datetime_string_from_system` **(** :ref:`bool` utc=false, :ref:`bool` use_space=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_datetime_string_from_unix_time` **(** :ref:`int` unix_time_val, :ref:`bool` use_space=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_offset_string_from_offset_minutes` **(** :ref:`int` offset_minutes **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_ticks_msec` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_ticks_usec` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_time_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_time_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_time_string_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_time_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_time_zone_from_system` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_unix_time_from_datetime_dict` **(** :ref:`Dictionary` datetime **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_unix_time_from_datetime_string` **(** :ref:`String` datetime **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_unix_time_from_system` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_date_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_date_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_date_string_from_system` **(** :ref:`bool` utc=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_date_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_datetime_dict_from_datetime_string` **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_datetime_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_datetime_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_datetime_string_from_datetime_dict` **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_datetime_string_from_system` **(** :ref:`bool` utc=false, :ref:`bool` use_space=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_datetime_string_from_unix_time` **(** :ref:`int` unix_time_val, :ref:`bool` use_space=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_offset_string_from_offset_minutes` **(** :ref:`int` offset_minutes **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_ticks_msec` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_ticks_usec` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_time_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_time_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_time_string_from_system` **(** :ref:`bool` utc=false **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_time_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_time_zone_from_system` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_unix_time_from_datetime_dict` **(** :ref:`Dictionary` datetime **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_unix_time_from_datetime_string` **(** :ref:`String` datetime **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_unix_time_from_system` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Time_Month: -.. _class_Time_constant_MONTH_JANUARY: - -.. _class_Time_constant_MONTH_FEBRUARY: - -.. _class_Time_constant_MONTH_MARCH: - -.. _class_Time_constant_MONTH_APRIL: - -.. _class_Time_constant_MONTH_MAY: - -.. _class_Time_constant_MONTH_JUNE: - -.. _class_Time_constant_MONTH_JULY: - -.. _class_Time_constant_MONTH_AUGUST: - -.. _class_Time_constant_MONTH_SEPTEMBER: - -.. _class_Time_constant_MONTH_OCTOBER: - -.. _class_Time_constant_MONTH_NOVEMBER: - -.. _class_Time_constant_MONTH_DECEMBER: +.. rst-class:: classref-enumeration enum **Month**: -- **MONTH_JANUARY** = **1** --- The month of January, represented numerically as ``01``. +.. _class_Time_constant_MONTH_JANUARY: -- **MONTH_FEBRUARY** = **2** --- The month of February, represented numerically as ``02``. +.. rst-class:: classref-enumeration-constant -- **MONTH_MARCH** = **3** --- The month of March, represented numerically as ``03``. +:ref:`Month` **MONTH_JANUARY** = ``1`` -- **MONTH_APRIL** = **4** --- The month of April, represented numerically as ``04``. +The month of January, represented numerically as ``01``. -- **MONTH_MAY** = **5** --- The month of May, represented numerically as ``05``. +.. _class_Time_constant_MONTH_FEBRUARY: -- **MONTH_JUNE** = **6** --- The month of June, represented numerically as ``06``. +.. rst-class:: classref-enumeration-constant -- **MONTH_JULY** = **7** --- The month of July, represented numerically as ``07``. +:ref:`Month` **MONTH_FEBRUARY** = ``2`` -- **MONTH_AUGUST** = **8** --- The month of August, represented numerically as ``08``. +The month of February, represented numerically as ``02``. -- **MONTH_SEPTEMBER** = **9** --- The month of September, represented numerically as ``09``. +.. _class_Time_constant_MONTH_MARCH: -- **MONTH_OCTOBER** = **10** --- The month of October, represented numerically as ``10``. +.. rst-class:: classref-enumeration-constant -- **MONTH_NOVEMBER** = **11** --- The month of November, represented numerically as ``11``. +:ref:`Month` **MONTH_MARCH** = ``3`` -- **MONTH_DECEMBER** = **12** --- The month of December, represented numerically as ``12``. +The month of March, represented numerically as ``03``. + +.. _class_Time_constant_MONTH_APRIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_APRIL** = ``4`` + +The month of April, represented numerically as ``04``. + +.. _class_Time_constant_MONTH_MAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_MAY** = ``5`` + +The month of May, represented numerically as ``05``. + +.. _class_Time_constant_MONTH_JUNE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_JUNE** = ``6`` + +The month of June, represented numerically as ``06``. + +.. _class_Time_constant_MONTH_JULY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_JULY** = ``7`` + +The month of July, represented numerically as ``07``. + +.. _class_Time_constant_MONTH_AUGUST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_AUGUST** = ``8`` + +The month of August, represented numerically as ``08``. + +.. _class_Time_constant_MONTH_SEPTEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_SEPTEMBER** = ``9`` + +The month of September, represented numerically as ``09``. + +.. _class_Time_constant_MONTH_OCTOBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_OCTOBER** = ``10`` + +The month of October, represented numerically as ``10``. + +.. _class_Time_constant_MONTH_NOVEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_NOVEMBER** = ``11`` + +The month of November, represented numerically as ``11``. + +.. _class_Time_constant_MONTH_DECEMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Month` **MONTH_DECEMBER** = ``12`` + +The month of December, represented numerically as ``12``. + +.. rst-class:: classref-item-separator ---- .. _enum_Time_Weekday: -.. _class_Time_constant_WEEKDAY_SUNDAY: - -.. _class_Time_constant_WEEKDAY_MONDAY: - -.. _class_Time_constant_WEEKDAY_TUESDAY: - -.. _class_Time_constant_WEEKDAY_WEDNESDAY: - -.. _class_Time_constant_WEEKDAY_THURSDAY: - -.. _class_Time_constant_WEEKDAY_FRIDAY: - -.. _class_Time_constant_WEEKDAY_SATURDAY: +.. rst-class:: classref-enumeration enum **Weekday**: -- **WEEKDAY_SUNDAY** = **0** --- The day of the week Sunday, represented numerically as ``0``. +.. _class_Time_constant_WEEKDAY_SUNDAY: -- **WEEKDAY_MONDAY** = **1** --- The day of the week Monday, represented numerically as ``1``. +.. rst-class:: classref-enumeration-constant -- **WEEKDAY_TUESDAY** = **2** --- The day of the week Tuesday, represented numerically as ``2``. +:ref:`Weekday` **WEEKDAY_SUNDAY** = ``0`` -- **WEEKDAY_WEDNESDAY** = **3** --- The day of the week Wednesday, represented numerically as ``3``. +The day of the week Sunday, represented numerically as ``0``. -- **WEEKDAY_THURSDAY** = **4** --- The day of the week Thursday, represented numerically as ``4``. +.. _class_Time_constant_WEEKDAY_MONDAY: -- **WEEKDAY_FRIDAY** = **5** --- The day of the week Friday, represented numerically as ``5``. +.. rst-class:: classref-enumeration-constant -- **WEEKDAY_SATURDAY** = **6** --- The day of the week Saturday, represented numerically as ``6``. +:ref:`Weekday` **WEEKDAY_MONDAY** = ``1`` + +The day of the week Monday, represented numerically as ``1``. + +.. _class_Time_constant_WEEKDAY_TUESDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **WEEKDAY_TUESDAY** = ``2`` + +The day of the week Tuesday, represented numerically as ``2``. + +.. _class_Time_constant_WEEKDAY_WEDNESDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **WEEKDAY_WEDNESDAY** = ``3`` + +The day of the week Wednesday, represented numerically as ``3``. + +.. _class_Time_constant_WEEKDAY_THURSDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **WEEKDAY_THURSDAY** = ``4`` + +The day of the week Thursday, represented numerically as ``4``. + +.. _class_Time_constant_WEEKDAY_FRIDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **WEEKDAY_FRIDAY** = ``5`` + +The day of the week Friday, represented numerically as ``5``. + +.. _class_Time_constant_WEEKDAY_SATURDAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Weekday` **WEEKDAY_SATURDAY** = ``6`` + +The day of the week Saturday, represented numerically as ``6``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Time_method_get_date_dict_from_system: -- :ref:`Dictionary` **get_date_dict_from_system** **(** :ref:`bool` utc=false **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_date_dict_from_system** **(** :ref:`bool` utc=false **)** |const| Returns the current date as a dictionary of keys: ``year``, ``month``, ``day``, and ``weekday``. The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_date_dict_from_unix_time: -- :ref:`Dictionary` **get_date_dict_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_date_dict_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| Converts the given Unix timestamp to a dictionary of keys: ``year``, ``month``, ``day``, and ``weekday``. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_date_string_from_system: -- :ref:`String` **get_date_string_from_system** **(** :ref:`bool` utc=false **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_date_string_from_system** **(** :ref:`bool` utc=false **)** |const| Returns the current date as an ISO 8601 date string (YYYY-MM-DD). The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_date_string_from_unix_time: -- :ref:`String` **get_date_string_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_date_string_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_datetime_dict_from_datetime_string: -- :ref:`Dictionary` **get_datetime_dict_from_datetime_string** **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_datetime_dict_from_datetime_string** **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| 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``. @@ -212,29 +331,41 @@ If ``weekday`` is ``false``, then the ``weekday`` entry is excluded (the calcula \ **Note:** Any decimal fraction in the time string will be ignored silently. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_datetime_dict_from_system: -- :ref:`Dictionary` **get_datetime_dict_from_system** **(** :ref:`bool` utc=false **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_datetime_dict_from_system** **(** :ref:`bool` utc=false **)** |const| Returns the current date as a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``hour``, ``minute``, ``second``, and ``dst`` (Daylight Savings Time). +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_datetime_dict_from_unix_time: -- :ref:`Dictionary` **get_datetime_dict_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_datetime_dict_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| Converts the given Unix timestamp to a dictionary of keys: ``year``, ``month``, ``day``, and ``weekday``. The returned Dictionary's values will be the same as the :ref:`get_datetime_dict_from_system` if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_datetime_string_from_datetime_dict: -- :ref:`String` **get_datetime_string_from_datetime_dict** **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_datetime_string_from_datetime_dict** **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). @@ -244,11 +375,15 @@ If the dictionary is empty, ``0`` is returned. If some keys are omitted, they de If ``use_space`` is ``true``, the date and time bits are separated by an empty space character instead of the letter T. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_datetime_string_from_system: -- :ref:`String` **get_datetime_string_from_system** **(** :ref:`bool` utc=false, :ref:`bool` use_space=false **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_datetime_string_from_system** **(** :ref:`bool` utc=false, :ref:`bool` use_space=false **)** |const| Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). @@ -256,93 +391,133 @@ The returned values are in the system's local time when ``utc`` is ``false``, ot If ``use_space`` is ``true``, the date and time bits are separated by an empty space character instead of the letter T. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_datetime_string_from_unix_time: -- :ref:`String` **get_datetime_string_from_unix_time** **(** :ref:`int` unix_time_val, :ref:`bool` use_space=false **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_datetime_string_from_unix_time** **(** :ref:`int` unix_time_val, :ref:`bool` use_space=false **)** |const| Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). If ``use_space`` is ``true``, the date and time bits are separated by an empty space character instead of the letter T. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_offset_string_from_offset_minutes: -- :ref:`String` **get_offset_string_from_offset_minutes** **(** :ref:`int` offset_minutes **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_offset_string_from_offset_minutes** **(** :ref:`int` offset_minutes **)** |const| 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". +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_ticks_msec: -- :ref:`int` **get_ticks_msec** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_ticks_msec** **(** **)** |const| Returns the amount of time passed in milliseconds since the engine started. Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly 500 million years). +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_ticks_usec: -- :ref:`int` **get_ticks_usec** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_ticks_usec** **(** **)** |const| Returns the amount of time passed in microseconds since the engine started. Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly half a million years). +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_time_dict_from_system: -- :ref:`Dictionary` **get_time_dict_from_system** **(** :ref:`bool` utc=false **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_time_dict_from_system** **(** :ref:`bool` utc=false **)** |const| Returns the current time as a dictionary of keys: ``hour``, ``minute``, and ``second``. The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_time_dict_from_unix_time: -- :ref:`Dictionary` **get_time_dict_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_time_dict_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| Converts the given time to a dictionary of keys: ``hour``, ``minute``, and ``second``. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_time_string_from_system: -- :ref:`String` **get_time_string_from_system** **(** :ref:`bool` utc=false **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_time_string_from_system** **(** :ref:`bool` utc=false **)** |const| Returns the current time as an ISO 8601 time string (HH:MM:SS). The returned values are in the system's local time when ``utc`` is ``false``, otherwise they are in UTC. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_time_string_from_unix_time: -- :ref:`String` **get_time_string_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_time_string_from_unix_time** **(** :ref:`int` unix_time_val **)** |const| Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS). +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_time_zone_from_system: -- :ref:`Dictionary` **get_time_zone_from_system** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary` **get_time_zone_from_system** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_unix_time_from_datetime_dict: -- :ref:`int` **get_unix_time_from_datetime_dict** **(** :ref:`Dictionary` datetime **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_unix_time_from_datetime_dict** **(** :ref:`Dictionary` datetime **)** |const| Converts a dictionary of time values to a Unix timestamp. @@ -354,11 +529,15 @@ You can pass the output from :ref:`get_datetime_dict_from_unix_time` **get_unix_time_from_datetime_string** **(** :ref:`String` datetime **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_unix_time_from_datetime_string** **(** :ref:`String` datetime **)** |const| 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. @@ -366,11 +545,15 @@ Converts the given ISO 8601 date and/or time string to a Unix timestamp. The str \ **Note:** Any decimal fraction in the time string will be ignored silently. +.. rst-class:: classref-item-separator + ---- .. _class_Time_method_get_unix_time_from_system: -- :ref:`float` **get_unix_time_from_system** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_unix_time_from_system** **(** **)** |const| 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. diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 0b8cf94db..677ce6173 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -14,6 +14,8 @@ Timer A countdown timer. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,184 +23,251 @@ Counts down a specified interval and emits a signal on reaching 0. Can be set to \ **Note:** To create a one-shot timer without instantiating a node, use :ref:`SceneTree.create_timer`. +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Dodge The Creeps Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`autostart` | ``false`` | -+--------------------------------------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`one_shot` | ``false`` | -+--------------------------------------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`paused` | | -+--------------------------------------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`TimerProcessCallback` | :ref:`process_callback` | ``1`` | -+--------------------------------------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`time_left` | | -+--------------------------------------------------------------+----------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`wait_time` | ``1.0`` | -+--------------------------------------------------------------+----------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`autostart` | ``false`` | + +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`one_shot` | ``false`` | + +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`paused` | | + +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`TimerProcessCallback` | :ref:`process_callback` | ``1`` | + +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`time_left` | | + +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`wait_time` | ``1.0`` | + +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_stopped` **(** **)** |const| | -+-------------------------+------------------------------------------------------------------------------------------+ -| void | :ref:`start` **(** :ref:`float` time_sec=-1 **)** | -+-------------------------+------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-------------------------+------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_stopped` **(** **)** |const| | + +-------------------------+------------------------------------------------------------------------------------------+ + | void | :ref:`start` **(** :ref:`float` time_sec=-1 **)** | + +-------------------------+------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-------------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Timer_signal_timeout: -- **timeout** **(** **)** +.. rst-class:: classref-signal + +**timeout** **(** **)** Emitted when the timer reaches 0. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Timer_TimerProcessCallback: -.. _class_Timer_constant_TIMER_PROCESS_PHYSICS: - -.. _class_Timer_constant_TIMER_PROCESS_IDLE: +.. rst-class:: classref-enumeration enum **TimerProcessCallback**: -- **TIMER_PROCESS_PHYSICS** = **0** --- Update the timer during the physics step at each frame (fixed framerate processing). +.. _class_Timer_constant_TIMER_PROCESS_PHYSICS: -- **TIMER_PROCESS_IDLE** = **1** --- Update the timer during the idle time at each frame. +.. rst-class:: classref-enumeration-constant + +:ref:`TimerProcessCallback` **TIMER_PROCESS_PHYSICS** = ``0`` + +Update the timer during the physics step at each frame (fixed framerate processing). + +.. _class_Timer_constant_TIMER_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TimerProcessCallback` **TIMER_PROCESS_IDLE** = ``1`` + +Update the timer during the idle time at each frame. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Timer_property_autostart: -- :ref:`bool` **autostart** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_autostart(value) | -+-----------+----------------------+ -| *Getter* | has_autostart() | -+-----------+----------------------+ +:ref:`bool` **autostart** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_autostart** **(** :ref:`bool` value **)** +- :ref:`bool` **has_autostart** **(** **)** If ``true``, the timer will automatically start when entering the scene tree. \ **Note:** This property is automatically set to ``false`` after the timer enters the scene tree and starts. +.. rst-class:: classref-item-separator + ---- .. _class_Timer_property_one_shot: -- :ref:`bool` **one_shot** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_one_shot(value) | -+-----------+---------------------+ -| *Getter* | is_one_shot() | -+-----------+---------------------+ +:ref:`bool` **one_shot** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_one_shot** **(** :ref:`bool` value **)** +- :ref:`bool` **is_one_shot** **(** **)** If ``true``, the timer will stop when reaching 0. If ``false``, it will restart. +.. rst-class:: classref-item-separator + ---- .. _class_Timer_property_paused: -- :ref:`bool` **paused** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_paused(value) | -+----------+-------------------+ -| *Getter* | is_paused() | -+----------+-------------------+ +:ref:`bool` **paused** + +.. rst-class:: classref-property-setget + +- void **set_paused** **(** :ref:`bool` value **)** +- :ref:`bool` **is_paused** **(** **)** If ``true``, the timer is paused and will not process until it is unpaused again, even if :ref:`start` is called. +.. rst-class:: classref-item-separator + ---- .. _class_Timer_property_process_callback: -- :ref:`TimerProcessCallback` **process_callback** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------------+ -| *Setter* | set_timer_process_callback(value) | -+-----------+-----------------------------------+ -| *Getter* | get_timer_process_callback() | -+-----------+-----------------------------------+ +:ref:`TimerProcessCallback` **process_callback** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_timer_process_callback** **(** :ref:`TimerProcessCallback` value **)** +- :ref:`TimerProcessCallback` **get_timer_process_callback** **(** **)** Processing callback. See :ref:`TimerProcessCallback`. +.. rst-class:: classref-item-separator + ---- .. _class_Timer_property_time_left: -- :ref:`float` **time_left** +.. rst-class:: classref-property -+----------+-----------------+ -| *Getter* | get_time_left() | -+----------+-----------------+ +:ref:`float` **time_left** + +.. rst-class:: classref-property-setget + +- :ref:`float` **get_time_left** **(** **)** The timer's remaining time in seconds. Returns 0 if the timer is inactive. \ **Note:** You cannot set this value. To change the timer's remaining time, use :ref:`start`. +.. rst-class:: classref-item-separator + ---- .. _class_Timer_property_wait_time: -- :ref:`float` **wait_time** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------+ -| *Setter* | set_wait_time(value) | -+-----------+----------------------+ -| *Getter* | get_wait_time() | -+-----------+----------------------+ +:ref:`float` **wait_time** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_wait_time** **(** :ref:`float` value **)** +- :ref:`float` **get_wait_time** **(** **)** The wait time in seconds. \ **Note:** Timers can only emit once per rendered frame at most (or once per physics frame if :ref:`process_callback` is :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Timer_method_is_stopped: -- :ref:`bool` **is_stopped** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_stopped** **(** **)** |const| Returns ``true`` if the timer is stopped. +.. rst-class:: classref-item-separator + ---- .. _class_Timer_method_start: -- void **start** **(** :ref:`float` time_sec=-1 **)** +.. rst-class:: classref-method + +void **start** **(** :ref:`float` time_sec=-1 **)** Starts the timer. Sets :ref:`wait_time` to ``time_sec`` if ``time_sec > 0``. This also resets the remaining time to :ref:`wait_time`. \ **Note:** This method will not resume a paused timer. See :ref:`paused`. +.. rst-class:: classref-item-separator + ---- .. _class_Timer_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the timer. diff --git a/classes/class_torusmesh.rst b/classes/class_torusmesh.rst index 4ea2a6578..88bc2f9b3 100644 --- a/classes/class_torusmesh.rst +++ b/classes/class_torusmesh.rst @@ -14,86 +14,101 @@ TorusMesh Class representing a torus :ref:`PrimitiveMesh`. +.. rst-class:: classref-introduction-group + Description ----------- Class representing a torus :ref:`PrimitiveMesh`. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`inner_radius` | ``0.5`` | -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`outer_radius` | ``1.0`` | -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`ring_segments` | ``32`` | -+---------------------------+--------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`rings` | ``64`` | -+---------------------------+--------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`inner_radius` | ``0.5`` | + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`outer_radius` | ``1.0`` | + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`ring_segments` | ``32`` | + +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`rings` | ``64`` | + +---------------------------+--------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TorusMesh_property_inner_radius: -- :ref:`float` **inner_radius** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------------+ -| *Setter* | set_inner_radius(value) | -+-----------+-------------------------+ -| *Getter* | get_inner_radius() | -+-----------+-------------------------+ +:ref:`float` **inner_radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_inner_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_inner_radius** **(** **)** The inner radius of the torus. +.. rst-class:: classref-item-separator + ---- .. _class_TorusMesh_property_outer_radius: -- :ref:`float` **outer_radius** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------+ -| *Setter* | set_outer_radius(value) | -+-----------+-------------------------+ -| *Getter* | get_outer_radius() | -+-----------+-------------------------+ +:ref:`float` **outer_radius** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_outer_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_outer_radius** **(** **)** The outer radius of the torus. +.. rst-class:: classref-item-separator + ---- .. _class_TorusMesh_property_ring_segments: -- :ref:`int` **ring_segments** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``32`` | -+-----------+--------------------------+ -| *Setter* | set_ring_segments(value) | -+-----------+--------------------------+ -| *Getter* | get_ring_segments() | -+-----------+--------------------------+ +:ref:`int` **ring_segments** = ``32`` + +.. rst-class:: classref-property-setget + +- void **set_ring_segments** **(** :ref:`int` value **)** +- :ref:`int` **get_ring_segments** **(** **)** The number of edges each ring of the torus is constructed of. +.. rst-class:: classref-item-separator + ---- .. _class_TorusMesh_property_rings: -- :ref:`int` **rings** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``64`` | -+-----------+------------------+ -| *Setter* | set_rings(value) | -+-----------+------------------+ -| *Getter* | get_rings() | -+-----------+------------------+ +:ref:`int` **rings** = ``64`` + +.. rst-class:: classref-property-setget + +- void **set_rings** **(** :ref:`int` value **)** +- :ref:`int` **get_rings** **(** **)** The number of slices the torus is constructed of. diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst index 3ee1e9f49..cbdd3a376 100644 --- a/classes/class_touchscreenbutton.rst +++ b/classes/class_touchscreenbutton.rst @@ -14,6 +14,8 @@ TouchScreenButton Button for touch screen devices for gameplay use. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,213 +25,280 @@ This node inherits from :ref:`Node2D`. Unlike with :ref:`Control` | :ref:`action` | ``""`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`BitMap` | :ref:`bitmask` | | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`passby_press` | ``false`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`Shape2D` | :ref:`shape` | | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`shape_centered` | ``true`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`shape_visible` | ``true`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`texture_normal` | | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`Texture2D` | :ref:`texture_pressed` | | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`VisibilityMode` | :ref:`visibility_mode` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`action` | ``""`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`BitMap` | :ref:`bitmask` | | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`passby_press` | ``false`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`Shape2D` | :ref:`shape` | | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`shape_centered` | ``true`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`shape_visible` | ``true`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`texture_normal` | | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`Texture2D` | :ref:`texture_pressed` | | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`VisibilityMode` | :ref:`visibility_mode` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+----------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_pressed` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_pressed` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_TouchScreenButton_signal_pressed: -- **pressed** **(** **)** +.. rst-class:: classref-signal + +**pressed** **(** **)** Emitted when the button is pressed (down). +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_signal_released: -- **released** **(** **)** +.. rst-class:: classref-signal + +**released** **(** **)** Emitted when the button is released (up). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_TouchScreenButton_VisibilityMode: -.. _class_TouchScreenButton_constant_VISIBILITY_ALWAYS: - -.. _class_TouchScreenButton_constant_VISIBILITY_TOUCHSCREEN_ONLY: +.. rst-class:: classref-enumeration enum **VisibilityMode**: -- **VISIBILITY_ALWAYS** = **0** --- Always visible. +.. _class_TouchScreenButton_constant_VISIBILITY_ALWAYS: -- **VISIBILITY_TOUCHSCREEN_ONLY** = **1** --- Visible on touch screens only. +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityMode` **VISIBILITY_ALWAYS** = ``0`` + +Always visible. + +.. _class_TouchScreenButton_constant_VISIBILITY_TOUCHSCREEN_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`VisibilityMode` **VISIBILITY_TOUCHSCREEN_ONLY** = ``1`` + +Visible on touch screens only. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TouchScreenButton_property_action: -- :ref:`String` **action** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``""`` | -+-----------+-------------------+ -| *Setter* | set_action(value) | -+-----------+-------------------+ -| *Getter* | get_action() | -+-----------+-------------------+ +:ref:`String` **action** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_action** **(** :ref:`String` value **)** +- :ref:`String` **get_action** **(** **)** The button's action. Actions can be handled with :ref:`InputEventAction`. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_bitmask: -- :ref:`BitMap` **bitmask** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_bitmask(value) | -+----------+--------------------+ -| *Getter* | get_bitmask() | -+----------+--------------------+ +:ref:`BitMap` **bitmask** + +.. rst-class:: classref-property-setget + +- void **set_bitmask** **(** :ref:`BitMap` value **)** +- :ref:`BitMap` **get_bitmask** **(** **)** The button's bitmask. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_passby_press: -- :ref:`bool` **passby_press** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_passby_press(value) | -+-----------+---------------------------+ -| *Getter* | is_passby_press_enabled() | -+-----------+---------------------------+ +:ref:`bool` **passby_press** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_passby_press** **(** :ref:`bool` value **)** +- :ref:`bool` **is_passby_press_enabled** **(** **)** If ``true``, the :ref:`pressed` and :ref:`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. \ **Note:** This is a "pass-by" (not "bypass") press mode. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_shape: -- :ref:`Shape2D` **shape** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_shape(value) | -+----------+------------------+ -| *Getter* | get_shape() | -+----------+------------------+ +:ref:`Shape2D` **shape** + +.. rst-class:: classref-property-setget + +- void **set_shape** **(** :ref:`Shape2D` value **)** +- :ref:`Shape2D` **get_shape** **(** **)** The button's shape. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_shape_centered: -- :ref:`bool` **shape_centered** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------+ -| *Setter* | set_shape_centered(value) | -+-----------+---------------------------+ -| *Getter* | is_shape_centered() | -+-----------+---------------------------+ +:ref:`bool` **shape_centered** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_shape_centered** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_shape_visible: -- :ref:`bool` **shape_visible** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------+ -| *Setter* | set_shape_visible(value) | -+-----------+--------------------------+ -| *Getter* | is_shape_visible() | -+-----------+--------------------------+ +:ref:`bool` **shape_visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_shape_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_shape_visible** **(** **)** If ``true``, the button's shape is visible in the editor. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_texture_normal: -- :ref:`Texture2D` **texture_normal** +.. rst-class:: classref-property -+----------+---------------------------+ -| *Setter* | set_texture_normal(value) | -+----------+---------------------------+ -| *Getter* | get_texture_normal() | -+----------+---------------------------+ +:ref:`Texture2D` **texture_normal** + +.. rst-class:: classref-property-setget + +- void **set_texture_normal** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture_normal** **(** **)** The button's texture for the normal state. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_texture_pressed: -- :ref:`Texture2D` **texture_pressed** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_texture_pressed(value) | -+----------+----------------------------+ -| *Getter* | get_texture_pressed() | -+----------+----------------------------+ +:ref:`Texture2D` **texture_pressed** + +.. rst-class:: classref-property-setget + +- void **set_texture_pressed** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture_pressed** **(** **)** The button's texture for the pressed state. +.. rst-class:: classref-item-separator + ---- .. _class_TouchScreenButton_property_visibility_mode: -- :ref:`VisibilityMode` **visibility_mode** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_visibility_mode(value) | -+-----------+----------------------------+ -| *Getter* | get_visibility_mode() | -+-----------+----------------------------+ +:ref:`VisibilityMode` **visibility_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_mode** **(** :ref:`VisibilityMode` value **)** +- :ref:`VisibilityMode` **get_visibility_mode** **(** **)** The button's visibility mode. See :ref:`VisibilityMode` for possible values. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TouchScreenButton_method_is_pressed: -- :ref:`bool` **is_pressed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_pressed** **(** **)** |const| Returns ``true`` if this button is currently pressed. diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 64ac8a7bc..6727b7781 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -12,6 +12,8 @@ Transform2D 2D transformation (2×3 matrix). +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,6 +21,8 @@ Description For more information, read the "Matrices and transforms" documentation article. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,305 +34,431 @@ Tutorials - `2.5D Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`origin` | ``Vector2(0, 0)`` | -+-------------------------------+--------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`x` | ``Vector2(1, 0)`` | -+-------------------------------+--------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`y` | ``Vector2(0, 1)`` | -+-------------------------------+--------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`origin` | ``Vector2(0, 0)`` | + +-------------------------------+--------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`x` | ``Vector2(1, 0)`` | + +-------------------------------+--------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`y` | ``Vector2(0, 1)`` | + +-------------------------------+--------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`Transform2D` **(** **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`Transform2D` from **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`float` rotation, :ref:`Vector2` position **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`float` rotation, :ref:`Vector2` scale, :ref:`float` skew, :ref:`Vector2` position **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`Vector2` x_axis, :ref:`Vector2` y_axis, :ref:`Vector2` origin **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`Transform2D` **(** **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`Transform2D` from **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`float` rotation, :ref:`Vector2` position **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`float` rotation, :ref:`Vector2` scale, :ref:`float` skew, :ref:`Vector2` position **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`Transform2D` **(** :ref:`Vector2` x_axis, :ref:`Vector2` y_axis, :ref:`Vector2` origin **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`affine_inverse` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`basis_xform` **(** :ref:`Vector2` v **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`basis_xform_inv` **(** :ref:`Vector2` v **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_origin` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_rotation` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_scale` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_skew` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`interpolate_with` **(** :ref:`Transform2D` xform, :ref:`float` weight **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`inverse` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform2D` xform **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`looking_at` **(** :ref:`Vector2` target=Vector2(0, 0) **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`orthonormalized` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`rotated_local` **(** :ref:`float` angle **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`scaled` **(** :ref:`Vector2` scale **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`scaled_local` **(** :ref:`Vector2` scale **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rotation` **(** :ref:`float` rotation **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_skew` **(** :ref:`float` skew **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`translated` **(** :ref:`Vector2` offset **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`translated_local` **(** :ref:`Vector2` offset **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`affine_inverse` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`basis_xform` **(** :ref:`Vector2` v **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`basis_xform_inv` **(** :ref:`Vector2` v **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_origin` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_rotation` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_scale` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_skew` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`interpolate_with` **(** :ref:`Transform2D` xform, :ref:`float` weight **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`inverse` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform2D` xform **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`looking_at` **(** :ref:`Vector2` target=Vector2(0, 0) **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`orthonormalized` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`rotated_local` **(** :ref:`float` angle **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`scaled` **(** :ref:`Vector2` scale **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`scaled_local` **(** :ref:`Vector2` scale **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_rotation` **(** :ref:`float` rotation **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_skew` **(** :ref:`float` skew **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`translated` **(** :ref:`Vector2` offset **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`translated_local` **(** :ref:`Vector2` offset **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Transform2D` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`operator *` **(** :ref:`PackedVector2Array` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`operator *` **(** :ref:`Rect2` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`operator *` **(** :ref:`float` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`operator *` **(** :ref:`int` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Transform2D` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator []` **(** :ref:`int` index **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Transform2D` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`operator *` **(** :ref:`PackedVector2Array` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`operator *` **(** :ref:`Rect2` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`operator *` **(** :ref:`float` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`operator *` **(** :ref:`int` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Transform2D` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator []` **(** :ref:`int` index **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Transform2D_constant_IDENTITY: +.. rst-class:: classref-constant + +**IDENTITY** = ``Transform2D(1, 0, 0, 1, 0, 0)`` + +The identity **Transform2D** with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY` performs no transformation. + .. _class_Transform2D_constant_FLIP_X: +.. rst-class:: classref-constant + +**FLIP_X** = ``Transform2D(-1, 0, 0, 1, 0, 0)`` + +The **Transform2D** that will flip something along the X axis. + .. _class_Transform2D_constant_FLIP_Y: -- **IDENTITY** = **Transform2D(1, 0, 0, 1, 0, 0)** --- The identity ``Transform2D`` with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY` performs no transformation. +.. rst-class:: classref-constant -- **FLIP_X** = **Transform2D(-1, 0, 0, 1, 0, 0)** --- The ``Transform2D`` that will flip something along the X axis. +**FLIP_Y** = ``Transform2D(1, 0, 0, -1, 0, 0)`` -- **FLIP_Y** = **Transform2D(1, 0, 0, -1, 0, 0)** --- The ``Transform2D`` that will flip something along the Y axis. +The **Transform2D** that will flip something along the Y axis. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Transform2D_property_origin: -- :ref:`Vector2` **origin** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ +:ref:`Vector2` **origin** = ``Vector2(0, 0)`` The origin vector (column 2, the third column). Equivalent to array index ``2``. The origin vector represents translation. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_property_x: -- :ref:`Vector2` **x** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(1, 0)`` | -+-----------+-------------------+ +:ref:`Vector2` **x** = ``Vector2(1, 0)`` The basis matrix's X vector (column 0). Equivalent to array index ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_property_y: -- :ref:`Vector2` **y** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 1)`` | -+-----------+-------------------+ +:ref:`Vector2` **y** = ``Vector2(0, 1)`` The basis matrix's Y vector (column 1). Equivalent to array index ``1``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Transform2D_constructor_Transform2D: -- :ref:`Transform2D` **Transform2D** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Transform2D`` set to :ref:`IDENTITY`. +:ref:`Transform2D` **Transform2D** **(** **)** + +Constructs a default-initialized **Transform2D** set to :ref:`IDENTITY`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform2D` **Transform2D** **(** :ref:`Transform2D` from **)** +.. rst-class:: classref-constructor -Constructs a ``Transform2D`` as a copy of the given ``Transform2D``. +:ref:`Transform2D` **Transform2D** **(** :ref:`Transform2D` from **)** + +Constructs a **Transform2D** as a copy of the given **Transform2D**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform2D` **Transform2D** **(** :ref:`float` rotation, :ref:`Vector2` position **)** +.. rst-class:: classref-constructor + +:ref:`Transform2D` **Transform2D** **(** :ref:`float` rotation, :ref:`Vector2` position **)** Constructs the transform from a given angle (in radians) and position. +.. rst-class:: classref-item-separator + ---- -- :ref:`Transform2D` **Transform2D** **(** :ref:`float` rotation, :ref:`Vector2` scale, :ref:`float` skew, :ref:`Vector2` position **)** +.. rst-class:: classref-constructor + +:ref:`Transform2D` **Transform2D** **(** :ref:`float` rotation, :ref:`Vector2` scale, :ref:`float` skew, :ref:`Vector2` position **)** Constructs the transform from a given angle (in radians), scale, skew (in radians) and position. +.. rst-class:: classref-item-separator + ---- -- :ref:`Transform2D` **Transform2D** **(** :ref:`Vector2` x_axis, :ref:`Vector2` y_axis, :ref:`Vector2` origin **)** +.. rst-class:: classref-constructor + +:ref:`Transform2D` **Transform2D** **(** :ref:`Vector2` x_axis, :ref:`Vector2` y_axis, :ref:`Vector2` origin **)** Constructs the transform from 3 :ref:`Vector2` values representing :ref:`x`, :ref:`y`, and the :ref:`origin` (the three column vectors). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Transform2D_method_affine_inverse: -- :ref:`Transform2D` **affine_inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **affine_inverse** **(** **)** |const| Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_basis_xform: -- :ref:`Vector2` **basis_xform** **(** :ref:`Vector2` v **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **basis_xform** **(** :ref:`Vector2` v **)** |const| Returns a vector transformed (multiplied) by the basis matrix. This method does not account for translation (the origin vector). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_basis_xform_inv: -- :ref:`Vector2` **basis_xform_inv** **(** :ref:`Vector2` v **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **basis_xform_inv** **(** :ref:`Vector2` v **)** |const| Returns a vector transformed (multiplied) by the inverse basis matrix. This method does not account for translation (the origin vector). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_get_origin: -- :ref:`Vector2` **get_origin** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_origin** **(** **)** |const| Returns the transform's origin (translation). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_get_rotation: -- :ref:`float` **get_rotation** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_rotation** **(** **)** |const| Returns the transform's rotation (in radians). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_get_scale: -- :ref:`Vector2` **get_scale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_scale** **(** **)** |const| Returns the scale. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_get_skew: -- :ref:`float` **get_skew** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_skew** **(** **)** |const| Returns the transform's skew (in radians). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_interpolate_with: -- :ref:`Transform2D` **interpolate_with** **(** :ref:`Transform2D` xform, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **interpolate_with** **(** :ref:`Transform2D` xform, :ref:`float` weight **)** |const| Returns a transform interpolated between this transform and another by a given ``weight`` (on the range of 0.0 to 1.0). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_inverse: -- :ref:`Transform2D` **inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **inverse** **(** **)** |const| Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use :ref:`affine_inverse` for transforms with scaling). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Transform2D` xform **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Transform2D` xform **)** |const| Returns ``true`` if this transform and ``transform`` are approximately equal, by calling ``is_equal_approx`` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_looking_at: -- :ref:`Transform2D` **looking_at** **(** :ref:`Vector2` target=Vector2(0, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **looking_at** **(** :ref:`Vector2` target=Vector2(0, 0) **)** |const| Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the ``target`` position. Operations take place in global space. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_orthonormalized: -- :ref:`Transform2D` **orthonormalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **orthonormalized** **(** **)** |const| Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_rotated: -- :ref:`Transform2D` **rotated** **(** :ref:`float` angle **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **rotated** **(** :ref:`float` angle **)** |const| Returns a copy of the transform rotated by the given ``angle`` (in radians). @@ -338,11 +468,15 @@ with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. This can be seen as transforming with respect to the global/parent frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_rotated_local: -- :ref:`Transform2D` **rotated_local** **(** :ref:`float` angle **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **rotated_local** **(** :ref:`float` angle **)** |const| Returns a copy of the transform rotated by the given ``angle`` (in radians). @@ -352,11 +486,15 @@ with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. This can be seen as transforming with respect to the local frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_scaled: -- :ref:`Transform2D` **scaled** **(** :ref:`Vector2` scale **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **scaled** **(** :ref:`Vector2` scale **)** |const| Returns a copy of the transform scaled by the given ``scale`` factor. @@ -366,11 +504,15 @@ with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. This can be seen as transforming with respect to the global/parent frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_scaled_local: -- :ref:`Transform2D` **scaled_local** **(** :ref:`Vector2` scale **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **scaled_local** **(** :ref:`Vector2` scale **)** |const| Returns a copy of the transform scaled by the given ``scale`` factor. @@ -380,37 +522,53 @@ with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. This can be seen as transforming with respect to the local frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_set_rotation: -- void **set_rotation** **(** :ref:`float` rotation **)** +.. rst-class:: classref-method + +void **set_rotation** **(** :ref:`float` rotation **)** Sets the transform's rotation (in radians). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_set_scale: -- void **set_scale** **(** :ref:`Vector2` scale **)** +.. rst-class:: classref-method + +void **set_scale** **(** :ref:`Vector2` scale **)** Sets the transform's scale. \ **Note:** Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_set_skew: -- void **set_skew** **(** :ref:`float` skew **)** +.. rst-class:: classref-method + +void **set_skew** **(** :ref:`float` skew **)** Sets the transform's skew (in radians). +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_translated: -- :ref:`Transform2D` **translated** **(** :ref:`Vector2` offset **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **translated** **(** :ref:`Vector2` offset **)** |const| Returns a copy of the transform translated by the given ``offset``. @@ -420,11 +578,15 @@ with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. This can be seen as transforming with respect to the global/parent frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_method_translated_local: -- :ref:`Transform2D` **translated_local** **(** :ref:`Vector2` offset **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **translated_local** **(** :ref:`Vector2` offset **)** |const| Returns a copy of the transform translated by the given ``offset``. @@ -434,70 +596,120 @@ with a corresponding translation transform ``T`` from the right, i.e., ``X * T`` This can be seen as transforming with respect to the local frame. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_Transform2D_operator_neq_bool: +.. _class_Transform2D_operator_neq_Transform2D: -- :ref:`bool` **operator !=** **(** :ref:`Transform2D` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Transform2D` right **)** Returns ``true`` if the transforms are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- .. _class_Transform2D_operator_mul_PackedVector2Array: -- :ref:`PackedVector2Array` **operator *** **(** :ref:`PackedVector2Array` right **)** +.. rst-class:: classref-operator -Transforms (multiplies) each element of the :ref:`Vector2` array by the given ``Transform2D`` matrix. +:ref:`PackedVector2Array` **operator *** **(** :ref:`PackedVector2Array` right **)** + +Transforms (multiplies) each element of the :ref:`Vector2` array by the given **Transform2D** matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`Rect2` **operator *** **(** :ref:`Rect2` right **)** +.. _class_Transform2D_operator_mul_Rect2: -Transforms (multiplies) the :ref:`Rect2` by the given ``Transform2D`` matrix. +.. rst-class:: classref-operator + +:ref:`Rect2` **operator *** **(** :ref:`Rect2` right **)** + +Transforms (multiplies) the :ref:`Rect2` by the given **Transform2D** matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform2D` **operator *** **(** :ref:`Transform2D` right **)** +.. _class_Transform2D_operator_mul_Transform2D: + +.. rst-class:: classref-operator + +:ref:`Transform2D` **operator *** **(** :ref:`Transform2D` right **)** 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). ----- - -- :ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** - -Transforms (multiplies) the :ref:`Vector2` by the given ``Transform2D`` matrix. +.. rst-class:: classref-item-separator ---- -- :ref:`Transform2D` **operator *** **(** :ref:`float` right **)** +.. _class_Transform2D_operator_mul_Vector2: -This operator multiplies all components of the ``Transform2D``, including the origin vector, which scales it uniformly. +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** + +Transforms (multiplies) the :ref:`Vector2` by the given **Transform2D** matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform2D` **operator *** **(** :ref:`int` right **)** +.. _class_Transform2D_operator_mul_float: -This operator multiplies all components of the ``Transform2D``, including the origin vector, which scales it uniformly. +.. rst-class:: classref-operator + +:ref:`Transform2D` **operator *** **(** :ref:`float` right **)** + +This operator multiplies all components of the **Transform2D**, including the origin vector, which scales it uniformly. + +.. rst-class:: classref-item-separator ---- -.. _class_Transform2D_operator_eq_bool: +.. _class_Transform2D_operator_mul_int: -- :ref:`bool` **operator ==** **(** :ref:`Transform2D` right **)** +.. rst-class:: classref-operator + +:ref:`Transform2D` **operator *** **(** :ref:`int` right **)** + +This operator multiplies all components of the **Transform2D**, including the origin vector, which scales it uniformly. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform2D_operator_eq_Transform2D: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Transform2D` right **)** Returns ``true`` if the transforms are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- -.. _class_Transform2D_operator_idx_Vector2: +.. _class_Transform2D_operator_idx_int: -- :ref:`Vector2` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`Vector2` **operator []** **(** :ref:`int` index **)** 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``. diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index 735297773..c87c42f78 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -12,6 +12,8 @@ Transform3D 3D transformation (3×4 matrix). +.. rst-class:: classref-introduction-group + Description ----------- @@ -19,6 +21,8 @@ Description For more information, read the "Matrices and transforms" documentation article. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,227 +38,333 @@ Tutorials - `2.5D Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------+--------------------------------------+ -| :ref:`Basis` | :ref:`basis` | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` | -+-------------------------------+--------------------------------------------------+--------------------------------------+ -| :ref:`Vector3` | :ref:`origin` | ``Vector3(0, 0, 0)`` | -+-------------------------------+--------------------------------------------------+--------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------+--------------------------------------+ + | :ref:`Basis` | :ref:`basis` | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` | + +-------------------------------+--------------------------------------------------+--------------------------------------+ + | :ref:`Vector3` | :ref:`origin` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------------+--------------------------------------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`Transform3D` **(** **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Transform3D` from **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Basis` basis, :ref:`Vector3` origin **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Projection` from **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`Transform3D` **(** **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Transform3D` from **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Basis` basis, :ref:`Vector3` origin **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Projection` from **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`Transform3D` **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`affine_inverse` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`interpolate_with` **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`inverse` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform3D` xform **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`orthonormalized` **(** **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`rotated_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`scaled_local` **(** :ref:`Vector3` scale **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`translated` **(** :ref:`Vector3` offset **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`translated_local` **(** :ref:`Vector3` offset **)** |const| | -+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`affine_inverse` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`interpolate_with` **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`inverse` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform3D` xform **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`orthonormalized` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`rotated_local` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`scaled_local` **(** :ref:`Vector3` scale **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`translated` **(** :ref:`Vector3` offset **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`translated_local` **(** :ref:`Vector3` offset **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Transform3D` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`operator *` **(** :ref:`AABB` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`operator *` **(** :ref:`PackedVector3Array` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`operator *` **(** :ref:`Plane` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`operator *` **(** :ref:`float` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`operator *` **(** :ref:`int` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Transform3D` right **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Transform3D` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`operator *` **(** :ref:`AABB` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`operator *` **(** :ref:`PackedVector3Array` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`operator *` **(** :ref:`Plane` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`operator *` **(** :ref:`float` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`operator *` **(** :ref:`int` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Transform3D` right **)** | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Transform3D_constant_IDENTITY: +.. rst-class:: classref-constant + +**IDENTITY** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +**Transform3D** with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY` performs no transformation. + .. _class_Transform3D_constant_FLIP_X: +.. rst-class:: classref-constant + +**FLIP_X** = ``Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +**Transform3D** with mirroring applied perpendicular to the YZ plane. + .. _class_Transform3D_constant_FLIP_Y: +.. rst-class:: classref-constant + +**FLIP_Y** = ``Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)`` + +**Transform3D** with mirroring applied perpendicular to the XZ plane. + .. _class_Transform3D_constant_FLIP_Z: -- **IDENTITY** = **Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)** --- ``Transform3D`` with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY` performs no transformation. +.. rst-class:: classref-constant -- **FLIP_X** = **Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)** --- ``Transform3D`` with mirroring applied perpendicular to the YZ plane. +**FLIP_Z** = ``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)** --- ``Transform3D`` with mirroring applied perpendicular to the XZ plane. +**Transform3D** with mirroring applied perpendicular to the XY plane. -- **FLIP_Z** = **Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)** --- ``Transform3D`` with mirroring applied perpendicular to the XY plane. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Transform3D_property_basis: -- :ref:`Basis` **basis** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` | -+-----------+--------------------------------------+ +:ref:`Basis` **basis** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` The basis is a matrix containing 3 :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_property_origin: -- :ref:`Vector3` **origin** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ +:ref:`Vector3` **origin** = ``Vector3(0, 0, 0)`` The translation offset of the transform (column 3, the fourth column). Equivalent to array index ``3``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Transform3D_constructor_Transform3D: -- :ref:`Transform3D` **Transform3D** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Transform3D`` set to :ref:`IDENTITY`. +:ref:`Transform3D` **Transform3D** **(** **)** + +Constructs a default-initialized **Transform3D** set to :ref:`IDENTITY`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform3D` **Transform3D** **(** :ref:`Transform3D` from **)** +.. rst-class:: classref-constructor -Constructs a ``Transform3D`` as a copy of the given ``Transform3D``. +:ref:`Transform3D` **Transform3D** **(** :ref:`Transform3D` from **)** + +Constructs a **Transform3D** as a copy of the given **Transform3D**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform3D` **Transform3D** **(** :ref:`Basis` basis, :ref:`Vector3` origin **)** +.. rst-class:: classref-constructor + +:ref:`Transform3D` **Transform3D** **(** :ref:`Basis` basis, :ref:`Vector3` origin **)** Constructs a Transform3D from a :ref:`Basis` and :ref:`Vector3`. +.. rst-class:: classref-item-separator + ---- -- :ref:`Transform3D` **Transform3D** **(** :ref:`Projection` from **)** +.. rst-class:: classref-constructor + +:ref:`Transform3D` **Transform3D** **(** :ref:`Projection` from **)** .. container:: contribute There is currently no description for this constructor. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- -- :ref:`Transform3D` **Transform3D** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** +.. rst-class:: classref-constructor + +:ref:`Transform3D` **Transform3D** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** Constructs a Transform3D from four :ref:`Vector3` values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Transform3D_method_affine_inverse: -- :ref:`Transform3D` **affine_inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **affine_inverse** **(** **)** |const| Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_interpolate_with: -- :ref:`Transform3D` **interpolate_with** **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **interpolate_with** **(** :ref:`Transform3D` xform, :ref:`float` weight **)** |const| Returns a transform interpolated between this transform and another by a given ``weight`` (on the range of 0.0 to 1.0). +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_inverse: -- :ref:`Transform3D` **inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **inverse** **(** **)** |const| Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use :ref:`affine_inverse` for transforms with scaling). +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Transform3D` xform **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Transform3D` xform **)** |const| Returns ``true`` if this transform and ``transform`` are approximately equal, by calling ``is_equal_approx`` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_looking_at: -- :ref:`Transform3D` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0) **)** |const| Returns a copy of the transform rotated 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 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. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_orthonormalized: -- :ref:`Transform3D` **orthonormalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **orthonormalized** **(** **)** |const| Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_rotated: -- :ref:`Transform3D` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians). @@ -266,11 +376,15 @@ with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. This can be seen as transforming with respect to the global/parent frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_rotated_local: -- :ref:`Transform3D` **rotated_local** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **rotated_local** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians). @@ -282,11 +396,15 @@ with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. This can be seen as transforming with respect to the local frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_scaled: -- :ref:`Transform3D` **scaled** **(** :ref:`Vector3` scale **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **scaled** **(** :ref:`Vector3` scale **)** |const| Returns a copy of the transform scaled by the given ``scale`` factor. @@ -296,11 +414,15 @@ with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. This can be seen as transforming with respect to the global/parent frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_scaled_local: -- :ref:`Transform3D` **scaled_local** **(** :ref:`Vector3` scale **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **scaled_local** **(** :ref:`Vector3` scale **)** |const| Returns a copy of the transform scaled by the given ``scale`` factor. @@ -310,11 +432,15 @@ with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. This can be seen as transforming with respect to the local frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_translated: -- :ref:`Transform3D` **translated** **(** :ref:`Vector3` offset **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **translated** **(** :ref:`Vector3` offset **)** |const| Returns a copy of the transform translated by the given ``offset``. @@ -324,11 +450,15 @@ with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. This can be seen as transforming with respect to the global/parent frame. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_method_translated_local: -- :ref:`Transform3D` **translated_local** **(** :ref:`Vector3` offset **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **translated_local** **(** :ref:`Vector3` offset **)** |const| Returns a copy of the transform translated by the given ``offset``. @@ -338,66 +468,118 @@ with a corresponding translation transform ``T`` from the right, i.e., ``X * T`` This can be seen as transforming with respect to the local frame. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Operator Descriptions --------------------- -.. _class_Transform3D_operator_neq_bool: +.. _class_Transform3D_operator_neq_Transform3D: -- :ref:`bool` **operator !=** **(** :ref:`Transform3D` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Transform3D` right **)** Returns ``true`` if the transforms are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + ---- .. _class_Transform3D_operator_mul_AABB: -- :ref:`AABB` **operator *** **(** :ref:`AABB` right **)** +.. rst-class:: classref-operator -Transforms (multiplies) the :ref:`AABB` by the given ``Transform3D`` matrix. +:ref:`AABB` **operator *** **(** :ref:`AABB` right **)** + +Transforms (multiplies) the :ref:`AABB` by the given **Transform3D** matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`PackedVector3Array` **operator *** **(** :ref:`PackedVector3Array` right **)** +.. _class_Transform3D_operator_mul_PackedVector3Array: -Transforms (multiplies) each element of the :ref:`Vector3` array by the given ``Transform3D`` matrix. +.. rst-class:: classref-operator + +:ref:`PackedVector3Array` **operator *** **(** :ref:`PackedVector3Array` right **)** + +Transforms (multiplies) each element of the :ref:`Vector3` array by the given **Transform3D** matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`Plane` **operator *** **(** :ref:`Plane` right **)** +.. _class_Transform3D_operator_mul_Plane: -Transforms (multiplies) the :ref:`Plane` by the given ``Transform3D`` transformation matrix. +.. rst-class:: classref-operator + +:ref:`Plane` **operator *** **(** :ref:`Plane` right **)** + +Transforms (multiplies) the :ref:`Plane` by the given **Transform3D** transformation matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform3D` **operator *** **(** :ref:`Transform3D` right **)** +.. _class_Transform3D_operator_mul_Transform3D: + +.. rst-class:: classref-operator + +:ref:`Transform3D` **operator *** **(** :ref:`Transform3D` right **)** 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). ----- - -- :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** - -Transforms (multiplies) the :ref:`Vector3` by the given ``Transform3D`` matrix. +.. rst-class:: classref-item-separator ---- -- :ref:`Transform3D` **operator *** **(** :ref:`float` right **)** +.. _class_Transform3D_operator_mul_Vector3: -This operator multiplies all components of the ``Transform3D``, including the origin vector, which scales it uniformly. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** + +Transforms (multiplies) the :ref:`Vector3` by the given **Transform3D** matrix. + +.. rst-class:: classref-item-separator ---- -- :ref:`Transform3D` **operator *** **(** :ref:`int` right **)** +.. _class_Transform3D_operator_mul_float: -This operator multiplies all components of the ``Transform3D``, including the origin vector, which scales it uniformly. +.. rst-class:: classref-operator + +:ref:`Transform3D` **operator *** **(** :ref:`float` right **)** + +This operator multiplies all components of the **Transform3D**, including the origin vector, which scales it uniformly. + +.. rst-class:: classref-item-separator ---- -.. _class_Transform3D_operator_eq_bool: +.. _class_Transform3D_operator_mul_int: -- :ref:`bool` **operator ==** **(** :ref:`Transform3D` right **)** +.. rst-class:: classref-operator + +:ref:`Transform3D` **operator *** **(** :ref:`int` right **)** + +This operator multiplies all components of the **Transform3D**, including the origin vector, which scales it uniformly. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform3D_operator_eq_Transform3D: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Transform3D` right **)** Returns ``true`` if the transforms are exactly equal. diff --git a/classes/class_translation.rst b/classes/class_translation.rst index 834e07fb5..88574cfee 100644 --- a/classes/class_translation.rst +++ b/classes/class_translation.rst @@ -16,11 +16,15 @@ Translation Language Translation. +.. rst-class:: classref-introduction-group + Description ----------- Translations are resources that can be loaded and unloaded on demand. They map a string to another string. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,139 +32,198 @@ Tutorials - :doc:`Locales <../tutorials/i18n/locales>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+--------------------------------------------------+----------+ -| :ref:`String` | :ref:`locale` | ``"en"`` | -+-----------------------------+--------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------+----------+ + | :ref:`String` | :ref:`locale` | ``"en"`` | + +-----------------------------+--------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`_get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`_get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context **)** |virtual| |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_message` **(** :ref:`StringName` src_message, :ref:`StringName` xlated_message, :ref:`StringName` context="" **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_plural_message` **(** :ref:`StringName` src_message, :ref:`PackedStringArray` xlated_messages, :ref:`StringName` context="" **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_message_count` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_message_list` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_translated_message_list` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_message` **(** :ref:`StringName` src_message, :ref:`StringName` xlated_message, :ref:`StringName` context="" **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_plural_message` **(** :ref:`StringName` src_message, :ref:`PackedStringArray` xlated_messages, :ref:`StringName` context="" **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_message_count` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_message_list` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_translated_message_list` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Translation_property_locale: -- :ref:`String` **locale** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``"en"`` | -+-----------+-------------------+ -| *Setter* | set_locale(value) | -+-----------+-------------------+ -| *Getter* | get_locale() | -+-----------+-------------------+ +:ref:`String` **locale** = ``"en"`` + +.. rst-class:: classref-property-setget + +- void **set_locale** **(** :ref:`String` value **)** +- :ref:`String` **get_locale** **(** **)** The locale of the translation. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Translation_method__get_message: -- :ref:`StringName` **_get_message** **(** :ref:`StringName` src_message, :ref:`StringName` context **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`StringName` **_get_message** **(** :ref:`StringName` src_message, :ref:`StringName` context **)** |virtual| |const| Virtual method to override :ref:`get_message`. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method__get_plural_message: -- :ref:`StringName` **_get_plural_message** **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`StringName` **_get_plural_message** **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context **)** |virtual| |const| Virtual method to override :ref:`get_plural_message`. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_add_message: -- void **add_message** **(** :ref:`StringName` src_message, :ref:`StringName` xlated_message, :ref:`StringName` context="" **)** +.. rst-class:: classref-method + +void **add_message** **(** :ref:`StringName` src_message, :ref:`StringName` xlated_message, :ref:`StringName` context="" **)** Adds a message if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_add_plural_message: -- void **add_plural_message** **(** :ref:`StringName` src_message, :ref:`PackedStringArray` xlated_messages, :ref:`StringName` context="" **)** +.. rst-class:: classref-method + +void **add_plural_message** **(** :ref:`StringName` src_message, :ref:`PackedStringArray` xlated_messages, :ref:`StringName` context="" **)** Adds a message involving plural translation if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_erase_message: -- void **erase_message** **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** +.. rst-class:: classref-method + +void **erase_message** **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** Erases a message. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_get_message: -- :ref:`StringName` **get_message** **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_message** **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** |const| Returns a message's translation. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_get_message_count: -- :ref:`int` **get_message_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_message_count** **(** **)** |const| Returns the number of existing messages. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_get_message_list: -- :ref:`PackedStringArray` **get_message_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_message_list** **(** **)** |const| Returns all the messages (keys). +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_get_plural_message: -- :ref:`StringName` **get_plural_message** **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_plural_message** **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| Returns a message's translation involving plurals. The number ``n`` is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. +.. rst-class:: classref-item-separator + ---- .. _class_Translation_method_get_translated_message_list: -- :ref:`PackedStringArray` **get_translated_message_list** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_translated_message_list** **(** **)** |const| Returns all the messages (translated text). diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index eae9c98c0..6353bac2a 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -14,11 +14,15 @@ TranslationServer Server that manages all translations. +.. rst-class:: classref-introduction-group + Description ----------- Server that manages all translations. Translations can be set to it and removed from it. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -26,251 +30,354 @@ Tutorials - :doc:`Locales <../tutorials/i18n/locales>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`pseudolocalization_enabled` | ``false`` | -+-------------------------+------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pseudolocalization_enabled` | ``false`` | + +-------------------------+------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_translation` **(** :ref:`Translation` translation **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`compare_locales` **(** :ref:`String` locale_a, :ref:`String` locale_b **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_all_countries` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_all_languages` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_all_scripts` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_country_name` **(** :ref:`String` country **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_language_name` **(** :ref:`String` language **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`get_loaded_locales` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_locale` **(** **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_locale_name` **(** :ref:`String` locale **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_script_name` **(** :ref:`String` script **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tool_locale` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Translation` | :ref:`get_translation_object` **(** :ref:`String` locale **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`pseudolocalize` **(** :ref:`StringName` message **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reload_pseudolocalization` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_translation` **(** :ref:`Translation` translation **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_locale` **(** :ref:`String` locale **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`standardize_locale` **(** :ref:`String` locale **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`translate` **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`translate_plural` **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_translation` **(** :ref:`Translation` translation **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`compare_locales` **(** :ref:`String` locale_a, :ref:`String` locale_b **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_all_countries` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_all_languages` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_all_scripts` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_country_name` **(** :ref:`String` country **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_language_name` **(** :ref:`String` language **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_loaded_locales` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_locale` **(** **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_locale_name` **(** :ref:`String` locale **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_script_name` **(** :ref:`String` script **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tool_locale` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Translation` | :ref:`get_translation_object` **(** :ref:`String` locale **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`pseudolocalize` **(** :ref:`StringName` message **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reload_pseudolocalization` **(** **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_translation` **(** :ref:`Translation` translation **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_locale` **(** :ref:`String` locale **)** | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`standardize_locale` **(** :ref:`String` locale **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`translate` **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`translate_plural` **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TranslationServer_property_pseudolocalization_enabled: -- :ref:`bool` **pseudolocalization_enabled** +.. rst-class:: classref-property -+-----------+---------------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------------+ -| *Setter* | set_pseudolocalization_enabled(value) | -+-----------+---------------------------------------+ -| *Getter* | is_pseudolocalization_enabled() | -+-----------+---------------------------------------+ +:ref:`bool` **pseudolocalization_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_pseudolocalization_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_pseudolocalization_enabled** **(** **)** If ``true``, enables the use of pseudolocalization. See :ref:`ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization` for details. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_TranslationServer_method_add_translation: -- void **add_translation** **(** :ref:`Translation` translation **)** +.. rst-class:: classref-method + +void **add_translation** **(** :ref:`Translation` translation **)** Adds a :ref:`Translation` resource. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the server from all translations. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_compare_locales: -- :ref:`int` **compare_locales** **(** :ref:`String` locale_a, :ref:`String` locale_b **)** |const| +.. rst-class:: classref-method + +:ref:`int` **compare_locales** **(** :ref:`String` locale_a, :ref:`String` locale_b **)** |const| Compares two locales and return similarity score between ``0``\ (no match) and ``10``\ (full match). +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_all_countries: -- :ref:`PackedStringArray` **get_all_countries** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_all_countries** **(** **)** |const| Returns array of known country codes. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_all_languages: -- :ref:`PackedStringArray` **get_all_languages** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_all_languages** **(** **)** |const| Returns array of known language codes. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_all_scripts: -- :ref:`PackedStringArray` **get_all_scripts** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_all_scripts** **(** **)** |const| Returns array of known script codes. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_country_name: -- :ref:`String` **get_country_name** **(** :ref:`String` country **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_country_name** **(** :ref:`String` country **)** |const| Returns readable country name for the ``country`` code. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_language_name: -- :ref:`String` **get_language_name** **(** :ref:`String` language **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_language_name** **(** :ref:`String` language **)** |const| Returns readable language name for the ``language`` code. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_loaded_locales: -- :ref:`PackedStringArray` **get_loaded_locales** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_loaded_locales** **(** **)** |const| Returns an array of all loaded locales of the project. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_locale: -- :ref:`String` **get_locale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_locale** **(** **)** |const| Returns the current locale of the project. See also :ref:`OS.get_locale` and :ref:`OS.get_locale_language` to query the locale of the user system. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_locale_name: -- :ref:`String` **get_locale_name** **(** :ref:`String` locale **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_locale_name** **(** :ref:`String` locale **)** |const| Returns a locale's language and its variant (e.g. ``"en_US"`` would return ``"English (United States)"``). +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_script_name: -- :ref:`String` **get_script_name** **(** :ref:`String` script **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_script_name** **(** :ref:`String` script **)** |const| Returns readable script name for the ``script`` code. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_tool_locale: -- :ref:`String` **get_tool_locale** **(** **)** +.. rst-class:: classref-method + +:ref:`String` **get_tool_locale** **(** **)** Returns the current locale of the editor. \ **Note:** When called from an exported project returns the same value as :ref:`get_locale`. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_get_translation_object: -- :ref:`Translation` **get_translation_object** **(** :ref:`String` locale **)** +.. rst-class:: classref-method + +:ref:`Translation` **get_translation_object** **(** :ref:`String` locale **)** Returns the :ref:`Translation` instance based on the ``locale`` passed in. It will return ``null`` if there is no :ref:`Translation` instance that matches the ``locale``. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_pseudolocalize: -- :ref:`StringName` **pseudolocalize** **(** :ref:`StringName` message **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **pseudolocalize** **(** :ref:`StringName` message **)** |const| Returns the pseudolocalized string based on the ``message`` passed in. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_reload_pseudolocalization: -- void **reload_pseudolocalization** **(** **)** +.. rst-class:: classref-method + +void **reload_pseudolocalization** **(** **)** Reparses the pseudolocalization options and reloads the translation. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_remove_translation: -- void **remove_translation** **(** :ref:`Translation` translation **)** +.. rst-class:: classref-method + +void **remove_translation** **(** :ref:`Translation` translation **)** Removes the given translation from the server. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_set_locale: -- void **set_locale** **(** :ref:`String` locale **)** +.. rst-class:: classref-method + +void **set_locale** **(** :ref:`String` 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``). If translations have been loaded beforehand for the new locale, they will be applied. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_standardize_locale: -- :ref:`String` **standardize_locale** **(** :ref:`String` locale **)** |const| +.. rst-class:: classref-method + +:ref:`String` **standardize_locale** **(** :ref:`String` locale **)** |const| Returns ``locale`` string standardized to match known locales (e.g. ``en-US`` would be matched to ``en_US``). +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_translate: -- :ref:`StringName` **translate** **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **translate** **(** :ref:`StringName` message, :ref:`StringName` context="" **)** |const| Returns the current locale's translation for the given message (key) and context. +.. rst-class:: classref-item-separator + ---- .. _class_TranslationServer_method_translate_plural: -- :ref:`StringName` **translate_plural** **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **translate_plural** **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| Returns the current locale's translation for the given message (key), plural_message and context. diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 2bc7c5984..13b9a36da 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -14,6 +14,8 @@ Tree Control to show a tree of items. +.. rst-class:: classref-introduction-group + Description ----------- @@ -50,584 +52,730 @@ Trees are built via code, using :ref:`TreeItem` objects to creat -To iterate over all the :ref:`TreeItem` objects in a ``Tree`` object, use :ref:`TreeItem.get_next` and :ref:`TreeItem.get_first_child` after getting the root through :ref:`get_root`. You can use :ref:`Object.free` on a :ref:`TreeItem` to remove it from the ``Tree``. +To iterate over all the :ref:`TreeItem` objects in a **Tree** object, use :ref:`TreeItem.get_next` and :ref:`TreeItem.get_first_child` after getting the root through :ref:`get_root`. You can use :ref:`Object.free` on a :ref:`TreeItem` to remove it from the **Tree**. -\ **Incremental search:** Like :ref:`ItemList` and :ref:`PopupMenu`, ``Tree`` supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec`. +\ **Incremental search:** Like :ref:`ItemList` and :ref:`PopupMenu`, **Tree** supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing :ref:`ProjectSettings.gui/timers/incremental_search_max_interval_msec`. + +.. rst-class:: classref-reftable-group Properties ---------- -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_reselect` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`column_titles_visible` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`columns` | ``1`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`int` | :ref:`drop_mode_flags` | ``0`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`enable_recursive_folding` | ``true`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hide_folding` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hide_root` | ``false`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_horizontal_enabled` | ``true`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_vertical_enabled` | ``true`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`SelectMode` | :ref:`select_mode` | ``0`` | -+------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_reselect` | ``false`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_rmb_select` | ``false`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`column_titles_visible` | ``false`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`columns` | ``1`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`drop_mode_flags` | ``0`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`enable_recursive_folding` | ``true`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`hide_folding` | ``false`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`hide_root` | ``false`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_horizontal_enabled` | ``true`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_vertical_enabled` | ``true`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`SelectMode` | :ref:`select_mode` | ``0`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=null, :ref:`int` idx=-1 **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`edit_selected` **(** **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ensure_cursor_is_visible` **(** **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_button_id_at_position` **(** :ref:`Vector2` position **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_column_at_position` **(** :ref:`Vector2` position **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_column_expand_ratio` **(** :ref:`int` column **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`get_column_title_direction` **(** :ref:`int` column **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_column_title_language` **(** :ref:`int` column **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_drop_section_at_position` **(** :ref:`Vector2` position **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_edited` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_edited_column` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_item_at_position` **(** :ref:`Vector2` position **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_pressed_button` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_root` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_scroll` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_selected` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selected_column` **(** **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_column_clipping_content` **(** :ref:`int` column **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_column_expanding` **(** :ref:`int` column **)** |const| | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scroll_to_item` **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_clip_content` **(** :ref:`int` column, :ref:`bool` enable **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_custom_minimum_width` **(** :ref:`int` column, :ref:`int` min_width **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_expand_ratio` **(** :ref:`int` column, :ref:`int` ratio **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_title_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_title_language` **(** :ref:`int` column, :ref:`String` language **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_selected` **(** :ref:`TreeItem` item, :ref:`int` column **)** | -+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=null, :ref:`int` idx=-1 **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`edit_selected` **(** **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ensure_cursor_is_visible` **(** **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_button_id_at_position` **(** :ref:`Vector2` position **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_at_position` **(** :ref:`Vector2` position **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_expand_ratio` **(** :ref:`int` column **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_column_title_direction` **(** :ref:`int` column **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_column_title_language` **(** :ref:`int` column **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_drop_section_at_position` **(** :ref:`Vector2` position **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_edited` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_edited_column` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_item_at_position` **(** :ref:`Vector2` position **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_pressed_button` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_root` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_scroll` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_selected` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selected_column` **(** **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_column_clipping_content` **(** :ref:`int` column **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_column_expanding` **(** :ref:`int` column **)** |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_item` **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_clip_content` **(** :ref:`int` column, :ref:`bool` enable **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_custom_minimum_width` **(** :ref:`int` column, :ref:`int` min_width **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_expand_ratio` **(** :ref:`int` column, :ref:`int` ratio **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_language` **(** :ref:`int` column, :ref:`String` language **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_selected` **(** :ref:`TreeItem` item, :ref:`int` column **)** | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`children_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`custom_button_font_highlight` | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`drop_position_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.7, 0.7, 0.7, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`parent_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`relationship_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`title_button_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`button_margin` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`children_hl_line_width` | ``1`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`draw_guides` | ``1`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`draw_relationship_lines` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`item_margin` | ``16`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`parent_hl_line_margin` | ``0`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`parent_hl_line_width` | ``1`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`relationship_line_width` | ``1`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`scroll_border` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`scroll_speed` | ``12`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`v_separation` | ``4`` | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`title_button_font` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`arrow` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`arrow_collapsed` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`arrow_collapsed_mirrored` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`checked` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`indeterminate` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`select_arrow` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`unchecked` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`updown` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`button_pressed` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`cursor` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`cursor_unfocused` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`custom_button` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`custom_button_hover` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`custom_button_pressed` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`selected` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`selected_focus` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`title_button_hover` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`title_button_normal` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`title_button_pressed` | | -+-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`children_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`custom_button_font_highlight` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`drop_position_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.7, 0.7, 0.7, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`parent_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`relationship_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`title_button_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`button_margin` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`children_hl_line_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`draw_guides` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`draw_relationship_lines` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`item_margin` | ``16`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`parent_hl_line_margin` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`parent_hl_line_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`relationship_line_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scroll_border` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scroll_speed` | ``12`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`title_button_font` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`arrow` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`arrow_collapsed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`arrow_collapsed_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`indeterminate` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`select_arrow` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`updown` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`button_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`cursor` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`cursor_unfocused` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`custom_button` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`custom_button_hover` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`custom_button_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`selected` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`selected_focus` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`title_button_hover` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`title_button_normal` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`title_button_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Tree_signal_button_clicked: -- **button_clicked** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`int` id, :ref:`int` mouse_button_index **)** +.. rst-class:: classref-signal + +**button_clicked** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`int` id, :ref:`int` mouse_button_index **)** Emitted when a button on the tree was pressed (see :ref:`TreeItem.add_button`). +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_cell_selected: -- **cell_selected** **(** **)** +.. rst-class:: classref-signal + +**cell_selected** **(** **)** Emitted when a cell is selected. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_check_propagated_to_item: -- **check_propagated_to_item** **(** :ref:`TreeItem` item, :ref:`int` column **)** +.. rst-class:: classref-signal + +**check_propagated_to_item** **(** :ref:`TreeItem` item, :ref:`int` column **)** Emitted when :ref:`TreeItem.propagate_check` is called. Connect to this signal to process the items that are affected when :ref:`TreeItem.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. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_column_title_clicked: -- **column_title_clicked** **(** :ref:`int` column, :ref:`int` mouse_button_index **)** +.. rst-class:: classref-signal + +**column_title_clicked** **(** :ref:`int` column, :ref:`int` mouse_button_index **)** Emitted when a column's title is clicked with either :ref:`@GlobalScope.MOUSE_BUTTON_LEFT` or :ref:`@GlobalScope.MOUSE_BUTTON_RIGHT`. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_custom_item_clicked: -- **custom_item_clicked** **(** :ref:`int` mouse_button_index **)** +.. rst-class:: classref-signal + +**custom_item_clicked** **(** :ref:`int` mouse_button_index **)** Emitted when an item with :ref:`TreeItem.CELL_MODE_CUSTOM` is clicked with a mouse button. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_custom_popup_edited: -- **custom_popup_edited** **(** :ref:`bool` arrow_clicked **)** +.. rst-class:: classref-signal + +**custom_popup_edited** **(** :ref:`bool` arrow_clicked **)** Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM` is clicked to be edited. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_empty_clicked: -- **empty_clicked** **(** :ref:`Vector2` position, :ref:`int` mouse_button_index **)** +.. rst-class:: classref-signal + +**empty_clicked** **(** :ref:`Vector2` position, :ref:`int` mouse_button_index **)** Emitted when a mouse button is clicked in the empty space of the tree. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_item_activated: -- **item_activated** **(** **)** +.. rst-class:: classref-signal + +**item_activated** **(** **)** Emitted when an item's label is double-clicked. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_item_collapsed: -- **item_collapsed** **(** :ref:`TreeItem` item **)** +.. rst-class:: classref-signal + +**item_collapsed** **(** :ref:`TreeItem` item **)** Emitted when an item is collapsed by a click on the folding arrow. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_item_custom_button_pressed: -- **item_custom_button_pressed** **(** **)** +.. rst-class:: classref-signal + +**item_custom_button_pressed** **(** **)** Emitted when a custom button is pressed (i.e. in a :ref:`TreeItem.CELL_MODE_CUSTOM` mode cell). +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_item_double_clicked: -- **item_double_clicked** **(** **)** +.. rst-class:: classref-signal + +**item_double_clicked** **(** **)** Emitted when an item's icon is double-clicked. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_item_edited: -- **item_edited** **(** **)** +.. rst-class:: classref-signal + +**item_edited** **(** **)** Emitted when an item is edited. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_item_mouse_selected: -- **item_mouse_selected** **(** :ref:`Vector2` position, :ref:`int` mouse_button_index **)** +.. rst-class:: classref-signal + +**item_mouse_selected** **(** :ref:`Vector2` position, :ref:`int` mouse_button_index **)** Emitted when an item is selected with a mouse button. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_item_selected: -- **item_selected** **(** **)** +.. rst-class:: classref-signal + +**item_selected** **(** **)** Emitted when an item is selected. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_multi_selected: -- **multi_selected** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`bool` selected **)** +.. rst-class:: classref-signal + +**multi_selected** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`bool` selected **)** Emitted instead of ``item_selected`` if ``select_mode`` is :ref:`SELECT_MULTI`. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_signal_nothing_selected: -- **nothing_selected** **(** **)** +.. rst-class:: classref-signal + +**nothing_selected** **(** **)** Emitted when a left mouse button click does not select any item. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Tree_SelectMode: -.. _class_Tree_constant_SELECT_SINGLE: - -.. _class_Tree_constant_SELECT_ROW: - -.. _class_Tree_constant_SELECT_MULTI: +.. rst-class:: classref-enumeration enum **SelectMode**: -- **SELECT_SINGLE** = **0** --- Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item. +.. _class_Tree_constant_SELECT_SINGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectMode` **SELECT_SINGLE** = ``0`` + +Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item. The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item. -- **SELECT_ROW** = **1** --- Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item. +.. _class_Tree_constant_SELECT_ROW: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectMode` **SELECT_ROW** = ``1`` + +Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item. The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item. -- **SELECT_MULTI** = **2** --- Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item. +.. _class_Tree_constant_SELECT_MULTI: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectMode` **SELECT_MULTI** = ``2`` + +Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item. The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected. +.. rst-class:: classref-item-separator + ---- .. _enum_Tree_DropModeFlags: -.. _class_Tree_constant_DROP_MODE_DISABLED: - -.. _class_Tree_constant_DROP_MODE_ON_ITEM: - -.. _class_Tree_constant_DROP_MODE_INBETWEEN: +.. rst-class:: classref-enumeration enum **DropModeFlags**: -- **DROP_MODE_DISABLED** = **0** --- Disables all drop sections, but still allows to detect the "on item" drop section by :ref:`get_drop_section_at_position`. +.. _class_Tree_constant_DROP_MODE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DropModeFlags` **DROP_MODE_DISABLED** = ``0`` + +Disables all drop sections, but still allows to detect the "on item" drop section by :ref:`get_drop_section_at_position`. \ **Note:** This is the default flag, it has no effect when combined with other flags. -- **DROP_MODE_ON_ITEM** = **1** --- Enables the "on item" drop section. This drop section covers the entire item. +.. _class_Tree_constant_DROP_MODE_ON_ITEM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DropModeFlags` **DROP_MODE_ON_ITEM** = ``1`` + +Enables the "on item" drop section. This drop section covers the entire item. When combined with :ref:`DROP_MODE_INBETWEEN`, this drop section halves the height and stays centered vertically. -- **DROP_MODE_INBETWEEN** = **2** --- Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half. +.. _class_Tree_constant_DROP_MODE_INBETWEEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`DropModeFlags` **DROP_MODE_INBETWEEN** = ``2`` + +Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half. When combined with :ref:`DROP_MODE_ON_ITEM`, these drop sections halves the height and stays on top / bottom accordingly. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Tree_property_allow_reselect: -- :ref:`bool` **allow_reselect** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------+ -| *Setter* | set_allow_reselect(value) | -+-----------+---------------------------+ -| *Getter* | get_allow_reselect() | -+-----------+---------------------------+ +:ref:`bool` **allow_reselect** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_reselect** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_reselect** **(** **)** If ``true``, the currently selected cell may be selected again. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_allow_rmb_select: -- :ref:`bool` **allow_rmb_select** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_allow_rmb_select(value) | -+-----------+-----------------------------+ -| *Getter* | get_allow_rmb_select() | -+-----------+-----------------------------+ +:ref:`bool` **allow_rmb_select** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_rmb_select** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_rmb_select** **(** **)** If ``true``, a right mouse button click can select items. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_column_titles_visible: -- :ref:`bool` **column_titles_visible** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_column_titles_visible(value) | -+-----------+----------------------------------+ -| *Getter* | are_column_titles_visible() | -+-----------+----------------------------------+ +:ref:`bool` **column_titles_visible** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_column_titles_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **are_column_titles_visible** **(** **)** If ``true``, column titles are visible. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_columns: -- :ref:`int` **columns** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_columns(value) | -+-----------+--------------------+ -| *Getter* | get_columns() | -+-----------+--------------------+ +:ref:`int` **columns** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_columns** **(** :ref:`int` value **)** +- :ref:`int` **get_columns** **(** **)** The number of columns. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_drop_mode_flags: -- :ref:`int` **drop_mode_flags** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_drop_mode_flags(value) | -+-----------+----------------------------+ -| *Getter* | get_drop_mode_flags() | -+-----------+----------------------------+ +:ref:`int` **drop_mode_flags** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_drop_mode_flags** **(** :ref:`int` value **)** +- :ref:`int` **get_drop_mode_flags** **(** **)** The drop mode as an OR combination of flags. See :ref:`DropModeFlags` constants. Once dropping is done, reverts to :ref:`DROP_MODE_DISABLED`. Setting this during :ref:`Control._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. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_enable_recursive_folding: -- :ref:`bool` **enable_recursive_folding** +.. rst-class:: classref-property -+-----------+-------------------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------------------+ -| *Setter* | set_enable_recursive_folding(value) | -+-----------+-------------------------------------+ -| *Getter* | is_recursive_folding_enabled() | -+-----------+-------------------------------------+ +:ref:`bool` **enable_recursive_folding** = ``true`` -If ``true``, recursive folding is enabled for this ``Tree``. Holding down Shift while clicking the fold arrow collapses or uncollapses the :ref:`TreeItem` and all its descendants. +.. rst-class:: classref-property-setget + +- void **set_enable_recursive_folding** **(** :ref:`bool` value **)** +- :ref:`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` and all its descendants. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_property_hide_folding: -- :ref:`bool` **hide_folding** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_hide_folding(value) | -+-----------+-------------------------+ -| *Getter* | is_folding_hidden() | -+-----------+-------------------------+ +:ref:`bool` **hide_folding** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_hide_folding** **(** :ref:`bool` value **)** +- :ref:`bool` **is_folding_hidden** **(** **)** If ``true``, the folding arrow is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_hide_root: -- :ref:`bool` **hide_root** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_hide_root(value) | -+-----------+----------------------+ -| *Getter* | is_root_hidden() | -+-----------+----------------------+ +:ref:`bool` **hide_root** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_hide_root** **(** :ref:`bool` value **)** +- :ref:`bool` **is_root_hidden** **(** **)** If ``true``, the tree's root is hidden. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_scroll_horizontal_enabled: -- :ref:`bool` **scroll_horizontal_enabled** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_h_scroll_enabled(value) | -+-----------+-----------------------------+ -| *Getter* | is_h_scroll_enabled() | -+-----------+-----------------------------+ +:ref:`bool` **scroll_horizontal_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_h_scroll_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_h_scroll_enabled** **(** **)** If ``true``, enables horizontal scrolling. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_scroll_vertical_enabled: -- :ref:`bool` **scroll_vertical_enabled** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_v_scroll_enabled(value) | -+-----------+-----------------------------+ -| *Getter* | is_v_scroll_enabled() | -+-----------+-----------------------------+ +:ref:`bool` **scroll_vertical_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_v_scroll_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_v_scroll_enabled** **(** **)** If ``true``, enables vertical scrolling. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_property_select_mode: -- :ref:`SelectMode` **select_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_select_mode(value) | -+-----------+------------------------+ -| *Getter* | get_select_mode() | -+-----------+------------------------+ +:ref:`SelectMode` **select_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_select_mode** **(** :ref:`SelectMode` value **)** +- :ref:`SelectMode` **get_select_mode** **(** **)** Allows single or multiple selection. See the :ref:`SelectMode` constants. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Tree_method_clear: -- void **clear** **(** **)** +.. rst-class:: classref-method + +void **clear** **(** **)** Clears the tree. This removes all items. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_create_item: -- :ref:`TreeItem` **create_item** **(** :ref:`TreeItem` parent=null, :ref:`int` idx=-1 **)** +.. rst-class:: classref-method + +:ref:`TreeItem` **create_item** **(** :ref:`TreeItem` parent=null, :ref:`int` idx=-1 **)** Creates an item in the tree and adds it as a child of ``parent``, which can be either a valid :ref:`TreeItem` or ``null``. @@ -635,19 +783,27 @@ If ``parent`` is ``null``, the root item will be the parent, or the new item wil The new item will be the ``idx``\ th child of parent, or it will be the last child if there are not enough siblings. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_edit_selected: -- :ref:`bool` **edit_selected** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **edit_selected** **(** **)** Edits the selected tree item as if it was clicked. The item must be set editable with :ref:`TreeItem.set_editable`. Returns ``true`` if the item could be edited. Fails if no item is selected. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_ensure_cursor_is_visible: -- void **ensure_cursor_is_visible** **(** **)** +.. rst-class:: classref-method + +void **ensure_cursor_is_visible** **(** **)** Makes the currently focused cell visible. @@ -655,77 +811,111 @@ This will scroll the tree if necessary. In :ref:`SELECT_ROW` mode. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_button_id_at_position: -- :ref:`int` **get_button_id_at_position** **(** :ref:`Vector2` position **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_button_id_at_position** **(** :ref:`Vector2` position **)** |const| Returns the button id at ``position``, or -1 if no button is there. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_column_at_position: -- :ref:`int` **get_column_at_position** **(** :ref:`Vector2` position **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_column_at_position** **(** :ref:`Vector2` position **)** |const| Returns the column index at ``position``, or -1 if no item is there. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_column_expand_ratio: -- :ref:`int` **get_column_expand_ratio** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`int` **get_column_expand_ratio** **(** :ref:`int` column **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the expand ratio assigned to the column. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_method_get_column_title: -- :ref:`String` **get_column_title** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_column_title** **(** :ref:`int` column **)** |const| Returns the column's title. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_column_title_direction: -- :ref:`TextDirection` **get_column_title_direction** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`TextDirection` **get_column_title_direction** **(** :ref:`int` column **)** |const| Returns column title base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_column_title_language: -- :ref:`String` **get_column_title_language** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_column_title_language** **(** :ref:`int` column **)** |const| Returns column title language code. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_column_width: -- :ref:`int` **get_column_width** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_column_width** **(** :ref:`int` column **)** |const| Returns the column's width in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_custom_popup_rect: -- :ref:`Rect2` **get_custom_popup_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_custom_popup_rect** **(** **)** |const| Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See :ref:`TreeItem.set_cell_mode`. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_drop_section_at_position: -- :ref:`int` **get_drop_section_at_position** **(** :ref:`Vector2` position **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_drop_section_at_position** **(** :ref:`Vector2` position **)** |const| Returns the drop section at ``position``, or -100 if no item is there. @@ -733,11 +923,15 @@ Values -1, 0, or 1 will be returned for the "above item", "on item", and "below To get the item which the returned drop section is relative to, use :ref:`get_item_at_position`. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_edited: -- :ref:`TreeItem` **get_edited** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TreeItem` **get_edited** **(** **)** |const| Returns the currently edited item. Can be used with :ref:`item_edited` to get the item that was modified. @@ -766,69 +960,101 @@ Returns the currently edited item. Can be used with :ref:`item_edited` **get_edited_column** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_edited_column** **(** **)** |const| Returns the column for the currently edited item. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_item_area_rect: -- :ref:`Rect2` **get_item_area_rect** **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_item_area_rect** **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| Returns the rectangle area for the specified :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_item_at_position: -- :ref:`TreeItem` **get_item_at_position** **(** :ref:`Vector2` position **)** |const| +.. rst-class:: classref-method + +:ref:`TreeItem` **get_item_at_position** **(** :ref:`Vector2` position **)** |const| Returns the tree item at the specified position (relative to the tree origin position). +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_next_selected: -- :ref:`TreeItem` **get_next_selected** **(** :ref:`TreeItem` from **)** +.. rst-class:: classref-method + +:ref:`TreeItem` **get_next_selected** **(** :ref:`TreeItem` from **)** Returns the next selected :ref:`TreeItem` after the given one, or ``null`` if the end is reached. If ``from`` is ``null``, this returns the first selected item. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_pressed_button: -- :ref:`int` **get_pressed_button** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_pressed_button** **(** **)** |const| Returns the last pressed button's index. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_root: -- :ref:`TreeItem` **get_root** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TreeItem` **get_root** **(** **)** |const| Returns the tree's root item, or ``null`` if the tree is empty. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_scroll: -- :ref:`Vector2` **get_scroll** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_scroll** **(** **)** |const| Returns the current scrolling position. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_selected: -- :ref:`TreeItem` **get_selected** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TreeItem` **get_selected** **(** **)** |const| Returns the currently focused item, or ``null`` if no item is focused. @@ -836,11 +1062,15 @@ In :ref:`SELECT_ROW` and :ref:`SELECT_SINGLE`. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_get_selected_column: -- :ref:`int` **get_selected_column** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_selected_column** **(** **)** |const| Returns the currently focused column, or -1 if no column is focused. @@ -848,568 +1078,704 @@ In :ref:`SELECT_SINGLE` mode, the focused col To tell whether a column of an item is selected, use :ref:`TreeItem.is_selected`. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_is_column_clipping_content: -- :ref:`bool` **is_column_clipping_content** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`bool` **is_column_clipping_content** **(** :ref:`int` column **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the column has enabled clipping (see :ref:`set_column_clip_content`). + +.. rst-class:: classref-item-separator ---- .. _class_Tree_method_is_column_expanding: -- :ref:`bool` **is_column_expanding** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method -.. container:: contribute +:ref:`bool` **is_column_expanding** **(** :ref:`int` column **)** |const| - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns ``true`` if the column has enabled expanding (see :ref:`set_column_expand`). + +.. rst-class:: classref-item-separator ---- .. _class_Tree_method_scroll_to_item: -- void **scroll_to_item** **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** +.. rst-class:: classref-method -Causes the ``Tree`` to jump to the specified :ref:`TreeItem`. +void **scroll_to_item** **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** + +Causes the **Tree** to jump to the specified :ref:`TreeItem`. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_method_set_column_clip_content: -- void **set_column_clip_content** **(** :ref:`int` column, :ref:`bool` enable **)** +.. rst-class:: classref-method -.. container:: contribute +void **set_column_clip_content** **(** :ref:`int` column, :ref:`bool` enable **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Allows to enable clipping for column's content, making the content size ignored. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_method_set_column_custom_minimum_width: -- void **set_column_custom_minimum_width** **(** :ref:`int` column, :ref:`int` min_width **)** +.. rst-class:: classref-method + +void **set_column_custom_minimum_width** **(** :ref:`int` column, :ref:`int` min_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`. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_set_column_expand: -- void **set_column_expand** **(** :ref:`int` column, :ref:`bool` expand **)** +.. rst-class:: classref-method -If ``true``, the column will have the "Expand" flag of :ref:`Control`. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to :ref:`Control.size_flags_stretch_ratio`. +void **set_column_expand** **(** :ref:`int` column, :ref:`bool` expand **)** + +If ``true``, the column will have the "Expand" flag of :ref:`Control`. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to :ref:`Control.size_flags_stretch_ratio` (see :ref:`set_column_expand_ratio`). + +.. rst-class:: classref-item-separator ---- .. _class_Tree_method_set_column_expand_ratio: -- void **set_column_expand_ratio** **(** :ref:`int` column, :ref:`int` ratio **)** +.. rst-class:: classref-method -.. container:: contribute +void **set_column_expand_ratio** **(** :ref:`int` column, :ref:`int` ratio **)** - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the relative expand ratio for a column. See :ref:`set_column_expand`. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_method_set_column_title: -- void **set_column_title** **(** :ref:`int` column, :ref:`String` title **)** +.. rst-class:: classref-method + +void **set_column_title** **(** :ref:`int` column, :ref:`String` title **)** Sets the title of a column. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_set_column_title_direction: -- void **set_column_title_direction** **(** :ref:`int` column, :ref:`TextDirection` direction **)** +.. rst-class:: classref-method + +void **set_column_title_direction** **(** :ref:`int` column, :ref:`TextDirection` direction **)** Sets column title base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_set_column_title_language: -- void **set_column_title_language** **(** :ref:`int` column, :ref:`String` language **)** +.. rst-class:: classref-method + +void **set_column_title_language** **(** :ref:`int` column, :ref:`String` language **)** Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_method_set_selected: -- void **set_selected** **(** :ref:`TreeItem` item, :ref:`int` column **)** +.. rst-class:: classref-method + +void **set_selected** **(** :ref:`TreeItem` item, :ref:`int` column **)** Selects the specified :ref:`TreeItem` and column. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Theme Property Descriptions --------------------------- .. _class_Tree_theme_color_children_hl_line_color: -- :ref:`Color` **children_hl_line_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.27, 0.27, 0.27, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **children_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` The :ref:`Color` of the relationship lines between the selected :ref:`TreeItem` and its children. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_custom_button_font_highlight: -- :ref:`Color` **custom_button_font_highlight** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.95, 0.95, 0.95, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **custom_button_font_highlight** = ``Color(0.95, 0.95, 0.95, 1)`` Text :ref:`Color` for a :ref:`TreeItem.CELL_MODE_CUSTOM` mode cell when it's hovered. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_drop_position_color: -- :ref:`Color` **drop_position_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **drop_position_color** = ``Color(1, 1, 1, 1)`` :ref:`Color` used to draw possible drop locations. See :ref:`DropModeFlags` constants for further description of drop locations. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_font_color: -- :ref:`Color` **font_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------+ -| *Default* | ``Color(0.7, 0.7, 0.7, 1)`` | -+-----------+-----------------------------+ +:ref:`Color` **font_color** = ``Color(0.7, 0.7, 0.7, 1)`` Default text :ref:`Color` of the item. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_font_outline_color: -- :ref:`Color` **font_outline_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` The tint of text outline of the item. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_font_selected_color: -- :ref:`Color` **font_selected_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **font_selected_color** = ``Color(1, 1, 1, 1)`` Text :ref:`Color` used when the item is selected. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_guide_color: -- :ref:`Color` **guide_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.7, 0.7, 0.7, 0.25)`` | -+-----------+--------------------------------+ +:ref:`Color` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`Color` of the guideline. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_parent_hl_line_color: -- :ref:`Color` **parent_hl_line_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.27, 0.27, 0.27, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **parent_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` The :ref:`Color` of the relationship lines between the selected :ref:`TreeItem` and its parents. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_relationship_line_color: -- :ref:`Color` **relationship_line_color** +.. rst-class:: classref-themeproperty -+-----------+--------------------------------+ -| *Default* | ``Color(0.27, 0.27, 0.27, 1)`` | -+-----------+--------------------------------+ +:ref:`Color` **relationship_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` The default :ref:`Color` of the relationship lines. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_color_title_button_color: -- :ref:`Color` **title_button_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **title_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` Default text :ref:`Color` of the title button. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_button_margin: -- :ref:`int` **button_margin** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **button_margin** = ``4`` The horizontal space between each button in a cell. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_children_hl_line_width: -- :ref:`int` **children_hl_line_width** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **children_hl_line_width** = ``1`` The width of the relationship lines between the selected :ref:`TreeItem` and its children. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_draw_guides: -- :ref:`int` **draw_guides** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **draw_guides** = ``1`` Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_draw_relationship_lines: -- :ref:`int` **draw_relationship_lines** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **draw_relationship_lines** = ``0`` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_item_margin: -- :ref:`int` **item_margin** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``16`` | -+-----------+--------+ +:ref:`int` **item_margin** = ``16`` The horizontal margin at the start of an item. This is used when folding is enabled for the item. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_outline_size: -- :ref:`int` **outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **outline_size** = ``0`` The size of the text outline. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_parent_hl_line_margin: -- :ref:`int` **parent_hl_line_margin** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **parent_hl_line_margin** = ``0`` The space between the parent relationship lines for the selected :ref:`TreeItem` and the relationship lines to its siblings that are not selected. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_parent_hl_line_width: -- :ref:`int` **parent_hl_line_width** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **parent_hl_line_width** = ``1`` The width of the relationship lines between the selected :ref:`TreeItem` and its parents. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_relationship_line_width: -- :ref:`int` **relationship_line_width** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`int` **relationship_line_width** = ``1`` The default width of the relationship lines. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_scroll_border: -- :ref:`int` **scroll_border** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **scroll_border** = ``4`` The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_scroll_speed: -- :ref:`int` **scroll_speed** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``12`` | -+-----------+--------+ +:ref:`int` **scroll_speed** = ``12`` The speed of border scrolling. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_constant_v_separation: -- :ref:`int` **v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **v_separation** = ``4`` The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_font_font: -- :ref:`Font` **font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **font** :ref:`Font` of the item's text. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_font_title_button_font: -- :ref:`Font` **title_button_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **title_button_font** :ref:`Font` of the title button's text. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_font_size_font_size: -- :ref:`int` **font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **font_size** Font size of the item's text. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_arrow: -- :ref:`Texture2D` **arrow** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **arrow** The arrow icon used when a foldable item is not collapsed. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_arrow_collapsed: -- :ref:`Texture2D` **arrow_collapsed** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **arrow_collapsed** The arrow icon used when a foldable item is collapsed (for left-to-right layouts). +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_arrow_collapsed_mirrored: -- :ref:`Texture2D` **arrow_collapsed_mirrored** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **arrow_collapsed_mirrored** The arrow icon used when a foldable item is collapsed (for right-to-left layouts). +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_checked: -- :ref:`Texture2D` **checked** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **checked** The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_indeterminate: -- :ref:`Texture2D` **indeterminate** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **indeterminate** The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_select_arrow: -- :ref:`Texture2D` **select_arrow** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **select_arrow** The arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE` mode cell. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_unchecked: -- :ref:`Texture2D` **unchecked** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **unchecked** The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_icon_updown: -- :ref:`Texture2D` **updown** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **updown** The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE` mode cell. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_style_button_pressed: -- :ref:`StyleBox` **button_pressed** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **button_pressed** :ref:`StyleBox` used when a button in the tree is pressed. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_style_cursor: -- :ref:`StyleBox` **cursor** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used for the cursor, when the ``Tree`` is being focused. +:ref:`StyleBox` **cursor** + +:ref:`StyleBox` used for the cursor, when the **Tree** is being focused. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_theme_style_cursor_unfocused: -- :ref:`StyleBox` **cursor_unfocused** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` used for the cursor, when the ``Tree`` is not being focused. +:ref:`StyleBox` **cursor_unfocused** + +:ref:`StyleBox` used for the cursor, when the **Tree** is not being focused. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_theme_style_custom_button: -- :ref:`StyleBox` **custom_button** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **custom_button** Default :ref:`StyleBox` for a :ref:`TreeItem.CELL_MODE_CUSTOM` mode cell. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_style_custom_button_hover: -- :ref:`StyleBox` **custom_button_hover** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **custom_button_hover** :ref:`StyleBox` for a :ref:`TreeItem.CELL_MODE_CUSTOM` mode cell when it's hovered. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_style_custom_button_pressed: -- :ref:`StyleBox` **custom_button_pressed** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **custom_button_pressed** :ref:`StyleBox` for a :ref:`TreeItem.CELL_MODE_CUSTOM` mode cell when it's pressed. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_style_focus: -- :ref:`StyleBox` **focus** +.. rst-class:: classref-themeproperty -The focused style for the ``Tree``, drawn on top of everything. +:ref:`StyleBox` **focus** + +The focused style for the **Tree**, drawn on top of everything. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_theme_style_panel: -- :ref:`StyleBox` **panel** +.. rst-class:: classref-themeproperty -The background style for the ``Tree``. +:ref:`StyleBox` **panel** + +The background style for the **Tree**. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_theme_style_selected: -- :ref:`StyleBox` **selected** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` for the selected items, used when the ``Tree`` is not being focused. +:ref:`StyleBox` **selected** + +:ref:`StyleBox` for the selected items, used when the **Tree** is not being focused. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_theme_style_selected_focus: -- :ref:`StyleBox` **selected_focus** +.. rst-class:: classref-themeproperty -:ref:`StyleBox` for the selected items, used when the ``Tree`` is being focused. +:ref:`StyleBox` **selected_focus** + +:ref:`StyleBox` for the selected items, used when the **Tree** is being focused. + +.. rst-class:: classref-item-separator ---- .. _class_Tree_theme_style_title_button_hover: -- :ref:`StyleBox` **title_button_hover** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **title_button_hover** :ref:`StyleBox` used when the title button is being hovered. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_style_title_button_normal: -- :ref:`StyleBox` **title_button_normal** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **title_button_normal** Default :ref:`StyleBox` for the title button. +.. rst-class:: classref-item-separator + ---- .. _class_Tree_theme_style_title_button_pressed: -- :ref:`StyleBox` **title_button_pressed** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **title_button_pressed** :ref:`StyleBox` used when the title button is being pressed. diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index b5de6e445..51c7671a0 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -14,1037 +14,1453 @@ TreeItem Control for a single item inside a :ref:`Tree`. +.. rst-class:: classref-introduction-group + Description ----------- -Control for a single item inside a :ref:`Tree`. May have child ``TreeItem``\ s and be styled as well as contain buttons. +Control for a single item inside a :ref:`Tree`. May have child **TreeItem**\ s and be styled as well as contain buttons. -You can remove a ``TreeItem`` by using :ref:`Object.free`. +You can remove a **TreeItem** by using :ref:`Object.free`. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------+-----------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`collapsed` | -+-------------------------+-----------------------------------------------------------------------------+ -| :ref:`int` | :ref:`custom_minimum_height` | -+-------------------------+-----------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`disable_folding` | -+-------------------------+-----------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`visible` | -+-------------------------+-----------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`collapsed` | + +-------------------------+-----------------------------------------------------------------------------+ + | :ref:`int` | :ref:`custom_minimum_height` | + +-------------------------+-----------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`disable_folding` | + +-------------------------+-----------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`visible` | + +-------------------------+-----------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip_text="" **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_recursive` **(** :ref:`StringName` method, ... **)** |vararg| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_custom_color` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`create_child` **(** :ref:`int` idx=-1 **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deselect` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`erase_button` **(** :ref:`int` column, :ref:`int` button_idx **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_button` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_button_by_id` **(** :ref:`int` column, :ref:`int` id **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_button_count` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_button_id` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_button_tooltip_text` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeCellMode` | :ref:`get_cell_mode` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_child` **(** :ref:`int` idx **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_child_count` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem[]` | :ref:`get_children` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_custom_bg_color` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_custom_color` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Font` | :ref:`get_custom_font` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_custom_font_size` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_expand_right` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_first_child` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_icon` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_icon_max_width` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_icon_modulate` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_icon_region` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_index` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_language` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_metadata` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_next` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_next_visible` **(** :ref:`bool` wrap=false **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_parent` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_prev` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_prev_visible` **(** :ref:`bool` wrap=false **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_range` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_range_config` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`get_structured_text_bidi_override` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_structured_text_bidi_override_options` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_suffix` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_text` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`HorizontalAlignment` | :ref:`get_text_alignment` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`get_text_direction` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tooltip_text` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tree` | :ref:`get_tree` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_any_collapsed` **(** :ref:`bool` only_visible=false **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_checked` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_custom_set_as_button` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_editable` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_indeterminate` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selectable` **(** :ref:`int` column **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_after` **(** :ref:`TreeItem` item **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_before` **(** :ref:`TreeItem` item **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`propagate_check` **(** :ref:`int` column, :ref:`bool` emit_signal=true **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_child` **(** :ref:`TreeItem` child **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` column **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_button` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture2D` button **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_button_color` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Color` color **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`bool` disabled **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cell_mode` **(** :ref:`int` column, :ref:`TreeCellMode` mode **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_checked` **(** :ref:`int` column, :ref:`bool` checked **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collapsed_recursive` **(** :ref:`bool` enable **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_as_button` **(** :ref:`int` column, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_bg_color` **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_color` **(** :ref:`int` column, :ref:`Color` color **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_draw` **(** :ref:`int` column, :ref:`Object` object, :ref:`StringName` callback **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_font` **(** :ref:`int` column, :ref:`Font` font **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_font_size` **(** :ref:`int` column, :ref:`int` font_size **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_editable` **(** :ref:`int` column, :ref:`bool` enabled **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand_right` **(** :ref:`int` column, :ref:`bool` enable **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon` **(** :ref:`int` column, :ref:`Texture2D` texture **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_max_width` **(** :ref:`int` column, :ref:`int` width **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_modulate` **(** :ref:`int` column, :ref:`Color` modulate **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_region` **(** :ref:`int` column, :ref:`Rect2` region **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_indeterminate` **(** :ref:`int` column, :ref:`bool` indeterminate **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_language` **(** :ref:`int` column, :ref:`String` language **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_metadata` **(** :ref:`int` column, :ref:`Variant` meta **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_range` **(** :ref:`int` column, :ref:`float` value **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_range_config` **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_selectable` **(** :ref:`int` column, :ref:`bool` selectable **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_structured_text_bidi_override` **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_structured_text_bidi_override_options` **(** :ref:`int` column, :ref:`Array` args **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_suffix` **(** :ref:`int` column, :ref:`String` text **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text` **(** :ref:`int` column, :ref:`String` text **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text_alignment` **(** :ref:`int` column, :ref:`HorizontalAlignment` text_alignment **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tooltip_text` **(** :ref:`int` column, :ref:`String` tooltip **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`uncollapse_tree` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip_text="" **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`call_recursive` **(** :ref:`StringName` method, ... **)** |vararg| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_custom_color` **(** :ref:`int` column **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`create_child` **(** :ref:`int` idx=-1 **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** :ref:`int` column **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_button` **(** :ref:`int` column, :ref:`int` button_idx **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_button` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_button_by_id` **(** :ref:`int` column, :ref:`int` id **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_button_count` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_button_id` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_button_tooltip_text` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeCellMode` | :ref:`get_cell_mode` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_child` **(** :ref:`int` idx **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_child_count` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem[]` | :ref:`get_children` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_custom_bg_color` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_custom_color` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_custom_font` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_custom_font_size` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_expand_right` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_first_child` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_icon` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_icon_max_width` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_icon_modulate` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_icon_region` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_index` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_language` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_metadata` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_next` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_next_visible` **(** :ref:`bool` wrap=false **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_parent` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_prev` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_prev_visible` **(** :ref:`bool` wrap=false **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_range` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_range_config` **(** :ref:`int` column **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser` | :ref:`get_structured_text_bidi_override` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_structured_text_bidi_override_options` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_suffix` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_text` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`get_text_alignment` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_text_direction` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tooltip_text` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tree` | :ref:`get_tree` **(** **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_any_collapsed` **(** :ref:`bool` only_visible=false **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_checked` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_custom_set_as_button` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_editable` **(** :ref:`int` column **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_indeterminate` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_selectable` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_selected` **(** :ref:`int` column **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_after` **(** :ref:`TreeItem` item **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_before` **(** :ref:`TreeItem` item **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`propagate_check` **(** :ref:`int` column, :ref:`bool` emit_signal=true **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_child` **(** :ref:`TreeItem` child **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select` **(** :ref:`int` column **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_button` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture2D` button **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_button_color` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Color` color **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`bool` disabled **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_mode` **(** :ref:`int` column, :ref:`TreeCellMode` mode **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_checked` **(** :ref:`int` column, :ref:`bool` checked **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collapsed_recursive` **(** :ref:`bool` enable **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_as_button` **(** :ref:`int` column, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_bg_color` **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_color` **(** :ref:`int` column, :ref:`Color` color **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_draw` **(** :ref:`int` column, :ref:`Object` object, :ref:`StringName` callback **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_font` **(** :ref:`int` column, :ref:`Font` font **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_font_size` **(** :ref:`int` column, :ref:`int` font_size **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_editable` **(** :ref:`int` column, :ref:`bool` enabled **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_expand_right` **(** :ref:`int` column, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_icon` **(** :ref:`int` column, :ref:`Texture2D` texture **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_icon_max_width` **(** :ref:`int` column, :ref:`int` width **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_icon_modulate` **(** :ref:`int` column, :ref:`Color` modulate **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_icon_region` **(** :ref:`int` column, :ref:`Rect2` region **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_indeterminate` **(** :ref:`int` column, :ref:`bool` indeterminate **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_language` **(** :ref:`int` column, :ref:`String` language **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_metadata` **(** :ref:`int` column, :ref:`Variant` meta **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_range` **(** :ref:`int` column, :ref:`float` value **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_range_config` **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_selectable` **(** :ref:`int` column, :ref:`bool` selectable **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_structured_text_bidi_override` **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_structured_text_bidi_override_options` **(** :ref:`int` column, :ref:`Array` args **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_suffix` **(** :ref:`int` column, :ref:`String` text **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_text` **(** :ref:`int` column, :ref:`String` text **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_text_alignment` **(** :ref:`int` column, :ref:`HorizontalAlignment` text_alignment **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_text_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tooltip_text` **(** :ref:`int` column, :ref:`String` tooltip **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`uncollapse_tree` **(** **)** | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_TreeItem_TreeCellMode: -.. _class_TreeItem_constant_CELL_MODE_STRING: - -.. _class_TreeItem_constant_CELL_MODE_CHECK: - -.. _class_TreeItem_constant_CELL_MODE_RANGE: - -.. _class_TreeItem_constant_CELL_MODE_ICON: - -.. _class_TreeItem_constant_CELL_MODE_CUSTOM: +.. rst-class:: classref-enumeration enum **TreeCellMode**: -- **CELL_MODE_STRING** = **0** --- Cell contains a string. +.. _class_TreeItem_constant_CELL_MODE_STRING: -- **CELL_MODE_CHECK** = **1** --- Cell contains a checkbox. +.. rst-class:: classref-enumeration-constant -- **CELL_MODE_RANGE** = **2** --- Cell contains a range. +:ref:`TreeCellMode` **CELL_MODE_STRING** = ``0`` -- **CELL_MODE_ICON** = **3** --- Cell contains an icon. +Cell contains a string. -- **CELL_MODE_CUSTOM** = **4** +.. _class_TreeItem_constant_CELL_MODE_CHECK: + +.. rst-class:: classref-enumeration-constant + +:ref:`TreeCellMode` **CELL_MODE_CHECK** = ``1`` + +Cell contains a checkbox. + +.. _class_TreeItem_constant_CELL_MODE_RANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TreeCellMode` **CELL_MODE_RANGE** = ``2`` + +Cell contains a range. + +.. _class_TreeItem_constant_CELL_MODE_ICON: + +.. rst-class:: classref-enumeration-constant + +:ref:`TreeCellMode` **CELL_MODE_ICON** = ``3`` + +Cell contains an icon. + +.. _class_TreeItem_constant_CELL_MODE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`TreeCellMode` **CELL_MODE_CUSTOM** = ``4`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TreeItem_property_collapsed: -- :ref:`bool` **collapsed** +.. rst-class:: classref-property -+----------+----------------------+ -| *Setter* | set_collapsed(value) | -+----------+----------------------+ -| *Getter* | is_collapsed() | -+----------+----------------------+ +:ref:`bool` **collapsed** + +.. rst-class:: classref-property-setget + +- void **set_collapsed** **(** :ref:`bool` value **)** +- :ref:`bool` **is_collapsed** **(** **)** If ``true``, the TreeItem is collapsed. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_property_custom_minimum_height: -- :ref:`int` **custom_minimum_height** +.. rst-class:: classref-property -+----------+----------------------------------+ -| *Setter* | set_custom_minimum_height(value) | -+----------+----------------------------------+ -| *Getter* | get_custom_minimum_height() | -+----------+----------------------------------+ +:ref:`int` **custom_minimum_height** + +.. rst-class:: classref-property-setget + +- void **set_custom_minimum_height** **(** :ref:`int` value **)** +- :ref:`int` **get_custom_minimum_height** **(** **)** The custom minimum height. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_property_disable_folding: -- :ref:`bool` **disable_folding** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_disable_folding(value) | -+----------+----------------------------+ -| *Getter* | is_folding_disabled() | -+----------+----------------------------+ +:ref:`bool` **disable_folding** + +.. rst-class:: classref-property-setget + +- void **set_disable_folding** **(** :ref:`bool` value **)** +- :ref:`bool` **is_folding_disabled** **(** **)** If ``true``, folding is disabled for this TreeItem. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_property_visible: -- :ref:`bool` **visible** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_visible(value) | -+----------+--------------------+ -| *Getter* | is_visible() | -+----------+--------------------+ +:ref:`bool` **visible** -If ``true``, the ``TreeItem`` is visible (default). +.. rst-class:: classref-property-setget -Note that if a ``TreeItem`` is set to not be visible, none of its children will be visible either. +- void **set_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_visible** **(** **)** + +If ``true``, the **TreeItem** is visible (default). + +Note that if a **TreeItem** is set to not be visible, none of its children will be visible either. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_TreeItem_method_add_button: -- void **add_button** **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip_text="" **)** +.. rst-class:: classref-method + +void **add_button** **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip_text="" **)** Adds a button with :ref:`Texture2D` ``button`` at column ``column``. The ``id`` is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_call_recursive: -- void **call_recursive** **(** :ref:`StringName` method, ... **)** |vararg| +.. rst-class:: classref-method + +void **call_recursive** **(** :ref:`StringName` method, ... **)** |vararg| Calls the ``method`` on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_clear_custom_bg_color: -- void **clear_custom_bg_color** **(** :ref:`int` column **)** +.. rst-class:: classref-method + +void **clear_custom_bg_color** **(** :ref:`int` column **)** Resets the background color for the given column to default. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_clear_custom_color: -- void **clear_custom_color** **(** :ref:`int` column **)** +.. rst-class:: classref-method + +void **clear_custom_color** **(** :ref:`int` column **)** Resets the color for the given column to default. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_create_child: -- :ref:`TreeItem` **create_child** **(** :ref:`int` idx=-1 **)** +.. rst-class:: classref-method + +:ref:`TreeItem` **create_child** **(** :ref:`int` idx=-1 **)** Creates an item and adds it as a child. The new item will be inserted as position ``idx`` (the default value ``-1`` means the last position), or it will be the last child if ``idx`` is higher than the child count. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_deselect: -- void **deselect** **(** :ref:`int` column **)** +.. rst-class:: classref-method + +void **deselect** **(** :ref:`int` column **)** Deselects the given column. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_erase_button: -- void **erase_button** **(** :ref:`int` column, :ref:`int` button_idx **)** +.. rst-class:: classref-method + +void **erase_button** **(** :ref:`int` column, :ref:`int` button_idx **)** Removes the button at index ``button_idx`` in column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_button: -- :ref:`Texture2D` **get_button** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_button** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| Returns the :ref:`Texture2D` of the button at index ``button_idx`` in column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_button_by_id: -- :ref:`int` **get_button_by_id** **(** :ref:`int` column, :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_button_by_id** **(** :ref:`int` column, :ref:`int` id **)** |const| Returns the button index if there is a button with id ``id`` in column ``column``, otherwise returns -1. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_button_count: -- :ref:`int` **get_button_count** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_button_count** **(** :ref:`int` column **)** |const| Returns the number of buttons in column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_button_id: -- :ref:`int` **get_button_id** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_button_id** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| Returns the id for the button at index ``button_idx`` in column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_button_tooltip_text: -- :ref:`String` **get_button_tooltip_text** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_button_tooltip_text** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| Returns the tooltip text for the button at index ``button_idx`` in column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_cell_mode: -- :ref:`TreeCellMode` **get_cell_mode** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`TreeCellMode` **get_cell_mode** **(** :ref:`int` column **)** |const| Returns the column's cell mode. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_child: -- :ref:`TreeItem` **get_child** **(** :ref:`int` idx **)** +.. rst-class:: classref-method + +:ref:`TreeItem` **get_child** **(** :ref:`int` idx **)** Returns a child item by its index (see :ref:`get_child_count`). This method is often used for iterating all children of an item. Negative indices access the children from the last one. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_child_count: -- :ref:`int` **get_child_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_child_count** **(** **)** Returns the number of child items. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_children: -- :ref:`TreeItem[]` **get_children** **(** **)** +.. rst-class:: classref-method + +:ref:`TreeItem[]` **get_children** **(** **)** Returns an array of references to the item's children. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_custom_bg_color: -- :ref:`Color` **get_custom_bg_color** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_custom_bg_color** **(** :ref:`int` column **)** |const| Returns the custom background color of column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_custom_color: -- :ref:`Color` **get_custom_color** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_custom_color** **(** :ref:`int` column **)** |const| Returns the custom color of column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_custom_font: -- :ref:`Font` **get_custom_font** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Font` **get_custom_font** **(** :ref:`int` column **)** |const| Returns custom font used to draw text in the column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_custom_font_size: -- :ref:`int` **get_custom_font_size** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_custom_font_size** **(** :ref:`int` column **)** |const| Returns custom font size used to draw text in the column ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_expand_right: -- :ref:`bool` **get_expand_right** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_expand_right** **(** :ref:`int` column **)** |const| Returns ``true`` if ``expand_right`` is set. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_first_child: -- :ref:`TreeItem` **get_first_child** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TreeItem` **get_first_child** **(** **)** |const| Returns the TreeItem's first child. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_icon: -- :ref:`Texture2D` **get_icon** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_icon** **(** :ref:`int` column **)** |const| Returns the given column's icon :ref:`Texture2D`. Error if no icon is set. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_icon_max_width: -- :ref:`int` **get_icon_max_width** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_icon_max_width** **(** :ref:`int` column **)** |const| Returns the column's icon's maximum width. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_icon_modulate: -- :ref:`Color` **get_icon_modulate** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_icon_modulate** **(** :ref:`int` column **)** |const| Returns the :ref:`Color` modulating the column's icon. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_icon_region: -- :ref:`Rect2` **get_icon_region** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_icon_region** **(** :ref:`int` column **)** |const| Returns the icon :ref:`Texture2D` region as :ref:`Rect2`. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_index: -- :ref:`int` **get_index** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_index** **(** **)** Returns the node's order in the tree. For example, if called on the first child item the position is ``0``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_language: -- :ref:`String` **get_language** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_language** **(** :ref:`int` column **)** |const| Returns item's text language code. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_metadata: -- :ref:`Variant` **get_metadata** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_metadata** **(** :ref:`int` column **)** |const| Returns the metadata value that was set for the given column using :ref:`set_metadata`. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_next: -- :ref:`TreeItem` **get_next** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TreeItem` **get_next** **(** **)** |const| Returns the next sibling TreeItem in the tree or a null object if there is none. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_next_visible: -- :ref:`TreeItem` **get_next_visible** **(** :ref:`bool` wrap=false **)** +.. rst-class:: classref-method + +:ref:`TreeItem` **get_next_visible** **(** :ref:`bool` wrap=false **)** Returns the next visible sibling TreeItem in the tree or a null object if there is none. If ``wrap`` is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns ``null``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_parent: -- :ref:`TreeItem` **get_parent** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TreeItem` **get_parent** **(** **)** |const| Returns the parent TreeItem or a null object if there is none. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_prev: -- :ref:`TreeItem` **get_prev** **(** **)** +.. rst-class:: classref-method + +:ref:`TreeItem` **get_prev** **(** **)** Returns the previous sibling TreeItem in the tree or a null object if there is none. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_prev_visible: -- :ref:`TreeItem` **get_prev_visible** **(** :ref:`bool` wrap=false **)** +.. rst-class:: classref-method + +:ref:`TreeItem` **get_prev_visible** **(** :ref:`bool` wrap=false **)** Returns the previous visible sibling TreeItem in the tree or a null object if there is none. If ``wrap`` is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns ``null``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_range: -- :ref:`float` **get_range** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_range** **(** :ref:`int` column **)** |const| Returns the value of a :ref:`CELL_MODE_RANGE` column. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_range_config: -- :ref:`Dictionary` **get_range_config** **(** :ref:`int` column **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_range_config** **(** :ref:`int` column **)** Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr". +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_structured_text_bidi_override: -- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** :ref:`int` column **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_structured_text_bidi_override_options: -- :ref:`Array` **get_structured_text_bidi_override_options** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_structured_text_bidi_override_options** **(** :ref:`int` column **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_suffix: -- :ref:`String` **get_suffix** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_suffix** **(** :ref:`int` column **)** |const| Gets the suffix string shown after the column value. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_text: -- :ref:`String` **get_text** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_text** **(** :ref:`int` column **)** |const| Returns the given column's text. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_text_alignment: -- :ref:`HorizontalAlignment` **get_text_alignment** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`HorizontalAlignment` **get_text_alignment** **(** :ref:`int` column **)** |const| Returns the given column's text alignment. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_text_direction: -- :ref:`TextDirection` **get_text_direction** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`TextDirection` **get_text_direction** **(** :ref:`int` column **)** |const| Returns item's text base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_tooltip_text: -- :ref:`String` **get_tooltip_text** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_tooltip_text** **(** :ref:`int` column **)** |const| Returns the given column's tooltip text. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_get_tree: -- :ref:`Tree` **get_tree** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Tree` **get_tree** **(** **)** |const| Returns the :ref:`Tree` that owns this TreeItem. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_is_any_collapsed: -- :ref:`bool` **is_any_collapsed** **(** :ref:`bool` only_visible=false **)** +.. rst-class:: classref-method -Returns ``true`` if this ``TreeItem``, or any of its descendants, is collapsed. +:ref:`bool` **is_any_collapsed** **(** :ref:`bool` only_visible=false **)** -If ``only_visible`` is ``true`` it ignores non-visible ``TreeItem``\ s. +Returns ``true`` if this **TreeItem**, or any of its descendants, is collapsed. + +If ``only_visible`` is ``true`` it ignores non-visible **TreeItem**\ s. + +.. rst-class:: classref-item-separator ---- .. _class_TreeItem_method_is_button_disabled: -- :ref:`bool` **is_button_disabled** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_button_disabled** **(** :ref:`int` column, :ref:`int` button_idx **)** |const| Returns ``true`` if the button at index ``button_idx`` for the given ``column`` is disabled. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_is_checked: -- :ref:`bool` **is_checked** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_checked** **(** :ref:`int` column **)** |const| Returns ``true`` if the given ``column`` is checked. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_is_custom_set_as_button: -- :ref:`bool` **is_custom_set_as_button** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_custom_set_as_button** **(** :ref:`int` column **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_is_editable: -- :ref:`bool` **is_editable** **(** :ref:`int` column **)** +.. rst-class:: classref-method + +:ref:`bool` **is_editable** **(** :ref:`int` column **)** Returns ``true`` if the given ``column`` is editable. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_is_indeterminate: -- :ref:`bool` **is_indeterminate** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_indeterminate** **(** :ref:`int` column **)** |const| Returns ``true`` if the given ``column`` is indeterminate. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_is_selectable: -- :ref:`bool` **is_selectable** **(** :ref:`int` column **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_selectable** **(** :ref:`int` column **)** |const| Returns ``true`` if the given ``column`` is selectable. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_is_selected: -- :ref:`bool` **is_selected** **(** :ref:`int` column **)** +.. rst-class:: classref-method + +:ref:`bool` **is_selected** **(** :ref:`int` column **)** Returns ``true`` if the given ``column`` is selected. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_move_after: -- void **move_after** **(** :ref:`TreeItem` item **)** +.. rst-class:: classref-method + +void **move_after** **(** :ref:`TreeItem` item **)** Moves this TreeItem right after the given ``item``. \ **Note:** You can't move to the root or move the root. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_move_before: -- void **move_before** **(** :ref:`TreeItem` item **)** +.. rst-class:: classref-method + +void **move_before** **(** :ref:`TreeItem` item **)** Moves this TreeItem right before the given ``item``. \ **Note:** You can't move to the root or move the root. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_propagate_check: -- void **propagate_check** **(** :ref:`int` column, :ref:`bool` emit_signal=true **)** +.. rst-class:: classref-method + +void **propagate_check** **(** :ref:`int` column, :ref:`bool` emit_signal=true **)** 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`. 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` will not be emitted. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_remove_child: -- void **remove_child** **(** :ref:`TreeItem` child **)** +.. rst-class:: classref-method -Removes the given child ``TreeItem`` and all its children from the :ref:`Tree`. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a ``TreeItem`` use :ref:`Object.free`. +void **remove_child** **(** :ref:`TreeItem` child **)** + +Removes the given child **TreeItem** and all its children from the :ref:`Tree`. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a **TreeItem** use :ref:`Object.free`. + +.. rst-class:: classref-item-separator ---- .. _class_TreeItem_method_select: -- void **select** **(** :ref:`int` column **)** +.. rst-class:: classref-method + +void **select** **(** :ref:`int` column **)** Selects the given ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_button: -- void **set_button** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture2D` button **)** +.. rst-class:: classref-method + +void **set_button** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture2D` button **)** Sets the given column's button :ref:`Texture2D` at index ``button_idx`` to ``button``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_button_color: -- void **set_button_color** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_button_color** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Color` color **)** Sets the given column's button color at index ``button_idx`` to ``color``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_button_disabled: -- void **set_button_disabled** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`bool` disabled **)** +.. rst-class:: classref-method + +void **set_button_disabled** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`bool` disabled **)** If ``true``, disables the button at index ``button_idx`` in the given ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_cell_mode: -- void **set_cell_mode** **(** :ref:`int` column, :ref:`TreeCellMode` mode **)** +.. rst-class:: classref-method + +void **set_cell_mode** **(** :ref:`int` column, :ref:`TreeCellMode` mode **)** Sets the given column's cell mode to ``mode``. See :ref:`TreeCellMode` constants. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_checked: -- void **set_checked** **(** :ref:`int` column, :ref:`bool` checked **)** +.. rst-class:: classref-method + +void **set_checked** **(** :ref:`int` column, :ref:`bool` checked **)** If ``true``, the given ``column`` is checked. Clears column's indeterminate status. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_collapsed_recursive: -- void **set_collapsed_recursive** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method -Collapses or uncollapses this ``TreeItem`` and all the descendants of this item. +void **set_collapsed_recursive** **(** :ref:`bool` enable **)** + +Collapses or uncollapses this **TreeItem** and all the descendants of this item. + +.. rst-class:: classref-item-separator ---- .. _class_TreeItem_method_set_custom_as_button: -- void **set_custom_as_button** **(** :ref:`int` column, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_custom_as_button** **(** :ref:`int` column, :ref:`bool` enable **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_custom_bg_color: -- void **set_custom_bg_color** **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** +.. rst-class:: classref-method + +void **set_custom_bg_color** **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** Sets the given column's custom background color and whether to just use it as an outline. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_custom_color: -- void **set_custom_color** **(** :ref:`int` column, :ref:`Color` color **)** +.. rst-class:: classref-method + +void **set_custom_color** **(** :ref:`int` column, :ref:`Color` color **)** Sets the given column's custom color. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_custom_draw: -- void **set_custom_draw** **(** :ref:`int` column, :ref:`Object` object, :ref:`StringName` callback **)** +.. rst-class:: classref-method + +void **set_custom_draw** **(** :ref:`int` column, :ref:`Object` object, :ref:`StringName` callback **)** Sets the given column's custom draw callback to ``callback`` method on ``object``. -The ``callback`` should accept two arguments: the ``TreeItem`` that is drawn and its position and size as a :ref:`Rect2`. +The ``callback`` should accept two arguments: the **TreeItem** that is drawn and its position and size as a :ref:`Rect2`. + +.. rst-class:: classref-item-separator ---- .. _class_TreeItem_method_set_custom_font: -- void **set_custom_font** **(** :ref:`int` column, :ref:`Font` font **)** +.. rst-class:: classref-method + +void **set_custom_font** **(** :ref:`int` column, :ref:`Font` font **)** Sets custom font used to draw text in the given ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_custom_font_size: -- void **set_custom_font_size** **(** :ref:`int` column, :ref:`int` font_size **)** +.. rst-class:: classref-method + +void **set_custom_font_size** **(** :ref:`int` column, :ref:`int` font_size **)** Sets custom font size used to draw text in the given ``column``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_editable: -- void **set_editable** **(** :ref:`int` column, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_editable** **(** :ref:`int` column, :ref:`bool` enabled **)** If ``true``, the given ``column`` is editable. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_expand_right: -- void **set_expand_right** **(** :ref:`int` column, :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_expand_right** **(** :ref:`int` column, :ref:`bool` enable **)** If ``true``, the given ``column`` is expanded to the right. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_icon: -- void **set_icon** **(** :ref:`int` column, :ref:`Texture2D` texture **)** +.. rst-class:: classref-method + +void **set_icon** **(** :ref:`int` column, :ref:`Texture2D` texture **)** Sets the given column's icon :ref:`Texture2D`. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_icon_max_width: -- void **set_icon_max_width** **(** :ref:`int` column, :ref:`int` width **)** +.. rst-class:: classref-method + +void **set_icon_max_width** **(** :ref:`int` column, :ref:`int` width **)** Sets the given column's icon's maximum width. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_icon_modulate: -- void **set_icon_modulate** **(** :ref:`int` column, :ref:`Color` modulate **)** +.. rst-class:: classref-method + +void **set_icon_modulate** **(** :ref:`int` column, :ref:`Color` modulate **)** Modulates the given column's icon with ``modulate``. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_icon_region: -- void **set_icon_region** **(** :ref:`int` column, :ref:`Rect2` region **)** +.. rst-class:: classref-method + +void **set_icon_region** **(** :ref:`int` column, :ref:`Rect2` region **)** Sets the given column's icon's texture region. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_indeterminate: -- void **set_indeterminate** **(** :ref:`int` column, :ref:`bool` indeterminate **)** +.. rst-class:: classref-method + +void **set_indeterminate** **(** :ref:`int` column, :ref:`bool` indeterminate **)** If ``true``, the given ``column`` is marked ``indeterminate``. \ **Note:** If set ``true`` from ``false``, then column is cleared of checked status. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_language: -- void **set_language** **(** :ref:`int` column, :ref:`String` language **)** +.. rst-class:: classref-method + +void **set_language** **(** :ref:`int` column, :ref:`String` language **)** Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_metadata: -- void **set_metadata** **(** :ref:`int` column, :ref:`Variant` meta **)** +.. rst-class:: classref-method + +void **set_metadata** **(** :ref:`int` column, :ref:`Variant` meta **)** Sets the metadata value for the given column, which can be retrieved later using :ref:`get_metadata`. This can be used, for example, to store a reference to the original data. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_range: -- void **set_range** **(** :ref:`int` column, :ref:`float` value **)** +.. rst-class:: classref-method + +void **set_range** **(** :ref:`int` column, :ref:`float` value **)** Sets the value of a :ref:`CELL_MODE_RANGE` column. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_range_config: -- void **set_range_config** **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** +.. rst-class:: classref-method + +void **set_range_config** **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** Sets the range of accepted values for a column. The column must be in the :ref:`CELL_MODE_RANGE` mode. If ``expr`` is ``true``, the edit mode slider will use an exponential scale as with :ref:`Range.exp_edit`. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_selectable: -- void **set_selectable** **(** :ref:`int` column, :ref:`bool` selectable **)** +.. rst-class:: classref-method + +void **set_selectable** **(** :ref:`int` column, :ref:`bool` selectable **)** If ``true``, the given column is selectable. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_structured_text_bidi_override: -- void **set_structured_text_bidi_override** **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** +.. rst-class:: classref-method + +void **set_structured_text_bidi_override** **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_structured_text_bidi_override_options: -- void **set_structured_text_bidi_override_options** **(** :ref:`int` column, :ref:`Array` args **)** +.. rst-class:: classref-method + +void **set_structured_text_bidi_override_options** **(** :ref:`int` column, :ref:`Array` args **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_suffix: -- void **set_suffix** **(** :ref:`int` column, :ref:`String` text **)** +.. rst-class:: classref-method + +void **set_suffix** **(** :ref:`int` column, :ref:`String` text **)** Sets a string to be shown after a column's value (for example, a unit abbreviation). +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_text: -- void **set_text** **(** :ref:`int` column, :ref:`String` text **)** +.. rst-class:: classref-method + +void **set_text** **(** :ref:`int` column, :ref:`String` text **)** Sets the given column's text value. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_text_alignment: -- void **set_text_alignment** **(** :ref:`int` column, :ref:`HorizontalAlignment` text_alignment **)** +.. rst-class:: classref-method + +void **set_text_alignment** **(** :ref:`int` column, :ref:`HorizontalAlignment` text_alignment **)** Sets the given column's text alignment. See :ref:`HorizontalAlignment` for possible values. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_text_direction: -- void **set_text_direction** **(** :ref:`int` column, :ref:`TextDirection` direction **)** +.. rst-class:: classref-method + +void **set_text_direction** **(** :ref:`int` column, :ref:`TextDirection` direction **)** Sets item's text base writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_set_tooltip_text: -- void **set_tooltip_text** **(** :ref:`int` column, :ref:`String` tooltip **)** +.. rst-class:: classref-method + +void **set_tooltip_text** **(** :ref:`int` column, :ref:`String` tooltip **)** Sets the given column's tooltip text. +.. rst-class:: classref-item-separator + ---- .. _class_TreeItem_method_uncollapse_tree: -- void **uncollapse_tree** **(** **)** +.. rst-class:: classref-method + +void **uncollapse_tree** **(** **)** .. container:: contribute diff --git a/classes/class_trianglemesh.rst b/classes/class_trianglemesh.rst index 56b797dc8..11947b9a9 100644 --- a/classes/class_trianglemesh.rst +++ b/classes/class_trianglemesh.rst @@ -14,6 +14,8 @@ TriangleMesh Internal mesh type. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_tubetrailmesh.rst b/classes/class_tubetrailmesh.rst index a18d69145..ce3ef3d45 100644 --- a/classes/class_tubetrailmesh.rst +++ b/classes/class_tubetrailmesh.rst @@ -16,125 +16,142 @@ TubeTrailMesh There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`Curve` | :ref:`curve` | | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`radial_steps` | ``8`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``0.5`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`section_length` | ``0.2`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`section_rings` | ``3`` | -+---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`sections` | ``5`` | -+---------------------------+--------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`Curve` | :ref:`curve` | | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`radial_steps` | ``8`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`section_length` | ``0.2`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`section_rings` | ``3`` | + +---------------------------+--------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`sections` | ``5`` | + +---------------------------+--------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TubeTrailMesh_property_curve: -- :ref:`Curve` **curve** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_curve(value) | -+----------+------------------+ -| *Getter* | get_curve() | -+----------+------------------+ +:ref:`Curve` **curve** + +.. rst-class:: classref-property-setget + +- void **set_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_curve** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TubeTrailMesh_property_radial_steps: -- :ref:`int` **radial_steps** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``8`` | -+-----------+-------------------------+ -| *Setter* | set_radial_steps(value) | -+-----------+-------------------------+ -| *Getter* | get_radial_steps() | -+-----------+-------------------------+ +:ref:`int` **radial_steps** = ``8`` + +.. rst-class:: classref-property-setget + +- void **set_radial_steps** **(** :ref:`int` value **)** +- :ref:`int` **get_radial_steps** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TubeTrailMesh_property_radius: -- :ref:`float` **radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TubeTrailMesh_property_section_length: -- :ref:`float` **section_length** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.2`` | -+-----------+---------------------------+ -| *Setter* | set_section_length(value) | -+-----------+---------------------------+ -| *Getter* | get_section_length() | -+-----------+---------------------------+ +:ref:`float` **section_length** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_section_length** **(** :ref:`float` value **)** +- :ref:`float` **get_section_length** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TubeTrailMesh_property_section_rings: -- :ref:`int` **section_rings** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``3`` | -+-----------+--------------------------+ -| *Setter* | set_section_rings(value) | -+-----------+--------------------------+ -| *Getter* | get_section_rings() | -+-----------+--------------------------+ +:ref:`int` **section_rings** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_section_rings** **(** :ref:`int` value **)** +- :ref:`int` **get_section_rings** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_TubeTrailMesh_property_sections: -- :ref:`int` **sections** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``5`` | -+-----------+---------------------+ -| *Setter* | set_sections(value) | -+-----------+---------------------+ -| *Getter* | get_sections() | -+-----------+---------------------+ +:ref:`int` **sections** = ``5`` + +.. rst-class:: classref-property-setget + +- void **set_sections** **(** :ref:`int` value **)** +- :ref:`int` **get_sections** **(** **)** .. container:: contribute diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 2a107dc24..9384d4178 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -14,16 +14,18 @@ Tween Lightweight object used for general-purpose animation via script, using :ref:`Tweener`\ s. +.. rst-class:: classref-introduction-group + 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. +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` 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` node. Tweens are also more light-weight than :ref:`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` with a delay. +\ **Tween** is more suited than :ref:`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` node. Tweens are also more light-weight than :ref:`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` with a delay. -A ``Tween`` can be created by using either :ref:`SceneTree.create_tween` or :ref:`Node.create_tween`. ``Tween``\ s created manually (i.e. by using ``Tween.new()``) are invalid and can't be used for tweening values. +A **Tween** can be created by using either :ref:`SceneTree.create_tween` or :ref:`Node.create_tween`. **Tween**\ s created manually (i.e. by using ``Tween.new()``) are invalid and can't be used for tweening values. -A tween animation is created by adding :ref:`Tweener`\ s to the ``Tween`` object, using :ref:`tween_property`, :ref:`tween_interval`, :ref:`tween_callback` or :ref:`tween_method`: +A tween animation is created by adding :ref:`Tweener`\ s to the **Tween** object, using :ref:`tween_property`, :ref:`tween_interval`, :ref:`tween_callback` or :ref:`tween_method`: .. tabs:: @@ -67,7 +69,7 @@ When a :ref:`Tweener` is created with one of the ``tween_*`` meth -Most of the ``Tween`` methods can be chained this way too. In the following example the ``Tween`` is bound to the running script's node and a default transition is set for its :ref:`Tweener`\ s: +Most of the **Tween** methods can be chained this way too. In the following example the **Tween** is bound to the running script's node and a default transition is set for its :ref:`Tweener`\ s: .. tabs:: @@ -88,7 +90,7 @@ Most of the ``Tween`` methods can be chained this way too. In the following exam -Another interesting use for ``Tween``\ s is animating arbitrary sets of objects: +Another interesting use for **Tween**\ s is animating arbitrary sets of objects: .. tabs:: @@ -109,7 +111,7 @@ Another interesting use for ``Tween``\ s is animating arbitrary sets of objects: In the example above, all children of a node are moved one after another to position (0, 0). -You should avoid using more than one ``Tween`` per object's property. If two or more tweens animate one property at the same time, the last one created will take priority and assign the final value. If you want to interrupt and restart an animation, consider assigning the ``Tween`` to a variable: +You should avoid using more than one **Tween** per object's property. If two or more tweens animate one property at the same time, the last one created will take priority and assign the final value. If you want to interrupt and restart an animation, consider assigning the **Tween** to a variable: .. tabs:: @@ -139,209 +141,342 @@ Some :ref:`Tweener`\ s use transitions and eases. The first accep \ `Tween easing and transition types cheatsheet `__\ -\ **Note:** All ``Tween``\ s will automatically start by default. To prevent a ``Tween`` from autostarting, you can call :ref:`stop` immediately after it is created. +\ **Note:** All **Tween**\ s will automatically start by default. To prevent a **Tween** from autostarting, you can call :ref:`stop` immediately after it is created. -\ **Note:** ``Tween``\ s are processing after all of nodes in the current frame, i.e. after :ref:`Node._process` or :ref:`Node._physics_process` (depending on :ref:`TweenProcessMode`). +\ **Note:** **Tween**\ s are processing after all of nodes in the current frame, i.e. after :ref:`Node._process` or :ref:`Node._physics_process` (depending on :ref:`TweenProcessMode`). + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`bind_node` **(** :ref:`Node` node **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`chain` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`custom_step` **(** :ref:`float` delta **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_total_elapsed_time` **(** **)** |const| | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`interpolate_value` **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_running` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`kill` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`parallel` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pause` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_loops` **(** :ref:`int` loops=0 **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_parallel` **(** :ref:`bool` parallel=true **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_pause_mode` **(** :ref:`TweenPauseMode` mode **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_process_mode` **(** :ref:`TweenProcessMode` mode **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_speed_scale` **(** :ref:`float` speed **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CallbackTweener` | :ref:`tween_callback` **(** :ref:`Callable` callback **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`IntervalTweener` | :ref:`tween_interval` **(** :ref:`float` time **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MethodTweener` | :ref:`tween_method` **(** :ref:`Callable` method, :ref:`Variant` from, :ref:`Variant` to, :ref:`float` duration **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`tween_property` **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` final_val, :ref:`float` duration **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`bind_node` **(** :ref:`Node` node **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`chain` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`custom_step` **(** :ref:`float` delta **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_total_elapsed_time` **(** **)** |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`interpolate_value` **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_running` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`kill` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`parallel` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pause` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`set_loops` **(** :ref:`int` loops=0 **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`set_parallel` **(** :ref:`bool` parallel=true **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`set_pause_mode` **(** :ref:`TweenPauseMode` mode **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`set_process_mode` **(** :ref:`TweenProcessMode` mode **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`set_speed_scale` **(** :ref:`float` speed **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CallbackTweener` | :ref:`tween_callback` **(** :ref:`Callable` callback **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`IntervalTweener` | :ref:`tween_interval` **(** :ref:`float` time **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener` | :ref:`tween_method` **(** :ref:`Callable` method, :ref:`Variant` from, :ref:`Variant` to, :ref:`float` duration **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener` | :ref:`tween_property` **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` final_val, :ref:`float` duration **)** | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Tween_signal_finished: -- **finished** **(** **)** +.. rst-class:: classref-signal -Emitted when the ``Tween`` has finished all tweening. Never emitted when the ``Tween`` is set to infinite looping (see :ref:`set_loops`). +**finished** **(** **)** -\ **Note:** The ``Tween`` is removed (invalidated) in the next processing frame after this signal is emitted. Calling :ref:`stop` inside the signal callback will prevent the ``Tween`` from being removed. +Emitted when the **Tween** has finished all tweening. Never emitted when the **Tween** is set to infinite looping (see :ref:`set_loops`). + +\ **Note:** The **Tween** is removed (invalidated) in the next processing frame after this signal is emitted. Calling :ref:`stop` inside the signal callback will prevent the **Tween** from being removed. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_signal_loop_finished: -- **loop_finished** **(** :ref:`int` loop_count **)** +.. rst-class:: classref-signal + +**loop_finished** **(** :ref:`int` loop_count **)** Emitted when a full loop is complete (see :ref:`set_loops`), providing the loop index. This signal is not emitted after the final loop, use :ref:`finished` instead for this case. +.. rst-class:: classref-item-separator + ---- .. _class_Tween_signal_step_finished: -- **step_finished** **(** :ref:`int` idx **)** +.. rst-class:: classref-signal -Emitted when one step of the ``Tween`` is complete, providing the step index. One step is either a single :ref:`Tweener` or a group of :ref:`Tweener`\ s running in parallel. +**step_finished** **(** :ref:`int` idx **)** + +Emitted when one step of the **Tween** is complete, providing the step index. One step is either a single :ref:`Tweener` or a group of :ref:`Tweener`\ s running in parallel. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Tween_TweenProcessMode: -.. _class_Tween_constant_TWEEN_PROCESS_PHYSICS: - -.. _class_Tween_constant_TWEEN_PROCESS_IDLE: +.. rst-class:: classref-enumeration enum **TweenProcessMode**: -- **TWEEN_PROCESS_PHYSICS** = **0** --- The ``Tween`` updates during the physics frame. +.. _class_Tween_constant_TWEEN_PROCESS_PHYSICS: -- **TWEEN_PROCESS_IDLE** = **1** --- The ``Tween`` updates during the idle frame. +.. rst-class:: classref-enumeration-constant + +:ref:`TweenProcessMode` **TWEEN_PROCESS_PHYSICS** = ``0`` + +The **Tween** updates during the physics frame. + +.. _class_Tween_constant_TWEEN_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TweenProcessMode` **TWEEN_PROCESS_IDLE** = ``1`` + +The **Tween** updates during the idle frame. + +.. rst-class:: classref-item-separator ---- .. _enum_Tween_TweenPauseMode: -.. _class_Tween_constant_TWEEN_PAUSE_BOUND: - -.. _class_Tween_constant_TWEEN_PAUSE_STOP: - -.. _class_Tween_constant_TWEEN_PAUSE_PROCESS: +.. rst-class:: classref-enumeration enum **TweenPauseMode**: -- **TWEEN_PAUSE_BOUND** = **0** --- If the ``Tween`` has a bound node, it will process when that node can process (see :ref:`Node.process_mode`). Otherwise it's the same as :ref:`TWEEN_PAUSE_STOP`. +.. _class_Tween_constant_TWEEN_PAUSE_BOUND: -- **TWEEN_PAUSE_STOP** = **1** --- If :ref:`SceneTree` is paused, the ``Tween`` will also pause. +.. rst-class:: classref-enumeration-constant -- **TWEEN_PAUSE_PROCESS** = **2** --- The ``Tween`` will process regardless of whether :ref:`SceneTree` is paused. +:ref:`TweenPauseMode` **TWEEN_PAUSE_BOUND** = ``0`` + +If the **Tween** has a bound node, it will process when that node can process (see :ref:`Node.process_mode`). Otherwise it's the same as :ref:`TWEEN_PAUSE_STOP`. + +.. _class_Tween_constant_TWEEN_PAUSE_STOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TweenPauseMode` **TWEEN_PAUSE_STOP** = ``1`` + +If :ref:`SceneTree` is paused, the **Tween** will also pause. + +.. _class_Tween_constant_TWEEN_PAUSE_PROCESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`TweenPauseMode` **TWEEN_PAUSE_PROCESS** = ``2`` + +The **Tween** will process regardless of whether :ref:`SceneTree` is paused. + +.. rst-class:: classref-item-separator ---- .. _enum_Tween_TransitionType: -.. _class_Tween_constant_TRANS_LINEAR: - -.. _class_Tween_constant_TRANS_SINE: - -.. _class_Tween_constant_TRANS_QUINT: - -.. _class_Tween_constant_TRANS_QUART: - -.. _class_Tween_constant_TRANS_QUAD: - -.. _class_Tween_constant_TRANS_EXPO: - -.. _class_Tween_constant_TRANS_ELASTIC: - -.. _class_Tween_constant_TRANS_CUBIC: - -.. _class_Tween_constant_TRANS_CIRC: - -.. _class_Tween_constant_TRANS_BOUNCE: - -.. _class_Tween_constant_TRANS_BACK: +.. rst-class:: classref-enumeration enum **TransitionType**: -- **TRANS_LINEAR** = **0** --- The animation is interpolated linearly. +.. _class_Tween_constant_TRANS_LINEAR: -- **TRANS_SINE** = **1** --- The animation is interpolated using a sine function. +.. rst-class:: classref-enumeration-constant -- **TRANS_QUINT** = **2** --- The animation is interpolated with a quintic (to the power of 5) function. +:ref:`TransitionType` **TRANS_LINEAR** = ``0`` -- **TRANS_QUART** = **3** --- The animation is interpolated with a quartic (to the power of 4) function. +The animation is interpolated linearly. -- **TRANS_QUAD** = **4** --- The animation is interpolated with a quadratic (to the power of 2) function. +.. _class_Tween_constant_TRANS_SINE: -- **TRANS_EXPO** = **5** --- The animation is interpolated with an exponential (to the power of x) function. +.. rst-class:: classref-enumeration-constant -- **TRANS_ELASTIC** = **6** --- The animation is interpolated with elasticity, wiggling around the edges. +:ref:`TransitionType` **TRANS_SINE** = ``1`` -- **TRANS_CUBIC** = **7** --- The animation is interpolated with a cubic (to the power of 3) function. +The animation is interpolated using a sine function. -- **TRANS_CIRC** = **8** --- The animation is interpolated with a function using square roots. +.. _class_Tween_constant_TRANS_QUINT: -- **TRANS_BOUNCE** = **9** --- The animation is interpolated by bouncing at the end. +.. rst-class:: classref-enumeration-constant -- **TRANS_BACK** = **10** --- The animation is interpolated backing out at ends. +:ref:`TransitionType` **TRANS_QUINT** = ``2`` + +The animation is interpolated with a quintic (to the power of 5) function. + +.. _class_Tween_constant_TRANS_QUART: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_QUART** = ``3`` + +The animation is interpolated with a quartic (to the power of 4) function. + +.. _class_Tween_constant_TRANS_QUAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_QUAD** = ``4`` + +The animation is interpolated with a quadratic (to the power of 2) function. + +.. _class_Tween_constant_TRANS_EXPO: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_EXPO** = ``5`` + +The animation is interpolated with an exponential (to the power of x) function. + +.. _class_Tween_constant_TRANS_ELASTIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_ELASTIC** = ``6`` + +The animation is interpolated with elasticity, wiggling around the edges. + +.. _class_Tween_constant_TRANS_CUBIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_CUBIC** = ``7`` + +The animation is interpolated with a cubic (to the power of 3) function. + +.. _class_Tween_constant_TRANS_CIRC: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_CIRC** = ``8`` + +The animation is interpolated with a function using square roots. + +.. _class_Tween_constant_TRANS_BOUNCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_BOUNCE** = ``9`` + +The animation is interpolated by bouncing at the end. + +.. _class_Tween_constant_TRANS_BACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionType` **TRANS_BACK** = ``10`` + +The animation is interpolated backing out at ends. + +.. rst-class:: classref-item-separator ---- .. _enum_Tween_EaseType: -.. _class_Tween_constant_EASE_IN: - -.. _class_Tween_constant_EASE_OUT: - -.. _class_Tween_constant_EASE_IN_OUT: - -.. _class_Tween_constant_EASE_OUT_IN: +.. rst-class:: classref-enumeration enum **EaseType**: -- **EASE_IN** = **0** --- The interpolation starts slowly and speeds up towards the end. +.. _class_Tween_constant_EASE_IN: -- **EASE_OUT** = **1** --- The interpolation starts quickly and slows down towards the end. +.. rst-class:: classref-enumeration-constant -- **EASE_IN_OUT** = **2** --- A combination of :ref:`EASE_IN` and :ref:`EASE_OUT`. The interpolation is slowest at both ends. +:ref:`EaseType` **EASE_IN** = ``0`` -- **EASE_OUT_IN** = **3** --- A combination of :ref:`EASE_IN` and :ref:`EASE_OUT`. The interpolation is fastest at both ends. +The interpolation starts slowly and speeds up towards the end. + +.. _class_Tween_constant_EASE_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EaseType` **EASE_OUT** = ``1`` + +The interpolation starts quickly and slows down towards the end. + +.. _class_Tween_constant_EASE_IN_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EaseType` **EASE_IN_OUT** = ``2`` + +A combination of :ref:`EASE_IN` and :ref:`EASE_OUT`. The interpolation is slowest at both ends. + +.. _class_Tween_constant_EASE_OUT_IN: + +.. rst-class:: classref-enumeration-constant + +:ref:`EaseType` **EASE_OUT_IN** = ``3`` + +A combination of :ref:`EASE_IN` and :ref:`EASE_OUT`. The interpolation is fastest at both ends. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Tween_method_bind_node: -- :ref:`Tween` **bind_node** **(** :ref:`Node` node **)** +.. rst-class:: classref-method -Binds this ``Tween`` with the given ``node``. ``Tween``\ s are processed directly by the :ref:`SceneTree`, so they run independently of the animated nodes. When you bind a :ref:`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` will make the pausing behavior dependent on the bound node. +:ref:`Tween` **bind_node** **(** :ref:`Node` node **)** -For a shorter way to create and bind a ``Tween``, you can use :ref:`Node.create_tween`. +Binds this **Tween** with the given ``node``. **Tween**\ s are processed directly by the :ref:`SceneTree`, so they run independently of the animated nodes. When you bind a :ref:`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` will make the pausing behavior dependent on the bound node. + +For a shorter way to create and bind a **Tween**, you can use :ref:`Node.create_tween`. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_chain: -- :ref:`Tween` **chain** **(** **)** +.. rst-class:: classref-method + +:ref:`Tween` **chain** **(** **)** Used to chain two :ref:`Tweener`\ s after :ref:`set_parallel` is called with ``true``. @@ -364,35 +499,47 @@ Used to chain two :ref:`Tweener`\ s after :ref:`set_parallel` **custom_step** **(** :ref:`float` delta **)** +.. rst-class:: classref-method -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. +:ref:`bool` **custom_step** **(** :ref:`float` delta **)** -Returns ``true`` if the ``Tween`` still has :ref:`Tweener`\ s that haven't finished. +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. -\ **Note:** The ``Tween`` will become invalid in the next processing frame after its animation finishes. Calling :ref:`stop` after performing :ref:`custom_step` instead keeps and resets the ``Tween``. +Returns ``true`` if the **Tween** still has :ref:`Tweener`\ s that haven't finished. + +\ **Note:** The **Tween** will become invalid in the next processing frame after its animation finishes. Calling :ref:`stop` after performing :ref:`custom_step` instead keeps and resets the **Tween**. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_get_total_elapsed_time: -- :ref:`float` **get_total_elapsed_time** **(** **)** |const| +.. rst-class:: classref-method -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`, and :ref:`stop` will reset it to ``0``. +:ref:`float` **get_total_elapsed_time** **(** **)** |const| -\ **Note:** As it results from accumulating frame deltas, the time returned after the ``Tween`` has finished animating will be slightly greater than the actual ``Tween`` duration. +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`, and :ref:`stop` will reset it to ``0``. + +\ **Note:** As it results from accumulating frame deltas, the time returned after the **Tween** has finished animating will be slightly greater than the actual **Tween** duration. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_interpolate_value: -- :ref:`Variant` **interpolate_value** **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| +.. rst-class:: classref-method -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`, but with support for custom transition and easing. +:ref:`Variant` **interpolate_value** **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| + +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`, but with support for custom transition and easing. \ ``initial_value`` is the starting value of the interpolation. @@ -404,35 +551,51 @@ This method can be used for manual interpolation of a value, when you don't want \ **Note:** If ``duration`` is equal to ``0``, the method will always return the final value, regardless of ``elapsed_time`` provided. +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_is_running: -- :ref:`bool` **is_running** **(** **)** +.. rst-class:: classref-method -Returns whether the ``Tween`` is currently running, i.e. it wasn't paused and it's not finished. +:ref:`bool` **is_running** **(** **)** + +Returns whether the **Tween** is currently running, i.e. it wasn't paused and it's not finished. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_is_valid: -- :ref:`bool` **is_valid** **(** **)** +.. rst-class:: classref-method -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` 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`\ s appended. +:ref:`bool` **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` 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`\ s appended. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_kill: -- void **kill** **(** **)** +.. rst-class:: classref-method -Aborts all tweening operations and invalidates the ``Tween``. +void **kill** **(** **)** + +Aborts all tweening operations and invalidates the **Tween**. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_parallel: -- :ref:`Tween` **parallel** **(** **)** +.. rst-class:: classref-method + +:ref:`Tween` **parallel** **(** **)** Makes the next :ref:`Tweener` run parallelly to the previous one. @@ -459,101 +622,145 @@ Makes the next :ref:`Tweener` run parallelly to the previous one. All :ref:`Tweener`\ s in the example will run at the same time. -You can make the ``Tween`` parallel by default by using :ref:`set_parallel`. +You can make the **Tween** parallel by default by using :ref:`set_parallel`. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_pause: -- void **pause** **(** **)** +.. rst-class:: classref-method + +void **pause** **(** **)** Pauses the tweening. The animation can be resumed by using :ref:`play`. +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_play: -- void **play** **(** **)** +.. rst-class:: classref-method -Resumes a paused or stopped ``Tween``. +void **play** **(** **)** + +Resumes a paused or stopped **Tween**. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_set_ease: -- :ref:`Tween` **set_ease** **(** :ref:`EaseType` ease **)** +.. rst-class:: classref-method -Sets the default ease type for :ref:`PropertyTweener`\ s and :ref:`MethodTweener`\ s animated by this ``Tween``. +:ref:`Tween` **set_ease** **(** :ref:`EaseType` ease **)** + +Sets the default ease type for :ref:`PropertyTweener`\ s and :ref:`MethodTweener`\ s animated by this **Tween**. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_set_loops: -- :ref:`Tween` **set_loops** **(** :ref:`int` loops=0 **)** +.. rst-class:: classref-method + +:ref:`Tween` **set_loops** **(** :ref:`int` loops=0 **)** Sets the number of times the tweening sequence will be repeated, i.e. ``set_loops(2)`` will run the animation twice. -Calling this method without arguments will make the ``Tween`` run infinitely, until either it is killed with :ref:`kill`, the ``Tween``'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible). +Calling this method without arguments will make the **Tween** run infinitely, until either it is killed with :ref:`kill`, the **Tween**'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible). -\ **Warning:** Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single :ref:`CallbackTweener` with no delay) are stopped after a small number of loops, which may produce unexpected results. If a ``Tween``'s lifetime depends on some node, always use :ref:`bind_node`. +\ **Warning:** Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single :ref:`CallbackTweener` with no delay) are stopped after a small number of loops, which may produce unexpected results. If a **Tween**'s lifetime depends on some node, always use :ref:`bind_node`. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_set_parallel: -- :ref:`Tween` **set_parallel** **(** :ref:`bool` parallel=true **)** +.. rst-class:: classref-method + +:ref:`Tween` **set_parallel** **(** :ref:`bool` parallel=true **)** If ``parallel`` is ``true``, the :ref:`Tweener`\ s appended after this method will by default run simultaneously, as opposed to sequentially. +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_set_pause_mode: -- :ref:`Tween` **set_pause_mode** **(** :ref:`TweenPauseMode` mode **)** +.. rst-class:: classref-method -Determines the behavior of the ``Tween`` when the :ref:`SceneTree` is paused. Check :ref:`TweenPauseMode` for options. +:ref:`Tween` **set_pause_mode** **(** :ref:`TweenPauseMode` mode **)** + +Determines the behavior of the **Tween** when the :ref:`SceneTree` is paused. Check :ref:`TweenPauseMode` for options. Default value is :ref:`TWEEN_PAUSE_BOUND`. +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_set_process_mode: -- :ref:`Tween` **set_process_mode** **(** :ref:`TweenProcessMode` mode **)** +.. rst-class:: classref-method -Determines whether the ``Tween`` should run during idle frame (see :ref:`Node._process`) or physics frame (see :ref:`Node._physics_process`. +:ref:`Tween` **set_process_mode** **(** :ref:`TweenProcessMode` mode **)** + +Determines whether the **Tween** should run during idle frame (see :ref:`Node._process`) or physics frame (see :ref:`Node._physics_process`. Default value is :ref:`TWEEN_PROCESS_IDLE`. +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_set_speed_scale: -- :ref:`Tween` **set_speed_scale** **(** :ref:`float` speed **)** +.. rst-class:: classref-method + +:ref:`Tween` **set_speed_scale** **(** :ref:`float` speed **)** Scales the speed of tweening. This affects all :ref:`Tweener`\ s and their delays. +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_set_trans: -- :ref:`Tween` **set_trans** **(** :ref:`TransitionType` trans **)** +.. rst-class:: classref-method -Sets the default transition type for :ref:`PropertyTweener`\ s and :ref:`MethodTweener`\ s animated by this ``Tween``. +:ref:`Tween` **set_trans** **(** :ref:`TransitionType` trans **)** + +Sets the default transition type for :ref:`PropertyTweener`\ s and :ref:`MethodTweener`\ s animated by this **Tween**. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method -Stops the tweening and resets the ``Tween`` to its initial state. This will not remove any appended :ref:`Tweener`\ s. +void **stop** **(** **)** + +Stops the tweening and resets the **Tween** to its initial state. This will not remove any appended :ref:`Tweener`\ s. + +.. rst-class:: classref-item-separator ---- .. _class_Tween_method_tween_callback: -- :ref:`CallbackTweener` **tween_callback** **(** :ref:`Callable` callback **)** +.. rst-class:: classref-method + +:ref:`CallbackTweener` **tween_callback** **(** :ref:`Callable` callback **)** Creates and appends a :ref:`CallbackTweener`. This method can be used to call an arbitrary method in any object. Use :ref:`Callable.bind` to bind additional arguments for the call. @@ -594,13 +801,17 @@ Creates and appends a :ref:`CallbackTweener`. This method +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_tween_interval: -- :ref:`IntervalTweener` **tween_interval** **(** :ref:`float` time **)** +.. rst-class:: classref-method -Creates and appends an :ref:`IntervalTweener`. This method can be used to create delays in the tween animation, as an alternative to using the delay in other :ref:`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. +:ref:`IntervalTweener` **tween_interval** **(** :ref:`float` time **)** + +Creates and appends an :ref:`IntervalTweener`. This method can be used to create delays in the tween animation, as an alternative to using the delay in other :ref:`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. \ **Example:** Creating an interval in code execution: @@ -648,11 +859,15 @@ Creates and appends an :ref:`IntervalTweener`. This metho +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_tween_method: -- :ref:`MethodTweener` **tween_method** **(** :ref:`Callable` method, :ref:`Variant` from, :ref:`Variant` to, :ref:`float` duration **)** +.. rst-class:: classref-method + +:ref:`MethodTweener` **tween_method** **(** :ref:`Callable` method, :ref:`Variant` from, :ref:`Variant` to, :ref:`float` duration **)** Creates and appends a :ref:`MethodTweener`. This method is similar to a combination of :ref:`tween_callback` and :ref:`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` to bind additional arguments for the call. You can use :ref:`MethodTweener.set_ease` and :ref:`MethodTweener.set_trans` to tweak the easing and transition of the value or :ref:`MethodTweener.set_delay` to delay the tweening. @@ -704,11 +919,15 @@ Creates and appends a :ref:`MethodTweener`. This method is +.. rst-class:: classref-item-separator + ---- .. _class_Tween_method_tween_property: -- :ref:`PropertyTweener` **tween_property** **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` final_val, :ref:`float` duration **)** +.. rst-class:: classref-method + +:ref:`PropertyTweener` **tween_property** **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` final_val, :ref:`float` duration **)** Creates and appends a :ref:`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` starts. diff --git a/classes/class_tweener.rst b/classes/class_tweener.rst index 06fa81881..3aa0d0284 100644 --- a/classes/class_tweener.rst +++ b/classes/class_tweener.rst @@ -16,19 +16,29 @@ Tweener Abstract class for all Tweeners used by :ref:`Tween`. +.. rst-class:: classref-introduction-group + Description ----------- -Tweeners are objects that perform a specific animating task, e.g. interpolating a property or calling a method at a given time. A ``Tweener`` can't be created manually, you need to use a dedicated method from :ref:`Tween`. +Tweeners are objects that perform a specific animating task, e.g. interpolating a property or calling a method at a given time. A **Tweener** can't be created manually, you need to use a dedicated method from :ref:`Tween`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Tweener_signal_finished: -- **finished** **(** **)** +.. rst-class:: classref-signal -Emitted when the ``Tweener`` has just finished its job. +**finished** **(** **)** + +Emitted when the **Tweener** has just finished its job. .. |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.)` diff --git a/classes/class_udpserver.rst b/classes/class_udpserver.rst index c4f9ff144..9c5a4e3e5 100644 --- a/classes/class_udpserver.rst +++ b/classes/class_udpserver.rst @@ -14,6 +14,8 @@ UDPServer Helper class to implement a UDP server. +.. rst-class:: classref-introduction-group + Description ----------- @@ -145,103 +147,150 @@ Below a small example of how it can be used: +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+----------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`max_pending_connections` | ``16`` | -+-----------------------+----------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`max_pending_connections` | ``16`` | + +-----------------------+----------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_local_port` **(** **)** |const| | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connection_available` **(** **)** |const| | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_listening` **(** **)** |const| | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`listen` **(** :ref:`int` port, :ref:`String` bind_address="*" **)** | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`poll` **(** **)** | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PacketPeerUDP` | :ref:`take_connection` **(** **)** | -+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_local_port` **(** **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_connection_available` **(** **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_listening` **(** **)** |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`listen` **(** :ref:`int` port, :ref:`String` bind_address="*" **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`poll` **(** **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PacketPeerUDP` | :ref:`take_connection` **(** **)** | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_UDPServer_property_max_pending_connections: -- :ref:`int` **max_pending_connections** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``16`` | -+-----------+------------------------------------+ -| *Setter* | set_max_pending_connections(value) | -+-----------+------------------------------------+ -| *Getter* | get_max_pending_connections() | -+-----------+------------------------------------+ +:ref:`int` **max_pending_connections** = ``16`` + +.. rst-class:: classref-property-setget + +- void **set_max_pending_connections** **(** :ref:`int` value **)** +- :ref:`int` **get_max_pending_connections** **(** **)** Define the maximum number of pending connections, during :ref:`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). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_UDPServer_method_get_local_port: -- :ref:`int` **get_local_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_local_port** **(** **)** |const| Returns the local port this server is listening to. +.. rst-class:: classref-item-separator + ---- .. _class_UDPServer_method_is_connection_available: -- :ref:`bool` **is_connection_available** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_connection_available** **(** **)** |const| Returns ``true`` if a packet with a new address/port combination was received on the socket. +.. rst-class:: classref-item-separator + ---- .. _class_UDPServer_method_is_listening: -- :ref:`bool` **is_listening** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_listening** **(** **)** |const| Returns ``true`` if the socket is open and listening on a port. +.. rst-class:: classref-item-separator + ---- .. _class_UDPServer_method_listen: -- :ref:`Error` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*" **)** +.. rst-class:: classref-method + +:ref:`Error` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*" **)** 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`. +.. rst-class:: classref-item-separator + ---- .. _class_UDPServer_method_poll: -- :ref:`Error` **poll** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **poll** **(** **)** Call this method at regular intervals (e.g. inside :ref:`Node._process`) to process new packets. And packet from known address/port pair will be delivered to the appropriate :ref:`PacketPeerUDP`, any packet received from an unknown address/port pair will be added as a pending connection (see :ref:`is_connection_available`, :ref:`take_connection`). The maximum number of pending connection is defined via :ref:`max_pending_connections`. +.. rst-class:: classref-item-separator + ---- .. _class_UDPServer_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the server, closing the UDP socket if open. Will close all connected :ref:`PacketPeerUDP` accepted via :ref:`take_connection` (remote peers will not be notified). +.. rst-class:: classref-item-separator + ---- .. _class_UDPServer_method_take_connection: -- :ref:`PacketPeerUDP` **take_connection** **(** **)** +.. rst-class:: classref-method + +:ref:`PacketPeerUDP` **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`, :ref:`PacketPeerUDP.connect_to_host`. diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index 1bb7fbc96..3cae91fcf 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -14,6 +14,8 @@ UndoRedo Helper to manage undo/redo operations in the editor or custom tools. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,7 +23,7 @@ Helper to manage undo/redo operations in the editor or custom tools. It works by Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. -Here's an example on how to add an action to the Godot editor's own ``UndoRedo``, from a plugin: +Here's an example on how to add an action to the Godot editor's own **UndoRedo**, from a plugin: .. tabs:: @@ -81,253 +83,374 @@ Here's an example on how to add an action to the Godot editor's own ``UndoRedo`` If you don't need to register a method, you can leave :ref:`add_do_method` and :ref:`add_undo_method` out; the same goes for properties. You can also register more than one method/property. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_method` **(** :ref:`Callable` callable **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_method` **(** :ref:`Callable` callable **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_history` **(** :ref:`bool` increase_version=true **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`commit_action` **(** :ref:`bool` execute=true **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_action` **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0 **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`end_force_keep_in_merge_ends` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_action_name` **(** :ref:`int` id **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_current_action` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_action_name` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_history_count` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_version` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_redo` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_undo` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_committing_action` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`redo` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`start_force_keep_in_merge_ends` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`undo` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_do_method` **(** :ref:`Callable` callable **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_undo_method` **(** :ref:`Callable` callable **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_history` **(** :ref:`bool` increase_version=true **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`commit_action` **(** :ref:`bool` execute=true **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_action` **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0 **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`end_force_keep_in_merge_ends` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_action_name` **(** :ref:`int` id **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_current_action` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_action_name` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_history_count` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_version` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_redo` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_undo` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_committing_action` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`redo` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`start_force_keep_in_merge_ends` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`undo` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_UndoRedo_signal_version_changed: -- **version_changed** **(** **)** +.. rst-class:: classref-signal + +**version_changed** **(** **)** Called when :ref:`undo` or :ref:`redo` was called. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_UndoRedo_MergeMode: -.. _class_UndoRedo_constant_MERGE_DISABLE: - -.. _class_UndoRedo_constant_MERGE_ENDS: - -.. _class_UndoRedo_constant_MERGE_ALL: +.. rst-class:: classref-enumeration enum **MergeMode**: -- **MERGE_DISABLE** = **0** --- Makes "do"/"undo" operations stay in separate actions. +.. _class_UndoRedo_constant_MERGE_DISABLE: -- **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. +.. rst-class:: classref-enumeration-constant -- **MERGE_ALL** = **2** --- Makes subsequent actions with the same name be merged into one. +:ref:`MergeMode` **MERGE_DISABLE** = ``0`` + +Makes "do"/"undo" operations stay in separate actions. + +.. _class_UndoRedo_constant_MERGE_ENDS: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_UndoRedo_constant_MERGE_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`MergeMode` **MERGE_ALL** = ``2`` + +Makes subsequent actions with the same name be merged into one. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_UndoRedo_method_add_do_method: -- void **add_do_method** **(** :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **add_do_method** **(** :ref:`Callable` callable **)** Register a :ref:`Callable` that will be called when the action is committed. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_add_do_property: -- void **add_do_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **add_do_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** Register a ``property`` that would change its value to ``value`` when the action is committed. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_add_do_reference: -- void **add_do_reference** **(** :ref:`Object` object **)** +.. rst-class:: classref-method + +void **add_do_reference** **(** :ref:`Object` object **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_add_undo_method: -- void **add_undo_method** **(** :ref:`Callable` callable **)** +.. rst-class:: classref-method + +void **add_undo_method** **(** :ref:`Callable` callable **)** Register a :ref:`Callable` that will be called when the action is undone. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_add_undo_property: -- void **add_undo_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **add_undo_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** Register a ``property`` that would change its value to ``value`` when the action is undone. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_add_undo_reference: -- void **add_undo_reference** **(** :ref:`Object` object **)** +.. rst-class:: classref-method + +void **add_undo_reference** **(** :ref:`Object` object **)** 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!). +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_clear_history: -- void **clear_history** **(** :ref:`bool` increase_version=true **)** +.. rst-class:: classref-method + +void **clear_history** **(** :ref:`bool` increase_version=true **)** Clear the undo/redo history and associated references. Passing ``false`` to ``increase_version`` will prevent the version number from increasing when the history is cleared. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_commit_action: -- void **commit_action** **(** :ref:`bool` execute=true **)** +.. rst-class:: classref-method + +void **commit_action** **(** :ref:`bool` execute=true **)** Commit the action. If ``execute`` is ``true`` (which it is by default), all "do" methods/properties are called/set when this function is called. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_create_action: -- void **create_action** **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0 **)** +.. rst-class:: classref-method + +void **create_action** **(** :ref:`String` name, :ref:`MergeMode` merge_mode=0 **)** Create a new action. After this is called, do all your calls to :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property`, and :ref:`add_undo_property`, then commit the action with :ref:`commit_action`. The way actions are merged is dictated by ``merge_mode``. See :ref:`MergeMode` for details. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_end_force_keep_in_merge_ends: -- void **end_force_keep_in_merge_ends** **(** **)** +.. rst-class:: classref-method + +void **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` mode. See :ref:`start_force_keep_in_merge_ends`. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_get_action_name: -- :ref:`String` **get_action_name** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +:ref:`String` **get_action_name** **(** :ref:`int` id **)** Gets the action name from its index. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_get_current_action: -- :ref:`int` **get_current_action** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_current_action** **(** **)** Gets the index of the current action. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_get_current_action_name: -- :ref:`String` **get_current_action_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_current_action_name** **(** **)** |const| Gets the name of the current action, equivalent to ``get_action_name(get_current_action())``. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_get_history_count: -- :ref:`int` **get_history_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_history_count** **(** **)** Returns how many elements are in the history. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_get_version: -- :ref:`int` **get_version** **(** **)** |const| +.. rst-class:: classref-method -Gets the version. Every time a new action is committed, the ``UndoRedo``'s version number is increased automatically. +:ref:`int` **get_version** **(** **)** |const| + +Gets the version. Every time a new action is committed, the **UndoRedo**'s version number is increased automatically. This is useful mostly to check if something changed from a saved version. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_has_redo: -- :ref:`bool` **has_redo** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_redo** **(** **)** |const| Returns ``true`` if a "redo" action is available. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_has_undo: -- :ref:`bool` **has_undo** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_undo** **(** **)** |const| Returns ``true`` if an "undo" action is available. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_is_committing_action: -- :ref:`bool` **is_committing_action** **(** **)** |const| +.. rst-class:: classref-method -Returns ``true`` if the ``UndoRedo`` is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). +:ref:`bool` **is_committing_action** **(** **)** |const| + +Returns ``true`` if the **UndoRedo** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action`). + +.. rst-class:: classref-item-separator ---- .. _class_UndoRedo_method_redo: -- :ref:`bool` **redo** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **redo** **(** **)** Redo the last action. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_start_force_keep_in_merge_ends: -- void **start_force_keep_in_merge_ends** **(** **)** +.. rst-class:: classref-method + +void **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` mode. Return to normal operation using :ref:`end_force_keep_in_merge_ends`. +.. rst-class:: classref-item-separator + ---- .. _class_UndoRedo_method_undo: -- :ref:`bool` **undo** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **undo** **(** **)** Undo the last action. diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index d4feff138..3ad092e4e 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -14,6 +14,8 @@ UPNP Universal Plug and Play (UPnP) functions for network device discovery, querying and port forwarding. +.. rst-class:: classref-introduction-group + Description ----------- @@ -83,230 +85,383 @@ To close a specific port (e.g. after you have finished using it): \ **Further reading:** If you want to know more about UPnP (and the Internet Gateway Device (IGD) and Port Control Protocol (PCP) specifically), `Wikipedia `__ is a good first stop, the specification can be found at the `Open Connectivity Foundation `__ and Godot's implementation is based on the `MiniUPnP client `__. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`discover_ipv6` | ``false`` | -+-----------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`discover_local_port` | ``0`` | -+-----------------------------+-------------------------------------------------------------------------+-----------+ -| :ref:`String` | :ref:`discover_multicast_if` | ``""`` | -+-----------------------------+-------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`discover_ipv6` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`discover_local_port` | ``0`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`discover_multicast_if` | ``""`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_device` **(** :ref:`UPNPDevice` device **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_port_mapping` **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_devices` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`delete_port_mapping` **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`discover` **(** :ref:`int` timeout=2000, :ref:`int` ttl=2, :ref:`String` device_filter="InternetGatewayDevice" **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`UPNPDevice` | :ref:`get_device` **(** :ref:`int` index **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_device_count` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`UPNPDevice` | :ref:`get_gateway` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`query_external_address` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_device` **(** :ref:`int` index **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_device` **(** :ref:`int` index, :ref:`UPNPDevice` device **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_device` **(** :ref:`UPNPDevice` device **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_port_mapping` **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_devices` **(** **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`delete_port_mapping` **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`discover` **(** :ref:`int` timeout=2000, :ref:`int` ttl=2, :ref:`String` device_filter="InternetGatewayDevice" **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UPNPDevice` | :ref:`get_device` **(** :ref:`int` index **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_device_count` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UPNPDevice` | :ref:`get_gateway` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`query_external_address` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_device` **(** :ref:`int` index **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_device` **(** :ref:`int` index, :ref:`UPNPDevice` device **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_UPNP_UPNPResult: -.. _class_UPNP_constant_UPNP_RESULT_SUCCESS: - -.. _class_UPNP_constant_UPNP_RESULT_NOT_AUTHORIZED: - -.. _class_UPNP_constant_UPNP_RESULT_PORT_MAPPING_NOT_FOUND: - -.. _class_UPNP_constant_UPNP_RESULT_INCONSISTENT_PARAMETERS: - -.. _class_UPNP_constant_UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY: - -.. _class_UPNP_constant_UPNP_RESULT_ACTION_FAILED: - -.. _class_UPNP_constant_UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED: - -.. _class_UPNP_constant_UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED: - -.. _class_UPNP_constant_UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED: - -.. _class_UPNP_constant_UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD: - -.. _class_UPNP_constant_UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD: - -.. _class_UPNP_constant_UPNP_RESULT_NO_PORT_MAPS_AVAILABLE: - -.. _class_UPNP_constant_UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM: - -.. _class_UPNP_constant_UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING: - -.. _class_UPNP_constant_UPNP_RESULT_SAME_PORT_VALUES_REQUIRED: - -.. _class_UPNP_constant_UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED: - -.. _class_UPNP_constant_UPNP_RESULT_INVALID_GATEWAY: - -.. _class_UPNP_constant_UPNP_RESULT_INVALID_PORT: - -.. _class_UPNP_constant_UPNP_RESULT_INVALID_PROTOCOL: - -.. _class_UPNP_constant_UPNP_RESULT_INVALID_DURATION: - -.. _class_UPNP_constant_UPNP_RESULT_INVALID_ARGS: - -.. _class_UPNP_constant_UPNP_RESULT_INVALID_RESPONSE: - -.. _class_UPNP_constant_UPNP_RESULT_INVALID_PARAM: - -.. _class_UPNP_constant_UPNP_RESULT_HTTP_ERROR: - -.. _class_UPNP_constant_UPNP_RESULT_SOCKET_ERROR: - -.. _class_UPNP_constant_UPNP_RESULT_MEM_ALLOC_ERROR: - -.. _class_UPNP_constant_UPNP_RESULT_NO_GATEWAY: - -.. _class_UPNP_constant_UPNP_RESULT_NO_DEVICES: - -.. _class_UPNP_constant_UPNP_RESULT_UNKNOWN_ERROR: +.. rst-class:: classref-enumeration enum **UPNPResult**: -- **UPNP_RESULT_SUCCESS** = **0** --- UPNP command or discovery was successful. +.. _class_UPNP_constant_UPNP_RESULT_SUCCESS: -- **UPNP_RESULT_NOT_AUTHORIZED** = **1** --- Not authorized to use the command on the :ref:`UPNPDevice`. May be returned when the user disabled UPNP on their router. +.. rst-class:: classref-enumeration-constant -- **UPNP_RESULT_PORT_MAPPING_NOT_FOUND** = **2** --- No port mapping was found for the given port, protocol combination on the given :ref:`UPNPDevice`. +:ref:`UPNPResult` **UPNP_RESULT_SUCCESS** = ``0`` -- **UPNP_RESULT_INCONSISTENT_PARAMETERS** = **3** --- Inconsistent parameters. +UPNP command or discovery was successful. -- **UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY** = **4** --- No such entry in array. May be returned if a given port, protocol combination is not found on an :ref:`UPNPDevice`. +.. _class_UPNP_constant_UPNP_RESULT_NOT_AUTHORIZED: -- **UPNP_RESULT_ACTION_FAILED** = **5** --- The action failed. +.. rst-class:: classref-enumeration-constant -- **UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED** = **6** --- The :ref:`UPNPDevice` does not allow wildcard values for the source IP address. +:ref:`UPNPResult` **UPNP_RESULT_NOT_AUTHORIZED** = ``1`` -- **UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED** = **7** --- The :ref:`UPNPDevice` does not allow wildcard values for the external port. +Not authorized to use the command on the :ref:`UPNPDevice`. May be returned when the user disabled UPNP on their router. -- **UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED** = **8** --- The :ref:`UPNPDevice` does not allow wildcard values for the internal port. +.. _class_UPNP_constant_UPNP_RESULT_PORT_MAPPING_NOT_FOUND: -- **UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD** = **9** --- The remote host value must be a wildcard. +.. rst-class:: classref-enumeration-constant -- **UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD** = **10** --- The external port value must be a wildcard. +:ref:`UPNPResult` **UPNP_RESULT_PORT_MAPPING_NOT_FOUND** = ``2`` -- **UPNP_RESULT_NO_PORT_MAPS_AVAILABLE** = **11** --- No port maps are available. May also be returned if port mapping functionality is not available. +No port mapping was found for the given port, protocol combination on the given :ref:`UPNPDevice`. -- **UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM** = **12** --- Conflict with other mechanism. May be returned instead of :ref:`UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING` if a port mapping conflicts with an existing one. +.. _class_UPNP_constant_UPNP_RESULT_INCONSISTENT_PARAMETERS: -- **UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING** = **13** --- Conflict with an existing port mapping. +.. rst-class:: classref-enumeration-constant -- **UPNP_RESULT_SAME_PORT_VALUES_REQUIRED** = **14** --- External and internal port values must be the same. +:ref:`UPNPResult` **UPNP_RESULT_INCONSISTENT_PARAMETERS** = ``3`` -- **UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED** = **15** --- Only permanent leases are supported. Do not use the ``duration`` parameter when adding port mappings. +Inconsistent parameters. -- **UPNP_RESULT_INVALID_GATEWAY** = **16** --- Invalid gateway. +.. _class_UPNP_constant_UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY: -- **UPNP_RESULT_INVALID_PORT** = **17** --- Invalid port. +.. rst-class:: classref-enumeration-constant -- **UPNP_RESULT_INVALID_PROTOCOL** = **18** --- Invalid protocol. +:ref:`UPNPResult` **UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY** = ``4`` -- **UPNP_RESULT_INVALID_DURATION** = **19** --- Invalid duration. +No such entry in array. May be returned if a given port, protocol combination is not found on an :ref:`UPNPDevice`. -- **UPNP_RESULT_INVALID_ARGS** = **20** --- Invalid arguments. +.. _class_UPNP_constant_UPNP_RESULT_ACTION_FAILED: -- **UPNP_RESULT_INVALID_RESPONSE** = **21** --- Invalid response. +.. rst-class:: classref-enumeration-constant -- **UPNP_RESULT_INVALID_PARAM** = **22** --- Invalid parameter. +:ref:`UPNPResult` **UPNP_RESULT_ACTION_FAILED** = ``5`` -- **UPNP_RESULT_HTTP_ERROR** = **23** --- HTTP error. +The action failed. -- **UPNP_RESULT_SOCKET_ERROR** = **24** --- Socket error. +.. _class_UPNP_constant_UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED: -- **UPNP_RESULT_MEM_ALLOC_ERROR** = **25** --- Error allocating memory. +.. rst-class:: classref-enumeration-constant -- **UPNP_RESULT_NO_GATEWAY** = **26** --- No gateway available. You may need to call :ref:`discover` first, or discovery didn't detect any valid IGDs (InternetGatewayDevices). +:ref:`UPNPResult` **UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED** = ``6`` -- **UPNP_RESULT_NO_DEVICES** = **27** --- No devices available. You may need to call :ref:`discover` first, or discovery didn't detect any valid :ref:`UPNPDevice`\ s. +The :ref:`UPNPDevice` does not allow wildcard values for the source IP address. -- **UPNP_RESULT_UNKNOWN_ERROR** = **28** --- Unknown error. +.. _class_UPNP_constant_UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED** = ``7`` + +The :ref:`UPNPDevice` does not allow wildcard values for the external port. + +.. _class_UPNP_constant_UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED** = ``8`` + +The :ref:`UPNPDevice` does not allow wildcard values for the internal port. + +.. _class_UPNP_constant_UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD** = ``9`` + +The remote host value must be a wildcard. + +.. _class_UPNP_constant_UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD** = ``10`` + +The external port value must be a wildcard. + +.. _class_UPNP_constant_UPNP_RESULT_NO_PORT_MAPS_AVAILABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_NO_PORT_MAPS_AVAILABLE** = ``11`` + +No port maps are available. May also be returned if port mapping functionality is not available. + +.. _class_UPNP_constant_UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM** = ``12`` + +Conflict with other mechanism. May be returned instead of :ref:`UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING` if a port mapping conflicts with an existing one. + +.. _class_UPNP_constant_UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING** = ``13`` + +Conflict with an existing port mapping. + +.. _class_UPNP_constant_UPNP_RESULT_SAME_PORT_VALUES_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_SAME_PORT_VALUES_REQUIRED** = ``14`` + +External and internal port values must be the same. + +.. _class_UPNP_constant_UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED** = ``15`` + +Only permanent leases are supported. Do not use the ``duration`` parameter when adding port mappings. + +.. _class_UPNP_constant_UPNP_RESULT_INVALID_GATEWAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INVALID_GATEWAY** = ``16`` + +Invalid gateway. + +.. _class_UPNP_constant_UPNP_RESULT_INVALID_PORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INVALID_PORT** = ``17`` + +Invalid port. + +.. _class_UPNP_constant_UPNP_RESULT_INVALID_PROTOCOL: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INVALID_PROTOCOL** = ``18`` + +Invalid protocol. + +.. _class_UPNP_constant_UPNP_RESULT_INVALID_DURATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INVALID_DURATION** = ``19`` + +Invalid duration. + +.. _class_UPNP_constant_UPNP_RESULT_INVALID_ARGS: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INVALID_ARGS** = ``20`` + +Invalid arguments. + +.. _class_UPNP_constant_UPNP_RESULT_INVALID_RESPONSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INVALID_RESPONSE** = ``21`` + +Invalid response. + +.. _class_UPNP_constant_UPNP_RESULT_INVALID_PARAM: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_INVALID_PARAM** = ``22`` + +Invalid parameter. + +.. _class_UPNP_constant_UPNP_RESULT_HTTP_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_HTTP_ERROR** = ``23`` + +HTTP error. + +.. _class_UPNP_constant_UPNP_RESULT_SOCKET_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_SOCKET_ERROR** = ``24`` + +Socket error. + +.. _class_UPNP_constant_UPNP_RESULT_MEM_ALLOC_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_MEM_ALLOC_ERROR** = ``25`` + +Error allocating memory. + +.. _class_UPNP_constant_UPNP_RESULT_NO_GATEWAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_NO_GATEWAY** = ``26`` + +No gateway available. You may need to call :ref:`discover` first, or discovery didn't detect any valid IGDs (InternetGatewayDevices). + +.. _class_UPNP_constant_UPNP_RESULT_NO_DEVICES: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_NO_DEVICES** = ``27`` + +No devices available. You may need to call :ref:`discover` first, or discovery didn't detect any valid :ref:`UPNPDevice`\ s. + +.. _class_UPNP_constant_UPNP_RESULT_UNKNOWN_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`UPNPResult` **UPNP_RESULT_UNKNOWN_ERROR** = ``28`` + +Unknown error. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_UPNP_property_discover_ipv6: -- :ref:`bool` **discover_ipv6** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_discover_ipv6(value) | -+-----------+--------------------------+ -| *Getter* | is_discover_ipv6() | -+-----------+--------------------------+ +:ref:`bool` **discover_ipv6** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_discover_ipv6** **(** :ref:`bool` value **)** +- :ref:`bool` **is_discover_ipv6** **(** **)** If ``true``, IPv6 is used for :ref:`UPNPDevice` discovery. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_property_discover_local_port: -- :ref:`int` **discover_local_port** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_discover_local_port(value) | -+-----------+--------------------------------+ -| *Getter* | get_discover_local_port() | -+-----------+--------------------------------+ +:ref:`int` **discover_local_port** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_discover_local_port** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_property_discover_multicast_if: -- :ref:`String` **discover_multicast_if** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``""`` | -+-----------+----------------------------------+ -| *Setter* | set_discover_multicast_if(value) | -+-----------+----------------------------------+ -| *Getter* | get_discover_multicast_if() | -+-----------+----------------------------------+ +:ref:`String` **discover_multicast_if** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_discover_multicast_if** **(** :ref:`String` value **)** +- :ref:`String` **get_discover_multicast_if** **(** **)** Multicast interface to use for discovery. Uses the default multicast interface if empty. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_UPNP_method_add_device: -- void **add_device** **(** :ref:`UPNPDevice` device **)** +.. rst-class:: classref-method + +void **add_device** **(** :ref:`UPNPDevice` device **)** Adds the given :ref:`UPNPDevice` to the list of discovered devices. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_add_port_mapping: -- :ref:`int` **add_port_mapping** **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| +.. rst-class:: classref-method + +:ref:`int` **add_port_mapping** **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| 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`) to the ``internal_port`` 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` and call :ref:`add_port_mapping` on it, if any. Note that forwarding a well-known port (below 1024) with UPnP may fail depending on the device. @@ -320,27 +475,39 @@ The mapping's lease ``duration`` can be limited by specifying a duration in seco See :ref:`UPNPResult` for possible return values. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_clear_devices: -- void **clear_devices** **(** **)** +.. rst-class:: classref-method + +void **clear_devices** **(** **)** Clears the list of discovered devices. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_delete_port_mapping: -- :ref:`int` **delete_port_mapping** **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| +.. rst-class:: classref-method + +:ref:`int` **delete_port_mapping** **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| Deletes the port mapping for the given port and protocol combination on the default gateway (see :ref:`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` for possible return values. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_discover: -- :ref:`int` **discover** **(** :ref:`int` timeout=2000, :ref:`int` ttl=2, :ref:`String` device_filter="InternetGatewayDevice" **)** +.. rst-class:: classref-method + +:ref:`int` **discover** **(** :ref:`int` timeout=2000, :ref:`int` ttl=2, :ref:`String` device_filter="InternetGatewayDevice" **)** Discovers local :ref:`UPNPDevice`\ s. Clears the list of previously discovered devices. @@ -348,51 +515,75 @@ Filters for IGD (InternetGatewayDevice) type devices by default, as those manage See :ref:`UPNPResult` for possible return values. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_get_device: -- :ref:`UPNPDevice` **get_device** **(** :ref:`int` index **)** |const| +.. rst-class:: classref-method + +:ref:`UPNPDevice` **get_device** **(** :ref:`int` index **)** |const| Returns the :ref:`UPNPDevice` at the given ``index``. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_get_device_count: -- :ref:`int` **get_device_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_device_count** **(** **)** |const| Returns the number of discovered :ref:`UPNPDevice`\ s. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_get_gateway: -- :ref:`UPNPDevice` **get_gateway** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`UPNPDevice` **get_gateway** **(** **)** |const| Returns the default gateway. That is the first discovered :ref:`UPNPDevice` that is also a valid IGD (InternetGatewayDevice). +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_query_external_address: -- :ref:`String` **query_external_address** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **query_external_address** **(** **)** |const| Returns the external :ref:`IP` address of the default gateway (see :ref:`get_gateway`) as string. Returns an empty string on error. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_remove_device: -- void **remove_device** **(** :ref:`int` index **)** +.. rst-class:: classref-method + +void **remove_device** **(** :ref:`int` index **)** Removes the device at ``index`` from the list of discovered devices. +.. rst-class:: classref-item-separator + ---- .. _class_UPNP_method_set_device: -- void **set_device** **(** :ref:`int` index, :ref:`UPNPDevice` device **)** +.. rst-class:: classref-method + +void **set_device** **(** :ref:`int` index, :ref:`UPNPDevice` device **)** Sets the device at ``index`` from the list of discovered devices to ``device``. diff --git a/classes/class_upnpdevice.rst b/classes/class_upnpdevice.rst index fb6cbdec8..41fa50a2c 100644 --- a/classes/class_upnpdevice.rst +++ b/classes/class_upnpdevice.rst @@ -14,217 +14,307 @@ UPNPDevice Universal Plug and Play (UPnP) device. +.. rst-class:: classref-introduction-group + Description ----------- Universal Plug and Play (UPnP) device. See :ref:`UPNP` for UPnP discovery and utility functions. Provides low-level access to UPNP control commands. Allows to manage port mappings (port forwarding) and to query network information of the device (like local and external IP address and status). Note that methods on this class are synchronous and block the calling thread. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------+---------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`description_url` | ``""`` | -+---------------------------------------------+---------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`igd_control_url` | ``""`` | -+---------------------------------------------+---------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`igd_our_addr` | ``""`` | -+---------------------------------------------+---------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`igd_service_type` | ``""`` | -+---------------------------------------------+---------------------------------------------------------------------+--------+ -| :ref:`IGDStatus` | :ref:`igd_status` | ``9`` | -+---------------------------------------------+---------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`service_type` | ``""`` | -+---------------------------------------------+---------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`description_url` | ``""`` | + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`igd_control_url` | ``""`` | + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`igd_our_addr` | ``""`` | + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`igd_service_type` | ``""`` | + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`IGDStatus` | :ref:`igd_status` | ``9`` | + +---------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`service_type` | ``""`` | + +---------------------------------------------+---------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_port_mapping` **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`delete_port_mapping` **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_gateway` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`query_external_address` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_port_mapping` **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`delete_port_mapping` **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_gateway` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`query_external_address` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_UPNPDevice_IGDStatus: -.. _class_UPNPDevice_constant_IGD_STATUS_OK: - -.. _class_UPNPDevice_constant_IGD_STATUS_HTTP_ERROR: - -.. _class_UPNPDevice_constant_IGD_STATUS_HTTP_EMPTY: - -.. _class_UPNPDevice_constant_IGD_STATUS_NO_URLS: - -.. _class_UPNPDevice_constant_IGD_STATUS_NO_IGD: - -.. _class_UPNPDevice_constant_IGD_STATUS_DISCONNECTED: - -.. _class_UPNPDevice_constant_IGD_STATUS_UNKNOWN_DEVICE: - -.. _class_UPNPDevice_constant_IGD_STATUS_INVALID_CONTROL: - -.. _class_UPNPDevice_constant_IGD_STATUS_MALLOC_ERROR: - -.. _class_UPNPDevice_constant_IGD_STATUS_UNKNOWN_ERROR: +.. rst-class:: classref-enumeration enum **IGDStatus**: -- **IGD_STATUS_OK** = **0** --- OK. +.. _class_UPNPDevice_constant_IGD_STATUS_OK: -- **IGD_STATUS_HTTP_ERROR** = **1** --- HTTP error. +.. rst-class:: classref-enumeration-constant -- **IGD_STATUS_HTTP_EMPTY** = **2** --- Empty HTTP response. +:ref:`IGDStatus` **IGD_STATUS_OK** = ``0`` -- **IGD_STATUS_NO_URLS** = **3** --- Returned response contained no URLs. +OK. -- **IGD_STATUS_NO_IGD** = **4** --- Not a valid IGD. +.. _class_UPNPDevice_constant_IGD_STATUS_HTTP_ERROR: -- **IGD_STATUS_DISCONNECTED** = **5** --- Disconnected. +.. rst-class:: classref-enumeration-constant -- **IGD_STATUS_UNKNOWN_DEVICE** = **6** --- Unknown device. +:ref:`IGDStatus` **IGD_STATUS_HTTP_ERROR** = ``1`` -- **IGD_STATUS_INVALID_CONTROL** = **7** --- Invalid control. +HTTP error. -- **IGD_STATUS_MALLOC_ERROR** = **8** --- Memory allocation error. +.. _class_UPNPDevice_constant_IGD_STATUS_HTTP_EMPTY: -- **IGD_STATUS_UNKNOWN_ERROR** = **9** --- Unknown error. +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_HTTP_EMPTY** = ``2`` + +Empty HTTP response. + +.. _class_UPNPDevice_constant_IGD_STATUS_NO_URLS: + +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_NO_URLS** = ``3`` + +Returned response contained no URLs. + +.. _class_UPNPDevice_constant_IGD_STATUS_NO_IGD: + +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_NO_IGD** = ``4`` + +Not a valid IGD. + +.. _class_UPNPDevice_constant_IGD_STATUS_DISCONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_DISCONNECTED** = ``5`` + +Disconnected. + +.. _class_UPNPDevice_constant_IGD_STATUS_UNKNOWN_DEVICE: + +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_UNKNOWN_DEVICE** = ``6`` + +Unknown device. + +.. _class_UPNPDevice_constant_IGD_STATUS_INVALID_CONTROL: + +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_INVALID_CONTROL** = ``7`` + +Invalid control. + +.. _class_UPNPDevice_constant_IGD_STATUS_MALLOC_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_MALLOC_ERROR** = ``8`` + +Memory allocation error. + +.. _class_UPNPDevice_constant_IGD_STATUS_UNKNOWN_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`IGDStatus` **IGD_STATUS_UNKNOWN_ERROR** = ``9`` + +Unknown error. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_UPNPDevice_property_description_url: -- :ref:`String` **description_url** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``""`` | -+-----------+----------------------------+ -| *Setter* | set_description_url(value) | -+-----------+----------------------------+ -| *Getter* | get_description_url() | -+-----------+----------------------------+ +:ref:`String` **description_url** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_description_url** **(** :ref:`String` value **)** +- :ref:`String` **get_description_url** **(** **)** URL to the device description. +.. rst-class:: classref-item-separator + ---- .. _class_UPNPDevice_property_igd_control_url: -- :ref:`String` **igd_control_url** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``""`` | -+-----------+----------------------------+ -| *Setter* | set_igd_control_url(value) | -+-----------+----------------------------+ -| *Getter* | get_igd_control_url() | -+-----------+----------------------------+ +:ref:`String` **igd_control_url** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_igd_control_url** **(** :ref:`String` value **)** +- :ref:`String` **get_igd_control_url** **(** **)** IDG control URL. +.. rst-class:: classref-item-separator + ---- .. _class_UPNPDevice_property_igd_our_addr: -- :ref:`String` **igd_our_addr** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_igd_our_addr(value) | -+-----------+-------------------------+ -| *Getter* | get_igd_our_addr() | -+-----------+-------------------------+ +:ref:`String` **igd_our_addr** = ``""`` -Address of the local machine in the network connecting it to this ``UPNPDevice``. +.. rst-class:: classref-property-setget + +- void **set_igd_our_addr** **(** :ref:`String` value **)** +- :ref:`String` **get_igd_our_addr** **(** **)** + +Address of the local machine in the network connecting it to this **UPNPDevice**. + +.. rst-class:: classref-item-separator ---- .. _class_UPNPDevice_property_igd_service_type: -- :ref:`String` **igd_service_type** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``""`` | -+-----------+-----------------------------+ -| *Setter* | set_igd_service_type(value) | -+-----------+-----------------------------+ -| *Getter* | get_igd_service_type() | -+-----------+-----------------------------+ +:ref:`String` **igd_service_type** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_igd_service_type** **(** :ref:`String` value **)** +- :ref:`String` **get_igd_service_type** **(** **)** IGD service type. +.. rst-class:: classref-item-separator + ---- .. _class_UPNPDevice_property_igd_status: -- :ref:`IGDStatus` **igd_status** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``9`` | -+-----------+-----------------------+ -| *Setter* | set_igd_status(value) | -+-----------+-----------------------+ -| *Getter* | get_igd_status() | -+-----------+-----------------------+ +:ref:`IGDStatus` **igd_status** = ``9`` + +.. rst-class:: classref-property-setget + +- void **set_igd_status** **(** :ref:`IGDStatus` value **)** +- :ref:`IGDStatus` **get_igd_status** **(** **)** IGD status. See :ref:`IGDStatus`. +.. rst-class:: classref-item-separator + ---- .. _class_UPNPDevice_property_service_type: -- :ref:`String` **service_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_service_type(value) | -+-----------+-------------------------+ -| *Getter* | get_service_type() | -+-----------+-------------------------+ +:ref:`String` **service_type** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_service_type** **(** :ref:`String` value **)** +- :ref:`String` **get_service_type** **(** **)** Service type. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_UPNPDevice_method_add_port_mapping: -- :ref:`int` **add_port_mapping** **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| +.. rst-class:: classref-method -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`. +:ref:`int` **add_port_mapping** **(** :ref:`int` port, :ref:`int` port_internal=0, :ref:`String` desc="", :ref:`String` proto="UDP", :ref:`int` duration=0 **)** |const| + +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`. + +.. rst-class:: classref-item-separator ---- .. _class_UPNPDevice_method_delete_port_mapping: -- :ref:`int` **delete_port_mapping** **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| +.. rst-class:: classref-method + +:ref:`int` **delete_port_mapping** **(** :ref:`int` port, :ref:`String` proto="UDP" **)** |const| Deletes the port mapping identified by the given port and protocol combination on this device. See :ref:`UPNP.delete_port_mapping`. +.. rst-class:: classref-item-separator + ---- .. _class_UPNPDevice_method_is_valid_gateway: -- :ref:`bool` **is_valid_gateway** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_gateway** **(** **)** |const| Returns ``true`` if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding. +.. rst-class:: classref-item-separator + ---- .. _class_UPNPDevice_method_query_external_address: -- :ref:`String` **query_external_address** **(** **)** |const| +.. rst-class:: classref-method -Returns the external IP address of this ``UPNPDevice`` or an empty string. +:ref:`String` **query_external_address** **(** **)** |const| + +Returns the external IP address of this **UPNPDevice** or an empty 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.)` diff --git a/classes/class_variant.rst b/classes/class_variant.rst index 92c84abb2..4a2c35244 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -12,6 +12,8 @@ Variant The most important data type in Godot. +.. rst-class:: classref-introduction-group + Description ----------- @@ -109,6 +111,8 @@ A Variant: Modifications to a container will modify all references to it. A :ref:`Mutex` should be created to lock it if multi-threaded access is desired. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_vboxcontainer.rst b/classes/class_vboxcontainer.rst index 8d1307b9f..da1b8ada1 100644 --- a/classes/class_vboxcontainer.rst +++ b/classes/class_vboxcontainer.rst @@ -16,11 +16,15 @@ VBoxContainer Vertical box container. +.. rst-class:: classref-introduction-group + Description ----------- Vertical box container. See :ref:`BoxContainer`. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -28,25 +32,34 @@ Tutorials - `3D Voxel Demo `__ +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------+------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`separation` | ``4`` | -+-----------------------+------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`separation` | ``4`` | + +-----------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_VBoxContainer_theme_constant_separation: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **separation** = ``4`` -The vertical space between the ``VBoxContainer``'s elements. +The vertical space between the **VBoxContainer**'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.)` diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index 808c04d84..9b5b04852 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -12,15 +12,21 @@ Vector2 Vector used for 2D math using floating point coordinates. +.. rst-class:: classref-introduction-group + Description ----------- 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. -It uses floating-point coordinates. See :ref:`Vector2i` for its integer counterpart. +It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike :ref:`float` which is always 64-bit. If double precision is needed, compile the engine with the option ``float=64``. + +See :ref:`Vector2i` for its integer counterpart. \ **Note:** In a boolean context, a Vector2 will evaluate to ``false`` if it's equal to ``Vector2(0, 0)``. Otherwise, a Vector2 will always evaluate to ``true``. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,261 +42,361 @@ Tutorials - `All 2D Demos `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`x` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`y` | ``0.0`` | -+---------------------------+------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`x` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`y` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+-------------------------------+------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`Vector2` **(** **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`Vector2` **(** :ref:`Vector2` from **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`Vector2` **(** :ref:`Vector2i` from **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`Vector2` **(** :ref:`float` x, :ref:`float` y **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`Vector2` **(** **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`Vector2` **(** :ref:`Vector2` from **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`Vector2` **(** :ref:`Vector2i` from **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`Vector2` **(** :ref:`float` x, :ref:`float` y **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`abs` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to_point` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`aspect` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`bezier_interpolate` **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`bounce` **(** :ref:`Vector2` n **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`ceil` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`clamp` **(** :ref:`Vector2` min, :ref:`Vector2` max **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cross` **(** :ref:`Vector2` with **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`cubic_interpolate` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`direction_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Vector2` with **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`floor` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`from_angle` **(** :ref:`float` angle **)** |static| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector2` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_zero_approx` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`lerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`move_toward` **(** :ref:`Vector2` to, :ref:`float` delta **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`normalized` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`orthogonal` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`posmodv` **(** :ref:`Vector2` modv **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`project` **(** :ref:`Vector2` b **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`reflect` **(** :ref:`Vector2` n **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`round` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`sign` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`slerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`slide` **(** :ref:`Vector2` n **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`snapped` **(** :ref:`Vector2` step **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`abs` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to` **(** :ref:`Vector2` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to_point` **(** :ref:`Vector2` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`aspect` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bezier_derivative` **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bezier_interpolate` **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bounce` **(** :ref:`Vector2` n **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`ceil` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`clamp` **(** :ref:`Vector2` min, :ref:`Vector2` max **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cross` **(** :ref:`Vector2` with **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`cubic_interpolate` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`direction_to` **(** :ref:`Vector2` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector2` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to` **(** :ref:`Vector2` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot` **(** :ref:`Vector2` with **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`floor` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`from_angle` **(** :ref:`float` angle **)** |static| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector2` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`lerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`move_toward` **(** :ref:`Vector2` to, :ref:`float` delta **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`normalized` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`orthogonal` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`posmodv` **(** :ref:`Vector2` modv **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`project` **(** :ref:`Vector2` b **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`reflect` **(** :ref:`Vector2` n **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`round` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`sign` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`slerp` **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`slide` **(** :ref:`Vector2` n **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`snapped` **(** :ref:`Vector2` step **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`float` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`int` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator +` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator -` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator /` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator /` **(** :ref:`float` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator /` **(** :ref:`int` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector2` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator unary+` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator unary-` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`float` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`int` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator +` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator -` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator /` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator /` **(** :ref:`float` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator /` **(** :ref:`int` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector2` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator unary+` **(** **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator unary-` **(** **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Vector2_constant_AXIS_X: +.. rst-class:: classref-constant + +**AXIS_X** = ``0`` + +Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector2_constant_AXIS_Y: +.. rst-class:: classref-constant + +**AXIS_Y** = ``1`` + +Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector2_constant_ZERO: +.. rst-class:: classref-constant + +**ZERO** = ``Vector2(0, 0)`` + +Zero vector, a vector with all components set to ``0``. + .. _class_Vector2_constant_ONE: +.. rst-class:: classref-constant + +**ONE** = ``Vector2(1, 1)`` + +One vector, a vector with all components set to ``1``. + .. _class_Vector2_constant_INF: +.. rst-class:: classref-constant + +**INF** = ``Vector2(inf, inf)`` + +Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. + .. _class_Vector2_constant_LEFT: +.. rst-class:: classref-constant + +**LEFT** = ``Vector2(-1, 0)`` + +Left unit vector. Represents the direction of left. + .. _class_Vector2_constant_RIGHT: +.. rst-class:: classref-constant + +**RIGHT** = ``Vector2(1, 0)`` + +Right unit vector. Represents the direction of right. + .. _class_Vector2_constant_UP: +.. rst-class:: classref-constant + +**UP** = ``Vector2(0, -1)`` + +Up unit vector. Y is down in 2D, so this vector points -Y. + .. _class_Vector2_constant_DOWN: -- **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-constant -- **AXIS_Y** = **1** --- Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +**DOWN** = ``Vector2(0, 1)`` -- **ZERO** = **Vector2(0, 0)** --- Zero vector, a vector with all components set to ``0``. +Down unit vector. Y is down in 2D, so this vector points +Y. -- **ONE** = **Vector2(1, 1)** --- One vector, a vector with all components set to ``1``. +.. rst-class:: classref-section-separator -- **INF** = **Vector2(inf, inf)** --- Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. +---- -- **LEFT** = **Vector2(-1, 0)** --- Left unit vector. Represents the direction of left. - -- **RIGHT** = **Vector2(1, 0)** --- Right unit vector. Represents the direction of right. - -- **UP** = **Vector2(0, -1)** --- Up unit vector. Y is down in 2D, so this vector points -Y. - -- **DOWN** = **Vector2(0, 1)** --- Down unit vector. Y is down in 2D, so this vector points +Y. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Vector2_property_x: -- :ref:`float` **x** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **x** = ``0.0`` The vector's X component. Also accessible by using the index position ``[0]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_property_y: -- :ref:`float` **y** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **y** = ``0.0`` The vector's Y component. Also accessible by using the index position ``[1]``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Vector2_constructor_Vector2: -- :ref:`Vector2` **Vector2** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Vector2`` with all components set to ``0``. +:ref:`Vector2` **Vector2** **(** **)** + +Constructs a default-initialized **Vector2** with all components set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2` **Vector2** **(** :ref:`Vector2` from **)** +.. rst-class:: classref-constructor -Constructs a ``Vector2`` as a copy of the given ``Vector2``. +:ref:`Vector2` **Vector2** **(** :ref:`Vector2` from **)** + +Constructs a **Vector2** as a copy of the given **Vector2**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2` **Vector2** **(** :ref:`Vector2i` from **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector2`` from :ref:`Vector2i`. +:ref:`Vector2` **Vector2** **(** :ref:`Vector2i` from **)** + +Constructs a new **Vector2** from :ref:`Vector2i`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2` **Vector2** **(** :ref:`float` x, :ref:`float` y **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector2`` from the given ``x`` and ``y``. +:ref:`Vector2` **Vector2** **(** :ref:`float` x, :ref:`float` y **)** + +Constructs a new **Vector2** from the given ``x`` and ``y``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Vector2_method_abs: -- :ref:`Vector2` **abs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **abs** **(** **)** |const| Returns a new vector with all components in absolute values (i.e. positive). +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_angle: -- :ref:`float` **angle** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **angle** **(** **)** |const| Returns this vector's angle with respect to the positive X axis, or ``(1, 0)`` vector, in radians. @@ -300,21 +406,29 @@ For example, ``Vector2.RIGHT.angle()`` will return zero, ``Vector2.DOWN.angle()` Equivalent to the result of :ref:`@GlobalScope.atan2` when called with the vector's :ref:`y` and :ref:`x` as parameters: ``atan2(y, x)``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_angle_to: -- :ref:`float` **angle_to** **(** :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **angle_to** **(** :ref:`Vector2` to **)** |const| Returns the angle to the given vector, in radians. \ `Illustration of the returned angle. `__ +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_angle_to_point: -- :ref:`float` **angle_to_point** **(** :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **angle_to_point** **(** :ref:`Vector2` to **)** |const| Returns the angle between the line connecting the two points and the X axis, in radians. @@ -322,51 +436,87 @@ Returns the angle between the line connecting the two points and the X axis, in \ `Illustration of the returned angle. `__ +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_aspect: -- :ref:`float` **aspect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **aspect** **(** **)** |const| Returns the aspect ratio of this vector, the ratio of :ref:`x` to :ref:`y`. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_method_bezier_derivative: + +.. rst-class:: classref-method + +:ref:`Vector2` **bezier_derivative** **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| + +Returns the derivative at the given ``t`` on the `Bézier curve `__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. + +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_bezier_interpolate: -- :ref:`Vector2` **bezier_interpolate** **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| +.. rst-class:: classref-method -Returns the point at the given ``t`` on the `Bezier curve `__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. +:ref:`Vector2` **bezier_interpolate** **(** :ref:`Vector2` control_1, :ref:`Vector2` control_2, :ref:`Vector2` end, :ref:`float` t **)** |const| + +Returns the point at the given ``t`` on the `Bézier curve `__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_bounce: -- :ref:`Vector2` **bounce** **(** :ref:`Vector2` n **)** |const| +.. rst-class:: classref-method -Returns the vector "bounced off" from a plane defined by the given normal. +:ref:`Vector2` **bounce** **(** :ref:`Vector2` n **)** |const| + +Returns a new vector "bounced off" from a plane defined by the given normal. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_ceil: -- :ref:`Vector2` **ceil** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **ceil** **(** **)** |const| Returns a new vector with all components rounded up (towards positive infinity). +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_clamp: -- :ref:`Vector2` **clamp** **(** :ref:`Vector2` min, :ref:`Vector2` max **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **clamp** **(** :ref:`Vector2` min, :ref:`Vector2` max **)** |const| Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_cross: -- :ref:`float` **cross** **(** :ref:`Vector2` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **cross** **(** :ref:`Vector2` with **)** |const| Returns the 2D analog of the cross product for this vector and ``with``. @@ -374,55 +524,79 @@ This is the signed area of the parallelogram formed by the two vectors. If the s \ **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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_cubic_interpolate: -- :ref:`Vector2` **cubic_interpolate** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **cubic_interpolate** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| Cubically interpolates 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_cubic_interpolate_in_time: -- :ref:`Vector2` **cubic_interpolate_in_time** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **cubic_interpolate_in_time** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| Cubically interpolates 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_direction_to: -- :ref:`Vector2` **direction_to** **(** :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **direction_to** **(** :ref:`Vector2` to **)** |const| Returns the normalized vector pointing from this vector to ``to``. This is equivalent to using ``(b - a).normalized()``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_distance_squared_to: -- :ref:`float` **distance_squared_to** **(** :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_squared_to** **(** :ref:`Vector2` to **)** |const| Returns the squared distance between this vector and ``to``. This method runs faster than :ref:`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_Vector2_method_distance_to: -- :ref:`float` **distance_to** **(** :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_to** **(** :ref:`Vector2` to **)** |const| Returns the distance between this vector and ``to``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_dot: -- :ref:`float` **dot** **(** :ref:`Vector2` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **dot** **(** :ref:`Vector2` with **)** |const| 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. @@ -432,21 +606,29 @@ When using unit (normalized) vectors, the result will always be between ``-1.0`` \ **Note:** ``a.dot(b)`` is equivalent to ``b.dot(a)``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_floor: -- :ref:`Vector2` **floor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **floor** **(** **)** |const| Returns a new vector with all components rounded down (towards negative infinity). +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_from_angle: -- :ref:`Vector2` **from_angle** **(** :ref:`float` angle **)** |static| +.. rst-class:: classref-method -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)``. +:ref:`Vector2` **from_angle** **(** :ref:`float` angle **)** |static| + +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)``. :: @@ -454,350 +636,528 @@ Creates a unit ``Vector2`` rotated to the given ``angle`` in radians. This is eq print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above. print(Vector2.from_angle(PI / 2)) # Prints (0, 1). +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Vector2` to **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Vector2` to **)** |const| Returns ``true`` if this vector and ``v`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_is_normalized: -- :ref:`bool` **is_normalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_normalized** **(** **)** |const| Returns ``true`` if the vector is normalized, ``false`` otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_is_zero_approx: -- :ref:`bool` **is_zero_approx** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_zero_approx** **(** **)** |const| Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx` on each component. This method is faster than using :ref:`is_equal_approx` with one value as a zero vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_length: -- :ref:`float` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length** **(** **)** |const| Returns the length (magnitude) of this vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_length_squared: -- :ref:`float` **length_squared** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length_squared** **(** **)** |const| Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_lerp: -- :ref:`Vector2` **lerp** **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **lerp** **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_limit_length: -- :ref:`Vector2` **limit_length** **(** :ref:`float` length=1.0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **limit_length** **(** :ref:`float` length=1.0 **)** |const| Returns the vector with a maximum length by limiting its length to ``length``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_max_axis_index: -- :ref:`int` **max_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **max_axis_index** **(** **)** |const| Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_min_axis_index: -- :ref:`int` **min_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **min_axis_index** **(** **)** |const| Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Y`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_move_toward: -- :ref:`Vector2` **move_toward** **(** :ref:`Vector2` to, :ref:`float` delta **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **move_toward** **(** :ref:`Vector2` to, :ref:`float` delta **)** |const| Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not go past the final value. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_normalized: -- :ref:`Vector2` **normalized** **(** **)** |const| +.. rst-class:: classref-method -Returns the vector scaled to unit length. Equivalent to ``v / v.length()``. +:ref:`Vector2` **normalized** **(** **)** |const| + +Returns a new vector scaled to unit length. Equivalent to ``v / v.length()``. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_orthogonal: -- :ref:`Vector2` **orthogonal** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **orthogonal** **(** **)** |const| Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_posmod: -- :ref:`Vector2` **posmod** **(** :ref:`float` mod **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **posmod** **(** :ref:`float` mod **)** |const| Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_posmodv: -- :ref:`Vector2` **posmodv** **(** :ref:`Vector2` modv **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **posmodv** **(** :ref:`Vector2` modv **)** |const| Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_project: -- :ref:`Vector2` **project** **(** :ref:`Vector2` b **)** |const| +.. rst-class:: classref-method -Returns this vector projected onto the vector ``b``. +:ref:`Vector2` **project** **(** :ref:`Vector2` b **)** |const| + +Returns the result of projecting the vector onto the given vector ``b``. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_reflect: -- :ref:`Vector2` **reflect** **(** :ref:`Vector2` n **)** |const| +.. rst-class:: classref-method -Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined by the given direction vector ``n``. +:ref:`Vector2` **reflect** **(** :ref:`Vector2` n **)** |const| + +Returns the result of reflecting the vector from a line defined by the given direction vector ``n``. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_rotated: -- :ref:`Vector2` **rotated** **(** :ref:`float` angle **)** |const| +.. rst-class:: classref-method -Returns the vector rotated by ``angle`` (in radians). See also :ref:`@GlobalScope.deg_to_rad`. +:ref:`Vector2` **rotated** **(** :ref:`float` angle **)** |const| + +Returns the result of rotating this vector by ``angle`` (in radians). See also :ref:`@GlobalScope.deg_to_rad`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_round: -- :ref:`Vector2` **round** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **round** **(** **)** |const| Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_sign: -- :ref:`Vector2` **sign** **(** **)** |const| +.. rst-class:: classref-method -Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling :ref:`@GlobalScope.sign` on each component. +:ref:`Vector2` **sign** **(** **)** |const| + +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` on each component. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_slerp: -- :ref:`Vector2` **slerp** **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **slerp** **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| 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. This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like :ref:`lerp`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_method_slide: -- :ref:`Vector2` **slide** **(** :ref:`Vector2` n **)** |const| +.. rst-class:: classref-method -Returns this vector slid along a plane defined by the given normal. +:ref:`Vector2` **slide** **(** :ref:`Vector2` n **)** |const| + +Returns the result of sliding the vector along a plane defined by the given normal. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_method_snapped: -- :ref:`Vector2` **snapped** **(** :ref:`Vector2` step **)** |const| +.. rst-class:: classref-method -Returns this vector with each component snapped to the nearest multiple of ``step``. This can also be used to round to an arbitrary number of decimals. +:ref:`Vector2` **snapped** **(** :ref:`Vector2` step **)** |const| + +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-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Vector2_operator_neq_bool: +.. _class_Vector2_operator_neq_Vector2: -- :ref:`bool` **operator !=** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Vector2` right **)** Returns ``true`` if the vectors are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_operator_mul_Transform2D: + +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`Transform2D` right **)** + +Inversely transforms (multiplies) the **Vector2** by the given :ref:`Transform2D` transformation matrix. + +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_operator_mul_Vector2: -- :ref:`Vector2` **operator *** **(** :ref:`Transform2D` right **)** +.. rst-class:: classref-operator -Inversely transforms (multiplies) the ``Vector2`` by the given :ref:`Transform2D` transformation matrix. +:ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** ----- - -- :ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** - -Multiplies each component of the ``Vector2`` by the components of the given ``Vector2``. +Multiplies each component of the **Vector2** by the components of the given **Vector2**. :: print(Vector2(10, 20) * Vector2(3, 4)) # Prints "(30, 80)" ----- - -- :ref:`Vector2` **operator *** **(** :ref:`float` right **)** - -Multiplies each component of the ``Vector2`` by the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2` **operator *** **(** :ref:`int` right **)** +.. _class_Vector2_operator_mul_float: -Multiplies each component of the ``Vector2`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`float` right **)** + +Multiplies each component of the **Vector2** by the given :ref:`float`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_operator_mul_int: + +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`int` right **)** + +Multiplies each component of the **Vector2** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2_operator_sum_Vector2: -- :ref:`Vector2` **operator +** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator -Adds each component of the ``Vector2`` by the components of the given ``Vector2``. +:ref:`Vector2` **operator +** **(** :ref:`Vector2` right **)** + +Adds each component of the **Vector2** by the components of the given **Vector2**. :: print(Vector2(10, 20) + Vector2(3, 4)) # Prints "(13, 24)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_operator_dif_Vector2: -- :ref:`Vector2` **operator -** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator -Subtracts each component of the ``Vector2`` by the components of the given ``Vector2``. +:ref:`Vector2` **operator -** **(** :ref:`Vector2` right **)** + +Subtracts each component of the **Vector2** by the components of the given **Vector2**. :: print(Vector2(10, 20) - Vector2(3, 4)) # Prints "(7, 16)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector2_operator_div_Vector2: -- :ref:`Vector2` **operator /** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator -Divides each component of the ``Vector2`` by the components of the given ``Vector2``. +:ref:`Vector2` **operator /** **(** :ref:`Vector2` right **)** + +Divides each component of the **Vector2** by the components of the given **Vector2**. :: print(Vector2(10, 20) / Vector2(2, 5)) # Prints "(5, 4)" ----- - -- :ref:`Vector2` **operator /** **(** :ref:`float` right **)** - -Divides each component of the ``Vector2`` by the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2` **operator /** **(** :ref:`int` right **)** +.. _class_Vector2_operator_div_float: -Divides each component of the ``Vector2`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector2` **operator /** **(** :ref:`float` right **)** + +Divides each component of the **Vector2** by the given :ref:`float`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector2_operator_lt_bool: +.. _class_Vector2_operator_div_int: -- :ref:`bool` **operator <** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator -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. +:ref:`Vector2` **operator /** **(** :ref:`int` right **)** + +Divides each component of the **Vector2** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector2_operator_lte_bool: +.. _class_Vector2_operator_lt_Vector2: -- :ref:`bool` **operator <=** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator <** **(** :ref:`Vector2` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector2_operator_eq_bool: +.. _class_Vector2_operator_lte_Vector2: -- :ref:`bool` **operator ==** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`Vector2` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_operator_eq_Vector2: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Vector2` right **)** Returns ``true`` if the vectors are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. ----- - -.. _class_Vector2_operator_gt_bool: - -- :ref:`bool` **operator >** **(** :ref:`Vector2` right **)** - -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. +.. rst-class:: classref-item-separator ---- -.. _class_Vector2_operator_gte_bool: +.. _class_Vector2_operator_gt_Vector2: -- :ref:`bool` **operator >=** **(** :ref:`Vector2` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator >** **(** :ref:`Vector2` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector2_operator_idx_float: +.. _class_Vector2_operator_gte_Vector2: -- :ref:`float` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`Vector2` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_operator_idx_int: + +.. rst-class:: classref-operator + +:ref:`float` **operator []** **(** :ref:`int` index **)** Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector2_operator_unplus_Vector2: +.. _class_Vector2_operator_unplus: -- :ref:`Vector2` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Vector2` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector2_operator_unminus_Vector2: +.. _class_Vector2_operator_unminus: -- :ref:`Vector2` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Vector2` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index fb39eef59..0d0fcf28b 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -12,15 +12,19 @@ Vector2i Vector used for 2D math using integer coordinates. +.. rst-class:: classref-introduction-group + Description ----------- 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. -It uses integer coordinates and is therefore preferable to :ref:`Vector2` when exact precision is required. +It uses integer coordinates and is therefore preferable to :ref:`Vector2` when exact precision is required. Note that the values are limited to 32 bits, and unlike :ref:`Vector2` this cannot be configured with an engine build option. Use :ref:`int` or :ref:`PackedInt64Array` if 64-bit values are needed. \ **Note:** In a boolean context, a Vector2i will evaluate to ``false`` if it's equal to ``Vector2i(0, 0)``. Otherwise, a Vector2i will always evaluate to ``true``. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,420 +34,642 @@ Tutorials - `3Blue1Brown Essence of Linear Algebra `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`x` | ``0`` | -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`y` | ``0`` | -+-----------------------+-------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`x` | ``0`` | + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`y` | ``0`` | + +-----------------------+-------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`Vector2i` **(** **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`Vector2i` **(** :ref:`Vector2i` from **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`Vector2i` **(** :ref:`Vector2` from **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`Vector2i` **(** :ref:`int` x, :ref:`int` y **)** | -+---------------------------------+-------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`Vector2i` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`Vector2i` **(** :ref:`Vector2i` from **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`Vector2i` **(** :ref:`Vector2` from **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`Vector2i` **(** :ref:`int` x, :ref:`int` y **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`abs` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`aspect` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`clamp` **(** :ref:`Vector2i` min, :ref:`Vector2i` max **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`length_squared` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`sign` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`abs` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`aspect` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`clamp` **(** :ref:`Vector2i` min, :ref:`Vector2i` max **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`length_squared` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`sign` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`snapped` **(** :ref:`Vector2i` step **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator %` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator %` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator *` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator *` **(** :ref:`float` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator *` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator +` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator -` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator /` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`operator /` **(** :ref:`float` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator /` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector2i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator unary+` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`operator unary-` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator %` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator %` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator *` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator *` **(** :ref:`float` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator *` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator +` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator -` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator /` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`operator /` **(** :ref:`float` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator /` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector2i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator unary+` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`operator unary-` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Vector2i_constant_AXIS_X: +.. rst-class:: classref-constant + +**AXIS_X** = ``0`` + +Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector2i_constant_AXIS_Y: +.. rst-class:: classref-constant + +**AXIS_Y** = ``1`` + +Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector2i_constant_ZERO: +.. rst-class:: classref-constant + +**ZERO** = ``Vector2i(0, 0)`` + +Zero vector, a vector with all components set to ``0``. + .. _class_Vector2i_constant_ONE: +.. rst-class:: classref-constant + +**ONE** = ``Vector2i(1, 1)`` + +One vector, a vector with all components set to ``1``. + .. _class_Vector2i_constant_LEFT: +.. rst-class:: classref-constant + +**LEFT** = ``Vector2i(-1, 0)`` + +Left unit vector. Represents the direction of left. + .. _class_Vector2i_constant_RIGHT: +.. rst-class:: classref-constant + +**RIGHT** = ``Vector2i(1, 0)`` + +Right unit vector. Represents the direction of right. + .. _class_Vector2i_constant_UP: +.. rst-class:: classref-constant + +**UP** = ``Vector2i(0, -1)`` + +Up unit vector. Y is down in 2D, so this vector points -Y. + .. _class_Vector2i_constant_DOWN: -- **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-constant -- **AXIS_Y** = **1** --- Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +**DOWN** = ``Vector2i(0, 1)`` -- **ZERO** = **Vector2i(0, 0)** --- Zero vector, a vector with all components set to ``0``. +Down unit vector. Y is down in 2D, so this vector points +Y. -- **ONE** = **Vector2i(1, 1)** --- One vector, a vector with all components set to ``1``. +.. rst-class:: classref-section-separator -- **LEFT** = **Vector2i(-1, 0)** --- Left unit vector. Represents the direction of left. +---- -- **RIGHT** = **Vector2i(1, 0)** --- Right unit vector. Represents the direction of right. - -- **UP** = **Vector2i(0, -1)** --- Up unit vector. Y is down in 2D, so this vector points -Y. - -- **DOWN** = **Vector2i(0, 1)** --- Down unit vector. Y is down in 2D, so this vector points +Y. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Vector2i_property_x: -- :ref:`int` **x** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **x** = ``0`` The vector's X component. Also accessible by using the index position ``[0]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_property_y: -- :ref:`int` **y** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **y** = ``0`` The vector's Y component. Also accessible by using the index position ``[1]``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Vector2i_constructor_Vector2i: -- :ref:`Vector2i` **Vector2i** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Vector2i`` with all components set to ``0``. +:ref:`Vector2i` **Vector2i** **(** **)** + +Constructs a default-initialized **Vector2i** with all components set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2i` **Vector2i** **(** :ref:`Vector2i` from **)** +.. rst-class:: classref-constructor -Constructs a ``Vector2i`` as a copy of the given ``Vector2i``. +:ref:`Vector2i` **Vector2i** **(** :ref:`Vector2i` from **)** + +Constructs a **Vector2i** as a copy of the given **Vector2i**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2i` **Vector2i** **(** :ref:`Vector2` from **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector2i`` from :ref:`Vector2`. The floating point coordinates will be truncated. +:ref:`Vector2i` **Vector2i** **(** :ref:`Vector2` from **)** + +Constructs a new **Vector2i** from :ref:`Vector2`. The floating point coordinates will be truncated. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector2i` **Vector2i** **(** :ref:`int` x, :ref:`int` y **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector2i`` from the given ``x`` and ``y``. +:ref:`Vector2i` **Vector2i** **(** :ref:`int` x, :ref:`int` y **)** + +Constructs a new **Vector2i** from the given ``x`` and ``y``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Vector2i_method_abs: -- :ref:`Vector2i` **abs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **abs** **(** **)** |const| Returns a new vector with all components in absolute values (i.e. positive). +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_method_aspect: -- :ref:`float` **aspect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **aspect** **(** **)** |const| Returns the aspect ratio of this vector, the ratio of :ref:`x` to :ref:`y`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_method_clamp: -- :ref:`Vector2i` **clamp** **(** :ref:`Vector2i` min, :ref:`Vector2i` max **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **clamp** **(** :ref:`Vector2i` min, :ref:`Vector2i` max **)** |const| Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_method_length: -- :ref:`float` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length** **(** **)** |const| Returns the length (magnitude) of this vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_method_length_squared: -- :ref:`int` **length_squared** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **length_squared** **(** **)** |const| Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`, 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_max_axis_index: -- :ref:`int` **max_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **max_axis_index** **(** **)** |const| Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_method_min_axis_index: -- :ref:`int` **min_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **min_axis_index** **(** **)** |const| Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Y`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_method_sign: -- :ref:`Vector2i` **sign** **(** **)** |const| +.. rst-class:: classref-method -Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling :ref:`@GlobalScope.sign` on each component. +:ref:`Vector2i` **sign** **(** **)** |const| + +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` on each component. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2i_method_snapped: + +.. rst-class:: classref-method + +:ref:`Vector2i` **snapped** **(** :ref:`Vector2i` step **)** |const| + +Returns a new vector with each component snapped to the closest multiple of the corresponding component in ``step``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Vector2i_operator_neq_bool: +.. _class_Vector2i_operator_neq_Vector2i: -- :ref:`bool` **operator !=** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Vector2i` right **)** Returns ``true`` if the vectors are not equal. +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_operator_mod_Vector2i: -- :ref:`Vector2i` **operator %** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -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` instead if you want to handle negative numbers. +:ref:`Vector2i` **operator %** **(** :ref:`Vector2i` right **)** + +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` instead if you want to handle negative numbers. :: print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints "(3, -4)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector2i` **operator %** **(** :ref:`int` right **)** +.. _class_Vector2i_operator_mod_int: -Gets the remainder of each component of the ``Vector2i`` with the the given :ref:`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` instead if you want to handle negative numbers. +.. rst-class:: classref-operator + +:ref:`Vector2i` **operator %** **(** :ref:`int` right **)** + +Gets the remainder of each component of the **Vector2i** with the the given :ref:`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` instead if you want to handle negative numbers. :: print(Vector2i(10, -20) % 7) # Prints "(3, -6)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_operator_mul_Vector2i: -- :ref:`Vector2i` **operator *** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -Multiplies each component of the ``Vector2i`` by the components of the given ``Vector2i``. +:ref:`Vector2i` **operator *** **(** :ref:`Vector2i` right **)** + +Multiplies each component of the **Vector2i** by the components of the given **Vector2i**. :: print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints "(30, 80)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector2` **operator *** **(** :ref:`float` right **)** +.. _class_Vector2i_operator_mul_float: -Multiplies each component of the ``Vector2i`` by the given :ref:`float`. Returns a :ref:`Vector2`. +.. rst-class:: classref-operator + +:ref:`Vector2` **operator *** **(** :ref:`float` right **)** + +Multiplies each component of the **Vector2i** by the given :ref:`float`. Returns a :ref:`Vector2`. :: print(Vector2i(10, 15) * 0.9) # Prints "(9, 13.5)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector2i` **operator *** **(** :ref:`int` right **)** +.. _class_Vector2i_operator_mul_int: -Multiplies each component of the ``Vector2i`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector2i` **operator *** **(** :ref:`int` right **)** + +Multiplies each component of the **Vector2i** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2i_operator_sum_Vector2i: -- :ref:`Vector2i` **operator +** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -Adds each component of the ``Vector2i`` by the components of the given ``Vector2i``. +:ref:`Vector2i` **operator +** **(** :ref:`Vector2i` right **)** + +Adds each component of the **Vector2i** by the components of the given **Vector2i**. :: print(Vector2i(10, 20) + Vector2i(3, 4)) # Prints "(13, 24)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_operator_dif_Vector2i: -- :ref:`Vector2i` **operator -** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -Subtracts each component of the ``Vector2i`` by the components of the given ``Vector2i``. +:ref:`Vector2i` **operator -** **(** :ref:`Vector2i` right **)** + +Subtracts each component of the **Vector2i** by the components of the given **Vector2i**. :: print(Vector2i(10, 20) - Vector2i(3, 4)) # Prints "(7, 16)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector2i_operator_div_Vector2i: -- :ref:`Vector2i` **operator /** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -Divides each component of the ``Vector2i`` by the components of the given ``Vector2i``. +:ref:`Vector2i` **operator /** **(** :ref:`Vector2i` right **)** + +Divides each component of the **Vector2i** by the components of the given **Vector2i**. :: print(Vector2i(10, 20) / Vector2i(2, 5)) # Prints "(5, 4)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector2` **operator /** **(** :ref:`float` right **)** +.. _class_Vector2i_operator_div_float: -Divides each component of the ``Vector2i`` by the given :ref:`float`. Returns a :ref:`Vector2`. +.. rst-class:: classref-operator + +:ref:`Vector2` **operator /** **(** :ref:`float` right **)** + +Divides each component of the **Vector2i** by the given :ref:`float`. Returns a :ref:`Vector2`. :: print(Vector2i(10, 20) / 2.9) # Prints "(5, 10)" ----- - -- :ref:`Vector2i` **operator /** **(** :ref:`int` right **)** - -Divides each component of the ``Vector2i`` by the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_Vector2i_operator_lt_bool: +.. _class_Vector2i_operator_div_int: -- :ref:`bool` **operator <** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -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. +:ref:`Vector2i` **operator /** **(** :ref:`int` right **)** + +Divides each component of the **Vector2i** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector2i_operator_lte_bool: +.. _class_Vector2i_operator_lt_Vector2i: -- :ref:`bool` **operator <=** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator <** **(** :ref:`Vector2i` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector2i_operator_eq_bool: +.. _class_Vector2i_operator_lte_Vector2i: -- :ref:`bool` **operator ==** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`Vector2i` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2i_operator_eq_Vector2i: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Vector2i` right **)** Returns ``true`` if the vectors are equal. ----- - -.. _class_Vector2i_operator_gt_bool: - -- :ref:`bool` **operator >** **(** :ref:`Vector2i` right **)** - -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. +.. rst-class:: classref-item-separator ---- -.. _class_Vector2i_operator_gte_bool: +.. _class_Vector2i_operator_gt_Vector2i: -- :ref:`bool` **operator >=** **(** :ref:`Vector2i` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator >** **(** :ref:`Vector2i` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2i_operator_gte_Vector2i: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`Vector2i` right **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Vector2i_operator_idx_int: -- :ref:`int` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`int` **operator []** **(** :ref:`int` index **)** Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector2i_operator_unplus_Vector2i: +.. _class_Vector2i_operator_unplus: -- :ref:`Vector2i` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Vector2i` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector2i_operator_unminus_Vector2i: +.. _class_Vector2i_operator_unminus: -- :ref:`Vector2i` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Vector2i` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index bf9d68ea9..6f682d962 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -12,15 +12,21 @@ Vector3 Vector used for 3D math using floating point coordinates. +.. rst-class:: classref-introduction-group + Description ----------- 3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. -It uses floating-point coordinates. See :ref:`Vector3i` for its integer counterpart. +It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike :ref:`float` which is always 64-bit. If double precision is needed, compile the engine with the option ``float=64``. + +See :ref:`Vector3i` for its integer counterpart. \ **Note:** In a boolean context, a Vector3 will evaluate to ``false`` if it's equal to ``Vector3(0, 0, 0)``. Otherwise, a Vector3 will always evaluate to ``true``. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -36,383 +42,551 @@ Tutorials - `All 3D Demos `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`x` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`y` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`z` | ``0.0`` | -+---------------------------+------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`x` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`y` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`z` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`Vector3` **(** **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`Vector3` **(** :ref:`Vector3` from **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`Vector3` **(** :ref:`Vector3i` from **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`Vector3` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`Vector3` **(** **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`Vector3` **(** :ref:`Vector3` from **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`Vector3` **(** :ref:`Vector3i` from **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`Vector3` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`abs` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`angle_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`bezier_interpolate` **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`bounce` **(** :ref:`Vector3` n **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`ceil` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`clamp` **(** :ref:`Vector3` min, :ref:`Vector3` max **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`cross` **(** :ref:`Vector3` with **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`cubic_interpolate` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`direction_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Vector3` with **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`floor` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`inverse` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector3` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_zero_approx` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`lerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`move_toward` **(** :ref:`Vector3` to, :ref:`float` delta **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`normalized` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`octahedron_decode` **(** :ref:`Vector2` uv **)** |static| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`octahedron_encode` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`outer` **(** :ref:`Vector3` with **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`posmodv` **(** :ref:`Vector3` modv **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`project` **(** :ref:`Vector3` b **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`reflect` **(** :ref:`Vector3` n **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`round` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`sign` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`signed_angle_to` **(** :ref:`Vector3` to, :ref:`Vector3` axis **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`slerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`slide` **(** :ref:`Vector3` n **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`snapped` **(** :ref:`Vector3` step **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`abs` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to` **(** :ref:`Vector3` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`bezier_derivative` **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`bezier_interpolate` **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`bounce` **(** :ref:`Vector3` n **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`ceil` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`clamp` **(** :ref:`Vector3` min, :ref:`Vector3` max **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`cross` **(** :ref:`Vector3` with **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`cubic_interpolate` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`direction_to` **(** :ref:`Vector3` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector3` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot` **(** :ref:`Vector3` with **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`floor` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`inverse` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector3` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`lerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`limit_length` **(** :ref:`float` length=1.0 **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`move_toward` **(** :ref:`Vector3` to, :ref:`float` delta **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`normalized` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`octahedron_decode` **(** :ref:`Vector2` uv **)** |static| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`octahedron_encode` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`outer` **(** :ref:`Vector3` with **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`posmodv` **(** :ref:`Vector3` modv **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`project` **(** :ref:`Vector3` b **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`reflect` **(** :ref:`Vector3` n **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`round` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`sign` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`signed_angle_to` **(** :ref:`Vector3` to, :ref:`Vector3` axis **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`slerp` **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`slide` **(** :ref:`Vector3` n **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`snapped` **(** :ref:`Vector3` step **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Basis` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`float` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`int` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator +` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator -` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator /` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator /` **(** :ref:`float` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator /` **(** :ref:`int` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector3` right **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator unary+` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator unary-` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Basis` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Quaternion` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`float` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`int` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator +` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator -` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator /` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator /` **(** :ref:`float` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator /` **(** :ref:`int` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector3` right **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator unary+` **(** **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator unary-` **(** **)** | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Vector3_constant_AXIS_X: +.. rst-class:: classref-constant + +**AXIS_X** = ``0`` + +Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector3_constant_AXIS_Y: +.. rst-class:: classref-constant + +**AXIS_Y** = ``1`` + +Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector3_constant_AXIS_Z: +.. rst-class:: classref-constant + +**AXIS_Z** = ``2`` + +Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector3_constant_ZERO: +.. rst-class:: classref-constant + +**ZERO** = ``Vector3(0, 0, 0)`` + +Zero vector, a vector with all components set to ``0``. + .. _class_Vector3_constant_ONE: +.. rst-class:: classref-constant + +**ONE** = ``Vector3(1, 1, 1)`` + +One vector, a vector with all components set to ``1``. + .. _class_Vector3_constant_INF: +.. rst-class:: classref-constant + +**INF** = ``Vector3(inf, inf, inf)`` + +Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. + .. _class_Vector3_constant_LEFT: +.. rst-class:: classref-constant + +**LEFT** = ``Vector3(-1, 0, 0)`` + +Left unit vector. Represents the local direction of left, and the global direction of west. + .. _class_Vector3_constant_RIGHT: +.. rst-class:: classref-constant + +**RIGHT** = ``Vector3(1, 0, 0)`` + +Right unit vector. Represents the local direction of right, and the global direction of east. + .. _class_Vector3_constant_UP: +.. rst-class:: classref-constant + +**UP** = ``Vector3(0, 1, 0)`` + +Up unit vector. + .. _class_Vector3_constant_DOWN: +.. rst-class:: classref-constant + +**DOWN** = ``Vector3(0, -1, 0)`` + +Down unit vector. + .. _class_Vector3_constant_FORWARD: +.. rst-class:: classref-constant + +**FORWARD** = ``Vector3(0, 0, -1)`` + +Forward unit vector. Represents the local direction of forward, and the global direction of north. + .. _class_Vector3_constant_BACK: -- **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-constant -- **AXIS_Y** = **1** --- Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +**BACK** = ``Vector3(0, 0, 1)`` -- **AXIS_Z** = **2** --- Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Back unit vector. Represents the local direction of back, and the global direction of south. -- **ZERO** = **Vector3(0, 0, 0)** --- Zero vector, a vector with all components set to ``0``. +.. rst-class:: classref-section-separator -- **ONE** = **Vector3(1, 1, 1)** --- One vector, a vector with all components set to ``1``. +---- -- **INF** = **Vector3(inf, inf, inf)** --- Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. - -- **LEFT** = **Vector3(-1, 0, 0)** --- Left unit vector. Represents the local direction of left, and the global direction of west. - -- **RIGHT** = **Vector3(1, 0, 0)** --- Right unit vector. Represents the local direction of right, and the global direction of east. - -- **UP** = **Vector3(0, 1, 0)** --- Up unit vector. - -- **DOWN** = **Vector3(0, -1, 0)** --- Down unit vector. - -- **FORWARD** = **Vector3(0, 0, -1)** --- Forward unit vector. Represents the local direction of forward, and the global direction of north. - -- **BACK** = **Vector3(0, 0, 1)** --- Back unit vector. Represents the local direction of back, and the global direction of south. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Vector3_property_x: -- :ref:`float` **x** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **x** = ``0.0`` The vector's X component. Also accessible by using the index position ``[0]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_property_y: -- :ref:`float` **y** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **y** = ``0.0`` The vector's Y component. Also accessible by using the index position ``[1]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_property_z: -- :ref:`float` **z** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **z** = ``0.0`` The vector's Z component. Also accessible by using the index position ``[2]``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Vector3_constructor_Vector3: -- :ref:`Vector3` **Vector3** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Vector3`` with all components set to ``0``. +:ref:`Vector3` **Vector3** **(** **)** + +Constructs a default-initialized **Vector3** with all components set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3` **Vector3** **(** :ref:`Vector3` from **)** +.. rst-class:: classref-constructor -Constructs a ``Vector3`` as a copy of the given ``Vector3``. +:ref:`Vector3` **Vector3** **(** :ref:`Vector3` from **)** + +Constructs a **Vector3** as a copy of the given **Vector3**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3` **Vector3** **(** :ref:`Vector3i` from **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector3`` from :ref:`Vector3i`. +:ref:`Vector3` **Vector3** **(** :ref:`Vector3i` from **)** + +Constructs a new **Vector3** from :ref:`Vector3i`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3` **Vector3** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** +.. rst-class:: classref-constructor -Returns a ``Vector3`` with the given components. +:ref:`Vector3` **Vector3** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** + +Returns a **Vector3** with the given components. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Vector3_method_abs: -- :ref:`Vector3` **abs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **abs** **(** **)** |const| Returns a new vector with all components in absolute values (i.e. positive). +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_angle_to: -- :ref:`float` **angle_to** **(** :ref:`Vector3` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **angle_to** **(** :ref:`Vector3` to **)** |const| Returns the unsigned minimum angle to the given vector, in radians. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_method_bezier_derivative: + +.. rst-class:: classref-method + +:ref:`Vector3` **bezier_derivative** **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| + +Returns the derivative at the given ``t`` on the `Bézier curve `__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. + +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_bezier_interpolate: -- :ref:`Vector3` **bezier_interpolate** **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| +.. rst-class:: classref-method -Returns the point at the given ``t`` on the `Bezier curve `__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. +:ref:`Vector3` **bezier_interpolate** **(** :ref:`Vector3` control_1, :ref:`Vector3` control_2, :ref:`Vector3` end, :ref:`float` t **)** |const| + +Returns the point at the given ``t`` on the `Bézier curve `__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_method_bounce: -- :ref:`Vector3` **bounce** **(** :ref:`Vector3` n **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **bounce** **(** :ref:`Vector3` n **)** |const| Returns the vector "bounced off" from a plane defined by the given normal. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_ceil: -- :ref:`Vector3` **ceil** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **ceil** **(** **)** |const| Returns a new vector with all components rounded up (towards positive infinity). +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_clamp: -- :ref:`Vector3` **clamp** **(** :ref:`Vector3` min, :ref:`Vector3` max **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **clamp** **(** :ref:`Vector3` min, :ref:`Vector3` max **)** |const| Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_cross: -- :ref:`Vector3` **cross** **(** :ref:`Vector3` with **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **cross** **(** :ref:`Vector3` with **)** |const| Returns the cross product of this vector and ``with``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_cubic_interpolate: -- :ref:`Vector3` **cubic_interpolate** **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **cubic_interpolate** **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_cubic_interpolate_in_time: -- :ref:`Vector3` **cubic_interpolate_in_time** **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **cubic_interpolate_in_time** **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_direction_to: -- :ref:`Vector3` **direction_to** **(** :ref:`Vector3` to **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **direction_to** **(** :ref:`Vector3` to **)** |const| Returns the normalized vector pointing from this vector to ``to``. This is equivalent to using ``(b - a).normalized()``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_distance_squared_to: -- :ref:`float` **distance_squared_to** **(** :ref:`Vector3` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_squared_to** **(** :ref:`Vector3` to **)** |const| Returns the squared distance between this vector and ``to``. This method runs faster than :ref:`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_Vector3_method_distance_to: -- :ref:`float` **distance_to** **(** :ref:`Vector3` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_to** **(** :ref:`Vector3` to **)** |const| Returns the distance between this vector and ``to``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_dot: -- :ref:`float` **dot** **(** :ref:`Vector3` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **dot** **(** :ref:`Vector3` with **)** |const| 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. @@ -422,406 +596,616 @@ When using unit (normalized) vectors, the result will always be between ``-1.0`` \ **Note:** ``a.dot(b)`` is equivalent to ``b.dot(a)``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_floor: -- :ref:`Vector3` **floor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **floor** **(** **)** |const| Returns a new vector with all components rounded down (towards negative infinity). +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_inverse: -- :ref:`Vector3` **inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **inverse** **(** **)** |const| Returns the inverse of the vector. This is the same as ``Vector3(1.0 / v.x, 1.0 / v.y, 1.0 / v.z)``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Vector3` to **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Vector3` to **)** |const| Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_is_normalized: -- :ref:`bool` **is_normalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_normalized** **(** **)** |const| Returns ``true`` if the vector is :ref:`normalized`, ``false`` otherwise. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_is_zero_approx: -- :ref:`bool` **is_zero_approx** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_zero_approx** **(** **)** |const| Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx` on each component. This method is faster than using :ref:`is_equal_approx` with one value as a zero vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_length: -- :ref:`float` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length** **(** **)** |const| Returns the length (magnitude) of this vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_length_squared: -- :ref:`float` **length_squared** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length_squared** **(** **)** |const| Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_lerp: -- :ref:`Vector3` **lerp** **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **lerp** **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_limit_length: -- :ref:`Vector3` **limit_length** **(** :ref:`float` length=1.0 **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **limit_length** **(** :ref:`float` length=1.0 **)** |const| Returns the vector with a maximum length by limiting its length to ``length``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_max_axis_index: -- :ref:`int` **max_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **max_axis_index** **(** **)** |const| Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_min_axis_index: -- :ref:`int` **min_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **min_axis_index** **(** **)** |const| Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Z`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_move_toward: -- :ref:`Vector3` **move_toward** **(** :ref:`Vector3` to, :ref:`float` delta **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **move_toward** **(** :ref:`Vector3` to, :ref:`float` delta **)** |const| Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not go past the final value. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_normalized: -- :ref:`Vector3` **normalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **normalized** **(** **)** |const| Returns the vector scaled to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_octahedron_decode: -- :ref:`Vector3` **octahedron_decode** **(** :ref:`Vector2` uv **)** |static| +.. rst-class:: classref-method -Returns the ``Vector3`` from an octahedral-compressed form created using :ref:`octahedron_encode` (stored as a :ref:`Vector2`). +:ref:`Vector3` **octahedron_decode** **(** :ref:`Vector2` uv **)** |static| + +Returns the **Vector3** from an octahedral-compressed form created using :ref:`octahedron_encode` (stored as a :ref:`Vector2`). + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_method_octahedron_encode: -- :ref:`Vector2` **octahedron_encode** **(** **)** |const| +.. rst-class:: classref-method -Returns the octahedral-encoded (oct32) form of this ``Vector3`` as a :ref:`Vector2`. Since a :ref:`Vector2` occupies 1/3 less memory compared to ``Vector3``, this form of compression can be used to pass greater amounts of :ref:`normalized` ``Vector3``\ s without increasing storage or memory requirements. See also :ref:`octahedron_decode`. +:ref:`Vector2` **octahedron_encode** **(** **)** |const| -\ **Note:** :ref:`octahedron_encode` can only be used for :ref:`normalized` vectors. :ref:`octahedron_encode` does *not* check whether this ``Vector3`` is normalized, and will return a value that does not decompress to the original value if the ``Vector3`` is not normalized. +Returns the octahedral-encoded (oct32) form of this **Vector3** as a :ref:`Vector2`. Since a :ref:`Vector2` occupies 1/3 less memory compared to **Vector3**, this form of compression can be used to pass greater amounts of :ref:`normalized` **Vector3**\ s without increasing storage or memory requirements. See also :ref:`octahedron_decode`. + +\ **Note:** :ref:`octahedron_encode` can only be used for :ref:`normalized` vectors. :ref:`octahedron_encode` does *not* check whether this **Vector3** is normalized, and will return a value that does not decompress to the original value if the **Vector3** is not normalized. \ **Note:** Octahedral compression is *lossy*, although visual differences are rarely perceptible in real world scenarios. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_outer: -- :ref:`Basis` **outer** **(** :ref:`Vector3` with **)** |const| +.. rst-class:: classref-method + +:ref:`Basis` **outer** **(** :ref:`Vector3` with **)** |const| Returns the outer product with ``with``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_posmod: -- :ref:`Vector3` **posmod** **(** :ref:`float` mod **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **posmod** **(** :ref:`float` mod **)** |const| Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_posmodv: -- :ref:`Vector3` **posmodv** **(** :ref:`Vector3` modv **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **posmodv** **(** :ref:`Vector3` modv **)** |const| Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_project: -- :ref:`Vector3` **project** **(** :ref:`Vector3` b **)** |const| +.. rst-class:: classref-method -Returns this vector projected onto the vector ``b``. +:ref:`Vector3` **project** **(** :ref:`Vector3` b **)** |const| + +Returns the result of projecting the vector onto the given vector ``b``. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_method_reflect: -- :ref:`Vector3` **reflect** **(** :ref:`Vector3` n **)** |const| +.. rst-class:: classref-method -Returns this vector reflected from a plane defined by the given normal. +:ref:`Vector3` **reflect** **(** :ref:`Vector3` n **)** |const| + +Returns the result of reflecting the vector from a plane defined by the given normal ``n``. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_method_rotated: -- :ref:`Vector3` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| +.. rst-class:: classref-method -Rotates this vector around a given axis by ``angle`` (in radians). The axis must be a normalized vector. +:ref:`Vector3` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| + +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`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_method_round: -- :ref:`Vector3` **round** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **round** **(** **)** |const| Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_sign: -- :ref:`Vector3` **sign** **(** **)** |const| +.. rst-class:: classref-method -Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling :ref:`@GlobalScope.sign` on each component. +:ref:`Vector3` **sign** **(** **)** |const| + +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` on each component. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_method_signed_angle_to: -- :ref:`float` **signed_angle_to** **(** :ref:`Vector3` to, :ref:`Vector3` axis **)** |const| +.. rst-class:: classref-method + +:ref:`float` **signed_angle_to** **(** :ref:`Vector3` to, :ref:`Vector3` axis **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_slerp: -- :ref:`Vector3` **slerp** **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **slerp** **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| 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. This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like :ref:`lerp`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_method_slide: -- :ref:`Vector3` **slide** **(** :ref:`Vector3` n **)** |const| +.. rst-class:: classref-method -Returns this vector slid along a plane defined by the given normal. +:ref:`Vector3` **slide** **(** :ref:`Vector3` n **)** |const| + +Returns a new vector slid along a plane defined by the given normal. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_method_snapped: -- :ref:`Vector3` **snapped** **(** :ref:`Vector3` step **)** |const| +.. rst-class:: classref-method -Returns this vector with each component snapped to the nearest multiple of ``step``. This can also be used to round to an arbitrary number of decimals. +:ref:`Vector3` **snapped** **(** :ref:`Vector3` step **)** |const| + +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-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Vector3_operator_neq_bool: +.. _class_Vector3_operator_neq_Vector3: -- :ref:`bool` **operator !=** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Vector3` right **)** Returns ``true`` if the vectors are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_operator_mul_Basis: + +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Basis` right **)** + +Inversely transforms (multiplies) the **Vector3** by the given :ref:`Basis` matrix. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_operator_mul_Quaternion: + +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Quaternion` right **)** + +Inversely transforms (multiplies) the **Vector3** by the given :ref:`Quaternion`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_operator_mul_Transform3D: + +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`Transform3D` right **)** + +Inversely transforms (multiplies) the **Vector3** by the given :ref:`Transform3D` transformation matrix. + +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_operator_mul_Vector3: -- :ref:`Vector3` **operator *** **(** :ref:`Basis` right **)** +.. rst-class:: classref-operator -Inversely transforms (multiplies) the ``Vector3`` by the given :ref:`Basis` matrix. +:ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** ----- - -- :ref:`Vector3` **operator *** **(** :ref:`Quaternion` right **)** - -Inversely transforms (multiplies) the ``Vector3`` by the given :ref:`Quaternion`. - ----- - -- :ref:`Vector3` **operator *** **(** :ref:`Transform3D` right **)** - -Inversely transforms (multiplies) the ``Vector3`` by the given :ref:`Transform3D` transformation matrix. - ----- - -- :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** - -Multiplies each component of the ``Vector3`` by the components of the given ``Vector3``. +Multiplies each component of the **Vector3** by the components of the given **Vector3**. :: print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)" ----- - -- :ref:`Vector3` **operator *** **(** :ref:`float` right **)** - -Multiplies each component of the ``Vector3`` by the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3` **operator *** **(** :ref:`int` right **)** +.. _class_Vector3_operator_mul_float: -Multiplies each component of the ``Vector3`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`float` right **)** + +Multiplies each component of the **Vector3** by the given :ref:`float`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_operator_mul_int: + +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`int` right **)** + +Multiplies each component of the **Vector3** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3_operator_sum_Vector3: -- :ref:`Vector3` **operator +** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator -Adds each component of the ``Vector3`` by the components of the given ``Vector3``. +:ref:`Vector3` **operator +** **(** :ref:`Vector3` right **)** + +Adds each component of the **Vector3** by the components of the given **Vector3**. :: print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints "(13, 24, 35)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_operator_dif_Vector3: -- :ref:`Vector3` **operator -** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator -Subtracts each component of the ``Vector3`` by the components of the given ``Vector3``. +:ref:`Vector3` **operator -** **(** :ref:`Vector3` right **)** + +Subtracts each component of the **Vector3** by the components of the given **Vector3**. :: print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints "(7, 16, 25)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector3_operator_div_Vector3: -- :ref:`Vector3` **operator /** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator -Divides each component of the ``Vector3`` by the components of the given ``Vector3``. +:ref:`Vector3` **operator /** **(** :ref:`Vector3` right **)** + +Divides each component of the **Vector3** by the components of the given **Vector3**. :: print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) # Prints "(5, 4, 10)" ----- - -- :ref:`Vector3` **operator /** **(** :ref:`float` right **)** - -Divides each component of the ``Vector3`` by the given :ref:`float`. +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3` **operator /** **(** :ref:`int` right **)** +.. _class_Vector3_operator_div_float: -Divides each component of the ``Vector3`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator /** **(** :ref:`float` right **)** + +Divides each component of the **Vector3** by the given :ref:`float`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector3_operator_lt_bool: +.. _class_Vector3_operator_div_int: -- :ref:`bool` **operator <** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator -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. +:ref:`Vector3` **operator /** **(** :ref:`int` right **)** + +Divides each component of the **Vector3** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector3_operator_lte_bool: +.. _class_Vector3_operator_lt_Vector3: -- :ref:`bool` **operator <=** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator <** **(** :ref:`Vector3` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector3_operator_eq_bool: +.. _class_Vector3_operator_lte_Vector3: -- :ref:`bool` **operator ==** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`Vector3` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_operator_eq_Vector3: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Vector3` right **)** Returns ``true`` if the vectors are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. ----- - -.. _class_Vector3_operator_gt_bool: - -- :ref:`bool` **operator >** **(** :ref:`Vector3` right **)** - -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. +.. rst-class:: classref-item-separator ---- -.. _class_Vector3_operator_gte_bool: +.. _class_Vector3_operator_gt_Vector3: -- :ref:`bool` **operator >=** **(** :ref:`Vector3` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator >** **(** :ref:`Vector3` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector3_operator_idx_float: +.. _class_Vector3_operator_gte_Vector3: -- :ref:`float` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`Vector3` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_operator_idx_int: + +.. rst-class:: classref-operator + +:ref:`float` **operator []** **(** :ref:`int` index **)** 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``. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector3_operator_unplus_Vector3: +.. _class_Vector3_operator_unplus: -- :ref:`Vector3` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Vector3` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector3_operator_unminus_Vector3: +.. _class_Vector3_operator_unminus: -- :ref:`Vector3` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Vector3` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index 4a1a7019e..15bb14d65 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -12,15 +12,19 @@ Vector3i Vector used for 3D math using integer coordinates. +.. rst-class:: classref-introduction-group + Description ----------- 3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. -It uses integer coordinates and is therefore preferable to :ref:`Vector3` when exact precision is required. +It uses integer coordinates and is therefore preferable to :ref:`Vector3` when exact precision is required. Note that the values are limited to 32 bits, and unlike :ref:`Vector3` this cannot be configured with an engine build option. Use :ref:`int` or :ref:`PackedInt64Array` if 64-bit values are needed. \ **Note:** In a boolean context, a Vector3i will evaluate to ``false`` if it's equal to ``Vector3i(0, 0, 0)``. Otherwise, a Vector3i will always evaluate to ``true``. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -30,436 +34,666 @@ Tutorials - `3Blue1Brown Essence of Linear Algebra `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`x` | ``0`` | -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`y` | ``0`` | -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`z` | ``0`` | -+-----------------------+-------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`x` | ``0`` | + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`y` | ``0`` | + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`z` | ``0`` | + +-----------------------+-------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`Vector3i` **(** **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`Vector3i` **(** :ref:`Vector3i` from **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`Vector3i` **(** :ref:`Vector3` from **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`Vector3i` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** | -+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`Vector3i` **(** **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`Vector3i` **(** :ref:`Vector3i` from **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`Vector3i` **(** :ref:`Vector3` from **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`Vector3i` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`abs` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`clamp` **(** :ref:`Vector3i` min, :ref:`Vector3i` max **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`length_squared` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`sign` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`abs` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`clamp` **(** :ref:`Vector3i` min, :ref:`Vector3i` max **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`length_squared` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`sign` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`snapped` **(** :ref:`Vector3i` step **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator %` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator %` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator *` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator *` **(** :ref:`float` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator *` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator +` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator -` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator /` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`operator /` **(** :ref:`float` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator /` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector3i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator unary+` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3i` | :ref:`operator unary-` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator %` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator %` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator *` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *` **(** :ref:`float` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator *` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator +` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator -` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator /` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator /` **(** :ref:`float` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator /` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector3i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator unary+` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`operator unary-` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Vector3i_constant_AXIS_X: +.. rst-class:: classref-constant + +**AXIS_X** = ``0`` + +Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector3i_constant_AXIS_Y: +.. rst-class:: classref-constant + +**AXIS_Y** = ``1`` + +Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector3i_constant_AXIS_Z: +.. rst-class:: classref-constant + +**AXIS_Z** = ``2`` + +Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector3i_constant_ZERO: +.. rst-class:: classref-constant + +**ZERO** = ``Vector3i(0, 0, 0)`` + +Zero vector, a vector with all components set to ``0``. + .. _class_Vector3i_constant_ONE: +.. rst-class:: classref-constant + +**ONE** = ``Vector3i(1, 1, 1)`` + +One vector, a vector with all components set to ``1``. + .. _class_Vector3i_constant_LEFT: +.. rst-class:: classref-constant + +**LEFT** = ``Vector3i(-1, 0, 0)`` + +Left unit vector. Represents the local direction of left, and the global direction of west. + .. _class_Vector3i_constant_RIGHT: +.. rst-class:: classref-constant + +**RIGHT** = ``Vector3i(1, 0, 0)`` + +Right unit vector. Represents the local direction of right, and the global direction of east. + .. _class_Vector3i_constant_UP: +.. rst-class:: classref-constant + +**UP** = ``Vector3i(0, 1, 0)`` + +Up unit vector. + .. _class_Vector3i_constant_DOWN: +.. rst-class:: classref-constant + +**DOWN** = ``Vector3i(0, -1, 0)`` + +Down unit vector. + .. _class_Vector3i_constant_FORWARD: +.. rst-class:: classref-constant + +**FORWARD** = ``Vector3i(0, 0, -1)`` + +Forward unit vector. Represents the local direction of forward, and the global direction of north. + .. _class_Vector3i_constant_BACK: -- **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-constant -- **AXIS_Y** = **1** --- Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +**BACK** = ``Vector3i(0, 0, 1)`` -- **AXIS_Z** = **2** --- Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Back unit vector. Represents the local direction of back, and the global direction of south. -- **ZERO** = **Vector3i(0, 0, 0)** --- Zero vector, a vector with all components set to ``0``. +.. rst-class:: classref-section-separator -- **ONE** = **Vector3i(1, 1, 1)** --- One vector, a vector with all components set to ``1``. +---- -- **LEFT** = **Vector3i(-1, 0, 0)** --- Left unit vector. Represents the local direction of left, and the global direction of west. - -- **RIGHT** = **Vector3i(1, 0, 0)** --- Right unit vector. Represents the local direction of right, and the global direction of east. - -- **UP** = **Vector3i(0, 1, 0)** --- Up unit vector. - -- **DOWN** = **Vector3i(0, -1, 0)** --- Down unit vector. - -- **FORWARD** = **Vector3i(0, 0, -1)** --- Forward unit vector. Represents the local direction of forward, and the global direction of north. - -- **BACK** = **Vector3i(0, 0, 1)** --- Back unit vector. Represents the local direction of back, and the global direction of south. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Vector3i_property_x: -- :ref:`int` **x** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **x** = ``0`` The vector's X component. Also accessible by using the index position ``[0]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_property_y: -- :ref:`int` **y** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **y** = ``0`` The vector's Y component. Also accessible by using the index position ``[1]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_property_z: -- :ref:`int` **z** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **z** = ``0`` The vector's Z component. Also accessible by using the index position ``[2]``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Vector3i_constructor_Vector3i: -- :ref:`Vector3i` **Vector3i** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Vector3i`` with all components set to ``0``. +:ref:`Vector3i` **Vector3i** **(** **)** + +Constructs a default-initialized **Vector3i** with all components set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3i` **Vector3i** **(** :ref:`Vector3i` from **)** +.. rst-class:: classref-constructor -Constructs a ``Vector3i`` as a copy of the given ``Vector3i``. +:ref:`Vector3i` **Vector3i** **(** :ref:`Vector3i` from **)** + +Constructs a **Vector3i** as a copy of the given **Vector3i**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3i` **Vector3i** **(** :ref:`Vector3` from **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector3i`` from :ref:`Vector3`. The floating point coordinates will be truncated. +:ref:`Vector3i` **Vector3i** **(** :ref:`Vector3` from **)** + +Constructs a new **Vector3i** from :ref:`Vector3`. The floating point coordinates will be truncated. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector3i` **Vector3i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** +.. rst-class:: classref-constructor -Returns a ``Vector3i`` with the given components. +:ref:`Vector3i` **Vector3i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** + +Returns a **Vector3i** with the given components. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Vector3i_method_abs: -- :ref:`Vector3i` **abs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3i` **abs** **(** **)** |const| Returns a new vector with all components in absolute values (i.e. positive). +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_method_clamp: -- :ref:`Vector3i` **clamp** **(** :ref:`Vector3i` min, :ref:`Vector3i` max **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3i` **clamp** **(** :ref:`Vector3i` min, :ref:`Vector3i` max **)** |const| Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_method_length: -- :ref:`float` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length** **(** **)** |const| Returns the length (magnitude) of this vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_method_length_squared: -- :ref:`int` **length_squared** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **length_squared** **(** **)** |const| Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`, 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_max_axis_index: -- :ref:`int` **max_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **max_axis_index** **(** **)** |const| Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_method_min_axis_index: -- :ref:`int` **min_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **min_axis_index** **(** **)** |const| Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Z`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_method_sign: -- :ref:`Vector3i` **sign** **(** **)** |const| +.. rst-class:: classref-method -Returns the vector with each component set to one or negative one, depending on the signs of the components. +:ref:`Vector3i` **sign** **(** **)** |const| + +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` on each component. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3i_method_snapped: + +.. rst-class:: classref-method + +:ref:`Vector3i` **snapped** **(** :ref:`Vector3i` step **)** |const| + +Returns a new vector with each component snapped to the closest multiple of the corresponding component in ``step``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Vector3i_operator_neq_bool: +.. _class_Vector3i_operator_neq_Vector3i: -- :ref:`bool` **operator !=** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Vector3i` right **)** Returns ``true`` if the vectors are not equal. +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_operator_mod_Vector3i: -- :ref:`Vector3i` **operator %** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -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` instead if you want to handle negative numbers. +:ref:`Vector3i` **operator %** **(** :ref:`Vector3i` right **)** + +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` instead if you want to handle negative numbers. :: print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) # Prints "(3, -4, 3)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector3i` **operator %** **(** :ref:`int` right **)** +.. _class_Vector3i_operator_mod_int: -Gets the remainder of each component of the ``Vector3i`` with the the given :ref:`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` instead if you want to handle negative numbers. +.. rst-class:: classref-operator + +:ref:`Vector3i` **operator %** **(** :ref:`int` right **)** + +Gets the remainder of each component of the **Vector3i** with the the given :ref:`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` instead if you want to handle negative numbers. :: print(Vector3i(10, -20, 30) % 7) # Prints "(3, -6, 2)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_operator_mul_Vector3i: -- :ref:`Vector3i` **operator *** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -Multiplies each component of the ``Vector3i`` by the components of the given ``Vector3i``. +:ref:`Vector3i` **operator *** **(** :ref:`Vector3i` right **)** + +Multiplies each component of the **Vector3i** by the components of the given **Vector3i**. :: print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) # Prints "(30, 80, 150)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector3` **operator *** **(** :ref:`float` right **)** +.. _class_Vector3i_operator_mul_float: -Multiplies each component of the ``Vector3i`` by the given :ref:`float`. Returns a :ref:`Vector3`. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator *** **(** :ref:`float` right **)** + +Multiplies each component of the **Vector3i** by the given :ref:`float`. Returns a :ref:`Vector3`. :: print(Vector3i(10, 15, 20) * 0.9) # Prints "(9, 13.5, 18)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector3i` **operator *** **(** :ref:`int` right **)** +.. _class_Vector3i_operator_mul_int: -Multiplies each component of the ``Vector3i`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector3i` **operator *** **(** :ref:`int` right **)** + +Multiplies each component of the **Vector3i** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3i_operator_sum_Vector3i: -- :ref:`Vector3i` **operator +** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -Adds each component of the ``Vector3i`` by the components of the given ``Vector3i``. +:ref:`Vector3i` **operator +** **(** :ref:`Vector3i` right **)** + +Adds each component of the **Vector3i** by the components of the given **Vector3i**. :: print(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) # Prints "(13, 24, 35)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_operator_dif_Vector3i: -- :ref:`Vector3i` **operator -** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -Subtracts each component of the ``Vector3i`` by the components of the given ``Vector3i``. +:ref:`Vector3i` **operator -** **(** :ref:`Vector3i` right **)** + +Subtracts each component of the **Vector3i** by the components of the given **Vector3i**. :: print(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) # Prints "(7, 16, 25)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector3i_operator_div_Vector3i: -- :ref:`Vector3i` **operator /** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -Divides each component of the ``Vector3i`` by the components of the given ``Vector3i``. +:ref:`Vector3i` **operator /** **(** :ref:`Vector3i` right **)** + +Divides each component of the **Vector3i** by the components of the given **Vector3i**. :: print(Vector3i(10, 20, 30) / Vector3i(2, 5, 3)) # Prints "(5, 4, 10)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector3` **operator /** **(** :ref:`float` right **)** +.. _class_Vector3i_operator_div_float: -Divides each component of the ``Vector3i`` by the given :ref:`float`. Returns a :ref:`Vector3`. +.. rst-class:: classref-operator + +:ref:`Vector3` **operator /** **(** :ref:`float` right **)** + +Divides each component of the **Vector3i** by the given :ref:`float`. Returns a :ref:`Vector3`. :: print(Vector3i(10, 20, 30) / 2.9) # Prints "(5, 10, 15)" ----- - -- :ref:`Vector3i` **operator /** **(** :ref:`int` right **)** - -Divides each component of the ``Vector3i`` by the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_Vector3i_operator_lt_bool: +.. _class_Vector3i_operator_div_int: -- :ref:`bool` **operator <** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -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. +:ref:`Vector3i` **operator /** **(** :ref:`int` right **)** + +Divides each component of the **Vector3i** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector3i_operator_lte_bool: +.. _class_Vector3i_operator_lt_Vector3i: -- :ref:`bool` **operator <=** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator <** **(** :ref:`Vector3i` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector3i_operator_eq_bool: +.. _class_Vector3i_operator_lte_Vector3i: -- :ref:`bool` **operator ==** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`Vector3i` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3i_operator_eq_Vector3i: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Vector3i` right **)** Returns ``true`` if the vectors are equal. ----- - -.. _class_Vector3i_operator_gt_bool: - -- :ref:`bool` **operator >** **(** :ref:`Vector3i` right **)** - -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. +.. rst-class:: classref-item-separator ---- -.. _class_Vector3i_operator_gte_bool: +.. _class_Vector3i_operator_gt_Vector3i: -- :ref:`bool` **operator >=** **(** :ref:`Vector3i` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator >** **(** :ref:`Vector3i` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3i_operator_gte_Vector3i: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`Vector3i` right **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Vector3i_operator_idx_int: -- :ref:`int` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`int` **operator []** **(** :ref:`int` index **)** 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``. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector3i_operator_unplus_Vector3i: +.. _class_Vector3i_operator_unplus: -- :ref:`Vector3i` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Vector3i` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector3i_operator_unminus_Vector3i: +.. _class_Vector3i_operator_unminus: -- :ref:`Vector3i` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Vector3i` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index 14f4004aa..a8338e966 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -12,623 +12,899 @@ Vector4 Vector used for 4D math using floating point coordinates. +.. rst-class:: classref-introduction-group + Description ----------- 4-element structure that can be used to represent any quadruplet of numeric values. -It uses floating-point coordinates. See :ref:`Vector4i` for its integer counterpart. +It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike :ref:`float` which is always 64-bit. If double precision is needed, compile the engine with the option ``float=64``. + +See :ref:`Vector4i` for its integer counterpart. \ **Note:** In a boolean context, a Vector4 will evaluate to ``false`` if it's equal to ``Vector4(0, 0, 0, 0)``. Otherwise, a Vector4 will always evaluate to ``true``. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`w` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`x` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`y` | ``0.0`` | -+---------------------------+------------------------------------+---------+ -| :ref:`float` | :ref:`z` | ``0.0`` | -+---------------------------+------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`w` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`x` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`y` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + | :ref:`float` | :ref:`z` | ``0.0`` | + +---------------------------+------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`Vector4` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`Vector4` **(** :ref:`Vector4` from **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`Vector4` **(** :ref:`Vector4i` from **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`Vector4` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`Vector4` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`Vector4` **(** :ref:`Vector4` from **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`Vector4` **(** :ref:`Vector4i` from **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`Vector4` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`abs` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`ceil` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`clamp` **(** :ref:`Vector4` min, :ref:`Vector4` max **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`cubic_interpolate` **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`direction_to` **(** :ref:`Vector4` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector4` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector4` to **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dot` **(** :ref:`Vector4` with **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`floor` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`inverse` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` with **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finite` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_zero_approx` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length_squared` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`lerp` **(** :ref:`Vector4` to, :ref:`float` weight **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`normalized` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`posmodv` **(** :ref:`Vector4` modv **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`round` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`sign` **(** **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`snapped` **(** :ref:`Vector4` step **)** |const| | -+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`abs` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`ceil` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`clamp` **(** :ref:`Vector4` min, :ref:`Vector4` max **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`cubic_interpolate` **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`cubic_interpolate_in_time` **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`direction_to` **(** :ref:`Vector4` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector4` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to` **(** :ref:`Vector4` to **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot` **(** :ref:`Vector4` with **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`floor` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`inverse` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` with **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`lerp` **(** :ref:`Vector4` to, :ref:`float` weight **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`normalized` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`posmod` **(** :ref:`float` mod **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`posmodv` **(** :ref:`Vector4` modv **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`round` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`sign` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`snapped` **(** :ref:`Vector4` step **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`Projection` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`float` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`int` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator +` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator -` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator /` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator /` **(** :ref:`float` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator /` **(** :ref:`int` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector4` right **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator unary+` **(** **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator unary-` **(** **)** | -+-------------------------------+-------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`Projection` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`float` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`int` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator +` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator -` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator /` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator /` **(** :ref:`float` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator /` **(** :ref:`int` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector4` right **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator unary+` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator unary-` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Vector4_constant_AXIS_X: +.. rst-class:: classref-constant + +**AXIS_X** = ``0`` + +Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4_constant_AXIS_Y: +.. rst-class:: classref-constant + +**AXIS_Y** = ``1`` + +Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4_constant_AXIS_Z: +.. rst-class:: classref-constant + +**AXIS_Z** = ``2`` + +Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4_constant_AXIS_W: +.. rst-class:: classref-constant + +**AXIS_W** = ``3`` + +Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4_constant_ZERO: +.. rst-class:: classref-constant + +**ZERO** = ``Vector4(0, 0, 0, 0)`` + +Zero vector, a vector with all components set to ``0``. + .. _class_Vector4_constant_ONE: +.. rst-class:: classref-constant + +**ONE** = ``Vector4(1, 1, 1, 1)`` + +One vector, a vector with all components set to ``1``. + .. _class_Vector4_constant_INF: -- **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-constant -- **AXIS_Y** = **1** --- Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +**INF** = ``Vector4(inf, inf, inf, inf)`` -- **AXIS_Z** = **2** --- Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. -- **AXIS_W** = **3** --- Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator -- **ZERO** = **Vector4(0, 0, 0, 0)** --- Zero vector, a vector with all components set to ``0``. +---- -- **ONE** = **Vector4(1, 1, 1, 1)** --- One vector, a vector with all components set to ``1``. - -- **INF** = **Vector4(inf, inf, inf, inf)** --- Infinity vector, a vector with all components set to :ref:`@GDScript.INF`. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Vector4_property_w: -- :ref:`float` **w** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **w** = ``0.0`` The vector's W component. Also accessible by using the index position ``[3]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_property_x: -- :ref:`float` **x** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **x** = ``0.0`` The vector's X component. Also accessible by using the index position ``[0]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_property_y: -- :ref:`float` **y** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **y** = ``0.0`` The vector's Y component. Also accessible by using the index position ``[1]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_property_z: -- :ref:`float` **z** +.. rst-class:: classref-property -+-----------+---------+ -| *Default* | ``0.0`` | -+-----------+---------+ +:ref:`float` **z** = ``0.0`` The vector's Z component. Also accessible by using the index position ``[2]``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Vector4_constructor_Vector4: -- :ref:`Vector4` **Vector4** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Vector4`` with all components set to ``0``. +:ref:`Vector4` **Vector4** **(** **)** + +Constructs a default-initialized **Vector4** with all components set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4` **Vector4** **(** :ref:`Vector4` from **)** +.. rst-class:: classref-constructor -Constructs a ``Vector4`` as a copy of the given ``Vector4``. +:ref:`Vector4` **Vector4** **(** :ref:`Vector4` from **)** + +Constructs a **Vector4** as a copy of the given **Vector4**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4` **Vector4** **(** :ref:`Vector4i` from **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector4`` from the given :ref:`Vector4i`. +:ref:`Vector4` **Vector4** **(** :ref:`Vector4i` from **)** + +Constructs a new **Vector4** from the given :ref:`Vector4i`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4` **Vector4** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** +.. rst-class:: classref-constructor -Returns a ``Vector4`` with the given components. +:ref:`Vector4` **Vector4** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** + +Returns a **Vector4** with the given components. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Vector4_method_abs: -- :ref:`Vector4` **abs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **abs** **(** **)** |const| Returns a new vector with all components in absolute values (i.e. positive). +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_ceil: -- :ref:`Vector4` **ceil** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **ceil** **(** **)** |const| Returns a new vector with all components rounded up (towards positive infinity). +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_clamp: -- :ref:`Vector4` **clamp** **(** :ref:`Vector4` min, :ref:`Vector4` max **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **clamp** **(** :ref:`Vector4` min, :ref:`Vector4` max **)** |const| Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_cubic_interpolate: -- :ref:`Vector4` **cubic_interpolate** **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **cubic_interpolate** **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_cubic_interpolate_in_time: -- :ref:`Vector4` **cubic_interpolate_in_time** **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **cubic_interpolate_in_time** **(** :ref:`Vector4` b, :ref:`Vector4` pre_a, :ref:`Vector4` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_direction_to: -- :ref:`Vector4` **direction_to** **(** :ref:`Vector4` to **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **direction_to** **(** :ref:`Vector4` to **)** |const| Returns the normalized vector pointing from this vector to ``to``. This is equivalent to using ``(b - a).normalized()``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_distance_squared_to: -- :ref:`float` **distance_squared_to** **(** :ref:`Vector4` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_squared_to** **(** :ref:`Vector4` to **)** |const| Returns the squared distance between this vector and ``to``. This method runs faster than :ref:`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_Vector4_method_distance_to: -- :ref:`float` **distance_to** **(** :ref:`Vector4` to **)** |const| +.. rst-class:: classref-method + +:ref:`float` **distance_to** **(** :ref:`Vector4` to **)** |const| Returns the distance between this vector and ``to``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_dot: -- :ref:`float` **dot** **(** :ref:`Vector4` with **)** |const| +.. rst-class:: classref-method + +:ref:`float` **dot** **(** :ref:`Vector4` with **)** |const| Returns the dot product of this vector and ``with``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_floor: -- :ref:`Vector4` **floor** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **floor** **(** **)** |const| Returns a new vector with all components rounded down (towards negative infinity). +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_inverse: -- :ref:`Vector4` **inverse** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **inverse** **(** **)** |const| 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)``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_is_equal_approx: -- :ref:`bool` **is_equal_approx** **(** :ref:`Vector4` with **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_equal_approx** **(** :ref:`Vector4` with **)** |const| Returns ``true`` if this vector and ``with`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_is_finite: -- :ref:`bool` **is_finite** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_finite** **(** **)** |const| Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_is_normalized: -- :ref:`bool` **is_normalized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_normalized** **(** **)** |const| Returns ``true`` if the vector is normalized, i.e. its length is equal to 1. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_is_zero_approx: -- :ref:`bool` **is_zero_approx** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_zero_approx** **(** **)** |const| Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx` on each component. This method is faster than using :ref:`is_equal_approx` with one value as a zero vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_length: -- :ref:`float` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length** **(** **)** |const| Returns the length (magnitude) of this vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_length_squared: -- :ref:`float` **length_squared** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length_squared** **(** **)** |const| Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_lerp: -- :ref:`Vector4` **lerp** **(** :ref:`Vector4` to, :ref:`float` weight **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **lerp** **(** :ref:`Vector4` to, :ref:`float` weight **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_max_axis_index: -- :ref:`int` **max_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **max_axis_index** **(** **)** |const| Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_min_axis_index: -- :ref:`int` **min_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **min_axis_index** **(** **)** |const| Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_W`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_normalized: -- :ref:`Vector4` **normalized** **(** **)** |const| +.. rst-class:: classref-method -Returns the vector scaled to unit length. Equivalent to ``v / v.length()``. +:ref:`Vector4` **normalized** **(** **)** |const| + +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. + +.. rst-class:: classref-item-separator ---- .. _class_Vector4_method_posmod: -- :ref:`Vector4` **posmod** **(** :ref:`float` mod **)** |const| +.. rst-class:: classref-method -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. +:ref:`Vector4` **posmod** **(** :ref:`float` mod **)** |const| + +Returns a new vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. + +.. rst-class:: classref-item-separator ---- .. _class_Vector4_method_posmodv: -- :ref:`Vector4` **posmodv** **(** :ref:`Vector4` modv **)** |const| +.. rst-class:: classref-method -Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. +:ref:`Vector4` **posmodv** **(** :ref:`Vector4` modv **)** |const| + +Returns a new vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. + +.. rst-class:: classref-item-separator ---- .. _class_Vector4_method_round: -- :ref:`Vector4` **round** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4` **round** **(** **)** |const| Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_method_sign: -- :ref:`Vector4` **sign** **(** **)** |const| +.. rst-class:: classref-method -Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling :ref:`@GlobalScope.sign` on each component. +:ref:`Vector4` **sign** **(** **)** |const| + +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` on each component. + +.. rst-class:: classref-item-separator ---- .. _class_Vector4_method_snapped: -- :ref:`Vector4` **snapped** **(** :ref:`Vector4` step **)** |const| +.. rst-class:: classref-method -Returns this vector with each component snapped to the nearest multiple of ``step``. This can also be used to round to an arbitrary number of decimals. +:ref:`Vector4` **snapped** **(** :ref:`Vector4` step **)** |const| + +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-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Vector4_operator_neq_bool: +.. _class_Vector4_operator_neq_Vector4: -- :ref:`bool` **operator !=** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Vector4` right **)** Returns ``true`` if the vectors are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4_operator_mul_Projection: + +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`Projection` right **)** + +Inversely transforms (multiplies) the **Vector4** by the given :ref:`Projection` matrix. + +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_operator_mul_Vector4: -- :ref:`Vector4` **operator *** **(** :ref:`Projection` right **)** +.. rst-class:: classref-operator -Inversely transforms (multiplies) the ``Vector4`` by the given :ref:`Projection` matrix. +:ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** ----- - -- :ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** - -Multiplies each component of the ``Vector4`` by the components of the given ``Vector4``. +Multiplies each component of the **Vector4** by the components of the given **Vector4**. :: print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector4` **operator *** **(** :ref:`float` right **)** +.. _class_Vector4_operator_mul_float: -Multiplies each component of the ``Vector4`` by the given :ref:`float`. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`float` right **)** + +Multiplies each component of the **Vector4** by the given :ref:`float`. :: print(Vector4(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector4` **operator *** **(** :ref:`int` right **)** +.. _class_Vector4_operator_mul_int: -Multiplies each component of the ``Vector4`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`int` right **)** + +Multiplies each component of the **Vector4** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector4_operator_sum_Vector4: -- :ref:`Vector4` **operator +** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator -Adds each component of the ``Vector4`` by the components of the given ``Vector4``. +:ref:`Vector4` **operator +** **(** :ref:`Vector4` right **)** + +Adds each component of the **Vector4** by the components of the given **Vector4**. :: print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_operator_dif_Vector4: -- :ref:`Vector4` **operator -** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator -Subtracts each component of the ``Vector4`` by the components of the given ``Vector4``. +:ref:`Vector4` **operator -** **(** :ref:`Vector4` right **)** + +Subtracts each component of the **Vector4** by the components of the given **Vector4**. :: print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector4_operator_div_Vector4: -- :ref:`Vector4` **operator /** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator -Divides each component of the ``Vector4`` by the components of the given ``Vector4``. +:ref:`Vector4` **operator /** **(** :ref:`Vector4` right **)** + +Divides each component of the **Vector4** by the components of the given **Vector4**. :: print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector4` **operator /** **(** :ref:`float` right **)** +.. _class_Vector4_operator_div_float: -Divides each component of the ``Vector4`` by the given :ref:`float`. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator /** **(** :ref:`float` right **)** + +Divides each component of the **Vector4** by the given :ref:`float`. :: print(Vector4(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)" ----- - -- :ref:`Vector4` **operator /** **(** :ref:`int` right **)** - -Divides each component of the ``Vector4`` by the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_Vector4_operator_lt_bool: +.. _class_Vector4_operator_div_int: -- :ref:`bool` **operator <** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator -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. +:ref:`Vector4` **operator /** **(** :ref:`int` right **)** + +Divides each component of the **Vector4** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector4_operator_lte_bool: +.. _class_Vector4_operator_lt_Vector4: -- :ref:`bool` **operator <=** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator <** **(** :ref:`Vector4` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector4_operator_eq_bool: +.. _class_Vector4_operator_lte_Vector4: -- :ref:`bool` **operator ==** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`Vector4` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4_operator_eq_Vector4: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Vector4` right **)** Returns ``true`` if the vectors are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. ----- - -.. _class_Vector4_operator_gt_bool: - -- :ref:`bool` **operator >** **(** :ref:`Vector4` right **)** - -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. +.. rst-class:: classref-item-separator ---- -.. _class_Vector4_operator_gte_bool: +.. _class_Vector4_operator_gt_Vector4: -- :ref:`bool` **operator >=** **(** :ref:`Vector4` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator >** **(** :ref:`Vector4` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector4_operator_idx_float: +.. _class_Vector4_operator_gte_Vector4: -- :ref:`float` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`Vector4` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4_operator_idx_int: + +.. rst-class:: classref-operator + +:ref:`float` **operator []** **(** :ref:`int` index **)** 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``. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector4_operator_unplus_Vector4: +.. _class_Vector4_operator_unplus: -- :ref:`Vector4` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Vector4` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector4_operator_unminus_Vector4: +.. _class_Vector4_operator_unminus: -- :ref:`Vector4` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Vector4` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index 265a20824..e21d5f01c 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -12,309 +12,459 @@ Vector4i Vector used for 4D math using integer coordinates. +.. rst-class:: classref-introduction-group + Description ----------- 4-element structure that can be used to represent 4D grid coordinates or sets of integers. -It uses integer coordinates. See :ref:`Vector4` for its floating-point counterpart. +It uses integer coordinates and is therefore preferable to :ref:`Vector4` when exact precision is required. Note that the values are limited to 32 bits, and unlike :ref:`Vector4` this cannot be configured with an engine build option. Use :ref:`int` or :ref:`PackedInt64Array` if 64-bit values are needed. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`w` | ``0`` | -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`x` | ``0`` | -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`y` | ``0`` | -+-----------------------+-------------------------------------+-------+ -| :ref:`int` | :ref:`z` | ``0`` | -+-----------------------+-------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`w` | ``0`` | + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`x` | ``0`` | + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`y` | ``0`` | + +-----------------------+-------------------------------------+-------+ + | :ref:`int` | :ref:`z` | ``0`` | + +-----------------------+-------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Constructors ------------ -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`Vector4i` **(** **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`Vector4i` **(** :ref:`Vector4i` from **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`Vector4i` **(** :ref:`Vector4` from **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`Vector4i` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` w **)** | -+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`Vector4i` **(** **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`Vector4i` **(** :ref:`Vector4i` from **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`Vector4i` **(** :ref:`Vector4` from **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`Vector4i` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` w **)** | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`abs` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`clamp` **(** :ref:`Vector4i` min, :ref:`Vector4i` max **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`length` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`length_squared` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`sign` **(** **)** |const| | -+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`abs` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`clamp` **(** :ref:`Vector4i` min, :ref:`Vector4i` max **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`length_squared` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`sign` **(** **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`snapped` **(** :ref:`Vector4i` step **)** |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Operators --------- -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator %` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator %` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator *` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator *` **(** :ref:`float` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator *` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator +` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator -` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator /` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4` | :ref:`operator /` **(** :ref:`float` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator /` **(** :ref:`int` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector4i` right **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator unary+` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`Vector4i` | :ref:`operator unary-` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator %` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator %` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator *` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator *` **(** :ref:`float` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator *` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator +` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator -` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator /` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`operator /` **(** :ref:`float` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator /` **(** :ref:`int` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=` **(** :ref:`Vector4i` right **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator unary+` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i` | :ref:`operator unary-` **(** **)** | + +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Vector4i_constant_AXIS_X: +.. rst-class:: classref-constant + +**AXIS_X** = ``0`` + +Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4i_constant_AXIS_Y: +.. rst-class:: classref-constant + +**AXIS_Y** = ``1`` + +Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4i_constant_AXIS_Z: +.. rst-class:: classref-constant + +**AXIS_Z** = ``2`` + +Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4i_constant_AXIS_W: +.. rst-class:: classref-constant + +**AXIS_W** = ``3`` + +Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. + .. _class_Vector4i_constant_ZERO: +.. rst-class:: classref-constant + +**ZERO** = ``Vector4i(0, 0, 0, 0)`` + +Zero vector, a vector with all components set to ``0``. + .. _class_Vector4i_constant_ONE: -- **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-constant -- **AXIS_Y** = **1** --- Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +**ONE** = ``Vector4i(1, 1, 1, 1)`` -- **AXIS_Z** = **2** --- Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +One vector, a vector with all components set to ``1``. -- **AXIS_W** = **3** --- Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator -- **ZERO** = **Vector4i(0, 0, 0, 0)** --- Zero vector, a vector with all components set to ``0``. +---- -- **ONE** = **Vector4i(1, 1, 1, 1)** --- One vector, a vector with all components set to ``1``. +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Vector4i_property_w: -- :ref:`int` **w** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **w** = ``0`` The vector's W component. Also accessible by using the index position ``[3]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_property_x: -- :ref:`int` **x** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **x** = ``0`` The vector's X component. Also accessible by using the index position ``[0]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_property_y: -- :ref:`int` **y** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **y** = ``0`` The vector's Y component. Also accessible by using the index position ``[1]``. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_property_z: -- :ref:`int` **z** +.. rst-class:: classref-property -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **z** = ``0`` The vector's Z component. Also accessible by using the index position ``[2]``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Constructor Descriptions ------------------------ .. _class_Vector4i_constructor_Vector4i: -- :ref:`Vector4i` **Vector4i** **(** **)** +.. rst-class:: classref-constructor -Constructs a default-initialized ``Vector4i`` with all components set to ``0``. +:ref:`Vector4i` **Vector4i** **(** **)** + +Constructs a default-initialized **Vector4i** with all components set to ``0``. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4i` **Vector4i** **(** :ref:`Vector4i` from **)** +.. rst-class:: classref-constructor -Constructs a ``Vector4i`` as a copy of the given ``Vector4i``. +:ref:`Vector4i` **Vector4i** **(** :ref:`Vector4i` from **)** + +Constructs a **Vector4i** as a copy of the given **Vector4i**. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4i` **Vector4i** **(** :ref:`Vector4` from **)** +.. rst-class:: classref-constructor -Constructs a new ``Vector4i`` from the given :ref:`Vector4`. +:ref:`Vector4i` **Vector4i** **(** :ref:`Vector4` from **)** + +Constructs a new **Vector4i** from the given :ref:`Vector4`. + +.. rst-class:: classref-item-separator ---- -- :ref:`Vector4i` **Vector4i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` w **)** +.. rst-class:: classref-constructor -Returns a ``Vector4i`` with the given components. +:ref:`Vector4i` **Vector4i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` w **)** + +Returns a **Vector4i** with the given components. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Vector4i_method_abs: -- :ref:`Vector4i` **abs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4i` **abs** **(** **)** |const| Returns a new vector with all components in absolute values (i.e. positive). +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_method_clamp: -- :ref:`Vector4i` **clamp** **(** :ref:`Vector4i` min, :ref:`Vector4i` max **)** |const| +.. rst-class:: classref-method + +:ref:`Vector4i` **clamp** **(** :ref:`Vector4i` min, :ref:`Vector4i` max **)** |const| Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_method_length: -- :ref:`float` **length** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **length** **(** **)** |const| Returns the length (magnitude) of this vector. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_method_length_squared: -- :ref:`int` **length_squared** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **length_squared** **(** **)** |const| Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_method_max_axis_index: -- :ref:`int` **max_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **max_axis_index** **(** **)** |const| Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_method_min_axis_index: -- :ref:`int` **min_axis_index** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **min_axis_index** **(** **)** |const| Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_W`. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_method_sign: -- :ref:`Vector4i` **sign** **(** **)** |const| +.. rst-class:: classref-method -Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling :ref:`@GlobalScope.sign` on each component. +:ref:`Vector4i` **sign** **(** **)** |const| + +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` on each component. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4i_method_snapped: + +.. rst-class:: classref-method + +:ref:`Vector4i` **snapped** **(** :ref:`Vector4i` step **)** |const| + +Returns a new vector with each component snapped to the closest multiple of the corresponding component in ``step``. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Operator Descriptions --------------------- -.. _class_Vector4i_operator_neq_bool: +.. _class_Vector4i_operator_neq_Vector4i: -- :ref:`bool` **operator !=** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator !=** **(** :ref:`Vector4i` right **)** Returns ``true`` if the vectors are not equal. +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_operator_mod_Vector4i: -- :ref:`Vector4i` **operator %** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -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` instead if you want to handle negative numbers. +:ref:`Vector4i` **operator %** **(** :ref:`Vector4i` right **)** + +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` instead if you want to handle negative numbers. :: print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints "(3, -4, 3, 0)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector4i` **operator %** **(** :ref:`int` right **)** +.. _class_Vector4i_operator_mod_int: -Gets the remainder of each component of the ``Vector4i`` with the the given :ref:`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` instead if you want to handle negative numbers. +.. rst-class:: classref-operator + +:ref:`Vector4i` **operator %** **(** :ref:`int` right **)** + +Gets the remainder of each component of the **Vector4i** with the the given :ref:`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` instead if you want to handle negative numbers. :: print(Vector4i(10, -20, 30, -40) % 7) # Prints "(3, -6, 2, -5)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_operator_mul_Vector4i: -- :ref:`Vector4i` **operator *** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -Multiplies each component of the ``Vector4i`` by the components of the given ``Vector4i``. +:ref:`Vector4i` **operator *** **(** :ref:`Vector4i` right **)** + +Multiplies each component of the **Vector4i** by the components of the given **Vector4i**. :: print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector4` **operator *** **(** :ref:`float` right **)** +.. _class_Vector4i_operator_mul_float: -Multiplies each component of the ``Vector4i`` by the given :ref:`float`. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator *** **(** :ref:`float` right **)** + +Multiplies each component of the **Vector4i** by the given :ref:`float`. Returns a Vector4 value due to floating-point operations. @@ -322,53 +472,77 @@ Returns a Vector4 value due to floating-point operations. print(Vector4i(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector4i` **operator *** **(** :ref:`int` right **)** +.. _class_Vector4i_operator_mul_int: -Multiplies each component of the ``Vector4i`` by the given :ref:`int`. +.. rst-class:: classref-operator + +:ref:`Vector4i` **operator *** **(** :ref:`int` right **)** + +Multiplies each component of the **Vector4i** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- .. _class_Vector4i_operator_sum_Vector4i: -- :ref:`Vector4i` **operator +** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -Adds each component of the ``Vector4i`` by the components of the given ``Vector4i``. +:ref:`Vector4i` **operator +** **(** :ref:`Vector4i` right **)** + +Adds each component of the **Vector4i** by the components of the given **Vector4i**. :: print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_operator_dif_Vector4i: -- :ref:`Vector4i` **operator -** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -Subtracts each component of the ``Vector4i`` by the components of the given ``Vector4i``. +:ref:`Vector4i` **operator -** **(** :ref:`Vector4i` right **)** + +Subtracts each component of the **Vector4i** by the components of the given **Vector4i**. :: print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)" +.. rst-class:: classref-item-separator + ---- .. _class_Vector4i_operator_div_Vector4i: -- :ref:`Vector4i` **operator /** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -Divides each component of the ``Vector4i`` by the components of the given ``Vector4i``. +:ref:`Vector4i` **operator /** **(** :ref:`Vector4i` right **)** + +Divides each component of the **Vector4i** by the components of the given **Vector4i**. :: print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)" +.. rst-class:: classref-item-separator + ---- -- :ref:`Vector4` **operator /** **(** :ref:`float` right **)** +.. _class_Vector4i_operator_div_float: -Divides each component of the ``Vector4i`` by the given :ref:`float`. +.. rst-class:: classref-operator + +:ref:`Vector4` **operator /** **(** :ref:`float` right **)** + +Divides each component of the **Vector4i** by the given :ref:`float`. Returns a Vector4 value due to floating-point operations. @@ -376,75 +550,113 @@ Returns a Vector4 value due to floating-point operations. print(Vector4i(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)" ----- - -- :ref:`Vector4i` **operator /** **(** :ref:`int` right **)** - -Divides each component of the ``Vector4i`` by the given :ref:`int`. +.. rst-class:: classref-item-separator ---- -.. _class_Vector4i_operator_lt_bool: +.. _class_Vector4i_operator_div_int: -- :ref:`bool` **operator <** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -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. +:ref:`Vector4i` **operator /** **(** :ref:`int` right **)** + +Divides each component of the **Vector4i** by the given :ref:`int`. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector4i_operator_lte_bool: +.. _class_Vector4i_operator_lt_Vector4i: -- :ref:`bool` **operator <=** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator <** **(** :ref:`Vector4i` right **)** + +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. + +.. rst-class:: classref-item-separator ---- -.. _class_Vector4i_operator_eq_bool: +.. _class_Vector4i_operator_lte_Vector4i: -- :ref:`bool` **operator ==** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator + +:ref:`bool` **operator <=** **(** :ref:`Vector4i` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4i_operator_eq_Vector4i: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==** **(** :ref:`Vector4i` right **)** Returns ``true`` if the vectors are exactly equal. ----- - -.. _class_Vector4i_operator_gt_bool: - -- :ref:`bool` **operator >** **(** :ref:`Vector4i` right **)** - -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. +.. rst-class:: classref-item-separator ---- -.. _class_Vector4i_operator_gte_bool: +.. _class_Vector4i_operator_gt_Vector4i: -- :ref:`bool` **operator >=** **(** :ref:`Vector4i` right **)** +.. rst-class:: classref-operator -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. +:ref:`bool` **operator >** **(** :ref:`Vector4i` right **)** + +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4i_operator_gte_Vector4i: + +.. rst-class:: classref-operator + +:ref:`bool` **operator >=** **(** :ref:`Vector4i` right **)** + +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. + +.. rst-class:: classref-item-separator ---- .. _class_Vector4i_operator_idx_int: -- :ref:`int` **operator []** **(** :ref:`int` index **)** +.. rst-class:: classref-operator + +:ref:`int` **operator []** **(** :ref:`int` index **)** 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``. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector4i_operator_unplus_Vector4i: +.. _class_Vector4i_operator_unplus: -- :ref:`Vector4i` **operator unary+** **(** **)** +.. rst-class:: classref-operator + +:ref:`Vector4i` **operator unary+** **(** **)** Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. +.. rst-class:: classref-item-separator + ---- -.. _class_Vector4i_operator_unminus_Vector4i: +.. _class_Vector4i_operator_unminus: -- :ref:`Vector4i` **operator unary-** **(** **)** +.. rst-class:: classref-operator -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. +:ref:`Vector4i` **operator unary-** **(** **)** + +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. .. |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.)` diff --git a/classes/class_vehiclebody3d.rst b/classes/class_vehiclebody3d.rst index fd0265600..30003df7d 100644 --- a/classes/class_vehiclebody3d.rst +++ b/classes/class_vehiclebody3d.rst @@ -14,6 +14,8 @@ VehicleBody3D Physics body that simulates the behavior of a car. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,54 +25,67 @@ This node implements all the physics logic needed to simulate a car. It is based \ **Note:** This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another :ref:`PhysicsBody3D` class. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Truck Town Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`float` | :ref:`brake` | ``0.0`` | -+---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`float` | :ref:`engine_force` | ``0.0`` | -+---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`float` | mass | ``40.0`` (overrides :ref:`RigidBody3D`) | -+---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`float` | :ref:`steering` | ``0.0`` | -+---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`float` | :ref:`brake` | ``0.0`` | + +---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`float` | :ref:`engine_force` | ``0.0`` | + +---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`float` | mass | ``40.0`` (overrides :ref:`RigidBody3D`) | + +---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`float` | :ref:`steering` | ``0.0`` | + +---------------------------+----------------------------------------------------------------+--------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VehicleBody3D_property_brake: -- :ref:`float` **brake** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_brake(value) | -+-----------+------------------+ -| *Getter* | get_brake() | -+-----------+------------------+ +:ref:`float` **brake** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_brake** **(** :ref:`float` value **)** +- :ref:`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` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleBody3D_property_engine_force: -- :ref:`float` **engine_force** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_engine_force(value) | -+-----------+-------------------------+ -| *Getter* | get_engine_force() | -+-----------+-------------------------+ +:ref:`float` **engine_force** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_engine_force** **(** :ref:`float` value **)** +- :ref:`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` set to ``true`` and are in contact with a surface. The :ref:`RigidBody3D.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. @@ -78,19 +93,20 @@ Accelerates the vehicle by applying an engine force. The vehicle is only sped up A negative value will result in the vehicle reversing. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleBody3D_property_steering: -- :ref:`float` **steering** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_steering(value) | -+-----------+---------------------+ -| *Getter* | get_steering() | -+-----------+---------------------+ +:ref:`float` **steering** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_steering** **(** :ref:`float` value **)** +- :ref:`float` **get_steering** **(** **)** The steering angle for the vehicle, in radians. 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` set to ``true`` will automatically be rotated. diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 8aa87e6d8..01ffe2053 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -14,6 +14,8 @@ VehicleWheel3D Physics object that simulates the behavior of a wheel. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,119 +23,139 @@ This node needs to be used as a child node of :ref:`VehicleBody3D` class. +.. rst-class:: classref-introduction-group + Tutorials --------- - `3D Truck Town Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`brake` | ``0.0`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`damping_compression` | ``0.83`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`damping_relaxation` | ``0.88`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`engine_force` | ``0.0`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`steering` | ``0.0`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`suspension_max_force` | ``6000.0`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`suspension_stiffness` | ``5.88`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`suspension_travel` | ``5.0`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`bool` | :ref:`use_as_steering` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`bool` | :ref:`use_as_traction` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`wheel_friction_slip` | ``10.5`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`wheel_radius` | ``0.5`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`wheel_rest_length` | ``0.15`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ -| :ref:`float` | :ref:`wheel_roll_influence` | ``0.1`` | -+---------------------------+---------------------------------------------------------------------------------+------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`brake` | ``0.0`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`damping_compression` | ``0.83`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`damping_relaxation` | ``0.88`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`engine_force` | ``0.0`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`steering` | ``0.0`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`suspension_max_force` | ``6000.0`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`suspension_stiffness` | ``5.88`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`suspension_travel` | ``5.0`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`use_as_steering` | ``false`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`use_as_traction` | ``false`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`wheel_friction_slip` | ``10.5`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`wheel_radius` | ``0.5`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`wheel_rest_length` | ``0.15`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`wheel_roll_influence` | ``0.1`` | + +---------------------------+---------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`Node3D` | :ref:`get_contact_body` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_rpm` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_skidinfo` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_in_contact` **(** **)** |const| | -+-----------------------------+-------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`get_contact_body` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_rpm` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_skidinfo` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_contact` **(** **)** |const| | + +-----------------------------+-------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VehicleWheel3D_property_brake: -- :ref:`float` **brake** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_brake(value) | -+-----------+------------------+ -| *Getter* | get_brake() | -+-----------+------------------+ +:ref:`float` **brake** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_brake** **(** :ref:`float` value **)** +- :ref:`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` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_damping_compression: -- :ref:`float` **damping_compression** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.83`` | -+-----------+--------------------------------+ -| *Setter* | set_damping_compression(value) | -+-----------+--------------------------------+ -| *Getter* | get_damping_compression() | -+-----------+--------------------------------+ +:ref:`float` **damping_compression** = ``0.83`` + +.. rst-class:: classref-property-setget + +- void **set_damping_compression** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_damping_relaxation: -- :ref:`float` **damping_relaxation** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0.88`` | -+-----------+-------------------------------+ -| *Setter* | set_damping_relaxation(value) | -+-----------+-------------------------------+ -| *Getter* | get_damping_relaxation() | -+-----------+-------------------------------+ +:ref:`float` **damping_relaxation** = ``0.88`` + +.. rst-class:: classref-property-setget + +- void **set_damping_relaxation** **(** :ref:`float` value **)** +- :ref:`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` property. For a :ref:`damping_compression` value of 0.3, try a relaxation value of 0.5. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_engine_force: -- :ref:`float` **engine_force** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_engine_force(value) | -+-----------+-------------------------+ -| *Getter* | get_engine_force() | -+-----------+-------------------------+ +:ref:`float` **engine_force** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_engine_force** **(** :ref:`float` value **)** +- :ref:`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` 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. @@ -141,200 +163,230 @@ Accelerates the wheel by applying an engine force. The wheel is only sped up if A negative value will result in the wheel reversing. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_steering: -- :ref:`float` **steering** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_steering(value) | -+-----------+---------------------+ -| *Getter* | get_steering() | -+-----------+---------------------+ +:ref:`float` **steering** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_steering** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_suspension_max_force: -- :ref:`float` **suspension_max_force** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``6000.0`` | -+-----------+---------------------------------+ -| *Setter* | set_suspension_max_force(value) | -+-----------+---------------------------------+ -| *Getter* | get_suspension_max_force() | -+-----------+---------------------------------+ +:ref:`float` **suspension_max_force** = ``6000.0`` + +.. rst-class:: classref-property-setget + +- void **set_suspension_max_force** **(** :ref:`float` value **)** +- :ref:`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` of the :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_suspension_stiffness: -- :ref:`float` **suspension_stiffness** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``5.88`` | -+-----------+---------------------------------+ -| *Setter* | set_suspension_stiffness(value) | -+-----------+---------------------------------+ -| *Getter* | get_suspension_stiffness() | -+-----------+---------------------------------+ +:ref:`float` **suspension_stiffness** = ``5.88`` + +.. rst-class:: classref-property-setget + +- void **set_suspension_stiffness** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_suspension_travel: -- :ref:`float` **suspension_travel** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``5.0`` | -+-----------+------------------------------+ -| *Setter* | set_suspension_travel(value) | -+-----------+------------------------------+ -| *Getter* | get_suspension_travel() | -+-----------+------------------------------+ +:ref:`float` **suspension_travel** = ``5.0`` + +.. rst-class:: classref-property-setget + +- void **set_suspension_travel** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_use_as_steering: -- :ref:`bool` **use_as_steering** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_use_as_steering(value) | -+-----------+----------------------------+ -| *Getter* | is_used_as_steering() | -+-----------+----------------------------+ +:ref:`bool` **use_as_steering** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_as_steering** **(** :ref:`bool` value **)** +- :ref:`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` and ignored if you are using the per-wheel :ref:`steering` value instead. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_use_as_traction: -- :ref:`bool` **use_as_traction** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------+ -| *Setter* | set_use_as_traction(value) | -+-----------+----------------------------+ -| *Getter* | is_used_as_traction() | -+-----------+----------------------------+ +:ref:`bool` **use_as_traction** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_as_traction** **(** :ref:`bool` value **)** +- :ref:`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` and ignored if you are using the per-wheel :ref:`engine_force` value instead. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_wheel_friction_slip: -- :ref:`float` **wheel_friction_slip** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``10.5`` | -+-----------+--------------------------+ -| *Setter* | set_friction_slip(value) | -+-----------+--------------------------+ -| *Getter* | get_friction_slip() | -+-----------+--------------------------+ +:ref:`float` **wheel_friction_slip** = ``10.5`` + +.. rst-class:: classref-property-setget + +- void **set_friction_slip** **(** :ref:`float` value **)** +- :ref:`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. It's best to set this to 1.0 when starting out. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_wheel_radius: -- :ref:`float` **wheel_radius** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0.5`` | -+-----------+-------------------+ -| *Setter* | set_radius(value) | -+-----------+-------------------+ -| *Getter* | get_radius() | -+-----------+-------------------+ +:ref:`float` **wheel_radius** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_radius** **(** **)** The radius of the wheel in meters. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_wheel_rest_length: -- :ref:`float` **wheel_rest_length** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``0.15`` | -+-----------+-----------------------------------+ -| *Setter* | set_suspension_rest_length(value) | -+-----------+-----------------------------------+ -| *Getter* | get_suspension_rest_length() | -+-----------+-----------------------------------+ +:ref:`float` **wheel_rest_length** = ``0.15`` + +.. rst-class:: classref-property-setget + +- void **set_suspension_rest_length** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_property_wheel_roll_influence: -- :ref:`float` **wheel_roll_influence** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0.1`` | -+-----------+---------------------------+ -| *Setter* | set_roll_influence(value) | -+-----------+---------------------------+ -| *Getter* | get_roll_influence() | -+-----------+---------------------------+ +:ref:`float` **wheel_roll_influence** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_roll_influence** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VehicleWheel3D_method_get_contact_body: -- :ref:`Node3D` **get_contact_body** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Node3D` **get_contact_body** **(** **)** |const| Returns the contacting body node if valid in the tree, as :ref:`Node3D`. At the moment, :ref:`GridMap` is not supported so the node will be always of type :ref:`PhysicsBody3D`. Returns ``null`` if the wheel is not in contact with a surface, or the contact body is not a :ref:`PhysicsBody3D`. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_method_get_rpm: -- :ref:`float` **get_rpm** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_rpm** **(** **)** |const| Returns the rotational speed of the wheel in revolutions per minute. +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_method_get_skidinfo: -- :ref:`float` **get_skidinfo** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_skidinfo** **(** **)** |const| 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). +.. rst-class:: classref-item-separator + ---- .. _class_VehicleWheel3D_method_is_in_contact: -- :ref:`bool` **is_in_contact** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_in_contact** **(** **)** |const| Returns ``true`` if this wheel is in contact with a surface. diff --git a/classes/class_vflowcontainer.rst b/classes/class_vflowcontainer.rst index f270760c0..1b785aae7 100644 --- a/classes/class_vflowcontainer.rst +++ b/classes/class_vflowcontainer.rst @@ -14,42 +14,53 @@ VFlowContainer Vertical flow container. +.. rst-class:: classref-introduction-group + Description ----------- Vertical version of :ref:`FlowContainer`. +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------+-----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`h_separation` | ``4`` | -+-----------------------+-----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`v_separation` | ``4`` | -+-----------------------+-----------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------+-----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +-----------------------+-----------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_VFlowContainer_theme_constant_h_separation: -- :ref:`int` **h_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **h_separation** = ``4`` The horizontal separation of children nodes. +.. rst-class:: classref-item-separator + ---- .. _class_VFlowContainer_theme_constant_v_separation: -- :ref:`int` **v_separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **v_separation** = ``4`` The vertical separation of children nodes. diff --git a/classes/class_videostream.rst b/classes/class_videostream.rst index 9a54a7cf6..c05ce4122 100644 --- a/classes/class_videostream.rst +++ b/classes/class_videostream.rst @@ -16,10 +16,12 @@ VideoStream Base resource for video streams. +.. rst-class:: classref-introduction-group + 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`. +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`. .. |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.)` diff --git a/classes/class_videostreamplayer.rst b/classes/class_videostreamplayer.rst index 899ad5aff..0070e1df9 100644 --- a/classes/class_videostreamplayer.rst +++ b/classes/class_videostreamplayer.rst @@ -14,6 +14,8 @@ VideoStreamPlayer Control for playing video streams. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,252 +27,314 @@ Supported video formats are `Ogg Theora `__ (``.ogv``, \ **Warning:** On Web, video playback *will* perform poorly due to missing architecture-specific assembly optimizations. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`int` | :ref:`audio_track` | ``0`` | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`bool` | :ref:`autoplay` | ``false`` | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`int` | :ref:`buffering_msec` | ``500`` | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`StringName` | :ref:`bus` | ``&"Master"`` | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`bool` | :ref:`expand` | ``false`` | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`bool` | :ref:`paused` | ``false`` | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`VideoStream` | :ref:`stream` | | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`stream_position` | | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`volume` | | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ -| :ref:`float` | :ref:`volume_db` | ``0.0`` | -+---------------------------------------+--------------------------------------------------------------------------+---------------+ +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`audio_track` | ``0`` | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`autoplay` | ``false`` | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`buffering_msec` | ``500`` | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`StringName` | :ref:`bus` | ``&"Master"`` | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`expand` | ``false`` | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`paused` | ``false`` | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`VideoStream` | :ref:`stream` | | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`stream_position` | | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`volume` | | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`volume_db` | ``0.0`` | + +---------------------------------------+--------------------------------------------------------------------------+---------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------+------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_stream_name` **(** **)** |const| | -+-----------------------------------+------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_video_texture` **(** **)** |const| | -+-----------------------------------+------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_playing` **(** **)** |const| | -+-----------------------------------+------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** **)** | -+-----------------------------------+------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-----------------------------------+------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_stream_name` **(** **)** |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_video_texture` **(** **)** |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** **)** | + +-----------------------------------+------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** **)** | + +-----------------------------------+------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_VideoStreamPlayer_signal_finished: -- **finished** **(** **)** +.. rst-class:: classref-signal + +**finished** **(** **)** Emitted when playback is finished. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_VideoStreamPlayer_property_audio_track: -- :ref:`int` **audio_track** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_audio_track(value) | -+-----------+------------------------+ -| *Getter* | get_audio_track() | -+-----------+------------------------+ +:ref:`int` **audio_track** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_audio_track** **(** :ref:`int` value **)** +- :ref:`int` **get_audio_track** **(** **)** The embedded audio track to play. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_autoplay: -- :ref:`bool` **autoplay** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_autoplay(value) | -+-----------+---------------------+ -| *Getter* | has_autoplay() | -+-----------+---------------------+ +:ref:`bool` **autoplay** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_autoplay** **(** :ref:`bool` value **)** +- :ref:`bool` **has_autoplay** **(** **)** If ``true``, playback starts when the scene loads. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_buffering_msec: -- :ref:`int` **buffering_msec** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``500`` | -+-----------+---------------------------+ -| *Setter* | set_buffering_msec(value) | -+-----------+---------------------------+ -| *Getter* | get_buffering_msec() | -+-----------+---------------------------+ +:ref:`int` **buffering_msec** = ``500`` + +.. rst-class:: classref-property-setget + +- void **set_buffering_msec** **(** :ref:`int` value **)** +- :ref:`int` **get_buffering_msec** **(** **)** Amount of time in milliseconds to store in buffer while playing. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_bus: -- :ref:`StringName` **bus** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``&"Master"`` | -+-----------+----------------+ -| *Setter* | set_bus(value) | -+-----------+----------------+ -| *Getter* | get_bus() | -+-----------+----------------+ +:ref:`StringName` **bus** = ``&"Master"`` + +.. rst-class:: classref-property-setget + +- void **set_bus** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_bus** **(** **)** Audio bus to use for sound playback. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_expand: -- :ref:`bool` **expand** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_expand(value) | -+-----------+-------------------+ -| *Getter* | has_expand() | -+-----------+-------------------+ +:ref:`bool` **expand** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_expand** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_paused: -- :ref:`bool` **paused** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_paused(value) | -+-----------+-------------------+ -| *Getter* | is_paused() | -+-----------+-------------------+ +:ref:`bool` **paused** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_paused** **(** :ref:`bool` value **)** +- :ref:`bool` **is_paused** **(** **)** If ``true``, the video is paused. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_stream: -- :ref:`VideoStream` **stream** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_stream(value) | -+----------+-------------------+ -| *Getter* | get_stream() | -+----------+-------------------+ +:ref:`VideoStream` **stream** + +.. rst-class:: classref-property-setget + +- void **set_stream** **(** :ref:`VideoStream` value **)** +- :ref:`VideoStream` **get_stream** **(** **)** The assigned video stream. See description for supported formats. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_stream_position: -- :ref:`float` **stream_position** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Setter* | set_stream_position(value) | -+----------+----------------------------+ -| *Getter* | get_stream_position() | -+----------+----------------------------+ +:ref:`float` **stream_position** + +.. rst-class:: classref-property-setget + +- void **set_stream_position** **(** :ref:`float` value **)** +- :ref:`float` **get_stream_position** **(** **)** The current position of the stream, in seconds. \ **Note:** Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDExtension add-on. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_volume: -- :ref:`float` **volume** +.. rst-class:: classref-property -+----------+-------------------+ -| *Setter* | set_volume(value) | -+----------+-------------------+ -| *Getter* | get_volume() | -+----------+-------------------+ +:ref:`float` **volume** + +.. rst-class:: classref-property-setget + +- void **set_volume** **(** :ref:`float` value **)** +- :ref:`float` **get_volume** **(** **)** Audio volume as a linear value. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_property_volume_db: -- :ref:`float` **volume_db** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------+ -| *Setter* | set_volume_db(value) | -+-----------+----------------------+ -| *Getter* | get_volume_db() | -+-----------+----------------------+ +:ref:`float` **volume_db** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_volume_db** **(** :ref:`float` value **)** +- :ref:`float` **get_volume_db** **(** **)** Audio volume in dB. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VideoStreamPlayer_method_get_stream_name: -- :ref:`String` **get_stream_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_stream_name** **(** **)** |const| Returns the video stream's name, or ``""`` if no video stream is assigned. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_method_get_video_texture: -- :ref:`Texture2D` **get_video_texture** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_video_texture** **(** **)** |const| Returns the current frame as a :ref:`Texture2D`. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_method_is_playing: -- :ref:`bool` **is_playing** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_playing** **(** **)** |const| Returns ``true`` if the video is playing. \ **Note:** The video is still considered playing if paused during playback. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_method_play: -- void **play** **(** **)** +.. rst-class:: classref-method + +void **play** **(** **)** Starts the video playback from the beginning. If the video is paused, this will not unpause the video. +.. rst-class:: classref-item-separator + ---- .. _class_VideoStreamPlayer_method_stop: -- void **stop** **(** **)** +.. rst-class:: classref-method + +void **stop** **(** **)** Stops the video playback and sets the stream position to 0. diff --git a/classes/class_videostreamtheora.rst b/classes/class_videostreamtheora.rst index 43bcae18e..70d750e76 100644 --- a/classes/class_videostreamtheora.rst +++ b/classes/class_videostreamtheora.rst @@ -14,6 +14,8 @@ VideoStreamTheora :ref:`VideoStream` resource for Ogg Theora videos. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,31 +23,48 @@ Description \ **Note:** While Ogg Theora videos can also have an ``.ogg`` extension, you will have to rename the extension to ``.ogv`` to use those videos within Godot. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file` **(** **)** | -+-----------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_file` **(** :ref:`String` file **)** | -+-----------------------------+-------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file` **(** **)** | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_file` **(** :ref:`String` file **)** | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_VideoStreamTheora_method_get_file: -- :ref:`String` **get_file** **(** **)** +.. rst-class:: classref-method -Returns the Ogg Theora video file handled by this ``VideoStreamTheora``. +:ref:`String` **get_file** **(** **)** + +Returns the Ogg Theora video file handled by this **VideoStreamTheora**. + +.. rst-class:: classref-item-separator ---- .. _class_VideoStreamTheora_method_set_file: -- void **set_file** **(** :ref:`String` file **)** +.. rst-class:: classref-method -Sets the Ogg Theora video file that this ``VideoStreamTheora`` resource handles. The ``file`` name should have the ``.ogv`` extension. +void **set_file** **(** :ref:`String` file **)** + +Sets the Ogg Theora video file that this **VideoStreamTheora** resource handles. The ``file`` name should have the ``.ogv`` extension. .. |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.)` diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index be2606bc1..2846f5e87 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -16,6 +16,8 @@ Viewport Base class for viewports. +.. rst-class:: classref-introduction-group + Description ----------- @@ -29,6 +31,8 @@ Also, viewports can be assigned to different screens in case the devices have mu Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -48,980 +52,1385 @@ Tutorials - `3D Viewport Scaling Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`audio_listener_enable_2d` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`audio_listener_enable_3d` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`int` | :ref:`canvas_cull_mask` | ``4294967295`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`DefaultCanvasItemTextureFilter` | :ref:`canvas_item_default_texture_filter` | ``1`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`DefaultCanvasItemTextureRepeat` | :ref:`canvas_item_default_texture_repeat` | ``0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`Transform2D` | :ref:`canvas_transform` | | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`DebugDraw` | :ref:`debug_draw` | ``0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`disable_3d` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`fsr_sharpness` | ``0.2`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`Transform2D` | :ref:`global_canvas_transform` | | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`gui_disable_input` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`gui_embed_subwindows` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`gui_snap_controls_to_pixels` | ``true`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`handle_input_locally` | ``true`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`mesh_lod_threshold` | ``1.0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`MSAA` | :ref:`msaa_2d` | ``0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`MSAA` | :ref:`msaa_3d` | ``0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`own_world_3d` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`physics_object_picking` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`positional_shadow_atlas_16_bits` | ``true`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_0` | ``2`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_1` | ``2`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_2` | ``3`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_3` | ``4`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`int` | :ref:`positional_shadow_atlas_size` | ``2048`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`Scaling3DMode` | :ref:`scaling_3d_mode` | ``0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`scaling_3d_scale` | ``1.0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`ScreenSpaceAA` | :ref:`screen_space_aa` | ``0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`SDFOversize` | :ref:`sdf_oversize` | ``1`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`SDFScale` | :ref:`sdf_scale` | ``1`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`snap_2d_transforms_to_pixel` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`snap_2d_vertices_to_pixel` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`float` | :ref:`texture_mipmap_bias` | ``0.0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`transparent_bg` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`use_debanding` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`use_occlusion_culling` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`use_taa` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`bool` | :ref:`use_xr` | ``false`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`VRSMode` | :ref:`vrs_mode` | ``0`` | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`Texture2D` | :ref:`vrs_texture` | | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`World2D` | :ref:`world_2d` | | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ -| :ref:`World3D` | :ref:`world_3d` | | -+-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`audio_listener_enable_2d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`audio_listener_enable_3d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`canvas_cull_mask` | ``4294967295`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`DefaultCanvasItemTextureFilter` | :ref:`canvas_item_default_texture_filter` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`DefaultCanvasItemTextureRepeat` | :ref:`canvas_item_default_texture_repeat` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`Transform2D` | :ref:`canvas_transform` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`DebugDraw` | :ref:`debug_draw` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`disable_3d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`fsr_sharpness` | ``0.2`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`Transform2D` | :ref:`global_canvas_transform` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`gui_disable_input` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`gui_embed_subwindows` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`gui_snap_controls_to_pixels` | ``true`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`handle_input_locally` | ``true`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`mesh_lod_threshold` | ``1.0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`MSAA` | :ref:`msaa_2d` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`MSAA` | :ref:`msaa_3d` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`own_world_3d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`physics_object_picking` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`positional_shadow_atlas_16_bits` | ``true`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_0` | ``2`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_1` | ``2`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_2` | ``3`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_3` | ``4`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`positional_shadow_atlas_size` | ``2048`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`Scaling3DMode` | :ref:`scaling_3d_mode` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`scaling_3d_scale` | ``1.0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`ScreenSpaceAA` | :ref:`screen_space_aa` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`SDFOversize` | :ref:`sdf_oversize` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`SDFScale` | :ref:`sdf_scale` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`snap_2d_transforms_to_pixel` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`snap_2d_vertices_to_pixel` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`texture_mipmap_bias` | ``0.0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`transparent_bg` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`use_debanding` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`use_occlusion_culling` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`use_taa` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`use_xr` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`VRSMode` | :ref:`vrs_mode` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`Texture2D` | :ref:`vrs_texture` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`World2D` | :ref:`world_2d` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`World3D` | :ref:`world_3d` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World2D` | :ref:`find_world_2d` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World3D` | :ref:`find_world_3d` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Camera2D` | :ref:`get_camera_2d` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Camera3D` | :ref:`get_camera_3d` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_canvas_cull_mask_bit` **(** :ref:`int` layer **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`get_final_transform` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_mouse_position` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`get_positional_shadow_atlas_quadrant_subdiv` **(** :ref:`int` quadrant **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_render_info` **(** :ref:`RenderInfoType` type, :ref:`RenderInfo` info **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`get_screen_transform` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ViewportTexture` | :ref:`get_texture` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_viewport_rid` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_visible_rect` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`gui_get_drag_data` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`gui_get_focus_owner` **(** **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`gui_is_drag_successful` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`gui_is_dragging` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`gui_release_focus` **(** **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_input_handled` **(** **)** |const| | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_input` **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_text_input` **(** :ref:`String` text **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_unhandled_input` **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_canvas_cull_mask_bit` **(** :ref:`int` layer, :ref:`bool` enable **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_as_handled` **(** **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_positional_shadow_atlas_quadrant_subdiv` **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | -+-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World2D` | :ref:`find_world_2d` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World3D` | :ref:`find_world_3d` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Camera2D` | :ref:`get_camera_2d` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Camera3D` | :ref:`get_camera_3d` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_canvas_cull_mask_bit` **(** :ref:`int` layer **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_final_transform` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_mouse_position` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`get_positional_shadow_atlas_quadrant_subdiv` **(** :ref:`int` quadrant **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_render_info` **(** :ref:`RenderInfoType` type, :ref:`RenderInfo` info **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_screen_transform` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportTexture` | :ref:`get_texture` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_viewport_rid` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_visible_rect` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`gui_get_drag_data` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`gui_get_focus_owner` **(** **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui_is_drag_successful` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui_is_dragging` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`gui_release_focus` **(** **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_handled` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_input` **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_text_input` **(** :ref:`String` text **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_unhandled_input` **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_canvas_cull_mask_bit` **(** :ref:`int` layer, :ref:`bool` enable **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_input_as_handled` **(** **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_positional_shadow_atlas_quadrant_subdiv` **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Viewport_signal_gui_focus_changed: -- **gui_focus_changed** **(** :ref:`Control` node **)** +.. rst-class:: classref-signal + +**gui_focus_changed** **(** :ref:`Control` node **)** Emitted when a Control node grabs keyboard focus. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_signal_size_changed: -- **size_changed** **(** **)** +.. rst-class:: classref-signal + +**size_changed** **(** **)** Emitted when the size of the viewport is changed, whether by resizing of window, or some other means. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_Viewport_PositionalShadowAtlasQuadrantSubdiv: -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED: - -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_1: - -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_4: - -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_16: - -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_64: - -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_256: - -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_1024: - -.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_MAX: +.. rst-class:: classref-enumeration enum **PositionalShadowAtlasQuadrantSubdiv**: -- **SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED** = **0** --- This quadrant will not be used. +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED: -- **SHADOW_ATLAS_QUADRANT_SUBDIV_1** = **1** --- This quadrant will only be used by one shadow map. +.. rst-class:: classref-enumeration-constant -- **SHADOW_ATLAS_QUADRANT_SUBDIV_4** = **2** --- This quadrant will be split in 4 and used by up to 4 shadow maps. +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED** = ``0`` -- **SHADOW_ATLAS_QUADRANT_SUBDIV_16** = **3** --- This quadrant will be split 16 ways and used by up to 16 shadow maps. +This quadrant will not be used. -- **SHADOW_ATLAS_QUADRANT_SUBDIV_64** = **4** --- This quadrant will be split 64 ways and used by up to 64 shadow maps. +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_1: -- **SHADOW_ATLAS_QUADRANT_SUBDIV_256** = **5** --- This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the :ref:`positional_shadow_atlas_size` is very high, the shadows in this quadrant will be very low resolution. +.. rst-class:: classref-enumeration-constant -- **SHADOW_ATLAS_QUADRANT_SUBDIV_1024** = **6** --- This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the :ref:`positional_shadow_atlas_size` is very high, the shadows in this quadrant will be very low resolution. +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_1** = ``1`` -- **SHADOW_ATLAS_QUADRANT_SUBDIV_MAX** = **7** --- Represents the size of the :ref:`PositionalShadowAtlasQuadrantSubdiv` enum. +This quadrant will only be used by one shadow map. + +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_4: + +.. rst-class:: classref-enumeration-constant + +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_4** = ``2`` + +This quadrant will be split in 4 and used by up to 4 shadow maps. + +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_16: + +.. rst-class:: classref-enumeration-constant + +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_16** = ``3`` + +This quadrant will be split 16 ways and used by up to 16 shadow maps. + +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_64: + +.. rst-class:: classref-enumeration-constant + +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_64** = ``4`` + +This quadrant will be split 64 ways and used by up to 64 shadow maps. + +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_256: + +.. rst-class:: classref-enumeration-constant + +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_256** = ``5`` + +This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the :ref:`positional_shadow_atlas_size` is very high, the shadows in this quadrant will be very low resolution. + +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_1024: + +.. rst-class:: classref-enumeration-constant + +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_1024** = ``6`` + +This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the :ref:`positional_shadow_atlas_size` is very high, the shadows in this quadrant will be very low resolution. + +.. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`PositionalShadowAtlasQuadrantSubdiv` **SHADOW_ATLAS_QUADRANT_SUBDIV_MAX** = ``7`` + +Represents the size of the :ref:`PositionalShadowAtlasQuadrantSubdiv` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_Scaling3DMode: -.. _class_Viewport_constant_SCALING_3D_MODE_BILINEAR: - -.. _class_Viewport_constant_SCALING_3D_MODE_FSR: - -.. _class_Viewport_constant_SCALING_3D_MODE_MAX: +.. rst-class:: classref-enumeration enum **Scaling3DMode**: -- **SCALING_3D_MODE_BILINEAR** = **0** --- Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +.. _class_Viewport_constant_SCALING_3D_MODE_BILINEAR: -- **SCALING_3D_MODE_FSR** = **1** --- 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`. Values less then ``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. +.. rst-class:: classref-enumeration-constant -- **SCALING_3D_MODE_MAX** = **2** --- Represents the size of the :ref:`Scaling3DMode` enum. +:ref:`Scaling3DMode` **SCALING_3D_MODE_BILINEAR** = ``0`` + +Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. + +.. _class_Viewport_constant_SCALING_3D_MODE_FSR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Scaling3DMode` **SCALING_3D_MODE_FSR** = ``1`` + +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`. Values less then ``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_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Scaling3DMode` **SCALING_3D_MODE_MAX** = ``2`` + +Represents the size of the :ref:`Scaling3DMode` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_MSAA: -.. _class_Viewport_constant_MSAA_DISABLED: - -.. _class_Viewport_constant_MSAA_2X: - -.. _class_Viewport_constant_MSAA_4X: - -.. _class_Viewport_constant_MSAA_8X: - -.. _class_Viewport_constant_MSAA_MAX: +.. rst-class:: classref-enumeration enum **MSAA**: -- **MSAA_DISABLED** = **0** --- Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting. +.. _class_Viewport_constant_MSAA_DISABLED: -- **MSAA_2X** = **1** --- Use 2× Multisample Antialiasing. This has a moderate performance cost. It helps reduce aliasing noticeably, but 4× MSAA still looks substantially better. +.. rst-class:: classref-enumeration-constant -- **MSAA_4X** = **2** --- Use 4× Multisample Antialiasing. This has a significant performance cost, and is generally a good compromise between performance and quality. +:ref:`MSAA` **MSAA_DISABLED** = ``0`` -- **MSAA_8X** = **3** --- Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware. +Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting. -- **MSAA_MAX** = **4** --- Represents the size of the :ref:`MSAA` enum. +.. _class_Viewport_constant_MSAA_2X: + +.. rst-class:: classref-enumeration-constant + +:ref:`MSAA` **MSAA_2X** = ``1`` + +Use 2× Multisample Antialiasing. This has a moderate performance cost. It helps reduce aliasing noticeably, but 4× MSAA still looks substantially better. + +.. _class_Viewport_constant_MSAA_4X: + +.. rst-class:: classref-enumeration-constant + +:ref:`MSAA` **MSAA_4X** = ``2`` + +Use 4× Multisample Antialiasing. This has a significant performance cost, and is generally a good compromise between performance and quality. + +.. _class_Viewport_constant_MSAA_8X: + +.. rst-class:: classref-enumeration-constant + +:ref:`MSAA` **MSAA_8X** = ``3`` + +Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware. + +.. _class_Viewport_constant_MSAA_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`MSAA` **MSAA_MAX** = ``4`` + +Represents the size of the :ref:`MSAA` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_ScreenSpaceAA: -.. _class_Viewport_constant_SCREEN_SPACE_AA_DISABLED: - -.. _class_Viewport_constant_SCREEN_SPACE_AA_FXAA: - -.. _class_Viewport_constant_SCREEN_SPACE_AA_MAX: +.. rst-class:: classref-enumeration enum **ScreenSpaceAA**: -- **SCREEN_SPACE_AA_DISABLED** = **0** --- Do not perform any antialiasing in the full screen post-process. +.. _class_Viewport_constant_SCREEN_SPACE_AA_DISABLED: -- **SCREEN_SPACE_AA_FXAA** = **1** --- Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. +.. rst-class:: classref-enumeration-constant -- **SCREEN_SPACE_AA_MAX** = **2** --- Represents the size of the :ref:`ScreenSpaceAA` enum. +:ref:`ScreenSpaceAA` **SCREEN_SPACE_AA_DISABLED** = ``0`` + +Do not perform any antialiasing in the full screen post-process. + +.. _class_Viewport_constant_SCREEN_SPACE_AA_FXAA: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenSpaceAA` **SCREEN_SPACE_AA_FXAA** = ``1`` + +Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. + +.. _class_Viewport_constant_SCREEN_SPACE_AA_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenSpaceAA` **SCREEN_SPACE_AA_MAX** = ``2`` + +Represents the size of the :ref:`ScreenSpaceAA` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_RenderInfo: -.. _class_Viewport_constant_RENDER_INFO_OBJECTS_IN_FRAME: - -.. _class_Viewport_constant_RENDER_INFO_PRIMITIVES_IN_FRAME: - -.. _class_Viewport_constant_RENDER_INFO_DRAW_CALLS_IN_FRAME: - -.. _class_Viewport_constant_RENDER_INFO_MAX: +.. rst-class:: classref-enumeration enum **RenderInfo**: -- **RENDER_INFO_OBJECTS_IN_FRAME** = **0** --- Amount of objects in frame. +.. _class_Viewport_constant_RENDER_INFO_OBJECTS_IN_FRAME: -- **RENDER_INFO_PRIMITIVES_IN_FRAME** = **1** --- Amount of vertices in frame. +.. rst-class:: classref-enumeration-constant -- **RENDER_INFO_DRAW_CALLS_IN_FRAME** = **2** --- Amount of draw calls in frame. +:ref:`RenderInfo` **RENDER_INFO_OBJECTS_IN_FRAME** = ``0`` -- **RENDER_INFO_MAX** = **3** --- Represents the size of the :ref:`RenderInfo` enum. +Amount of objects in frame. + +.. _class_Viewport_constant_RENDER_INFO_PRIMITIVES_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderInfo` **RENDER_INFO_PRIMITIVES_IN_FRAME** = ``1`` + +Amount of vertices in frame. + +.. _class_Viewport_constant_RENDER_INFO_DRAW_CALLS_IN_FRAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderInfo` **RENDER_INFO_DRAW_CALLS_IN_FRAME** = ``2`` + +Amount of draw calls in frame. + +.. _class_Viewport_constant_RENDER_INFO_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderInfo` **RENDER_INFO_MAX** = ``3`` + +Represents the size of the :ref:`RenderInfo` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_RenderInfoType: -.. _class_Viewport_constant_RENDER_INFO_TYPE_VISIBLE: - -.. _class_Viewport_constant_RENDER_INFO_TYPE_SHADOW: - -.. _class_Viewport_constant_RENDER_INFO_TYPE_MAX: +.. rst-class:: classref-enumeration enum **RenderInfoType**: -- **RENDER_INFO_TYPE_VISIBLE** = **0** +.. _class_Viewport_constant_RENDER_INFO_TYPE_VISIBLE: -- **RENDER_INFO_TYPE_SHADOW** = **1** +.. rst-class:: classref-enumeration-constant -- **RENDER_INFO_TYPE_MAX** = **2** +:ref:`RenderInfoType` **RENDER_INFO_TYPE_VISIBLE** = ``0`` + + + +.. _class_Viewport_constant_RENDER_INFO_TYPE_SHADOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderInfoType` **RENDER_INFO_TYPE_SHADOW** = ``1`` + + + +.. _class_Viewport_constant_RENDER_INFO_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderInfoType` **RENDER_INFO_TYPE_MAX** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_DebugDraw: -.. _class_Viewport_constant_DEBUG_DRAW_DISABLED: - -.. _class_Viewport_constant_DEBUG_DRAW_UNSHADED: - -.. _class_Viewport_constant_DEBUG_DRAW_LIGHTING: - -.. _class_Viewport_constant_DEBUG_DRAW_OVERDRAW: - -.. _class_Viewport_constant_DEBUG_DRAW_WIREFRAME: - -.. _class_Viewport_constant_DEBUG_DRAW_NORMAL_BUFFER: - -.. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_ALBEDO: - -.. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_LIGHTING: - -.. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_EMISSION: - -.. _class_Viewport_constant_DEBUG_DRAW_SHADOW_ATLAS: - -.. _class_Viewport_constant_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS: - -.. _class_Viewport_constant_DEBUG_DRAW_SCENE_LUMINANCE: - -.. _class_Viewport_constant_DEBUG_DRAW_SSAO: - -.. _class_Viewport_constant_DEBUG_DRAW_SSIL: - -.. _class_Viewport_constant_DEBUG_DRAW_PSSM_SPLITS: - -.. _class_Viewport_constant_DEBUG_DRAW_DECAL_ATLAS: - -.. _class_Viewport_constant_DEBUG_DRAW_SDFGI: - -.. _class_Viewport_constant_DEBUG_DRAW_SDFGI_PROBES: - -.. _class_Viewport_constant_DEBUG_DRAW_GI_BUFFER: - -.. _class_Viewport_constant_DEBUG_DRAW_DISABLE_LOD: - -.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS: - -.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS: - -.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_DECALS: - -.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES: - -.. _class_Viewport_constant_DEBUG_DRAW_OCCLUDERS: - -.. _class_Viewport_constant_DEBUG_DRAW_MOTION_VECTORS: +.. rst-class:: classref-enumeration enum **DebugDraw**: -- **DEBUG_DRAW_DISABLED** = **0** --- Objects are displayed normally. +.. _class_Viewport_constant_DEBUG_DRAW_DISABLED: -- **DEBUG_DRAW_UNSHADED** = **1** --- Objects are displayed without light information. +.. rst-class:: classref-enumeration-constant -- **DEBUG_DRAW_LIGHTING** = **2** +:ref:`DebugDraw` **DEBUG_DRAW_DISABLED** = ``0`` -- **DEBUG_DRAW_OVERDRAW** = **3** --- Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others. +Objects are displayed normally. -- **DEBUG_DRAW_WIREFRAME** = **4** --- Objects are displayed in wireframe style. +.. _class_Viewport_constant_DEBUG_DRAW_UNSHADED: -- **DEBUG_DRAW_NORMAL_BUFFER** = **5** +.. rst-class:: classref-enumeration-constant -- **DEBUG_DRAW_VOXEL_GI_ALBEDO** = **6** --- Objects are displayed with only the albedo value from :ref:`VoxelGI`\ s. +:ref:`DebugDraw` **DEBUG_DRAW_UNSHADED** = ``1`` -- **DEBUG_DRAW_VOXEL_GI_LIGHTING** = **7** --- Objects are displayed with only the lighting value from :ref:`VoxelGI`\ s. +Objects are displayed without light information. -- **DEBUG_DRAW_VOXEL_GI_EMISSION** = **8** --- Objects are displayed with only the emission color from :ref:`VoxelGI`\ s. +.. _class_Viewport_constant_DEBUG_DRAW_LIGHTING: -- **DEBUG_DRAW_SHADOW_ATLAS** = **9** --- Draws the shadow atlas that stores shadows from :ref:`OmniLight3D`\ s and :ref:`SpotLight3D`\ s in the upper left quadrant of the ``Viewport``. +.. rst-class:: classref-enumeration-constant -- **DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS** = **10** --- Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D`\ s in the upper left quadrant of the ``Viewport``. +:ref:`DebugDraw` **DEBUG_DRAW_LIGHTING** = ``2`` -- **DEBUG_DRAW_SCENE_LUMINANCE** = **11** -- **DEBUG_DRAW_SSAO** = **12** --- Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssao_enabled` set in your :ref:`WorldEnvironment`. -- **DEBUG_DRAW_SSIL** = **13** --- Draws the screen-space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssil_enabled` set in your :ref:`WorldEnvironment`. +.. _class_Viewport_constant_DEBUG_DRAW_OVERDRAW: -- **DEBUG_DRAW_PSSM_SPLITS** = **14** --- Colors each PSSM split for the :ref:`DirectionalLight3D`\ s in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow. +.. rst-class:: classref-enumeration-constant -- **DEBUG_DRAW_DECAL_ATLAS** = **15** --- Draws the decal atlas used by :ref:`Decal`\ s and light projector textures in the upper left quadrant of the ``Viewport``. +:ref:`DebugDraw` **DEBUG_DRAW_OVERDRAW** = ``3`` -- **DEBUG_DRAW_SDFGI** = **16** +Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others. -- **DEBUG_DRAW_SDFGI_PROBES** = **17** +.. _class_Viewport_constant_DEBUG_DRAW_WIREFRAME: -- **DEBUG_DRAW_GI_BUFFER** = **18** +.. rst-class:: classref-enumeration-constant -- **DEBUG_DRAW_DISABLE_LOD** = **19** +:ref:`DebugDraw` **DEBUG_DRAW_WIREFRAME** = ``4`` -- **DEBUG_DRAW_CLUSTER_OMNI_LIGHTS** = **20** +Objects are displayed in wireframe style. -- **DEBUG_DRAW_CLUSTER_SPOT_LIGHTS** = **21** +.. _class_Viewport_constant_DEBUG_DRAW_NORMAL_BUFFER: -- **DEBUG_DRAW_CLUSTER_DECALS** = **22** +.. rst-class:: classref-enumeration-constant -- **DEBUG_DRAW_CLUSTER_REFLECTION_PROBES** = **23** +:ref:`DebugDraw` **DEBUG_DRAW_NORMAL_BUFFER** = ``5`` -- **DEBUG_DRAW_OCCLUDERS** = **24** -- **DEBUG_DRAW_MOTION_VECTORS** = **25** + +.. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_ALBEDO: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_VOXEL_GI_ALBEDO** = ``6`` + +Objects are displayed with only the albedo value from :ref:`VoxelGI`\ s. + +.. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_LIGHTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_VOXEL_GI_LIGHTING** = ``7`` + +Objects are displayed with only the lighting value from :ref:`VoxelGI`\ s. + +.. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_EMISSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_VOXEL_GI_EMISSION** = ``8`` + +Objects are displayed with only the emission color from :ref:`VoxelGI`\ s. + +.. _class_Viewport_constant_DEBUG_DRAW_SHADOW_ATLAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_SHADOW_ATLAS** = ``9`` + +Draws the shadow atlas that stores shadows from :ref:`OmniLight3D`\ s and :ref:`SpotLight3D`\ s in the upper left quadrant of the **Viewport**. + +.. _class_Viewport_constant_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS** = ``10`` + +Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D`\ s in the upper left quadrant of the **Viewport**. + +.. _class_Viewport_constant_DEBUG_DRAW_SCENE_LUMINANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_SCENE_LUMINANCE** = ``11`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_SSAO: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_SSAO** = ``12`` + +Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssao_enabled` set in your :ref:`WorldEnvironment`. + +.. _class_Viewport_constant_DEBUG_DRAW_SSIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_SSIL** = ``13`` + +Draws the screen-space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have :ref:`Environment.ssil_enabled` set in your :ref:`WorldEnvironment`. + +.. _class_Viewport_constant_DEBUG_DRAW_PSSM_SPLITS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_PSSM_SPLITS** = ``14`` + +Colors each PSSM split for the :ref:`DirectionalLight3D`\ s in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow. + +.. _class_Viewport_constant_DEBUG_DRAW_DECAL_ATLAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_DECAL_ATLAS** = ``15`` + +Draws the decal atlas used by :ref:`Decal`\ s and light projector textures in the upper left quadrant of the **Viewport**. + +.. _class_Viewport_constant_DEBUG_DRAW_SDFGI: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_SDFGI** = ``16`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_SDFGI_PROBES: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_SDFGI_PROBES** = ``17`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_GI_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_GI_BUFFER** = ``18`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_DISABLE_LOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_DISABLE_LOD** = ``19`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_OMNI_LIGHTS** = ``20`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_SPOT_LIGHTS** = ``21`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_DECALS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_DECALS** = ``22`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_CLUSTER_REFLECTION_PROBES** = ``23`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_OCCLUDERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_OCCLUDERS** = ``24`` + + + +.. _class_Viewport_constant_DEBUG_DRAW_MOTION_VECTORS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_MOTION_VECTORS** = ``25`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_DefaultCanvasItemTextureFilter: -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: - -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: - -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: - -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: - -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX: +.. rst-class:: classref-enumeration enum **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. +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: -- **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. +.. rst-class:: classref-enumeration-constant -- **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. +:ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``0`` -- **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 only. The simplest and fastest method of filtering, but the texture will look pixelized. -- **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX** = **4** --- Max value for :ref:`DefaultCanvasItemTextureFilter` enum. +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. + +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX** = ``4`` + +Max value for :ref:`DefaultCanvasItemTextureFilter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_DefaultCanvasItemTextureRepeat: -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED: - -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED: - -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR: - -.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX: +.. rst-class:: classref-enumeration enum **DefaultCanvasItemTextureRepeat**: -- **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED** = **0** --- Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture. +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED: -- **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED** = **1** --- Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. +.. rst-class:: classref-enumeration-constant -- **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR** = **2** --- Flip the texture when repeating so that the edge lines up instead of abruptly changing. +:ref:`DefaultCanvasItemTextureRepeat` **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED** = ``0`` -- **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX** = **3** --- Max value for :ref:`DefaultCanvasItemTextureRepeat` enum. +Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture. + +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DefaultCanvasItemTextureRepeat` **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED** = ``1`` + +Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. + +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`DefaultCanvasItemTextureRepeat` **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR** = ``2`` + +Flip the texture when repeating so that the edge lines up instead of abruptly changing. + +.. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`DefaultCanvasItemTextureRepeat` **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX** = ``3`` + +Max value for :ref:`DefaultCanvasItemTextureRepeat` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_SDFOversize: -.. _class_Viewport_constant_SDF_OVERSIZE_100_PERCENT: - -.. _class_Viewport_constant_SDF_OVERSIZE_120_PERCENT: - -.. _class_Viewport_constant_SDF_OVERSIZE_150_PERCENT: - -.. _class_Viewport_constant_SDF_OVERSIZE_200_PERCENT: - -.. _class_Viewport_constant_SDF_OVERSIZE_MAX: +.. rst-class:: classref-enumeration enum **SDFOversize**: -- **SDF_OVERSIZE_100_PERCENT** = **0** +.. _class_Viewport_constant_SDF_OVERSIZE_100_PERCENT: -- **SDF_OVERSIZE_120_PERCENT** = **1** +.. rst-class:: classref-enumeration-constant -- **SDF_OVERSIZE_150_PERCENT** = **2** +:ref:`SDFOversize` **SDF_OVERSIZE_100_PERCENT** = ``0`` -- **SDF_OVERSIZE_200_PERCENT** = **3** -- **SDF_OVERSIZE_MAX** = **4** + +.. _class_Viewport_constant_SDF_OVERSIZE_120_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFOversize` **SDF_OVERSIZE_120_PERCENT** = ``1`` + + + +.. _class_Viewport_constant_SDF_OVERSIZE_150_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFOversize` **SDF_OVERSIZE_150_PERCENT** = ``2`` + + + +.. _class_Viewport_constant_SDF_OVERSIZE_200_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFOversize` **SDF_OVERSIZE_200_PERCENT** = ``3`` + + + +.. _class_Viewport_constant_SDF_OVERSIZE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFOversize` **SDF_OVERSIZE_MAX** = ``4`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_SDFScale: -.. _class_Viewport_constant_SDF_SCALE_100_PERCENT: - -.. _class_Viewport_constant_SDF_SCALE_50_PERCENT: - -.. _class_Viewport_constant_SDF_SCALE_25_PERCENT: - -.. _class_Viewport_constant_SDF_SCALE_MAX: +.. rst-class:: classref-enumeration enum **SDFScale**: -- **SDF_SCALE_100_PERCENT** = **0** +.. _class_Viewport_constant_SDF_SCALE_100_PERCENT: -- **SDF_SCALE_50_PERCENT** = **1** +.. rst-class:: classref-enumeration-constant -- **SDF_SCALE_25_PERCENT** = **2** +:ref:`SDFScale` **SDF_SCALE_100_PERCENT** = ``0`` -- **SDF_SCALE_MAX** = **3** + + +.. _class_Viewport_constant_SDF_SCALE_50_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFScale` **SDF_SCALE_50_PERCENT** = ``1`` + + + +.. _class_Viewport_constant_SDF_SCALE_25_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFScale` **SDF_SCALE_25_PERCENT** = ``2`` + + + +.. _class_Viewport_constant_SDF_SCALE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SDFScale` **SDF_SCALE_MAX** = ``3`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_Viewport_VRSMode: -.. _class_Viewport_constant_VRS_DISABLED: - -.. _class_Viewport_constant_VRS_TEXTURE: - -.. _class_Viewport_constant_VRS_XR: - -.. _class_Viewport_constant_VRS_MAX: +.. rst-class:: classref-enumeration enum **VRSMode**: -- **VRS_DISABLED** = **0** --- VRS is disabled. +.. _class_Viewport_constant_VRS_DISABLED: -- **VRS_TEXTURE** = **1** --- VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. +.. rst-class:: classref-enumeration-constant -- **VRS_XR** = **2** --- VRS texture is supplied by the primary :ref:`XRInterface`. +:ref:`VRSMode` **VRS_DISABLED** = ``0`` -- **VRS_MAX** = **3** --- Represents the size of the :ref:`VRSMode` enum. +VRS is disabled. + +.. _class_Viewport_constant_VRS_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VRSMode` **VRS_TEXTURE** = ``1`` + +VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. + +.. _class_Viewport_constant_VRS_XR: + +.. rst-class:: classref-enumeration-constant + +:ref:`VRSMode` **VRS_XR** = ``2`` + +VRS texture is supplied by the primary :ref:`XRInterface`. + +.. _class_Viewport_constant_VRS_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`VRSMode` **VRS_MAX** = ``3`` + +Represents the size of the :ref:`VRSMode` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Viewport_property_audio_listener_enable_2d: -- :ref:`bool` **audio_listener_enable_2d** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_as_audio_listener_2d(value) | -+-----------+---------------------------------+ -| *Getter* | is_audio_listener_2d() | -+-----------+---------------------------------+ +:ref:`bool` **audio_listener_enable_2d** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_as_audio_listener_2d** **(** :ref:`bool` value **)** +- :ref:`bool` **is_audio_listener_2d** **(** **)** If ``true``, the viewport will process 2D audio streams. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_audio_listener_enable_3d: -- :ref:`bool` **audio_listener_enable_3d** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_as_audio_listener_3d(value) | -+-----------+---------------------------------+ -| *Getter* | is_audio_listener_3d() | -+-----------+---------------------------------+ +:ref:`bool` **audio_listener_enable_3d** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_as_audio_listener_3d** **(** :ref:`bool` value **)** +- :ref:`bool` **is_audio_listener_3d** **(** **)** If ``true``, the viewport will process 3D audio streams. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_canvas_cull_mask: -- :ref:`int` **canvas_cull_mask** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``4294967295`` | -+-----------+-----------------------------+ -| *Setter* | set_canvas_cull_mask(value) | -+-----------+-----------------------------+ -| *Getter* | get_canvas_cull_mask() | -+-----------+-----------------------------+ +:ref:`int` **canvas_cull_mask** = ``4294967295`` -The rendering layers in which this ``Viewport`` renders :ref:`CanvasItem` nodes. +.. rst-class:: classref-property-setget + +- void **set_canvas_cull_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_canvas_cull_mask** **(** **)** + +The rendering layers in which this **Viewport** renders :ref:`CanvasItem` nodes. + +.. rst-class:: classref-item-separator ---- .. _class_Viewport_property_canvas_item_default_texture_filter: -- :ref:`DefaultCanvasItemTextureFilter` **canvas_item_default_texture_filter** +.. rst-class:: classref-property -+-----------+-----------------------------------------------+ -| *Default* | ``1`` | -+-----------+-----------------------------------------------+ -| *Setter* | set_default_canvas_item_texture_filter(value) | -+-----------+-----------------------------------------------+ -| *Getter* | get_default_canvas_item_texture_filter() | -+-----------+-----------------------------------------------+ +:ref:`DefaultCanvasItemTextureFilter` **canvas_item_default_texture_filter** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_default_canvas_item_texture_filter** **(** :ref:`DefaultCanvasItemTextureFilter` value **)** +- :ref:`DefaultCanvasItemTextureFilter` **get_default_canvas_item_texture_filter** **(** **)** Sets the default filter mode used by :ref:`CanvasItem`\ s in this Viewport. See :ref:`DefaultCanvasItemTextureFilter` for options. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_canvas_item_default_texture_repeat: -- :ref:`DefaultCanvasItemTextureRepeat` **canvas_item_default_texture_repeat** +.. rst-class:: classref-property -+-----------+-----------------------------------------------+ -| *Default* | ``0`` | -+-----------+-----------------------------------------------+ -| *Setter* | set_default_canvas_item_texture_repeat(value) | -+-----------+-----------------------------------------------+ -| *Getter* | get_default_canvas_item_texture_repeat() | -+-----------+-----------------------------------------------+ +:ref:`DefaultCanvasItemTextureRepeat` **canvas_item_default_texture_repeat** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_default_canvas_item_texture_repeat** **(** :ref:`DefaultCanvasItemTextureRepeat` value **)** +- :ref:`DefaultCanvasItemTextureRepeat` **get_default_canvas_item_texture_repeat** **(** **)** Sets the default repeat mode used by :ref:`CanvasItem`\ s in this Viewport. See :ref:`DefaultCanvasItemTextureRepeat` for options. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_canvas_transform: -- :ref:`Transform2D` **canvas_transform** +.. rst-class:: classref-property -+----------+-----------------------------+ -| *Setter* | set_canvas_transform(value) | -+----------+-----------------------------+ -| *Getter* | get_canvas_transform() | -+----------+-----------------------------+ +:ref:`Transform2D` **canvas_transform** + +.. rst-class:: classref-property-setget + +- void **set_canvas_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_canvas_transform** **(** **)** The canvas transform of the viewport, useful for changing the on-screen positions of all child :ref:`CanvasItem`\ s. This is relative to the global canvas transform of the viewport. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_debug_draw: -- :ref:`DebugDraw` **debug_draw** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``0`` | -+-----------+-----------------------+ -| *Setter* | set_debug_draw(value) | -+-----------+-----------------------+ -| *Getter* | get_debug_draw() | -+-----------+-----------------------+ +:ref:`DebugDraw` **debug_draw** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_debug_draw** **(** :ref:`DebugDraw` value **)** +- :ref:`DebugDraw` **get_debug_draw** **(** **)** The overlay mode for test rendered geometry in debug purposes. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_disable_3d: -- :ref:`bool` **disable_3d** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_disable_3d(value) | -+-----------+-----------------------+ -| *Getter* | is_3d_disabled() | -+-----------+-----------------------+ +:ref:`bool` **disable_3d** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disable_3d** **(** :ref:`bool` value **)** +- :ref:`bool` **is_3d_disabled** **(** **)** Disable 3D rendering (but keep 2D rendering). +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_fsr_sharpness: -- :ref:`float` **fsr_sharpness** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.2`` | -+-----------+--------------------------+ -| *Setter* | set_fsr_sharpness(value) | -+-----------+--------------------------+ -| *Getter* | get_fsr_sharpness() | -+-----------+--------------------------+ +:ref:`float` **fsr_sharpness** = ``0.2`` + +.. rst-class:: classref-property-setget + +- void **set_fsr_sharpness** **(** :ref:`float` value **)** +- :ref:`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. To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/scaling_3d/fsr_sharpness` project setting. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_global_canvas_transform: -- :ref:`Transform2D` **global_canvas_transform** +.. rst-class:: classref-property -+----------+------------------------------------+ -| *Setter* | set_global_canvas_transform(value) | -+----------+------------------------------------+ -| *Getter* | get_global_canvas_transform() | -+----------+------------------------------------+ +:ref:`Transform2D` **global_canvas_transform** + +.. rst-class:: classref-property-setget + +- void **set_global_canvas_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_global_canvas_transform** **(** **)** The global canvas transform of the viewport. The canvas transform is relative to this. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_gui_disable_input: -- :ref:`bool` **gui_disable_input** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_disable_input(value) | -+-----------+--------------------------+ -| *Getter* | is_input_disabled() | -+-----------+--------------------------+ +:ref:`bool` **gui_disable_input** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_disable_input** **(** :ref:`bool` value **)** +- :ref:`bool` **is_input_disabled** **(** **)** If ``true``, the viewport will not receive input events. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_gui_embed_subwindows: -- :ref:`bool` **gui_embed_subwindows** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_embedding_subwindows(value) | -+-----------+---------------------------------+ -| *Getter* | is_embedding_subwindows() | -+-----------+---------------------------------+ +:ref:`bool` **gui_embed_subwindows** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_embedding_subwindows** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_gui_snap_controls_to_pixels: -- :ref:`bool` **gui_snap_controls_to_pixels** +.. rst-class:: classref-property -+-----------+--------------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------------+ -| *Setter* | set_snap_controls_to_pixels(value) | -+-----------+--------------------------------------+ -| *Getter* | is_snap_controls_to_pixels_enabled() | -+-----------+--------------------------------------+ +:ref:`bool` **gui_snap_controls_to_pixels** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_snap_controls_to_pixels** **(** :ref:`bool` value **)** +- :ref:`bool` **is_snap_controls_to_pixels_enabled** **(** **)** If ``true``, the GUI controls on the viewport will lay pixel perfectly. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_handle_input_locally: -- :ref:`bool` **handle_input_locally** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------------+ -| *Setter* | set_handle_input_locally(value) | -+-----------+---------------------------------+ -| *Getter* | is_handling_input_locally() | -+-----------+---------------------------------+ +:ref:`bool` **handle_input_locally** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_handle_input_locally** **(** :ref:`bool` value **)** +- :ref:`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 the first parent viewport that is set to handle input locally. -A :ref:`SubViewportContainer` will automatically set this property to ``false`` for the ``Viewport`` contained inside of it. +A :ref:`SubViewportContainer` will automatically set this property to ``false`` for the **Viewport** contained inside of it. See also :ref:`set_input_as_handled` and :ref:`is_input_handled`. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_mesh_lod_threshold: -- :ref:`float` **mesh_lod_threshold** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------------------+ -| *Setter* | set_mesh_lod_threshold(value) | -+-----------+-------------------------------+ -| *Getter* | get_mesh_lod_threshold() | -+-----------+-------------------------------+ +:ref:`float` **mesh_lod_threshold** = ``1.0`` -The automatic LOD bias to use for meshes rendered within the ``Viewport`` (this is analogous to :ref:`ReflectionProbe.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` to improve performance at the cost of geometry detail. +.. rst-class:: classref-property-setget + +- void **set_mesh_lod_threshold** **(** :ref:`float` value **)** +- :ref:`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`). 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` to improve performance at the cost of geometry detail. To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/mesh_lod/lod_change/threshold_pixels` project setting. \ **Note:** :ref:`mesh_lod_threshold` does not affect :ref:`GeometryInstance3D` visibility ranges (also known as "manual" LOD or hierarchical LOD). +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_msaa_2d: -- :ref:`MSAA` **msaa_2d** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_msaa_2d(value) | -+-----------+--------------------+ -| *Getter* | get_msaa_2d() | -+-----------+--------------------+ +:ref:`MSAA` **msaa_2d** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_msaa_2d** **(** :ref:`MSAA` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_msaa_3d: -- :ref:`MSAA` **msaa_3d** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_msaa_3d(value) | -+-----------+--------------------+ -| *Getter* | get_msaa_3d() | -+-----------+--------------------+ +:ref:`MSAA` **msaa_3d** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_msaa_3d** **(** :ref:`MSAA` value **)** +- :ref:`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` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_own_world_3d: -- :ref:`bool` **own_world_3d** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------+ -| *Setter* | set_use_own_world_3d(value) | -+-----------+-----------------------------+ -| *Getter* | is_using_own_world_3d() | -+-----------+-----------------------------+ +:ref:`bool` **own_world_3d** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_own_world_3d** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_own_world_3d** **(** **)** If ``true``, the viewport will use a unique copy of the :ref:`World3D` defined in :ref:`world_3d`. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_physics_object_picking: -- :ref:`bool` **physics_object_picking** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_physics_object_picking(value) | -+-----------+-----------------------------------+ -| *Getter* | get_physics_object_picking() | -+-----------+-----------------------------------+ +:ref:`bool` **physics_object_picking** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_physics_object_picking** **(** :ref:`bool` value **)** +- :ref:`bool` **get_physics_object_picking** **(** **)** If ``true``, the objects rendered by viewport become subjects of mouse picking process. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_positional_shadow_atlas_16_bits: -- :ref:`bool` **positional_shadow_atlas_16_bits** +.. rst-class:: classref-property -+-----------+--------------------------------------------+ -| *Default* | ``true`` | -+-----------+--------------------------------------------+ -| *Setter* | set_positional_shadow_atlas_16_bits(value) | -+-----------+--------------------------------------------+ -| *Getter* | get_positional_shadow_atlas_16_bits() | -+-----------+--------------------------------------------+ +:ref:`bool` **positional_shadow_atlas_16_bits** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_positional_shadow_atlas_16_bits** **(** :ref:`bool` value **)** +- :ref:`bool` **get_positional_shadow_atlas_16_bits** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_positional_shadow_atlas_quad_0: -- :ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_0** +.. rst-class:: classref-property -+-----------+----------------------------------------------------+ -| *Default* | ``2`` | -+-----------+----------------------------------------------------+ -| *Setter* | set_positional_shadow_atlas_quadrant_subdiv(value) | -+-----------+----------------------------------------------------+ -| *Getter* | get_positional_shadow_atlas_quadrant_subdiv() | -+-----------+----------------------------------------------------+ +:ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_0** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** +- :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant **)** |const| The subdivision amount of the first quadrant on the shadow atlas. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_positional_shadow_atlas_quad_1: -- :ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_1** +.. rst-class:: classref-property -+-----------+----------------------------------------------------+ -| *Default* | ``2`` | -+-----------+----------------------------------------------------+ -| *Setter* | set_positional_shadow_atlas_quadrant_subdiv(value) | -+-----------+----------------------------------------------------+ -| *Getter* | get_positional_shadow_atlas_quadrant_subdiv() | -+-----------+----------------------------------------------------+ +:ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_1** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** +- :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant **)** |const| The subdivision amount of the second quadrant on the shadow atlas. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_positional_shadow_atlas_quad_2: -- :ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_2** +.. rst-class:: classref-property -+-----------+----------------------------------------------------+ -| *Default* | ``3`` | -+-----------+----------------------------------------------------+ -| *Setter* | set_positional_shadow_atlas_quadrant_subdiv(value) | -+-----------+----------------------------------------------------+ -| *Getter* | get_positional_shadow_atlas_quadrant_subdiv() | -+-----------+----------------------------------------------------+ +:ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_2** = ``3`` + +.. rst-class:: classref-property-setget + +- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** +- :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant **)** |const| The subdivision amount of the third quadrant on the shadow atlas. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_positional_shadow_atlas_quad_3: -- :ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_3** +.. rst-class:: classref-property -+-----------+----------------------------------------------------+ -| *Default* | ``4`` | -+-----------+----------------------------------------------------+ -| *Setter* | set_positional_shadow_atlas_quadrant_subdiv(value) | -+-----------+----------------------------------------------------+ -| *Getter* | get_positional_shadow_atlas_quadrant_subdiv() | -+-----------+----------------------------------------------------+ +:ref:`PositionalShadowAtlasQuadrantSubdiv` **positional_shadow_atlas_quad_3** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** +- :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant **)** |const| The subdivision amount of the fourth quadrant on the shadow atlas. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_positional_shadow_atlas_size: -- :ref:`int` **positional_shadow_atlas_size** +.. rst-class:: classref-property -+-----------+-----------------------------------------+ -| *Default* | ``2048`` | -+-----------+-----------------------------------------+ -| *Setter* | set_positional_shadow_atlas_size(value) | -+-----------+-----------------------------------------+ -| *Getter* | get_positional_shadow_atlas_size() | -+-----------+-----------------------------------------+ +:ref:`int` **positional_shadow_atlas_size** = ``2048`` + +.. rst-class:: classref-property-setget + +- void **set_positional_shadow_atlas_size** **(** :ref:`int` value **)** +- :ref:`int` **get_positional_shadow_atlas_size** **(** **)** The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2. \ **Note:** If this is set to ``0``, no shadows will be visible at all (including directional shadows). +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_scaling_3d_mode: -- :ref:`Scaling3DMode` **scaling_3d_mode** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_scaling_3d_mode(value) | -+-----------+----------------------------+ -| *Getter* | get_scaling_3d_mode() | -+-----------+----------------------------+ +:ref:`Scaling3DMode` **scaling_3d_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_scaling_3d_mode** **(** :ref:`Scaling3DMode` value **)** +- :ref:`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. To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/scaling_3d/mode` project setting. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_scaling_3d_scale: -- :ref:`float` **scaling_3d_scale** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``1.0`` | -+-----------+-----------------------------+ -| *Setter* | set_scaling_3d_scale(value) | -+-----------+-----------------------------+ -| *Getter* | get_scaling_3d_scale() | -+-----------+-----------------------------+ +:ref:`float` **scaling_3d_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_scaling_3d_scale** **(** :ref:`float` value **)** +- :ref:`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` 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` for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons. @@ -1029,107 +1438,113 @@ When using FSR upscaling, AMD recommends exposing the following values as preset To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/scaling_3d/scale` project setting. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_screen_space_aa: -- :ref:`ScreenSpaceAA` **screen_space_aa** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_screen_space_aa(value) | -+-----------+----------------------------+ -| *Getter* | get_screen_space_aa() | -+-----------+----------------------------+ +:ref:`ScreenSpaceAA` **screen_space_aa** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_screen_space_aa** **(** :ref:`ScreenSpaceAA` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_sdf_oversize: -- :ref:`SDFOversize` **sdf_oversize** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``1`` | -+-----------+-------------------------+ -| *Setter* | set_sdf_oversize(value) | -+-----------+-------------------------+ -| *Getter* | get_sdf_oversize() | -+-----------+-------------------------+ +:ref:`SDFOversize` **sdf_oversize** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_sdf_oversize** **(** :ref:`SDFOversize` value **)** +- :ref:`SDFOversize` **get_sdf_oversize** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_sdf_scale: -- :ref:`SDFScale` **sdf_scale** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``1`` | -+-----------+----------------------+ -| *Setter* | set_sdf_scale(value) | -+-----------+----------------------+ -| *Getter* | get_sdf_scale() | -+-----------+----------------------+ +:ref:`SDFScale` **sdf_scale** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_sdf_scale** **(** :ref:`SDFScale` value **)** +- :ref:`SDFScale` **get_sdf_scale** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_snap_2d_transforms_to_pixel: -- :ref:`bool` **snap_2d_transforms_to_pixel** +.. rst-class:: classref-property -+-----------+------------------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------------------+ -| *Setter* | set_snap_2d_transforms_to_pixel(value) | -+-----------+------------------------------------------+ -| *Getter* | is_snap_2d_transforms_to_pixel_enabled() | -+-----------+------------------------------------------+ +:ref:`bool` **snap_2d_transforms_to_pixel** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_snap_2d_transforms_to_pixel** **(** :ref:`bool` value **)** +- :ref:`bool` **is_snap_2d_transforms_to_pixel_enabled** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_snap_2d_vertices_to_pixel: -- :ref:`bool` **snap_2d_vertices_to_pixel** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------------+ -| *Setter* | set_snap_2d_vertices_to_pixel(value) | -+-----------+----------------------------------------+ -| *Getter* | is_snap_2d_vertices_to_pixel_enabled() | -+-----------+----------------------------------------+ +:ref:`bool` **snap_2d_vertices_to_pixel** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_snap_2d_vertices_to_pixel** **(** :ref:`bool` value **)** +- :ref:`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 `! +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_texture_mipmap_bias: -- :ref:`float` **texture_mipmap_bias** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------------+ -| *Setter* | set_texture_mipmap_bias(value) | -+-----------+--------------------------------+ -| *Getter* | get_texture_mipmap_bias() | -+-----------+--------------------------------+ +:ref:`float` **texture_mipmap_bias** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_mipmap_bias** **(** :ref:`float` value **)** +- :ref:`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). @@ -1139,238 +1554,316 @@ Enabling temporal antialiasing (:ref:`use_taa`) To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias` project setting. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_transparent_bg: -- :ref:`bool` **transparent_bg** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``false`` | -+-----------+-----------------------------------+ -| *Setter* | set_transparent_background(value) | -+-----------+-----------------------------------+ -| *Getter* | has_transparent_background() | -+-----------+-----------------------------------+ +:ref:`bool` **transparent_bg** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_transparent_background** **(** :ref:`bool` value **)** +- :ref:`bool` **has_transparent_background** **(** **)** If ``true``, the viewport should render its background as transparent. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_use_debanding: -- :ref:`bool` **use_debanding** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_use_debanding(value) | -+-----------+--------------------------+ -| *Getter* | is_using_debanding() | -+-----------+--------------------------+ +:ref:`bool` **use_debanding** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_debanding** **(** :ref:`bool` value **)** +- :ref:`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` is :ref:`Environment.BG_CANVAS`. See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding`. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_use_occlusion_culling: -- :ref:`bool` **use_occlusion_culling** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_use_occlusion_culling(value) | -+-----------+----------------------------------+ -| *Getter* | is_using_occlusion_culling() | -+-----------+----------------------------------+ +:ref:`bool` **use_occlusion_culling** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_occlusion_culling** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_occlusion_culling** **(** **)** If ``true``, :ref:`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` 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` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_use_taa: -- :ref:`bool` **use_taa** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_use_taa(value) | -+-----------+--------------------+ -| *Getter* | is_using_taa() | -+-----------+--------------------+ +:ref:`bool` **use_taa** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_taa** **(** :ref:`bool` value **)** +- :ref:`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. \ **Note:** The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_use_xr: -- :ref:`bool` **use_xr** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``false`` | -+-----------+-------------------+ -| *Setter* | set_use_xr(value) | -+-----------+-------------------+ -| *Getter* | is_using_xr() | -+-----------+-------------------+ +:ref:`bool` **use_xr** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_xr** **(** :ref:`bool` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_vrs_mode: -- :ref:`VRSMode` **vrs_mode** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_vrs_mode(value) | -+-----------+---------------------+ -| *Getter* | get_vrs_mode() | -+-----------+---------------------+ +:ref:`VRSMode` **vrs_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_vrs_mode** **(** :ref:`VRSMode` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_vrs_texture: -- :ref:`Texture2D` **vrs_texture** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_vrs_texture(value) | -+----------+------------------------+ -| *Getter* | get_vrs_texture() | -+----------+------------------------+ +:ref:`Texture2D` **vrs_texture** + +.. rst-class:: classref-property-setget + +- void **set_vrs_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_vrs_texture** **(** **)** Texture to use when :ref:`vrs_mode` is set to :ref:`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: + +:: + + - 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 + +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_world_2d: -- :ref:`World2D` **world_2d** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_world_2d(value) | -+----------+---------------------+ -| *Getter* | get_world_2d() | -+----------+---------------------+ +:ref:`World2D` **world_2d** + +.. rst-class:: classref-property-setget + +- void **set_world_2d** **(** :ref:`World2D` value **)** +- :ref:`World2D` **get_world_2d** **(** **)** The custom :ref:`World2D` which can be used as 2D environment source. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_property_world_3d: -- :ref:`World3D` **world_3d** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_world_3d(value) | -+----------+---------------------+ -| *Getter* | get_world_3d() | -+----------+---------------------+ +:ref:`World3D` **world_3d** + +.. rst-class:: classref-property-setget + +- void **set_world_3d** **(** :ref:`World3D` value **)** +- :ref:`World3D` **get_world_3d** **(** **)** The custom :ref:`World3D` which can be used as 3D environment source. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Viewport_method_find_world_2d: -- :ref:`World2D` **find_world_2d** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`World2D` **find_world_2d** **(** **)** |const| Returns the first valid :ref:`World2D` for this viewport, searching the :ref:`world_2d` property of itself and any Viewport ancestor. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_find_world_3d: -- :ref:`World3D` **find_world_3d** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`World3D` **find_world_3d** **(** **)** |const| Returns the first valid :ref:`World3D` for this viewport, searching the :ref:`world_3d` property of itself and any Viewport ancestor. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_camera_2d: -- :ref:`Camera2D` **get_camera_2d** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Camera2D` **get_camera_2d** **(** **)** |const| Returns the currently active 2D camera. Returns null if there are no active cameras. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_camera_3d: -- :ref:`Camera3D` **get_camera_3d** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Camera3D` **get_camera_3d** **(** **)** |const| Returns the currently active 3D camera. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_canvas_cull_mask_bit: -- :ref:`bool` **get_canvas_cull_mask_bit** **(** :ref:`int` layer **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_canvas_cull_mask_bit** **(** :ref:`int` layer **)** |const| Returns an individual bit on the rendering layer mask. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_final_transform: -- :ref:`Transform2D` **get_final_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_final_transform** **(** **)** |const| Returns the total transform of the viewport. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_mouse_position: -- :ref:`Vector2` **get_mouse_position** **(** **)** |const| +.. rst-class:: classref-method -Returns the mouse's position in this ``Viewport`` using the coordinate system of this ``Viewport``. +:ref:`Vector2` **get_mouse_position** **(** **)** |const| + +Returns the mouse's position in this **Viewport** using the coordinate system of this **Viewport**. + +.. rst-class:: classref-item-separator ---- .. _class_Viewport_method_get_positional_shadow_atlas_quadrant_subdiv: -- :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant **)** |const| +.. rst-class:: classref-method + +:ref:`PositionalShadowAtlasQuadrantSubdiv` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant **)** |const| Returns the :ref:`PositionalShadowAtlasQuadrantSubdiv` of the specified quadrant. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_render_info: -- :ref:`int` **get_render_info** **(** :ref:`RenderInfoType` type, :ref:`RenderInfo` info **)** +.. rst-class:: classref-method + +:ref:`int` **get_render_info** **(** :ref:`RenderInfoType` type, :ref:`RenderInfo` info **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_screen_transform: -- :ref:`Transform2D` **get_screen_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform2D` **get_screen_transform** **(** **)** |const| Returns the transform from the Viewport's coordinates to the screen coordinates of the containing window manager window. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_texture: -- :ref:`ViewportTexture` **get_texture** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`ViewportTexture` **get_texture** **(** **)** |const| Returns the viewport's texture. @@ -1382,69 +1875,101 @@ Returns the viewport's texture. await RenderingServer.frame_post_draw $Viewport.get_texture().get_image().save_png("user://Screenshot.png") +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_viewport_rid: -- :ref:`RID` **get_viewport_rid** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`RID` **get_viewport_rid** **(** **)** |const| Returns the viewport's RID from the :ref:`RenderingServer`. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_get_visible_rect: -- :ref:`Rect2` **get_visible_rect** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Rect2` **get_visible_rect** **(** **)** |const| Returns the visible rectangle in global screen coordinates. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_gui_get_drag_data: -- :ref:`Variant` **gui_get_drag_data** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **gui_get_drag_data** **(** **)** |const| Returns the drag data from the GUI, that was previously returned by :ref:`Control._get_drag_data`. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_gui_get_focus_owner: -- :ref:`Control` **gui_get_focus_owner** **(** **)** +.. rst-class:: classref-method + +:ref:`Control` **gui_get_focus_owner** **(** **)** Returns the :ref:`Control` having the focus within this viewport. If no :ref:`Control` has the focus, returns null. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_gui_is_drag_successful: -- :ref:`bool` **gui_is_drag_successful** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **gui_is_drag_successful** **(** **)** |const| Returns ``true`` if the drag operation is successful. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_gui_is_dragging: -- :ref:`bool` **gui_is_dragging** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **gui_is_dragging** **(** **)** |const| Returns ``true`` if the viewport is currently performing a drag operation. Alternative to :ref:`Node.NOTIFICATION_DRAG_BEGIN` and :ref:`Node.NOTIFICATION_DRAG_END` when you prefer polling the value. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_gui_release_focus: -- void **gui_release_focus** **(** **)** +.. rst-class:: classref-method + +void **gui_release_focus** **(** **)** Removes the focus from the currently focused :ref:`Control` within this viewport. If no :ref:`Control` has the focus, does nothing. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_is_input_handled: -- :ref:`bool` **is_input_handled** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_input_handled** **(** **)** |const| Returns whether the current :ref:`InputEvent` has been handled. Input events are not handled until :ref:`set_input_as_handled` has been called during the lifetime of an :ref:`InputEvent`. @@ -1452,13 +1977,17 @@ This is usually done as part of input handling methods like :ref:`Node._input` 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` instead. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_push_input: -- void **push_input** **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** +.. rst-class:: classref-method -Triggers the given ``event`` in this ``Viewport``. This can be used to pass an :ref:`InputEvent` between viewports, or to locally apply inputs that were sent over the network or saved to a file. +void **push_input** **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** + +Triggers the given ``event`` in this **Viewport**. This can be used to pass an :ref:`InputEvent` between viewports, or to locally apply inputs that were sent over the network or saved to a file. 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. @@ -1472,23 +2001,31 @@ Calling this method will propagate calls to child nodes for following methods in If an earlier method marks the input as handled via :ref:`set_input_as_handled`, any later method in this list will not be called. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_push_text_input: -- void **push_text_input** **(** :ref:`String` text **)** +.. rst-class:: classref-method + +void **push_text_input** **(** :ref:`String` text **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_push_unhandled_input: -- void **push_unhandled_input** **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** +.. rst-class:: classref-method -Triggers the given :ref:`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. +void **push_unhandled_input** **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** + +Triggers the given :ref:`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. 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. @@ -1506,37 +2043,53 @@ If an earlier method marks the input as handled via :ref:`set_input_as_handled` is ``true``, the event is used for physics object picking. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_set_canvas_cull_mask_bit: -- void **set_canvas_cull_mask_bit** **(** :ref:`int` layer, :ref:`bool` enable **)** +.. rst-class:: classref-method -Set/clear individual bits on the rendering layer mask. This simplifies editing this ``Viewport``'s layers. +void **set_canvas_cull_mask_bit** **(** :ref:`int` layer, :ref:`bool` enable **)** + +Set/clear individual bits on the rendering layer mask. This simplifies editing this **Viewport**'s layers. + +.. rst-class:: classref-item-separator ---- .. _class_Viewport_method_set_input_as_handled: -- void **set_input_as_handled** **(** **)** +.. rst-class:: classref-method + +void **set_input_as_handled** **(** **)** Stops the input from propagating further down the :ref:`SceneTree`. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_set_positional_shadow_atlas_quadrant_subdiv: -- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` subdiv **)** +.. rst-class:: classref-method + +void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv` 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. +.. rst-class:: classref-item-separator + ---- .. _class_Viewport_method_warp_mouse: -- void **warp_mouse** **(** :ref:`Vector2` position **)** +.. rst-class:: classref-method -Moves the mouse pointer to the specified position in this ``Viewport`` using the coordinate system of this ``Viewport``. +void **warp_mouse** **(** :ref:`Vector2` position **)** + +Moves the mouse pointer to the specified position in this **Viewport** using the coordinate system of this **Viewport**. .. |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.)` diff --git a/classes/class_viewporttexture.rst b/classes/class_viewporttexture.rst index 2f823564b..129310701 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -14,6 +14,8 @@ ViewportTexture Texture which displays the content of a :ref:`Viewport`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,6 +25,8 @@ To create a ViewportTexture in code, use the :ref:`Viewport.get_texture` to set the proxy texture and flags in the local viewport. +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -34,27 +38,37 @@ Tutorials - `3D Viewport Scaling Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------+--------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`viewport_path` | ``NodePath("")`` | -+---------------------------------+--------------------------------------------------------------------+------------------+ +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`viewport_path` | ``NodePath("")`` | + +---------------------------------+--------------------------------------------------------------------+------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ViewportTexture_property_viewport_path: -- :ref:`NodePath` **viewport_path** +.. rst-class:: classref-property -+-----------+-----------------------------------+ -| *Default* | ``NodePath("")`` | -+-----------+-----------------------------------+ -| *Setter* | set_viewport_path_in_scene(value) | -+-----------+-----------------------------------+ -| *Getter* | get_viewport_path_in_scene() | -+-----------+-----------------------------------+ +:ref:`NodePath` **viewport_path** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_viewport_path_in_scene** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_viewport_path_in_scene** **(** **)** The path to the :ref:`Viewport` node to display. This is relative to the scene root, not to the node which uses the texture. diff --git a/classes/class_visibleonscreenenabler2d.rst b/classes/class_visibleonscreenenabler2d.rst index 1a0d2471c..46b83ea8e 100644 --- a/classes/class_visibleonscreenenabler2d.rst +++ b/classes/class_visibleonscreenenabler2d.rst @@ -14,71 +14,104 @@ VisibleOnScreenEnabler2D Automatically disables another node if not visible on screen. +.. rst-class:: classref-introduction-group + Description ----------- -VisibleOnScreenEnabler2D detects when it is visible on screen (just like :ref:`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` is ``false``), and enabled when the enabler is visible. The disabling is achieved by changing :ref:`Node.process_mode`. +VisibleOnScreenEnabler2D detects when it is visible on screen (just like :ref:`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` is ``false``), and enabled when the enabler is visible. The disabling is achieved by changing :ref:`Node.process_mode`. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ -| :ref:`EnableMode` | :ref:`enable_mode` | ``0`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ -| :ref:`NodePath` | :ref:`enable_node_path` | ``NodePath("..")`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`EnableMode` | :ref:`enable_mode` | ``0`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`enable_node_path` | ``NodePath("..")`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisibleOnScreenEnabler2D_EnableMode: -.. _class_VisibleOnScreenEnabler2D_constant_ENABLE_MODE_INHERIT: - -.. _class_VisibleOnScreenEnabler2D_constant_ENABLE_MODE_ALWAYS: - -.. _class_VisibleOnScreenEnabler2D_constant_ENABLE_MODE_WHEN_PAUSED: +.. rst-class:: classref-enumeration enum **EnableMode**: -- **ENABLE_MODE_INHERIT** = **0** --- Corresponds to :ref:`Node.PROCESS_MODE_INHERIT`. +.. _class_VisibleOnScreenEnabler2D_constant_ENABLE_MODE_INHERIT: -- **ENABLE_MODE_ALWAYS** = **1** --- Corresponds to :ref:`Node.PROCESS_MODE_ALWAYS`. +.. rst-class:: classref-enumeration-constant -- **ENABLE_MODE_WHEN_PAUSED** = **2** --- Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED. +:ref:`EnableMode` **ENABLE_MODE_INHERIT** = ``0`` + +Corresponds to :ref:`Node.PROCESS_MODE_INHERIT`. + +.. _class_VisibleOnScreenEnabler2D_constant_ENABLE_MODE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnableMode` **ENABLE_MODE_ALWAYS** = ``1`` + +Corresponds to :ref:`Node.PROCESS_MODE_ALWAYS`. + +.. _class_VisibleOnScreenEnabler2D_constant_ENABLE_MODE_WHEN_PAUSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnableMode` **ENABLE_MODE_WHEN_PAUSED** = ``2`` + +Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisibleOnScreenEnabler2D_property_enable_mode: -- :ref:`EnableMode` **enable_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_enable_mode(value) | -+-----------+------------------------+ -| *Getter* | get_enable_mode() | -+-----------+------------------------+ +:ref:`EnableMode` **enable_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_enable_mode** **(** :ref:`EnableMode` value **)** +- :ref:`EnableMode` **get_enable_mode** **(** **)** Determines how the node is enabled. Corresponds to :ref:`ProcessMode`. Disabled node uses :ref:`Node.PROCESS_MODE_DISABLED`. +.. rst-class:: classref-item-separator + ---- .. _class_VisibleOnScreenEnabler2D_property_enable_node_path: -- :ref:`NodePath` **enable_node_path** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``NodePath("..")`` | -+-----------+-----------------------------+ -| *Setter* | set_enable_node_path(value) | -+-----------+-----------------------------+ -| *Getter* | get_enable_node_path() | -+-----------+-----------------------------+ +:ref:`NodePath` **enable_node_path** = ``NodePath("..")`` -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. +.. rst-class:: classref-property-setget + +- void **set_enable_node_path** **(** :ref:`NodePath` value **)** +- :ref:`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. .. |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.)` diff --git a/classes/class_visibleonscreenenabler3d.rst b/classes/class_visibleonscreenenabler3d.rst index 6763059cb..b83525e49 100644 --- a/classes/class_visibleonscreenenabler3d.rst +++ b/classes/class_visibleonscreenenabler3d.rst @@ -14,6 +14,8 @@ VisibleOnScreenEnabler3D Enables certain nodes only when approximately visible. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,66 +27,97 @@ If you just want to receive notifications, use :ref:`VisibleOnScreenNotifier3D` | :ref:`enable_mode` | ``0`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ -| :ref:`NodePath` | :ref:`enable_node_path` | ``NodePath("..")`` | -+-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`EnableMode` | :ref:`enable_mode` | ``0`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`enable_node_path` | ``NodePath("..")`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisibleOnScreenEnabler3D_EnableMode: -.. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_INHERIT: - -.. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_ALWAYS: - -.. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_WHEN_PAUSED: +.. rst-class:: classref-enumeration enum **EnableMode**: -- **ENABLE_MODE_INHERIT** = **0** +.. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_INHERIT: -- **ENABLE_MODE_ALWAYS** = **1** +.. rst-class:: classref-enumeration-constant -- **ENABLE_MODE_WHEN_PAUSED** = **2** +:ref:`EnableMode` **ENABLE_MODE_INHERIT** = ``0`` + + + +.. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnableMode` **ENABLE_MODE_ALWAYS** = ``1`` + + + +.. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_WHEN_PAUSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnableMode` **ENABLE_MODE_WHEN_PAUSED** = ``2`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisibleOnScreenEnabler3D_property_enable_mode: -- :ref:`EnableMode` **enable_mode** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0`` | -+-----------+------------------------+ -| *Setter* | set_enable_mode(value) | -+-----------+------------------------+ -| *Getter* | get_enable_mode() | -+-----------+------------------------+ +:ref:`EnableMode` **enable_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_enable_mode** **(** :ref:`EnableMode` value **)** +- :ref:`EnableMode` **get_enable_mode** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisibleOnScreenEnabler3D_property_enable_node_path: -- :ref:`NodePath` **enable_node_path** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``NodePath("..")`` | -+-----------+-----------------------------+ -| *Setter* | set_enable_node_path(value) | -+-----------+-----------------------------+ -| *Getter* | get_enable_node_path() | -+-----------+-----------------------------+ +:ref:`NodePath` **enable_node_path** = ``NodePath("..")`` + +.. rst-class:: classref-property-setget + +- void **set_enable_node_path** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_enable_node_path** **(** **)** .. container:: contribute diff --git a/classes/class_visibleonscreennotifier2d.rst b/classes/class_visibleonscreennotifier2d.rst index 957e205ea..9a55591f0 100644 --- a/classes/class_visibleonscreennotifier2d.rst +++ b/classes/class_visibleonscreennotifier2d.rst @@ -16,6 +16,8 @@ VisibleOnScreenNotifier2D Detects when the node extents are visible on screen. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,65 +25,102 @@ The VisibleOnScreenNotifier2D detects when it is visible on the screen. It also If you want nodes to be disabled automatically when they exit the screen, use :ref:`VisibleOnScreenEnabler2D` instead. +.. rst-class:: classref-introduction-group + Tutorials --------- - `2D Dodge The Creeps Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------+-----------------------------+ -| :ref:`Rect2` | :ref:`rect` | ``Rect2(-10, -10, 20, 20)`` | -+---------------------------+------------------------------------------------------------+-----------------------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------+-----------------------------+ + | :ref:`Rect2` | :ref:`rect` | ``Rect2(-10, -10, 20, 20)`` | + +---------------------------+------------------------------------------------------------+-----------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_on_screen` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_screen` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_VisibleOnScreenNotifier2D_signal_screen_entered: -- **screen_entered** **(** **)** +.. rst-class:: classref-signal + +**screen_entered** **(** **)** Emitted when the VisibleOnScreenNotifier2D enters the screen. +.. rst-class:: classref-item-separator + ---- .. _class_VisibleOnScreenNotifier2D_signal_screen_exited: -- **screen_exited** **(** **)** +.. rst-class:: classref-signal + +**screen_exited** **(** **)** Emitted when the VisibleOnScreenNotifier2D exits the screen. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_VisibleOnScreenNotifier2D_property_rect: -- :ref:`Rect2` **rect** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Rect2(-10, -10, 20, 20)`` | -+-----------+-----------------------------+ -| *Setter* | set_rect(value) | -+-----------+-----------------------------+ -| *Getter* | get_rect() | -+-----------+-----------------------------+ +:ref:`Rect2` **rect** = ``Rect2(-10, -10, 20, 20)`` + +.. rst-class:: classref-property-setget + +- void **set_rect** **(** :ref:`Rect2` value **)** +- :ref:`Rect2` **get_rect** **(** **)** The VisibleOnScreenNotifier2D's bounding rectangle. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VisibleOnScreenNotifier2D_method_is_on_screen: -- :ref:`bool` **is_on_screen** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_screen** **(** **)** |const| If ``true``, the bounding rectangle is on the screen. diff --git a/classes/class_visibleonscreennotifier3d.rst b/classes/class_visibleonscreennotifier3d.rst index bdd85a295..d26e22538 100644 --- a/classes/class_visibleonscreennotifier3d.rst +++ b/classes/class_visibleonscreennotifier3d.rst @@ -16,6 +16,8 @@ VisibleOnScreenNotifier3D Detects approximately when the node is visible on screen. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,60 +27,95 @@ If you want nodes to be disabled automatically when they exit the screen, use :r \ **Note:** VisibleOnScreenNotifier3D 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` node as a child of a :ref:`Camera3D` node and/or :ref:`Vector3.dot`. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------------------+-------------------------------+ -| :ref:`AABB` | :ref:`aabb` | ``AABB(-1, -1, -1, 2, 2, 2)`` | -+-------------------------+------------------------------------------------------------+-------------------------------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------+-------------------------------+ + | :ref:`AABB` | :ref:`aabb` | ``AABB(-1, -1, -1, 2, 2, 2)`` | + +-------------------------+------------------------------------------------------------+-------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_on_screen` **(** **)** |const| | -+-------------------------+----------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_screen` **(** **)** |const| | + +-------------------------+----------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_VisibleOnScreenNotifier3D_signal_screen_entered: -- **screen_entered** **(** **)** +.. rst-class:: classref-signal + +**screen_entered** **(** **)** Emitted when the VisibleOnScreenNotifier3D enters the screen. +.. rst-class:: classref-item-separator + ---- .. _class_VisibleOnScreenNotifier3D_signal_screen_exited: -- **screen_exited** **(** **)** +.. rst-class:: classref-signal + +**screen_exited** **(** **)** Emitted when the VisibleOnScreenNotifier3D exits the screen. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_VisibleOnScreenNotifier3D_property_aabb: -- :ref:`AABB` **aabb** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``AABB(-1, -1, -1, 2, 2, 2)`` | -+-----------+-------------------------------+ -| *Setter* | set_aabb(value) | -+-----------+-------------------------------+ -| *Getter* | get_aabb() | -+-----------+-------------------------------+ +:ref:`AABB` **aabb** = ``AABB(-1, -1, -1, 2, 2, 2)`` + +.. rst-class:: classref-property-setget + +- void **set_aabb** **(** :ref:`AABB` value **)** +- :ref:`AABB` **get_aabb** **(** **)** The VisibleOnScreenNotifier3D's bounding box. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VisibleOnScreenNotifier3D_method_is_on_screen: -- :ref:`bool` **is_on_screen** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_on_screen** **(** **)** |const| If ``true``, the bounding box is on the screen. diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index 4e0dd337e..814ee2298 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -16,114 +16,163 @@ VisualInstance3D Parent of all visual 3D nodes. +.. rst-class:: classref-introduction-group + Description ----------- -The ``VisualInstance3D`` is used to connect a resource to a visual representation. All visual 3D nodes inherit from the ``VisualInstance3D``. In general, you should not access the ``VisualInstance3D`` properties directly as they are accessed and managed by the nodes that inherit from ``VisualInstance3D``. ``VisualInstance3D`` is the node representation of the :ref:`RenderingServer` instance. +The **VisualInstance3D** is used to connect a resource to a visual representation. All visual 3D nodes inherit from the **VisualInstance3D**. In general, you should not access the **VisualInstance3D** properties directly as they are accessed and managed by the nodes that inherit from **VisualInstance3D**. **VisualInstance3D** is the node representation of the :ref:`RenderingServer` instance. + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------+-------------------------------------------------------+-------+ -| :ref:`int` | :ref:`layers` | ``1`` | -+-----------------------+-------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------------+-------+ + | :ref:`int` | :ref:`layers` | ``1`` | + +-----------------------+-------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_base` **(** **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_instance` **(** **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_layer_mask_value` **(** :ref:`int` layer_number **)** |const| | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_base` **(** :ref:`RID` base **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_base` **(** **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_instance` **(** **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_layer_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_base` **(** :ref:`RID` base **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualInstance3D_property_layers: -- :ref:`int` **layers** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1`` | -+-----------+-----------------------+ -| *Setter* | set_layer_mask(value) | -+-----------+-----------------------+ -| *Getter* | get_layer_mask() | -+-----------+-----------------------+ +:ref:`int` **layers** = ``1`` -The render layer(s) this ``VisualInstance3D`` is drawn on. +.. rst-class:: classref-property-setget -This object will only be visible for :ref:`Camera3D`\ s whose cull mask includes the render object this ``VisualInstance3D`` is set to. +- void **set_layer_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_layer_mask** **(** **)** -For :ref:`Light3D`\ s, this can be used to control which ``VisualInstance3D``\ s are affected by a specific light. For :ref:`GPUParticles3D`, this can be used to control which particles are effected by a specific attractor. For :ref:`Decal`\ s, this can be used to control which ``VisualInstance3D``\ s are affected by a specific decal. +The render layer(s) this **VisualInstance3D** is drawn on. + +This object will only be visible for :ref:`Camera3D`\ s whose cull mask includes the render object this **VisualInstance3D** is set to. + +For :ref:`Light3D`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific light. For :ref:`GPUParticles3D`, this can be used to control which particles are effected by a specific attractor. For :ref:`Decal`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific decal. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_VisualInstance3D_method__get_aabb: -- :ref:`AABB` **_get_aabb** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`AABB` **_get_aabb** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualInstance3D_method_get_aabb: -- :ref:`AABB` **get_aabb** **(** **)** |const| +.. rst-class:: classref-method -Returns the :ref:`AABB` (also known as the bounding box) for this ``VisualInstance3D``. +:ref:`AABB` **get_aabb** **(** **)** |const| + +Returns the :ref:`AABB` (also known as the bounding box) for this **VisualInstance3D**. + +.. rst-class:: classref-item-separator ---- .. _class_VisualInstance3D_method_get_base: -- :ref:`RID` **get_base** **(** **)** |const| +.. rst-class:: classref-method -Returns the RID of the resource associated with this ``VisualInstance3D``. For example, if the Node is a :ref:`MeshInstance3D`, this will return the RID of the associated :ref:`Mesh`. +:ref:`RID` **get_base** **(** **)** |const| + +Returns the RID of the resource associated with this **VisualInstance3D**. For example, if the Node is a :ref:`MeshInstance3D`, this will return the RID of the associated :ref:`Mesh`. + +.. rst-class:: classref-item-separator ---- .. _class_VisualInstance3D_method_get_instance: -- :ref:`RID` **get_instance** **(** **)** |const| +.. rst-class:: classref-method -Returns the RID of this instance. This RID is the same as the RID returned by :ref:`RenderingServer.instance_create`. This RID is needed if you want to call :ref:`RenderingServer` functions directly on this ``VisualInstance3D``. +:ref:`RID` **get_instance** **(** **)** |const| + +Returns the RID of this instance. This RID is the same as the RID returned by :ref:`RenderingServer.instance_create`. This RID is needed if you want to call :ref:`RenderingServer` functions directly on this **VisualInstance3D**. + +.. rst-class:: classref-item-separator ---- .. _class_VisualInstance3D_method_get_layer_mask_value: -- :ref:`bool` **get_layer_mask_value** **(** :ref:`int` layer_number **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_layer_mask_value** **(** :ref:`int` layer_number **)** |const| Returns whether or not the specified layer of the :ref:`layers` is enabled, given a ``layer_number`` between 1 and 20. +.. rst-class:: classref-item-separator + ---- .. _class_VisualInstance3D_method_set_base: -- void **set_base** **(** :ref:`RID` base **)** +.. rst-class:: classref-method -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`. +void **set_base** **(** :ref:`RID` 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`. + +.. rst-class:: classref-item-separator ---- .. _class_VisualInstance3D_method_set_layer_mask_value: -- void **set_layer_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +.. rst-class:: classref-method + +void **set_layer_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** Based on ``value``, enables or disables the specified layer in the :ref:`layers`, given a ``layer_number`` between 1 and 20. diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index df9144809..69452d672 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -14,6 +14,8 @@ VisualShader A custom shader program with a visual editor. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,339 +23,548 @@ This class allows you to define a custom shader program that can be used for var The visual shader editor creates the shader. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+---------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`graph_offset` | ``Vector2(0, 0)`` | -+-------------------------------+---------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`graph_offset` | ``Vector2(0, 0)`` | + +-------------------------------+---------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_node` **(** :ref:`Type` type, :ref:`VisualShaderNode` node, :ref:`Vector2` position, :ref:`int` id **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_varying` **(** :ref:`String` name, :ref:`VaryingMode` mode, :ref:`VaryingType` type **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_connect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`connect_nodes_forced` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VisualShaderNode` | :ref:`get_node` **(** :ref:`Type` type, :ref:`int` id **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary[]` | :ref:`get_node_connections` **(** :ref:`Type` type **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_node_list` **(** :ref:`Type` type **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_node_position` **(** :ref:`Type` type, :ref:`int` id **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_valid_node_id` **(** :ref:`Type` type **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_varying` **(** :ref:`String` name **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_node_connection` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_node` **(** :ref:`Type` type, :ref:`int` id **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_varying` **(** :ref:`String` name **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`replace_node` **(** :ref:`Type` type, :ref:`int` id, :ref:`StringName` new_class **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_mode` **(** :ref:`Mode` mode **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_node_position` **(** :ref:`Type` type, :ref:`int` id, :ref:`Vector2` position **)** | -+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_node` **(** :ref:`Type` type, :ref:`VisualShaderNode` node, :ref:`Vector2` position, :ref:`int` id **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_varying` **(** :ref:`String` name, :ref:`VaryingMode` mode, :ref:`VaryingType` type **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_connect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`connect_nodes_forced` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`disconnect_nodes` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VisualShaderNode` | :ref:`get_node` **(** :ref:`Type` type, :ref:`int` id **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`get_node_connections` **(** :ref:`Type` type **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_node_list` **(** :ref:`Type` type **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_node_position` **(** :ref:`Type` type, :ref:`int` id **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_valid_node_id` **(** :ref:`Type` type **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_varying` **(** :ref:`String` name **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_node_connection` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_node` **(** :ref:`Type` type, :ref:`int` id **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_varying` **(** :ref:`String` name **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`replace_node` **(** :ref:`Type` type, :ref:`int` id, :ref:`StringName` new_class **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_mode` **(** :ref:`Mode` mode **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_node_position` **(** :ref:`Type` type, :ref:`int` id, :ref:`Vector2` position **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShader_Type: -.. _class_VisualShader_constant_TYPE_VERTEX: - -.. _class_VisualShader_constant_TYPE_FRAGMENT: - -.. _class_VisualShader_constant_TYPE_LIGHT: - -.. _class_VisualShader_constant_TYPE_START: - -.. _class_VisualShader_constant_TYPE_PROCESS: - -.. _class_VisualShader_constant_TYPE_COLLIDE: - -.. _class_VisualShader_constant_TYPE_START_CUSTOM: - -.. _class_VisualShader_constant_TYPE_PROCESS_CUSTOM: - -.. _class_VisualShader_constant_TYPE_SKY: - -.. _class_VisualShader_constant_TYPE_FOG: - -.. _class_VisualShader_constant_TYPE_MAX: +.. rst-class:: classref-enumeration enum **Type**: -- **TYPE_VERTEX** = **0** --- A vertex shader, operating on vertices. +.. _class_VisualShader_constant_TYPE_VERTEX: -- **TYPE_FRAGMENT** = **1** --- A fragment shader, operating on fragments (pixels). +.. rst-class:: classref-enumeration-constant -- **TYPE_LIGHT** = **2** --- A shader for light calculations. +:ref:`Type` **TYPE_VERTEX** = ``0`` -- **TYPE_START** = **3** +A vertex shader, operating on vertices. -- **TYPE_PROCESS** = **4** +.. _class_VisualShader_constant_TYPE_FRAGMENT: -- **TYPE_COLLIDE** = **5** +.. rst-class:: classref-enumeration-constant -- **TYPE_START_CUSTOM** = **6** +:ref:`Type` **TYPE_FRAGMENT** = ``1`` -- **TYPE_PROCESS_CUSTOM** = **7** +A fragment shader, operating on fragments (pixels). -- **TYPE_SKY** = **8** +.. _class_VisualShader_constant_TYPE_LIGHT: -- **TYPE_FOG** = **9** --- A compute shader that runs for each froxel of the volumetric fog map. +.. rst-class:: classref-enumeration-constant -- **TYPE_MAX** = **10** --- Represents the size of the :ref:`Type` enum. +:ref:`Type` **TYPE_LIGHT** = ``2`` + +A shader for light calculations. + +.. _class_VisualShader_constant_TYPE_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_START** = ``3`` + + + +.. _class_VisualShader_constant_TYPE_PROCESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_PROCESS** = ``4`` + + + +.. _class_VisualShader_constant_TYPE_COLLIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_COLLIDE** = ``5`` + + + +.. _class_VisualShader_constant_TYPE_START_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_START_CUSTOM** = ``6`` + + + +.. _class_VisualShader_constant_TYPE_PROCESS_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_PROCESS_CUSTOM** = ``7`` + + + +.. _class_VisualShader_constant_TYPE_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_SKY** = ``8`` + + + +.. _class_VisualShader_constant_TYPE_FOG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_FOG** = ``9`` + +A compute shader that runs for each froxel of the volumetric fog map. + +.. _class_VisualShader_constant_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Type` **TYPE_MAX** = ``10`` + +Represents the size of the :ref:`Type` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShader_VaryingMode: -.. _class_VisualShader_constant_VARYING_MODE_VERTEX_TO_FRAG_LIGHT: - -.. _class_VisualShader_constant_VARYING_MODE_FRAG_TO_LIGHT: - -.. _class_VisualShader_constant_VARYING_MODE_MAX: +.. rst-class:: classref-enumeration enum **VaryingMode**: -- **VARYING_MODE_VERTEX_TO_FRAG_LIGHT** = **0** +.. _class_VisualShader_constant_VARYING_MODE_VERTEX_TO_FRAG_LIGHT: -- **VARYING_MODE_FRAG_TO_LIGHT** = **1** +.. rst-class:: classref-enumeration-constant -- **VARYING_MODE_MAX** = **2** +:ref:`VaryingMode` **VARYING_MODE_VERTEX_TO_FRAG_LIGHT** = ``0`` + + + +.. _class_VisualShader_constant_VARYING_MODE_FRAG_TO_LIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingMode` **VARYING_MODE_FRAG_TO_LIGHT** = ``1`` + + + +.. _class_VisualShader_constant_VARYING_MODE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingMode` **VARYING_MODE_MAX** = ``2`` + + + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShader_VaryingType: -.. _class_VisualShader_constant_VARYING_TYPE_FLOAT: - -.. _class_VisualShader_constant_VARYING_TYPE_INT: - -.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_2D: - -.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_3D: - -.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_4D: - -.. _class_VisualShader_constant_VARYING_TYPE_BOOLEAN: - -.. _class_VisualShader_constant_VARYING_TYPE_TRANSFORM: - -.. _class_VisualShader_constant_VARYING_TYPE_MAX: +.. rst-class:: classref-enumeration enum **VaryingType**: -- **VARYING_TYPE_FLOAT** = **0** +.. _class_VisualShader_constant_VARYING_TYPE_FLOAT: -- **VARYING_TYPE_INT** = **1** +.. rst-class:: classref-enumeration-constant -- **VARYING_TYPE_VECTOR_2D** = **2** +:ref:`VaryingType` **VARYING_TYPE_FLOAT** = ``0`` -- **VARYING_TYPE_VECTOR_3D** = **3** -- **VARYING_TYPE_VECTOR_4D** = **4** -- **VARYING_TYPE_BOOLEAN** = **5** +.. _class_VisualShader_constant_VARYING_TYPE_INT: -- **VARYING_TYPE_TRANSFORM** = **6** +.. rst-class:: classref-enumeration-constant -- **VARYING_TYPE_MAX** = **7** +:ref:`VaryingType` **VARYING_TYPE_INT** = ``1`` + + + +.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingType` **VARYING_TYPE_VECTOR_2D** = ``2`` + + + +.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingType` **VARYING_TYPE_VECTOR_3D** = ``3`` + + + +.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingType` **VARYING_TYPE_VECTOR_4D** = ``4`` + + + +.. _class_VisualShader_constant_VARYING_TYPE_BOOLEAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingType` **VARYING_TYPE_BOOLEAN** = ``5`` + + + +.. _class_VisualShader_constant_VARYING_TYPE_TRANSFORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingType` **VARYING_TYPE_TRANSFORM** = ``6`` + + + +.. _class_VisualShader_constant_VARYING_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`VaryingType` **VARYING_TYPE_MAX** = ``7`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_VisualShader_constant_NODE_ID_INVALID: +.. rst-class:: classref-constant + +**NODE_ID_INVALID** = ``-1`` + + + .. _class_VisualShader_constant_NODE_ID_OUTPUT: -- **NODE_ID_INVALID** = **-1** +.. rst-class:: classref-constant -- **NODE_ID_OUTPUT** = **0** +**NODE_ID_OUTPUT** = ``0`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShader_property_graph_offset: -- :ref:`Vector2` **graph_offset** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_graph_offset(value) | -+-----------+-------------------------+ -| *Getter* | get_graph_offset() | -+-----------+-------------------------+ +:ref:`Vector2` **graph_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_graph_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_graph_offset** **(** **)** The offset vector of the whole graph. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VisualShader_method_add_node: -- void **add_node** **(** :ref:`Type` type, :ref:`VisualShaderNode` node, :ref:`Vector2` position, :ref:`int` id **)** +.. rst-class:: classref-method + +void **add_node** **(** :ref:`Type` type, :ref:`VisualShaderNode` node, :ref:`Vector2` position, :ref:`int` id **)** Adds the specified ``node`` to the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_add_varying: -- void **add_varying** **(** :ref:`String` name, :ref:`VaryingMode` mode, :ref:`VaryingType` type **)** +.. rst-class:: classref-method + +void **add_varying** **(** :ref:`String` name, :ref:`VaryingMode` mode, :ref:`VaryingType` type **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_can_connect_nodes: -- :ref:`bool` **can_connect_nodes** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_connect_nodes** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| Returns ``true`` if the specified nodes and ports can be connected together. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_connect_nodes: -- :ref:`Error` **connect_nodes** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-method + +:ref:`Error` **connect_nodes** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** Connects the specified nodes and ports. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_connect_nodes_forced: -- void **connect_nodes_forced** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-method + +void **connect_nodes_forced** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_disconnect_nodes: -- void **disconnect_nodes** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** +.. rst-class:: classref-method + +void **disconnect_nodes** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** Connects the specified nodes and ports. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_get_node: -- :ref:`VisualShaderNode` **get_node** **(** :ref:`Type` type, :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`VisualShaderNode` **get_node** **(** :ref:`Type` type, :ref:`int` id **)** |const| Returns the shader node instance with specified ``type`` and ``id``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_get_node_connections: -- :ref:`Dictionary[]` **get_node_connections** **(** :ref:`Type` type **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_node_connections** **(** :ref:`Type` type **)** |const| Returns the list of connected nodes with the specified type. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_get_node_list: -- :ref:`PackedInt32Array` **get_node_list** **(** :ref:`Type` type **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_node_list** **(** :ref:`Type` type **)** |const| Returns the list of all nodes in the shader with the specified type. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_get_node_position: -- :ref:`Vector2` **get_node_position** **(** :ref:`Type` type, :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_node_position** **(** :ref:`Type` type, :ref:`int` id **)** |const| Returns the position of the specified node within the shader graph. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_get_valid_node_id: -- :ref:`int` **get_valid_node_id** **(** :ref:`Type` type **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_valid_node_id** **(** :ref:`Type` type **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_has_varying: -- :ref:`bool` **has_varying** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_varying** **(** :ref:`String` name **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_is_node_connection: -- :ref:`bool` **is_node_connection** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_node_connection** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** |const| Returns ``true`` if the specified node and port connection exist. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_remove_node: -- void **remove_node** **(** :ref:`Type` type, :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_node** **(** :ref:`Type` type, :ref:`int` id **)** Removes the specified node from the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_remove_varying: -- void **remove_varying** **(** :ref:`String` name **)** +.. rst-class:: classref-method + +void **remove_varying** **(** :ref:`String` name **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_replace_node: -- void **replace_node** **(** :ref:`Type` type, :ref:`int` id, :ref:`StringName` new_class **)** +.. rst-class:: classref-method + +void **replace_node** **(** :ref:`Type` type, :ref:`int` id, :ref:`StringName` new_class **)** Replaces the specified node with a node of new class type. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_set_mode: -- void **set_mode** **(** :ref:`Mode` mode **)** +.. rst-class:: classref-method + +void **set_mode** **(** :ref:`Mode` mode **)** Sets the mode of this shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShader_method_set_node_position: -- void **set_node_position** **(** :ref:`Type` type, :ref:`int` id, :ref:`Vector2` position **)** +.. rst-class:: classref-method + +void **set_node_position** **(** :ref:`Type` type, :ref:`int` id, :ref:`Vector2` position **)** Sets the position of the specified node. diff --git a/classes/class_visualshadernode.rst b/classes/class_visualshadernode.rst index f1223ccef..6db49ed6c 100644 --- a/classes/class_visualshadernode.rst +++ b/classes/class_visualshadernode.rst @@ -16,155 +16,254 @@ VisualShaderNode Base class for nodes in a visual shader graph. +.. 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. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`VisualShaders <../tutorials/shaders/visual_shaders>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+-----------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`output_port_for_preview` | ``-1`` | -+-----------------------+-----------------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`output_port_for_preview` | ``-1`` | + +-----------------------+-----------------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_default_input_values` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_default_input_values` **(** **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_input_port_default_value` **(** :ref:`int` port **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_input_port_default_value` **(** :ref:`int` port **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_input_values` **(** :ref:`Array` values **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_port_default_value` **(** :ref:`int` port, :ref:`Variant` value, :ref:`Variant` prev_value=null **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_default_input_values` **(** **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_default_input_values` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_input_port_default_value` **(** :ref:`int` port **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_input_port_default_value` **(** :ref:`int` port **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_input_values` **(** :ref:`Array` values **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_input_port_default_value` **(** :ref:`int` port, :ref:`Variant` value, :ref:`Variant` prev_value=null **)** | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_VisualShaderNode_signal_editor_refresh_request: -- **editor_refresh_request** **(** **)** +.. rst-class:: classref-signal + +**editor_refresh_request** **(** **)** Emitted when the node requests an editor refresh. Currently called only in setter of :ref:`VisualShaderNodeTexture.source`, :ref:`VisualShaderNodeTexture`, and :ref:`VisualShaderNodeCubemap` (and their derivatives). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_VisualShaderNode_PortType: -.. _class_VisualShaderNode_constant_PORT_TYPE_SCALAR: - -.. _class_VisualShaderNode_constant_PORT_TYPE_SCALAR_INT: - -.. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_2D: - -.. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_3D: - -.. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_4D: - -.. _class_VisualShaderNode_constant_PORT_TYPE_BOOLEAN: - -.. _class_VisualShaderNode_constant_PORT_TYPE_TRANSFORM: - -.. _class_VisualShaderNode_constant_PORT_TYPE_SAMPLER: - -.. _class_VisualShaderNode_constant_PORT_TYPE_MAX: +.. rst-class:: classref-enumeration enum **PortType**: -- **PORT_TYPE_SCALAR** = **0** --- Floating-point scalar. Translated to ``float`` type in shader code. +.. _class_VisualShaderNode_constant_PORT_TYPE_SCALAR: -- **PORT_TYPE_SCALAR_INT** = **1** --- Integer scalar. Translated to ``int`` type in shader code. +.. rst-class:: classref-enumeration-constant -- **PORT_TYPE_VECTOR_2D** = **2** --- 2D vector of floating-point values. Translated to ``vec2`` type in shader code. +:ref:`PortType` **PORT_TYPE_SCALAR** = ``0`` -- **PORT_TYPE_VECTOR_3D** = **3** --- 3D vector of floating-point values. Translated to ``vec3`` type in shader code. +Floating-point scalar. Translated to ``float`` type in shader code. -- **PORT_TYPE_VECTOR_4D** = **4** --- 4D vector of floating-point values. Translated to ``vec4`` type in shader code. +.. _class_VisualShaderNode_constant_PORT_TYPE_SCALAR_INT: -- **PORT_TYPE_BOOLEAN** = **5** --- Boolean type. Translated to ``bool`` type in shader code. +.. rst-class:: classref-enumeration-constant -- **PORT_TYPE_TRANSFORM** = **6** --- Transform type. Translated to ``mat4`` type in shader code. +:ref:`PortType` **PORT_TYPE_SCALAR_INT** = ``1`` -- **PORT_TYPE_SAMPLER** = **7** --- Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. +Integer scalar. Translated to ``int`` type in shader code. -- **PORT_TYPE_MAX** = **8** --- Represents the size of the :ref:`PortType` enum. +.. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`PortType` **PORT_TYPE_VECTOR_2D** = ``2`` + +2D vector of floating-point values. Translated to ``vec2`` type in shader code. + +.. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`PortType` **PORT_TYPE_VECTOR_3D** = ``3`` + +3D vector of floating-point values. Translated to ``vec3`` type in shader code. + +.. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`PortType` **PORT_TYPE_VECTOR_4D** = ``4`` + +4D vector of floating-point values. Translated to ``vec4`` type in shader code. + +.. _class_VisualShaderNode_constant_PORT_TYPE_BOOLEAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`PortType` **PORT_TYPE_BOOLEAN** = ``5`` + +Boolean type. Translated to ``bool`` type in shader code. + +.. _class_VisualShaderNode_constant_PORT_TYPE_TRANSFORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`PortType` **PORT_TYPE_TRANSFORM** = ``6`` + +Transform type. Translated to ``mat4`` type in shader code. + +.. _class_VisualShaderNode_constant_PORT_TYPE_SAMPLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PortType` **PORT_TYPE_SAMPLER** = ``7`` + +Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. + +.. _class_VisualShaderNode_constant_PORT_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`PortType` **PORT_TYPE_MAX** = ``8`` + +Represents the size of the :ref:`PortType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNode_property_output_port_for_preview: -- :ref:`int` **output_port_for_preview** +.. rst-class:: classref-property -+-----------+------------------------------------+ -| *Default* | ``-1`` | -+-----------+------------------------------------+ -| *Setter* | set_output_port_for_preview(value) | -+-----------+------------------------------------+ -| *Getter* | get_output_port_for_preview() | -+-----------+------------------------------------+ +:ref:`int` **output_port_for_preview** = ``-1`` + +.. rst-class:: classref-property-setget + +- void **set_output_port_for_preview** **(** :ref:`int` value **)** +- :ref:`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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VisualShaderNode_method_clear_default_input_values: -- void **clear_default_input_values** **(** **)** +.. rst-class:: classref-method + +void **clear_default_input_values** **(** **)** Clears the default input ports value. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNode_method_get_default_input_values: -- :ref:`Array` **get_default_input_values** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Array` **get_default_input_values** **(** **)** |const| Returns an :ref:`Array` containing default values for all of the input ports of the node in the form ``[index0, value0, index1, value1, ...]``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNode_method_get_input_port_default_value: -- :ref:`Variant` **get_input_port_default_value** **(** :ref:`int` port **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_input_port_default_value** **(** :ref:`int` port **)** |const| Returns the default value of the input ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNode_method_remove_input_port_default_value: -- void **remove_input_port_default_value** **(** :ref:`int` port **)** +.. rst-class:: classref-method + +void **remove_input_port_default_value** **(** :ref:`int` port **)** Removes the default value of the input ``port``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNode_method_set_default_input_values: -- void **set_default_input_values** **(** :ref:`Array` values **)** +.. rst-class:: classref-method + +void **set_default_input_values** **(** :ref:`Array` values **)** Sets the default input ports values using an :ref:`Array` of the form ``[index0, value0, index1, value1, ...]``. For example: ``[0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)]``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNode_method_set_input_port_default_value: -- void **set_input_port_default_value** **(** :ref:`int` port, :ref:`Variant` value, :ref:`Variant` prev_value=null **)** +.. rst-class:: classref-method + +void **set_input_port_default_value** **(** :ref:`int` port, :ref:`Variant` value, :ref:`Variant` prev_value=null **)** Sets the default ``value`` for the selected input ``port``. diff --git a/classes/class_visualshadernodebillboard.rst b/classes/class_visualshadernodebillboard.rst index 721893e0d..e49ee1aeb 100644 --- a/classes/class_visualshadernodebillboard.rst +++ b/classes/class_visualshadernodebillboard.rst @@ -14,77 +14,118 @@ VisualShaderNodeBillboard A node that controls how the object faces the camera to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- The output port of this node needs to be connected to ``Model View Matrix`` port of :ref:`VisualShaderNodeOutput`. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------------+--------------------------------------------------------------------------------+-----------+ -| :ref:`BillboardType` | :ref:`billboard_type` | ``1`` | -+--------------------------------------------------------------------+--------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`keep_scale` | ``false`` | -+--------------------------------------------------------------------+--------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------+--------------------------------------------------------------------------------+-----------+ + | :ref:`BillboardType` | :ref:`billboard_type` | ``1`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`keep_scale` | ``false`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeBillboard_BillboardType: -.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_DISABLED: - -.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_ENABLED: - -.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_FIXED_Y: - -.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_PARTICLES: - -.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_MAX: +.. rst-class:: classref-enumeration enum **BillboardType**: -- **BILLBOARD_TYPE_DISABLED** = **0** --- Billboarding is disabled and the node does nothing. +.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_DISABLED: -- **BILLBOARD_TYPE_ENABLED** = **1** --- A standard billboarding algorithm is enabled. +.. rst-class:: classref-enumeration-constant -- **BILLBOARD_TYPE_FIXED_Y** = **2** --- A billboarding algorithm to rotate around Y-axis is enabled. +:ref:`BillboardType` **BILLBOARD_TYPE_DISABLED** = ``0`` -- **BILLBOARD_TYPE_PARTICLES** = **3** --- A billboarding algorithm designed to use on particles is enabled. +Billboarding is disabled and the node does nothing. -- **BILLBOARD_TYPE_MAX** = **4** --- Represents the size of the :ref:`BillboardType` enum. +.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BillboardType` **BILLBOARD_TYPE_ENABLED** = ``1`` + +A standard billboarding algorithm is enabled. + +.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_FIXED_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`BillboardType` **BILLBOARD_TYPE_FIXED_Y** = ``2`` + +A billboarding algorithm to rotate around Y-axis is enabled. + +.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_PARTICLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`BillboardType` **BILLBOARD_TYPE_PARTICLES** = ``3`` + +A billboarding algorithm designed to use on particles is enabled. + +.. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BillboardType` **BILLBOARD_TYPE_MAX** = ``4`` + +Represents the size of the :ref:`BillboardType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeBillboard_property_billboard_type: -- :ref:`BillboardType` **billboard_type** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------+ -| *Setter* | set_billboard_type(value) | -+-----------+---------------------------+ -| *Getter* | get_billboard_type() | -+-----------+---------------------------+ +:ref:`BillboardType` **billboard_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_billboard_type** **(** :ref:`BillboardType` value **)** +- :ref:`BillboardType` **get_billboard_type** **(** **)** Controls how the object faces the camera. See :ref:`BillboardType`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeBillboard_property_keep_scale: -- :ref:`bool` **keep_scale** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_keep_scale_enabled(value) | -+-----------+-------------------------------+ -| *Getter* | is_keep_scale_enabled() | -+-----------+-------------------------------+ +:ref:`bool` **keep_scale** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_keep_scale_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_keep_scale_enabled** **(** **)** If ``true``, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. diff --git a/classes/class_visualshadernodebooleanconstant.rst b/classes/class_visualshadernodebooleanconstant.rst index 34c1260bd..5d6ca20b8 100644 --- a/classes/class_visualshadernodebooleanconstant.rst +++ b/classes/class_visualshadernodebooleanconstant.rst @@ -14,6 +14,8 @@ VisualShaderNodeBooleanConstant A boolean constant to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,27 +23,37 @@ Has only one output port and no inputs. Translated to ``bool`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+--------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`constant` | ``false`` | -+-------------------------+--------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+--------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`constant` | ``false`` | + +-------------------------+--------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeBooleanConstant_property_constant: -- :ref:`bool` **constant** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_constant(value) | -+-----------+---------------------+ -| *Getter* | get_constant() | -+-----------+---------------------+ +:ref:`bool` **constant** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`bool` value **)** +- :ref:`bool` **get_constant** **(** **)** A boolean constant which represents a state of this node. diff --git a/classes/class_visualshadernodebooleanparameter.rst b/classes/class_visualshadernodebooleanparameter.rst index 6bc329196..cc3bbf137 100644 --- a/classes/class_visualshadernodebooleanparameter.rst +++ b/classes/class_visualshadernodebooleanparameter.rst @@ -14,50 +14,63 @@ VisualShaderNodeBooleanParameter A boolean parameter to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform bool`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`default_value` | ``false`` | -+-------------------------+-----------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+-------------------------+-----------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`default_value` | ``false`` | + +-------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +-------------------------+-----------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeBooleanParameter_property_default_value: -- :ref:`bool` **default_value** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_default_value(value) | -+-----------+--------------------------+ -| *Getter* | get_default_value() | -+-----------+--------------------------+ +:ref:`bool` **default_value** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`bool` value **)** +- :ref:`bool` **get_default_value** **(** **)** A default value to be assigned within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeBooleanParameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** Enables usage of the :ref:`default_value`. diff --git a/classes/class_visualshadernodeclamp.rst b/classes/class_visualshadernodeclamp.rst index ec2f81934..a995e3df6 100644 --- a/classes/class_visualshadernodeclamp.rst +++ b/classes/class_visualshadernodeclamp.rst @@ -14,63 +14,107 @@ VisualShaderNodeClamp Clamps a value within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Constrains a value to lie between ``min`` and ``max`` values. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------+--------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+--------------------------------------------------+--------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------+--------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +--------------------------------------------------+--------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeClamp_OpType: -.. _class_VisualShaderNodeClamp_constant_OP_TYPE_FLOAT: - -.. _class_VisualShaderNodeClamp_constant_OP_TYPE_INT: - -.. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeClamp_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_FLOAT** = **0** --- A floating-point scalar. +.. _class_VisualShaderNodeClamp_constant_OP_TYPE_FLOAT: -- **OP_TYPE_INT** = **1** --- An integer scalar. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_2D** = **2** --- A 2D vector type. +:ref:`OpType` **OP_TYPE_FLOAT** = ``0`` -- **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type. +A floating-point scalar. -- **OP_TYPE_VECTOR_4D** = **4** --- A 4D vector type. +.. _class_VisualShaderNodeClamp_constant_OP_TYPE_INT: -- **OP_TYPE_MAX** = **5** --- Represents the size of the :ref:`OpType` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_INT** = ``1`` + +An integer scalar. + +.. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``2`` + +A 2D vector type. + +.. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``3`` + +A 3D vector type. + +.. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``4`` + +A 4D vector type. + +.. _class_VisualShaderNodeClamp_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``5`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeClamp_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. diff --git a/classes/class_visualshadernodecolorconstant.rst b/classes/class_visualshadernodecolorconstant.rst index eba67ec4e..fb34b3201 100644 --- a/classes/class_visualshadernodecolorconstant.rst +++ b/classes/class_visualshadernodecolorconstant.rst @@ -14,6 +14,8 @@ VisualShaderNodeColorConstant A :ref:`Color` constant to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,27 +23,37 @@ Has two output ports representing RGB and alpha channels of :ref:`Color` | :ref:`constant` | ``Color(1, 1, 1, 1)`` | -+---------------------------+------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`constant` | ``Color(1, 1, 1, 1)`` | + +---------------------------+------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeColorConstant_property_constant: -- :ref:`Color` **constant** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ -| *Setter* | set_constant(value) | -+-----------+-----------------------+ -| *Getter* | get_constant() | -+-----------+-----------------------+ +:ref:`Color` **constant** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`Color` value **)** +- :ref:`Color` **get_constant** **(** **)** A :ref:`Color` constant which represents a state of this node. diff --git a/classes/class_visualshadernodecolorfunc.rst b/classes/class_visualshadernodecolorfunc.rst index 883d65271..4c6fdd9e7 100644 --- a/classes/class_visualshadernodecolorfunc.rst +++ b/classes/class_visualshadernodecolorfunc.rst @@ -14,36 +14,47 @@ VisualShaderNodeColorFunc A :ref:`Color` function to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Accept a :ref:`Color` to the input port and transform it according to :ref:`function`. +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------+--------------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``0`` | -+----------------------------------------------------------+--------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+--------------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``0`` | + +----------------------------------------------------------+--------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeColorFunc_Function: -.. _class_VisualShaderNodeColorFunc_constant_FUNC_GRAYSCALE: - -.. _class_VisualShaderNodeColorFunc_constant_FUNC_HSV2RGB: - -.. _class_VisualShaderNodeColorFunc_constant_FUNC_RGB2HSV: - -.. _class_VisualShaderNodeColorFunc_constant_FUNC_SEPIA: - -.. _class_VisualShaderNodeColorFunc_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_GRAYSCALE** = **0** --- Converts the color to grayscale using the following formula: +.. _class_VisualShaderNodeColorFunc_constant_FUNC_GRAYSCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_GRAYSCALE** = ``0`` + +Converts the color to grayscale using the following formula: :: @@ -53,11 +64,29 @@ enum **Function**: float max3 = max(max1, max2); return vec3(max3, max3, max3); -- **FUNC_HSV2RGB** = **1** --- Converts HSV vector to RGB equivalent. +.. _class_VisualShaderNodeColorFunc_constant_FUNC_HSV2RGB: -- **FUNC_RGB2HSV** = **2** --- Converts RGB vector to HSV equivalent. +.. rst-class:: classref-enumeration-constant -- **FUNC_SEPIA** = **3** --- Applies sepia tone effect using the following formula: +:ref:`Function` **FUNC_HSV2RGB** = ``1`` + +Converts HSV vector to RGB equivalent. + +.. _class_VisualShaderNodeColorFunc_constant_FUNC_RGB2HSV: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_RGB2HSV** = ``2`` + +Converts RGB vector to HSV equivalent. + +.. _class_VisualShaderNodeColorFunc_constant_FUNC_SEPIA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SEPIA** = ``3`` + +Applies sepia tone effect using the following formula: :: @@ -67,22 +96,33 @@ enum **Function**: float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131); return vec3(r, g, b); -- **FUNC_MAX** = **4** --- Represents the size of the :ref:`Function` enum. +.. _class_VisualShaderNodeColorFunc_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``4`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeColorFunc_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** A function to be applied to the input color. See :ref:`Function` for options. diff --git a/classes/class_visualshadernodecolorop.rst b/classes/class_visualshadernodecolorop.rst index 77fc8246a..450f63118 100644 --- a/classes/class_visualshadernodecolorop.rst +++ b/classes/class_visualshadernodecolorop.rst @@ -14,70 +14,95 @@ VisualShaderNodeColorOp A :ref:`Color` operator to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Applies :ref:`operator` to two color inputs. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`Operator` | :ref:`operator` | ``0`` | -+--------------------------------------------------------+------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`Operator` | :ref:`operator` | ``0`` | + +--------------------------------------------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeColorOp_Operator: -.. _class_VisualShaderNodeColorOp_constant_OP_SCREEN: - -.. _class_VisualShaderNodeColorOp_constant_OP_DIFFERENCE: - -.. _class_VisualShaderNodeColorOp_constant_OP_DARKEN: - -.. _class_VisualShaderNodeColorOp_constant_OP_LIGHTEN: - -.. _class_VisualShaderNodeColorOp_constant_OP_OVERLAY: - -.. _class_VisualShaderNodeColorOp_constant_OP_DODGE: - -.. _class_VisualShaderNodeColorOp_constant_OP_BURN: - -.. _class_VisualShaderNodeColorOp_constant_OP_SOFT_LIGHT: - -.. _class_VisualShaderNodeColorOp_constant_OP_HARD_LIGHT: - -.. _class_VisualShaderNodeColorOp_constant_OP_MAX: +.. rst-class:: classref-enumeration enum **Operator**: -- **OP_SCREEN** = **0** --- Produce a screen effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_SCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_SCREEN** = ``0`` + +Produce a screen effect with the following formula: :: result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b); -- **OP_DIFFERENCE** = **1** --- Produce a difference effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_DIFFERENCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_DIFFERENCE** = ``1`` + +Produce a difference effect with the following formula: :: result = abs(a - b); -- **OP_DARKEN** = **2** --- Produce a darken effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_DARKEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_DARKEN** = ``2`` + +Produce a darken effect with the following formula: :: result = min(a, b); -- **OP_LIGHTEN** = **3** --- Produce a lighten effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_LIGHTEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_LIGHTEN** = ``3`` + +Produce a lighten effect with the following formula: :: result = max(a, b); -- **OP_OVERLAY** = **4** --- Produce an overlay effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_OVERLAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_OVERLAY** = ``4`` + +Produce an overlay effect with the following formula: :: @@ -91,19 +116,37 @@ enum **Operator**: } } -- **OP_DODGE** = **5** --- Produce a dodge effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_DODGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_DODGE** = ``5`` + +Produce a dodge effect with the following formula: :: result = a / (vec3(1.0) - b); -- **OP_BURN** = **6** --- Produce a burn effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_BURN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BURN** = ``6`` + +Produce a burn effect with the following formula: :: result = vec3(1.0) - (vec3(1.0) - a) / b; -- **OP_SOFT_LIGHT** = **7** --- Produce a soft light effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_SOFT_LIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_SOFT_LIGHT** = ``7`` + +Produce a soft light effect with the following formula: :: @@ -117,7 +160,13 @@ enum **Operator**: } } -- **OP_HARD_LIGHT** = **8** --- Produce a hard light effect with the following formula: +.. _class_VisualShaderNodeColorOp_constant_OP_HARD_LIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_HARD_LIGHT** = ``8`` + +Produce a hard light effect with the following formula: :: @@ -131,22 +180,33 @@ enum **Operator**: } } -- **OP_MAX** = **9** --- Represents the size of the :ref:`Operator` enum. +.. _class_VisualShaderNodeColorOp_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MAX** = ``9`` + +Represents the size of the :ref:`Operator` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeColorOp_property_operator: -- :ref:`Operator` **operator** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_operator(value) | -+-----------+---------------------+ -| *Getter* | get_operator() | -+-----------+---------------------+ +:ref:`Operator` **operator** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operator** **(** :ref:`Operator` value **)** +- :ref:`Operator` **get_operator** **(** **)** An operator to be applied to the inputs. See :ref:`Operator` for options. diff --git a/classes/class_visualshadernodecolorparameter.rst b/classes/class_visualshadernodecolorparameter.rst index f1fe9b91e..f5ba8c2a6 100644 --- a/classes/class_visualshadernodecolorparameter.rst +++ b/classes/class_visualshadernodecolorparameter.rst @@ -14,50 +14,63 @@ VisualShaderNodeColorParameter A :ref:`Color` parameter to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform vec4`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`default_value` | ``Color(1, 1, 1, 1)`` | -+---------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+---------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`default_value` | ``Color(1, 1, 1, 1)`` | + +---------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +---------------------------+---------------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeColorParameter_property_default_value: -- :ref:`Color` **default_value** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+--------------------------+ -| *Setter* | set_default_value(value) | -+-----------+--------------------------+ -| *Getter* | get_default_value() | -+-----------+--------------------------+ +:ref:`Color` **default_value** = ``Color(1, 1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`Color` value **)** +- :ref:`Color` **get_default_value** **(** **)** A default value to be assigned within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeColorParameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** Enables usage of the :ref:`default_value`. diff --git a/classes/class_visualshadernodecomment.rst b/classes/class_visualshadernodecomment.rst index 1a7bc1dd7..004402bf9 100644 --- a/classes/class_visualshadernodecomment.rst +++ b/classes/class_visualshadernodecomment.rst @@ -14,50 +14,63 @@ VisualShaderNodeComment A comment node to be placed on visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A resizable rectangular area with changeable :ref:`title` and :ref:`description` used for better organizing of other visual shader nodes. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`description` | ``""`` | -+-----------------------------+------------------------------------------------------------------------+---------------+ -| :ref:`String` | :ref:`title` | ``"Comment"`` | -+-----------------------------+------------------------------------------------------------------------+---------------+ +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------------------------------+---------------+ + | :ref:`String` | :ref:`description` | ``""`` | + +-----------------------------+------------------------------------------------------------------------+---------------+ + | :ref:`String` | :ref:`title` | ``"Comment"`` | + +-----------------------------+------------------------------------------------------------------------+---------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeComment_property_description: -- :ref:`String` **description** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``""`` | -+-----------+------------------------+ -| *Setter* | set_description(value) | -+-----------+------------------------+ -| *Getter* | get_description() | -+-----------+------------------------+ +:ref:`String` **description** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_description** **(** :ref:`String` value **)** +- :ref:`String` **get_description** **(** **)** An additional description which placed below the title. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeComment_property_title: -- :ref:`String` **title** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``"Comment"`` | -+-----------+------------------+ -| *Setter* | set_title(value) | -+-----------+------------------+ -| *Getter* | get_title() | -+-----------+------------------+ +:ref:`String` **title** = ``"Comment"`` + +.. rst-class:: classref-property-setget + +- void **set_title** **(** :ref:`String` value **)** +- :ref:`String` **get_title** **(** **)** A title of the node. diff --git a/classes/class_visualshadernodecompare.rst b/classes/class_visualshadernodecompare.rst index f01bb0b4c..463daebf0 100644 --- a/classes/class_visualshadernodecompare.rst +++ b/classes/class_visualshadernodecompare.rst @@ -14,159 +14,261 @@ VisualShaderNodeCompare A comparison function for common types within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Compares ``a`` and ``b`` of :ref:`type` by :ref:`function`. Returns a boolean scalar. Translates to ``if`` instruction in shader code. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ -| :ref:`Condition` | :ref:`condition` | ``0`` | -+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``0`` | -+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ -| :ref:`ComparisonType` | :ref:`type` | ``0`` | -+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ + | :ref:`Condition` | :ref:`condition` | ``0`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``0`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ + | :ref:`ComparisonType` | :ref:`type` | ``0`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeCompare_ComparisonType: -.. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR: - -.. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR_INT: - -.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_2D: - -.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_3D: - -.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_4D: - -.. _class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN: - -.. _class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM: - -.. _class_VisualShaderNodeCompare_constant_CTYPE_MAX: +.. rst-class:: classref-enumeration enum **ComparisonType**: -- **CTYPE_SCALAR** = **0** --- A floating-point scalar. +.. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR: -- **CTYPE_SCALAR_INT** = **1** --- An integer scalar. +.. rst-class:: classref-enumeration-constant -- **CTYPE_VECTOR_2D** = **2** --- A 2D vector type. +:ref:`ComparisonType` **CTYPE_SCALAR** = ``0`` -- **CTYPE_VECTOR_3D** = **3** --- A 3D vector type. +A floating-point scalar. -- **CTYPE_VECTOR_4D** = **4** --- A 4D vector type. +.. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR_INT: -- **CTYPE_BOOLEAN** = **5** --- A boolean type. +.. rst-class:: classref-enumeration-constant -- **CTYPE_TRANSFORM** = **6** --- A transform (``mat4``) type. +:ref:`ComparisonType` **CTYPE_SCALAR_INT** = ``1`` -- **CTYPE_MAX** = **7** --- Represents the size of the :ref:`ComparisonType` enum. +An integer scalar. + +.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`ComparisonType` **CTYPE_VECTOR_2D** = ``2`` + +A 2D vector type. + +.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`ComparisonType` **CTYPE_VECTOR_3D** = ``3`` + +A 3D vector type. + +.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`ComparisonType` **CTYPE_VECTOR_4D** = ``4`` + +A 4D vector type. + +.. _class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`ComparisonType` **CTYPE_BOOLEAN** = ``5`` + +A boolean type. + +.. _class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`ComparisonType` **CTYPE_TRANSFORM** = ``6`` + +A transform (``mat4``) type. + +.. _class_VisualShaderNodeCompare_constant_CTYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ComparisonType` **CTYPE_MAX** = ``7`` + +Represents the size of the :ref:`ComparisonType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeCompare_Function: -.. _class_VisualShaderNodeCompare_constant_FUNC_EQUAL: - -.. _class_VisualShaderNodeCompare_constant_FUNC_NOT_EQUAL: - -.. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN: - -.. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN_EQUAL: - -.. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN: - -.. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN_EQUAL: - -.. _class_VisualShaderNodeCompare_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_EQUAL** = **0** --- Comparison for equality (``a == b``). +.. _class_VisualShaderNodeCompare_constant_FUNC_EQUAL: -- **FUNC_NOT_EQUAL** = **1** --- Comparison for inequality (``a != b``). +.. rst-class:: classref-enumeration-constant -- **FUNC_GREATER_THAN** = **2** --- Comparison for greater than (``a > b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. +:ref:`Function` **FUNC_EQUAL** = ``0`` -- **FUNC_GREATER_THAN_EQUAL** = **3** --- Comparison for greater than or equal (``a >= b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. +Comparison for equality (``a == b``). -- **FUNC_LESS_THAN** = **4** --- Comparison for less than (``a < b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. +.. _class_VisualShaderNodeCompare_constant_FUNC_NOT_EQUAL: -- **FUNC_LESS_THAN_EQUAL** = **5** --- Comparison for less than or equal (``a <= b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. +.. rst-class:: classref-enumeration-constant -- **FUNC_MAX** = **6** --- Represents the size of the :ref:`Function` enum. +:ref:`Function` **FUNC_NOT_EQUAL** = ``1`` + +Comparison for inequality (``a != b``). + +.. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_GREATER_THAN** = ``2`` + +Comparison for greater than (``a > b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. + +.. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_GREATER_THAN_EQUAL** = ``3`` + +Comparison for greater than or equal (``a >= b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. + +.. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LESS_THAN** = ``4`` + +Comparison for less than (``a < b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. + +.. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LESS_THAN_EQUAL** = ``5`` + +Comparison for less than or equal (``a <= b``). Cannot be used if :ref:`type` set to :ref:`CTYPE_BOOLEAN` or :ref:`CTYPE_TRANSFORM`. + +.. _class_VisualShaderNodeCompare_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``6`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeCompare_Condition: -.. _class_VisualShaderNodeCompare_constant_COND_ALL: - -.. _class_VisualShaderNodeCompare_constant_COND_ANY: - -.. _class_VisualShaderNodeCompare_constant_COND_MAX: +.. rst-class:: classref-enumeration enum **Condition**: -- **COND_ALL** = **0** --- The result will be true if all of component in vector satisfy the comparison condition. +.. _class_VisualShaderNodeCompare_constant_COND_ALL: -- **COND_ANY** = **1** --- The result will be true if any of component in vector satisfy the comparison condition. +.. rst-class:: classref-enumeration-constant -- **COND_MAX** = **2** --- Represents the size of the :ref:`Condition` enum. +:ref:`Condition` **COND_ALL** = ``0`` + +The result will be true if all of component in vector satisfy the comparison condition. + +.. _class_VisualShaderNodeCompare_constant_COND_ANY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Condition` **COND_ANY** = ``1`` + +The result will be true if any of component in vector satisfy the comparison condition. + +.. _class_VisualShaderNodeCompare_constant_COND_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Condition` **COND_MAX** = ``2`` + +Represents the size of the :ref:`Condition` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeCompare_property_condition: -- :ref:`Condition` **condition** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_condition(value) | -+-----------+----------------------+ -| *Getter* | get_condition() | -+-----------+----------------------+ +:ref:`Condition` **condition** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_condition** **(** :ref:`Condition` value **)** +- :ref:`Condition` **get_condition** **(** **)** Extra condition which is applied if :ref:`type` is set to :ref:`CTYPE_VECTOR_3D`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCompare_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** A comparison function. See :ref:`Function` for options. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCompare_property_type: -- :ref:`ComparisonType` **type** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``0`` | -+-----------+----------------------------+ -| *Setter* | set_comparison_type(value) | -+-----------+----------------------------+ -| *Getter* | get_comparison_type() | -+-----------+----------------------------+ +:ref:`ComparisonType` **type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_comparison_type** **(** :ref:`ComparisonType` value **)** +- :ref:`ComparisonType` **get_comparison_type** **(** **)** The type to be used in the comparison. See :ref:`ComparisonType` for options. diff --git a/classes/class_visualshadernodecubemap.rst b/classes/class_visualshadernodecubemap.rst index c501fcaa1..5466e6e8b 100644 --- a/classes/class_visualshadernodecubemap.rst +++ b/classes/class_visualshadernodecubemap.rst @@ -14,107 +14,163 @@ VisualShaderNodeCubemap A :ref:`Cubemap` sampling node to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``texture(cubemap, vec3)`` in the shader language. Returns a color vector and alpha channel as scalar. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ -| :ref:`Cubemap` | :ref:`cube_map` | | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ -| :ref:`Source` | :ref:`source` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ -| :ref:`TextureType` | :ref:`texture_type` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + | :ref:`Cubemap` | :ref:`cube_map` | | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + | :ref:`Source` | :ref:`source` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + | :ref:`TextureType` | :ref:`texture_type` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeCubemap_Source: -.. _class_VisualShaderNodeCubemap_constant_SOURCE_TEXTURE: - -.. _class_VisualShaderNodeCubemap_constant_SOURCE_PORT: - -.. _class_VisualShaderNodeCubemap_constant_SOURCE_MAX: +.. rst-class:: classref-enumeration enum **Source**: -- **SOURCE_TEXTURE** = **0** --- Use the :ref:`Cubemap` set via :ref:`cube_map`. If this is set to :ref:`source`, the ``samplerCube`` port is ignored. +.. _class_VisualShaderNodeCubemap_constant_SOURCE_TEXTURE: -- **SOURCE_PORT** = **1** --- Use the :ref:`Cubemap` sampler reference passed via the ``samplerCube`` port. If this is set to :ref:`source`, the :ref:`cube_map` texture is ignored. +.. rst-class:: classref-enumeration-constant -- **SOURCE_MAX** = **2** --- Represents the size of the :ref:`Source` enum. +:ref:`Source` **SOURCE_TEXTURE** = ``0`` + +Use the :ref:`Cubemap` set via :ref:`cube_map`. If this is set to :ref:`source`, the ``samplerCube`` port is ignored. + +.. _class_VisualShaderNodeCubemap_constant_SOURCE_PORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_PORT** = ``1`` + +Use the :ref:`Cubemap` sampler reference passed via the ``samplerCube`` port. If this is set to :ref:`source`, the :ref:`cube_map` texture is ignored. + +.. _class_VisualShaderNodeCubemap_constant_SOURCE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_MAX** = ``2`` + +Represents the size of the :ref:`Source` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeCubemap_TextureType: -.. _class_VisualShaderNodeCubemap_constant_TYPE_DATA: - -.. _class_VisualShaderNodeCubemap_constant_TYPE_COLOR: - -.. _class_VisualShaderNodeCubemap_constant_TYPE_NORMAL_MAP: - -.. _class_VisualShaderNodeCubemap_constant_TYPE_MAX: +.. rst-class:: classref-enumeration enum **TextureType**: -- **TYPE_DATA** = **0** --- No hints are added to the uniform declaration. +.. _class_VisualShaderNodeCubemap_constant_TYPE_DATA: -- **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. +.. rst-class:: classref-enumeration-constant -- **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. +:ref:`TextureType` **TYPE_DATA** = ``0`` -- **TYPE_MAX** = **3** --- Represents the size of the :ref:`TextureType` enum. +No hints are added to the uniform declaration. + +.. _class_VisualShaderNodeCubemap_constant_TYPE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_COLOR** = ``1`` + +Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. + +.. _class_VisualShaderNodeCubemap_constant_TYPE_NORMAL_MAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_NORMAL_MAP** = ``2`` + +Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. + +.. _class_VisualShaderNodeCubemap_constant_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_MAX** = ``3`` + +Represents the size of the :ref:`TextureType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeCubemap_property_cube_map: -- :ref:`Cubemap` **cube_map** +.. rst-class:: classref-property -+----------+---------------------+ -| *Setter* | set_cube_map(value) | -+----------+---------------------+ -| *Getter* | get_cube_map() | -+----------+---------------------+ +:ref:`Cubemap` **cube_map** + +.. rst-class:: classref-property-setget + +- void **set_cube_map** **(** :ref:`Cubemap` value **)** +- :ref:`Cubemap` **get_cube_map** **(** **)** The :ref:`Cubemap` texture to sample when using :ref:`SOURCE_TEXTURE` as :ref:`source`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCubemap_property_source: -- :ref:`Source` **source** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_source(value) | -+-----------+-------------------+ -| *Getter* | get_source() | -+-----------+-------------------+ +:ref:`Source` **source** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_source** **(** :ref:`Source` value **)** +- :ref:`Source` **get_source** **(** **)** Defines which source should be used for the sampling. See :ref:`Source` for options. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCubemap_property_texture_type: -- :ref:`TextureType` **texture_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_texture_type(value) | -+-----------+-------------------------+ -| *Getter* | get_texture_type() | -+-----------+-------------------------+ +:ref:`TextureType` **texture_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_type** **(** :ref:`TextureType` value **)** +- :ref:`TextureType` **get_texture_type** **(** **)** Defines the type of data provided by the source texture. See :ref:`TextureType` for options. diff --git a/classes/class_visualshadernodecubemapparameter.rst b/classes/class_visualshadernodecubemapparameter.rst index 96443a1f9..f9ba7e3e7 100644 --- a/classes/class_visualshadernodecubemapparameter.rst +++ b/classes/class_visualshadernodecubemapparameter.rst @@ -14,6 +14,8 @@ VisualShaderNodeCubemapParameter A :ref:`Cubemap` parameter node to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodecurvetexture.rst b/classes/class_visualshadernodecurvetexture.rst index ba5aa5c05..5112b57e0 100644 --- a/classes/class_visualshadernodecurvetexture.rst +++ b/classes/class_visualshadernodecurvetexture.rst @@ -14,30 +14,44 @@ VisualShaderNodeCurveTexture Performs a :ref:`CurveTexture` lookup within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Comes with a built-in editor for texture's curves. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------+---------------------------------------------------------------------+ -| :ref:`CurveTexture` | :ref:`texture` | -+-----------------------------------------+---------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------+---------------------------------------------------------------------+ + | :ref:`CurveTexture` | :ref:`texture` | + +-----------------------------------------+---------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeCurveTexture_property_texture: -- :ref:`CurveTexture` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`CurveTexture` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`CurveTexture` value **)** +- :ref:`CurveTexture` **get_texture** **(** **)** The source texture. diff --git a/classes/class_visualshadernodecurvexyztexture.rst b/classes/class_visualshadernodecurvexyztexture.rst index 54b8411ce..bf132c326 100644 --- a/classes/class_visualshadernodecurvexyztexture.rst +++ b/classes/class_visualshadernodecurvexyztexture.rst @@ -14,30 +14,44 @@ VisualShaderNodeCurveXYZTexture Performs a :ref:`CurveXYZTexture` lookup within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Comes with a built-in editor for texture's curves. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------+------------------------------------------------------------------------+ -| :ref:`CurveXYZTexture` | :ref:`texture` | -+-----------------------------------------------+------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------+------------------------------------------------------------------------+ + | :ref:`CurveXYZTexture` | :ref:`texture` | + +-----------------------------------------------+------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeCurveXYZTexture_property_texture: -- :ref:`CurveXYZTexture` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`CurveXYZTexture` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`CurveXYZTexture` value **)** +- :ref:`CurveXYZTexture` **get_texture** **(** **)** The source texture. diff --git a/classes/class_visualshadernodecustom.rst b/classes/class_visualshadernodecustom.rst index 10c81d530..be40e5990 100644 --- a/classes/class_visualshadernodecustom.rst +++ b/classes/class_visualshadernodecustom.rst @@ -14,6 +14,8 @@ VisualShaderNodeCustom Virtual class to define custom :ref:`VisualShaderNode`\ s for use in the Visual Shader Editor. +.. rst-class:: classref-introduction-group + Description ----------- @@ -27,62 +29,81 @@ In order for the node to be registered as an editor addon, you must use the ``@t extends VisualShaderNodeCustom class_name VisualShaderNodeNoise +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Visual Shader plugins <../tutorials/plugins/editor/visual_shader_plugins>` +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_category` **(** **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_code` **(** :ref:`String[]` input_vars, :ref:`String[]` output_vars, :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_description` **(** **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_func_code` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_global_code` **(** :ref:`Mode` mode **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_input_port_count` **(** **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_input_port_name` **(** :ref:`int` port **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_input_port_type` **(** :ref:`int` port **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_output_port_count` **(** **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_output_port_name` **(** :ref:`int` port **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_output_port_type` **(** :ref:`int` port **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_return_icon_type` **(** **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_available` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_highend` **(** **)** |virtual| |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_category` **(** **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_code` **(** :ref:`String[]` input_vars, :ref:`String[]` output_vars, :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_description` **(** **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_func_code` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_global_code` **(** :ref:`Mode` mode **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_input_port_count` **(** **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_input_port_name` **(** :ref:`int` port **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_input_port_type` **(** :ref:`int` port **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_output_port_count` **(** **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_output_port_name` **(** :ref:`int` port **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_output_port_type` **(** :ref:`int` port **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_return_icon_type` **(** **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_available` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_highend` **(** **)** |virtual| |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_VisualShaderNodeCustom_method__get_category: -- :ref:`String` **_get_category** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_category** **(** **)** |virtual| |const| 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"``. Defining this method is **optional**. If not overridden, the node will be filed under the "Addons" category. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_code: -- :ref:`String` **_get_code** **(** :ref:`String[]` input_vars, :ref:`String[]` output_vars, :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_code** **(** :ref:`String[]` input_vars, :ref:`String[]` output_vars, :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| 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). @@ -94,21 +115,29 @@ You can customize the generated code based on the shader ``mode`` (see :ref:`Mod Defining this method is **required**. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_description: -- :ref:`String` **_get_description** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_description** **(** **)** |virtual| |const| Override this method to define the description of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is **optional**. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_func_code: -- :ref:`String` **_get_func_code** **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_func_code** **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| 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). @@ -118,11 +147,15 @@ You can customize the generated code based on the shader ``mode`` (see :ref:`Mod Defining this method is **optional**. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_global_code: -- :ref:`String` **_get_global_code** **(** :ref:`Mode` mode **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_global_code** **(** :ref:`Mode` mode **)** |virtual| |const| 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). @@ -132,101 +165,141 @@ You can customize the generated code based on the shader ``mode`` (see :ref:`Mod Defining this method is **optional**. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_input_port_count: -- :ref:`int` **_get_input_port_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_input_port_count** **(** **)** |virtual| |const| Override this method to define the number of input ports of the associated custom node. Defining this method is **required**. If not overridden, the node has no input ports. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_input_port_name: -- :ref:`String` **_get_input_port_name** **(** :ref:`int` port **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_input_port_name** **(** :ref:`int` port **)** |virtual| |const| 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`. Defining this method is **optional**, but recommended. If not overridden, input ports are named as ``"in" + str(port)``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_input_port_type: -- :ref:`int` **_get_input_port_type** **(** :ref:`int` port **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_input_port_type** **(** :ref:`int` port **)** |virtual| |const| Override this method to define the returned type of each input port of the associated custom node (see :ref:`PortType` for possible types). Defining this method is **optional**, but recommended. If not overridden, input ports will return the :ref:`VisualShaderNode.PORT_TYPE_SCALAR` type. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_name: -- :ref:`String` **_get_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_name** **(** **)** |virtual| |const| Override this method to define the name of the associated custom node in the Visual Shader Editor's members dialog and graph. Defining this method is **optional**, but recommended. If not overridden, the node will be named as "Unnamed". +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_output_port_count: -- :ref:`int` **_get_output_port_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_output_port_count** **(** **)** |virtual| |const| Override this method to define the number of output ports of the associated custom node. Defining this method is **required**. If not overridden, the node has no output ports. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_output_port_name: -- :ref:`String` **_get_output_port_name** **(** :ref:`int` port **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_output_port_name** **(** :ref:`int` port **)** |virtual| |const| 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`. Defining this method is **optional**, but recommended. If not overridden, output ports are named as ``"out" + str(port)``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_output_port_type: -- :ref:`int` **_get_output_port_type** **(** :ref:`int` port **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_output_port_type** **(** :ref:`int` port **)** |virtual| |const| Override this method to define the returned type of each output port of the associated custom node (see :ref:`PortType` for possible types). Defining this method is **optional**, but recommended. If not overridden, output ports will return the :ref:`VisualShaderNode.PORT_TYPE_SCALAR` type. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__get_return_icon_type: -- :ref:`int` **_get_return_icon_type** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_return_icon_type** **(** **)** |virtual| |const| Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is **optional**. If not overridden, no return icon is shown. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__is_available: -- :ref:`bool` **_is_available** **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_available** **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| Override this method to prevent the node to be visible in the member dialog for the certain ``mode`` (see :ref:`Mode`) and/or ``type`` (see :ref:`Type`). Defining this method is **optional**. If not overridden, it's ``true``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeCustom_method__is_highend: -- :ref:`bool` **_is_highend** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_highend** **(** **)** |virtual| |const| Override this method to enable high-end mark in the Visual Shader Editor's members dialog. diff --git a/classes/class_visualshadernodederivativefunc.rst b/classes/class_visualshadernodederivativefunc.rst index e32c19025..5f06dc0a5 100644 --- a/classes/class_visualshadernodederivativefunc.rst +++ b/classes/class_visualshadernodederivativefunc.rst @@ -14,99 +14,160 @@ VisualShaderNodeDerivativeFunc Calculates a derivative within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- This node is only available in ``Fragment`` and ``Light`` visual shaders. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------+-------------------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``0`` | -+---------------------------------------------------------------+-------------------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+---------------------------------------------------------------+-------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``0`` | + +---------------------------------------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +---------------------------------------------------------------+-------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeDerivativeFunc_OpType: -.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_SCALAR: - -.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_SCALAR** = **0** --- A floating-point scalar. +.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_SCALAR: -- **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_3D** = **2** --- A 3D vector type. +:ref:`OpType` **OP_TYPE_SCALAR** = ``0`` -- **OP_TYPE_VECTOR_4D** = **3** --- A 4D vector type. +A floating-point scalar. -- **OP_TYPE_MAX** = **4** --- Represents the size of the :ref:`OpType` enum. +.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``1`` + +A 2D vector type. + +.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``2`` + +A 3D vector type. + +.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``3`` + +A 4D vector type. + +.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``4`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeDerivativeFunc_Function: -.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_SUM: - -.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_X: - -.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_Y: - -.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_SUM** = **0** --- Sum of absolute derivative in ``x`` and ``y``. +.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_SUM: -- **FUNC_X** = **1** --- Derivative in ``x`` using local differencing. +.. rst-class:: classref-enumeration-constant -- **FUNC_Y** = **2** --- Derivative in ``y`` using local differencing. +:ref:`Function` **FUNC_SUM** = ``0`` -- **FUNC_MAX** = **3** --- Represents the size of the :ref:`Function` enum. +Sum of absolute derivative in ``x`` and ``y``. + +.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_X** = ``1`` + +Derivative in ``x`` using local differencing. + +.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_Y** = ``2`` + +Derivative in ``y`` using local differencing. + +.. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``3`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeDerivativeFunc_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** A derivative function type. See :ref:`Function` for options. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeDerivativeFunc_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. See :ref:`OpType` for options. diff --git a/classes/class_visualshadernodedeterminant.rst b/classes/class_visualshadernodedeterminant.rst index 026e4b065..e3667a474 100644 --- a/classes/class_visualshadernodedeterminant.rst +++ b/classes/class_visualshadernodedeterminant.rst @@ -14,6 +14,8 @@ VisualShaderNodeDeterminant Calculates the determinant of a :ref:`Transform3D` within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodedotproduct.rst b/classes/class_visualshadernodedotproduct.rst index 0aa7dc0ed..c7da8cfa7 100644 --- a/classes/class_visualshadernodedotproduct.rst +++ b/classes/class_visualshadernodedotproduct.rst @@ -14,6 +14,8 @@ VisualShaderNodeDotProduct Calculates a dot product of two vectors within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodeexpression.rst b/classes/class_visualshadernodeexpression.rst index 1740d20d1..c6f56263d 100644 --- a/classes/class_visualshadernodeexpression.rst +++ b/classes/class_visualshadernodeexpression.rst @@ -16,6 +16,8 @@ VisualShaderNodeExpression A custom visual shader graph expression written in Godot Shading Language. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,27 +25,37 @@ Custom Godot Shading Language expression, with a custom number of input and outp The provided code is directly injected into the graph's matching shader function (``vertex``, ``fragment``, or ``light``), so it cannot be used to declare functions, varyings, uniforms, or global constants. See :ref:`VisualShaderNodeGlobalExpression` for such global definitions. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`expression` | ``""`` | -+-----------------------------+-------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`expression` | ``""`` | + +-----------------------------+-------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeExpression_property_expression: -- :ref:`String` **expression** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``""`` | -+-----------+-----------------------+ -| *Setter* | set_expression(value) | -+-----------+-----------------------+ -| *Getter* | get_expression() | -+-----------+-----------------------+ +:ref:`String` **expression** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_expression** **(** :ref:`String` value **)** +- :ref:`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. diff --git a/classes/class_visualshadernodefaceforward.rst b/classes/class_visualshadernodefaceforward.rst index f435811e6..5d02a3efd 100644 --- a/classes/class_visualshadernodefaceforward.rst +++ b/classes/class_visualshadernodefaceforward.rst @@ -14,6 +14,8 @@ VisualShaderNodeFaceForward Returns the vector that points in the same direction as a reference vector within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodefloatconstant.rst b/classes/class_visualshadernodefloatconstant.rst index 87677c213..dbfe45e0d 100644 --- a/classes/class_visualshadernodefloatconstant.rst +++ b/classes/class_visualshadernodefloatconstant.rst @@ -14,32 +14,44 @@ VisualShaderNodeFloatConstant A scalar floating-point constant to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``float`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+------------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`constant` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`constant` | ``0.0`` | + +---------------------------+------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeFloatConstant_property_constant: -- :ref:`float` **constant** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_constant(value) | -+-----------+---------------------+ -| *Getter* | get_constant() | -+-----------+---------------------+ +:ref:`float` **constant** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`float` value **)** +- :ref:`float` **get_constant** **(** **)** A floating-point constant which represents a state of this node. diff --git a/classes/class_visualshadernodefloatfunc.rst b/classes/class_visualshadernodefloatfunc.rst index a9015fefa..645cf22cb 100644 --- a/classes/class_visualshadernodefloatfunc.rst +++ b/classes/class_visualshadernodefloatfunc.rst @@ -14,171 +14,323 @@ VisualShaderNodeFloatFunc A scalar floating-point function to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Accept a floating-point scalar (``x``) to the input port and transform it according to :ref:`function`. +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------+--------------------------------------------------------------------+--------+ -| :ref:`Function` | :ref:`function` | ``13`` | -+----------------------------------------------------------+--------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+--------------------------------------------------------------------+--------+ + | :ref:`Function` | :ref:`function` | ``13`` | + +----------------------------------------------------------+--------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeFloatFunc_Function: -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIN: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_COS: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_TAN: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASIN: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOS: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATAN: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SINH: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_COSH: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_TANH: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SQRT: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ABS: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIGN: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_FLOOR: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUND: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_CEIL: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_FRACT: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SATURATE: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_NEGATE: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOSH: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASINH: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATANH: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_DEGREES: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP2: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_INVERSE_SQRT: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG2: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_RADIANS: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_RECIPROCAL: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUNDEVEN: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_TRUNC: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ONEMINUS: - -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_SIN** = **0** --- Returns the sine of the parameter. Translates to ``sin(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIN: -- **FUNC_COS** = **1** --- Returns the cosine of the parameter. Translates to ``cos(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_TAN** = **2** --- Returns the tangent of the parameter. Translates to ``tan(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_SIN** = ``0`` -- **FUNC_ASIN** = **3** --- Returns the arc-sine of the parameter. Translates to ``asin(x)`` in the Godot Shader Language. +Returns the sine of the parameter. Translates to ``sin(x)`` in the Godot Shader Language. -- **FUNC_ACOS** = **4** --- Returns the arc-cosine of the parameter. Translates to ``acos(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_COS: -- **FUNC_ATAN** = **5** --- Returns the arc-tangent of the parameter. Translates to ``atan(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_SINH** = **6** --- Returns the hyperbolic sine of the parameter. Translates to ``sinh(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_COS** = ``1`` -- **FUNC_COSH** = **7** --- Returns the hyperbolic cosine of the parameter. Translates to ``cosh(x)`` in the Godot Shader Language. +Returns the cosine of the parameter. Translates to ``cos(x)`` in the Godot Shader Language. -- **FUNC_TANH** = **8** --- Returns the hyperbolic tangent of the parameter. Translates to ``tanh(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_TAN: -- **FUNC_LOG** = **9** --- Returns the natural logarithm of the parameter. Translates to ``log(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_EXP** = **10** --- Returns the natural exponentiation of the parameter. Translates to ``exp(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_TAN** = ``2`` -- **FUNC_SQRT** = **11** --- Returns the square root of the parameter. Translates to ``sqrt(x)`` in the Godot Shader Language. +Returns the tangent of the parameter. Translates to ``tan(x)`` in the Godot Shader Language. -- **FUNC_ABS** = **12** --- Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASIN: -- **FUNC_SIGN** = **13** --- Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_FLOOR** = **14** --- Finds the nearest integer less than or equal to the parameter. Translates to ``floor(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_ASIN** = ``3`` -- **FUNC_ROUND** = **15** --- Finds the nearest integer to the parameter. Translates to ``round(x)`` in the Godot Shader Language. +Returns the arc-sine of the parameter. Translates to ``asin(x)`` in the Godot Shader Language. -- **FUNC_CEIL** = **16** --- Finds the nearest integer that is greater than or equal to the parameter. Translates to ``ceil(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOS: -- **FUNC_FRACT** = **17** --- Computes the fractional part of the argument. Translates to ``fract(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_SATURATE** = **18** --- Clamps the value between ``0.0`` and ``1.0`` using ``min(max(x, 0.0), 1.0)``. +:ref:`Function` **FUNC_ACOS** = ``4`` -- **FUNC_NEGATE** = **19** --- Negates the ``x`` using ``-(x)``. +Returns the arc-cosine of the parameter. Translates to ``acos(x)`` in the Godot Shader Language. -- **FUNC_ACOSH** = **20** --- Returns the arc-hyperbolic-cosine of the parameter. Translates to ``acosh(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATAN: -- **FUNC_ASINH** = **21** --- Returns the arc-hyperbolic-sine of the parameter. Translates to ``asinh(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_ATANH** = **22** --- Returns the arc-hyperbolic-tangent of the parameter. Translates to ``atanh(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_ATAN** = ``5`` -- **FUNC_DEGREES** = **23** --- Convert a quantity in radians to degrees. Translates to ``degrees(x)`` in the Godot Shader Language. +Returns the arc-tangent of the parameter. Translates to ``atan(x)`` in the Godot Shader Language. -- **FUNC_EXP2** = **24** --- Returns 2 raised by the power of the parameter. Translates to ``exp2(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SINH: -- **FUNC_INVERSE_SQRT** = **25** --- Returns the inverse of the square root of the parameter. Translates to ``inversesqrt(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_LOG2** = **26** --- Returns the base 2 logarithm of the parameter. Translates to ``log2(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_SINH** = ``6`` -- **FUNC_RADIANS** = **27** --- Convert a quantity in degrees to radians. Translates to ``radians(x)`` in the Godot Shader Language. +Returns the hyperbolic sine of the parameter. Translates to ``sinh(x)`` in the Godot Shader Language. -- **FUNC_RECIPROCAL** = **28** --- Finds reciprocal value of dividing 1 by ``x`` (i.e. ``1 / x``). +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_COSH: -- **FUNC_ROUNDEVEN** = **29** --- Finds the nearest even integer to the parameter. Translates to ``roundEven(x)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **FUNC_TRUNC** = **30** --- Returns a value equal to the nearest integer to ``x`` whose absolute value is not larger than the absolute value of ``x``. Translates to ``trunc(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_COSH** = ``7`` -- **FUNC_ONEMINUS** = **31** --- Subtracts scalar ``x`` from 1 (i.e. ``1 - x``). +Returns the hyperbolic cosine of the parameter. Translates to ``cosh(x)`` in the Godot Shader Language. -- **FUNC_MAX** = **32** --- Represents the size of the :ref:`Function` enum. +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_TANH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_TANH** = ``8`` + +Returns the hyperbolic tangent of the parameter. Translates to ``tanh(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LOG** = ``9`` + +Returns the natural logarithm of the parameter. Translates to ``log(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_EXP** = ``10`` + +Returns the natural exponentiation of the parameter. Translates to ``exp(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SQRT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SQRT** = ``11`` + +Returns the square root of the parameter. Translates to ``sqrt(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ABS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ABS** = ``12`` + +Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIGN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SIGN** = ``13`` + +Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_FLOOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_FLOOR** = ``14`` + +Finds the nearest integer less than or equal to the parameter. Translates to ``floor(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ROUND** = ``15`` + +Finds the nearest integer to the parameter. Translates to ``round(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_CEIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_CEIL** = ``16`` + +Finds the nearest integer that is greater than or equal to the parameter. Translates to ``ceil(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_FRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_FRACT** = ``17`` + +Computes the fractional part of the argument. Translates to ``fract(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_SATURATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SATURATE** = ``18`` + +Clamps the value between ``0.0`` and ``1.0`` using ``min(max(x, 0.0), 1.0)``. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_NEGATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_NEGATE** = ``19`` + +Negates the ``x`` using ``-(x)``. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOSH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ACOSH** = ``20`` + +Returns the arc-hyperbolic-cosine of the parameter. Translates to ``acosh(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASINH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ASINH** = ``21`` + +Returns the arc-hyperbolic-sine of the parameter. Translates to ``asinh(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATANH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ATANH** = ``22`` + +Returns the arc-hyperbolic-tangent of the parameter. Translates to ``atanh(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_DEGREES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_DEGREES** = ``23`` + +Convert a quantity in radians to degrees. Translates to ``degrees(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_EXP2** = ``24`` + +Returns 2 raised by the power of the parameter. Translates to ``exp2(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_INVERSE_SQRT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_INVERSE_SQRT** = ``25`` + +Returns the inverse of the square root of the parameter. Translates to ``inversesqrt(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LOG2** = ``26`` + +Returns the base 2 logarithm of the parameter. Translates to ``log2(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_RADIANS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_RADIANS** = ``27`` + +Convert a quantity in degrees to radians. Translates to ``radians(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_RECIPROCAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_RECIPROCAL** = ``28`` + +Finds reciprocal value of dividing 1 by ``x`` (i.e. ``1 / x``). + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUNDEVEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ROUNDEVEN** = ``29`` + +Finds the nearest even integer to the parameter. Translates to ``roundEven(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_TRUNC: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_TRUNC** = ``30`` + +Returns a value equal to the nearest integer to ``x`` whose absolute value is not larger than the absolute value of ``x``. Translates to ``trunc(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_ONEMINUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ONEMINUS** = ``31`` + +Subtracts scalar ``x`` from 1 (i.e. ``1 - x``). + +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``32`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeFloatFunc_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``13`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``13`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** A function to be applied to the scalar. See :ref:`Function` for options. diff --git a/classes/class_visualshadernodefloatop.rst b/classes/class_visualshadernodefloatop.rst index 330e439fa..cdaa27893 100644 --- a/classes/class_visualshadernodefloatop.rst +++ b/classes/class_visualshadernodefloatop.rst @@ -14,83 +14,147 @@ VisualShaderNodeFloatOp A floating-point scalar operator to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Applies :ref:`operator` to two floating-point inputs: ``a`` and ``b``. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`Operator` | :ref:`operator` | ``0`` | -+--------------------------------------------------------+------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`Operator` | :ref:`operator` | ``0`` | + +--------------------------------------------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeFloatOp_Operator: -.. _class_VisualShaderNodeFloatOp_constant_OP_ADD: - -.. _class_VisualShaderNodeFloatOp_constant_OP_SUB: - -.. _class_VisualShaderNodeFloatOp_constant_OP_MUL: - -.. _class_VisualShaderNodeFloatOp_constant_OP_DIV: - -.. _class_VisualShaderNodeFloatOp_constant_OP_MOD: - -.. _class_VisualShaderNodeFloatOp_constant_OP_POW: - -.. _class_VisualShaderNodeFloatOp_constant_OP_MAX: - -.. _class_VisualShaderNodeFloatOp_constant_OP_MIN: - -.. _class_VisualShaderNodeFloatOp_constant_OP_ATAN2: - -.. _class_VisualShaderNodeFloatOp_constant_OP_STEP: - -.. _class_VisualShaderNodeFloatOp_constant_OP_ENUM_SIZE: +.. rst-class:: classref-enumeration enum **Operator**: -- **OP_ADD** = **0** --- Sums two numbers using ``a + b``. +.. _class_VisualShaderNodeFloatOp_constant_OP_ADD: -- **OP_SUB** = **1** --- Subtracts two numbers using ``a - b``. +.. rst-class:: classref-enumeration-constant -- **OP_MUL** = **2** --- Multiplies two numbers using ``a * b``. +:ref:`Operator` **OP_ADD** = ``0`` -- **OP_DIV** = **3** --- Divides two numbers using ``a / b``. +Sums two numbers using ``a + b``. -- **OP_MOD** = **4** --- Calculates the remainder of two numbers. Translates to ``mod(a, b)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatOp_constant_OP_SUB: -- **OP_POW** = **5** --- Raises the ``a`` to the power of ``b``. Translates to ``pow(a, b)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **OP_MAX** = **6** --- Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language. +:ref:`Operator` **OP_SUB** = ``1`` -- **OP_MIN** = **7** --- Returns the lesser of two numbers. Translates to ``min(a, b)`` in the Godot Shader Language. +Subtracts two numbers using ``a - b``. -- **OP_ATAN2** = **8** --- Returns the arc-tangent of the parameters. Translates to ``atan(a, b)`` in the Godot Shader Language. +.. _class_VisualShaderNodeFloatOp_constant_OP_MUL: -- **OP_STEP** = **9** --- Generates a step function by comparing ``b``\ (x) to ``a``\ (edge). Returns 0.0 if ``x`` is smaller than ``edge`` and otherwise 1.0. Translates to ``step(a, b)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **OP_ENUM_SIZE** = **10** --- Represents the size of the :ref:`Operator` enum. +:ref:`Operator` **OP_MUL** = ``2`` + +Multiplies two numbers using ``a * b``. + +.. _class_VisualShaderNodeFloatOp_constant_OP_DIV: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_DIV** = ``3`` + +Divides two numbers using ``a / b``. + +.. _class_VisualShaderNodeFloatOp_constant_OP_MOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MOD** = ``4`` + +Calculates the remainder of two numbers. Translates to ``mod(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatOp_constant_OP_POW: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_POW** = ``5`` + +Raises the ``a`` to the power of ``b``. Translates to ``pow(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatOp_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MAX** = ``6`` + +Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatOp_constant_OP_MIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MIN** = ``7`` + +Returns the lesser of two numbers. Translates to ``min(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatOp_constant_OP_ATAN2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_ATAN2** = ``8`` + +Returns the arc-tangent of the parameters. Translates to ``atan(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatOp_constant_OP_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_STEP** = ``9`` + +Generates a step function by comparing ``b``\ (x) to ``a``\ (edge). Returns 0.0 if ``x`` is smaller than ``edge`` and otherwise 1.0. Translates to ``step(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeFloatOp_constant_OP_ENUM_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_ENUM_SIZE** = ``10`` + +Represents the size of the :ref:`Operator` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeFloatOp_property_operator: -- :ref:`Operator` **operator** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_operator(value) | -+-----------+---------------------+ -| *Getter* | get_operator() | -+-----------+---------------------+ +:ref:`Operator` **operator** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operator** **(** :ref:`Operator` value **)** +- :ref:`Operator` **get_operator** **(** **)** An operator to be applied to the inputs. See :ref:`Operator` for options. diff --git a/classes/class_visualshadernodefloatparameter.rst b/classes/class_visualshadernodefloatparameter.rst index 1c4c0f209..e89da7934 100644 --- a/classes/class_visualshadernodefloatparameter.rst +++ b/classes/class_visualshadernodefloatparameter.rst @@ -14,145 +14,186 @@ VisualShaderNodeFloatParameter A scalar float parameter to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform float`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`default_value` | ``0.0`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Hint` | :ref:`hint` | ``0`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`max` | ``1.0`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`min` | ``0.0`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`step` | ``0.1`` | -+-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`default_value` | ``0.0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Hint` | :ref:`hint` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`max` | ``1.0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`min` | ``0.0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`step` | ``0.1`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeFloatParameter_Hint: -.. _class_VisualShaderNodeFloatParameter_constant_HINT_NONE: - -.. _class_VisualShaderNodeFloatParameter_constant_HINT_RANGE: - -.. _class_VisualShaderNodeFloatParameter_constant_HINT_RANGE_STEP: - -.. _class_VisualShaderNodeFloatParameter_constant_HINT_MAX: +.. rst-class:: classref-enumeration enum **Hint**: -- **HINT_NONE** = **0** --- No hint used. +.. _class_VisualShaderNodeFloatParameter_constant_HINT_NONE: -- **HINT_RANGE** = **1** --- A range hint for scalar value, which limits possible input values between :ref:`min` and :ref:`max`. Translated to ``hint_range(min, max)`` in shader code. +.. rst-class:: classref-enumeration-constant -- **HINT_RANGE_STEP** = **2** --- A range hint for scalar value with step, which limits possible input values between :ref:`min` and :ref:`max`, with a step (increment) of :ref:`step`). Translated to ``hint_range(min, max, step)`` in shader code. +:ref:`Hint` **HINT_NONE** = ``0`` -- **HINT_MAX** = **3** --- Represents the size of the :ref:`Hint` enum. +No hint used. + +.. _class_VisualShaderNodeFloatParameter_constant_HINT_RANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hint` **HINT_RANGE** = ``1`` + +A range hint for scalar value, which limits possible input values between :ref:`min` and :ref:`max`. Translated to ``hint_range(min, max)`` in shader code. + +.. _class_VisualShaderNodeFloatParameter_constant_HINT_RANGE_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hint` **HINT_RANGE_STEP** = ``2`` + +A range hint for scalar value with step, which limits possible input values between :ref:`min` and :ref:`max`, with a step (increment) of :ref:`step`). Translated to ``hint_range(min, max, step)`` in shader code. + +.. _class_VisualShaderNodeFloatParameter_constant_HINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hint` **HINT_MAX** = ``3`` + +Represents the size of the :ref:`Hint` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeFloatParameter_property_default_value: -- :ref:`float` **default_value** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0.0`` | -+-----------+--------------------------+ -| *Setter* | set_default_value(value) | -+-----------+--------------------------+ -| *Getter* | get_default_value() | -+-----------+--------------------------+ +:ref:`float` **default_value** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`float` value **)** +- :ref:`float` **get_default_value** **(** **)** A default value to be assigned within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeFloatParameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** Enables usage of the :ref:`default_value`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeFloatParameter_property_hint: -- :ref:`Hint` **hint** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_hint(value) | -+-----------+-----------------+ -| *Getter* | get_hint() | -+-----------+-----------------+ +:ref:`Hint` **hint** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_hint** **(** :ref:`Hint` value **)** +- :ref:`Hint` **get_hint** **(** **)** A hint applied to the uniform, which controls the values it can take when set through the Inspector. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeFloatParameter_property_max: -- :ref:`float` **max** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``1.0`` | -+-----------+----------------+ -| *Setter* | set_max(value) | -+-----------+----------------+ -| *Getter* | get_max() | -+-----------+----------------+ +:ref:`float` **max** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_max** **(** :ref:`float` value **)** +- :ref:`float` **get_max** **(** **)** Minimum value for range hints. Used if :ref:`hint` is set to :ref:`HINT_RANGE` or :ref:`HINT_RANGE_STEP`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeFloatParameter_property_min: -- :ref:`float` **min** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0.0`` | -+-----------+----------------+ -| *Setter* | set_min(value) | -+-----------+----------------+ -| *Getter* | get_min() | -+-----------+----------------+ +:ref:`float` **min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_min** **(** :ref:`float` value **)** +- :ref:`float` **get_min** **(** **)** Maximum value for range hints. Used if :ref:`hint` is set to :ref:`HINT_RANGE` or :ref:`HINT_RANGE_STEP`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeFloatParameter_property_step: -- :ref:`float` **step** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0.1`` | -+-----------+-----------------+ -| *Setter* | set_step(value) | -+-----------+-----------------+ -| *Getter* | get_step() | -+-----------+-----------------+ +:ref:`float` **step** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_step** **(** :ref:`float` value **)** +- :ref:`float` **get_step** **(** **)** Step (increment) value for the range hint with step. Used if :ref:`hint` is set to :ref:`HINT_RANGE_STEP`. diff --git a/classes/class_visualshadernodefresnel.rst b/classes/class_visualshadernodefresnel.rst index a0e341833..d2059ebc9 100644 --- a/classes/class_visualshadernodefresnel.rst +++ b/classes/class_visualshadernodefresnel.rst @@ -14,6 +14,8 @@ VisualShaderNodeFresnel A Fresnel effect to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodeglobalexpression.rst b/classes/class_visualshadernodeglobalexpression.rst index 1cc31fb2e..78366d890 100644 --- a/classes/class_visualshadernodeglobalexpression.rst +++ b/classes/class_visualshadernodeglobalexpression.rst @@ -14,6 +14,8 @@ VisualShaderNodeGlobalExpression A custom global visual shader graph expression written in Godot Shading Language. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodegroupbase.rst b/classes/class_visualshadernodegroupbase.rst index 7d8251c5c..de5e9e180 100644 --- a/classes/class_visualshadernodegroupbase.rst +++ b/classes/class_visualshadernodegroupbase.rst @@ -16,224 +16,319 @@ VisualShaderNodeGroupBase Base class for a family of nodes with variable number of input and output ports within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Currently, has no direct usage, use the derived classes instead. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_input_port` **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_output_port` **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_input_ports` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_output_ports` **(** **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_free_input_port_id` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_free_output_port_id` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_input_port_count` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_inputs` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_output_port_count` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_outputs` **(** **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_input_port` **(** :ref:`int` id **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_output_port` **(** :ref:`int` id **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_port_name` **(** :ref:`String` name **)** |const| | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_input_port` **(** :ref:`int` id **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_output_port` **(** :ref:`int` id **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_port_name` **(** :ref:`int` id, :ref:`String` name **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_port_type` **(** :ref:`int` id, :ref:`int` type **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_inputs` **(** :ref:`String` inputs **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_output_port_name` **(** :ref:`int` id, :ref:`String` name **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_output_port_type` **(** :ref:`int` id, :ref:`int` type **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_outputs` **(** :ref:`String` outputs **)** | -+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_input_port` **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_output_port` **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_input_ports` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_output_ports` **(** **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_free_input_port_id` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_free_output_port_id` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_input_port_count` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_inputs` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_output_port_count` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_outputs` **(** **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_input_port` **(** :ref:`int` id **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_output_port` **(** :ref:`int` id **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_port_name` **(** :ref:`String` name **)** |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_input_port` **(** :ref:`int` id **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_output_port` **(** :ref:`int` id **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_input_port_name` **(** :ref:`int` id, :ref:`String` name **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_input_port_type` **(** :ref:`int` id, :ref:`int` type **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_inputs` **(** :ref:`String` inputs **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_output_port_name` **(** :ref:`int` id, :ref:`String` name **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_output_port_type` **(** :ref:`int` id, :ref:`int` type **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_outputs` **(** :ref:`String` outputs **)** | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_VisualShaderNodeGroupBase_method_add_input_port: -- void **add_input_port** **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** +.. rst-class:: classref-method + +void **add_input_port** **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** Adds an input port with the specified ``type`` (see :ref:`PortType`) and ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_add_output_port: -- void **add_output_port** **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** +.. rst-class:: classref-method + +void **add_output_port** **(** :ref:`int` id, :ref:`int` type, :ref:`String` name **)** Adds an output port with the specified ``type`` (see :ref:`PortType`) and ``name``. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_clear_input_ports: -- void **clear_input_ports** **(** **)** +.. rst-class:: classref-method + +void **clear_input_ports** **(** **)** Removes all previously specified input ports. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_clear_output_ports: -- void **clear_output_ports** **(** **)** +.. rst-class:: classref-method + +void **clear_output_ports** **(** **)** Removes all previously specified output ports. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_get_free_input_port_id: -- :ref:`int` **get_free_input_port_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_free_input_port_id** **(** **)** |const| Returns a free input port ID which can be used in :ref:`add_input_port`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_get_free_output_port_id: -- :ref:`int` **get_free_output_port_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_free_output_port_id** **(** **)** |const| Returns a free output port ID which can be used in :ref:`add_output_port`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_get_input_port_count: -- :ref:`int` **get_input_port_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_input_port_count** **(** **)** |const| Returns the number of input ports in use. Alternative for :ref:`get_free_input_port_id`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_get_inputs: -- :ref:`String` **get_inputs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_inputs** **(** **)** |const| Returns a :ref:`String` description of the input ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_input_port`). +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_get_output_port_count: -- :ref:`int` **get_output_port_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_output_port_count** **(** **)** |const| Returns the number of output ports in use. Alternative for :ref:`get_free_output_port_id`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_get_outputs: -- :ref:`String` **get_outputs** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_outputs** **(** **)** |const| Returns a :ref:`String` description of the output ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_output_port`). +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_has_input_port: -- :ref:`bool` **has_input_port** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_input_port** **(** :ref:`int` id **)** |const| Returns ``true`` if the specified input port exists. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_has_output_port: -- :ref:`bool` **has_output_port** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_output_port** **(** :ref:`int` id **)** |const| Returns ``true`` if the specified output port exists. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_is_valid_port_name: -- :ref:`bool` **is_valid_port_name** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_valid_port_name** **(** :ref:`String` name **)** |const| Returns ``true`` if the specified port name does not override an existed port name and is valid within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_remove_input_port: -- void **remove_input_port** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_input_port** **(** :ref:`int` id **)** Removes the specified input port. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_remove_output_port: -- void **remove_output_port** **(** :ref:`int` id **)** +.. rst-class:: classref-method + +void **remove_output_port** **(** :ref:`int` id **)** Removes the specified output port. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_set_input_port_name: -- void **set_input_port_name** **(** :ref:`int` id, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_input_port_name** **(** :ref:`int` id, :ref:`String` name **)** Renames the specified input port. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_set_input_port_type: -- void **set_input_port_type** **(** :ref:`int` id, :ref:`int` type **)** +.. rst-class:: classref-method + +void **set_input_port_type** **(** :ref:`int` id, :ref:`int` type **)** Sets the specified input port's type (see :ref:`PortType`). +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_set_inputs: -- void **set_inputs** **(** :ref:`String` inputs **)** +.. rst-class:: classref-method + +void **set_inputs** **(** :ref:`String` inputs **)** Defines all input ports using a :ref:`String` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_input_port`). +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_set_output_port_name: -- void **set_output_port_name** **(** :ref:`int` id, :ref:`String` name **)** +.. rst-class:: classref-method + +void **set_output_port_name** **(** :ref:`int` id, :ref:`String` name **)** Renames the specified output port. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_set_output_port_type: -- void **set_output_port_type** **(** :ref:`int` id, :ref:`int` type **)** +.. rst-class:: classref-method + +void **set_output_port_type** **(** :ref:`int` id, :ref:`int` type **)** Sets the specified output port's type (see :ref:`PortType`). +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeGroupBase_method_set_outputs: -- void **set_outputs** **(** :ref:`String` outputs **)** +.. rst-class:: classref-method + +void **set_outputs** **(** :ref:`String` outputs **)** Defines all output ports using a :ref:`String` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_output_port`). diff --git a/classes/class_visualshadernodeif.rst b/classes/class_visualshadernodeif.rst index c955a2c3b..8e84a1655 100644 --- a/classes/class_visualshadernodeif.rst +++ b/classes/class_visualshadernodeif.rst @@ -14,6 +14,8 @@ VisualShaderNodeIf Compares two floating-point numbers in order to return a required vector within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodeinput.rst b/classes/class_visualshadernodeinput.rst index e3a40368c..cd31d550e 100644 --- a/classes/class_visualshadernodeinput.rst +++ b/classes/class_visualshadernodeinput.rst @@ -14,62 +14,97 @@ VisualShaderNodeInput Represents the input shader parameter within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Gives access to input variables (built-ins) available for the shader. See the shading reference for the list of available built-ins for each shader type (check ``Tutorials`` section for link). +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Shading reference index <../tutorials/shaders/shader_reference/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+--------------------------------------------------------------------+--------------+ -| :ref:`String` | :ref:`input_name` | ``"[None]"`` | -+-----------------------------+--------------------------------------------------------------------+--------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------+--------------+ + | :ref:`String` | :ref:`input_name` | ``"[None]"`` | + +-----------------------------+--------------------------------------------------------------------+--------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_input_real_name` **(** **)** |const| | -+-----------------------------+--------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_input_real_name` **(** **)** |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_VisualShaderNodeInput_signal_input_type_changed: -- **input_type_changed** **(** **)** +.. rst-class:: classref-signal + +**input_type_changed** **(** **)** Emitted when input is changed via :ref:`input_name`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_VisualShaderNodeInput_property_input_name: -- :ref:`String` **input_name** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``"[None]"`` | -+-----------+-----------------------+ -| *Setter* | set_input_name(value) | -+-----------+-----------------------+ -| *Getter* | get_input_name() | -+-----------+-----------------------+ +:ref:`String` **input_name** = ``"[None]"`` + +.. rst-class:: classref-property-setget + +- void **set_input_name** **(** :ref:`String` value **)** +- :ref:`String` **get_input_name** **(** **)** One of the several input constants in lower-case style like: "vertex" (``VERTEX``) or "point_size" (``POINT_SIZE``). +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VisualShaderNodeInput_method_get_input_real_name: -- :ref:`String` **get_input_real_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_input_real_name** **(** **)** |const| Returns a translated name of the current constant in the Godot Shader Language. E.g. ``"ALBEDO"`` if the :ref:`input_name` equal to ``"albedo"``. diff --git a/classes/class_visualshadernodeintconstant.rst b/classes/class_visualshadernodeintconstant.rst index 86a3080a2..b44e73dfa 100644 --- a/classes/class_visualshadernodeintconstant.rst +++ b/classes/class_visualshadernodeintconstant.rst @@ -14,32 +14,44 @@ VisualShaderNodeIntConstant A scalar integer constant to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``int`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+----------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`constant` | ``0`` | -+-----------------------+----------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`constant` | ``0`` | + +-----------------------+----------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeIntConstant_property_constant: -- :ref:`int` **constant** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_constant(value) | -+-----------+---------------------+ -| *Getter* | get_constant() | -+-----------+---------------------+ +:ref:`int` **constant** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`int` value **)** +- :ref:`int` **get_constant** **(** **)** An integer constant which represents a state of this node. diff --git a/classes/class_visualshadernodeintfunc.rst b/classes/class_visualshadernodeintfunc.rst index b223d3dae..cd2cfda72 100644 --- a/classes/class_visualshadernodeintfunc.rst +++ b/classes/class_visualshadernodeintfunc.rst @@ -14,59 +14,99 @@ VisualShaderNodeIntFunc A scalar integer function to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Accept an integer scalar (``x``) to the input port and transform it according to :ref:`function`. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+------------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``2`` | -+--------------------------------------------------------+------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+------------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``2`` | + +--------------------------------------------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeIntFunc_Function: -.. _class_VisualShaderNodeIntFunc_constant_FUNC_ABS: - -.. _class_VisualShaderNodeIntFunc_constant_FUNC_NEGATE: - -.. _class_VisualShaderNodeIntFunc_constant_FUNC_SIGN: - -.. _class_VisualShaderNodeIntFunc_constant_FUNC_BITWISE_NOT: - -.. _class_VisualShaderNodeIntFunc_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_ABS** = **0** --- Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language. +.. _class_VisualShaderNodeIntFunc_constant_FUNC_ABS: -- **FUNC_NEGATE** = **1** --- Negates the ``x`` using ``-(x)``. +.. rst-class:: classref-enumeration-constant -- **FUNC_SIGN** = **2** --- Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language. +:ref:`Function` **FUNC_ABS** = ``0`` -- **FUNC_BITWISE_NOT** = **3** --- Returns the result of bitwise ``NOT`` operation on the integer. Translates to ``~a`` in the Godot Shader Language. +Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language. -- **FUNC_MAX** = **4** --- Represents the size of the :ref:`Function` enum. +.. _class_VisualShaderNodeIntFunc_constant_FUNC_NEGATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_NEGATE** = ``1`` + +Negates the ``x`` using ``-(x)``. + +.. _class_VisualShaderNodeIntFunc_constant_FUNC_SIGN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SIGN** = ``2`` + +Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntFunc_constant_FUNC_BITWISE_NOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_BITWISE_NOT** = ``3`` + +Returns the result of bitwise ``NOT`` operation on the integer. Translates to ``~a`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntFunc_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``4`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeIntFunc_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``2`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** A function to be applied to the scalar. See :ref:`Function` for options. diff --git a/classes/class_visualshadernodeintop.rst b/classes/class_visualshadernodeintop.rst index 46f028aac..e823e0abe 100644 --- a/classes/class_visualshadernodeintop.rst +++ b/classes/class_visualshadernodeintop.rst @@ -14,91 +14,163 @@ VisualShaderNodeIntOp An integer scalar operator to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Applies :ref:`operator` to two integer inputs: ``a`` and ``b``. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------+----------------------------------------------------------------+-------+ -| :ref:`Operator` | :ref:`operator` | ``0`` | -+------------------------------------------------------+----------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +------------------------------------------------------+----------------------------------------------------------------+-------+ + | :ref:`Operator` | :ref:`operator` | ``0`` | + +------------------------------------------------------+----------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeIntOp_Operator: -.. _class_VisualShaderNodeIntOp_constant_OP_ADD: - -.. _class_VisualShaderNodeIntOp_constant_OP_SUB: - -.. _class_VisualShaderNodeIntOp_constant_OP_MUL: - -.. _class_VisualShaderNodeIntOp_constant_OP_DIV: - -.. _class_VisualShaderNodeIntOp_constant_OP_MOD: - -.. _class_VisualShaderNodeIntOp_constant_OP_MAX: - -.. _class_VisualShaderNodeIntOp_constant_OP_MIN: - -.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_AND: - -.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_OR: - -.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_XOR: - -.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_LEFT_SHIFT: - -.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_RIGHT_SHIFT: - -.. _class_VisualShaderNodeIntOp_constant_OP_ENUM_SIZE: +.. rst-class:: classref-enumeration enum **Operator**: -- **OP_ADD** = **0** --- Sums two numbers using ``a + b``. +.. _class_VisualShaderNodeIntOp_constant_OP_ADD: -- **OP_SUB** = **1** --- Subtracts two numbers using ``a - b``. +.. rst-class:: classref-enumeration-constant -- **OP_MUL** = **2** --- Multiplies two numbers using ``a * b``. +:ref:`Operator` **OP_ADD** = ``0`` -- **OP_DIV** = **3** --- Divides two numbers using ``a / b``. +Sums two numbers using ``a + b``. -- **OP_MOD** = **4** --- Calculates the remainder of two numbers using ``a % b``. +.. _class_VisualShaderNodeIntOp_constant_OP_SUB: -- **OP_MAX** = **5** --- Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **OP_MIN** = **6** --- Returns the lesser of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language. +:ref:`Operator` **OP_SUB** = ``1`` -- **OP_BITWISE_AND** = **7** --- Returns the result of bitwise ``AND`` operation on the integer. Translates to ``a & b`` in the Godot Shader Language. +Subtracts two numbers using ``a - b``. -- **OP_BITWISE_OR** = **8** --- Returns the result of bitwise ``OR`` operation for two integers. Translates to ``a | b`` in the Godot Shader Language. +.. _class_VisualShaderNodeIntOp_constant_OP_MUL: -- **OP_BITWISE_XOR** = **9** --- Returns the result of bitwise ``XOR`` operation for two integers. Translates to ``a ^ b`` in the Godot Shader Language. +.. rst-class:: classref-enumeration-constant -- **OP_BITWISE_LEFT_SHIFT** = **10** --- Returns the result of bitwise left shift operation on the integer. Translates to ``a << b`` in the Godot Shader Language. +:ref:`Operator` **OP_MUL** = ``2`` -- **OP_BITWISE_RIGHT_SHIFT** = **11** --- Returns the result of bitwise right shift operation on the integer. Translates to ``a >> b`` in the Godot Shader Language. +Multiplies two numbers using ``a * b``. -- **OP_ENUM_SIZE** = **12** --- Represents the size of the :ref:`Operator` enum. +.. _class_VisualShaderNodeIntOp_constant_OP_DIV: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_DIV** = ``3`` + +Divides two numbers using ``a / b``. + +.. _class_VisualShaderNodeIntOp_constant_OP_MOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MOD** = ``4`` + +Calculates the remainder of two numbers using ``a % b``. + +.. _class_VisualShaderNodeIntOp_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MAX** = ``5`` + +Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntOp_constant_OP_MIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MIN** = ``6`` + +Returns the lesser of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_AND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BITWISE_AND** = ``7`` + +Returns the result of bitwise ``AND`` operation on the integer. Translates to ``a & b`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_OR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BITWISE_OR** = ``8`` + +Returns the result of bitwise ``OR`` operation for two integers. Translates to ``a | b`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_XOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BITWISE_XOR** = ``9`` + +Returns the result of bitwise ``XOR`` operation for two integers. Translates to ``a ^ b`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_LEFT_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BITWISE_LEFT_SHIFT** = ``10`` + +Returns the result of bitwise left shift operation on the integer. Translates to ``a << b`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_RIGHT_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BITWISE_RIGHT_SHIFT** = ``11`` + +Returns the result of bitwise right shift operation on the integer. Translates to ``a >> b`` in the Godot Shader Language. + +.. _class_VisualShaderNodeIntOp_constant_OP_ENUM_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_ENUM_SIZE** = ``12`` + +Represents the size of the :ref:`Operator` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeIntOp_property_operator: -- :ref:`Operator` **operator** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_operator(value) | -+-----------+---------------------+ -| *Getter* | get_operator() | -+-----------+---------------------+ +:ref:`Operator` **operator** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operator** **(** :ref:`Operator` value **)** +- :ref:`Operator` **get_operator** **(** **)** An operator to be applied to the inputs. See :ref:`Operator` for options. diff --git a/classes/class_visualshadernodeintparameter.rst b/classes/class_visualshadernodeintparameter.rst index cb51cdb4f..e7b7f9109 100644 --- a/classes/class_visualshadernodeintparameter.rst +++ b/classes/class_visualshadernodeintparameter.rst @@ -16,150 +16,189 @@ VisualShaderNodeIntParameter There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`default_value` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Hint` | :ref:`hint` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`max` | ``100`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`min` | ``0`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`step` | ``1`` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`default_value` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Hint` | :ref:`hint` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`max` | ``100`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`min` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`step` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeIntParameter_Hint: -.. _class_VisualShaderNodeIntParameter_constant_HINT_NONE: - -.. _class_VisualShaderNodeIntParameter_constant_HINT_RANGE: - -.. _class_VisualShaderNodeIntParameter_constant_HINT_RANGE_STEP: - -.. _class_VisualShaderNodeIntParameter_constant_HINT_MAX: +.. rst-class:: classref-enumeration enum **Hint**: -- **HINT_NONE** = **0** +.. _class_VisualShaderNodeIntParameter_constant_HINT_NONE: -- **HINT_RANGE** = **1** +.. rst-class:: classref-enumeration-constant -- **HINT_RANGE_STEP** = **2** +:ref:`Hint` **HINT_NONE** = ``0`` -- **HINT_MAX** = **3** + + +.. _class_VisualShaderNodeIntParameter_constant_HINT_RANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hint` **HINT_RANGE** = ``1`` + + + +.. _class_VisualShaderNodeIntParameter_constant_HINT_RANGE_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hint` **HINT_RANGE_STEP** = ``2`` + + + +.. _class_VisualShaderNodeIntParameter_constant_HINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hint` **HINT_MAX** = ``3`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeIntParameter_property_default_value: -- :ref:`int` **default_value** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_default_value(value) | -+-----------+--------------------------+ -| *Getter* | get_default_value() | -+-----------+--------------------------+ +:ref:`int` **default_value** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`int` value **)** +- :ref:`int` **get_default_value** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeIntParameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeIntParameter_property_hint: -- :ref:`Hint` **hint** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_hint(value) | -+-----------+-----------------+ -| *Getter* | get_hint() | -+-----------+-----------------+ +:ref:`Hint` **hint** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_hint** **(** :ref:`Hint` value **)** +- :ref:`Hint` **get_hint** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeIntParameter_property_max: -- :ref:`int` **max** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``100`` | -+-----------+----------------+ -| *Setter* | set_max(value) | -+-----------+----------------+ -| *Getter* | get_max() | -+-----------+----------------+ +:ref:`int` **max** = ``100`` + +.. rst-class:: classref-property-setget + +- void **set_max** **(** :ref:`int` value **)** +- :ref:`int` **get_max** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeIntParameter_property_min: -- :ref:`int` **min** +.. rst-class:: classref-property -+-----------+----------------+ -| *Default* | ``0`` | -+-----------+----------------+ -| *Setter* | set_min(value) | -+-----------+----------------+ -| *Getter* | get_min() | -+-----------+----------------+ +:ref:`int` **min** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_min** **(** :ref:`int` value **)** +- :ref:`int` **get_min** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeIntParameter_property_step: -- :ref:`int` **step** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1`` | -+-----------+-----------------+ -| *Setter* | set_step(value) | -+-----------+-----------------+ -| *Getter* | get_step() | -+-----------+-----------------+ +:ref:`int` **step** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_step** **(** :ref:`int` value **)** +- :ref:`int` **get_step** **(** **)** .. container:: contribute diff --git a/classes/class_visualshadernodeis.rst b/classes/class_visualshadernodeis.rst index 1caca8ae6..e43f1f556 100644 --- a/classes/class_visualshadernodeis.rst +++ b/classes/class_visualshadernodeis.rst @@ -14,51 +14,83 @@ VisualShaderNodeIs A boolean comparison operator to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Returns the boolean result of the comparison between ``INF`` or ``NaN`` and a scalar parameter. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``0`` | -+---------------------------------------------------+-------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``0`` | + +---------------------------------------------------+-------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeIs_Function: -.. _class_VisualShaderNodeIs_constant_FUNC_IS_INF: - -.. _class_VisualShaderNodeIs_constant_FUNC_IS_NAN: - -.. _class_VisualShaderNodeIs_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_IS_INF** = **0** --- Comparison with ``INF`` (Infinity). +.. _class_VisualShaderNodeIs_constant_FUNC_IS_INF: -- **FUNC_IS_NAN** = **1** --- Comparison with ``NaN`` (Not a Number; denotes invalid numeric results, e.g. division by zero). +.. rst-class:: classref-enumeration-constant -- **FUNC_MAX** = **2** --- Represents the size of the :ref:`Function` enum. +:ref:`Function` **FUNC_IS_INF** = ``0`` + +Comparison with ``INF`` (Infinity). + +.. _class_VisualShaderNodeIs_constant_FUNC_IS_NAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_IS_NAN** = ``1`` + +Comparison with ``NaN`` (Not a Number; denotes invalid numeric results, e.g. division by zero). + +.. _class_VisualShaderNodeIs_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``2`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeIs_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** The comparison function. See :ref:`Function` for options. diff --git a/classes/class_visualshadernodemix.rst b/classes/class_visualshadernodemix.rst index 2031d12ce..fa72e2a29 100644 --- a/classes/class_visualshadernodemix.rst +++ b/classes/class_visualshadernodemix.rst @@ -14,71 +14,123 @@ VisualShaderNodeMix Linearly interpolates between two values within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translates to ``mix(a, b, weight)`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------+------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+------------------------------------------------+------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +------------------------------------------------+------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +------------------------------------------------+------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeMix_OpType: -.. _class_VisualShaderNodeMix_constant_OP_TYPE_SCALAR: - -.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_2D_SCALAR: - -.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_3D_SCALAR: - -.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_4D_SCALAR: - -.. _class_VisualShaderNodeMix_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_SCALAR** = **0** --- A floating-point scalar. +.. _class_VisualShaderNodeMix_constant_OP_TYPE_SCALAR: -- **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_2D_SCALAR** = **2** --- The ``a`` and ``b`` ports use a 2D vector type. The ``weight`` port uses a scalar type. +:ref:`OpType` **OP_TYPE_SCALAR** = ``0`` -- **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type. +A floating-point scalar. -- **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``a`` and ``b`` ports use a 3D vector type. The ``weight`` port uses a scalar type. +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_2D: -- **OP_TYPE_VECTOR_4D** = **5** --- A 4D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_4D_SCALAR** = **6** --- The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``1`` -- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. +A 2D vector type. + +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_2D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D_SCALAR** = ``2`` + +The ``a`` and ``b`` ports use a 2D vector type. The ``weight`` port uses a scalar type. + +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``3`` + +A 3D vector type. + +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_3D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D_SCALAR** = ``4`` + +The ``a`` and ``b`` ports use a 3D vector type. The ``weight`` port uses a scalar type. + +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``5`` + +A 4D vector type. + +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_4D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D_SCALAR** = ``6`` + +The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. + +.. _class_VisualShaderNodeMix_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``7`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeMix_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. diff --git a/classes/class_visualshadernodemultiplyadd.rst b/classes/class_visualshadernodemultiplyadd.rst index b25a667ef..4b003949a 100644 --- a/classes/class_visualshadernodemultiplyadd.rst +++ b/classes/class_visualshadernodemultiplyadd.rst @@ -14,59 +14,99 @@ VisualShaderNodeMultiplyAdd Performs a fused multiply-add operation within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Uses three operands to compute ``(a * b + c)`` expression. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------+--------------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+--------------------------------------------------------+--------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------+--------------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeMultiplyAdd_OpType: -.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_SCALAR: - -.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_SCALAR** = **0** --- A floating-point scalar type. +.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_SCALAR: -- **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_3D** = **2** --- A 3D vector type. +:ref:`OpType` **OP_TYPE_SCALAR** = ``0`` -- **OP_TYPE_VECTOR_4D** = **3** --- A 4D vector type. +A floating-point scalar type. -- **OP_TYPE_MAX** = **4** --- Represents the size of the :ref:`OpType` enum. +.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``1`` + +A 2D vector type. + +.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``2`` + +A 3D vector type. + +.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``3`` + +A 4D vector type. + +.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``4`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeMultiplyAdd_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. diff --git a/classes/class_visualshadernodeouterproduct.rst b/classes/class_visualshadernodeouterproduct.rst index 6cf987679..8461be7b8 100644 --- a/classes/class_visualshadernodeouterproduct.rst +++ b/classes/class_visualshadernodeouterproduct.rst @@ -14,6 +14,8 @@ VisualShaderNodeOuterProduct Calculates an outer product of two vectors within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodeoutput.rst b/classes/class_visualshadernodeoutput.rst index a0fe8894d..596256554 100644 --- a/classes/class_visualshadernodeoutput.rst +++ b/classes/class_visualshadernodeoutput.rst @@ -16,6 +16,8 @@ VisualShaderNodeOutput Represents the output shader parameters within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodeparameter.rst b/classes/class_visualshadernodeparameter.rst index 13cf3615d..f8ce0c080 100644 --- a/classes/class_visualshadernodeparameter.rst +++ b/classes/class_visualshadernodeparameter.rst @@ -16,73 +16,110 @@ VisualShaderNodeParameter A base type for the parameters within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A parameter represents a variable in the shader which is set externally, i.e. from the :ref:`ShaderMaterial`. Parameters are exposed as properties in the :ref:`ShaderMaterial` and can be assigned from the Inspector or from a script. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+--------------------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`parameter_name` | ``""`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+--------+ -| :ref:`Qualifier` | :ref:`qualifier` | ``0`` | -+------------------------------------------------------------+--------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+--------------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`parameter_name` | ``""`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+--------+ + | :ref:`Qualifier` | :ref:`qualifier` | ``0`` | + +------------------------------------------------------------+--------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeParameter_Qualifier: -.. _class_VisualShaderNodeParameter_constant_QUAL_NONE: - -.. _class_VisualShaderNodeParameter_constant_QUAL_GLOBAL: - -.. _class_VisualShaderNodeParameter_constant_QUAL_INSTANCE: - -.. _class_VisualShaderNodeParameter_constant_QUAL_MAX: +.. rst-class:: classref-enumeration enum **Qualifier**: -- **QUAL_NONE** = **0** +.. _class_VisualShaderNodeParameter_constant_QUAL_NONE: -- **QUAL_GLOBAL** = **1** +.. rst-class:: classref-enumeration-constant -- **QUAL_INSTANCE** = **2** +:ref:`Qualifier` **QUAL_NONE** = ``0`` -- **QUAL_MAX** = **3** --- Represents the size of the :ref:`Qualifier` enum. + + +.. _class_VisualShaderNodeParameter_constant_QUAL_GLOBAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Qualifier` **QUAL_GLOBAL** = ``1`` + + + +.. _class_VisualShaderNodeParameter_constant_QUAL_INSTANCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Qualifier` **QUAL_INSTANCE** = ``2`` + + + +.. _class_VisualShaderNodeParameter_constant_QUAL_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Qualifier` **QUAL_MAX** = ``3`` + +Represents the size of the :ref:`Qualifier` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParameter_property_parameter_name: -- :ref:`String` **parameter_name** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``""`` | -+-----------+---------------------------+ -| *Setter* | set_parameter_name(value) | -+-----------+---------------------------+ -| *Getter* | get_parameter_name() | -+-----------+---------------------------+ +:ref:`String` **parameter_name** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_parameter_name** **(** :ref:`String` value **)** +- :ref:`String` **get_parameter_name** **(** **)** Name of the parameter, by which it can be accessed through the :ref:`ShaderMaterial` properties. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeParameter_property_qualifier: -- :ref:`Qualifier` **qualifier** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``0`` | -+-----------+----------------------+ -| *Setter* | set_qualifier(value) | -+-----------+----------------------+ -| *Getter* | get_qualifier() | -+-----------+----------------------+ +:ref:`Qualifier` **qualifier** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_qualifier** **(** :ref:`Qualifier` value **)** +- :ref:`Qualifier` **get_qualifier** **(** **)** .. container:: contribute diff --git a/classes/class_visualshadernodeparameterref.rst b/classes/class_visualshadernodeparameterref.rst index 4f9d7a643..fa344e88f 100644 --- a/classes/class_visualshadernodeparameterref.rst +++ b/classes/class_visualshadernodeparameterref.rst @@ -14,32 +14,44 @@ VisualShaderNodeParameterRef A reference to an existing :ref:`VisualShaderNodeParameter`. +.. rst-class:: classref-introduction-group + Description ----------- Creating a reference to a :ref:`VisualShaderNodeParameter` allows you to reuse this parameter in different shaders or shader stages easily. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------+-----------------------------------------------------------------------------------+--------------+ -| :ref:`String` | :ref:`parameter_name` | ``"[None]"`` | -+-----------------------------+-----------------------------------------------------------------------------------+--------------+ +.. table:: + :widths: auto + + +-----------------------------+-----------------------------------------------------------------------------------+--------------+ + | :ref:`String` | :ref:`parameter_name` | ``"[None]"`` | + +-----------------------------+-----------------------------------------------------------------------------------+--------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParameterRef_property_parameter_name: -- :ref:`String` **parameter_name** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``"[None]"`` | -+-----------+---------------------------+ -| *Setter* | set_parameter_name(value) | -+-----------+---------------------------+ -| *Getter* | get_parameter_name() | -+-----------+---------------------------+ +:ref:`String` **parameter_name** = ``"[None]"`` + +.. rst-class:: classref-property-setget + +- void **set_parameter_name** **(** :ref:`String` value **)** +- :ref:`String` **get_parameter_name** **(** **)** The name of the parameter which this reference points to. diff --git a/classes/class_visualshadernodeparticleaccelerator.rst b/classes/class_visualshadernodeparticleaccelerator.rst index 6d2593058..085a3a04a 100644 --- a/classes/class_visualshadernodeparticleaccelerator.rst +++ b/classes/class_visualshadernodeparticleaccelerator.rst @@ -16,50 +16,84 @@ VisualShaderNodeParticleAccelerator There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+----------------------------------------------------------------------+-------+ -| :ref:`Mode` | :ref:`mode` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+----------------------------------------------------------------------+-------+ + | :ref:`Mode` | :ref:`mode` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeParticleAccelerator_Mode: -.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_LINEAR: - -.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_RADIAL: - -.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_TANGENTIAL: - -.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_MAX: +.. rst-class:: classref-enumeration enum **Mode**: -- **MODE_LINEAR** = **0** +.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_LINEAR: -- **MODE_RADIAL** = **1** +.. rst-class:: classref-enumeration-constant -- **MODE_TANGENTIAL** = **2** +:ref:`Mode` **MODE_LINEAR** = ``0`` -- **MODE_MAX** = **3** --- Represents the size of the :ref:`Mode` enum. + + +.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_RADIAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_RADIAL** = ``1`` + + + +.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_TANGENTIAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_TANGENTIAL** = ``2`` + + + +.. _class_VisualShaderNodeParticleAccelerator_constant_MODE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_MAX** = ``3`` + +Represents the size of the :ref:`Mode` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParticleAccelerator_property_mode: -- :ref:`Mode` **mode** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_mode(value) | -+-----------+-----------------+ -| *Getter* | get_mode() | -+-----------+-----------------+ +:ref:`Mode` **mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mode** **(** :ref:`Mode` value **)** +- :ref:`Mode` **get_mode** **(** **)** .. container:: contribute diff --git a/classes/class_visualshadernodeparticleemit.rst b/classes/class_visualshadernodeparticleemit.rst index a3f612c80..bda50bf5e 100644 --- a/classes/class_visualshadernodeparticleemit.rst +++ b/classes/class_visualshadernodeparticleemit.rst @@ -16,54 +16,92 @@ VisualShaderNodeParticleEmit There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------+-----------------------------------------------------------------+--------+ -| :ref:`EmitFlags` | :ref:`flags` | ``31`` | -+---------------------------------------------------------------+-----------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+-----------------------------------------------------------------+--------+ + | :ref:`EmitFlags` | :ref:`flags` | ``31`` | + +---------------------------------------------------------------+-----------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeParticleEmit_EmitFlags: -.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_POSITION: - -.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_ROT_SCALE: - -.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_VELOCITY: - -.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_COLOR: - -.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_CUSTOM: +.. rst-class:: classref-enumeration enum **EmitFlags**: -- **EMIT_FLAG_POSITION** = **1** +.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_POSITION: -- **EMIT_FLAG_ROT_SCALE** = **2** +.. rst-class:: classref-enumeration-constant -- **EMIT_FLAG_VELOCITY** = **4** +:ref:`EmitFlags` **EMIT_FLAG_POSITION** = ``1`` -- **EMIT_FLAG_COLOR** = **8** -- **EMIT_FLAG_CUSTOM** = **16** + +.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_ROT_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_ROT_SCALE** = ``2`` + + + +.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_VELOCITY** = ``4`` + + + +.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_COLOR** = ``8`` + + + +.. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`EmitFlags` **EMIT_FLAG_CUSTOM** = ``16`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParticleEmit_property_flags: -- :ref:`EmitFlags` **flags** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``31`` | -+-----------+------------------+ -| *Setter* | set_flags(value) | -+-----------+------------------+ -| *Getter* | get_flags() | -+-----------+------------------+ +:ref:`EmitFlags` **flags** = ``31`` + +.. rst-class:: classref-property-setget + +- void **set_flags** **(** :ref:`EmitFlags` value **)** +- :ref:`EmitFlags` **get_flags** **(** **)** .. container:: contribute diff --git a/classes/class_visualshadernodeparticleemitter.rst b/classes/class_visualshadernodeparticleemitter.rst index 991698878..63c7297b3 100644 --- a/classes/class_visualshadernodeparticleemitter.rst +++ b/classes/class_visualshadernodeparticleemitter.rst @@ -16,27 +16,37 @@ VisualShaderNodeParticleEmitter A base class for particle emitters. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`mode_2d` | ``false`` | -+-------------------------+------------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`mode_2d` | ``false`` | + +-------------------------+------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParticleEmitter_property_mode_2d: -- :ref:`bool` **mode_2d** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_mode_2d(value) | -+-----------+--------------------+ -| *Getter* | is_mode_2d() | -+-----------+--------------------+ +:ref:`bool` **mode_2d** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_mode_2d** **(** :ref:`bool` value **)** +- :ref:`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. diff --git a/classes/class_visualshadernodeparticlemeshemitter.rst b/classes/class_visualshadernodeparticlemeshemitter.rst index ab593eb4d..e912b3040 100644 --- a/classes/class_visualshadernodeparticlemeshemitter.rst +++ b/classes/class_visualshadernodeparticlemeshemitter.rst @@ -16,65 +16,79 @@ VisualShaderNodeParticleMeshEmitter There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`Mesh` | :ref:`mesh` | | -+-------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`surface_index` | ``0`` | -+-------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`use_all_surfaces` | ``true`` | -+-------------------------+----------------------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`Mesh` | :ref:`mesh` | | + +-------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`surface_index` | ``0`` | + +-------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`use_all_surfaces` | ``true`` | + +-------------------------+----------------------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParticleMeshEmitter_property_mesh: -- :ref:`Mesh` **mesh** +.. rst-class:: classref-property -+----------+-----------------+ -| *Setter* | set_mesh(value) | -+----------+-----------------+ -| *Getter* | get_mesh() | -+----------+-----------------+ +:ref:`Mesh` **mesh** + +.. rst-class:: classref-property-setget + +- void **set_mesh** **(** :ref:`Mesh` value **)** +- :ref:`Mesh` **get_mesh** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeParticleMeshEmitter_property_surface_index: -- :ref:`int` **surface_index** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_surface_index(value) | -+-----------+--------------------------+ -| *Getter* | get_surface_index() | -+-----------+--------------------------+ +:ref:`int` **surface_index** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_surface_index** **(** :ref:`int` value **)** +- :ref:`int` **get_surface_index** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeParticleMeshEmitter_property_use_all_surfaces: -- :ref:`bool` **use_all_surfaces** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``true`` | -+-----------+-----------------------------+ -| *Setter* | set_use_all_surfaces(value) | -+-----------+-----------------------------+ -| *Getter* | is_use_all_surfaces() | -+-----------+-----------------------------+ +:ref:`bool` **use_all_surfaces** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_all_surfaces** **(** :ref:`bool` value **)** +- :ref:`bool` **is_use_all_surfaces** **(** **)** .. container:: contribute diff --git a/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst b/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst index 75ab79d2b..e36c70bd6 100644 --- a/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst +++ b/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst @@ -16,27 +16,37 @@ VisualShaderNodeParticleMultiplyByAxisAngle There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------+----------------------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`degrees_mode` | ``true`` | -+-------------------------+----------------------------------------------------------------------------------------------+----------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`degrees_mode` | ``true`` | + +-------------------------+----------------------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParticleMultiplyByAxisAngle_property_degrees_mode: -- :ref:`bool` **degrees_mode** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``true`` | -+-----------+-------------------------+ -| *Setter* | set_degrees_mode(value) | -+-----------+-------------------------+ -| *Getter* | is_degrees_mode() | -+-----------+-------------------------+ +:ref:`bool` **degrees_mode** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_degrees_mode** **(** :ref:`bool` value **)** +- :ref:`bool` **is_degrees_mode** **(** **)** .. container:: contribute diff --git a/classes/class_visualshadernodeparticlerandomness.rst b/classes/class_visualshadernodeparticlerandomness.rst index 64eb70ff7..05c39a334 100644 --- a/classes/class_visualshadernodeparticlerandomness.rst +++ b/classes/class_visualshadernodeparticlerandomness.rst @@ -16,50 +16,84 @@ VisualShaderNodeParticleRandomness There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+---------------------------------------------------------------+---------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +---------------------------------------------------------------+---------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeParticleRandomness_OpType: -.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_SCALAR: - -.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_SCALAR** = **0** --- A floating-point scalar. +.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_SCALAR: -- **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_3D** = **2** --- A 3D vector type. +:ref:`OpType` **OP_TYPE_SCALAR** = ``0`` -- **OP_TYPE_MAX** = **3** --- Represents the size of the :ref:`OpType` enum. +A floating-point scalar. + +.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``1`` + +A 2D vector type. + +.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``2`` + +A 3D vector type. + +.. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``3`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeParticleRandomness_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. diff --git a/classes/class_visualshadernoderesizablebase.rst b/classes/class_visualshadernoderesizablebase.rst index 77c57eb6f..31447845e 100644 --- a/classes/class_visualshadernoderesizablebase.rst +++ b/classes/class_visualshadernoderesizablebase.rst @@ -16,32 +16,44 @@ VisualShaderNodeResizableBase Base class for resizable nodes in a visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Resizable nodes have a handle that allows the user to adjust their size as needed. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | -+-------------------------------+----------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | + +-------------------------------+----------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeResizableBase_property_size: -- :ref:`Vector2` **size** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------+ -| *Setter* | set_size(value) | -+-----------+-------------------+ -| *Getter* | get_size() | -+-----------+-------------------+ +:ref:`Vector2` **size** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_size** **(** **)** The size of the node in the visual shader graph. diff --git a/classes/class_visualshadernodesample3d.rst b/classes/class_visualshadernodesample3d.rst index 3123c2f4d..3919ad598 100644 --- a/classes/class_visualshadernodesample3d.rst +++ b/classes/class_visualshadernodesample3d.rst @@ -16,51 +16,83 @@ VisualShaderNodeSample3D A base node for nodes which samples 3D textures in the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A virtual class, use the descendants instead. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+---------------------------------------------------------------+-------+ -| :ref:`Source` | :ref:`source` | ``0`` | -+-----------------------------------------------------+---------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------+-------+ + | :ref:`Source` | :ref:`source` | ``0`` | + +-----------------------------------------------------+---------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeSample3D_Source: -.. _class_VisualShaderNodeSample3D_constant_SOURCE_TEXTURE: - -.. _class_VisualShaderNodeSample3D_constant_SOURCE_PORT: - -.. _class_VisualShaderNodeSample3D_constant_SOURCE_MAX: +.. rst-class:: classref-enumeration enum **Source**: -- **SOURCE_TEXTURE** = **0** --- Creates internal uniform and provides a way to assign it within node. +.. _class_VisualShaderNodeSample3D_constant_SOURCE_TEXTURE: -- **SOURCE_PORT** = **1** --- Use the uniform texture from sampler port. +.. rst-class:: classref-enumeration-constant -- **SOURCE_MAX** = **2** --- Represents the size of the :ref:`Source` enum. +:ref:`Source` **SOURCE_TEXTURE** = ``0`` + +Creates internal uniform and provides a way to assign it within node. + +.. _class_VisualShaderNodeSample3D_constant_SOURCE_PORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_PORT** = ``1`` + +Use the uniform texture from sampler port. + +.. _class_VisualShaderNodeSample3D_constant_SOURCE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_MAX** = ``2`` + +Represents the size of the :ref:`Source` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeSample3D_property_source: -- :ref:`Source` **source** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_source(value) | -+-----------+-------------------+ -| *Getter* | get_source() | -+-----------+-------------------+ +:ref:`Source` **source** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_source** **(** :ref:`Source` value **)** +- :ref:`Source` **get_source** **(** **)** An input source type. diff --git a/classes/class_visualshadernodescreenuvtosdf.rst b/classes/class_visualshadernodescreenuvtosdf.rst index 587b298da..5bcd722b8 100644 --- a/classes/class_visualshadernodescreenuvtosdf.rst +++ b/classes/class_visualshadernodescreenuvtosdf.rst @@ -14,6 +14,8 @@ VisualShaderNodeScreenUVToSDF A function to convert screen UV to an SDF (signed-distance field), to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodesdfraymarch.rst b/classes/class_visualshadernodesdfraymarch.rst index 94a3edfbc..47e60c0bb 100644 --- a/classes/class_visualshadernodesdfraymarch.rst +++ b/classes/class_visualshadernodesdfraymarch.rst @@ -14,6 +14,8 @@ VisualShaderNodeSDFRaymarch SDF raymarching algorithm to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodesdftoscreenuv.rst b/classes/class_visualshadernodesdftoscreenuv.rst index e4786c0a8..481e5ba4a 100644 --- a/classes/class_visualshadernodesdftoscreenuv.rst +++ b/classes/class_visualshadernodesdftoscreenuv.rst @@ -14,6 +14,8 @@ VisualShaderNodeSDFToScreenUV A function to convert an SDF (signed-distance field) to screen UV, to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodesmoothstep.rst b/classes/class_visualshadernodesmoothstep.rst index 6dee163cb..bf35f60e1 100644 --- a/classes/class_visualshadernodesmoothstep.rst +++ b/classes/class_visualshadernodesmoothstep.rst @@ -14,6 +14,8 @@ VisualShaderNodeSmoothStep Calculates a SmoothStep function within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,66 +23,116 @@ Translates to ``smoothstep(edge0, edge1, x)`` in the shader language. Returns ``0.0`` if ``x`` is smaller than ``edge0`` and ``1.0`` if ``x`` is larger than ``edge1``. Otherwise, the return value is interpolated between ``0.0`` and ``1.0`` using Hermite polynomials. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+-------------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-------------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeSmoothStep_OpType: -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_SCALAR: - -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D_SCALAR: - -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D_SCALAR: - -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D_SCALAR: - -.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_SCALAR** = **0** --- A floating-point scalar type. +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_SCALAR: -- **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_2D_SCALAR** = **2** --- The ``x`` port uses a 2D vector type. The first two ports use a floating-point scalar type. +:ref:`OpType` **OP_TYPE_SCALAR** = ``0`` -- **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type. +A floating-point scalar type. -- **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``x`` port uses a 3D vector type. The first two ports use a floating-point scalar type. +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D: -- **OP_TYPE_VECTOR_4D** = **5** --- A 4D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_4D_SCALAR** = **6** --- The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``1`` -- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. +A 2D vector type. + +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D_SCALAR** = ``2`` + +The ``x`` port uses a 2D vector type. The first two ports use a floating-point scalar type. + +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``3`` + +A 3D vector type. + +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D_SCALAR** = ``4`` + +The ``x`` port uses a 3D vector type. The first two ports use a floating-point scalar type. + +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``5`` + +A 4D vector type. + +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D_SCALAR** = ``6`` + +The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. + +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``7`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeSmoothStep_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. diff --git a/classes/class_visualshadernodestep.rst b/classes/class_visualshadernodestep.rst index 1fc74c732..353883f58 100644 --- a/classes/class_visualshadernodestep.rst +++ b/classes/class_visualshadernodestep.rst @@ -14,6 +14,8 @@ VisualShaderNodeStep Calculates a Step function within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,66 +23,116 @@ Translates to ``step(edge, x)`` in the shader language. Returns ``0.0`` if ``x`` is smaller than ``edge`` and ``1.0`` otherwise. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+-------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+-------------------------------------------------+-------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +-------------------------------------------------+-------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeStep_OpType: -.. _class_VisualShaderNodeStep_constant_OP_TYPE_SCALAR: - -.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_2D_SCALAR: - -.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_3D_SCALAR: - -.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_4D_SCALAR: - -.. _class_VisualShaderNodeStep_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_SCALAR** = **0** --- A floating-point scalar type. +.. _class_VisualShaderNodeStep_constant_OP_TYPE_SCALAR: -- **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_2D_SCALAR** = **2** --- The ``x`` port uses a 2D vector type, while the ``edge`` port uses a floating-point scalar type. +:ref:`OpType` **OP_TYPE_SCALAR** = ``0`` -- **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type. +A floating-point scalar type. -- **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``x`` port uses a 3D vector type, while the ``edge`` port uses a floating-point scalar type. +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_2D: -- **OP_TYPE_VECTOR_4D** = **5** --- A 4D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_4D_SCALAR** = **6** --- The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``1`` -- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. +A 2D vector type. + +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_2D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D_SCALAR** = ``2`` + +The ``x`` port uses a 2D vector type, while the ``edge`` port uses a floating-point scalar type. + +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``3`` + +A 3D vector type. + +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_3D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D_SCALAR** = ``4`` + +The ``x`` port uses a 3D vector type, while the ``edge`` port uses a floating-point scalar type. + +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``5`` + +A 4D vector type. + +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_4D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D_SCALAR** = ``6`` + +The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. + +.. _class_VisualShaderNodeStep_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``7`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeStep_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. diff --git a/classes/class_visualshadernodeswitch.rst b/classes/class_visualshadernodeswitch.rst index 93745f193..6b64b6610 100644 --- a/classes/class_visualshadernodeswitch.rst +++ b/classes/class_visualshadernodeswitch.rst @@ -14,71 +14,123 @@ VisualShaderNodeSwitch A selector function for use within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Returns an associated value of the ``op_type`` type if the provided boolean value is ``true`` or ``false``. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+---------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``0`` | -+---------------------------------------------------+---------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +---------------------------------------------------+---------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeSwitch_OpType: -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_FLOAT: - -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_INT: - -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_BOOLEAN: - -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_TRANSFORM: - -.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_FLOAT** = **0** --- A floating-point scalar. +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_FLOAT: -- **OP_TYPE_INT** = **1** --- An integer scalar. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_2D** = **2** --- A 2D vector type. +:ref:`OpType` **OP_TYPE_FLOAT** = ``0`` -- **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type. +A floating-point scalar. -- **OP_TYPE_VECTOR_4D** = **4** --- A 4D vector type. +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_INT: -- **OP_TYPE_BOOLEAN** = **5** --- A boolean type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_TRANSFORM** = **6** --- A transform type. +:ref:`OpType` **OP_TYPE_INT** = ``1`` -- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. +An integer scalar. + +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``2`` + +A 2D vector type. + +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``3`` + +A 3D vector type. + +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``4`` + +A 4D vector type. + +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_BOOLEAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_BOOLEAN** = ``5`` + +A boolean type. + +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_TRANSFORM: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_TRANSFORM** = ``6`` + +A transform type. + +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``7`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeSwitch_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A type of operands and returned value. diff --git a/classes/class_visualshadernodetexture.rst b/classes/class_visualshadernodetexture.rst index 26d9fba3a..72670c67c 100644 --- a/classes/class_visualshadernodetexture.rst +++ b/classes/class_visualshadernodetexture.rst @@ -14,123 +14,195 @@ VisualShaderNodeTexture Performs a 2D texture lookup within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ -| :ref:`Source` | :ref:`source` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`texture` | | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ -| :ref:`TextureType` | :ref:`texture_type` | ``0`` | -+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + | :ref:`Source` | :ref:`source` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`texture` | | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + | :ref:`TextureType` | :ref:`texture_type` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeTexture_Source: -.. _class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE: - -.. _class_VisualShaderNodeTexture_constant_SOURCE_SCREEN: - -.. _class_VisualShaderNodeTexture_constant_SOURCE_2D_TEXTURE: - -.. _class_VisualShaderNodeTexture_constant_SOURCE_2D_NORMAL: - -.. _class_VisualShaderNodeTexture_constant_SOURCE_DEPTH: - -.. _class_VisualShaderNodeTexture_constant_SOURCE_PORT: - -.. _class_VisualShaderNodeTexture_constant_SOURCE_MAX: +.. rst-class:: classref-enumeration enum **Source**: -- **SOURCE_TEXTURE** = **0** --- Use the texture given as an argument for this function. +.. _class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE: -- **SOURCE_SCREEN** = **1** --- Use the current viewport's texture as the source. +.. rst-class:: classref-enumeration-constant -- **SOURCE_2D_TEXTURE** = **2** --- Use the texture from this shader's texture built-in (e.g. a texture of a :ref:`Sprite2D`). +:ref:`Source` **SOURCE_TEXTURE** = ``0`` -- **SOURCE_2D_NORMAL** = **3** --- Use the texture from this shader's normal map built-in. +Use the texture given as an argument for this function. -- **SOURCE_DEPTH** = **4** --- Use the depth texture available for this shader. +.. _class_VisualShaderNodeTexture_constant_SOURCE_SCREEN: -- **SOURCE_PORT** = **5** --- Use the texture provided in the input port for this function. +.. rst-class:: classref-enumeration-constant -- **SOURCE_MAX** = **6** --- Represents the size of the :ref:`Source` enum. +:ref:`Source` **SOURCE_SCREEN** = ``1`` + +Use the current viewport's texture as the source. + +.. _class_VisualShaderNodeTexture_constant_SOURCE_2D_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_2D_TEXTURE** = ``2`` + +Use the texture from this shader's texture built-in (e.g. a texture of a :ref:`Sprite2D`). + +.. _class_VisualShaderNodeTexture_constant_SOURCE_2D_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_2D_NORMAL** = ``3`` + +Use the texture from this shader's normal map built-in. + +.. _class_VisualShaderNodeTexture_constant_SOURCE_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_DEPTH** = ``4`` + +Use the depth texture available for this shader. + +.. _class_VisualShaderNodeTexture_constant_SOURCE_PORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_PORT** = ``5`` + +Use the texture provided in the input port for this function. + +.. _class_VisualShaderNodeTexture_constant_SOURCE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Source` **SOURCE_MAX** = ``6`` + +Represents the size of the :ref:`Source` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTexture_TextureType: -.. _class_VisualShaderNodeTexture_constant_TYPE_DATA: - -.. _class_VisualShaderNodeTexture_constant_TYPE_COLOR: - -.. _class_VisualShaderNodeTexture_constant_TYPE_NORMAL_MAP: - -.. _class_VisualShaderNodeTexture_constant_TYPE_MAX: +.. rst-class:: classref-enumeration enum **TextureType**: -- **TYPE_DATA** = **0** --- No hints are added to the uniform declaration. +.. _class_VisualShaderNodeTexture_constant_TYPE_DATA: -- **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. +.. rst-class:: classref-enumeration-constant -- **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. +:ref:`TextureType` **TYPE_DATA** = ``0`` -- **TYPE_MAX** = **3** --- Represents the size of the :ref:`TextureType` enum. +No hints are added to the uniform declaration. + +.. _class_VisualShaderNodeTexture_constant_TYPE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_COLOR** = ``1`` + +Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. + +.. _class_VisualShaderNodeTexture_constant_TYPE_NORMAL_MAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_NORMAL_MAP** = ``2`` + +Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. + +.. _class_VisualShaderNodeTexture_constant_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_MAX** = ``3`` + +Represents the size of the :ref:`TextureType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTexture_property_source: -- :ref:`Source` **source** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``0`` | -+-----------+-------------------+ -| *Setter* | set_source(value) | -+-----------+-------------------+ -| *Getter* | get_source() | -+-----------+-------------------+ +:ref:`Source` **source** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_source** **(** :ref:`Source` value **)** +- :ref:`Source` **get_source** **(** **)** Determines the source for the lookup. See :ref:`Source` for options. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeTexture_property_texture: -- :ref:`Texture2D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture2D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_texture** **(** **)** The source texture, if needed for the selected :ref:`source`. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeTexture_property_texture_type: -- :ref:`TextureType` **texture_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_texture_type(value) | -+-----------+-------------------------+ -| *Getter* | get_texture_type() | -+-----------+-------------------------+ +:ref:`TextureType` **texture_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_type** **(** :ref:`TextureType` value **)** +- :ref:`TextureType` **get_texture_type** **(** **)** Specifies the type of the texture if :ref:`source` is set to :ref:`SOURCE_TEXTURE`. See :ref:`TextureType` for options. diff --git a/classes/class_visualshadernodetexture2darray.rst b/classes/class_visualshadernodetexture2darray.rst index a972104af..1265b8309 100644 --- a/classes/class_visualshadernodetexture2darray.rst +++ b/classes/class_visualshadernodetexture2darray.rst @@ -14,30 +14,44 @@ VisualShaderNodeTexture2DArray A 2D texture uniform array to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform sampler2DArray`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------+-----------------------------------------------------------------------------------+ -| :ref:`Texture2DArray` | :ref:`texture_array` | -+---------------------------------------------+-----------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------+-----------------------------------------------------------------------------------+ + | :ref:`Texture2DArray` | :ref:`texture_array` | + +---------------------------------------------+-----------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTexture2DArray_property_texture_array: -- :ref:`Texture2DArray` **texture_array** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Setter* | set_texture_array(value) | -+----------+--------------------------+ -| *Getter* | get_texture_array() | -+----------+--------------------------+ +:ref:`Texture2DArray` **texture_array** + +.. rst-class:: classref-property-setget + +- void **set_texture_array** **(** :ref:`Texture2DArray` value **)** +- :ref:`Texture2DArray` **get_texture_array** **(** **)** A source texture array. Used if :ref:`VisualShaderNodeSample3D.source` is set to :ref:`VisualShaderNodeSample3D.SOURCE_TEXTURE`. diff --git a/classes/class_visualshadernodetexture2dparameter.rst b/classes/class_visualshadernodetexture2dparameter.rst index 214d1deaa..adc86cc16 100644 --- a/classes/class_visualshadernodetexture2dparameter.rst +++ b/classes/class_visualshadernodetexture2dparameter.rst @@ -14,6 +14,8 @@ VisualShaderNodeTexture2DParameter Provides a 2D texture parameter within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodetexture3d.rst b/classes/class_visualshadernodetexture3d.rst index 45d50d022..976dea392 100644 --- a/classes/class_visualshadernodetexture3d.rst +++ b/classes/class_visualshadernodetexture3d.rst @@ -14,30 +14,44 @@ VisualShaderNodeTexture3D Performs a 3D texture lookup within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------+------------------------------------------------------------------+ -| :ref:`Texture3D` | :ref:`texture` | -+-----------------------------------+------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+------------------------------------------------------------------+ + | :ref:`Texture3D` | :ref:`texture` | + +-----------------------------------+------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTexture3D_property_texture: -- :ref:`Texture3D` **texture** +.. rst-class:: classref-property -+----------+--------------------+ -| *Setter* | set_texture(value) | -+----------+--------------------+ -| *Getter* | get_texture() | -+----------+--------------------+ +:ref:`Texture3D` **texture** + +.. rst-class:: classref-property-setget + +- void **set_texture** **(** :ref:`Texture3D` value **)** +- :ref:`Texture3D` **get_texture** **(** **)** A source texture. Used if :ref:`VisualShaderNodeSample3D.source` is set to :ref:`VisualShaderNodeSample3D.SOURCE_TEXTURE`. diff --git a/classes/class_visualshadernodetexture3dparameter.rst b/classes/class_visualshadernodetexture3dparameter.rst index 9f2ed506b..166491877 100644 --- a/classes/class_visualshadernodetexture3dparameter.rst +++ b/classes/class_visualshadernodetexture3dparameter.rst @@ -14,6 +14,8 @@ VisualShaderNodeTexture3DParameter Provides a 3D texture parameter within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodetextureparameter.rst b/classes/class_visualshadernodetextureparameter.rst index 5298db8ab..52c53063c 100644 --- a/classes/class_visualshadernodetextureparameter.rst +++ b/classes/class_visualshadernodetextureparameter.rst @@ -16,195 +16,314 @@ VisualShaderNodeTextureParameter Performs a uniform texture lookup within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Performs a lookup operation on the texture provided as a uniform for the shader. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ -| :ref:`ColorDefault` | :ref:`color_default` | ``0`` | -+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ -| :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | -+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ -| :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | -+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ -| :ref:`TextureType` | :ref:`texture_type` | ``0`` | -+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ + | :ref:`ColorDefault` | :ref:`color_default` | ``0`` | + +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ + | :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | + +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ + | :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | + +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ + | :ref:`TextureType` | :ref:`texture_type` | ``0`` | + +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeTextureParameter_TextureType: -.. _class_VisualShaderNodeTextureParameter_constant_TYPE_DATA: - -.. _class_VisualShaderNodeTextureParameter_constant_TYPE_COLOR: - -.. _class_VisualShaderNodeTextureParameter_constant_TYPE_NORMAL_MAP: - -.. _class_VisualShaderNodeTextureParameter_constant_TYPE_ANISOTROPY: - -.. _class_VisualShaderNodeTextureParameter_constant_TYPE_MAX: +.. rst-class:: classref-enumeration enum **TextureType**: -- **TYPE_DATA** = **0** --- No hints are added to the uniform declaration. +.. _class_VisualShaderNodeTextureParameter_constant_TYPE_DATA: -- **TYPE_COLOR** = **1** --- Adds ``source_color`` as hint to the uniform declaration for proper sRGB to linear conversion. +.. rst-class:: classref-enumeration-constant -- **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. +:ref:`TextureType` **TYPE_DATA** = ``0`` -- **TYPE_ANISOTROPY** = **3** --- Adds ``hint_anisotropy`` as hint to the uniform declaration to use for a flowmap. +No hints are added to the uniform declaration. -- **TYPE_MAX** = **4** --- Represents the size of the :ref:`TextureType` enum. +.. _class_VisualShaderNodeTextureParameter_constant_TYPE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_COLOR** = ``1`` + +Adds ``source_color`` as hint to the uniform declaration for proper sRGB to linear conversion. + +.. _class_VisualShaderNodeTextureParameter_constant_TYPE_NORMAL_MAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_NORMAL_MAP** = ``2`` + +Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. + +.. _class_VisualShaderNodeTextureParameter_constant_TYPE_ANISOTROPY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_ANISOTROPY** = ``3`` + +Adds ``hint_anisotropy`` as hint to the uniform declaration to use for a flowmap. + +.. _class_VisualShaderNodeTextureParameter_constant_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TYPE_MAX** = ``4`` + +Represents the size of the :ref:`TextureType` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTextureParameter_ColorDefault: -.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_WHITE: - -.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_BLACK: - -.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_TRANSPARENT: - -.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_MAX: +.. rst-class:: classref-enumeration enum **ColorDefault**: -- **COLOR_DEFAULT_WHITE** = **0** --- Defaults to fully opaque white color. +.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_WHITE: -- **COLOR_DEFAULT_BLACK** = **1** --- Defaults to fully opaque black color. +.. rst-class:: classref-enumeration-constant -- **COLOR_DEFAULT_TRANSPARENT** = **2** --- Defaults to fully transparent black color. +:ref:`ColorDefault` **COLOR_DEFAULT_WHITE** = ``0`` -- **COLOR_DEFAULT_MAX** = **3** --- Represents the size of the :ref:`ColorDefault` enum. +Defaults to fully opaque white color. + +.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_BLACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorDefault` **COLOR_DEFAULT_BLACK** = ``1`` + +Defaults to fully opaque black color. + +.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorDefault` **COLOR_DEFAULT_TRANSPARENT** = ``2`` + +Defaults to fully transparent black color. + +.. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorDefault` **COLOR_DEFAULT_MAX** = ``3`` + +Represents the size of the :ref:`ColorDefault` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTextureParameter_TextureFilter: -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_DEFAULT: - -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST: - -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR: - -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP: - -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP: - -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC: - -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC: - -.. _class_VisualShaderNodeTextureParameter_constant_FILTER_MAX: +.. rst-class:: classref-enumeration enum **TextureFilter**: -- **FILTER_DEFAULT** = **0** +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_DEFAULT: -- **FILTER_NEAREST** = **1** +.. rst-class:: classref-enumeration-constant -- **FILTER_LINEAR** = **2** +:ref:`TextureFilter` **FILTER_DEFAULT** = ``0`` -- **FILTER_NEAREST_MIPMAP** = **3** -- **FILTER_LINEAR_MIPMAP** = **4** -- **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = **5** +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST: -- **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = **6** +.. rst-class:: classref-enumeration-constant -- **FILTER_MAX** = **7** --- Represents the size of the :ref:`TextureFilter` enum. +:ref:`TextureFilter` **FILTER_NEAREST** = ``1`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **FILTER_LINEAR** = ``2`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **FILTER_NEAREST_MIPMAP** = ``3`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **FILTER_LINEAR_MIPMAP** = ``4`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = ``5`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = ``6`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_FILTER_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFilter` **FILTER_MAX** = ``7`` + +Represents the size of the :ref:`TextureFilter` enum. + +.. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTextureParameter_TextureRepeat: -.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DEFAULT: - -.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_ENABLED: - -.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DISABLED: - -.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_MAX: +.. rst-class:: classref-enumeration enum **TextureRepeat**: -- **REPEAT_DEFAULT** = **0** +.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DEFAULT: -- **REPEAT_ENABLED** = **1** +.. rst-class:: classref-enumeration-constant -- **REPEAT_DISABLED** = **2** +:ref:`TextureRepeat` **REPEAT_DEFAULT** = ``0`` -- **REPEAT_MAX** = **3** --- Represents the size of the :ref:`TextureRepeat` enum. + + +.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureRepeat` **REPEAT_ENABLED** = ``1`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureRepeat` **REPEAT_DISABLED** = ``2`` + + + +.. _class_VisualShaderNodeTextureParameter_constant_REPEAT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureRepeat` **REPEAT_MAX** = ``3`` + +Represents the size of the :ref:`TextureRepeat` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTextureParameter_property_color_default: -- :ref:`ColorDefault` **color_default** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------+ -| *Setter* | set_color_default(value) | -+-----------+--------------------------+ -| *Getter* | get_color_default() | -+-----------+--------------------------+ +:ref:`ColorDefault` **color_default** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_color_default** **(** :ref:`ColorDefault` value **)** +- :ref:`ColorDefault` **get_color_default** **(** **)** Sets the default color if no texture is assigned to the uniform. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeTextureParameter_property_texture_filter: -- :ref:`TextureFilter` **texture_filter** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_texture_filter(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_filter() | -+-----------+---------------------------+ +:ref:`TextureFilter` **texture_filter** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** +- :ref:`TextureFilter` **get_texture_filter** **(** **)** Sets the texture filtering mode. See :ref:`TextureFilter` for options. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeTextureParameter_property_texture_repeat: -- :ref:`TextureRepeat` **texture_repeat** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_texture_repeat(value) | -+-----------+---------------------------+ -| *Getter* | get_texture_repeat() | -+-----------+---------------------------+ +:ref:`TextureRepeat` **texture_repeat** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_repeat** **(** :ref:`TextureRepeat` value **)** +- :ref:`TextureRepeat` **get_texture_repeat** **(** **)** Sets the texture repeating mode. See :ref:`TextureRepeat` for options. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeTextureParameter_property_texture_type: -- :ref:`TextureType` **texture_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_texture_type(value) | -+-----------+-------------------------+ -| *Getter* | get_texture_type() | -+-----------+-------------------------+ +:ref:`TextureType` **texture_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_texture_type** **(** :ref:`TextureType` value **)** +- :ref:`TextureType` **get_texture_type** **(** **)** Defines the type of data provided by the source texture. See :ref:`TextureType` for options. diff --git a/classes/class_visualshadernodetextureparametertriplanar.rst b/classes/class_visualshadernodetextureparametertriplanar.rst index e83ff2359..d7fedae74 100644 --- a/classes/class_visualshadernodetextureparametertriplanar.rst +++ b/classes/class_visualshadernodetextureparametertriplanar.rst @@ -14,6 +14,8 @@ VisualShaderNodeTextureParameterTriplanar Performs a uniform texture lookup with triplanar within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodetexturesdf.rst b/classes/class_visualshadernodetexturesdf.rst index 1688c7935..623ab5606 100644 --- a/classes/class_visualshadernodetexturesdf.rst +++ b/classes/class_visualshadernodetexturesdf.rst @@ -14,6 +14,8 @@ VisualShaderNodeTextureSDF Performs an SDF (signed-distance field) texture lookup within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodetexturesdfnormal.rst b/classes/class_visualshadernodetexturesdfnormal.rst index b724b04e7..52e0e9fa6 100644 --- a/classes/class_visualshadernodetexturesdfnormal.rst +++ b/classes/class_visualshadernodetexturesdfnormal.rst @@ -14,6 +14,8 @@ VisualShaderNodeTextureSDFNormal Performs an SDF (signed-distance field) normal texture lookup within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodetransformcompose.rst b/classes/class_visualshadernodetransformcompose.rst index 19267856d..938b8ae4b 100644 --- a/classes/class_visualshadernodetransformcompose.rst +++ b/classes/class_visualshadernodetransformcompose.rst @@ -14,6 +14,8 @@ VisualShaderNodeTransformCompose Composes a :ref:`Transform3D` from four :ref:`Vector3`\ s within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodetransformconstant.rst b/classes/class_visualshadernodetransformconstant.rst index 8e64917be..137dc385e 100644 --- a/classes/class_visualshadernodetransformconstant.rst +++ b/classes/class_visualshadernodetransformconstant.rst @@ -14,32 +14,44 @@ VisualShaderNodeTransformConstant A :ref:`Transform3D` constant for use within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A constant :ref:`Transform3D`, which can be used as an input node. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`constant` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+---------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`constant` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTransformConstant_property_constant: -- :ref:`Transform3D` **constant** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_constant(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_constant() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **constant** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_constant** **(** **)** A :ref:`Transform3D` constant which represents the state of this node. diff --git a/classes/class_visualshadernodetransformdecompose.rst b/classes/class_visualshadernodetransformdecompose.rst index acb23d01e..2b29bb6f1 100644 --- a/classes/class_visualshadernodetransformdecompose.rst +++ b/classes/class_visualshadernodetransformdecompose.rst @@ -14,6 +14,8 @@ VisualShaderNodeTransformDecompose Decomposes a :ref:`Transform3D` into four :ref:`Vector3`\ s within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodetransformfunc.rst b/classes/class_visualshadernodetransformfunc.rst index 8bf05b690..fae041d77 100644 --- a/classes/class_visualshadernodetransformfunc.rst +++ b/classes/class_visualshadernodetransformfunc.rst @@ -14,51 +14,83 @@ VisualShaderNodeTransformFunc Computes a :ref:`Transform3D` function within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Computes an inverse or transpose function on the provided :ref:`Transform3D`. +.. rst-class:: classref-reftable-group + Properties ---------- -+--------------------------------------------------------------+------------------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``0`` | -+--------------------------------------------------------------+------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +--------------------------------------------------------------+------------------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``0`` | + +--------------------------------------------------------------+------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeTransformFunc_Function: -.. _class_VisualShaderNodeTransformFunc_constant_FUNC_INVERSE: - -.. _class_VisualShaderNodeTransformFunc_constant_FUNC_TRANSPOSE: - -.. _class_VisualShaderNodeTransformFunc_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_INVERSE** = **0** --- Perform the inverse operation on the :ref:`Transform3D` matrix. +.. _class_VisualShaderNodeTransformFunc_constant_FUNC_INVERSE: -- **FUNC_TRANSPOSE** = **1** --- Perform the transpose operation on the :ref:`Transform3D` matrix. +.. rst-class:: classref-enumeration-constant -- **FUNC_MAX** = **2** --- Represents the size of the :ref:`Function` enum. +:ref:`Function` **FUNC_INVERSE** = ``0`` + +Perform the inverse operation on the :ref:`Transform3D` matrix. + +.. _class_VisualShaderNodeTransformFunc_constant_FUNC_TRANSPOSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_TRANSPOSE** = ``1`` + +Perform the transpose operation on the :ref:`Transform3D` matrix. + +.. _class_VisualShaderNodeTransformFunc_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``2`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTransformFunc_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** The function to be computed. See :ref:`Function` for options. diff --git a/classes/class_visualshadernodetransformop.rst b/classes/class_visualshadernodetransformop.rst index 9537539d9..fdbef7bbd 100644 --- a/classes/class_visualshadernodetransformop.rst +++ b/classes/class_visualshadernodetransformop.rst @@ -14,79 +14,139 @@ VisualShaderNodeTransformOp A :ref:`Transform3D` operator to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Applies :ref:`operator` to two transform (4x4 matrices) inputs. +.. rst-class:: classref-reftable-group + Properties ---------- -+------------------------------------------------------------+----------------------------------------------------------------------+-------+ -| :ref:`Operator` | :ref:`operator` | ``0`` | -+------------------------------------------------------------+----------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +------------------------------------------------------------+----------------------------------------------------------------------+-------+ + | :ref:`Operator` | :ref:`operator` | ``0`` | + +------------------------------------------------------------+----------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeTransformOp_Operator: -.. _class_VisualShaderNodeTransformOp_constant_OP_AxB: - -.. _class_VisualShaderNodeTransformOp_constant_OP_BxA: - -.. _class_VisualShaderNodeTransformOp_constant_OP_AxB_COMP: - -.. _class_VisualShaderNodeTransformOp_constant_OP_BxA_COMP: - -.. _class_VisualShaderNodeTransformOp_constant_OP_ADD: - -.. _class_VisualShaderNodeTransformOp_constant_OP_A_MINUS_B: - -.. _class_VisualShaderNodeTransformOp_constant_OP_B_MINUS_A: - -.. _class_VisualShaderNodeTransformOp_constant_OP_A_DIV_B: - -.. _class_VisualShaderNodeTransformOp_constant_OP_B_DIV_A: - -.. _class_VisualShaderNodeTransformOp_constant_OP_MAX: +.. rst-class:: classref-enumeration enum **Operator**: -- **OP_AxB** = **0** --- Multiplies transform ``a`` by the transform ``b``. +.. _class_VisualShaderNodeTransformOp_constant_OP_AxB: -- **OP_BxA** = **1** --- Multiplies transform ``b`` by the transform ``a``. +.. rst-class:: classref-enumeration-constant -- **OP_AxB_COMP** = **2** --- Performs a component-wise multiplication of transform ``a`` by the transform ``b``. +:ref:`Operator` **OP_AxB** = ``0`` -- **OP_BxA_COMP** = **3** --- Performs a component-wise multiplication of transform ``b`` by the transform ``a``. +Multiplies transform ``a`` by the transform ``b``. -- **OP_ADD** = **4** --- Adds two transforms. +.. _class_VisualShaderNodeTransformOp_constant_OP_BxA: -- **OP_A_MINUS_B** = **5** --- Subtracts the transform ``a`` from the transform ``b``. +.. rst-class:: classref-enumeration-constant -- **OP_B_MINUS_A** = **6** --- Subtracts the transform ``b`` from the transform ``a``. +:ref:`Operator` **OP_BxA** = ``1`` -- **OP_A_DIV_B** = **7** --- Divides the transform ``a`` by the transform ``b``. +Multiplies transform ``b`` by the transform ``a``. -- **OP_B_DIV_A** = **8** --- Divides the transform ``b`` by the transform ``a``. +.. _class_VisualShaderNodeTransformOp_constant_OP_AxB_COMP: -- **OP_MAX** = **9** --- Represents the size of the :ref:`Operator` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_AxB_COMP** = ``2`` + +Performs a component-wise multiplication of transform ``a`` by the transform ``b``. + +.. _class_VisualShaderNodeTransformOp_constant_OP_BxA_COMP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BxA_COMP** = ``3`` + +Performs a component-wise multiplication of transform ``b`` by the transform ``a``. + +.. _class_VisualShaderNodeTransformOp_constant_OP_ADD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_ADD** = ``4`` + +Adds two transforms. + +.. _class_VisualShaderNodeTransformOp_constant_OP_A_MINUS_B: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_A_MINUS_B** = ``5`` + +Subtracts the transform ``a`` from the transform ``b``. + +.. _class_VisualShaderNodeTransformOp_constant_OP_B_MINUS_A: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_B_MINUS_A** = ``6`` + +Subtracts the transform ``b`` from the transform ``a``. + +.. _class_VisualShaderNodeTransformOp_constant_OP_A_DIV_B: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_A_DIV_B** = ``7`` + +Divides the transform ``a`` by the transform ``b``. + +.. _class_VisualShaderNodeTransformOp_constant_OP_B_DIV_A: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_B_DIV_A** = ``8`` + +Divides the transform ``b`` by the transform ``a``. + +.. _class_VisualShaderNodeTransformOp_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MAX** = ``9`` + +Represents the size of the :ref:`Operator` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTransformOp_property_operator: -- :ref:`Operator` **operator** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_operator(value) | -+-----------+---------------------+ -| *Getter* | get_operator() | -+-----------+---------------------+ +:ref:`Operator` **operator** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operator** **(** :ref:`Operator` value **)** +- :ref:`Operator` **get_operator** **(** **)** The type of the operation to be performed on the transforms. See :ref:`Operator` for options. diff --git a/classes/class_visualshadernodetransformparameter.rst b/classes/class_visualshadernodetransformparameter.rst index 0cb8bb5a8..f9dac21d9 100644 --- a/classes/class_visualshadernodetransformparameter.rst +++ b/classes/class_visualshadernodetransformparameter.rst @@ -14,50 +14,63 @@ VisualShaderNodeTransformParameter A :ref:`Transform3D` parameter for use within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform mat4`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`default_value` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+---------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+---------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`default_value` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +---------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +---------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTransformParameter_property_default_value: -- :ref:`Transform3D` **default_value** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_default_value(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_default_value() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **default_value** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_default_value** **(** **)** A default value to be assigned within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeTransformParameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** Enables usage of the :ref:`default_value`. diff --git a/classes/class_visualshadernodetransformvecmult.rst b/classes/class_visualshadernodetransformvecmult.rst index 2687ddc4b..15197c84f 100644 --- a/classes/class_visualshadernodetransformvecmult.rst +++ b/classes/class_visualshadernodetransformvecmult.rst @@ -14,59 +14,99 @@ VisualShaderNodeTransformVecMult Multiplies a :ref:`Transform3D` and a :ref:`Vector3` within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------------+---------------------------------------------------------------------------+-------+ -| :ref:`Operator` | :ref:`operator` | ``0`` | -+-----------------------------------------------------------------+---------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------------+---------------------------------------------------------------------------+-------+ + | :ref:`Operator` | :ref:`operator` | ``0`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeTransformVecMult_Operator: -.. _class_VisualShaderNodeTransformVecMult_constant_OP_AxB: - -.. _class_VisualShaderNodeTransformVecMult_constant_OP_BxA: - -.. _class_VisualShaderNodeTransformVecMult_constant_OP_3x3_AxB: - -.. _class_VisualShaderNodeTransformVecMult_constant_OP_3x3_BxA: - -.. _class_VisualShaderNodeTransformVecMult_constant_OP_MAX: +.. rst-class:: classref-enumeration enum **Operator**: -- **OP_AxB** = **0** --- Multiplies transform ``a`` by the vector ``b``. +.. _class_VisualShaderNodeTransformVecMult_constant_OP_AxB: -- **OP_BxA** = **1** --- Multiplies vector ``b`` by the transform ``a``. +.. rst-class:: classref-enumeration-constant -- **OP_3x3_AxB** = **2** --- Multiplies transform ``a`` by the vector ``b``, skipping the last row and column of the transform. +:ref:`Operator` **OP_AxB** = ``0`` -- **OP_3x3_BxA** = **3** --- Multiplies vector ``b`` by the transform ``a``, skipping the last row and column of the transform. +Multiplies transform ``a`` by the vector ``b``. -- **OP_MAX** = **4** --- Represents the size of the :ref:`Operator` enum. +.. _class_VisualShaderNodeTransformVecMult_constant_OP_BxA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_BxA** = ``1`` + +Multiplies vector ``b`` by the transform ``a``. + +.. _class_VisualShaderNodeTransformVecMult_constant_OP_3x3_AxB: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_3x3_AxB** = ``2`` + +Multiplies transform ``a`` by the vector ``b``, skipping the last row and column of the transform. + +.. _class_VisualShaderNodeTransformVecMult_constant_OP_3x3_BxA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_3x3_BxA** = ``3`` + +Multiplies vector ``b`` by the transform ``a``, skipping the last row and column of the transform. + +.. _class_VisualShaderNodeTransformVecMult_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MAX** = ``4`` + +Represents the size of the :ref:`Operator` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTransformVecMult_property_operator: -- :ref:`Operator` **operator** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_operator(value) | -+-----------+---------------------+ -| *Getter* | get_operator() | -+-----------+---------------------+ +:ref:`Operator` **operator** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operator** **(** :ref:`Operator` value **)** +- :ref:`Operator` **get_operator** **(** **)** The multiplication type to be performed. See :ref:`Operator` for options. diff --git a/classes/class_visualshadernodeuvfunc.rst b/classes/class_visualshadernodeuvfunc.rst index ed6713cc3..056173187 100644 --- a/classes/class_visualshadernodeuvfunc.rst +++ b/classes/class_visualshadernodeuvfunc.rst @@ -14,46 +14,76 @@ VisualShaderNodeUVFunc Contains functions to modify texture coordinates (``uv``) to be used within the visual shader graph. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+-----------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``0`` | -+-------------------------------------------------------+-----------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-----------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``0`` | + +-------------------------------------------------------+-----------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeUVFunc_Function: -.. _class_VisualShaderNodeUVFunc_constant_FUNC_PANNING: - -.. _class_VisualShaderNodeUVFunc_constant_FUNC_SCALING: - -.. _class_VisualShaderNodeUVFunc_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_PANNING** = **0** --- Translates ``uv`` by using ``scale`` and ``offset`` values using the following formula: ``uv = uv + offset * scale``. ``uv`` port is connected to ``UV`` built-in by default. +.. _class_VisualShaderNodeUVFunc_constant_FUNC_PANNING: -- **FUNC_SCALING** = **1** --- Scales ``uv`` by using ``scale`` and ``pivot`` values using the following formula: ``uv = (uv - pivot) * scale + pivot``. ``uv`` port is connected to ``UV`` built-in by default. +.. rst-class:: classref-enumeration-constant -- **FUNC_MAX** = **2** --- Represents the size of the :ref:`Function` enum. +:ref:`Function` **FUNC_PANNING** = ``0`` + +Translates ``uv`` by using ``scale`` and ``offset`` values using the following formula: ``uv = uv + offset * scale``. ``uv`` port is connected to ``UV`` built-in by default. + +.. _class_VisualShaderNodeUVFunc_constant_FUNC_SCALING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SCALING** = ``1`` + +Scales ``uv`` by using ``scale`` and ``pivot`` values using the following formula: ``uv = (uv - pivot) * scale + pivot``. ``uv`` port is connected to ``UV`` built-in by default. + +.. _class_VisualShaderNodeUVFunc_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``2`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeUVFunc_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** A function to be applied to the texture coordinates. See :ref:`Function` for options. diff --git a/classes/class_visualshadernodevarying.rst b/classes/class_visualshadernodevarying.rst index 579c9d213..b29e2ecba 100644 --- a/classes/class_visualshadernodevarying.rst +++ b/classes/class_visualshadernodevarying.rst @@ -18,47 +18,58 @@ VisualShaderNodeVarying There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+--------------------------------------------------------------------------+--------------+ -| :ref:`String` | :ref:`varying_name` | ``"[None]"`` | -+---------------------------------------------------+--------------------------------------------------------------------------+--------------+ -| :ref:`VaryingType` | :ref:`varying_type` | ``0`` | -+---------------------------------------------------+--------------------------------------------------------------------------+--------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------+--------------+ + | :ref:`String` | :ref:`varying_name` | ``"[None]"`` | + +---------------------------------------------------+--------------------------------------------------------------------------+--------------+ + | :ref:`VaryingType` | :ref:`varying_type` | ``0`` | + +---------------------------------------------------+--------------------------------------------------------------------------+--------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVarying_property_varying_name: -- :ref:`String` **varying_name** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``"[None]"`` | -+-----------+-------------------------+ -| *Setter* | set_varying_name(value) | -+-----------+-------------------------+ -| *Getter* | get_varying_name() | -+-----------+-------------------------+ +:ref:`String` **varying_name** = ``"[None]"`` + +.. rst-class:: classref-property-setget + +- void **set_varying_name** **(** :ref:`String` value **)** +- :ref:`String` **get_varying_name** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeVarying_property_varying_type: -- :ref:`VaryingType` **varying_type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_varying_type(value) | -+-----------+-------------------------+ -| *Getter* | get_varying_type() | -+-----------+-------------------------+ +:ref:`VaryingType` **varying_type** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_varying_type** **(** :ref:`VaryingType` value **)** +- :ref:`VaryingType` **get_varying_type** **(** **)** .. container:: contribute diff --git a/classes/class_visualshadernodevec2constant.rst b/classes/class_visualshadernodevec2constant.rst index b0ca098cc..599356fb3 100644 --- a/classes/class_visualshadernodevec2constant.rst +++ b/classes/class_visualshadernodevec2constant.rst @@ -14,32 +14,44 @@ VisualShaderNodeVec2Constant A :ref:`Vector2` constant to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A constant :ref:`Vector2`, which can be used as an input node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-----------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`constant` | ``Vector2(0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`constant` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVec2Constant_property_constant: -- :ref:`Vector2` **constant** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_constant(value) | -+-----------+---------------------+ -| *Getter* | get_constant() | -+-----------+---------------------+ +:ref:`Vector2` **constant** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_constant** **(** **)** A :ref:`Vector2` constant which represents the state of this node. diff --git a/classes/class_visualshadernodevec2parameter.rst b/classes/class_visualshadernodevec2parameter.rst index f4b10ed80..5f0290b06 100644 --- a/classes/class_visualshadernodevec2parameter.rst +++ b/classes/class_visualshadernodevec2parameter.rst @@ -14,50 +14,63 @@ VisualShaderNodeVec2Parameter A :ref:`Vector2` parameter to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform vec2`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`default_value` | ``Vector2(0, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------------------+-------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`default_value` | ``Vector2(0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVec2Parameter_property_default_value: -- :ref:`Vector2` **default_value** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_default_value(value) | -+-----------+--------------------------+ -| *Getter* | get_default_value() | -+-----------+--------------------------+ +:ref:`Vector2` **default_value** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_default_value** **(** **)** A default value to be assigned within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeVec2Parameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** Enables usage of the :ref:`default_value`. diff --git a/classes/class_visualshadernodevec3constant.rst b/classes/class_visualshadernodevec3constant.rst index e65b07071..166f2da2c 100644 --- a/classes/class_visualshadernodevec3constant.rst +++ b/classes/class_visualshadernodevec3constant.rst @@ -14,32 +14,44 @@ VisualShaderNodeVec3Constant A :ref:`Vector3` constant to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A constant :ref:`Vector3`, which can be used as an input node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+-----------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`constant` | ``Vector3(0, 0, 0)`` | -+-------------------------------+-----------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`constant` | ``Vector3(0, 0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVec3Constant_property_constant: -- :ref:`Vector3` **constant** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------+ -| *Setter* | set_constant(value) | -+-----------+----------------------+ -| *Getter* | get_constant() | -+-----------+----------------------+ +:ref:`Vector3` **constant** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_constant** **(** **)** A :ref:`Vector3` constant which represents the state of this node. diff --git a/classes/class_visualshadernodevec3parameter.rst b/classes/class_visualshadernodevec3parameter.rst index 3a8a910ac..ac964d42b 100644 --- a/classes/class_visualshadernodevec3parameter.rst +++ b/classes/class_visualshadernodevec3parameter.rst @@ -14,50 +14,63 @@ VisualShaderNodeVec3Parameter A :ref:`Vector3` parameter to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform vec3`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`default_value` | ``Vector3(0, 0, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------------------+----------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`default_value` | ``Vector3(0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVec3Parameter_property_default_value: -- :ref:`Vector3` **default_value** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_default_value(value) | -+-----------+--------------------------+ -| *Getter* | get_default_value() | -+-----------+--------------------------+ +:ref:`Vector3` **default_value** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_default_value** **(** **)** A default value to be assigned within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeVec3Parameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** Enables usage of the :ref:`default_value`. diff --git a/classes/class_visualshadernodevec4constant.rst b/classes/class_visualshadernodevec4constant.rst index 6d90da95b..4a393044f 100644 --- a/classes/class_visualshadernodevec4constant.rst +++ b/classes/class_visualshadernodevec4constant.rst @@ -14,32 +14,44 @@ VisualShaderNodeVec4Constant A 4D vector constant to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A constant 4D vector, which can be used as an input node. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------+-----------------------------------------------------------------------+----------------------------+ -| :ref:`Quaternion` | :ref:`constant` | ``Quaternion(0, 0, 0, 1)`` | -+-------------------------------------+-----------------------------------------------------------------------+----------------------------+ +.. table:: + :widths: auto + + +-------------------------------------+-----------------------------------------------------------------------+----------------------------+ + | :ref:`Quaternion` | :ref:`constant` | ``Quaternion(0, 0, 0, 1)`` | + +-------------------------------------+-----------------------------------------------------------------------+----------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVec4Constant_property_constant: -- :ref:`Quaternion` **constant** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Quaternion(0, 0, 0, 1)`` | -+-----------+----------------------------+ -| *Setter* | set_constant(value) | -+-----------+----------------------------+ -| *Getter* | get_constant() | -+-----------+----------------------------+ +:ref:`Quaternion` **constant** = ``Quaternion(0, 0, 0, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_constant** **(** :ref:`Quaternion` value **)** +- :ref:`Quaternion` **get_constant** **(** **)** A 4D vector (represented as a :ref:`Quaternion`) constant which represents the state of this node. diff --git a/classes/class_visualshadernodevec4parameter.rst b/classes/class_visualshadernodevec4parameter.rst index df855930d..35ed2f7e8 100644 --- a/classes/class_visualshadernodevec4parameter.rst +++ b/classes/class_visualshadernodevec4parameter.rst @@ -14,50 +14,63 @@ VisualShaderNodeVec4Parameter A 4D vector parameter to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- Translated to ``uniform vec4`` in the shader language. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`Vector4` | :ref:`default_value` | ``Vector4(0, 0, 0, 0)`` | -+-------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | -+-------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector4` | :ref:`default_value` | ``Vector4(0, 0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVec4Parameter_property_default_value: -- :ref:`Vector4` **default_value** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``Vector4(0, 0, 0, 0)`` | -+-----------+--------------------------+ -| *Setter* | set_default_value(value) | -+-----------+--------------------------+ -| *Getter* | get_default_value() | -+-----------+--------------------------+ +:ref:`Vector4` **default_value** = ``Vector4(0, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_default_value** **(** :ref:`Vector4` value **)** +- :ref:`Vector4` **get_default_value** **(** **)** A default value to be assigned within the shader. +.. rst-class:: classref-item-separator + ---- .. _class_VisualShaderNodeVec4Parameter_property_default_value_enabled: -- :ref:`bool` **default_value_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_default_value_enabled(value) | -+-----------+----------------------------------+ -| *Getter* | is_default_value_enabled() | -+-----------+----------------------------------+ +:ref:`bool` **default_value_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_default_value_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_default_value_enabled** **(** **)** Enables usage of the :ref:`default_value`. diff --git a/classes/class_visualshadernodevectorbase.rst b/classes/class_visualshadernodevectorbase.rst index 4b8af9fb7..0f9fe20fd 100644 --- a/classes/class_visualshadernodevectorbase.rst +++ b/classes/class_visualshadernodevectorbase.rst @@ -16,50 +16,84 @@ VisualShaderNodeVectorBase A base type for the nodes using different vector types within the visual shader graph. +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------+-------------------------------------------------------------------+-------+ -| :ref:`OpType` | :ref:`op_type` | ``1`` | -+-------------------------------------------------------+-------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-------------------------------------------------------+-------------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``1`` | + +-------------------------------------------------------+-------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeVectorBase_OpType: -.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_2D: - -.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_3D: - -.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_4D: - -.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_MAX: +.. rst-class:: classref-enumeration enum **OpType**: -- **OP_TYPE_VECTOR_2D** = **0** --- A 2D vector type. +.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_2D: -- **OP_TYPE_VECTOR_3D** = **1** --- A 3D vector type. +.. rst-class:: classref-enumeration-constant -- **OP_TYPE_VECTOR_4D** = **2** --- A 4D vector type. +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``0`` -- **OP_TYPE_MAX** = **3** --- Represents the size of the :ref:`OpType` enum. +A 2D vector type. + +.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``1`` + +A 3D vector type. + +.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``2`` + +A 4D vector type. + +.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``3`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVectorBase_property_op_type: -- :ref:`OpType` **op_type** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``1`` | -+-----------+--------------------+ -| *Setter* | set_op_type(value) | -+-----------+--------------------+ -| *Getter* | get_op_type() | -+-----------+--------------------+ +:ref:`OpType` **op_type** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_op_type** **(** :ref:`OpType` value **)** +- :ref:`OpType` **get_op_type** **(** **)** A base type. diff --git a/classes/class_visualshadernodevectorcompose.rst b/classes/class_visualshadernodevectorcompose.rst index cafa6826e..00f159abf 100644 --- a/classes/class_visualshadernodevectorcompose.rst +++ b/classes/class_visualshadernodevectorcompose.rst @@ -14,6 +14,8 @@ VisualShaderNodeVectorCompose Composes a :ref:`Vector2`, :ref:`Vector3` or 4D vector (represented as a :ref:`Quaternion`) from scalars within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodevectordecompose.rst b/classes/class_visualshadernodevectordecompose.rst index 03a2014ce..1d60ce893 100644 --- a/classes/class_visualshadernodevectordecompose.rst +++ b/classes/class_visualshadernodevectordecompose.rst @@ -14,6 +14,8 @@ VisualShaderNodeVectorDecompose Decomposes a :ref:`Vector2`, :ref:`Vector3` or 4D vector (represented as a :ref:`Quaternion`) into scalars within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodevectordistance.rst b/classes/class_visualshadernodevectordistance.rst index 8c8c3e4d6..92fd45294 100644 --- a/classes/class_visualshadernodevectordistance.rst +++ b/classes/class_visualshadernodevectordistance.rst @@ -14,6 +14,8 @@ VisualShaderNodeVectorDistance Returns the distance between two points. To be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodevectorfunc.rst b/classes/class_visualshadernodevectorfunc.rst index d5b36816c..52fd93610 100644 --- a/classes/class_visualshadernodevectorfunc.rst +++ b/classes/class_visualshadernodevectorfunc.rst @@ -14,175 +14,331 @@ VisualShaderNodeVectorFunc A vector function to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A visual shader node able to perform different functions using vectors. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------------+---------------------------------------------------------------------+-------+ -| :ref:`Function` | :ref:`function` | ``0`` | -+-----------------------------------------------------------+---------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+---------------------------------------------------------------------+-------+ + | :ref:`Function` | :ref:`function` | ``0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeVectorFunc_Function: -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_NORMALIZE: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SATURATE: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_NEGATE: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_RECIPROCAL: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ABS: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ACOS: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ACOSH: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ASIN: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ASINH: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ATAN: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ATANH: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_CEIL: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_COS: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_COSH: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_DEGREES: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_EXP: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_EXP2: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_FLOOR: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_FRACT: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_INVERSE_SQRT: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_LOG: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_LOG2: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_RADIANS: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ROUND: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ROUNDEVEN: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SIGN: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SIN: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SINH: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SQRT: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_TAN: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_TANH: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_TRUNC: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ONEMINUS: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_MAX: +.. rst-class:: classref-enumeration enum **Function**: -- **FUNC_NORMALIZE** = **0** --- Normalizes the vector so that it has a length of ``1`` but points in the same direction. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_NORMALIZE: -- **FUNC_SATURATE** = **1** --- Clamps the value between ``0.0`` and ``1.0``. +.. rst-class:: classref-enumeration-constant -- **FUNC_NEGATE** = **2** --- Returns the opposite value of the parameter. +:ref:`Function` **FUNC_NORMALIZE** = ``0`` -- **FUNC_RECIPROCAL** = **3** --- Returns ``1/vector``. +Normalizes the vector so that it has a length of ``1`` but points in the same direction. -- **FUNC_ABS** = **4** --- Returns the absolute value of the parameter. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SATURATE: -- **FUNC_ACOS** = **5** --- Returns the arc-cosine of the parameter. +.. rst-class:: classref-enumeration-constant -- **FUNC_ACOSH** = **6** --- Returns the inverse hyperbolic cosine of the parameter. +:ref:`Function` **FUNC_SATURATE** = ``1`` -- **FUNC_ASIN** = **7** --- Returns the arc-sine of the parameter. +Clamps the value between ``0.0`` and ``1.0``. -- **FUNC_ASINH** = **8** --- Returns the inverse hyperbolic sine of the parameter. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_NEGATE: -- **FUNC_ATAN** = **9** --- Returns the arc-tangent of the parameter. +.. rst-class:: classref-enumeration-constant -- **FUNC_ATANH** = **10** --- Returns the inverse hyperbolic tangent of the parameter. +:ref:`Function` **FUNC_NEGATE** = ``2`` -- **FUNC_CEIL** = **11** --- Finds the nearest integer that is greater than or equal to the parameter. +Returns the opposite value of the parameter. -- **FUNC_COS** = **12** --- Returns the cosine of the parameter. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_RECIPROCAL: -- **FUNC_COSH** = **13** --- Returns the hyperbolic cosine of the parameter. +.. rst-class:: classref-enumeration-constant -- **FUNC_DEGREES** = **14** --- Converts a quantity in radians to degrees. +:ref:`Function` **FUNC_RECIPROCAL** = ``3`` -- **FUNC_EXP** = **15** --- Base-e Exponential. +Returns ``1/vector``. -- **FUNC_EXP2** = **16** --- Base-2 Exponential. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ABS: -- **FUNC_FLOOR** = **17** --- Finds the nearest integer less than or equal to the parameter. +.. rst-class:: classref-enumeration-constant -- **FUNC_FRACT** = **18** --- Computes the fractional part of the argument. +:ref:`Function` **FUNC_ABS** = ``4`` -- **FUNC_INVERSE_SQRT** = **19** --- Returns the inverse of the square root of the parameter. +Returns the absolute value of the parameter. -- **FUNC_LOG** = **20** --- Natural logarithm. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ACOS: -- **FUNC_LOG2** = **21** --- Base-2 logarithm. +.. rst-class:: classref-enumeration-constant -- **FUNC_RADIANS** = **22** --- Converts a quantity in degrees to radians. +:ref:`Function` **FUNC_ACOS** = ``5`` -- **FUNC_ROUND** = **23** --- Finds the nearest integer to the parameter. +Returns the arc-cosine of the parameter. -- **FUNC_ROUNDEVEN** = **24** --- Finds the nearest even integer to the parameter. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ACOSH: -- **FUNC_SIGN** = **25** --- Extracts the sign of the parameter, i.e. returns ``-1`` if the parameter is negative, ``1`` if it's positive and ``0`` otherwise. +.. rst-class:: classref-enumeration-constant -- **FUNC_SIN** = **26** --- Returns the sine of the parameter. +:ref:`Function` **FUNC_ACOSH** = ``6`` -- **FUNC_SINH** = **27** --- Returns the hyperbolic sine of the parameter. +Returns the inverse hyperbolic cosine of the parameter. -- **FUNC_SQRT** = **28** --- Returns the square root of the parameter. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ASIN: -- **FUNC_TAN** = **29** --- Returns the tangent of the parameter. +.. rst-class:: classref-enumeration-constant -- **FUNC_TANH** = **30** --- Returns the hyperbolic tangent of the parameter. +:ref:`Function` **FUNC_ASIN** = ``7`` -- **FUNC_TRUNC** = **31** --- Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. +Returns the arc-sine of the parameter. -- **FUNC_ONEMINUS** = **32** --- Returns ``1.0 - vector``. +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ASINH: -- **FUNC_MAX** = **33** --- Represents the size of the :ref:`Function` enum. +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ASINH** = ``8`` + +Returns the inverse hyperbolic sine of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ATAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ATAN** = ``9`` + +Returns the arc-tangent of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ATANH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ATANH** = ``10`` + +Returns the inverse hyperbolic tangent of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_CEIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_CEIL** = ``11`` + +Finds the nearest integer that is greater than or equal to the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_COS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_COS** = ``12`` + +Returns the cosine of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_COSH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_COSH** = ``13`` + +Returns the hyperbolic cosine of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_DEGREES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_DEGREES** = ``14`` + +Converts a quantity in radians to degrees. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_EXP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_EXP** = ``15`` + +Base-e Exponential. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_EXP2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_EXP2** = ``16`` + +Base-2 Exponential. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_FLOOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_FLOOR** = ``17`` + +Finds the nearest integer less than or equal to the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_FRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_FRACT** = ``18`` + +Computes the fractional part of the argument. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_INVERSE_SQRT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_INVERSE_SQRT** = ``19`` + +Returns the inverse of the square root of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_LOG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LOG** = ``20`` + +Natural logarithm. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_LOG2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LOG2** = ``21`` + +Base-2 logarithm. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_RADIANS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_RADIANS** = ``22`` + +Converts a quantity in degrees to radians. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ROUND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ROUND** = ``23`` + +Finds the nearest integer to the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ROUNDEVEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ROUNDEVEN** = ``24`` + +Finds the nearest even integer to the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SIGN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SIGN** = ``25`` + +Extracts the sign of the parameter, i.e. returns ``-1`` if the parameter is negative, ``1`` if it's positive and ``0`` otherwise. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SIN** = ``26`` + +Returns the sine of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SINH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SINH** = ``27`` + +Returns the hyperbolic sine of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_SQRT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SQRT** = ``28`` + +Returns the square root of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_TAN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_TAN** = ``29`` + +Returns the tangent of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_TANH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_TANH** = ``30`` + +Returns the hyperbolic tangent of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_TRUNC: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_TRUNC** = ``31`` + +Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_ONEMINUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_ONEMINUS** = ``32`` + +Returns ``1.0 - vector``. + +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_MAX** = ``33`` + +Represents the size of the :ref:`Function` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVectorFunc_property_function: -- :ref:`Function` **function** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_function(value) | -+-----------+---------------------+ -| *Getter* | get_function() | -+-----------+---------------------+ +:ref:`Function` **function** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_function** **(** :ref:`Function` value **)** +- :ref:`Function` **get_function** **(** **)** The function to be performed. See :ref:`Function` for options. diff --git a/classes/class_visualshadernodevectorlen.rst b/classes/class_visualshadernodevectorlen.rst index 881b862ee..5a90898f1 100644 --- a/classes/class_visualshadernodevectorlen.rst +++ b/classes/class_visualshadernodevectorlen.rst @@ -14,6 +14,8 @@ VisualShaderNodeVectorLen Returns the length of a :ref:`Vector3` within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_visualshadernodevectorop.rst b/classes/class_visualshadernodevectorop.rst index 2c8e762b4..230f64ee5 100644 --- a/classes/class_visualshadernodevectorop.rst +++ b/classes/class_visualshadernodevectorop.rst @@ -14,91 +14,163 @@ VisualShaderNodeVectorOp A vector operator to be used within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- A visual shader node for use of vector operators. Operates on vector ``a`` and vector ``b``. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------------+-------------------------------------------------------------------+-------+ -| :ref:`Operator` | :ref:`operator` | ``0`` | -+---------------------------------------------------------+-------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+-------------------------------------------------------------------+-------+ + | :ref:`Operator` | :ref:`operator` | ``0`` | + +---------------------------------------------------------+-------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeVectorOp_Operator: -.. _class_VisualShaderNodeVectorOp_constant_OP_ADD: - -.. _class_VisualShaderNodeVectorOp_constant_OP_SUB: - -.. _class_VisualShaderNodeVectorOp_constant_OP_MUL: - -.. _class_VisualShaderNodeVectorOp_constant_OP_DIV: - -.. _class_VisualShaderNodeVectorOp_constant_OP_MOD: - -.. _class_VisualShaderNodeVectorOp_constant_OP_POW: - -.. _class_VisualShaderNodeVectorOp_constant_OP_MAX: - -.. _class_VisualShaderNodeVectorOp_constant_OP_MIN: - -.. _class_VisualShaderNodeVectorOp_constant_OP_CROSS: - -.. _class_VisualShaderNodeVectorOp_constant_OP_ATAN2: - -.. _class_VisualShaderNodeVectorOp_constant_OP_REFLECT: - -.. _class_VisualShaderNodeVectorOp_constant_OP_STEP: - -.. _class_VisualShaderNodeVectorOp_constant_OP_ENUM_SIZE: +.. rst-class:: classref-enumeration enum **Operator**: -- **OP_ADD** = **0** --- Adds two vectors. +.. _class_VisualShaderNodeVectorOp_constant_OP_ADD: -- **OP_SUB** = **1** --- Subtracts a vector from a vector. +.. rst-class:: classref-enumeration-constant -- **OP_MUL** = **2** --- Multiplies two vectors. +:ref:`Operator` **OP_ADD** = ``0`` -- **OP_DIV** = **3** --- Divides vector by vector. +Adds two vectors. -- **OP_MOD** = **4** --- Returns the remainder of the two vectors. +.. _class_VisualShaderNodeVectorOp_constant_OP_SUB: -- **OP_POW** = **5** --- Returns the value of the first parameter raised to the power of the second, for each component of the vectors. +.. rst-class:: classref-enumeration-constant -- **OP_MAX** = **6** --- Returns the greater of two values, for each component of the vectors. +:ref:`Operator` **OP_SUB** = ``1`` -- **OP_MIN** = **7** --- Returns the lesser of two values, for each component of the vectors. +Subtracts a vector from a vector. -- **OP_CROSS** = **8** --- Calculates the cross product of two vectors. +.. _class_VisualShaderNodeVectorOp_constant_OP_MUL: -- **OP_ATAN2** = **9** --- Returns the arc-tangent of the parameters. +.. rst-class:: classref-enumeration-constant -- **OP_REFLECT** = **10** --- Returns the vector that points in the direction of reflection. ``a`` is incident vector and ``b`` is the normal vector. +:ref:`Operator` **OP_MUL** = ``2`` -- **OP_STEP** = **11** --- Vector step operator. Returns ``0.0`` if ``a`` is smaller than ``b`` and ``1.0`` otherwise. +Multiplies two vectors. -- **OP_ENUM_SIZE** = **12** --- Represents the size of the :ref:`Operator` enum. +.. _class_VisualShaderNodeVectorOp_constant_OP_DIV: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_DIV** = ``3`` + +Divides vector by vector. + +.. _class_VisualShaderNodeVectorOp_constant_OP_MOD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MOD** = ``4`` + +Returns the remainder of the two vectors. + +.. _class_VisualShaderNodeVectorOp_constant_OP_POW: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_POW** = ``5`` + +Returns the value of the first parameter raised to the power of the second, for each component of the vectors. + +.. _class_VisualShaderNodeVectorOp_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MAX** = ``6`` + +Returns the greater of two values, for each component of the vectors. + +.. _class_VisualShaderNodeVectorOp_constant_OP_MIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_MIN** = ``7`` + +Returns the lesser of two values, for each component of the vectors. + +.. _class_VisualShaderNodeVectorOp_constant_OP_CROSS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_CROSS** = ``8`` + +Calculates the cross product of two vectors. + +.. _class_VisualShaderNodeVectorOp_constant_OP_ATAN2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_ATAN2** = ``9`` + +Returns the arc-tangent of the parameters. + +.. _class_VisualShaderNodeVectorOp_constant_OP_REFLECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_REFLECT** = ``10`` + +Returns the vector that points in the direction of reflection. ``a`` is incident vector and ``b`` is the normal vector. + +.. _class_VisualShaderNodeVectorOp_constant_OP_STEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_STEP** = ``11`` + +Vector step operator. Returns ``0.0`` if ``a`` is smaller than ``b`` and ``1.0`` otherwise. + +.. _class_VisualShaderNodeVectorOp_constant_OP_ENUM_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operator` **OP_ENUM_SIZE** = ``12`` + +Represents the size of the :ref:`Operator` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeVectorOp_property_operator: -- :ref:`Operator` **operator** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0`` | -+-----------+---------------------+ -| *Setter* | set_operator(value) | -+-----------+---------------------+ -| *Getter* | get_operator() | -+-----------+---------------------+ +:ref:`Operator` **operator** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_operator** **(** :ref:`Operator` value **)** +- :ref:`Operator` **get_operator** **(** **)** The operator to be used. See :ref:`Operator` for options. diff --git a/classes/class_visualshadernodevectorrefract.rst b/classes/class_visualshadernodevectorrefract.rst index bf7884aa5..8a8990158 100644 --- a/classes/class_visualshadernodevectorrefract.rst +++ b/classes/class_visualshadernodevectorrefract.rst @@ -14,6 +14,8 @@ VisualShaderNodeVectorRefract Returns the vector that points in the direction of refraction. For use within the visual shader graph. +.. rst-class:: classref-introduction-group + Description ----------- diff --git a/classes/class_voxelgi.rst b/classes/class_voxelgi.rst index 899d420ef..994a8fb9e 100644 --- a/classes/class_voxelgi.rst +++ b/classes/class_voxelgi.rst @@ -14,16 +14,20 @@ VoxelGI Real-time global illumination (GI) probe. +.. rst-class:: classref-introduction-group + Description ----------- -``VoxelGI``\ s are used to provide high-quality real-time indirect light and reflections to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. ``VoxelGI``\ s need to be baked before having a visible effect. However, once baked, dynamic objects will receive light from them. Furthermore, lights can be fully dynamic or baked. +**VoxelGI**\ s are used to provide high-quality real-time indirect light and reflections to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. **VoxelGI**\ s need to be baked before having a visible effect. However, once baked, dynamic objects will receive light from them. Furthermore, lights can be fully dynamic or baked. -\ **Procedural generation:** ``VoxelGI`` can be baked in an exported project, which makes it suitable for procedurally generated or user-built levels as long as all the geometry is generated in advance. For games where geometry is generated at any time during gameplay, SDFGI is more suitable (see :ref:`Environment.sdfgi_enabled`). +\ **Procedural generation:** **VoxelGI** can be baked in an exported project, which makes it suitable for procedurally generated or user-built levels as long as all the geometry is generated in advance. For games where geometry is generated at any time during gameplay, SDFGI is more suitable (see :ref:`Environment.sdfgi_enabled`). -\ **Performance:** ``VoxelGI`` is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider :ref:`LightmapGI` instead). To improve performance, adjust :ref:`ProjectSettings.rendering/global_illumination/voxel_gi/quality` and enable :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution` in the Project Settings. To provide a fallback for low-end hardware, consider adding an option to disable ``VoxelGI`` in your project's options menus. A ``VoxelGI`` node can be disabled by hiding it. +\ **Performance:** **VoxelGI** is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider :ref:`LightmapGI` instead). To improve performance, adjust :ref:`ProjectSettings.rendering/global_illumination/voxel_gi/quality` and enable :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution` in the Project Settings. To provide a fallback for low-end hardware, consider adding an option to disable **VoxelGI** in your project's options menus. A **VoxelGI** node can be disabled by hiding it. -\ **Note:** Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. To further prevent light leaks, you can also strategically place temporary :ref:`MeshInstance3D` nodes with their :ref:`GeometryInstance3D.gi_mode` set to :ref:`GeometryInstance3D.GI_MODE_STATIC`. These temporary nodes can then be hidden after baking the ``VoxelGI`` node. +\ **Note:** Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. To further prevent light leaks, you can also strategically place temporary :ref:`MeshInstance3D` nodes with their :ref:`GeometryInstance3D.gi_mode` set to :ref:`GeometryInstance3D.GI_MODE_STATIC`. These temporary nodes can then be hidden after baking the **VoxelGI** node. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -32,136 +36,198 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ -| :ref:`CameraAttributes` | :ref:`camera_attributes` | | -+-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ -| :ref:`VoxelGIData` | :ref:`data` | | -+-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(10, 10, 10)`` | -+-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ -| :ref:`Subdiv` | :ref:`subdiv` | ``1`` | -+-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ + | :ref:`CameraAttributes` | :ref:`camera_attributes` | | + +-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ + | :ref:`VoxelGIData` | :ref:`data` | | + +-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`extents` | ``Vector3(10, 10, 10)`` | + +-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ + | :ref:`Subdiv` | :ref:`subdiv` | ``1`` | + +-------------------------------------------------+--------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`bake` **(** :ref:`Node` from_node=null, :ref:`bool` create_visual_debug=false **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`debug_bake` **(** **)** | -+------+----------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bake` **(** :ref:`Node` from_node=null, :ref:`bool` create_visual_debug=false **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`debug_bake` **(** **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VoxelGI_Subdiv: -.. _class_VoxelGI_constant_SUBDIV_64: - -.. _class_VoxelGI_constant_SUBDIV_128: - -.. _class_VoxelGI_constant_SUBDIV_256: - -.. _class_VoxelGI_constant_SUBDIV_512: - -.. _class_VoxelGI_constant_SUBDIV_MAX: +.. rst-class:: classref-enumeration enum **Subdiv**: -- **SUBDIV_64** = **0** --- Use 64 subdivisions. This is the lowest quality setting, but the fastest. Use it if you can, but especially use it on lower-end hardware. +.. _class_VoxelGI_constant_SUBDIV_64: -- **SUBDIV_128** = **1** --- Use 128 subdivisions. This is the default quality setting. +.. rst-class:: classref-enumeration-constant -- **SUBDIV_256** = **2** --- Use 256 subdivisions. +:ref:`Subdiv` **SUBDIV_64** = ``0`` -- **SUBDIV_512** = **3** --- Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware, this could cause the GPU to stall. +Use 64 subdivisions. This is the lowest quality setting, but the fastest. Use it if you can, but especially use it on lower-end hardware. -- **SUBDIV_MAX** = **4** --- Represents the size of the :ref:`Subdiv` enum. +.. _class_VoxelGI_constant_SUBDIV_128: + +.. rst-class:: classref-enumeration-constant + +:ref:`Subdiv` **SUBDIV_128** = ``1`` + +Use 128 subdivisions. This is the default quality setting. + +.. _class_VoxelGI_constant_SUBDIV_256: + +.. rst-class:: classref-enumeration-constant + +:ref:`Subdiv` **SUBDIV_256** = ``2`` + +Use 256 subdivisions. + +.. _class_VoxelGI_constant_SUBDIV_512: + +.. rst-class:: classref-enumeration-constant + +:ref:`Subdiv` **SUBDIV_512** = ``3`` + +Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware, this could cause the GPU to stall. + +.. _class_VoxelGI_constant_SUBDIV_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Subdiv` **SUBDIV_MAX** = ``4`` + +Represents the size of the :ref:`Subdiv` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VoxelGI_property_camera_attributes: -- :ref:`CameraAttributes` **camera_attributes** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_camera_attributes(value) | -+----------+------------------------------+ -| *Getter* | get_camera_attributes() | -+----------+------------------------------+ +:ref:`CameraAttributes` **camera_attributes** -The :ref:`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. +.. rst-class:: classref-property-setget + +- void **set_camera_attributes** **(** :ref:`CameraAttributes` value **)** +- :ref:`CameraAttributes` **get_camera_attributes** **(** **)** + +The :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_VoxelGI_property_data: -- :ref:`VoxelGIData` **data** +.. rst-class:: classref-property -+----------+-----------------------+ -| *Setter* | set_probe_data(value) | -+----------+-----------------------+ -| *Getter* | get_probe_data() | -+----------+-----------------------+ +:ref:`VoxelGIData` **data** -The :ref:`VoxelGIData` resource that holds the data for this ``VoxelGI``. +.. rst-class:: classref-property-setget + +- void **set_probe_data** **(** :ref:`VoxelGIData` value **)** +- :ref:`VoxelGIData` **get_probe_data** **(** **)** + +The :ref:`VoxelGIData` resource that holds the data for this **VoxelGI**. + +.. rst-class:: classref-item-separator ---- .. _class_VoxelGI_property_extents: -- :ref:`Vector3` **extents** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``Vector3(10, 10, 10)`` | -+-----------+-------------------------+ -| *Setter* | set_extents(value) | -+-----------+-------------------------+ -| *Getter* | get_extents() | -+-----------+-------------------------+ +:ref:`Vector3` **extents** = ``Vector3(10, 10, 10)`` -The size of the area covered by the ``VoxelGI``. If you make the extents larger without increasing the subdivisions with :ref:`subdiv`, the size of each cell will increase and result in lower detailed lighting. +.. rst-class:: classref-property-setget + +- void **set_extents** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_extents** **(** **)** + +The size of the area covered by the **VoxelGI**. If you make the extents larger without increasing the subdivisions with :ref:`subdiv`, the size of each cell will increase and result in lower detailed lighting. \ **Note:** Extents are clamped to 1.0 unit or more on each axis. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGI_property_subdiv: -- :ref:`Subdiv` **subdiv** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1`` | -+-----------+-------------------+ -| *Setter* | set_subdiv(value) | -+-----------+-------------------+ -| *Getter* | get_subdiv() | -+-----------+-------------------+ +:ref:`Subdiv` **subdiv** = ``1`` -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. +.. rst-class:: classref-property-setget + +- void **set_subdiv** **(** :ref:`Subdiv` value **)** +- :ref:`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. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_VoxelGI_method_bake: -- void **bake** **(** :ref:`Node` from_node=null, :ref:`bool` create_visual_debug=false **)** +.. rst-class:: classref-method -Bakes the effect from all :ref:`GeometryInstance3D`\ s marked with :ref:`GeometryInstance3D.GI_MODE_STATIC` and :ref:`Light3D`\ s marked with either :ref:`Light3D.BAKE_STATIC` or :ref:`Light3D.BAKE_DYNAMIC`. If ``create_visual_debug`` is ``true``, after baking the light, this will generate a :ref:`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. +void **bake** **(** :ref:`Node` from_node=null, :ref:`bool` create_visual_debug=false **)** -\ **Note:** :ref:`bake` works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a ``VoxelGI`` node generally takes from 5 to 20 seconds in most scenes. Reducing :ref:`subdiv` can speed up baking. +Bakes the effect from all :ref:`GeometryInstance3D`\ s marked with :ref:`GeometryInstance3D.GI_MODE_STATIC` and :ref:`Light3D`\ s marked with either :ref:`Light3D.BAKE_STATIC` or :ref:`Light3D.BAKE_DYNAMIC`. If ``create_visual_debug`` is ``true``, after baking the light, this will generate a :ref:`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. -\ **Note:** :ref:`GeometryInstance3D`\ s and :ref:`Light3D`\ s must be fully ready before :ref:`bake` is called. If you are procedurally creating those and some meshes or lights are missing from your baked ``VoxelGI``, use ``call_deferred("bake")`` instead of calling :ref:`bake` directly. +\ **Note:** :ref:`bake` works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a **VoxelGI** node generally takes from 5 to 20 seconds in most scenes. Reducing :ref:`subdiv` can speed up baking. + +\ **Note:** :ref:`GeometryInstance3D`\ s and :ref:`Light3D`\ s must be fully ready before :ref:`bake` is called. If you are procedurally creating those and some meshes or lights are missing from your baked **VoxelGI**, use ``call_deferred("bake")`` instead of calling :ref:`bake` directly. + +.. rst-class:: classref-item-separator ---- .. _class_VoxelGI_method_debug_bake: -- void **debug_bake** **(** **)** +.. rst-class:: classref-method + +void **debug_bake** **(** **)** Calls :ref:`bake` with ``create_visual_debug`` enabled. diff --git a/classes/class_voxelgidata.rst b/classes/class_voxelgidata.rst index 8112f784f..b51164386 100644 --- a/classes/class_voxelgidata.rst +++ b/classes/class_voxelgidata.rst @@ -14,235 +14,292 @@ VoxelGIData Contains baked voxel global illumination data for use in a :ref:`VoxelGI` node. +.. rst-class:: classref-introduction-group + Description ----------- -``VoxelGIData`` contains baked voxel global illumination for use in a :ref:`VoxelGI` node. ``VoxelGIData`` also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the :ref:`VoxelGI` node again. +**VoxelGIData** contains baked voxel global illumination for use in a :ref:`VoxelGI` node. **VoxelGIData** also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the :ref:`VoxelGI` node again. -\ **Note:** To prevent text-based scene files (``.tscn``) from growing too much and becoming slow to load and save, always save ``VoxelGIData`` to an external binary resource file (``.res``) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the ``VoxelGIData`` resource, choosing **Edit**, clicking the floppy disk icon at the top of the Inspector then choosing **Save As...**. +\ **Note:** To prevent text-based scene files (``.tscn``) from growing too much and becoming slow to load and save, always save **VoxelGIData** to an external binary resource file (``.res``) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the **VoxelGIData** resource, choosing **Edit**, clicking the floppy disk icon at the top of the Inspector then choosing **Save As...**. + +.. rst-class:: classref-introduction-group Tutorials --------- - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`bias` | ``1.5`` | -+---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`dynamic_range` | ``2.0`` | -+---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`energy` | ``1.0`` | -+---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`interior` | ``false`` | -+---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`normal_bias` | ``0.0`` | -+---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`propagation` | ``0.5`` | -+---------------------------+--------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`use_two_bounces` | ``true`` | -+---------------------------+--------------------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`bias` | ``1.5`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`dynamic_range` | ``2.0`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`energy` | ``1.0`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`interior` | ``false`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`normal_bias` | ``0.0`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`propagation` | ``0.5`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_two_bounces` | ``true`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`allocate` **(** :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`get_bounds` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`get_data_cells` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_level_counts` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`get_octree_cells` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_octree_size` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_to_cell_xform` **(** **)** |const| | -+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`allocate` **(** :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_bounds` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_data_cells` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_level_counts` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_octree_cells` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_octree_size` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_to_cell_xform` **(** **)** |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VoxelGIData_property_bias: -- :ref:`float` **bias** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``1.5`` | -+-----------+-----------------+ -| *Setter* | set_bias(value) | -+-----------+-----------------+ -| *Getter* | get_bias() | -+-----------+-----------------+ +:ref:`float` **bias** = ``1.5`` + +.. rst-class:: classref-property-setget + +- void **set_bias** **(** :ref:`float` value **)** +- :ref:`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` to ``0.0`` and :ref:`normal_bias` to a value between ``1.0`` and ``2.0``. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_property_dynamic_range: -- :ref:`float` **dynamic_range** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``2.0`` | -+-----------+--------------------------+ -| *Setter* | set_dynamic_range(value) | -+-----------+--------------------------+ -| *Getter* | get_dynamic_range() | -+-----------+--------------------------+ +:ref:`float` **dynamic_range** = ``2.0`` + +.. rst-class:: classref-property-setget + +- void **set_dynamic_range** **(** :ref:`float` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_property_energy: -- :ref:`float` **energy** +.. rst-class:: classref-property -+-----------+-------------------+ -| *Default* | ``1.0`` | -+-----------+-------------------+ -| *Setter* | set_energy(value) | -+-----------+-------------------+ -| *Getter* | get_energy() | -+-----------+-------------------+ +:ref:`float` **energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_energy** **(** :ref:`float` value **)** +- :ref:`float` **get_energy** **(** **)** The energy of the indirect lighting and reflections produced by the :ref:`VoxelGI` node. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing :ref:`propagation` while increasing :ref:`energy` at the same time. See also :ref:`use_two_bounces` which influences the indirect lighting's effective brightness. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_property_interior: -- :ref:`bool` **interior** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_interior(value) | -+-----------+---------------------+ -| *Getter* | is_interior() | -+-----------+---------------------+ +:ref:`bool` **interior** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_interior** **(** :ref:`bool` value **)** +- :ref:`bool` **is_interior** **(** **)** If ``true``, :ref:`Environment` lighting is ignored by the :ref:`VoxelGI` node. If ``false``, :ref:`Environment` lighting is taken into account by the :ref:`VoxelGI` node. :ref:`Environment` lighting updates in real-time, which means it can be changed without having to bake the :ref:`VoxelGI` node again. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_property_normal_bias: -- :ref:`float` **normal_bias** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------+ -| *Setter* | set_normal_bias(value) | -+-----------+------------------------+ -| *Getter* | get_normal_bias() | -+-----------+------------------------+ +:ref:`float` **normal_bias** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_normal_bias** **(** :ref:`float` value **)** +- :ref:`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`. To prioritize hiding self-reflections over lighting quality, set :ref:`bias` to ``0.0`` and :ref:`normal_bias` to a value between ``1.0`` and ``2.0``. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_property_propagation: -- :ref:`float` **propagation** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``0.5`` | -+-----------+------------------------+ -| *Setter* | set_propagation(value) | -+-----------+------------------------+ -| *Getter* | get_propagation() | -+-----------+------------------------+ +:ref:`float` **propagation** = ``0.5`` + +.. rst-class:: classref-property-setget + +- void **set_propagation** **(** :ref:`float` value **)** +- :ref:`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` while increasing :ref:`energy` at the same time. See also :ref:`use_two_bounces` which influences the indirect lighting's effective brightness. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_property_use_two_bounces: -- :ref:`bool` **use_two_bounces** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------+ -| *Setter* | set_use_two_bounces(value) | -+-----------+----------------------------+ -| *Getter* | is_using_two_bounces() | -+-----------+----------------------------+ +:ref:`bool` **use_two_bounces** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_two_bounces** **(** :ref:`bool` value **)** +- :ref:`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`, adjust :ref:`propagation` and :ref:`energy`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_VoxelGIData_method_allocate: -- void **allocate** **(** :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** +.. rst-class:: classref-method + +void **allocate** **(** :ref:`Transform3D` to_cell_xform, :ref:`AABB` aabb, :ref:`Vector3` octree_size, :ref:`PackedByteArray` octree_cells, :ref:`PackedByteArray` data_cells, :ref:`PackedByteArray` distance_field, :ref:`PackedInt32Array` level_counts **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_method_get_bounds: -- :ref:`AABB` **get_bounds** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`AABB` **get_bounds** **(** **)** |const| Returns the bounds of the baked voxel data as an :ref:`AABB`, which should match :ref:`VoxelGI.extents` after being baked (which only contains the size as a :ref:`Vector3`). \ **Note:** If the extents were modified without baking the VoxelGI data, then the value of :ref:`get_bounds` and :ref:`VoxelGI.extents` will not match. +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_method_get_data_cells: -- :ref:`PackedByteArray` **get_data_cells** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_data_cells** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_method_get_level_counts: -- :ref:`PackedInt32Array` **get_level_counts** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_level_counts** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_method_get_octree_cells: -- :ref:`PackedByteArray` **get_octree_cells** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_octree_cells** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_method_get_octree_size: -- :ref:`Vector3` **get_octree_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_octree_size** **(** **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_VoxelGIData_method_get_to_cell_xform: -- :ref:`Transform3D` **get_to_cell_xform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_to_cell_xform** **(** **)** |const| .. container:: contribute diff --git a/classes/class_vscrollbar.rst b/classes/class_vscrollbar.rst index 6e9494346..f2b53989e 100644 --- a/classes/class_vscrollbar.rst +++ b/classes/class_vscrollbar.rst @@ -14,133 +14,193 @@ VScrollBar Vertical scroll bar. +.. rst-class:: classref-introduction-group + Description ----------- Vertical version of :ref:`ScrollBar`, which goes from top (min) to bottom (max). +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+-----------------------+--------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_horizontal | ``0`` (overrides :ref:`Control`) | -+-----------------------+-----------------------+--------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | -+-----------------------+-----------------------+--------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------+--------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_horizontal | ``0`` (overrides :ref:`Control`) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement_highlight` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`decrement_pressed` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`increment` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`increment_highlight` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`increment_pressed` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`grabber` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`grabber_highlight` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`grabber_pressed` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`scroll` | -+-----------------------------------+-----------------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`scroll_focus` | -+-----------------------------------+-----------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_highlight` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_pressed` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_highlight` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_pressed` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber_highlight` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber_pressed` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`scroll` | + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`scroll_focus` | + +-----------------------------------+-----------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_VScrollBar_theme_icon_decrement: -- :ref:`Texture2D` **decrement** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement** Icon used as a button to scroll the :ref:`ScrollBar` up. Supports custom step using the :ref:`ScrollBar.custom_step` property. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_icon_decrement_highlight: -- :ref:`Texture2D` **decrement_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement_highlight** Displayed when the mouse cursor hovers over the decrement button. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_icon_decrement_pressed: -- :ref:`Texture2D` **decrement_pressed** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement_pressed** Displayed when the decrement button is being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_icon_increment: -- :ref:`Texture2D` **increment** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment** Icon used as a button to scroll the :ref:`ScrollBar` down. Supports custom step using the :ref:`ScrollBar.custom_step` property. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_icon_increment_highlight: -- :ref:`Texture2D` **increment_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment_highlight** Displayed when the mouse cursor hovers over the increment button. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_icon_increment_pressed: -- :ref:`Texture2D` **increment_pressed** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment_pressed** Displayed when the increment button is being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_style_grabber: -- :ref:`StyleBox` **grabber** +.. rst-class:: classref-themeproperty + +:ref:`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: -- :ref:`StyleBox` **grabber_highlight** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_highlight** Used when the mouse hovers over the grabber. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_style_grabber_pressed: -- :ref:`StyleBox` **grabber_pressed** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_pressed** Used when the grabber is being dragged. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_style_scroll: -- :ref:`StyleBox` **scroll** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **scroll** Used as background of this :ref:`ScrollBar`. +.. rst-class:: classref-item-separator + ---- .. _class_VScrollBar_theme_style_scroll_focus: -- :ref:`StyleBox` **scroll_focus** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **scroll_focus** Used as background when the :ref:`ScrollBar` has the GUI focus. diff --git a/classes/class_vseparator.rst b/classes/class_vseparator.rst index 8b4fbac15..692f6f663 100644 --- a/classes/class_vseparator.rst +++ b/classes/class_vseparator.rst @@ -14,38 +14,53 @@ VSeparator Vertical version of :ref:`Separator`. +.. rst-class:: classref-introduction-group + Description ----------- Vertical version of :ref:`Separator`. Even though it looks vertical, it is used to separate objects horizontally. +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+---------------------------------+---------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`separation` | ``4`` | -+---------------------------------+---------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`separator` | | -+---------------------------------+---------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`separation` | ``4`` | + +---------------------------------+---------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`separator` | | + +---------------------------------+---------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_VSeparator_theme_constant_separation: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`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: -- :ref:`StyleBox` **separator** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **separator** The style for the separator line. Works best with :ref:`StyleBoxLine` (remember to enable :ref:`StyleBoxLine.vertical`). diff --git a/classes/class_vslider.rst b/classes/class_vslider.rst index 563f63655..f89b9922b 100644 --- a/classes/class_vslider.rst +++ b/classes/class_vslider.rst @@ -14,6 +14,8 @@ VSlider Vertical slider. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,102 +23,144 @@ Vertical slider. See :ref:`Slider`. This one goes from bottom (min \ **Note:** The :ref:`Range.changed` and :ref:`Range.value_changed` signals are part of the :ref:`Range` class which this class inherits from. +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------+-----------------------+--------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_horizontal | ``0`` (overrides :ref:`Control`) | -+-----------------------+-----------------------+--------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | -+-----------------------+-----------------------+--------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------+-----------------------+--------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_horizontal | ``0`` (overrides :ref:`Control`) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------+ + | :ref:`int` | size_flags_vertical | ``1`` (overrides :ref:`Control`) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`grabber_offset` | ``0`` | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`grabber` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`grabber_disabled` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`grabber_highlight` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`Texture2D` | :ref:`tick` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`grabber_area` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`grabber_area_highlight` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ -| :ref:`StyleBox` | :ref:`slider` | | -+-----------------------------------+---------------------------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`grabber_offset` | ``0`` | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber_disabled` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber_highlight` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`tick` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`grabber_area` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`grabber_area_highlight` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`slider` | | + +-----------------------------------+---------------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_VSlider_theme_constant_grabber_offset: -- :ref:`int` **grabber_offset** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **grabber_offset** = ``0`` Horizontal offset of the grabber. +.. rst-class:: classref-item-separator + ---- .. _class_VSlider_theme_icon_grabber: -- :ref:`Texture2D` **grabber** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber** The texture for the grabber (the draggable element). +.. rst-class:: classref-item-separator + ---- .. _class_VSlider_theme_icon_grabber_disabled: -- :ref:`Texture2D` **grabber_disabled** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber_disabled** The texture for the grabber when it's disabled. +.. rst-class:: classref-item-separator + ---- .. _class_VSlider_theme_icon_grabber_highlight: -- :ref:`Texture2D` **grabber_highlight** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber_highlight** The texture for the grabber when it's focused. +.. rst-class:: classref-item-separator + ---- .. _class_VSlider_theme_icon_tick: -- :ref:`Texture2D` **tick** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **tick** The texture for the ticks, visible when :ref:`Slider.tick_count` is greater than 0. +.. rst-class:: classref-item-separator + ---- .. _class_VSlider_theme_style_grabber_area: -- :ref:`StyleBox` **grabber_area** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_area** The background of the area below the grabber. +.. rst-class:: classref-item-separator + ---- .. _class_VSlider_theme_style_grabber_area_highlight: -- :ref:`StyleBox` **grabber_area_highlight** +.. rst-class:: classref-themeproperty -The background of the area below the grabber, to the left of the grabber. +:ref:`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: -- :ref:`StyleBox` **slider** +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **slider** The background for the whole slider. Determines the width of the ``grabber_area``. diff --git a/classes/class_vsplitcontainer.rst b/classes/class_vsplitcontainer.rst index a9e05591a..489ec3927 100644 --- a/classes/class_vsplitcontainer.rst +++ b/classes/class_vsplitcontainer.rst @@ -14,71 +14,88 @@ VSplitContainer Vertical split container. +.. rst-class:: classref-introduction-group + Description ----------- Vertical split container. See :ref:`SplitContainer`. This goes from top to bottom. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` +.. rst-class:: classref-reftable-group + Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`autohide` | ``1`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`separation` | ``12`` | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ -| :ref:`Texture2D` | :ref:`grabber` | | -+-----------------------------------+--------------------------------------------------------------------------------------------+--------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`autohide` | ``1`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`separation` | ``12`` | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + | :ref:`Texture2D` | :ref:`grabber` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_VSplitContainer_theme_constant_autohide: -- :ref:`int` **autohide** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ +:ref:`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: -- :ref:`int` **minimum_grab_thickness** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``6`` | -+-----------+-------+ +:ref:`int` **minimum_grab_thickness** = ``6`` The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation` or :ref:`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: -- :ref:`int` **separation** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``12`` | -+-----------+--------+ +:ref:`int` **separation** = ``12`` The space between sides of the container. +.. rst-class:: classref-item-separator + ---- .. _class_VSplitContainer_theme_icon_grabber: -- :ref:`Texture2D` **grabber** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber** The icon used for the grabber drawn in the middle area. diff --git a/classes/class_weakref.rst b/classes/class_weakref.rst index c5bb96962..517a77b7d 100644 --- a/classes/class_weakref.rst +++ b/classes/class_weakref.rst @@ -14,24 +14,39 @@ WeakRef Holds an :ref:`Object`, but does not contribute to the reference count if the object is a reference. +.. rst-class:: classref-introduction-group + Description ----------- A weakref can hold a :ref:`RefCounted`, without contributing to the reference counter. A weakref can be created from an :ref:`Object` using :ref:`@GlobalScope.weakref`. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------+------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_ref` **(** **)** |const| | -+-------------------------------+------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_ref` **(** **)** |const| | + +-------------------------------+------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_WeakRef_method_get_ref: -- :ref:`Variant` **get_ref** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_ref** **(** **)** |const| Returns the :ref:`Object` this weakref is referring to. Returns ``null`` if that object no longer exists. diff --git a/classes/class_webrtcdatachannel.rst b/classes/class_webrtcdatachannel.rst index b33ec73bb..11255e755 100644 --- a/classes/class_webrtcdatachannel.rst +++ b/classes/class_webrtcdatachannel.rst @@ -18,196 +18,299 @@ WebRTCDataChannel There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+----------------------------------------------------------------+-------+ -| :ref:`WriteMode` | :ref:`write_mode` | ``1`` | -+----------------------------------------------------+----------------------------------------------------------------+-------+ +.. table:: + :widths: auto + + +----------------------------------------------------+----------------------------------------------------------------+-------+ + | :ref:`WriteMode` | :ref:`write_mode` | ``1`` | + +----------------------------------------------------+----------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group Methods ------- -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_buffered_amount` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_id` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_label` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_packet_life_time` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_retransmits` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_protocol` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`ChannelState` | :ref:`get_ready_state` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_negotiated` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_ordered` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`poll` **(** **)** | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`was_string_packet` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_buffered_amount` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_id` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_label` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_max_packet_life_time` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_max_retransmits` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_protocol` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`ChannelState` | :ref:`get_ready_state` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_negotiated` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_ordered` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`poll` **(** **)** | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`was_string_packet` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_WebRTCDataChannel_WriteMode: -.. _class_WebRTCDataChannel_constant_WRITE_MODE_TEXT: - -.. _class_WebRTCDataChannel_constant_WRITE_MODE_BINARY: +.. rst-class:: classref-enumeration enum **WriteMode**: -- **WRITE_MODE_TEXT** = **0** --- Tells the channel to send data over this channel as text. An external peer (non-Godot) would receive this as a string. +.. _class_WebRTCDataChannel_constant_WRITE_MODE_TEXT: -- **WRITE_MODE_BINARY** = **1** --- Tells the channel to send data over this channel as binary. An external peer (non-Godot) would receive this as array buffer or blob. +.. rst-class:: classref-enumeration-constant + +:ref:`WriteMode` **WRITE_MODE_TEXT** = ``0`` + +Tells the channel to send data over this channel as text. An external peer (non-Godot) would receive this as a string. + +.. _class_WebRTCDataChannel_constant_WRITE_MODE_BINARY: + +.. rst-class:: classref-enumeration-constant + +:ref:`WriteMode` **WRITE_MODE_BINARY** = ``1`` + +Tells the channel to send data over this channel as binary. An external peer (non-Godot) would receive this as array buffer or blob. + +.. rst-class:: classref-item-separator ---- .. _enum_WebRTCDataChannel_ChannelState: -.. _class_WebRTCDataChannel_constant_STATE_CONNECTING: - -.. _class_WebRTCDataChannel_constant_STATE_OPEN: - -.. _class_WebRTCDataChannel_constant_STATE_CLOSING: - -.. _class_WebRTCDataChannel_constant_STATE_CLOSED: +.. rst-class:: classref-enumeration enum **ChannelState**: -- **STATE_CONNECTING** = **0** --- The channel was created, but it's still trying to connect. +.. _class_WebRTCDataChannel_constant_STATE_CONNECTING: -- **STATE_OPEN** = **1** --- The channel is currently open, and data can flow over it. +.. rst-class:: classref-enumeration-constant -- **STATE_CLOSING** = **2** --- The channel is being closed, no new messages will be accepted, but those already in queue will be flushed. +:ref:`ChannelState` **STATE_CONNECTING** = ``0`` -- **STATE_CLOSED** = **3** --- The channel was closed, or connection failed. +The channel was created, but it's still trying to connect. + +.. _class_WebRTCDataChannel_constant_STATE_OPEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`ChannelState` **STATE_OPEN** = ``1`` + +The channel is currently open, and data can flow over it. + +.. _class_WebRTCDataChannel_constant_STATE_CLOSING: + +.. rst-class:: classref-enumeration-constant + +:ref:`ChannelState` **STATE_CLOSING** = ``2`` + +The channel is being closed, no new messages will be accepted, but those already in queue will be flushed. + +.. _class_WebRTCDataChannel_constant_STATE_CLOSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ChannelState` **STATE_CLOSED** = ``3`` + +The channel was closed, or connection failed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_WebRTCDataChannel_property_write_mode: -- :ref:`WriteMode` **write_mode** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``1`` | -+-----------+-----------------------+ -| *Setter* | set_write_mode(value) | -+-----------+-----------------------+ -| *Getter* | get_write_mode() | -+-----------+-----------------------+ +:ref:`WriteMode` **write_mode** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_write_mode** **(** :ref:`WriteMode` value **)** +- :ref:`WriteMode` **get_write_mode** **(** **)** The transfer mode to use when sending outgoing packet. Either text or binary. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_WebRTCDataChannel_method_close: -- void **close** **(** **)** +.. rst-class:: classref-method + +void **close** **(** **)** Closes this data channel, notifying the other peer. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_get_buffered_amount: -- :ref:`int` **get_buffered_amount** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_buffered_amount** **(** **)** |const| Returns the number of bytes currently queued to be sent over this channel. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_get_id: -- :ref:`int` **get_id** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_id** **(** **)** |const| Returns the id assigned to this channel during creation (or auto-assigned during negotiation). If the channel is not negotiated out-of-band the id will only be available after the connection is established (will return ``65535`` until then). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_get_label: -- :ref:`String` **get_label** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_label** **(** **)** |const| Returns the label assigned to this channel during creation. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_get_max_packet_life_time: -- :ref:`int` **get_max_packet_life_time** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_max_packet_life_time** **(** **)** |const| Returns the ``maxPacketLifeTime`` value assigned to this channel during creation. Will be ``65535`` if not specified. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_get_max_retransmits: -- :ref:`int` **get_max_retransmits** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_max_retransmits** **(** **)** |const| Returns the ``maxRetransmits`` value assigned to this channel during creation. Will be ``65535`` if not specified. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_get_protocol: -- :ref:`String` **get_protocol** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_protocol** **(** **)** |const| Returns the sub-protocol assigned to this channel during creation. An empty string if not specified. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_get_ready_state: -- :ref:`ChannelState` **get_ready_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`ChannelState` **get_ready_state** **(** **)** |const| Returns the current state of this channel, see :ref:`ChannelState`. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_is_negotiated: -- :ref:`bool` **is_negotiated** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_negotiated** **(** **)** |const| Returns ``true`` if this channel was created with out-of-band configuration. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_is_ordered: -- :ref:`bool` **is_ordered** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_ordered** **(** **)** |const| Returns ``true`` if this channel was created with ordering enabled (default). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_poll: -- :ref:`Error` **poll** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **poll** **(** **)** Reserved, but not used for now. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannel_method_was_string_packet: -- :ref:`bool` **was_string_packet** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **was_string_packet** **(** **)** |const| Returns ``true`` if the last received packet was transferred as text. See :ref:`write_mode`. diff --git a/classes/class_webrtcdatachannelextension.rst b/classes/class_webrtcdatachannelextension.rst index a7e9b1a95..44ff52b41 100644 --- a/classes/class_webrtcdatachannelextension.rst +++ b/classes/class_webrtcdatachannelextension.rst @@ -16,223 +16,304 @@ WebRTCDataChannelExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_close` **(** **)** |virtual| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_buffered_amount` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_id` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_label` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_max_packet_life_time` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_max_retransmits` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_protocol` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ChannelState` | :ref:`_get_ready_state` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`WriteMode` | :ref:`_get_write_mode` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_negotiated` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_ordered` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set_write_mode` **(** :ref:`WriteMode` p_write_mode **)** |virtual| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_was_string_packet` **(** **)** |virtual| |const| | -+----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_close` **(** **)** |virtual| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_buffered_amount` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_id` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_label` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_life_time` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_retransmits` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_protocol` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ChannelState` | :ref:`_get_ready_state` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WriteMode` | :ref:`_get_write_mode` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_negotiated` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_ordered` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_write_mode` **(** :ref:`WriteMode` p_write_mode **)** |virtual| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_was_string_packet` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_WebRTCDataChannelExtension_method__close: -- void **_close** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_close** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_available_packet_count: -- :ref:`int` **_get_available_packet_count** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_available_packet_count** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_buffered_amount: -- :ref:`int` **_get_buffered_amount** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_buffered_amount** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_id: -- :ref:`int` **_get_id** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_id** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_label: -- :ref:`String` **_get_label** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_label** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_max_packet_life_time: -- :ref:`int` **_get_max_packet_life_time** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_max_packet_life_time** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_max_packet_size: -- :ref:`int` **_get_max_packet_size** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_max_packet_size** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_max_retransmits: -- :ref:`int` **_get_max_retransmits** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_max_retransmits** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_packet: -- :ref:`Error` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_protocol: -- :ref:`String` **_get_protocol** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`String` **_get_protocol** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_ready_state: -- :ref:`ChannelState` **_get_ready_state** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`ChannelState` **_get_ready_state** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__get_write_mode: -- :ref:`WriteMode` **_get_write_mode** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`WriteMode` **_get_write_mode** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__is_negotiated: -- :ref:`bool` **_is_negotiated** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_negotiated** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__is_ordered: -- :ref:`bool` **_is_ordered** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_ordered** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__poll: -- :ref:`Error` **_poll** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_poll** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__put_packet: -- :ref:`Error` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__set_write_mode: -- void **_set_write_mode** **(** :ref:`WriteMode` p_write_mode **)** |virtual| +.. rst-class:: classref-method + +void **_set_write_mode** **(** :ref:`WriteMode` p_write_mode **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCDataChannelExtension_method__was_string_packet: -- :ref:`bool` **_was_string_packet** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_was_string_packet** **(** **)** |virtual| |const| .. container:: contribute diff --git a/classes/class_webrtcmultiplayerpeer.rst b/classes/class_webrtcmultiplayerpeer.rst index 56708e227..eee4f3e7a 100644 --- a/classes/class_webrtcmultiplayerpeer.rst +++ b/classes/class_webrtcmultiplayerpeer.rst @@ -14,6 +14,8 @@ WebRTCMultiplayerPeer A simple interface to create a peer-to-peer mesh network composed of :ref:`WebRTCPeerConnection` that is compatible with the :ref:`MultiplayerAPI`. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,95 +27,136 @@ When creating the peer via :ref:`create_client` | :ref:`add_peer` **(** :ref:`WebRTCPeerConnection` peer, :ref:`int` peer_id, :ref:`int` unreliable_lifetime=1 **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_client` **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_mesh` **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_server` **(** :ref:`Array` channels_config=[] **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_peer` **(** :ref:`int` peer_id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_peers` **(** **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_peer` **(** :ref:`int` peer_id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_peer` **(** :ref:`int` peer_id **)** | -+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_peer` **(** :ref:`WebRTCPeerConnection` peer, :ref:`int` peer_id, :ref:`int` unreliable_lifetime=1 **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_client` **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_mesh` **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_server` **(** :ref:`Array` channels_config=[] **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_peer` **(** :ref:`int` peer_id **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_peers` **(** **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_peer` **(** :ref:`int` peer_id **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_peer` **(** :ref:`int` peer_id **)** | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_WebRTCMultiplayerPeer_method_add_peer: -- :ref:`Error` **add_peer** **(** :ref:`WebRTCPeerConnection` peer, :ref:`int` peer_id, :ref:`int` unreliable_lifetime=1 **)** +.. rst-class:: classref-method + +:ref:`Error` **add_peer** **(** :ref:`WebRTCPeerConnection` peer, :ref:`int` peer_id, :ref:`int` unreliable_lifetime=1 **)** Add a new peer to the mesh with the given ``peer_id``. The :ref:`WebRTCPeerConnection` must be in state :ref:`WebRTCPeerConnection.STATE_NEW`. Three channels will be created for reliable, unreliable, and ordered transport. The value of ``unreliable_lifetime`` will be passed to the ``maxPacketLifetime`` option when creating unreliable and ordered channels (see :ref:`WebRTCPeerConnection.create_data_channel`). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCMultiplayerPeer_method_create_client: -- :ref:`Error` **create_client** **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** +.. rst-class:: classref-method + +:ref:`Error` **create_client** **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** 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` once and with ``peer_id`` of ``1``. This mode enables :ref:`MultiplayerPeer.is_server_relay_supported`, allowing the upper :ref:`MultiplayerAPI` layer to perform peer exchange and packet relaying. You can optionally specify a ``channels_config`` array of :ref:`TransferMode` which will be used to create extra channels (WebRTC only supports one transfer mode per channel). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCMultiplayerPeer_method_create_mesh: -- :ref:`Error` **create_mesh** **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** +.. rst-class:: classref-method + +:ref:`Error` **create_mesh** **(** :ref:`int` peer_id, :ref:`Array` channels_config=[] **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCMultiplayerPeer_method_create_server: -- :ref:`Error` **create_server** **(** :ref:`Array` channels_config=[] **)** +.. rst-class:: classref-method + +:ref:`Error` **create_server** **(** :ref:`Array` channels_config=[] **)** Initialize the multiplayer peer as a server (with unique ID of ``1``). This mode enables :ref:`MultiplayerPeer.is_server_relay_supported`, allowing the upper :ref:`MultiplayerAPI` layer to perform peer exchange and packet relaying. You can optionally specify a ``channels_config`` array of :ref:`TransferMode` which will be used to create extra channels (WebRTC only supports one transfer mode per channel). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCMultiplayerPeer_method_get_peer: -- :ref:`Dictionary` **get_peer** **(** :ref:`int` peer_id **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_peer** **(** :ref:`int` peer_id **)** Returns a dictionary representation of the peer with given ``peer_id`` with three keys. ``connection`` containing the :ref:`WebRTCPeerConnection` to this peer, ``channels`` an array of three :ref:`WebRTCDataChannel`, and ``connected`` a boolean representing if the peer connection is currently connected (all three channels are open). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCMultiplayerPeer_method_get_peers: -- :ref:`Dictionary` **get_peers** **(** **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_peers** **(** **)** Returns a dictionary which keys are the peer ids and values the peer representation as in :ref:`get_peer`. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCMultiplayerPeer_method_has_peer: -- :ref:`bool` **has_peer** **(** :ref:`int` peer_id **)** +.. rst-class:: classref-method + +:ref:`bool` **has_peer** **(** :ref:`int` peer_id **)** Returns ``true`` if the given ``peer_id`` is in the peers map (it might not be connected though). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCMultiplayerPeer_method_remove_peer: -- void **remove_peer** **(** :ref:`int` peer_id **)** +.. rst-class:: classref-method + +void **remove_peer** **(** :ref:`int` peer_id **)** Remove the peer with given ``peer_id`` from the mesh. If the peer was connected, and :ref:`MultiplayerPeer.peer_connected` was emitted for it, then :ref:`MultiplayerPeer.peer_disconnected` will be emitted. diff --git a/classes/class_webrtcpeerconnection.rst b/classes/class_webrtcpeerconnection.rst index 565f260a6..d315dc349 100644 --- a/classes/class_webrtcpeerconnection.rst +++ b/classes/class_webrtcpeerconnection.rst @@ -16,6 +16,8 @@ WebRTCPeerConnection Interface to a WebRTC peer connection. +.. rst-class:: classref-introduction-group + Description ----------- @@ -31,165 +33,278 @@ Setting up a WebRTC connection between two peers from now on) may not seem a tri After these steps, the connection should become connected. Keep on reading or look into the tutorial for more information. +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`add_ice_candidate` **(** :ref:`String` media, :ref:`int` index, :ref:`String` name **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`WebRTCDataChannel` | :ref:`create_data_channel` **(** :ref:`String` label, :ref:`Dictionary` options={} **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_offer` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ConnectionState` | :ref:`get_connection_state` **(** **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GatheringState` | :ref:`get_gathering_state` **(** **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SignalingState` | :ref:`get_signaling_state` **(** **)** |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`initialize` **(** :ref:`Dictionary` configuration={} **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`poll` **(** **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_default_extension` **(** :ref:`StringName` extension_class **)** |static| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`set_local_description` **(** :ref:`String` type, :ref:`String` sdp **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`set_remote_description` **(** :ref:`String` type, :ref:`String` sdp **)** | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_ice_candidate` **(** :ref:`String` media, :ref:`int` index, :ref:`String` name **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WebRTCDataChannel` | :ref:`create_data_channel` **(** :ref:`String` label, :ref:`Dictionary` options={} **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_offer` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionState` | :ref:`get_connection_state` **(** **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GatheringState` | :ref:`get_gathering_state` **(** **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SignalingState` | :ref:`get_signaling_state` **(** **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`initialize` **(** :ref:`Dictionary` configuration={} **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`poll` **(** **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_default_extension` **(** :ref:`StringName` extension_class **)** |static| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`set_local_description` **(** :ref:`String` type, :ref:`String` sdp **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`set_remote_description` **(** :ref:`String` type, :ref:`String` sdp **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_WebRTCPeerConnection_signal_data_channel_received: -- **data_channel_received** **(** :ref:`WebRTCDataChannel` channel **)** +.. rst-class:: classref-signal + +**data_channel_received** **(** :ref:`WebRTCDataChannel` channel **)** Emitted when a new in-band channel is received, i.e. when the channel was created with ``negotiated: false`` (default). The object will be an instance of :ref:`WebRTCDataChannel`. You must keep a reference of it or it will be closed automatically. See :ref:`create_data_channel`. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_signal_ice_candidate_created: -- **ice_candidate_created** **(** :ref:`String` media, :ref:`int` index, :ref:`String` name **)** +.. rst-class:: classref-signal + +**ice_candidate_created** **(** :ref:`String` media, :ref:`int` index, :ref:`String` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_signal_session_description_created: -- **session_description_created** **(** :ref:`String` type, :ref:`String` sdp **)** +.. rst-class:: classref-signal + +**session_description_created** **(** :ref:`String` type, :ref:`String` sdp **)** Emitted after a successful call to :ref:`create_offer` or :ref:`set_remote_description` (when it generates an answer). The parameters are meant to be passed to :ref:`set_local_description` on this object, and sent to the remote peer over the signaling server. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_WebRTCPeerConnection_ConnectionState: -.. _class_WebRTCPeerConnection_constant_STATE_NEW: - -.. _class_WebRTCPeerConnection_constant_STATE_CONNECTING: - -.. _class_WebRTCPeerConnection_constant_STATE_CONNECTED: - -.. _class_WebRTCPeerConnection_constant_STATE_DISCONNECTED: - -.. _class_WebRTCPeerConnection_constant_STATE_FAILED: - -.. _class_WebRTCPeerConnection_constant_STATE_CLOSED: +.. rst-class:: classref-enumeration enum **ConnectionState**: -- **STATE_NEW** = **0** --- The connection is new, data channels and an offer can be created in this state. +.. _class_WebRTCPeerConnection_constant_STATE_NEW: -- **STATE_CONNECTING** = **1** --- The peer is connecting, ICE is in progress, none of the transports has failed. +.. rst-class:: classref-enumeration-constant -- **STATE_CONNECTED** = **2** --- The peer is connected, all ICE transports are connected. +:ref:`ConnectionState` **STATE_NEW** = ``0`` -- **STATE_DISCONNECTED** = **3** --- At least one ICE transport is disconnected. +The connection is new, data channels and an offer can be created in this state. -- **STATE_FAILED** = **4** --- One or more of the ICE transports failed. +.. _class_WebRTCPeerConnection_constant_STATE_CONNECTING: -- **STATE_CLOSED** = **5** --- The peer connection is closed (after calling :ref:`close` for example). +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectionState` **STATE_CONNECTING** = ``1`` + +The peer is connecting, ICE is in progress, none of the transports has failed. + +.. _class_WebRTCPeerConnection_constant_STATE_CONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectionState` **STATE_CONNECTED** = ``2`` + +The peer is connected, all ICE transports are connected. + +.. _class_WebRTCPeerConnection_constant_STATE_DISCONNECTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectionState` **STATE_DISCONNECTED** = ``3`` + +At least one ICE transport is disconnected. + +.. _class_WebRTCPeerConnection_constant_STATE_FAILED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectionState` **STATE_FAILED** = ``4`` + +One or more of the ICE transports failed. + +.. _class_WebRTCPeerConnection_constant_STATE_CLOSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ConnectionState` **STATE_CLOSED** = ``5`` + +The peer connection is closed (after calling :ref:`close` for example). + +.. rst-class:: classref-item-separator ---- .. _enum_WebRTCPeerConnection_GatheringState: -.. _class_WebRTCPeerConnection_constant_GATHERING_STATE_NEW: - -.. _class_WebRTCPeerConnection_constant_GATHERING_STATE_GATHERING: - -.. _class_WebRTCPeerConnection_constant_GATHERING_STATE_COMPLETE: +.. rst-class:: classref-enumeration enum **GatheringState**: -- **GATHERING_STATE_NEW** = **0** --- The peer connection was just created and hasn't done any networking yet. +.. _class_WebRTCPeerConnection_constant_GATHERING_STATE_NEW: -- **GATHERING_STATE_GATHERING** = **1** --- The ICE agent is in the process of gathering candidates for the connection. +.. rst-class:: classref-enumeration-constant -- **GATHERING_STATE_COMPLETE** = **2** --- The ICE agent has finished gathering candidates. If something happens that requires collecting new candidates, such as a new interface being added or the addition of a new ICE server, the state will revert to gathering to gather those candidates. +:ref:`GatheringState` **GATHERING_STATE_NEW** = ``0`` + +The peer connection was just created and hasn't done any networking yet. + +.. _class_WebRTCPeerConnection_constant_GATHERING_STATE_GATHERING: + +.. rst-class:: classref-enumeration-constant + +:ref:`GatheringState` **GATHERING_STATE_GATHERING** = ``1`` + +The ICE agent is in the process of gathering candidates for the connection. + +.. _class_WebRTCPeerConnection_constant_GATHERING_STATE_COMPLETE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GatheringState` **GATHERING_STATE_COMPLETE** = ``2`` + +The ICE agent has finished gathering candidates. If something happens that requires collecting new candidates, such as a new interface being added or the addition of a new ICE server, the state will revert to gathering to gather those candidates. + +.. rst-class:: classref-item-separator ---- .. _enum_WebRTCPeerConnection_SignalingState: -.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_STABLE: - -.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_LOCAL_OFFER: - -.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_REMOTE_OFFER: - -.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: - -.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: - -.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_CLOSED: +.. rst-class:: classref-enumeration enum **SignalingState**: -- **SIGNALING_STATE_STABLE** = **0** --- There is no ongoing exchange of offer and answer underway. This may mean that the ``WebRTCPeerConnection`` is new (:ref:`STATE_NEW`) or that negotiation is complete and a connection has been established (:ref:`STATE_CONNECTED`). +.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_STABLE: -- **SIGNALING_STATE_HAVE_LOCAL_OFFER** = **1** --- The local peer has called :ref:`set_local_description`, passing in SDP representing an offer (usually created by calling :ref:`create_offer`), and the offer has been applied successfully. +.. rst-class:: classref-enumeration-constant -- **SIGNALING_STATE_HAVE_REMOTE_OFFER** = **2** --- The remote peer has created an offer and used the signaling server to deliver it to the local peer, which has set the offer as the remote description by calling :ref:`set_remote_description`. +:ref:`SignalingState` **SIGNALING_STATE_STABLE** = ``0`` -- **SIGNALING_STATE_HAVE_LOCAL_PRANSWER** = **3** --- The offer sent by the remote peer has been applied and an answer has been created and applied by calling :ref:`set_local_description`. This provisional answer describes the supported media formats and so forth, but may not have a complete set of ICE candidates included. Further candidates will be delivered separately later. +There is no ongoing exchange of offer and answer underway. This may mean that the **WebRTCPeerConnection** is new (:ref:`STATE_NEW`) or that negotiation is complete and a connection has been established (:ref:`STATE_CONNECTED`). -- **SIGNALING_STATE_HAVE_REMOTE_PRANSWER** = **4** --- A provisional answer has been received and successfully applied in response to an offer previously sent and established by calling :ref:`set_local_description`. +.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_LOCAL_OFFER: -- **SIGNALING_STATE_CLOSED** = **5** --- The ``WebRTCPeerConnection`` has been closed. +.. rst-class:: classref-enumeration-constant + +:ref:`SignalingState` **SIGNALING_STATE_HAVE_LOCAL_OFFER** = ``1`` + +The local peer has called :ref:`set_local_description`, passing in SDP representing an offer (usually created by calling :ref:`create_offer`), and the offer has been applied successfully. + +.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_REMOTE_OFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SignalingState` **SIGNALING_STATE_HAVE_REMOTE_OFFER** = ``2`` + +The remote peer has created an offer and used the signaling server to deliver it to the local peer, which has set the offer as the remote description by calling :ref:`set_remote_description`. + +.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SignalingState` **SIGNALING_STATE_HAVE_LOCAL_PRANSWER** = ``3`` + +The offer sent by the remote peer has been applied and an answer has been created and applied by calling :ref:`set_local_description`. This provisional answer describes the supported media formats and so forth, but may not have a complete set of ICE candidates included. Further candidates will be delivered separately later. + +.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`SignalingState` **SIGNALING_STATE_HAVE_REMOTE_PRANSWER** = ``4`` + +A provisional answer has been received and successfully applied in response to an offer previously sent and established by calling :ref:`set_local_description`. + +.. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_CLOSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`SignalingState` **SIGNALING_STATE_CLOSED** = ``5`` + +The **WebRTCPeerConnection** has been closed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_WebRTCPeerConnection_method_add_ice_candidate: -- :ref:`Error` **add_ice_candidate** **(** :ref:`String` media, :ref:`int` index, :ref:`String` name **)** +.. rst-class:: classref-method + +:ref:`Error` **add_ice_candidate** **(** :ref:`String` media, :ref:`int` index, :ref:`String` name **)** Add an ice candidate generated by a remote peer (and received over the signaling server). See :ref:`ice_candidate_created`. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_close: -- void **close** **(** **)** +.. rst-class:: classref-method + +void **close** **(** **)** Close the peer connection and all data channels associated with it. \ **Note:** You cannot reuse this object for a new connection unless you call :ref:`initialize`. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_create_data_channel: -- :ref:`WebRTCDataChannel` **create_data_channel** **(** :ref:`String` label, :ref:`Dictionary` options={} **)** +.. rst-class:: classref-method + +:ref:`WebRTCDataChannel` **create_data_channel** **(** :ref:`String` label, :ref:`Dictionary` options={} **)** Returns a new :ref:`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`. @@ -213,45 +328,65 @@ Valid ``options`` are: \ **Note:** You must keep a reference to channels created this way, or it will be closed. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_create_offer: -- :ref:`Error` **create_offer** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **create_offer** **(** **)** Creates a new SDP offer to start a WebRTC connection with a remote peer. At least one :ref:`WebRTCDataChannel` must have been created before calling this method. If this functions returns :ref:`@GlobalScope.OK`, :ref:`session_description_created` will be called when the session is ready to be sent. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_get_connection_state: -- :ref:`ConnectionState` **get_connection_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`ConnectionState` **get_connection_state** **(** **)** |const| Returns the connection state. See :ref:`ConnectionState`. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_get_gathering_state: -- :ref:`GatheringState` **get_gathering_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`GatheringState` **get_gathering_state** **(** **)** |const| Returns the ICE :ref:`GatheringState` of the connection. This lets you detect, for example, when collection of ICE candidates has finished. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_get_signaling_state: -- :ref:`SignalingState` **get_signaling_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`SignalingState` **get_signaling_state** **(** **)** |const| Returns the :ref:`SignalingState` on the local end of the connection while connecting or reconnecting to another peer. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_initialize: -- :ref:`Error` **initialize** **(** :ref:`Dictionary` configuration={} **)** +.. rst-class:: classref-method + +:ref:`Error` **initialize** **(** :ref:`Dictionary` configuration={} **)** Re-initialize this peer connection, closing any previously active connection, and going back to state :ref:`STATE_NEW`. A dictionary of ``options`` can be passed to configure the peer connection. @@ -272,37 +407,53 @@ Valid ``options`` are: ] } +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_poll: -- :ref:`Error` **poll** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **poll** **(** **)** Call this method frequently (e.g. in :ref:`Node._process` or :ref:`Node._physics_process`) to properly receive signals. +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_set_default_extension: -- void **set_default_extension** **(** :ref:`StringName` extension_class **)** |static| +.. rst-class:: classref-method -Sets the ``extension_class`` as the default :ref:`WebRTCPeerConnectionExtension` returned when creating a new ``WebRTCPeerConnection``. +void **set_default_extension** **(** :ref:`StringName` extension_class **)** |static| + +Sets the ``extension_class`` as the default :ref:`WebRTCPeerConnectionExtension` returned when creating a new **WebRTCPeerConnection**. + +.. rst-class:: classref-item-separator ---- .. _class_WebRTCPeerConnection_method_set_local_description: -- :ref:`Error` **set_local_description** **(** :ref:`String` type, :ref:`String` sdp **)** +.. rst-class:: classref-method + +:ref:`Error` **set_local_description** **(** :ref:`String` type, :ref:`String` sdp **)** Sets the SDP description of the local peer. This should be called in response to :ref:`session_description_created`. After calling this function the peer will start emitting :ref:`ice_candidate_created` (unless an :ref:`Error` different from :ref:`@GlobalScope.OK` is returned). +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnection_method_set_remote_description: -- :ref:`Error` **set_remote_description** **(** :ref:`String` type, :ref:`String` sdp **)** +.. rst-class:: classref-method + +:ref:`Error` **set_remote_description** **(** :ref:`String` type, :ref:`String` sdp **)** 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. diff --git a/classes/class_webrtcpeerconnectionextension.rst b/classes/class_webrtcpeerconnectionextension.rst index 0eaa9ce31..39dd91b19 100644 --- a/classes/class_webrtcpeerconnectionextension.rst +++ b/classes/class_webrtcpeerconnectionextension.rst @@ -16,139 +16,192 @@ WebRTCPeerConnectionExtension There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_add_ice_candidate` **(** :ref:`String` p_sdp_mid_name, :ref:`int` p_sdp_mline_index, :ref:`String` p_sdp_name **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_close` **(** **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_create_data_channel` **(** :ref:`String` p_label, :ref:`Dictionary` p_config **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_create_offer` **(** **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ConnectionState` | :ref:`_get_connection_state` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GatheringState` | :ref:`_get_gathering_state` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SignalingState` | :ref:`_get_signaling_state` **(** **)** |virtual| |const| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_initialize` **(** :ref:`Dictionary` p_config **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_set_local_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`_set_remote_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | -+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_add_ice_candidate` **(** :ref:`String` p_sdp_mid_name, :ref:`int` p_sdp_mline_index, :ref:`String` p_sdp_name **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_close` **(** **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_create_data_channel` **(** :ref:`String` p_label, :ref:`Dictionary` p_config **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_create_offer` **(** **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionState` | :ref:`_get_connection_state` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GatheringState` | :ref:`_get_gathering_state` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SignalingState` | :ref:`_get_signaling_state` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_initialize` **(** :ref:`Dictionary` p_config **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_set_local_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_set_remote_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_WebRTCPeerConnectionExtension_method__add_ice_candidate: -- :ref:`Error` **_add_ice_candidate** **(** :ref:`String` p_sdp_mid_name, :ref:`int` p_sdp_mline_index, :ref:`String` p_sdp_name **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_add_ice_candidate** **(** :ref:`String` p_sdp_mid_name, :ref:`int` p_sdp_mline_index, :ref:`String` p_sdp_name **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__close: -- void **_close** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_close** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__create_data_channel: -- :ref:`Object` **_create_data_channel** **(** :ref:`String` p_label, :ref:`Dictionary` p_config **)** |virtual| +.. rst-class:: classref-method + +:ref:`Object` **_create_data_channel** **(** :ref:`String` p_label, :ref:`Dictionary` p_config **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__create_offer: -- :ref:`Error` **_create_offer** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_create_offer** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__get_connection_state: -- :ref:`ConnectionState` **_get_connection_state** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`ConnectionState` **_get_connection_state** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__get_gathering_state: -- :ref:`GatheringState` **_get_gathering_state** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`GatheringState` **_get_gathering_state** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__get_signaling_state: -- :ref:`SignalingState` **_get_signaling_state** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`SignalingState` **_get_signaling_state** **(** **)** |virtual| |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__initialize: -- :ref:`Error` **_initialize** **(** :ref:`Dictionary` p_config **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_initialize** **(** :ref:`Dictionary` p_config **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__poll: -- :ref:`Error` **_poll** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_poll** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__set_local_description: -- :ref:`Error` **_set_local_description** **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_set_local_description** **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WebRTCPeerConnectionExtension_method__set_remote_description: -- :ref:`Error` **_set_remote_description** **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| +.. rst-class:: classref-method + +:ref:`Error` **_set_remote_description** **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| .. container:: contribute diff --git a/classes/class_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index 73d73472e..170d4e739 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -14,6 +14,8 @@ WebSocketMultiplayerPeer Base class for WebSocket server and client. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,175 +23,219 @@ Base class for WebSocket server and client, allowing them to be used as multipla \ **Note:** When exporting to Android, make sure to enable the ``INTERNET`` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`handshake_headers` | ``PackedStringArray()`` | -+---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`handshake_timeout` | ``3.0`` | -+---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`inbound_buffer_size` | ``65535`` | -+---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`max_queued_packets` | ``2048`` | -+---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`outbound_buffer_size` | ``65535`` | -+---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`supported_protocols` | ``PackedStringArray()`` | -+---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`handshake_headers` | ``PackedStringArray()`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`handshake_timeout` | ``3.0`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`inbound_buffer_size` | ``65535`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`max_queued_packets` | ``2048`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`outbound_buffer_size` | ``65535`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`supported_protocols` | ``PackedStringArray()`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_client` **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` tls_certificate=null **)** | -+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`create_server` **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`CryptoKey` tls_key=null, :ref:`X509Certificate` tls_certificate=null **)** | -+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`WebSocketPeer` | :ref:`get_peer` **(** :ref:`int` peer_id **)** |const| | -+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_peer_address` **(** :ref:`int` id **)** |const| | -+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_peer_port` **(** :ref:`int` id **)** |const| | -+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_client` **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` tls_certificate=null **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_server` **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`CryptoKey` tls_key=null, :ref:`X509Certificate` tls_certificate=null **)** | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WebSocketPeer` | :ref:`get_peer` **(** :ref:`int` peer_id **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_peer_address` **(** :ref:`int` id **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_peer_port` **(** :ref:`int` id **)** |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_WebSocketMultiplayerPeer_property_handshake_headers: -- :ref:`PackedStringArray` **handshake_headers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+------------------------------+ -| *Setter* | set_handshake_headers(value) | -+-----------+------------------------------+ -| *Getter* | get_handshake_headers() | -+-----------+------------------------------+ +:ref:`PackedStringArray` **handshake_headers** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_handshake_headers** **(** :ref:`PackedStringArray` value **)** +- :ref:`PackedStringArray` **get_handshake_headers** **(** **)** The extra headers to use during handshake. See :ref:`WebSocketPeer.handshake_headers` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_property_handshake_timeout: -- :ref:`float` **handshake_timeout** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``3.0`` | -+-----------+------------------------------+ -| *Setter* | set_handshake_timeout(value) | -+-----------+------------------------------+ -| *Getter* | get_handshake_timeout() | -+-----------+------------------------------+ +:ref:`float` **handshake_timeout** = ``3.0`` + +.. rst-class:: classref-property-setget + +- void **set_handshake_timeout** **(** :ref:`float` value **)** +- :ref:`float` **get_handshake_timeout** **(** **)** The maximum time each peer can stay in a connecting state before being dropped. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_property_inbound_buffer_size: -- :ref:`int` **inbound_buffer_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``65535`` | -+-----------+--------------------------------+ -| *Setter* | set_inbound_buffer_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_inbound_buffer_size() | -+-----------+--------------------------------+ +:ref:`int` **inbound_buffer_size** = ``65535`` + +.. rst-class:: classref-property-setget + +- void **set_inbound_buffer_size** **(** :ref:`int` value **)** +- :ref:`int` **get_inbound_buffer_size** **(** **)** The inbound buffer size for connected peers. See :ref:`WebSocketPeer.inbound_buffer_size` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_property_max_queued_packets: -- :ref:`int` **max_queued_packets** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``2048`` | -+-----------+-------------------------------+ -| *Setter* | set_max_queued_packets(value) | -+-----------+-------------------------------+ -| *Getter* | get_max_queued_packets() | -+-----------+-------------------------------+ +:ref:`int` **max_queued_packets** = ``2048`` + +.. rst-class:: classref-property-setget + +- void **set_max_queued_packets** **(** :ref:`int` value **)** +- :ref:`int` **get_max_queued_packets** **(** **)** The maximum number of queued packets for connected peers. See :ref:`WebSocketPeer.max_queued_packets` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_property_outbound_buffer_size: -- :ref:`int` **outbound_buffer_size** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``65535`` | -+-----------+---------------------------------+ -| *Setter* | set_outbound_buffer_size(value) | -+-----------+---------------------------------+ -| *Getter* | get_outbound_buffer_size() | -+-----------+---------------------------------+ +:ref:`int` **outbound_buffer_size** = ``65535`` + +.. rst-class:: classref-property-setget + +- void **set_outbound_buffer_size** **(** :ref:`int` value **)** +- :ref:`int` **get_outbound_buffer_size** **(** **)** The outbound buffer size for connected peers. See :ref:`WebSocketPeer.outbound_buffer_size` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_property_supported_protocols: -- :ref:`PackedStringArray` **supported_protocols** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+--------------------------------+ -| *Setter* | set_supported_protocols(value) | -+-----------+--------------------------------+ -| *Getter* | get_supported_protocols() | -+-----------+--------------------------------+ +:ref:`PackedStringArray` **supported_protocols** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_supported_protocols** **(** :ref:`PackedStringArray` value **)** +- :ref:`PackedStringArray` **get_supported_protocols** **(** **)** The supported WebSocket sub-protocols. See :ref:`WebSocketPeer.supported_protocols` for more details. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_WebSocketMultiplayerPeer_method_create_client: -- :ref:`Error` **create_client** **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` tls_certificate=null **)** +.. rst-class:: classref-method + +:ref:`Error` **create_client** **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` tls_certificate=null **)** Starts a new multiplayer client connecting to the given ``url``. If ``verify_tls`` is ``false`` certificate validation will be disabled. If specified, the ``tls_certificate`` will be used to verify the TLS host. \ **Note**: It is recommended to specify the scheme part of the URL, i.e. the ``url`` should start with either ``ws://`` or ``wss://``. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_method_create_server: -- :ref:`Error` **create_server** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`CryptoKey` tls_key=null, :ref:`X509Certificate` tls_certificate=null **)** +.. rst-class:: classref-method + +:ref:`Error` **create_server** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`CryptoKey` tls_key=null, :ref:`X509Certificate` tls_certificate=null **)** Starts a new multiplayer server listening on the given ``port``. You can optionally specify a ``bind_address``, and provide a ``tls_key`` and ``tls_certificate`` to use TLS. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_method_get_peer: -- :ref:`WebSocketPeer` **get_peer** **(** :ref:`int` peer_id **)** |const| +.. rst-class:: classref-method + +:ref:`WebSocketPeer` **get_peer** **(** :ref:`int` peer_id **)** |const| Returns the :ref:`WebSocketPeer` associated to the given ``peer_id``. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_method_get_peer_address: -- :ref:`String` **get_peer_address** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_peer_address** **(** :ref:`int` id **)** |const| Returns the IP address of the given peer. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketMultiplayerPeer_method_get_peer_port: -- :ref:`int` **get_peer_port** **(** :ref:`int` id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_peer_port** **(** :ref:`int` id **)** |const| Returns the remote port of the given peer. diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index 712aaaabd..0cf672341 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -14,6 +14,8 @@ WebSocketPeer A WebSocket connection. +.. rst-class:: classref-introduction-group + Description ----------- @@ -54,194 +56,261 @@ To start a WebSocket client, first call :ref:`connect_to_url` and the online tutorial. +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`handshake_headers` | ``PackedStringArray()`` | -+---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`inbound_buffer_size` | ``65535`` | -+---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`max_queued_packets` | ``2048`` | -+---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`int` | :ref:`outbound_buffer_size` | ``65535`` | -+---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`PackedStringArray` | :ref:`supported_protocols` | ``PackedStringArray()`` | -+---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`handshake_headers` | ``PackedStringArray()`` | + +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`inbound_buffer_size` | ``65535`` | + +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`max_queued_packets` | ``2048`` | + +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`outbound_buffer_size` | ``65535`` | + +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`supported_protocols` | ``PackedStringArray()`` | + +---------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`accept_stream` **(** :ref:`StreamPeer` stream **)** | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** :ref:`int` code=1000, :ref:`String` reason="" **)** | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_to_url` **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` trusted_tls_certificate=null **)** | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_close_code` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_close_reason` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_connected_host` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connected_port` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_current_outbound_buffered_amount` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`State` | :ref:`get_ready_state` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_requested_url` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_selected_protocol` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`poll` **(** **)** | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`send` **(** :ref:`PackedByteArray` message, :ref:`WriteMode` write_mode=1 **)** | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`send_text` **(** :ref:`String` message **)** | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_no_delay` **(** :ref:`bool` enabled **)** | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`was_string_packet` **(** **)** |const| | -+----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`accept_stream` **(** :ref:`StreamPeer` stream **)** | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close` **(** :ref:`int` code=1000, :ref:`String` reason="" **)** | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`connect_to_url` **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` trusted_tls_certificate=null **)** | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_close_code` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_close_reason` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_connected_host` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_connected_port` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_current_outbound_buffered_amount` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`State` | :ref:`get_ready_state` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_requested_url` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_protocol` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`poll` **(** **)** | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`send` **(** :ref:`PackedByteArray` message, :ref:`WriteMode` write_mode=1 **)** | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`send_text` **(** :ref:`String` message **)** | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_no_delay` **(** :ref:`bool` enabled **)** | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`was_string_packet` **(** **)** |const| | + +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_WebSocketPeer_WriteMode: -.. _class_WebSocketPeer_constant_WRITE_MODE_TEXT: - -.. _class_WebSocketPeer_constant_WRITE_MODE_BINARY: +.. rst-class:: classref-enumeration enum **WriteMode**: -- **WRITE_MODE_TEXT** = **0** --- Specifies that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). +.. _class_WebSocketPeer_constant_WRITE_MODE_TEXT: -- **WRITE_MODE_BINARY** = **1** --- Specifies that WebSockets messages should be transferred as binary payload (any byte combination is allowed). +.. rst-class:: classref-enumeration-constant + +:ref:`WriteMode` **WRITE_MODE_TEXT** = ``0`` + +Specifies that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). + +.. _class_WebSocketPeer_constant_WRITE_MODE_BINARY: + +.. rst-class:: classref-enumeration-constant + +:ref:`WriteMode` **WRITE_MODE_BINARY** = ``1`` + +Specifies that WebSockets messages should be transferred as binary payload (any byte combination is allowed). + +.. rst-class:: classref-item-separator ---- .. _enum_WebSocketPeer_State: -.. _class_WebSocketPeer_constant_STATE_CONNECTING: - -.. _class_WebSocketPeer_constant_STATE_OPEN: - -.. _class_WebSocketPeer_constant_STATE_CLOSING: - -.. _class_WebSocketPeer_constant_STATE_CLOSED: +.. rst-class:: classref-enumeration enum **State**: -- **STATE_CONNECTING** = **0** --- Socket has been created. The connection is not yet open. +.. _class_WebSocketPeer_constant_STATE_CONNECTING: -- **STATE_OPEN** = **1** --- The connection is open and ready to communicate. +.. rst-class:: classref-enumeration-constant -- **STATE_CLOSING** = **2** --- The connection is in the process of closing. This means a close request has been sent to the remote peer but confirmation has not been received. +:ref:`State` **STATE_CONNECTING** = ``0`` -- **STATE_CLOSED** = **3** --- The connection is closed or couldn't be opened. +Socket has been created. The connection is not yet open. + +.. _class_WebSocketPeer_constant_STATE_OPEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`State` **STATE_OPEN** = ``1`` + +The connection is open and ready to communicate. + +.. _class_WebSocketPeer_constant_STATE_CLOSING: + +.. rst-class:: classref-enumeration-constant + +:ref:`State` **STATE_CLOSING** = ``2`` + +The connection is in the process of closing. This means a close request has been sent to the remote peer but confirmation has not been received. + +.. _class_WebSocketPeer_constant_STATE_CLOSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`State` **STATE_CLOSED** = ``3`` + +The connection is closed or couldn't be opened. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_WebSocketPeer_property_handshake_headers: -- :ref:`PackedStringArray` **handshake_headers** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+------------------------------+ -| *Setter* | set_handshake_headers(value) | -+-----------+------------------------------+ -| *Getter* | get_handshake_headers() | -+-----------+------------------------------+ +:ref:`PackedStringArray` **handshake_headers** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_handshake_headers** **(** :ref:`PackedStringArray` value **)** +- :ref:`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. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_property_inbound_buffer_size: -- :ref:`int` **inbound_buffer_size** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``65535`` | -+-----------+--------------------------------+ -| *Setter* | set_inbound_buffer_size(value) | -+-----------+--------------------------------+ -| *Getter* | get_inbound_buffer_size() | -+-----------+--------------------------------+ +:ref:`int` **inbound_buffer_size** = ``65535`` + +.. rst-class:: classref-property-setget + +- void **set_inbound_buffer_size** **(** :ref:`int` value **)** +- :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_property_max_queued_packets: -- :ref:`int` **max_queued_packets** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``2048`` | -+-----------+-------------------------------+ -| *Setter* | set_max_queued_packets(value) | -+-----------+-------------------------------+ -| *Getter* | get_max_queued_packets() | -+-----------+-------------------------------+ +:ref:`int` **max_queued_packets** = ``2048`` + +.. rst-class:: classref-property-setget + +- void **set_max_queued_packets** **(** :ref:`int` value **)** +- :ref:`int` **get_max_queued_packets** **(** **)** The maximum amount of packets that will be allowed in the queues (both inbound and outbound). +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_property_outbound_buffer_size: -- :ref:`int` **outbound_buffer_size** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``65535`` | -+-----------+---------------------------------+ -| *Setter* | set_outbound_buffer_size(value) | -+-----------+---------------------------------+ -| *Getter* | get_outbound_buffer_size() | -+-----------+---------------------------------+ +:ref:`int` **outbound_buffer_size** = ``65535`` + +.. rst-class:: classref-property-setget + +- void **set_outbound_buffer_size** **(** :ref:`int` value **)** +- :ref:`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). +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_property_supported_protocols: -- :ref:`PackedStringArray` **supported_protocols** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``PackedStringArray()`` | -+-----------+--------------------------------+ -| *Setter* | set_supported_protocols(value) | -+-----------+--------------------------------+ -| *Getter* | get_supported_protocols() | -+-----------+--------------------------------+ +:ref:`PackedStringArray` **supported_protocols** = ``PackedStringArray()`` + +.. rst-class:: classref-property-setget + +- void **set_supported_protocols** **(** :ref:`PackedStringArray` value **)** +- :ref:`PackedStringArray` **get_supported_protocols** **(** **)** The WebSocket sub-protocols allowed during the WebSocket handshake. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_WebSocketPeer_method_accept_stream: -- :ref:`Error` **accept_stream** **(** :ref:`StreamPeer` stream **)** +.. rst-class:: classref-method + +:ref:`Error` **accept_stream** **(** :ref:`StreamPeer` 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`, or a TLS stream accepted via :ref:`StreamPeerTLS.accept_stream`. \ **Note:** Not supported in Web exports due to browsers' restrictions. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_close: -- void **close** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** +.. rst-class:: classref-method + +void **close** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** 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. @@ -249,123 +318,179 @@ Closes this WebSocket connection. ``code`` is the status code for the closure (s \ **Note:** The Web export might not support all status codes. Please refer to browser-specific documentation for more details. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_connect_to_url: -- :ref:`Error` **connect_to_url** **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` trusted_tls_certificate=null **)** +.. rst-class:: classref-method + +:ref:`Error` **connect_to_url** **(** :ref:`String` url, :ref:`bool` verify_tls=true, :ref:`X509Certificate` trusted_tls_certificate=null **)** Connects to the given URL. If ``verify_tls`` is ``false`` certificate validation will be disabled. If specified, the ``trusted_tls_certificate`` will be the only one accepted when connecting to a TLS host. \ **Note:** To avoid mixed content warnings or errors in Web, you may have to use a ``url`` that starts with ``wss://`` (secure) instead of ``ws://``. When doing so, make sure to use the fully qualified domain name that matches the one defined in the server's TLS certificate. Do not connect directly via the IP address for ``wss://`` connections, as it won't match with the TLS certificate. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_close_code: -- :ref:`int` **get_close_code** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_close_code** **(** **)** |const| 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` returns :ref:`STATE_CLOSED`. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_close_reason: -- :ref:`String` **get_close_reason** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_close_reason** **(** **)** |const| Returns the received WebSocket close frame status reason string. Only call this method when :ref:`get_ready_state` returns :ref:`STATE_CLOSED`. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_connected_host: -- :ref:`String` **get_connected_host** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_connected_host** **(** **)** |const| Returns the IP address of the connected peer. \ **Note:** Not available in the Web export. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_connected_port: -- :ref:`int` **get_connected_port** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_connected_port** **(** **)** |const| Returns the remote port of the connected peer. \ **Note:** Not available in the Web export. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_current_outbound_buffered_amount: -- :ref:`int` **get_current_outbound_buffered_amount** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_current_outbound_buffered_amount** **(** **)** |const| Returns the current amount of data in the outbound websocket buffer. **Note:** Web exports use WebSocket.bufferedAmount, while other platforms use an internal buffer. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_ready_state: -- :ref:`State` **get_ready_state** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`State` **get_ready_state** **(** **)** |const| Returns the ready state of the connection. See :ref:`State`. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_requested_url: -- :ref:`String` **get_requested_url** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_requested_url** **(** **)** |const| Returns the URL requested by this peer. The URL is derived from the ``url`` passed to :ref:`connect_to_url` or from the HTTP headers when acting as server (i.e. when using :ref:`accept_stream`). +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_get_selected_protocol: -- :ref:`String` **get_selected_protocol** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_selected_protocol** **(** **)** |const| Returns the selected WebSocket sub-protocol for this connection or an empty string if the sub-protocol has not been selected yet. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_poll: -- void **poll** **(** **)** +.. rst-class:: classref-method + +void **poll** **(** **)** Updates the connection state and receive incoming packets. Call this function regularly to keep it in a clean state. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_send: -- :ref:`Error` **send** **(** :ref:`PackedByteArray` message, :ref:`WriteMode` write_mode=1 **)** +.. rst-class:: classref-method + +:ref:`Error` **send** **(** :ref:`PackedByteArray` message, :ref:`WriteMode` write_mode=1 **)** Sends the given ``message`` using the desired ``write_mode``. When sending a :ref:`String`, prefer using :ref:`send_text`. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_send_text: -- :ref:`Error` **send_text** **(** :ref:`String` message **)** +.. rst-class:: classref-method + +:ref:`Error` **send_text** **(** :ref:`String` message **)** Sends the given ``message`` using WebSocket text mode. Prefer this method over :ref:`PacketPeer.put_packet` when interacting with third-party text-based API (e.g. when using :ref:`JSON` formatted messages). +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_set_no_delay: -- void **set_no_delay** **(** :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_no_delay** **(** :ref:`bool` enabled **)** Disable Nagle's algorithm on the underling TCP socket (default). See :ref:`StreamPeerTCP.set_no_delay` for more information. \ **Note:** Not available in the Web export. +.. rst-class:: classref-item-separator + ---- .. _class_WebSocketPeer_method_was_string_packet: -- :ref:`bool` **was_string_packet** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **was_string_packet** **(** **)** |const| Returns ``true`` if the last received packet was sent as a text payload. See :ref:`WriteMode`. diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index 612e7d71f..345cb7475 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -12,7 +12,9 @@ WebXRInterface **Inherits:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` -AR/VR interface using WebXR. +XR interface using WebXR. + +.. rst-class:: classref-introduction-group Description ----------- @@ -23,7 +25,7 @@ As such, this interface is only available when running in Web exports. WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones). -Since WebXR is based on JavaScript, it makes extensive use of callbacks, which means that ``WebXRInterface`` is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes ``WebXRInterface`` quite a bit more complicated to initialize than other AR/VR interfaces. +Since WebXR is based on JavaScript, it makes extensive use of callbacks, which means that **WebXRInterface** is forced to use signals, where other XR interfaces would instead use functions that return a result immediately. This makes **WebXRInterface** quite a bit more complicated to initialize than other XR interfaces. Here's the minimum code required to start an immersive VR session: @@ -88,7 +90,7 @@ Here's the minimum code required to start an immersive VR session: func _webxr_session_started(): $Button.visible = false # This tells Godot to start rendering to the headset. - get_viewport().xr = true + get_viewport().use_xr = true # 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'. @@ -98,201 +100,303 @@ Here's the minimum code required to start an immersive VR session: $Button.visible = true # If the user exits immersive mode, then we tell Godot to render to the web # page again. - get_viewport().xr = false + get_viewport().use_xr = false func _webxr_session_failed(message): OS.alert("Failed to initialize: " + message) -There are several ways to handle "controller" input: +There are a couple ways to handle "controller" input: -- Using :ref:`XRController3D` nodes and their :ref:`XRController3D.button_pressed` and :ref:`XRController3D.button_released` signals. This is how controllers are typically handled in AR/VR apps in Godot, however, this will only work with advanced VR controllers like the Oculus Touch or Index controllers, for example. The buttons codes are defined by `Section 3.3 of the WebXR Gamepads Module `__. +- Using :ref:`XRController3D` nodes and their :ref:`XRController3D.button_pressed` and :ref:`XRController3D.button_released` signals. This is how controllers are typically handled in XR apps in Godot, however, this will only work with advanced VR controllers like the Oculus Touch or Index controllers, for example. -- Using :ref:`Node._unhandled_input` and :ref:`InputEventJoypadButton` or :ref:`InputEventJoypadMotion`. This works the same as normal joypads, except the :ref:`InputEvent.device` starts at 100, so the left controller is 100 and the right controller is 101, and the button codes are also defined by `Section 3.3 of the WebXR Gamepads Module `__. +- Using the :ref:`select`, :ref:`squeeze` and related signals. This method will work for both advanced VR controllers, and non-traditional input sources like a tap on the screen, a spoken voice command or a button press on the device itself. -- Using the :ref:`select`, :ref:`squeeze` and related signals. This method will work for both advanced VR controllers, and non-traditional "controllers" like a tap on the screen, a spoken voice command or a button press on the device itself. +You can use both methods to allow your game or app to support a wider or narrower set of devices and input methods, or to allow more advanced interactions with more advanced devices. -You can use one or all of these methods to allow your game or app to support a wider or narrower set of devices and input methods, or to allow more advanced interactions with more advanced devices. +.. rst-class:: classref-introduction-group Tutorials --------- - `How to make a VR game for WebXR with Godot `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`bounds_geometry` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`optional_features` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`reference_space_type` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`requested_reference_space_types` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`required_features` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`session_mode` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`visibility_state` | -+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`optional_features` | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`reference_space_type` | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`requested_reference_space_types` | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`required_features` | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`session_mode` | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`visibility_state` | + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`XRPositionalTracker` | :ref:`get_controller` **(** :ref:`int` controller_id **)** |const| | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`is_session_supported` **(** :ref:`String` session_mode **)** | -+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TargetRayMode` | :ref:`get_input_source_target_ray_mode` **(** :ref:`int` input_source_id **)** |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`XRPositionalTracker` | :ref:`get_input_source_tracker` **(** :ref:`int` input_source_id **)** |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_source_active` **(** :ref:`int` input_source_id **)** |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`is_session_supported` **(** :ref:`String` session_mode **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_WebXRInterface_signal_reference_space_reset: -- **reference_space_reset** **(** **)** +.. rst-class:: classref-signal + +**reference_space_reset** **(** **)** Emitted to indicate that the reference space has been reset or reconfigured. -When (or whether) this is emitted depends on the user's browser or device, but may include when the user has changed the dimensions of their play space (which you may be able to access via :ref:`bounds_geometry`) or pressed/held a button to recenter their position. +When (or whether) this is emitted depends on the user's browser or device, but may include when the user has changed the dimensions of their play space (which you may be able to access via :ref:`XRInterface.get_play_area`) or pressed/held a button to recenter their position. See `WebXR's XRReferenceSpace reset event `__ for more information. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_signal_select: -- **select** **(** :ref:`int` controller_id **)** +.. rst-class:: classref-signal -Emitted after one of the "controllers" has finished its "primary action". +**select** **(** :ref:`int` input_source_id **)** -Use :ref:`get_controller` to get more information about the controller. +Emitted after one of the input sources has finished its "primary action". + +Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_selectend: -- **selectend** **(** :ref:`int` controller_id **)** +.. rst-class:: classref-signal -Emitted when one of the "controllers" has finished its "primary action". +**selectend** **(** :ref:`int` input_source_id **)** -Use :ref:`get_controller` to get more information about the controller. +Emitted when one of the input sources has finished its "primary action". + +Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_selectstart: -- **selectstart** **(** :ref:`int` controller_id **)** +.. rst-class:: classref-signal -Emitted when one of the "controllers" has started its "primary action". +**selectstart** **(** :ref:`int` input_source_id **)** -Use :ref:`get_controller` to get more information about the controller. +Emitted when one of the input source has started its "primary action". + +Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_session_ended: -- **session_ended** **(** **)** +.. rst-class:: classref-signal + +**session_ended** **(** **)** Emitted when the user ends the WebXR session (which can be done using UI from the browser or device). -At this point, you should do ``get_viewport().xr = false`` to instruct Godot to resume rendering to the screen. +At this point, you should do ``get_viewport().use_xr = false`` to instruct Godot to resume rendering to the screen. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_session_failed: -- **session_failed** **(** :ref:`String` message **)** +.. rst-class:: classref-signal + +**session_failed** **(** :ref:`String` message **)** Emitted by :ref:`XRInterface.initialize` if the session fails to start. \ ``message`` may optionally contain an error message from WebXR, or an empty string if no message is available. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_signal_session_started: -- **session_started** **(** **)** +.. rst-class:: classref-signal + +**session_started** **(** **)** Emitted by :ref:`XRInterface.initialize` if the session is successfully started. -At this point, it's safe to do ``get_viewport().xr = true`` to instruct Godot to start rendering to the AR/VR device. +At this point, it's safe to do ``get_viewport().use_xr = true`` to instruct Godot to start rendering to the XR device. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_session_supported: -- **session_supported** **(** :ref:`String` session_mode, :ref:`bool` supported **)** +.. rst-class:: classref-signal + +**session_supported** **(** :ref:`String` session_mode, :ref:`bool` supported **)** Emitted by :ref:`is_session_supported` to indicate if the given ``session_mode`` is supported or not. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_signal_squeeze: -- **squeeze** **(** :ref:`int` controller_id **)** +.. rst-class:: classref-signal -Emitted after one of the "controllers" has finished its "primary squeeze action". +**squeeze** **(** :ref:`int` input_source_id **)** -Use :ref:`get_controller` to get more information about the controller. +Emitted after one of the input sources has finished its "primary squeeze action". + +Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_squeezeend: -- **squeezeend** **(** :ref:`int` controller_id **)** +.. rst-class:: classref-signal -Emitted when one of the "controllers" has finished its "primary squeeze action". +**squeezeend** **(** :ref:`int` input_source_id **)** -Use :ref:`get_controller` to get more information about the controller. +Emitted when one of the input sources has finished its "primary squeeze action". + +Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_squeezestart: -- **squeezestart** **(** :ref:`int` controller_id **)** +.. rst-class:: classref-signal -Emitted when one of the "controllers" has started its "primary squeeze action". +**squeezestart** **(** :ref:`int` input_source_id **)** -Use :ref:`get_controller` to get more information about the controller. +Emitted when one of the input sources has started its "primary squeeze action". + +Use :ref:`get_input_source_tracker` and :ref:`get_input_source_target_ray_mode` to get more information about the input source. + +.. rst-class:: classref-item-separator ---- .. _class_WebXRInterface_signal_visibility_state_changed: -- **visibility_state_changed** **(** **)** +.. rst-class:: classref-signal + +**visibility_state_changed** **(** **)** Emitted when :ref:`visibility_state` has changed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WebXRInterface_TargetRayMode: + +.. rst-class:: classref-enumeration + +enum **TargetRayMode**: + +.. _class_WebXRInterface_constant_TARGET_RAY_MODE_UNKNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`TargetRayMode` **TARGET_RAY_MODE_UNKNOWN** = ``0`` + +We don't know the the target ray mode. + +.. _class_WebXRInterface_constant_TARGET_RAY_MODE_GAZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TargetRayMode` **TARGET_RAY_MODE_GAZE** = ``1`` + +Target ray originates at the viewer's eyes and points in the direction they are looking. + +.. _class_WebXRInterface_constant_TARGET_RAY_MODE_TRACKED_POINTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`TargetRayMode` **TARGET_RAY_MODE_TRACKED_POINTER** = ``2`` + +Target ray from a handheld pointer, most likely a VR touch controller. + +.. _class_WebXRInterface_constant_TARGET_RAY_MODE_SCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`TargetRayMode` **TARGET_RAY_MODE_SCREEN** = ``3`` + +Target ray from touch screen, mouse or other tactile input device. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- -.. _class_WebXRInterface_property_bounds_geometry: - -- :ref:`PackedVector3Array` **bounds_geometry** - -+----------+-----------------------+ -| *Getter* | get_bounds_geometry() | -+----------+-----------------------+ - -The vertices of a polygon which defines the boundaries of the user's play area. - -This will only be available if :ref:`reference_space_type` is ``"bounded-floor"`` and only on certain browsers and devices that support it. - -The :ref:`reference_space_reset` signal may indicate when this changes. - ----- - .. _class_WebXRInterface_property_optional_features: -- :ref:`String` **optional_features** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_optional_features(value) | -+----------+------------------------------+ -| *Getter* | get_optional_features() | -+----------+------------------------------+ +:ref:`String` **optional_features** + +.. rst-class:: classref-property-setget + +- void **set_optional_features** **(** :ref:`String` value **)** +- :ref:`String` **get_optional_features** **(** **)** A comma-seperated list of optional features used by :ref:`XRInterface.initialize` when setting up the WebXR session. @@ -302,51 +406,61 @@ This doesn't have any effect on the interface when already initialized. Possible values come from `WebXR's XRReferenceSpaceType `__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features` or :ref:`optional_features`. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_property_reference_space_type: -- :ref:`String` **reference_space_type** +.. rst-class:: classref-property -+----------+----------------------------+ -| *Getter* | get_reference_space_type() | -+----------+----------------------------+ +:ref:`String` **reference_space_type** + +.. rst-class:: classref-property-setget + +- :ref:`String` **get_reference_space_type** **(** **)** The reference space type (from the list of requested types set in the :ref:`requested_reference_space_types` property), that was ultimately used by :ref:`XRInterface.initialize` when setting up the WebXR session. Possible values come from `WebXR's XRReferenceSpaceType `__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features` or :ref:`optional_features`. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_property_requested_reference_space_types: -- :ref:`String` **requested_reference_space_types** +.. rst-class:: classref-property -+----------+--------------------------------------------+ -| *Setter* | set_requested_reference_space_types(value) | -+----------+--------------------------------------------+ -| *Getter* | get_requested_reference_space_types() | -+----------+--------------------------------------------+ +:ref:`String` **requested_reference_space_types** + +.. rst-class:: classref-property-setget + +- void **set_requested_reference_space_types** **(** :ref:`String` value **)** +- :ref:`String` **get_requested_reference_space_types** **(** **)** A comma-seperated list of reference space types used by :ref:`XRInterface.initialize` when setting up the WebXR session. -The reference space types are requested in order, and the first on supported by the users device or browser will be used. The :ref:`reference_space_type` property contains the reference space type that was ultimately used. +The reference space types are requested in order, and the first one supported by the users device or browser will be used. The :ref:`reference_space_type` property contains the reference space type that was ultimately selected. This doesn't have any effect on the interface when already initialized. Possible values come from `WebXR's XRReferenceSpaceType `__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features` or :ref:`optional_features`. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_property_required_features: -- :ref:`String` **required_features** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_required_features(value) | -+----------+------------------------------+ -| *Getter* | get_required_features() | -+----------+------------------------------+ +:ref:`String` **required_features** + +.. rst-class:: classref-property-setget + +- void **set_required_features** **(** :ref:`String` value **)** +- :ref:`String` **get_required_features** **(** **)** A comma-seperated list of required features used by :ref:`XRInterface.initialize` when setting up the WebXR session. @@ -356,17 +470,20 @@ This doesn't have any effect on the interface when already initialized. Possible values come from `WebXR's XRReferenceSpaceType `__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features` or :ref:`optional_features`. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_property_session_mode: -- :ref:`String` **session_mode** +.. rst-class:: classref-property -+----------+-------------------------+ -| *Setter* | set_session_mode(value) | -+----------+-------------------------+ -| *Getter* | get_session_mode() | -+----------+-------------------------+ +:ref:`String` **session_mode** + +.. rst-class:: classref-property-setget + +- void **set_session_mode** **(** :ref:`String` value **)** +- :ref:`String` **get_session_mode** **(** **)** The session mode used by :ref:`XRInterface.initialize` when setting up the WebXR session. @@ -374,32 +491,58 @@ This doesn't have any effect on the interface when already initialized. Possible values come from `WebXR's XRSessionMode `__, including: ``"immersive-vr"``, ``"immersive-ar"``, and ``"inline"``. +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_property_visibility_state: -- :ref:`String` **visibility_state** +.. rst-class:: classref-property -+----------+------------------------+ -| *Getter* | get_visibility_state() | -+----------+------------------------+ +:ref:`String` **visibility_state** + +.. rst-class:: classref-property-setget + +- :ref:`String` **get_visibility_state** **(** **)** Indicates if the WebXR session's imagery is visible to the user. Possible values come from `WebXR's XRVisibilityState `__, including ``"hidden"``, ``"visible"``, and ``"visible-blurred"``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- -.. _class_WebXRInterface_method_get_controller: +.. _class_WebXRInterface_method_get_input_source_target_ray_mode: -- :ref:`XRPositionalTracker` **get_controller** **(** :ref:`int` controller_id **)** |const| +.. rst-class:: classref-method -Gets an :ref:`XRPositionalTracker` for the given ``controller_id``. +:ref:`TargetRayMode` **get_input_source_target_ray_mode** **(** :ref:`int` input_source_id **)** |const| -In the context of WebXR, a "controller" 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 controller is used, interpret the position and orientation of the :ref:`XRPositionalTracker` as a ray pointing at the object the user wishes to interact with. +Returns the target ray mode for the given ``input_source_id``. -Use this method to get information about the controller that triggered one of these signals: +This can help interpret the input coming from that input source. See `XRInputSource.targetRayMode `__ for more information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WebXRInterface_method_get_input_source_tracker: + +.. rst-class:: classref-method + +:ref:`XRPositionalTracker` **get_input_source_tracker** **(** :ref:`int` input_source_id **)** |const| + +Gets an :ref:`XRPositionalTracker` 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` as a ray pointing at the object the user wishes to interact with. + +Use this method to get information about the input source that triggered one of these signals: - :ref:`selectstart`\ @@ -413,11 +556,27 @@ Use this method to get information about the controller that triggered one of th - :ref:`squeezestart` +.. rst-class:: classref-item-separator + +---- + +.. _class_WebXRInterface_method_is_input_source_active: + +.. rst-class:: classref-method + +:ref:`bool` **is_input_source_active** **(** :ref:`int` input_source_id **)** |const| + +Returns ``true`` if there is an active input source with the given ``input_source_id``. + +.. rst-class:: classref-item-separator + ---- .. _class_WebXRInterface_method_is_session_supported: -- void **is_session_supported** **(** :ref:`String` session_mode **)** +.. rst-class:: classref-method + +void **is_session_supported** **(** :ref:`String` session_mode **)** Checks if the given ``session_mode`` is supported by the user's browser. diff --git a/classes/class_window.rst b/classes/class_window.rst index b7429e14d..f23ef6ba8 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -16,214 +16,247 @@ Window Base class for all windows. +.. rst-class:: classref-introduction-group + Description ----------- -A node that creates a window. The window can either be a native system window or embedded inside another ``Window`` (see :ref:`Viewport.gui_embed_subwindows`). +A node that creates a window. The window can either be a native system window or embedded inside another **Window** (see :ref:`Viewport.gui_embed_subwindows`). -At runtime, ``Window``\ s will not close automatically when requested. You need to handle it manually using :ref:`close_requested` (this applies both to clicking close button and clicking outside popup). +At runtime, **Window**\ s will not close automatically when requested. You need to handle it manually using :ref:`close_requested` (this applies both to clicking close button and clicking outside popup). + +.. rst-class:: classref-reftable-group Properties ---------- -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`always_on_top` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`auto_translate` | ``true`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`borderless` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`ContentScaleAspect` | :ref:`content_scale_aspect` | ``0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`float` | :ref:`content_scale_factor` | ``1.0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`ContentScaleMode` | :ref:`content_scale_mode` | ``0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`Vector2i` | :ref:`content_scale_size` | ``Vector2i(0, 0)`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`int` | :ref:`current_screen` | ``0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`exclusive` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`extend_to_title` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`Vector2i` | :ref:`max_size` | ``Vector2i(0, 0)`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`Vector2i` | :ref:`min_size` | ``Vector2i(0, 0)`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`Mode` | :ref:`mode` | ``0`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`popup_window` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`Vector2i` | :ref:`position` | ``Vector2i(0, 0)`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`Vector2i` | :ref:`size` | ``Vector2i(100, 100)`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`Theme` | :ref:`theme` | | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`String` | :ref:`title` | ``""`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`transient` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`transparent` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`unfocusable` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`unresizable` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`visible` | ``true`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ -| :ref:`bool` | :ref:`wrap_controls` | ``false`` | -+-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`always_on_top` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`auto_translate` | ``true`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`borderless` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`ContentScaleAspect` | :ref:`content_scale_aspect` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`float` | :ref:`content_scale_factor` | ``1.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`ContentScaleMode` | :ref:`content_scale_mode` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`content_scale_size` | ``Vector2i(0, 0)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`int` | :ref:`current_screen` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`exclusive` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`extend_to_title` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`max_size` | ``Vector2i(0, 0)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`min_size` | ``Vector2i(0, 0)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`Mode` | :ref:`mode` | ``0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`popup_window` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`position` | ``Vector2i(0, 0)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`Vector2i` | :ref:`size` | ``Vector2i(100, 100)`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`Theme` | :ref:`theme` | | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`String` | :ref:`title` | ``""`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`transient` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`transparent` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`unfocusable` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`unresizable` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`visible` | ``true`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + | :ref:`bool` | :ref:`wrap_controls` | ``false`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------+------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_draw` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`child_controls_changed` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_contents_minimum_size` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_flag` **(** :ref:`Flags` flag **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`LayoutDirection` | :ref:`get_layout_direction` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`get_real_size` **(** **)** |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| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hide` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_embedded` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_layout_rtl` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_maximize_allowed` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_using_font_oversampling` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`move_to_foreground` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup` **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_centered` **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_centered_clamped` **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.8 **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_on_parent` **(** :ref:`Rect2i` parent_rect **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`request_attention` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reset_size` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_flag` **(** :ref:`Flags` flag, :ref:`bool` enabled **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ime_active` **(** :ref:`bool` active **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ime_position` **(** :ref:`Vector2i` position **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layout_direction` **(** :ref:`LayoutDirection` direction **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_font_oversampling` **(** :ref:`bool` enable **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`show` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_draw` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`child_controls_changed` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contents_minimum_size` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag` **(** :ref:`Flags` flag **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LayoutDirection` | :ref:`get_layout_direction` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_real_size` **(** **)** |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| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hide` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_embedded` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_layout_rtl` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_maximize_allowed` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_font_oversampling` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_to_foreground` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup` **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered` **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered_clamped` **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.8 **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_on_parent` **(** :ref:`Rect2i` parent_rect **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_attention` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reset_size` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_flag` **(** :ref:`Flags` flag, :ref:`bool` enabled **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ime_active` **(** :ref:`bool` active **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ime_position` **(** :ref:`Vector2i` position **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layout_direction` **(** :ref:`LayoutDirection` direction **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_font_oversampling` **(** :ref:`bool` enable **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`title_outline_modulate` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`close_h_offset` | ``18`` | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`close_v_offset` | ``24`` | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`resize_margin` | ``4`` | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`title_height` | ``36`` | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`title_outline_size` | ``0`` | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`title_font` | | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`title_font_size` | | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`close` | | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`close_pressed` | | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`embedded_border` | | -+-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`title_outline_modulate` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`close_h_offset` | ``18`` | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`close_v_offset` | ``24`` | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`resize_margin` | ``4`` | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`title_height` | ``36`` | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`title_outline_size` | ``0`` | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`title_font` | | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`title_font_size` | | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`close` | | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`close_pressed` | | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`embedded_border` | | + +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_Window_signal_about_to_popup: -- **about_to_popup** **(** **)** +.. rst-class:: classref-signal -Emitted right after :ref:`popup` call, before the ``Window`` appears or does anything. +**about_to_popup** **(** **)** + +Emitted right after :ref:`popup` call, before the **Window** appears or does anything. + +.. rst-class:: classref-item-separator ---- .. _class_Window_signal_close_requested: -- **close_requested** **(** **)** +.. rst-class:: classref-signal -Emitted when the ``Window``'s close button is pressed or when :ref:`popup_window` is enabled and user clicks outside the window. +**close_requested** **(** **)** + +Emitted when the **Window**'s close button is pressed or when :ref:`popup_window` is enabled and user clicks outside the window. This signal can be used to handle window closing, e.g. by connecting it to :ref:`hide`. +.. rst-class:: classref-item-separator + ---- .. _class_Window_signal_files_dropped: -- **files_dropped** **(** :ref:`PackedStringArray` files **)** +.. rst-class:: classref-signal + +**files_dropped** **(** :ref:`PackedStringArray` files **)** Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths. -Note that this method only works with non-embedded windows, i.e. the main window and ``Window``-derived nodes when :ref:`Viewport.gui_embed_subwindows` is disabled in the main viewport. +Note that this method only works with non-embedded windows, i.e. the main window and **Window**-derived nodes when :ref:`Viewport.gui_embed_subwindows` is disabled in the main viewport. Example usage: @@ -235,229 +268,403 @@ Example usage: func on_files_dropped(files): print(files) +.. rst-class:: classref-item-separator + ---- .. _class_Window_signal_focus_entered: -- **focus_entered** **(** **)** +.. rst-class:: classref-signal -Emitted when the ``Window`` gains focus. +**focus_entered** **(** **)** + +Emitted when the **Window** gains focus. + +.. rst-class:: classref-item-separator ---- .. _class_Window_signal_focus_exited: -- **focus_exited** **(** **)** +.. rst-class:: classref-signal -Emitted when the ``Window`` loses its focus. +**focus_exited** **(** **)** + +Emitted when the **Window** loses its focus. + +.. rst-class:: classref-item-separator ---- .. _class_Window_signal_go_back_requested: -- **go_back_requested** **(** **)** +.. rst-class:: classref-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`. +.. rst-class:: classref-item-separator + ---- .. _class_Window_signal_mouse_entered: -- **mouse_entered** **(** **)** +.. rst-class:: classref-signal -Emitted when the mouse cursor enters the ``Window``'s area, regardless if it's currently focused or not. +**mouse_entered** **(** **)** + +Emitted when the mouse cursor enters the **Window**'s area, regardless if it's currently focused or not. + +.. rst-class:: classref-item-separator ---- .. _class_Window_signal_mouse_exited: -- **mouse_exited** **(** **)** +.. rst-class:: classref-signal -Emitted when the mouse cursor exits the ``Window``'s area (including when it's hovered over another window on top of this one). +**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). + +.. rst-class:: classref-item-separator ---- .. _class_Window_signal_theme_changed: -- **theme_changed** **(** **)** +.. rst-class:: classref-signal + +**theme_changed** **(** **)** Emitted when the :ref:`NOTIFICATION_THEME_CHANGED` notification is sent. +.. rst-class:: classref-item-separator + ---- .. _class_Window_signal_titlebar_changed: -- **titlebar_changed** **(** **)** +.. rst-class:: classref-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. +.. rst-class:: classref-item-separator + ---- .. _class_Window_signal_visibility_changed: -- **visibility_changed** **(** **)** +.. rst-class:: classref-signal -Emitted when ``Window`` is made visible or disappears. +**visibility_changed** **(** **)** + +Emitted when **Window** is made visible or disappears. + +.. rst-class:: classref-item-separator ---- .. _class_Window_signal_window_input: -- **window_input** **(** :ref:`InputEvent` event **)** +.. rst-class:: classref-signal -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. +**window_input** **(** :ref:`InputEvent` event **)** + +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. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_Window_Mode: -.. _class_Window_constant_MODE_WINDOWED: - -.. _class_Window_constant_MODE_MINIMIZED: - -.. _class_Window_constant_MODE_MAXIMIZED: - -.. _class_Window_constant_MODE_FULLSCREEN: - -.. _class_Window_constant_MODE_EXCLUSIVE_FULLSCREEN: +.. rst-class:: classref-enumeration enum **Mode**: -- **MODE_WINDOWED** = **0** --- Windowed mode, i.e. ``Window`` doesn't occupy the whole screen (unless set to the size of the screen). +.. _class_Window_constant_MODE_WINDOWED: -- **MODE_MINIMIZED** = **1** --- Minimized window mode, i.e. ``Window`` is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. +.. rst-class:: classref-enumeration-constant -- **MODE_MAXIMIZED** = **2** --- Maximized window mode, i.e. ``Window`` will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed. +:ref:`Mode` **MODE_WINDOWED** = ``0`` -- **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. +Windowed mode, i.e. **Window** doesn't occupy the whole screen (unless set to the size of the screen). + +.. _class_Window_constant_MODE_MINIMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_MINIMIZED** = ``1`` + +Minimized window mode, i.e. **Window** is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. + +.. _class_Window_constant_MODE_MAXIMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **MODE_MAXIMIZED** = ``2`` + +Maximized window mode, i.e. **Window** will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed. + +.. _class_Window_constant_MODE_FULLSCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`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. 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. -- **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_EXCLUSIVE_FULLSCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`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`. 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. 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 + ---- .. _enum_Window_Flags: -.. _class_Window_constant_FLAG_RESIZE_DISABLED: - -.. _class_Window_constant_FLAG_BORDERLESS: - -.. _class_Window_constant_FLAG_ALWAYS_ON_TOP: - -.. _class_Window_constant_FLAG_TRANSPARENT: - -.. _class_Window_constant_FLAG_NO_FOCUS: - -.. _class_Window_constant_FLAG_POPUP: - -.. _class_Window_constant_FLAG_EXTEND_TO_TITLE: - -.. _class_Window_constant_FLAG_MAX: +.. rst-class:: classref-enumeration enum **Flags**: -- **FLAG_RESIZE_DISABLED** = **0** --- The window can't be resizing by dragging its resize grip. It's still possible to resize the window using :ref:`size`. This flag is ignored for full screen windows. Set with :ref:`unresizable`. +.. _class_Window_constant_FLAG_RESIZE_DISABLED: -- **FLAG_BORDERLESS** = **1** --- The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with :ref:`borderless`. +.. rst-class:: classref-enumeration-constant -- **FLAG_ALWAYS_ON_TOP** = **2** --- The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with :ref:`always_on_top`. +:ref:`Flags` **FLAG_RESIZE_DISABLED** = ``0`` -- **FLAG_TRANSPARENT** = **3** --- The window background can be transparent. +The window can't be resizing by dragging its resize grip. It's still possible to resize the window using :ref:`size`. This flag is ignored for full screen windows. Set with :ref:`unresizable`. + +.. _class_Window_constant_FLAG_BORDERLESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_BORDERLESS** = ``1`` + +The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with :ref:`borderless`. + +.. _class_Window_constant_FLAG_ALWAYS_ON_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_ALWAYS_ON_TOP** = ``2`` + +The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with :ref:`always_on_top`. + +.. _class_Window_constant_FLAG_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_TRANSPARENT** = ``3`` + +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``. Set with :ref:`transparent`. -- **FLAG_NO_FOCUS** = **4** --- The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with :ref:`unfocusable`. +.. _class_Window_constant_FLAG_NO_FOCUS: -- **FLAG_POPUP** = **5** --- Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have ``transient parent`` set (see :ref:`transient`). +.. rst-class:: classref-enumeration-constant -- **FLAG_EXTEND_TO_TITLE** = **6** --- Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with :ref:`extend_to_title`. +:ref:`Flags` **FLAG_NO_FOCUS** = ``4`` + +The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with :ref:`unfocusable`. + +.. _class_Window_constant_FLAG_POPUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_POPUP** = ``5`` + +Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have ``transient parent`` set (see :ref:`transient`). + +.. _class_Window_constant_FLAG_EXTEND_TO_TITLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_EXTEND_TO_TITLE** = ``6`` + +Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with :ref:`extend_to_title`. \ **Note:** This flag is implemented on macOS. -- **FLAG_MAX** = **7** --- Max value of the :ref:`Flags`. +.. _class_Window_constant_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_MAX** = ``7`` + +Max value of the :ref:`Flags`. + +.. rst-class:: classref-item-separator ---- .. _enum_Window_ContentScaleMode: -.. _class_Window_constant_CONTENT_SCALE_MODE_DISABLED: - -.. _class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS: - -.. _class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT: +.. rst-class:: classref-enumeration enum **ContentScaleMode**: -- **CONTENT_SCALE_MODE_DISABLED** = **0** --- The content will not be scaled to match the ``Window``'s size. +.. _class_Window_constant_CONTENT_SCALE_MODE_DISABLED: -- **CONTENT_SCALE_MODE_CANVAS_ITEMS** = **1** --- The content will be rendered at the target size. This is more performance-expensive than :ref:`CONTENT_SCALE_MODE_VIEWPORT`, but provides better results. +.. rst-class:: classref-enumeration-constant -- **CONTENT_SCALE_MODE_VIEWPORT** = **2** --- The content will be rendered at the base size and then scaled to the target size. More performant than :ref:`CONTENT_SCALE_MODE_CANVAS_ITEMS`, but results in pixelated image. +:ref:`ContentScaleMode` **CONTENT_SCALE_MODE_DISABLED** = ``0`` + +The content will not be scaled to match the **Window**'s size. + +.. _class_Window_constant_CONTENT_SCALE_MODE_CANVAS_ITEMS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleMode` **CONTENT_SCALE_MODE_CANVAS_ITEMS** = ``1`` + +The content will be rendered at the target size. This is more performance-expensive than :ref:`CONTENT_SCALE_MODE_VIEWPORT`, but provides better results. + +.. _class_Window_constant_CONTENT_SCALE_MODE_VIEWPORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleMode` **CONTENT_SCALE_MODE_VIEWPORT** = ``2`` + +The content will be rendered at the base size and then scaled to the target size. More performant than :ref:`CONTENT_SCALE_MODE_CANVAS_ITEMS`, but results in pixelated image. + +.. rst-class:: classref-item-separator ---- .. _enum_Window_ContentScaleAspect: -.. _class_Window_constant_CONTENT_SCALE_ASPECT_IGNORE: - -.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP: - -.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_WIDTH: - -.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_HEIGHT: - -.. _class_Window_constant_CONTENT_SCALE_ASPECT_EXPAND: +.. rst-class:: classref-enumeration enum **ContentScaleAspect**: -- **CONTENT_SCALE_ASPECT_IGNORE** = **0** --- The aspect will be ignored. Scaling will simply stretch the content to fit the target size. +.. _class_Window_constant_CONTENT_SCALE_ASPECT_IGNORE: -- **CONTENT_SCALE_ASPECT_KEEP** = **1** --- The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides. +.. rst-class:: classref-enumeration-constant -- **CONTENT_SCALE_ASPECT_KEEP_WIDTH** = **2** --- The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides. +:ref:`ContentScaleAspect` **CONTENT_SCALE_ASPECT_IGNORE** = ``0`` -- **CONTENT_SCALE_ASPECT_KEEP_HEIGHT** = **3** --- The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides. +The aspect will be ignored. Scaling will simply stretch the content to fit the target size. -- **CONTENT_SCALE_ASPECT_EXPAND** = **4** --- The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space. +.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleAspect` **CONTENT_SCALE_ASPECT_KEEP** = ``1`` + +The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides. + +.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_WIDTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleAspect` **CONTENT_SCALE_ASPECT_KEEP_WIDTH** = ``2`` + +The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides. + +.. _class_Window_constant_CONTENT_SCALE_ASPECT_KEEP_HEIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleAspect` **CONTENT_SCALE_ASPECT_KEEP_HEIGHT** = ``3`` + +The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides. + +.. _class_Window_constant_CONTENT_SCALE_ASPECT_EXPAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleAspect` **CONTENT_SCALE_ASPECT_EXPAND** = ``4`` + +The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space. + +.. rst-class:: classref-item-separator ---- .. _enum_Window_LayoutDirection: -.. _class_Window_constant_LAYOUT_DIRECTION_INHERITED: - -.. _class_Window_constant_LAYOUT_DIRECTION_LOCALE: - -.. _class_Window_constant_LAYOUT_DIRECTION_LTR: - -.. _class_Window_constant_LAYOUT_DIRECTION_RTL: +.. rst-class:: classref-enumeration enum **LayoutDirection**: -- **LAYOUT_DIRECTION_INHERITED** = **0** --- Automatic layout direction, determined from the parent window layout direction. +.. _class_Window_constant_LAYOUT_DIRECTION_INHERITED: -- **LAYOUT_DIRECTION_LOCALE** = **1** --- Automatic layout direction, determined from the current locale. +.. rst-class:: classref-enumeration-constant -- **LAYOUT_DIRECTION_LTR** = **2** --- Left-to-right layout direction. +:ref:`LayoutDirection` **LAYOUT_DIRECTION_INHERITED** = ``0`` -- **LAYOUT_DIRECTION_RTL** = **3** --- Right-to-left layout direction. +Automatic layout direction, determined from the parent window layout direction. + +.. _class_Window_constant_LAYOUT_DIRECTION_LOCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_LOCALE** = ``1`` + +Automatic layout direction, determined from the current locale. + +.. _class_Window_constant_LAYOUT_DIRECTION_LTR: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_LTR** = ``2`` + +Left-to-right layout direction. + +.. _class_Window_constant_LAYOUT_DIRECTION_RTL: + +.. rst-class:: classref-enumeration-constant + +:ref:`LayoutDirection` **LAYOUT_DIRECTION_RTL** = ``3`` + +Right-to-left layout direction. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Constants --------- .. _class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED: +.. rst-class:: classref-constant + +**NOTIFICATION_VISIBILITY_CHANGED** = ``30`` + +Emitted when **Window**'s visibility changes, right before :ref:`visibility_changed`. + .. _class_Window_constant_NOTIFICATION_THEME_CHANGED: -- **NOTIFICATION_VISIBILITY_CHANGED** = **30** --- Emitted when ``Window``'s visibility changes, right before :ref:`visibility_changed`. +.. rst-class:: classref-constant -- **NOTIFICATION_THEME_CHANGED** = **32** --- Sent when the node needs to refresh its theme items. This happens in one of the following cases: +**NOTIFICATION_THEME_CHANGED** = ``32`` + +Sent when the node needs to refresh its theme items. This happens in one of the following cases: - The :ref:`theme` property is changed on this node or any of its ancestors. @@ -467,910 +674,1137 @@ Constants \ **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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- .. _class_Window_property_always_on_top: -- :ref:`bool` **always_on_top** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **always_on_top** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, the window will be on top of all other windows. Does not work if :ref:`transient` is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_auto_translate: -- :ref:`bool` **auto_translate** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``true`` | -+-----------+---------------------------+ -| *Setter* | set_auto_translate(value) | -+-----------+---------------------------+ -| *Getter* | is_auto_translating() | -+-----------+---------------------------+ +:ref:`bool` **auto_translate** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_auto_translate** **(** :ref:`bool` value **)** +- :ref:`bool` **is_auto_translating** **(** **)** Toggles if any text should automatically change to its translated version depending on the current locale. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_borderless: -- :ref:`bool` **borderless** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **borderless** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, the window will have no borders. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_content_scale_aspect: -- :ref:`ContentScaleAspect` **content_scale_aspect** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------+ -| *Setter* | set_content_scale_aspect(value) | -+-----------+---------------------------------+ -| *Getter* | get_content_scale_aspect() | -+-----------+---------------------------------+ +:ref:`ContentScaleAspect` **content_scale_aspect** = ``0`` -Specifies how the content's aspect behaves when the ``Window`` is resized. The base aspect is determined by :ref:`content_scale_size`. +.. rst-class:: classref-property-setget + +- void **set_content_scale_aspect** **(** :ref:`ContentScaleAspect` value **)** +- :ref:`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`. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_content_scale_factor: -- :ref:`float` **content_scale_factor** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------------------+ -| *Setter* | set_content_scale_factor(value) | -+-----------+---------------------------------+ -| *Getter* | get_content_scale_factor() | -+-----------+---------------------------------+ +:ref:`float` **content_scale_factor** = ``1.0`` -Specifies the base scale of ``Window``'s content when its :ref:`size` is equal to :ref:`content_scale_size`. +.. rst-class:: classref-property-setget + +- void **set_content_scale_factor** **(** :ref:`float` value **)** +- :ref:`float` **get_content_scale_factor** **(** **)** + +Specifies the base scale of **Window**'s content when its :ref:`size` is equal to :ref:`content_scale_size`. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_content_scale_mode: -- :ref:`ContentScaleMode` **content_scale_mode** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------------+ -| *Setter* | set_content_scale_mode(value) | -+-----------+-------------------------------+ -| *Getter* | get_content_scale_mode() | -+-----------+-------------------------------+ +:ref:`ContentScaleMode` **content_scale_mode** = ``0`` -Specifies how the content is scaled when the ``Window`` is resized. +.. rst-class:: classref-property-setget + +- void **set_content_scale_mode** **(** :ref:`ContentScaleMode` value **)** +- :ref:`ContentScaleMode` **get_content_scale_mode** **(** **)** + +Specifies how the content is scaled when the **Window** is resized. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_content_scale_size: -- :ref:`Vector2i` **content_scale_size** +.. rst-class:: classref-property -+-----------+-------------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+-------------------------------+ -| *Setter* | set_content_scale_size(value) | -+-----------+-------------------------------+ -| *Getter* | get_content_scale_size() | -+-----------+-------------------------------+ +:ref:`Vector2i` **content_scale_size** = ``Vector2i(0, 0)`` -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. +.. rst-class:: classref-property-setget + +- void **set_content_scale_size** **(** :ref:`Vector2i` value **)** +- :ref:`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. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_current_screen: -- :ref:`int` **current_screen** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_current_screen(value) | -+-----------+---------------------------+ -| *Getter* | get_current_screen() | -+-----------+---------------------------+ +:ref:`int` **current_screen** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_current_screen** **(** :ref:`int` value **)** +- :ref:`int` **get_current_screen** **(** **)** The screen the window is currently on. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_exclusive: -- :ref:`bool` **exclusive** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_exclusive(value) | -+-----------+----------------------+ -| *Getter* | is_exclusive() | -+-----------+----------------------+ +:ref:`bool` **exclusive** = ``false`` -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``. +.. rst-class:: classref-property-setget + +- void **set_exclusive** **(** :ref:`bool` value **)** +- :ref:`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**. Needs :ref:`transient` enabled to work. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_extend_to_title: -- :ref:`bool` **extend_to_title** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **extend_to_title** = ``false`` -If ``true``, the ``Window`` contents is expanded to the full size of the window, window title bar is transparent. +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| + +If ``true``, the **Window** contents is expanded to the full size of the window, window title bar is transparent. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_max_size: -- :ref:`Vector2i` **max_size** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_max_size(value) | -+-----------+---------------------+ -| *Getter* | get_max_size() | -+-----------+---------------------+ +:ref:`Vector2i` **max_size** = ``Vector2i(0, 0)`` -If non-zero, the ``Window`` can't be resized to be bigger than this size. +.. rst-class:: classref-property-setget + +- void **set_max_size** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_max_size** **(** **)** + +If non-zero, the **Window** can't be resized to be bigger than this size. \ **Note:** This property will be ignored if the value is lower than :ref:`min_size`. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_min_size: -- :ref:`Vector2i` **min_size** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_min_size(value) | -+-----------+---------------------+ -| *Getter* | get_min_size() | -+-----------+---------------------+ +:ref:`Vector2i` **min_size** = ``Vector2i(0, 0)`` -If non-zero, the ``Window`` can't be resized to be smaller than this size. +.. rst-class:: classref-property-setget + +- void **set_min_size** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_min_size** **(** **)** + +If non-zero, the **Window** can't be resized to be smaller than this size. \ **Note:** This property will be ignored in favor of :ref:`get_contents_minimum_size` if :ref:`wrap_controls` is enabled and if its size is bigger. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_mode: -- :ref:`Mode` **mode** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_mode(value) | -+-----------+-----------------+ -| *Getter* | get_mode() | -+-----------+-----------------+ +:ref:`Mode` **mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mode** **(** :ref:`Mode` value **)** +- :ref:`Mode` **get_mode** **(** **)** Set's the window's current mode. \ **Note:** Fullscreen mode is not exclusive full screen on Windows and Linux. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_popup_window: -- :ref:`bool` **popup_window** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **popup_window** = ``false`` -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` is enabled). +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |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` is enabled). + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_position: -- :ref:`Vector2i` **position** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+---------------------+ -| *Setter* | set_position(value) | -+-----------+---------------------+ -| *Getter* | get_position() | -+-----------+---------------------+ +:ref:`Vector2i` **position** = ``Vector2i(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_position** **(** **)** The window's position in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_size: -- :ref:`Vector2i` **size** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``Vector2i(100, 100)`` | -+-----------+------------------------+ -| *Setter* | set_size(value) | -+-----------+------------------------+ -| *Getter* | get_size() | -+-----------+------------------------+ +:ref:`Vector2i` **size** = ``Vector2i(100, 100)`` + +.. rst-class:: classref-property-setget + +- void **set_size** **(** :ref:`Vector2i` value **)** +- :ref:`Vector2i` **get_size** **(** **)** The window's size in pixels. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_theme: -- :ref:`Theme` **theme** +.. rst-class:: classref-property -+----------+------------------+ -| *Setter* | set_theme(value) | -+----------+------------------+ -| *Getter* | get_theme() | -+----------+------------------+ +:ref:`Theme` **theme** + +.. rst-class:: classref-property-setget + +- void **set_theme** **(** :ref:`Theme` value **)** +- :ref:`Theme` **get_theme** **(** **)** The :ref:`Theme` resource that determines the style of the underlying :ref:`Control` nodes. -\ ``Window`` styles will have no effect unless the window is embedded. +\ **Window** styles will have no effect unless the window is embedded. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_theme_type_variation: -- :ref:`StringName` **theme_type_variation** +.. rst-class:: classref-property -+-----------+---------------------------------+ -| *Default* | ``&""`` | -+-----------+---------------------------------+ -| *Setter* | set_theme_type_variation(value) | -+-----------+---------------------------------+ -| *Getter* | get_theme_type_variation() | -+-----------+---------------------------------+ +:ref:`StringName` **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` for more details. +.. rst-class:: classref-property-setget + +- void **set_theme_type_variation** **(** :ref:`StringName` value **)** +- :ref:`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` for more details. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_title: -- :ref:`String` **title** +.. rst-class:: classref-property -+-----------+------------------+ -| *Default* | ``""`` | -+-----------+------------------+ -| *Setter* | set_title(value) | -+-----------+------------------+ -| *Getter* | get_title() | -+-----------+------------------+ +:ref:`String` **title** = ``""`` -The window's title. If the ``Window`` is non-embedded, title styles set in :ref:`Theme` will have no effect. +.. rst-class:: classref-property-setget + +- void **set_title** **(** :ref:`String` value **)** +- :ref:`String` **get_title** **(** **)** + +The window's title. If the **Window** is non-embedded, title styles set in :ref:`Theme` will have no effect. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_transient: -- :ref:`bool` **transient** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_transient(value) | -+-----------+----------------------+ -| *Getter* | is_transient() | -+-----------+----------------------+ +:ref:`bool` **transient** = ``false`` -If ``true``, the ``Window`` is transient, i.e. it's considered a child of another ``Window``. 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. +.. rst-class:: classref-property-setget + +- void **set_transient** **(** :ref:`bool` value **)** +- :ref:`bool` **is_transient** **(** **)** + +If ``true``, the **Window** is transient, i.e. it's considered a child of another **Window**. 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. Note that behavior might be different depending on the platform. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_transparent: -- :ref:`bool` **transparent** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **transparent** = ``false`` -If ``true``, the ``Window``'s background can be transparent. This is best used with embedded windows. +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| + +If ``true``, the **Window**'s background can be transparent. This is best used with embedded windows. \ **Note:** For native windows, this flag has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed` is set to ``false``. \ **Note:** Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_unfocusable: -- :ref:`bool` **unfocusable** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **unfocusable** = ``false`` -If ``true``, the ``Window`` can't be focused nor interacted with. It can still be visible. +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| + +If ``true``, the **Window** can't be focused nor interacted with. It can still be visible. + +.. rst-class:: classref-item-separator ---- .. _class_Window_property_unresizable: -- :ref:`bool` **unresizable** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ +:ref:`bool` **unresizable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| If ``true``, the window can't be resized. Minimize and maximize buttons are disabled. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_visible: -- :ref:`bool` **visible** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``true`` | -+-----------+--------------------+ -| *Setter* | set_visible(value) | -+-----------+--------------------+ -| *Getter* | is_visible() | -+-----------+--------------------+ +:ref:`bool` **visible** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **is_visible** **(** **)** If ``true``, the window is visible. +.. rst-class:: classref-item-separator + ---- .. _class_Window_property_wrap_controls: -- :ref:`bool` **wrap_controls** +.. rst-class:: classref-property -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_wrap_controls(value) | -+-----------+--------------------------+ -| *Getter* | is_wrapping_controls() | -+-----------+--------------------------+ +:ref:`bool` **wrap_controls** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_wrap_controls** **(** :ref:`bool` value **)** +- :ref:`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` if the new size is bigger. If ``false``, you need to call :ref:`child_controls_changed` manually. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_Window_method_can_draw: -- :ref:`bool` **can_draw** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **can_draw** **(** **)** |const| Returns whether the window is being drawn to the screen. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_child_controls_changed: -- void **child_controls_changed** **(** **)** +.. rst-class:: classref-method -Requests an update of the ``Window`` size to fit underlying :ref:`Control` nodes. +void **child_controls_changed** **(** **)** + +Requests an update of the **Window** size to fit underlying :ref:`Control` nodes. + +.. rst-class:: classref-item-separator ---- .. _class_Window_method_get_contents_minimum_size: -- :ref:`Vector2` **get_contents_minimum_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_contents_minimum_size** **(** **)** |const| Returns the combined minimum size from the child :ref:`Control` nodes of the window. Use :ref:`child_controls_changed` to update it when children nodes have changed. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_flag: -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| Returns ``true`` if the ``flag`` is set. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_layout_direction: -- :ref:`LayoutDirection` **get_layout_direction** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`LayoutDirection` **get_layout_direction** **(** **)** |const| Returns layout direction and text writing direction. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_real_size: -- :ref:`Vector2i` **get_real_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2i` **get_real_size** **(** **)** |const| Returns the window's size including its border. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_color: -- :ref:`Color` **get_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`Color` **get_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns the :ref:`Color` at ``name`` if the theme has ``theme_type``. See :ref:`Control.get_theme_color` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_constant: -- :ref:`int` **get_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns the constant at ``name`` if the theme has ``theme_type``. See :ref:`Control.get_theme_color` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_default_base_scale: -- :ref:`float` **get_theme_default_base_scale** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_theme_default_base_scale** **(** **)** |const| Returns the default base scale defined in the attached :ref:`Theme`. See :ref:`Theme.default_base_scale` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_default_font: -- :ref:`Font` **get_theme_default_font** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Font` **get_theme_default_font** **(** **)** |const| Returns the default :ref:`Font` defined in the attached :ref:`Theme`. See :ref:`Theme.default_font` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_default_font_size: -- :ref:`int` **get_theme_default_font_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_theme_default_font_size** **(** **)** |const| Returns the default font size defined in the attached :ref:`Theme`. See :ref:`Theme.default_font_size` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_font: -- :ref:`Font` **get_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`Font` **get_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns the :ref:`Font` at ``name`` if the theme has ``theme_type``. See :ref:`Control.get_theme_color` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_font_size: -- :ref:`int` **get_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns the font size at ``name`` if the theme has ``theme_type``. See :ref:`Control.get_theme_color` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_icon: -- :ref:`Texture2D` **get_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`Texture2D` **get_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns the icon at ``name`` if the theme has ``theme_type``. See :ref:`Control.get_theme_color` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_get_theme_stylebox: -- :ref:`StyleBox` **get_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`StyleBox` **get_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns the :ref:`StyleBox` at ``name`` if the theme has ``theme_type``. See :ref:`Control.get_theme_color` for more details. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_grab_focus: -- void **grab_focus** **(** **)** +.. rst-class:: classref-method + +void **grab_focus** **(** **)** Causes the window to grab focus, allowing it to receive user input. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_has_focus: -- :ref:`bool` **has_focus** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_focus** **(** **)** |const| Returns ``true`` if the window is focused. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_has_theme_color: -- :ref:`bool` **has_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if :ref:`Color` with ``name`` is in ``theme_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_has_theme_constant: -- :ref:`bool` **has_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if constant with ``name`` is in ``theme_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_has_theme_font: -- :ref:`bool` **has_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if :ref:`Font` with ``name`` is in ``theme_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_has_theme_font_size: -- :ref:`bool` **has_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if font size with ``name`` is in ``theme_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_has_theme_icon: -- :ref:`bool` **has_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if icon with ``name`` is in ``theme_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_has_theme_stylebox: -- :ref:`bool` **has_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| Returns ``true`` if :ref:`StyleBox` with ``name`` is in ``theme_type``. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_hide: -- void **hide** **(** **)** +.. rst-class:: classref-method + +void **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`. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_is_embedded: -- :ref:`bool` **is_embedded** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_embedded** **(** **)** |const| Returns ``true`` if the window is currently embedded in another window. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_is_layout_rtl: -- :ref:`bool` **is_layout_rtl** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_layout_rtl** **(** **)** |const| Returns ``true`` if layout is right-to-left. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_is_maximize_allowed: -- :ref:`bool` **is_maximize_allowed** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_maximize_allowed** **(** **)** |const| Returns ``true`` if the window can be maximized (the maximize button is enabled). +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_is_using_font_oversampling: -- :ref:`bool` **is_using_font_oversampling** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_using_font_oversampling** **(** **)** |const| Returns ``true`` if font oversampling is enabled. See :ref:`set_use_font_oversampling`. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_move_to_foreground: -- void **move_to_foreground** **(** **)** +.. rst-class:: classref-method -Moves the ``Window`` on top of other windows and focuses it. +void **move_to_foreground** **(** **)** + +Moves the **Window** on top of other windows and focuses it. + +.. rst-class:: classref-item-separator ---- .. _class_Window_method_popup: -- void **popup** **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** +.. rst-class:: classref-method -Shows the ``Window`` and makes it transient (see :ref:`transient`). If ``rect`` is provided, it will be set as the ``Window``'s size. +void **popup** **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** + +Shows the **Window** and makes it transient (see :ref:`transient`). If ``rect`` is provided, it will be set as the **Window**'s size. Fails if called on the main window. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_popup_centered: -- void **popup_centered** **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** +.. rst-class:: classref-method -Popups the ``Window`` at the center of the current screen, with optionally given minimum size. +void **popup_centered** **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** -If the ``Window`` is embedded, it will be centered in the parent :ref:`Viewport` instead. +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` instead. + +.. rst-class:: classref-item-separator ---- .. _class_Window_method_popup_centered_clamped: -- void **popup_centered_clamped** **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** +.. rst-class:: classref-method -Popups the ``Window`` centered inside its parent ``Window``. +void **popup_centered_clamped** **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** -\ ``fallback_ratio`` determines the maximum size of the ``Window``, in relation to its parent. +Popups the **Window** centered inside its parent **Window**. + +\ ``fallback_ratio`` determines the maximum size of the **Window**, in relation to its parent. + +.. rst-class:: classref-item-separator ---- .. _class_Window_method_popup_centered_ratio: -- void **popup_centered_ratio** **(** :ref:`float` ratio=0.8 **)** +.. rst-class:: classref-method -Popups the ``Window`` centered inside its parent ``Window`` and sets its size as a ``ratio`` of parent's size. +void **popup_centered_ratio** **(** :ref:`float` ratio=0.8 **)** + +Popups the **Window** centered inside its parent **Window** and sets its size as a ``ratio`` of parent's size. + +.. rst-class:: classref-item-separator ---- .. _class_Window_method_popup_on_parent: -- void **popup_on_parent** **(** :ref:`Rect2i` parent_rect **)** +.. rst-class:: classref-method -Popups the ``Window`` with a position shifted by parent ``Window``'s position. +void **popup_on_parent** **(** :ref:`Rect2i` parent_rect **)** -If the ``Window`` is embedded, has the same effect as :ref:`popup`. +Popups the **Window** with a position shifted by parent **Window**'s position. + +If the **Window** is embedded, has the same effect as :ref:`popup`. + +.. rst-class:: classref-item-separator ---- .. _class_Window_method_request_attention: -- void **request_attention** **(** **)** +.. rst-class:: classref-method -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. +void **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. + +.. rst-class:: classref-item-separator ---- .. _class_Window_method_reset_size: -- void **reset_size** **(** **)** +.. rst-class:: classref-method + +void **reset_size** **(** **)** Resets the size to the minimum size, which is the max of :ref:`min_size` and (if :ref:`wrap_controls` is enabled) :ref:`get_contents_minimum_size`. This is equivalent to calling ``set_size(Vector2i())`` (or any size below the minimum). +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_set_flag: -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** +.. rst-class:: classref-method + +void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** Sets a specified window flag. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_set_ime_active: -- void **set_ime_active** **(** :ref:`bool` active **)** +.. rst-class:: classref-method + +void **set_ime_active** **(** :ref:`bool` active **)** If ``active`` is ``true``, enables system's native IME (Input Method Editor). +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_set_ime_position: -- void **set_ime_position** **(** :ref:`Vector2i` position **)** +.. rst-class:: classref-method + +void **set_ime_position** **(** :ref:`Vector2i` position **)** Moves IME to the given position. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_set_layout_direction: -- void **set_layout_direction** **(** :ref:`LayoutDirection` direction **)** +.. rst-class:: classref-method + +void **set_layout_direction** **(** :ref:`LayoutDirection` direction **)** Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_set_use_font_oversampling: -- void **set_use_font_oversampling** **(** :ref:`bool` enable **)** +.. rst-class:: classref-method + +void **set_use_font_oversampling** **(** :ref:`bool` enable **)** Enables font oversampling. This makes fonts look better when they are scaled up. +.. rst-class:: classref-item-separator + ---- .. _class_Window_method_show: -- void **show** **(** **)** +.. rst-class:: classref-method -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`). +void **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`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_Window_theme_color_title_color: -- :ref:`Color` **title_color** +.. rst-class:: classref-themeproperty -+-----------+-----------------------------------+ -| *Default* | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------+-----------------------------------+ +:ref:`Color` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` The color of the title's text. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_color_title_outline_modulate: -- :ref:`Color` **title_outline_modulate** +.. rst-class:: classref-themeproperty -+-----------+-----------------------+ -| *Default* | ``Color(1, 1, 1, 1)`` | -+-----------+-----------------------+ +:ref:`Color` **title_outline_modulate** = ``Color(1, 1, 1, 1)`` The color of the title's text outline. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_constant_close_h_offset: -- :ref:`int` **close_h_offset** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``18`` | -+-----------+--------+ +:ref:`int` **close_h_offset** = ``18`` Horizontal position offset of the close button. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_constant_close_v_offset: -- :ref:`int` **close_v_offset** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``24`` | -+-----------+--------+ +:ref:`int` **close_v_offset** = ``24`` Vertical position offset of the close button. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_constant_resize_margin: -- :ref:`int` **resize_margin** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ +:ref:`int` **resize_margin** = ``4`` Defines the outside margin at which the window border can be grabbed with mouse and resized. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_constant_title_height: -- :ref:`int` **title_height** +.. rst-class:: classref-themeproperty -+-----------+--------+ -| *Default* | ``36`` | -+-----------+--------+ +:ref:`int` **title_height** = ``36`` Height of the title bar. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_constant_title_outline_size: -- :ref:`int` **title_outline_size** +.. rst-class:: classref-themeproperty -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ +:ref:`int` **title_outline_size** = ``0`` The size of the title outline. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_font_title_font: -- :ref:`Font` **title_font** +.. rst-class:: classref-themeproperty + +:ref:`Font` **title_font** The font used to draw the title. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_font_size_title_font_size: -- :ref:`int` **title_font_size** +.. rst-class:: classref-themeproperty + +:ref:`int` **title_font_size** The size of the title font. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_icon_close: -- :ref:`Texture2D` **close** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **close** The icon for the close button. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_icon_close_pressed: -- :ref:`Texture2D` **close_pressed** +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **close_pressed** The icon for the close button when it's being pressed. +.. rst-class:: classref-item-separator + ---- .. _class_Window_theme_style_embedded_border: -- :ref:`StyleBox` **embedded_border** +.. rst-class:: classref-themeproperty -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`. +:ref:`StyleBox` **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`. \ **Note:** The content background will not be visible unless :ref:`transparent` is enabled. diff --git a/classes/class_workerthreadpool.rst b/classes/class_workerthreadpool.rst index ea025e982..0c53c112c 100644 --- a/classes/class_workerthreadpool.rst +++ b/classes/class_workerthreadpool.rst @@ -16,91 +16,128 @@ WorkerThreadPool There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-reftable-group + Methods ------- -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_group_task` **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`add_task` **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_group_processed_element_count` **(** :ref:`int` group_id **)** |const| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_group_task_completed` **(** :ref:`int` group_id **)** |const| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_task_completed` **(** :ref:`int` task_id **)** |const| | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`wait_for_group_task_completion` **(** :ref:`int` group_id **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`wait_for_task_completion` **(** :ref:`int` task_id **)** | -+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_group_task` **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_task` **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_group_processed_element_count` **(** :ref:`int` group_id **)** |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_group_task_completed` **(** :ref:`int` group_id **)** |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_task_completed` **(** :ref:`int` task_id **)** |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`wait_for_group_task_completion` **(** :ref:`int` group_id **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`wait_for_task_completion` **(** :ref:`int` task_id **)** | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_WorkerThreadPool_method_add_group_task: -- :ref:`int` **add_group_task** **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** +.. rst-class:: classref-method + +:ref:`int` **add_group_task** **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WorkerThreadPool_method_add_task: -- :ref:`int` **add_task** **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** +.. rst-class:: classref-method + +:ref:`int` **add_task** **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WorkerThreadPool_method_get_group_processed_element_count: -- :ref:`int` **get_group_processed_element_count** **(** :ref:`int` group_id **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_group_processed_element_count** **(** :ref:`int` group_id **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WorkerThreadPool_method_is_group_task_completed: -- :ref:`bool` **is_group_task_completed** **(** :ref:`int` group_id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_group_task_completed** **(** :ref:`int` group_id **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WorkerThreadPool_method_is_task_completed: -- :ref:`bool` **is_task_completed** **(** :ref:`int` task_id **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_task_completed** **(** :ref:`int` task_id **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WorkerThreadPool_method_wait_for_group_task_completion: -- void **wait_for_group_task_completion** **(** :ref:`int` group_id **)** +.. rst-class:: classref-method + +void **wait_for_group_task_completion** **(** :ref:`int` group_id **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_WorkerThreadPool_method_wait_for_task_completion: -- void **wait_for_task_completion** **(** :ref:`int` task_id **)** +.. rst-class:: classref-method + +void **wait_for_task_completion** **(** :ref:`int` task_id **)** .. container:: contribute diff --git a/classes/class_world2d.rst b/classes/class_world2d.rst index c313081bb..071d970bb 100644 --- a/classes/class_world2d.rst +++ b/classes/class_world2d.rst @@ -14,75 +14,104 @@ World2D Class that has everything pertaining to a 2D world. +.. rst-class:: classref-introduction-group + Description ----------- Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Ray-casting <../tutorials/physics/ray-casting>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+----------------------------------------------------------------------+ -| :ref:`RID` | :ref:`canvas` | -+-------------------------------------------------------------------+----------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState2D` | :ref:`direct_space_state` | -+-------------------------------------------------------------------+----------------------------------------------------------------------+ -| :ref:`RID` | :ref:`navigation_map` | -+-------------------------------------------------------------------+----------------------------------------------------------------------+ -| :ref:`RID` | :ref:`space` | -+-------------------------------------------------------------------+----------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+----------------------------------------------------------------------+ + | :ref:`RID` | :ref:`canvas` | + +-------------------------------------------------------------------+----------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D` | :ref:`direct_space_state` | + +-------------------------------------------------------------------+----------------------------------------------------------------------+ + | :ref:`RID` | :ref:`navigation_map` | + +-------------------------------------------------------------------+----------------------------------------------------------------------+ + | :ref:`RID` | :ref:`space` | + +-------------------------------------------------------------------+----------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_World2D_property_canvas: -- :ref:`RID` **canvas** +.. rst-class:: classref-property -+----------+--------------+ -| *Getter* | get_canvas() | -+----------+--------------+ +:ref:`RID` **canvas** + +.. rst-class:: classref-property-setget + +- :ref:`RID` **get_canvas** **(** **)** The :ref:`RID` of this world's canvas resource. Used by the :ref:`RenderingServer` for 2D drawing. +.. rst-class:: classref-item-separator + ---- .. _class_World2D_property_direct_space_state: -- :ref:`PhysicsDirectSpaceState2D` **direct_space_state** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Getter* | get_direct_space_state() | -+----------+--------------------------+ +:ref:`PhysicsDirectSpaceState2D` **direct_space_state** + +.. rst-class:: classref-property-setget + +- :ref:`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` in the main thread. +.. rst-class:: classref-item-separator + ---- .. _class_World2D_property_navigation_map: -- :ref:`RID` **navigation_map** +.. rst-class:: classref-property -+----------+----------------------+ -| *Getter* | get_navigation_map() | -+----------+----------------------+ +:ref:`RID` **navigation_map** + +.. rst-class:: classref-property-setget + +- :ref:`RID` **get_navigation_map** **(** **)** The :ref:`RID` of this world's navigation map. Used by the :ref:`NavigationServer2D`. +.. rst-class:: classref-item-separator + ---- .. _class_World2D_property_space: -- :ref:`RID` **space** +.. rst-class:: classref-property -+----------+-------------+ -| *Getter* | get_space() | -+----------+-------------+ +:ref:`RID` **space** + +.. rst-class:: classref-property-setget + +- :ref:`RID` **get_space** **(** **)** The :ref:`RID` of this world's physics space resource. Used by the :ref:`PhysicsServer2D` for 2D physics, treating it as both a space and an area. diff --git a/classes/class_world3d.rst b/classes/class_world3d.rst index 0105fb59b..78fb5151f 100644 --- a/classes/class_world3d.rst +++ b/classes/class_world3d.rst @@ -14,123 +14,161 @@ World3D Class that has everything pertaining to a world. +.. rst-class:: classref-introduction-group + Description ----------- Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Node3D nodes register their resources into the current world. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Ray-casting <../tutorials/physics/ray-casting>` +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`CameraAttributes` | :ref:`camera_attributes` | -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState3D` | :ref:`direct_space_state` | -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`Environment` | :ref:`environment` | -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`Environment` | :ref:`fallback_environment` | -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`navigation_map` | -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`scenario` | -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`space` | -+-------------------------------------------------------------------+--------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`CameraAttributes` | :ref:`camera_attributes` | + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`direct_space_state` | + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`Environment` | :ref:`environment` | + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`Environment` | :ref:`fallback_environment` | + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`navigation_map` | + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`scenario` | + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`space` | + +-------------------------------------------------------------------+--------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_World3D_property_camera_attributes: -- :ref:`CameraAttributes` **camera_attributes** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_camera_attributes(value) | -+----------+------------------------------+ -| *Getter* | get_camera_attributes() | -+----------+------------------------------+ +:ref:`CameraAttributes` **camera_attributes** + +.. rst-class:: classref-property-setget + +- void **set_camera_attributes** **(** :ref:`CameraAttributes` value **)** +- :ref:`CameraAttributes` **get_camera_attributes** **(** **)** The default :ref:`CameraAttributes` resource to use if none set on the :ref:`Camera3D`. +.. rst-class:: classref-item-separator + ---- .. _class_World3D_property_direct_space_state: -- :ref:`PhysicsDirectSpaceState3D` **direct_space_state** +.. rst-class:: classref-property -+----------+--------------------------+ -| *Getter* | get_direct_space_state() | -+----------+--------------------------+ +:ref:`PhysicsDirectSpaceState3D` **direct_space_state** + +.. rst-class:: classref-property-setget + +- :ref:`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` in the main thread. +.. rst-class:: classref-item-separator + ---- .. _class_World3D_property_environment: -- :ref:`Environment` **environment** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_environment(value) | -+----------+------------------------+ -| *Getter* | get_environment() | -+----------+------------------------+ +:ref:`Environment` **environment** + +.. rst-class:: classref-property-setget + +- void **set_environment** **(** :ref:`Environment` value **)** +- :ref:`Environment` **get_environment** **(** **)** The World3D's :ref:`Environment`. +.. rst-class:: classref-item-separator + ---- .. _class_World3D_property_fallback_environment: -- :ref:`Environment` **fallback_environment** +.. rst-class:: classref-property -+----------+---------------------------------+ -| *Setter* | set_fallback_environment(value) | -+----------+---------------------------------+ -| *Getter* | get_fallback_environment() | -+----------+---------------------------------+ +:ref:`Environment` **fallback_environment** + +.. rst-class:: classref-property-setget + +- void **set_fallback_environment** **(** :ref:`Environment` value **)** +- :ref:`Environment` **get_fallback_environment** **(** **)** The World3D's fallback environment will be used if :ref:`environment` fails or is missing. +.. rst-class:: classref-item-separator + ---- .. _class_World3D_property_navigation_map: -- :ref:`RID` **navigation_map** +.. rst-class:: classref-property -+----------+----------------------+ -| *Getter* | get_navigation_map() | -+----------+----------------------+ +:ref:`RID` **navigation_map** + +.. rst-class:: classref-property-setget + +- :ref:`RID` **get_navigation_map** **(** **)** The :ref:`RID` of this world's navigation map. Used by the :ref:`NavigationServer3D`. +.. rst-class:: classref-item-separator + ---- .. _class_World3D_property_scenario: -- :ref:`RID` **scenario** +.. rst-class:: classref-property -+----------+----------------+ -| *Getter* | get_scenario() | -+----------+----------------+ +:ref:`RID` **scenario** + +.. rst-class:: classref-property-setget + +- :ref:`RID` **get_scenario** **(** **)** The World3D's visual scenario. +.. rst-class:: classref-item-separator + ---- .. _class_World3D_property_space: -- :ref:`RID` **space** +.. rst-class:: classref-property -+----------+-------------+ -| *Getter* | get_space() | -+----------+-------------+ +:ref:`RID` **space** + +.. rst-class:: classref-property-setget + +- :ref:`RID` **get_space** **(** **)** The World3D's physics space. diff --git a/classes/class_worldboundaryshape2d.rst b/classes/class_worldboundaryshape2d.rst index 8ebbd7bf2..6abcb0397 100644 --- a/classes/class_worldboundaryshape2d.rst +++ b/classes/class_worldboundaryshape2d.rst @@ -14,52 +14,65 @@ WorldBoundaryShape2D World boundary (infinite plane) shape resource for 2D physics. +.. rst-class:: classref-introduction-group + Description ----------- -2D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. ``WorldBoundaryShape2D`` works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`normal` matters; anything "below" the plane will collide with it. If the ``WorldBoundaryShape2D`` is used in a :ref:`PhysicsBody2D`, it will cause colliding objects placed "below" it to teleport "above" the plane. +2D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. **WorldBoundaryShape2D** works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`normal` matters; anything "below" the plane will collide with it. If the **WorldBoundaryShape2D** is used in a :ref:`PhysicsBody2D`, it will cause colliding objects placed "below" it to teleport "above" the plane. -\ **Performance:** Being a primitive collision shape, ``WorldBoundaryShape2D`` is fast to check collisions against. +\ **Performance:** Being a primitive collision shape, **WorldBoundaryShape2D** is fast to check collisions against. + +.. rst-class:: classref-reftable-group Properties ---------- -+-------------------------------+---------------------------------------------------------------+--------------------+ -| :ref:`float` | :ref:`distance` | ``0.0`` | -+-------------------------------+---------------------------------------------------------------+--------------------+ -| :ref:`Vector2` | :ref:`normal` | ``Vector2(0, -1)`` | -+-------------------------------+---------------------------------------------------------------+--------------------+ +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`distance` | ``0.0`` | + +-------------------------------+---------------------------------------------------------------+--------------------+ + | :ref:`Vector2` | :ref:`normal` | ``Vector2(0, -1)`` | + +-------------------------------+---------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_WorldBoundaryShape2D_property_distance: -- :ref:`float` **distance** +.. rst-class:: classref-property -+-----------+---------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------+ -| *Setter* | set_distance(value) | -+-----------+---------------------+ -| *Getter* | get_distance() | -+-----------+---------------------+ +:ref:`float` **distance** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_distance** **(** :ref:`float` value **)** +- :ref:`float` **get_distance** **(** **)** The line's distance from the origin. +.. rst-class:: classref-item-separator + ---- .. _class_WorldBoundaryShape2D_property_normal: -- :ref:`Vector2` **normal** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``Vector2(0, -1)`` | -+-----------+--------------------+ -| *Setter* | set_normal(value) | -+-----------+--------------------+ -| *Getter* | get_normal() | -+-----------+--------------------+ +:ref:`Vector2` **normal** = ``Vector2(0, -1)`` + +.. rst-class:: classref-property-setget + +- void **set_normal** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_normal** **(** **)** The line's normal. Defaults to ``Vector2.UP``. diff --git a/classes/class_worldboundaryshape3d.rst b/classes/class_worldboundaryshape3d.rst index ddc9cdd14..592abcdb6 100644 --- a/classes/class_worldboundaryshape3d.rst +++ b/classes/class_worldboundaryshape3d.rst @@ -14,36 +14,48 @@ WorldBoundaryShape3D World boundary (infinite plane) shape resource for 3D physics. +.. rst-class:: classref-introduction-group + Description ----------- -3D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. ``WorldBoundaryShape3D`` works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`Plane`'s normal matters; anything "below" the plane will collide with it. If the ``WorldBoundaryShape3D`` is used in a :ref:`PhysicsBody3D`, it will cause colliding objects placed "below" it to teleport "above" the plane. +3D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. **WorldBoundaryShape3D** works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`Plane`'s normal matters; anything "below" the plane will collide with it. If the **WorldBoundaryShape3D** is used in a :ref:`PhysicsBody3D`, it will cause colliding objects placed "below" it to teleport "above" the plane. -\ **Performance:** Being a primitive collision shape, ``WorldBoundaryShape3D`` is fast to check collisions against. +\ **Performance:** Being a primitive collision shape, **WorldBoundaryShape3D** is fast to check collisions against. + +.. rst-class:: classref-reftable-group Properties ---------- -+---------------------------+---------------------------------------------------------+-----------------------+ -| :ref:`Plane` | :ref:`plane` | ``Plane(0, 1, 0, 0)`` | -+---------------------------+---------------------------------------------------------+-----------------------+ +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------+-----------------------+ + | :ref:`Plane` | :ref:`plane` | ``Plane(0, 1, 0, 0)`` | + +---------------------------+---------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_WorldBoundaryShape3D_property_plane: -- :ref:`Plane` **plane** +.. rst-class:: classref-property -+-----------+-----------------------+ -| *Default* | ``Plane(0, 1, 0, 0)`` | -+-----------+-----------------------+ -| *Setter* | set_plane(value) | -+-----------+-----------------------+ -| *Getter* | get_plane() | -+-----------+-----------------------+ +:ref:`Plane` **plane** = ``Plane(0, 1, 0, 0)`` -The :ref:`Plane` used by the ``WorldBoundaryShape3D`` for collision. +.. rst-class:: classref-property-setget + +- void **set_plane** **(** :ref:`Plane` value **)** +- :ref:`Plane` **get_plane** **(** **)** + +The :ref:`Plane` used by the **WorldBoundaryShape3D** for collision. .. |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.)` diff --git a/classes/class_worldenvironment.rst b/classes/class_worldenvironment.rst index 7e9b535a7..260e2389a 100644 --- a/classes/class_worldenvironment.rst +++ b/classes/class_worldenvironment.rst @@ -14,14 +14,18 @@ WorldEnvironment Default environment properties for the entire scene (post-processing effects, lighting and background settings). +.. rst-class:: classref-introduction-group + Description ----------- -The ``WorldEnvironment`` node is used to configure the default :ref:`Environment` for the scene. +The **WorldEnvironment** node is used to configure the default :ref:`Environment` for the scene. -The parameters defined in the ``WorldEnvironment`` can be overridden by an :ref:`Environment` node set on the current :ref:`Camera3D`. Additionally, only one ``WorldEnvironment`` may be instantiated in a given scene at a time. +The parameters defined in the **WorldEnvironment** can be overridden by an :ref:`Environment` node set on the current :ref:`Camera3D`. Additionally, only one **WorldEnvironment** may be instantiated in a given scene at a time. -The ``WorldEnvironment`` allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. +The **WorldEnvironment** allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. + +.. rst-class:: classref-introduction-group Tutorials --------- @@ -34,43 +38,58 @@ Tutorials - `Third Person Shooter Demo `__ +.. rst-class:: classref-reftable-group + Properties ---------- -+-------------------------------------------------+-----------------------------------------------------------------------------+ -| :ref:`CameraAttributes` | :ref:`camera_attributes` | -+-------------------------------------------------+-----------------------------------------------------------------------------+ -| :ref:`Environment` | :ref:`environment` | -+-------------------------------------------------+-----------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------------------------+-----------------------------------------------------------------------------+ + | :ref:`CameraAttributes` | :ref:`camera_attributes` | + +-------------------------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Environment` | :ref:`environment` | + +-------------------------------------------------+-----------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_WorldEnvironment_property_camera_attributes: -- :ref:`CameraAttributes` **camera_attributes** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_camera_attributes(value) | -+----------+------------------------------+ -| *Getter* | get_camera_attributes() | -+----------+------------------------------+ +:ref:`CameraAttributes` **camera_attributes** + +.. rst-class:: classref-property-setget + +- void **set_camera_attributes** **(** :ref:`CameraAttributes` value **)** +- :ref:`CameraAttributes` **get_camera_attributes** **(** **)** The default :ref:`CameraAttributes` resource to use if none set on the :ref:`Camera3D`. +.. rst-class:: classref-item-separator + ---- .. _class_WorldEnvironment_property_environment: -- :ref:`Environment` **environment** +.. rst-class:: classref-property -+----------+------------------------+ -| *Setter* | set_environment(value) | -+----------+------------------------+ -| *Getter* | get_environment() | -+----------+------------------------+ +:ref:`Environment` **environment** -The :ref:`Environment` resource used by this ``WorldEnvironment``, defining the default properties. +.. rst-class:: classref-property-setget + +- void **set_environment** **(** :ref:`Environment` value **)** +- :ref:`Environment` **get_environment** **(** **)** + +The :ref:`Environment` resource used by this **WorldEnvironment**, defining the default 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.)` diff --git a/classes/class_x509certificate.rst b/classes/class_x509certificate.rst index 12952ed7f..d6fafacc1 100644 --- a/classes/class_x509certificate.rst +++ b/classes/class_x509certificate.rst @@ -14,6 +14,8 @@ X509Certificate An X509 certificate (e.g. for TLS). +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,29 +23,46 @@ The X509Certificate class represents an X509 certificate. Certificates can be lo They can be used as the server certificate in :ref:`StreamPeerTLS.accept_stream` (along with the proper :ref:`CryptoKey`), and to specify the only certificate that should be accepted when connecting to an TLS server via :ref:`StreamPeerTLS.connect_to_stream`. +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | + +---------------------------------------+---------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_X509Certificate_method_load: -- :ref:`Error` **load** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **load** **(** :ref:`String` path **)** Loads a certificate from ``path`` ("\*.crt" file). +.. rst-class:: classref-item-separator + ---- .. _class_X509Certificate_method_save: -- :ref:`Error` **save** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **save** **(** :ref:`String` path **)** Saves a certificate to the given ``path`` (should be a "\*.crt" file). diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst index 9c7aa33bd..492c4196f 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -14,219 +14,334 @@ XMLParser Low-level class for creating parsers for `XML `__ files. +.. rst-class:: classref-introduction-group + Description ----------- This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low-level so it can be applied to any possible schema. +.. rst-class:: classref-reftable-group + Methods ------- -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_attribute_count` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_attribute_name` **(** :ref:`int` idx **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_attribute_value` **(** :ref:`int` idx **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_current_line` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_named_attribute_value` **(** :ref:`String` name **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_named_attribute_value_safe` **(** :ref:`String` name **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_node_data` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_node_name` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_node_offset` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`NodeType` | :ref:`get_node_type` **(** **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_attribute` **(** :ref:`String` name **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`open` **(** :ref:`String` file **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`open_buffer` **(** :ref:`PackedByteArray` buffer **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`read` **(** **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`seek` **(** :ref:`int` position **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`skip_section` **(** **)** | -+------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_attribute_count` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_attribute_name` **(** :ref:`int` idx **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_attribute_value` **(** :ref:`int` idx **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_current_line` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_named_attribute_value` **(** :ref:`String` name **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_named_attribute_value_safe` **(** :ref:`String` name **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_node_data` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_node_name` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_offset` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodeType` | :ref:`get_node_type` **(** **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_attribute` **(** :ref:`String` name **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`open` **(** :ref:`String` file **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`open_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`read` **(** **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`seek` **(** :ref:`int` position **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`skip_section` **(** **)** | + +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_XMLParser_NodeType: -.. _class_XMLParser_constant_NODE_NONE: - -.. _class_XMLParser_constant_NODE_ELEMENT: - -.. _class_XMLParser_constant_NODE_ELEMENT_END: - -.. _class_XMLParser_constant_NODE_TEXT: - -.. _class_XMLParser_constant_NODE_COMMENT: - -.. _class_XMLParser_constant_NODE_CDATA: - -.. _class_XMLParser_constant_NODE_UNKNOWN: +.. rst-class:: classref-enumeration enum **NodeType**: -- **NODE_NONE** = **0** --- There's no node (no file or buffer opened). +.. _class_XMLParser_constant_NODE_NONE: -- **NODE_ELEMENT** = **1** --- Element (tag). +.. rst-class:: classref-enumeration-constant -- **NODE_ELEMENT_END** = **2** --- End of element. +:ref:`NodeType` **NODE_NONE** = ``0`` -- **NODE_TEXT** = **3** --- Text node. +There's no node (no file or buffer opened). -- **NODE_COMMENT** = **4** --- Comment node. +.. _class_XMLParser_constant_NODE_ELEMENT: -- **NODE_CDATA** = **5** --- CDATA content. +.. rst-class:: classref-enumeration-constant -- **NODE_UNKNOWN** = **6** --- Unknown node. +:ref:`NodeType` **NODE_ELEMENT** = ``1`` + +Element (tag). + +.. _class_XMLParser_constant_NODE_ELEMENT_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`NodeType` **NODE_ELEMENT_END** = ``2`` + +End of element. + +.. _class_XMLParser_constant_NODE_TEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`NodeType` **NODE_TEXT** = ``3`` + +Text node. + +.. _class_XMLParser_constant_NODE_COMMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`NodeType` **NODE_COMMENT** = ``4`` + +Comment node. + +.. _class_XMLParser_constant_NODE_CDATA: + +.. rst-class:: classref-enumeration-constant + +:ref:`NodeType` **NODE_CDATA** = ``5`` + +CDATA content. + +.. _class_XMLParser_constant_NODE_UNKNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`NodeType` **NODE_UNKNOWN** = ``6`` + +Unknown node. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_XMLParser_method_get_attribute_count: -- :ref:`int` **get_attribute_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_attribute_count** **(** **)** |const| Gets the number of attributes in the current element. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_attribute_name: -- :ref:`String` **get_attribute_name** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_attribute_name** **(** :ref:`int` idx **)** |const| Gets the name of the attribute specified by the ``idx`` index. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_attribute_value: -- :ref:`String` **get_attribute_value** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_attribute_value** **(** :ref:`int` idx **)** |const| Gets the value of the attribute specified by the ``idx`` index. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_current_line: -- :ref:`int` **get_current_line** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_current_line** **(** **)** |const| Gets the current line in the parsed file, counting from 0. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_named_attribute_value: -- :ref:`String` **get_named_attribute_value** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_named_attribute_value** **(** :ref:`String` name **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_named_attribute_value_safe: -- :ref:`String` **get_named_attribute_value_safe** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_named_attribute_value_safe** **(** :ref:`String` name **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_node_data: -- :ref:`String` **get_node_data** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_node_data** **(** **)** |const| Gets the contents of a text node. This will raise an error in any other type of node. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_node_name: -- :ref:`String` **get_node_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`String` **get_node_name** **(** **)** |const| 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`. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_node_offset: -- :ref:`int` **get_node_offset** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_node_offset** **(** **)** |const| Gets the byte offset of the current node since the beginning of the file or buffer. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_get_node_type: -- :ref:`NodeType` **get_node_type** **(** **)** +.. rst-class:: classref-method + +:ref:`NodeType` **get_node_type** **(** **)** Gets the type of the current node. Compare with :ref:`NodeType` constants. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_has_attribute: -- :ref:`bool` **has_attribute** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_attribute** **(** :ref:`String` name **)** |const| Check whether the current element has a certain attribute. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_is_empty: -- :ref:`bool` **is_empty** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_empty** **(** **)** |const| Check whether the current element is empty (this only works for completely empty tags, e.g. ````). +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_open: -- :ref:`Error` **open** **(** :ref:`String` file **)** +.. rst-class:: classref-method + +:ref:`Error` **open** **(** :ref:`String` file **)** Opens an XML ``file`` for parsing. This returns an error code. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_open_buffer: -- :ref:`Error` **open_buffer** **(** :ref:`PackedByteArray` buffer **)** +.. rst-class:: classref-method + +:ref:`Error` **open_buffer** **(** :ref:`PackedByteArray` buffer **)** Opens an XML raw ``buffer`` for parsing. This returns an error code. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_read: -- :ref:`Error` **read** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **read** **(** **)** Reads the next node of the file. This returns an error code. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_seek: -- :ref:`Error` **seek** **(** :ref:`int` position **)** +.. rst-class:: classref-method + +:ref:`Error` **seek** **(** :ref:`int` position **)** Moves the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. +.. rst-class:: classref-item-separator + ---- .. _class_XMLParser_method_skip_section: -- void **skip_section** **(** **)** +.. rst-class:: classref-method + +void **skip_section** **(** **)** 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. diff --git a/classes/class_xranchor3d.rst b/classes/class_xranchor3d.rst index d54e67bd8..6df4a1eb0 100644 --- a/classes/class_xranchor3d.rst +++ b/classes/class_xranchor3d.rst @@ -14,38 +14,57 @@ XRAnchor3D An anchor point in AR space. +.. rst-class:: classref-introduction-group + 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 a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; 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-reftable-group + Methods ------- -+-------------------------------+-------------------------------------------------------------------------+ -| :ref:`Plane` | :ref:`get_plane` **(** **)** |const| | -+-------------------------------+-------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_size` **(** **)** |const| | -+-------------------------------+-------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +-------------------------------+-------------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`get_plane` **(** **)** |const| | + +-------------------------------+-------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_size` **(** **)** |const| | + +-------------------------------+-------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_XRAnchor3D_method_get_plane: -- :ref:`Plane` **get_plane** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Plane` **get_plane** **(** **)** |const| Returns a plane aligned with our anchor; handy for intersection testing. +.. rst-class:: classref-item-separator + ---- .. _class_XRAnchor3D_method_get_size: -- :ref:`Vector3` **get_size** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Vector3` **get_size** **(** **)** |const| 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. diff --git a/classes/class_xrcamera3d.rst b/classes/class_xrcamera3d.rst index ffc92d2e1..ecca5b766 100644 --- a/classes/class_xrcamera3d.rst +++ b/classes/class_xrcamera3d.rst @@ -14,6 +14,8 @@ XRCamera3D A camera node with a few overrules for AR/VR applied, such as location tracking. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,6 +23,8 @@ This is a helper spatial node for our camera; note that, if stereoscopic renderi The position and orientation of this node is automatically updated by the XR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the XR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the XRCamera3D can lag a few milliseconds behind what is used for rendering as a result. +.. rst-class:: classref-introduction-group + Tutorials --------- diff --git a/classes/class_xrcontroller3d.rst b/classes/class_xrcontroller3d.rst index 62b44a626..e815e8fa9 100644 --- a/classes/class_xrcontroller3d.rst +++ b/classes/class_xrcontroller3d.rst @@ -14,6 +14,8 @@ XRController3D A spatial node representing a spatially-tracked controller. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,87 +27,134 @@ The position of the controller node is automatically updated by the :ref:`XRServ As many XR runtimes now use a configurable action map all inputs are named. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`XR documentation index <../tutorials/xr/index>` +.. rst-class:: classref-reftable-group + Methods ------- -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_axis` **(** :ref:`StringName` name **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TrackerHand` | :ref:`get_tracker_hand` **(** **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_value` **(** :ref:`StringName` name **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_button_pressed` **(** :ref:`StringName` name **)** |const| | -+----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_axis` **(** :ref:`StringName` name **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TrackerHand` | :ref:`get_tracker_hand` **(** **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_value` **(** :ref:`StringName` name **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_button_pressed` **(** :ref:`StringName` name **)** |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_XRController3D_signal_button_pressed: -- **button_pressed** **(** :ref:`String` name **)** +.. rst-class:: classref-signal + +**button_pressed** **(** :ref:`String` name **)** Emitted when a button on this controller is pressed. +.. rst-class:: classref-item-separator + ---- .. _class_XRController3D_signal_button_released: -- **button_released** **(** :ref:`String` name **)** +.. rst-class:: classref-signal + +**button_released** **(** :ref:`String` name **)** Emitted when a button on this controller is released. +.. rst-class:: classref-item-separator + ---- .. _class_XRController3D_signal_input_axis_changed: -- **input_axis_changed** **(** :ref:`String` name, :ref:`Vector2` value **)** +.. rst-class:: classref-signal + +**input_axis_changed** **(** :ref:`String` name, :ref:`Vector2` value **)** Emitted when a thumbstick or thumbpad on this controller is moved. +.. rst-class:: classref-item-separator + ---- .. _class_XRController3D_signal_input_value_changed: -- **input_value_changed** **(** :ref:`String` name, :ref:`float` value **)** +.. rst-class:: classref-signal + +**input_value_changed** **(** :ref:`String` name, :ref:`float` value **)** Emitted when a trigger or similar input on this controller changes value. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_XRController3D_method_get_axis: -- :ref:`Vector2` **get_axis** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Vector2` **get_axis** **(** :ref:`StringName` name **)** |const| Returns a :ref:`Vector2` for the input with the given ``name``. This is used for thumbsticks and thumbpads found on many controllers. +.. rst-class:: classref-item-separator + ---- .. _class_XRController3D_method_get_tracker_hand: -- :ref:`TrackerHand` **get_tracker_hand** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TrackerHand` **get_tracker_hand** **(** **)** |const| Returns the hand holding this controller, if known. See :ref:`TrackerHand`. +.. rst-class:: classref-item-separator + ---- .. _class_XRController3D_method_get_value: -- :ref:`float` **get_value** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`float` **get_value** **(** :ref:`StringName` name **)** |const| Returns a numeric value for the input with the given ``name``. This is used for triggers and grip sensors. +.. rst-class:: classref-item-separator + ---- .. _class_XRController3D_method_is_button_pressed: -- :ref:`bool` **is_button_pressed** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_button_pressed** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the button with the given ``name`` is pressed. diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index afabaeaaa..0aa23062b 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -16,6 +16,8 @@ XRInterface Base class for an XR interface implementation. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,272 +25,419 @@ This class needs to be implemented to make an AR or VR platform available to God Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through :ref:`XRServer`. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`XR documentation index <../tutorials/xr/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`ar_is_anchor_detection_enabled` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`interface_is_primary` | ``false`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ -| :ref:`PlayAreaMode` | :ref:`xr_play_area_mode` | ``0`` | -+----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ +.. 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`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group Methods ------- -+--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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:`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_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` **(** **)** | -+--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`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_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` **(** **)** | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_XRInterface_signal_play_area_changed: -- **play_area_changed** **(** :ref:`int` mode **)** +.. rst-class:: classref-signal + +**play_area_changed** **(** :ref:`int` mode **)** 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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_XRInterface_Capabilities: -.. _class_XRInterface_constant_XR_NONE: - -.. _class_XRInterface_constant_XR_MONO: - -.. _class_XRInterface_constant_XR_STEREO: - -.. _class_XRInterface_constant_XR_QUAD: - -.. _class_XRInterface_constant_XR_VR: - -.. _class_XRInterface_constant_XR_AR: - -.. _class_XRInterface_constant_XR_EXTERNAL: +.. rst-class:: classref-enumeration enum **Capabilities**: -- **XR_NONE** = **0** --- No XR capabilities. +.. _class_XRInterface_constant_XR_NONE: -- **XR_MONO** = **1** --- This interface can work with normal rendering output (non-HMD based AR). +.. rst-class:: classref-enumeration-constant -- **XR_STEREO** = **2** --- This interface supports stereoscopic rendering. +:ref:`Capabilities` **XR_NONE** = ``0`` -- **XR_QUAD** = **4** --- This interface supports quad rendering (not yet supported by Godot). +No XR capabilities. -- **XR_VR** = **8** --- this interface supports VR. +.. _class_XRInterface_constant_XR_MONO: -- **XR_AR** = **16** --- This interface supports AR (video background and real world tracking). +.. rst-class:: classref-enumeration-constant -- **XR_EXTERNAL** = **32** --- This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of :ref:`get_render_target_size`). Using a separate viewport node frees up the main viewport for other purposes. +:ref:`Capabilities` **XR_MONO** = ``1`` + +This interface can work with normal rendering output (non-HMD based AR). + +.. _class_XRInterface_constant_XR_STEREO: + +.. rst-class:: classref-enumeration-constant + +:ref:`Capabilities` **XR_STEREO** = ``2`` + +This interface supports stereoscopic rendering. + +.. _class_XRInterface_constant_XR_QUAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Capabilities` **XR_QUAD** = ``4`` + +This interface supports quad rendering (not yet supported by Godot). + +.. _class_XRInterface_constant_XR_VR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Capabilities` **XR_VR** = ``8`` + +this interface supports VR. + +.. _class_XRInterface_constant_XR_AR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Capabilities` **XR_AR** = ``16`` + +This interface supports AR (video background and real world tracking). + +.. _class_XRInterface_constant_XR_EXTERNAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Capabilities` **XR_EXTERNAL** = ``32`` + +This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of :ref:`get_render_target_size`). Using a separate viewport node frees up the main viewport for other purposes. + +.. rst-class:: classref-item-separator ---- .. _enum_XRInterface_TrackingStatus: -.. _class_XRInterface_constant_XR_NORMAL_TRACKING: - -.. _class_XRInterface_constant_XR_EXCESSIVE_MOTION: - -.. _class_XRInterface_constant_XR_INSUFFICIENT_FEATURES: - -.. _class_XRInterface_constant_XR_UNKNOWN_TRACKING: - -.. _class_XRInterface_constant_XR_NOT_TRACKING: +.. rst-class:: classref-enumeration enum **TrackingStatus**: -- **XR_NORMAL_TRACKING** = **0** --- Tracking is behaving as expected. +.. _class_XRInterface_constant_XR_NORMAL_TRACKING: -- **XR_EXCESSIVE_MOTION** = **1** --- Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up). +.. rst-class:: classref-enumeration-constant -- **XR_INSUFFICIENT_FEATURES** = **2** --- Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. +:ref:`TrackingStatus` **XR_NORMAL_TRACKING** = ``0`` -- **XR_UNKNOWN_TRACKING** = **3** --- We don't know the status of the tracking or this interface does not provide feedback. +Tracking is behaving as expected. -- **XR_NOT_TRACKING** = **4** --- Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.). +.. _class_XRInterface_constant_XR_EXCESSIVE_MOTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackingStatus` **XR_EXCESSIVE_MOTION** = ``1`` + +Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up). + +.. _class_XRInterface_constant_XR_INSUFFICIENT_FEATURES: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackingStatus` **XR_INSUFFICIENT_FEATURES** = ``2`` + +Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. + +.. _class_XRInterface_constant_XR_UNKNOWN_TRACKING: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackingStatus` **XR_UNKNOWN_TRACKING** = ``3`` + +We don't know the status of the tracking or this interface does not provide feedback. + +.. _class_XRInterface_constant_XR_NOT_TRACKING: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackingStatus` **XR_NOT_TRACKING** = ``4`` + +Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.). + +.. rst-class:: classref-item-separator ---- .. _enum_XRInterface_PlayAreaMode: -.. _class_XRInterface_constant_XR_PLAY_AREA_UNKNOWN: - -.. _class_XRInterface_constant_XR_PLAY_AREA_3DOF: - -.. _class_XRInterface_constant_XR_PLAY_AREA_SITTING: - -.. _class_XRInterface_constant_XR_PLAY_AREA_ROOMSCALE: - -.. _class_XRInterface_constant_XR_PLAY_AREA_STAGE: +.. rst-class:: classref-enumeration enum **PlayAreaMode**: -- **XR_PLAY_AREA_UNKNOWN** = **0** --- Play area mode not set or not available. +.. _class_XRInterface_constant_XR_PLAY_AREA_UNKNOWN: -- **XR_PLAY_AREA_3DOF** = **1** --- Play area only supports orientation tracking, no positional tracking, area will center around player. +.. rst-class:: classref-enumeration-constant -- **XR_PLAY_AREA_SITTING** = **2** --- Player is in seated position, limited positional tracking, fixed guardian around player. +:ref:`PlayAreaMode` **XR_PLAY_AREA_UNKNOWN** = ``0`` -- **XR_PLAY_AREA_ROOMSCALE** = **3** --- Player is free to move around, full positional tracking. +Play area mode not set or not available. -- **XR_PLAY_AREA_STAGE** = **4** --- Same as roomscale but origin point is fixed to the center of the physical space, XRServer.center_on_hmd disabled. +.. _class_XRInterface_constant_XR_PLAY_AREA_3DOF: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlayAreaMode` **XR_PLAY_AREA_3DOF** = ``1`` + +Play area only supports orientation tracking, no positional tracking, area will center around player. + +.. _class_XRInterface_constant_XR_PLAY_AREA_SITTING: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlayAreaMode` **XR_PLAY_AREA_SITTING** = ``2`` + +Player is in seated position, limited positional tracking, fixed guardian around player. + +.. _class_XRInterface_constant_XR_PLAY_AREA_ROOMSCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlayAreaMode` **XR_PLAY_AREA_ROOMSCALE** = ``3`` + +Player is free to move around, full positional tracking. + +.. _class_XRInterface_constant_XR_PLAY_AREA_STAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlayAreaMode` **XR_PLAY_AREA_STAGE** = ``4`` + +Same as roomscale but origin point is fixed to the center of the physical space, XRServer.center_on_hmd disabled. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_XRInterface_property_ar_is_anchor_detection_enabled: -- :ref:`bool` **ar_is_anchor_detection_enabled** +.. rst-class:: classref-property -+-----------+----------------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------------+ -| *Setter* | set_anchor_detection_is_enabled(value) | -+-----------+----------------------------------------+ -| *Getter* | get_anchor_detection_is_enabled() | -+-----------+----------------------------------------+ +:ref:`bool` **ar_is_anchor_detection_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_anchor_detection_is_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **get_anchor_detection_is_enabled** **(** **)** On an AR interface, ``true`` if anchor detection is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_property_interface_is_primary: -- :ref:`bool` **interface_is_primary** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_primary(value) | -+-----------+--------------------+ -| *Getter* | is_primary() | -+-----------+--------------------+ +:ref:`bool` **interface_is_primary** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_primary** **(** :ref:`bool` value **)** +- :ref:`bool` **is_primary** **(** **)** ``true`` if this is the primary interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_property_xr_play_area_mode: -- :ref:`PlayAreaMode` **xr_play_area_mode** +.. rst-class:: classref-property -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_play_area_mode(value) | -+-----------+---------------------------+ -| *Getter* | get_play_area_mode() | -+-----------+---------------------------+ +:ref:`PlayAreaMode` **xr_play_area_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- :ref:`bool` **set_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** +- :ref:`PlayAreaMode` **get_play_area_mode** **(** **)** The play area mode for this interface. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_XRInterface_method_get_camera_feed_id: -- :ref:`int` **get_camera_feed_id** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_camera_feed_id** **(** **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_capabilities: -- :ref:`int` **get_capabilities** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_capabilities** **(** **)** |const| Returns a combination of :ref:`Capabilities` flags providing information about the capabilities of this interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_name: -- :ref:`StringName` **get_name** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`StringName` **get_name** **(** **)** |const| Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc). +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_play_area: -- :ref:`PackedVector3Array` **get_play_area** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **get_play_area** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_projection_for_view: -- :ref:`Projection` **get_projection_for_view** **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` near, :ref:`float` far **)** +.. rst-class:: classref-method + +:ref:`Projection` **get_projection_for_view** **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` near, :ref:`float` far **)** Returns the projection matrix for a view/eye. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_render_target_size: -- :ref:`Vector2` **get_render_target_size** **(** **)** +.. rst-class:: classref-method + +:ref:`Vector2` **get_render_target_size** **(** **)** Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_tracking_status: -- :ref:`TrackingStatus` **get_tracking_status** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`TrackingStatus` **get_tracking_status** **(** **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_transform_for_view: -- :ref:`Transform3D` **get_transform_for_view** **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** +.. rst-class:: classref-method + +:ref:`Transform3D` **get_transform_for_view** **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** Returns the transform for a view/eye. @@ -296,19 +445,27 @@ Returns the transform for a view/eye. \ ``cam_transform`` is the transform that maps device coordinates to scene coordinates, typically the global_transform of the current XROrigin3D. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_get_view_count: -- :ref:`int` **get_view_count** **(** **)** +.. rst-class:: classref-method + +:ref:`int` **get_view_count** **(** **)** Returns the number of views that need to be rendered for this device. 1 for Monoscopic, 2 for Stereoscopic. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_initialize: -- :ref:`bool` **initialize** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **initialize** **(** **)** 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. @@ -320,69 +477,101 @@ If you do this for a platform that handles its own output (such as OpenVR) Godot While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_is_initialized: -- :ref:`bool` **is_initialized** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **is_initialized** **(** **)** |const| Is ``true`` if this interface has been initialized. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_is_passthrough_enabled: -- :ref:`bool` **is_passthrough_enabled** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_passthrough_enabled** **(** **)** Is ``true`` if passthrough is enabled. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_is_passthrough_supported: -- :ref:`bool` **is_passthrough_supported** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **is_passthrough_supported** **(** **)** Is ``true`` if this interface supports passthrough. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_set_play_area_mode: -- :ref:`bool` **set_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** +.. rst-class:: classref-method + +:ref:`bool` **set_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** Sets the active play area mode, will return ``false`` if the mode can't be used with this interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_start_passthrough: -- :ref:`bool` **start_passthrough** **(** **)** +.. rst-class:: classref-method + +:ref:`bool` **start_passthrough** **(** **)** Starts passthrough, will return ``false`` if passthrough couldn't be started. \ **Note:** The viewport used for XR must have a transparent background, otherwise passthrough may not properly render. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_stop_passthrough: -- void **stop_passthrough** **(** **)** +.. rst-class:: classref-method + +void **stop_passthrough** **(** **)** Stops passthrough. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_supports_play_area_mode: -- :ref:`bool` **supports_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** +.. rst-class:: classref-method + +:ref:`bool` **supports_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** Call this to find out if a given play area mode is supported by this interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_trigger_haptic_pulse: -- 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 **)** +.. 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 **)** Triggers a haptic pulse on a device associated with this interface. @@ -390,11 +579,15 @@ Triggers a haptic pulse on a device associated with this interface. \ ``tracker_name`` is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterface_method_uninitialize: -- void **uninitialize** **(** **)** +.. rst-class:: classref-method + +void **uninitialize** **(** **)** Turns the interface off. diff --git a/classes/class_xrinterfaceextension.rst b/classes/class_xrinterfaceextension.rst index dc2eb11ed..f3ea98663 100644 --- a/classes/class_xrinterfaceextension.rst +++ b/classes/class_xrinterfaceextension.rst @@ -14,370 +14,521 @@ XRInterfaceExtension Base class for XR interface extensions (plugins). +.. rst-class:: classref-introduction-group + Description ----------- External XR interface plugins should inherit from this class. +.. rst-class:: classref-reftable-group + Methods ------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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:`int` | :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:`int` | :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:`int` 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` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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:`int` | :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:`int` | :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:`int` 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` **(** **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_XRInterfaceExtension_method__end_frame: -- void **_end_frame** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_end_frame** **(** **)** |virtual| Called if interface is active and queues have been submitted. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_anchor_detection_is_enabled: -- :ref:`bool` **_get_anchor_detection_is_enabled** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_get_anchor_detection_is_enabled** **(** **)** |virtual| |const| Return ``true`` if anchor detection is enabled for this interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_camera_feed_id: -- :ref:`int` **_get_camera_feed_id** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_camera_feed_id** **(** **)** |virtual| |const| 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). +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_camera_transform: -- :ref:`Transform3D` **_get_camera_transform** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Transform3D` **_get_camera_transform** **(** **)** |virtual| Returns the :ref:`Transform3D` that positions the :ref:`XRCamera3D` in the world. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_capabilities: -- :ref:`int` **_get_capabilities** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_capabilities** **(** **)** |virtual| |const| Returns the capabilities of this interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_color_texture: -- :ref:`RID` **_get_color_texture** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_get_color_texture** **(** **)** |virtual| Return color texture into which to render (if applicable). +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_depth_texture: -- :ref:`RID` **_get_depth_texture** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_get_depth_texture** **(** **)** |virtual| Return depth texture into which to render (if applicable). +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_name: -- :ref:`StringName` **_get_name** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`StringName` **_get_name** **(** **)** |virtual| |const| Returns the name of this interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_play_area: -- :ref:`PackedVector3Array` **_get_play_area** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **_get_play_area** **(** **)** |virtual| |const| Returns an :ref:`PackedVector3Array` that denotes the play areas boundaries (if applicable). +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_play_area_mode: -- :ref:`int` **_get_play_area_mode** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_play_area_mode** **(** **)** |virtual| |const| Returns the :ref:`PlayAreaMode` that sets up our play area. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_projection_for_view: -- :ref:`PackedFloat64Array` **_get_projection_for_view** **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far **)** |virtual| +.. 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| Returns the projection matrix for the given view as a :ref:`PackedFloat64Array`. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_render_target_size: -- :ref:`Vector2` **_get_render_target_size** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`Vector2` **_get_render_target_size** **(** **)** |virtual| Returns the size of our render target for this interface, this overrides the size of the :ref:`Viewport` marked as the xr viewport. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_suggested_pose_names: -- :ref:`PackedStringArray` **_get_suggested_pose_names** **(** :ref:`StringName` tracker_name **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_suggested_pose_names** **(** :ref:`StringName` tracker_name **)** |virtual| |const| Returns a :ref:`PackedStringArray` with pose names configured by this interface. Note that user configuration can override this list. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_suggested_tracker_names: -- :ref:`PackedStringArray` **_get_suggested_tracker_names** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_suggested_tracker_names** **(** **)** |virtual| |const| Returns a :ref:`PackedStringArray` with tracker names configured by this interface. Note that user configuration can override this list. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_tracking_status: -- :ref:`int` **_get_tracking_status** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`int` **_get_tracking_status** **(** **)** |virtual| |const| Returns a :ref:`TrackingStatus` specifying the current status of our tracking. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_transform_for_view: -- :ref:`Transform3D` **_get_transform_for_view** **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| +.. rst-class:: classref-method + +:ref:`Transform3D` **_get_transform_for_view** **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| Returns a :ref:`Transform3D` for a given view. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_velocity_texture: -- :ref:`RID` **_get_velocity_texture** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_get_velocity_texture** **(** **)** |virtual| Return velocity texture into which to render (if applicable). +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_view_count: -- :ref:`int` **_get_view_count** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`int` **_get_view_count** **(** **)** |virtual| Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__get_vrs_texture: -- :ref:`RID` **_get_vrs_texture** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`RID` **_get_vrs_texture** **(** **)** |virtual| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__initialize: -- :ref:`bool` **_initialize** **(** **)** |virtual| +.. rst-class:: classref-method + +:ref:`bool` **_initialize** **(** **)** |virtual| Initializes the interface, returns ``true`` on success. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__is_initialized: -- :ref:`bool` **_is_initialized** **(** **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_is_initialized** **(** **)** |virtual| |const| Returns ``true`` if this interface has been initialized. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__post_draw_viewport: -- void **_post_draw_viewport** **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| +.. rst-class:: classref-method + +void **_post_draw_viewport** **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| Called after the XR :ref:`Viewport` draw logic has completed. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__pre_draw_viewport: -- :ref:`bool` **_pre_draw_viewport** **(** :ref:`RID` render_target **)** |virtual| +.. rst-class:: classref-method -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. +:ref:`bool` **_pre_draw_viewport** **(** :ref:`RID` render_target **)** |virtual| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_XRInterfaceExtension_method__pre_render: -- void **_pre_render** **(** **)** |virtual| +.. rst-class:: classref-method -Called if this ``XRInterfaceExtension`` is active before rendering starts, most XR interfaces will sync tracking at this point in time. +void **_pre_render** **(** **)** |virtual| + +Called if this **XRInterfaceExtension** is active before rendering starts, most XR interfaces will sync tracking at this point in time. + +.. rst-class:: classref-item-separator ---- .. _class_XRInterfaceExtension_method__process: -- void **_process** **(** **)** |virtual| +.. rst-class:: classref-method -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. +void **_process** **(** **)** |virtual| + +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. + +.. rst-class:: classref-item-separator ---- .. _class_XRInterfaceExtension_method__set_anchor_detection_is_enabled: -- void **_set_anchor_detection_is_enabled** **(** :ref:`bool` enabled **)** |virtual| +.. rst-class:: classref-method + +void **_set_anchor_detection_is_enabled** **(** :ref:`bool` enabled **)** |virtual| Enables anchor detection on this interface if supported. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__set_play_area_mode: -- :ref:`bool` **_set_play_area_mode** **(** :ref:`int` mode **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_set_play_area_mode** **(** :ref:`int` mode **)** |virtual| |const| Set the play area mode for this interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__supports_play_area_mode: -- :ref:`bool` **_supports_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| +.. rst-class:: classref-method + +:ref:`bool` **_supports_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| Returns ``true`` if this interface supports this play area mode. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__trigger_haptic_pulse: -- 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| +.. 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| Triggers a haptic pulse to be emitted on the specified tracker. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method__uninitialize: -- void **_uninitialize** **(** **)** |virtual| +.. rst-class:: classref-method + +void **_uninitialize** **(** **)** |virtual| Uninitialize the interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method_add_blit: -- 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 **)** +.. 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 **)** Blits our render results to screen optionally applying lens distortion. This can only be called while processing ``_commit_views``. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method_get_color_texture: -- :ref:`RID` **get_color_texture** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **get_color_texture** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method_get_depth_texture: -- :ref:`RID` **get_depth_texture** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **get_depth_texture** **(** **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method_get_render_target_texture: -- :ref:`RID` **get_render_target_texture** **(** :ref:`RID` render_target **)** +.. rst-class:: classref-method + +:ref:`RID` **get_render_target_texture** **(** :ref:`RID` render_target **)** Returns a valid :ref:`RID` for a texture to which we should render the current frame if supported by the interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRInterfaceExtension_method_get_velocity_texture: -- :ref:`RID` **get_velocity_texture** **(** **)** +.. rst-class:: classref-method + +:ref:`RID` **get_velocity_texture** **(** **)** .. container:: contribute diff --git a/classes/class_xrnode3d.rst b/classes/class_xrnode3d.rst index 8ef010027..dd8c48137 100644 --- a/classes/class_xrnode3d.rst +++ b/classes/class_xrnode3d.rst @@ -16,100 +16,138 @@ XRNode3D A spatial node that has its position automatically updated by the :ref:`XRServer`. +.. rst-class:: classref-introduction-group + 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-reftable-group + Properties ---------- -+-------------------------------------+-------------------------------------------------+----------------+ -| :ref:`StringName` | :ref:`pose` | ``&"default"`` | -+-------------------------------------+-------------------------------------------------+----------------+ -| :ref:`StringName` | :ref:`tracker` | ``&""`` | -+-------------------------------------+-------------------------------------------------+----------------+ +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------+----------------+ + | :ref:`StringName` | :ref:`pose` | ``&"default"`` | + +-------------------------------------+-------------------------------------------------+----------------+ + | :ref:`StringName` | :ref:`tracker` | ``&""`` | + +-------------------------------------+-------------------------------------------------+----------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_XRNode3D_property_pose: -- :ref:`StringName` **pose** +.. rst-class:: classref-property -+-----------+----------------------+ -| *Default* | ``&"default"`` | -+-----------+----------------------+ -| *Setter* | set_pose_name(value) | -+-----------+----------------------+ -| *Getter* | get_pose_name() | -+-----------+----------------------+ +:ref:`StringName` **pose** = ``&"default"`` + +.. rst-class:: classref-property-setget + +- void **set_pose_name** **(** :ref:`StringName` value **)** +- :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. Godot defines number of standard pose names such as ``aim`` and ``grip`` but other may be configured within a given :ref:`XRInterface`. +.. rst-class:: classref-item-separator + ---- .. _class_XRNode3D_property_tracker: -- :ref:`StringName` **tracker** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``&""`` | -+-----------+--------------------+ -| *Setter* | set_tracker(value) | -+-----------+--------------------+ -| *Getter* | get_tracker() | -+-----------+--------------------+ +:ref:`StringName` **tracker** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_tracker** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_tracker** **(** **)** The name of the tracker we're bound to. Which trackers are available is not known during design time. Godot defines a number of standard trackers such as ``left_hand`` and ``right_hand`` but others may be configured within a given :ref:`XRInterface`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_XRNode3D_method_get_has_tracking_data: -- :ref:`bool` **get_has_tracking_data** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_has_tracking_data** **(** **)** |const| Returns ``true`` if the :ref:`tracker` has current tracking data for the :ref:`pose` being tracked. +.. rst-class:: classref-item-separator + ---- .. _class_XRNode3D_method_get_is_active: -- :ref:`bool` **get_is_active** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **get_is_active** **(** **)** |const| Returns ``true`` if the :ref:`tracker` has been registered and the :ref:`pose` is being tracked. +.. rst-class:: classref-item-separator + ---- .. _class_XRNode3D_method_get_pose: -- :ref:`XRPose` **get_pose** **(** **)** +.. rst-class:: classref-method + +:ref:`XRPose` **get_pose** **(** **)** Returns the :ref:`XRPose` containing the current state of the pose being tracked. This gives access to additional properties of this pose. +.. rst-class:: classref-item-separator + ---- .. _class_XRNode3D_method_trigger_haptic_pulse: -- void **trigger_haptic_pulse** **(** :ref:`String` action_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** +.. 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 **)** Triggers a haptic pulse on a device associated with this interface. diff --git a/classes/class_xrorigin3d.rst b/classes/class_xrorigin3d.rst index e7a378370..854b3a9bb 100644 --- a/classes/class_xrorigin3d.rst +++ b/classes/class_xrorigin3d.rst @@ -14,6 +14,8 @@ XROrigin3D The origin point in AR/VR. +.. rst-class:: classref-introduction-group + Description ----------- @@ -25,50 +27,63 @@ It is the position of this node that you update when your character needs to mov 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 + Tutorials --------- - :doc:`XR documentation index <../tutorials/xr/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------+-----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`current` | ``false`` | -+---------------------------+-----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`world_scale` | ``1.0`` | -+---------------------------+-----------------------------------------------------------+-----------+ +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`current` | ``false`` | + +---------------------------+-----------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`world_scale` | ``1.0`` | + +---------------------------+-----------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_XROrigin3D_property_current: -- :ref:`bool` **current** +.. rst-class:: classref-property -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_current(value) | -+-----------+--------------------+ -| *Getter* | is_current() | -+-----------+--------------------+ +:ref:`bool` **current** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_current** **(** :ref:`bool` value **)** +- :ref:`bool` **is_current** **(** **)** Is this XROrigin3D node the current origin used by the :ref:`XRServer`? +.. rst-class:: classref-item-separator + ---- .. _class_XROrigin3D_property_world_scale: -- :ref:`float` **world_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_world_scale(value) | -+-----------+------------------------+ -| *Getter* | get_world_scale() | -+-----------+------------------------+ +:ref:`float` **world_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_world_scale** **(** :ref:`float` value **)** +- :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. diff --git a/classes/class_xrpose.rst b/classes/class_xrpose.rst index a90ca8897..3777afbdf 100644 --- a/classes/class_xrpose.rst +++ b/classes/class_xrpose.rst @@ -14,6 +14,8 @@ XRPose This object contains all data related to a pose on a tracked object. +.. rst-class:: classref-introduction-group + Description ----------- @@ -21,111 +23,149 @@ 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-reftable-group + Properties ---------- -+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`bool` | :ref:`has_tracking_data` | ``false`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`StringName` | :ref:`name` | ``&""`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`TrackingConfidence` | :ref:`tracking_confidence` | ``0`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ -| :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ +.. table:: + :widths: auto + + +-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`angular_velocity` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`has_tracking_data` | ``false`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3` | :ref:`linear_velocity` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`StringName` | :ref:`name` | ``&""`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`TrackingConfidence` | :ref:`tracking_confidence` | ``0`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +-----------------------------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+---------------------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`get_adjusted_transform` **(** **)** |const| | -+---------------------------------------+-----------------------------------------------------------------------------------------------+ +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_adjusted_transform` **(** **)** |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_XRPose_TrackingConfidence: -.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_NONE: - -.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_LOW: - -.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_HIGH: +.. rst-class:: classref-enumeration enum **TrackingConfidence**: -- **XR_TRACKING_CONFIDENCE_NONE** = **0** --- No tracking information is available for this pose. +.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_NONE: -- **XR_TRACKING_CONFIDENCE_LOW** = **1** --- Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured. +.. rst-class:: classref-enumeration-constant -- **XR_TRACKING_CONFIDENCE_HIGH** = **2** --- Tracking information is deemed accurate and up to date. +:ref:`TrackingConfidence` **XR_TRACKING_CONFIDENCE_NONE** = ``0`` + +No tracking information is available for this pose. + +.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_LOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackingConfidence` **XR_TRACKING_CONFIDENCE_LOW** = ``1`` + +Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured. + +.. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackingConfidence` **XR_TRACKING_CONFIDENCE_HIGH** = ``2`` + +Tracking information is deemed accurate and up to date. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_XRPose_property_angular_velocity: -- :ref:`Vector3` **angular_velocity** +.. rst-class:: classref-property -+-----------+-----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+-----------------------------+ -| *Setter* | set_angular_velocity(value) | -+-----------+-----------------------------+ -| *Getter* | get_angular_velocity() | -+-----------+-----------------------------+ +:ref:`Vector3` **angular_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_angular_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_angular_velocity** **(** **)** The angular velocity for this pose. +.. rst-class:: classref-item-separator + ---- .. _class_XRPose_property_has_tracking_data: -- :ref:`bool` **has_tracking_data** +.. rst-class:: classref-property -+-----------+------------------------------+ -| *Default* | ``false`` | -+-----------+------------------------------+ -| *Setter* | set_has_tracking_data(value) | -+-----------+------------------------------+ -| *Getter* | get_has_tracking_data() | -+-----------+------------------------------+ +:ref:`bool` **has_tracking_data** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_has_tracking_data** **(** :ref:`bool` value **)** +- :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. +.. rst-class:: classref-item-separator + ---- .. _class_XRPose_property_linear_velocity: -- :ref:`Vector3` **linear_velocity** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``Vector3(0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_linear_velocity(value) | -+-----------+----------------------------+ -| *Getter* | get_linear_velocity() | -+-----------+----------------------------+ +:ref:`Vector3` **linear_velocity** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_linear_velocity** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_linear_velocity** **(** **)** The linear velocity of this pose. +.. rst-class:: classref-item-separator + ---- .. _class_XRPose_property_name: -- :ref:`StringName` **name** +.. rst-class:: classref-property -+-----------+-----------------+ -| *Default* | ``&""`` | -+-----------+-----------------+ -| *Setter* | set_name(value) | -+-----------+-----------------+ -| *Getter* | get_name() | -+-----------+-----------------+ +:ref:`StringName` **name** = ``&""`` + +.. rst-class:: classref-property-setget + +- void **set_name** **(** :ref:`StringName` value **)** +- :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: @@ -137,44 +177,54 @@ The name of this pose. Pose names are often driven by an action map setup by the - ``skeleton`` defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime. +.. rst-class:: classref-item-separator + ---- .. _class_XRPose_property_tracking_confidence: -- :ref:`TrackingConfidence` **tracking_confidence** +.. rst-class:: classref-property -+-----------+--------------------------------+ -| *Default* | ``0`` | -+-----------+--------------------------------+ -| *Setter* | set_tracking_confidence(value) | -+-----------+--------------------------------+ -| *Getter* | get_tracking_confidence() | -+-----------+--------------------------------+ +:ref:`TrackingConfidence` **tracking_confidence** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tracking_confidence** **(** :ref:`TrackingConfidence` value **)** +- :ref:`TrackingConfidence` **get_tracking_confidence** **(** **)** The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is. +.. rst-class:: classref-item-separator + ---- .. _class_XRPose_property_transform: -- :ref:`Transform3D` **transform** +.. rst-class:: classref-property -+-----------+-----------------------------------------------------+ -| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | -+-----------+-----------------------------------------------------+ -| *Setter* | set_transform(value) | -+-----------+-----------------------------------------------------+ -| *Getter* | get_transform() | -+-----------+-----------------------------------------------------+ +:ref:`Transform3D` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_transform** **(** **)** The transform containing the original and transform as reported by the XR runtime. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_XRPose_method_get_adjusted_transform: -- :ref:`Transform3D` **get_adjusted_transform** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_adjusted_transform** **(** **)** |const| Returns the :ref:`transform` with world scale and our reference frame applied. This is the transform used to position :ref:`XRNode3D` objects. diff --git a/classes/class_xrpositionaltracker.rst b/classes/class_xrpositionaltracker.rst index 42c8c4123..d57ca7956 100644 --- a/classes/class_xrpositionaltracker.rst +++ b/classes/class_xrpositionaltracker.rst @@ -14,6 +14,8 @@ XRPositionalTracker A tracked object. +.. rst-class:: classref-introduction-group + Description ----------- @@ -23,157 +25,224 @@ As controllers are turned on and the :ref:`XRInterface` detec 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. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`XR documentation index <../tutorials/xr/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+----------------------------------------------------------+--------------------------------------------------------------------+----------------+ -| :ref:`String` | :ref:`description` | ``""`` | -+----------------------------------------------------------+--------------------------------------------------------------------+----------------+ -| :ref:`TrackerHand` | :ref:`hand` | ``0`` | -+----------------------------------------------------------+--------------------------------------------------------------------+----------------+ -| :ref:`StringName` | :ref:`name` | ``&"Unknown"`` | -+----------------------------------------------------------+--------------------------------------------------------------------+----------------+ -| :ref:`String` | :ref:`profile` | ``""`` | -+----------------------------------------------------------+--------------------------------------------------------------------+----------------+ -| :ref:`TrackerType` | :ref:`type` | ``128`` | -+----------------------------------------------------------+--------------------------------------------------------------------+----------------+ +.. 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`` | + +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_XRPositionalTracker_signal_button_pressed: -- **button_pressed** **(** :ref:`String` name **)** +.. rst-class:: classref-signal + +**button_pressed** **(** :ref:`String` name **)** Emitted when a button on this tracker is pressed. Note that many XR runtimes allow other inputs to be mapped to buttons. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_signal_button_released: -- **button_released** **(** :ref:`String` name **)** +.. rst-class:: classref-signal + +**button_released** **(** :ref:`String` name **)** Emitted when a button on this tracker is released. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_signal_input_axis_changed: -- **input_axis_changed** **(** :ref:`String` name, :ref:`Vector2` vector **)** +.. rst-class:: classref-signal + +**input_axis_changed** **(** :ref:`String` name, :ref:`Vector2` vector **)** Emitted when a thumbstick or thumbpad on this tracker moves. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_signal_input_value_changed: -- **input_value_changed** **(** :ref:`String` name, :ref:`float` value **)** +.. rst-class:: classref-signal + +**input_value_changed** **(** :ref:`String` name, :ref:`float` value **)** Emitted when a trigger or similar input on this tracker changes value. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_signal_pose_changed: -- **pose_changed** **(** :ref:`XRPose` pose **)** +.. rst-class:: classref-signal + +**pose_changed** **(** :ref:`XRPose` pose **)** Emitted when the state of a pose tracked by this tracker changes. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_signal_profile_changed: -- **profile_changed** **(** :ref:`String` role **)** +.. rst-class:: classref-signal + +**profile_changed** **(** :ref:`String` role **)** Emitted when the profile of our tracker changes. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_XRPositionalTracker_TrackerHand: -.. _class_XRPositionalTracker_constant_TRACKER_HAND_UNKNOWN: - -.. _class_XRPositionalTracker_constant_TRACKER_HAND_LEFT: - -.. _class_XRPositionalTracker_constant_TRACKER_HAND_RIGHT: +.. rst-class:: classref-enumeration enum **TrackerHand**: -- **TRACKER_HAND_UNKNOWN** = **0** --- The hand this tracker is held in is unknown or not applicable. +.. _class_XRPositionalTracker_constant_TRACKER_HAND_UNKNOWN: -- **TRACKER_HAND_LEFT** = **1** --- This tracker is the left hand controller. +.. rst-class:: classref-enumeration-constant -- **TRACKER_HAND_RIGHT** = **2** --- This tracker is the right hand controller. +:ref:`TrackerHand` **TRACKER_HAND_UNKNOWN** = ``0`` + +The hand this tracker is held in is unknown or not applicable. + +.. _class_XRPositionalTracker_constant_TRACKER_HAND_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerHand` **TRACKER_HAND_LEFT** = ``1`` + +This tracker is the left hand controller. + +.. _class_XRPositionalTracker_constant_TRACKER_HAND_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerHand` **TRACKER_HAND_RIGHT** = ``2`` + +This tracker is the right hand controller. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_XRPositionalTracker_property_description: -- :ref:`String` **description** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_tracker_desc(value) | -+-----------+-------------------------+ -| *Getter* | get_tracker_desc() | -+-----------+-------------------------+ +: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: -- :ref:`TrackerHand` **hand** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``0`` | -+-----------+-------------------------+ -| *Setter* | set_tracker_hand(value) | -+-----------+-------------------------+ -| *Getter* | get_tracker_hand() | -+-----------+-------------------------+ +:ref:`TrackerHand` **hand** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_tracker_hand** **(** :ref:`TrackerHand` value **)** +- :ref:`TrackerHand` **get_tracker_hand** **(** **)** Defines which hand this tracker relates to. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_property_name: -- :ref:`StringName` **name** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``&"Unknown"`` | -+-----------+-------------------------+ -| *Setter* | set_tracker_name(value) | -+-----------+-------------------------+ -| *Getter* | get_tracker_name() | -+-----------+-------------------------+ +: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: @@ -181,84 +250,114 @@ The unique name of this tracker. The trackers that are available differ between - ``right_hand`` identifies the controller held in the players right hand +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_property_profile: -- :ref:`String` **profile** +.. rst-class:: classref-property -+-----------+----------------------------+ -| *Default* | ``""`` | -+-----------+----------------------------+ -| *Setter* | set_tracker_profile(value) | -+-----------+----------------------------+ -| *Getter* | get_tracker_profile() | -+-----------+----------------------------+ +:ref:`String` **profile** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_tracker_profile** **(** :ref:`String` value **)** +- :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: -- :ref:`TrackerType` **type** +.. rst-class:: classref-property -+-----------+-------------------------+ -| *Default* | ``128`` | -+-----------+-------------------------+ -| *Setter* | set_tracker_type(value) | -+-----------+-------------------------+ -| *Getter* | get_tracker_type() | -+-----------+-------------------------+ +: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 + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_XRPositionalTracker_method_get_input: -- :ref:`Variant` **get_input** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`Variant` **get_input** **(** :ref:`StringName` name **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_method_get_pose: -- :ref:`XRPose` **get_pose** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`XRPose` **get_pose** **(** :ref:`StringName` name **)** |const| Returns the current :ref:`XRPose` state object for the bound ``name`` pose. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_method_has_pose: -- :ref:`bool` **has_pose** **(** :ref:`StringName` name **)** |const| +.. rst-class:: classref-method + +:ref:`bool` **has_pose** **(** :ref:`StringName` name **)** |const| Returns ``true`` if the tracker is available and is currently tracking the bound ``name`` pose. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_method_invalidate_pose: -- void **invalidate_pose** **(** :ref:`StringName` name **)** +.. rst-class:: classref-method + +void **invalidate_pose** **(** :ref:`StringName` name **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_method_set_input: -- void **set_input** **(** :ref:`StringName` name, :ref:`Variant` value **)** +.. rst-class:: classref-method + +void **set_input** **(** :ref:`StringName` name, :ref:`Variant` value **)** Changes the value for the given input. This method is called by a :ref:`XRInterface` implementation and should not be used directly. +.. rst-class:: classref-item-separator + ---- .. _class_XRPositionalTracker_method_set_pose: -- void **set_pose** **(** :ref:`StringName` name, :ref:`Transform3D` transform, :ref:`Vector3` linear_velocity, :ref:`Vector3` angular_velocity, :ref:`TrackingConfidence` tracking_confidence **)** +.. 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 **)** 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. diff --git a/classes/class_xrserver.rst b/classes/class_xrserver.rst index 194323abf..b0fabe6d5 100644 --- a/classes/class_xrserver.rst +++ b/classes/class_xrserver.rst @@ -14,203 +14,317 @@ XRServer Server for AR and VR features. +.. rst-class:: classref-introduction-group + Description ----------- The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing. +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`XR documentation index <../tutorials/xr/index>` +.. rst-class:: classref-reftable-group + Properties ---------- -+---------------------------------------+---------------------------------------------------------------------+---------+ -| :ref:`XRInterface` | :ref:`primary_interface` | | -+---------------------------------------+---------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`world_scale` | ``1.0`` | -+---------------------------------------+---------------------------------------------------------------------+---------+ +.. table:: + :widths: auto + + +---------------------------------------+---------------------------------------------------------------------+---------+ + | :ref:`XRInterface` | :ref:`primary_interface` | | + +---------------------------------------+---------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`world_scale` | ``1.0`` | + +---------------------------------------+---------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group Methods ------- -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 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 **)** | -+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Signals ------- .. _class_XRServer_signal_interface_added: -- **interface_added** **(** :ref:`StringName` interface_name **)** +.. rst-class:: classref-signal + +**interface_added** **(** :ref:`StringName` interface_name **)** Emitted when a new interface has been added. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_signal_interface_removed: -- **interface_removed** **(** :ref:`StringName` interface_name **)** +.. rst-class:: classref-signal + +**interface_removed** **(** :ref:`StringName` interface_name **)** Emitted when an interface is removed. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_signal_tracker_added: -- **tracker_added** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** +.. rst-class:: classref-signal + +**tracker_added** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** 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. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_signal_tracker_removed: -- **tracker_removed** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** +.. rst-class:: classref-signal + +**tracker_removed** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** 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). +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_signal_tracker_updated: -- **tracker_updated** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** +.. rst-class:: classref-signal + +**tracker_updated** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** Emitted when an existing tracker has been updated. This can happen if the user switches controllers. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Enumerations ------------ .. _enum_XRServer_TrackerType: -.. _class_XRServer_constant_TRACKER_HEAD: - -.. _class_XRServer_constant_TRACKER_CONTROLLER: - -.. _class_XRServer_constant_TRACKER_BASESTATION: - -.. _class_XRServer_constant_TRACKER_ANCHOR: - -.. _class_XRServer_constant_TRACKER_ANY_KNOWN: - -.. _class_XRServer_constant_TRACKER_UNKNOWN: - -.. _class_XRServer_constant_TRACKER_ANY: +.. rst-class:: classref-enumeration enum **TrackerType**: -- **TRACKER_HEAD** = **1** --- The tracker tracks the location of the players head. This is usually a location centered between the players eyes. Note that for handheld AR devices this can be the current location of the device. +.. _class_XRServer_constant_TRACKER_HEAD: -- **TRACKER_CONTROLLER** = **2** --- The tracker tracks the location of a controller. +.. rst-class:: classref-enumeration-constant -- **TRACKER_BASESTATION** = **4** --- The tracker tracks the location of a base station. +:ref:`TrackerType` **TRACKER_HEAD** = ``1`` -- **TRACKER_ANCHOR** = **8** --- The tracker tracks the location and size of an AR anchor. +The tracker tracks the location of the players head. This is usually a location centered between the players eyes. Note that for handheld AR devices this can be the current location of the device. -- **TRACKER_ANY_KNOWN** = **127** --- Used internally to filter trackers of any known type. +.. _class_XRServer_constant_TRACKER_CONTROLLER: -- **TRACKER_UNKNOWN** = **128** --- Used internally if we haven't set the tracker type yet. +.. rst-class:: classref-enumeration-constant -- **TRACKER_ANY** = **255** --- Used internally to select all trackers. +:ref:`TrackerType` **TRACKER_CONTROLLER** = ``2`` + +The tracker tracks the location of a controller. + +.. _class_XRServer_constant_TRACKER_BASESTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_BASESTATION** = ``4`` + +The tracker tracks the location of a base station. + +.. _class_XRServer_constant_TRACKER_ANCHOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_ANCHOR** = ``8`` + +The tracker tracks the location and size of an AR anchor. + +.. _class_XRServer_constant_TRACKER_ANY_KNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_ANY_KNOWN** = ``127`` + +Used internally to filter trackers of any known type. + +.. _class_XRServer_constant_TRACKER_UNKNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_UNKNOWN** = ``128`` + +Used internally if we haven't set the tracker type yet. + +.. _class_XRServer_constant_TRACKER_ANY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_ANY** = ``255`` + +Used internally to select all trackers. + +.. rst-class:: classref-item-separator ---- .. _enum_XRServer_RotationMode: -.. _class_XRServer_constant_RESET_FULL_ROTATION: - -.. _class_XRServer_constant_RESET_BUT_KEEP_TILT: - -.. _class_XRServer_constant_DONT_RESET_ROTATION: +.. rst-class:: classref-enumeration enum **RotationMode**: -- **RESET_FULL_ROTATION** = **0** --- Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world. +.. _class_XRServer_constant_RESET_FULL_ROTATION: -- **RESET_BUT_KEEP_TILT** = **1** --- Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset. +.. rst-class:: classref-enumeration-constant -- **DONT_RESET_ROTATION** = **2** --- Does not reset the orientation of the HMD, only the position of the player gets centered. +:ref:`RotationMode` **RESET_FULL_ROTATION** = ``0`` + +Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world. + +.. _class_XRServer_constant_RESET_BUT_KEEP_TILT: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationMode` **RESET_BUT_KEEP_TILT** = ``1`` + +Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset. + +.. _class_XRServer_constant_DONT_RESET_ROTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationMode` **DONT_RESET_ROTATION** = ``2`` + +Does not reset the orientation of the HMD, only the position of the player gets centered. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_XRServer_property_primary_interface: -- :ref:`XRInterface` **primary_interface** +.. rst-class:: classref-property -+----------+------------------------------+ -| *Setter* | set_primary_interface(value) | -+----------+------------------------------+ -| *Getter* | get_primary_interface() | -+----------+------------------------------+ +:ref:`XRInterface` **primary_interface** -The primary :ref:`XRInterface` currently bound to the ``XRServer``. +.. rst-class:: classref-property-setget + +- void **set_primary_interface** **(** :ref:`XRInterface` value **)** +- :ref:`XRInterface` **get_primary_interface** **(** **)** + +The primary :ref:`XRInterface` currently bound to the **XRServer**. + +.. rst-class:: classref-item-separator ---- .. _class_XRServer_property_world_scale: -- :ref:`float` **world_scale** +.. rst-class:: classref-property -+-----------+------------------------+ -| *Default* | ``1.0`` | -+-----------+------------------------+ -| *Setter* | set_world_scale(value) | -+-----------+------------------------+ -| *Getter* | get_world_scale() | -+-----------+------------------------+ +:ref:`float` **world_scale** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_world_scale** **(** :ref:`float` value **)** +- :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. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- .. _class_XRServer_method_add_interface: -- void **add_interface** **(** :ref:`XRInterface` interface **)** +.. rst-class:: classref-method + +void **add_interface** **(** :ref:`XRInterface` interface **)** Registers an :ref:`XRInterface` object. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_add_tracker: -- void **add_tracker** **(** :ref:`XRPositionalTracker` tracker **)** +.. rst-class:: classref-method + +void **add_tracker** **(** :ref:`XRPositionalTracker` tracker **)** Registers a new :ref:`XRPositionalTracker` that tracks a spatial location in real space. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_center_on_hmd: -- void **center_on_hmd** **(** :ref:`RotationMode` rotation_mode, :ref:`bool` keep_height **)** +.. rst-class:: classref-method + +void **center_on_hmd** **(** :ref:`RotationMode` rotation_mode, :ref:`bool` keep_height **)** This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently. @@ -224,83 +338,123 @@ For this method to produce usable results, tracking information must be availabl You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_find_interface: -- :ref:`XRInterface` **find_interface** **(** :ref:`String` name **)** |const| +.. rst-class:: classref-method + +:ref:`XRInterface` **find_interface** **(** :ref:`String` name **)** |const| 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. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_get_hmd_transform: -- :ref:`Transform3D` **get_hmd_transform** **(** **)** +.. rst-class:: classref-method + +:ref:`Transform3D` **get_hmd_transform** **(** **)** Returns the primary interface's transformation. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_get_interface: -- :ref:`XRInterface` **get_interface** **(** :ref:`int` idx **)** |const| +.. rst-class:: classref-method + +:ref:`XRInterface` **get_interface** **(** :ref:`int` idx **)** |const| Returns the interface registered at the given ``idx`` index in the list of interfaces. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_get_interface_count: -- :ref:`int` **get_interface_count** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`int` **get_interface_count** **(** **)** |const| 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``. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_get_interfaces: -- :ref:`Dictionary[]` **get_interfaces** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Dictionary[]` **get_interfaces** **(** **)** |const| Returns a list of available interfaces the ID and name of each interface. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_get_reference_frame: -- :ref:`Transform3D` **get_reference_frame** **(** **)** |const| +.. rst-class:: classref-method + +:ref:`Transform3D` **get_reference_frame** **(** **)** |const| Returns the reference frame transform. Mostly used internally and exposed for GDExtension build interfaces. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_get_tracker: -- :ref:`XRPositionalTracker` **get_tracker** **(** :ref:`StringName` tracker_name **)** |const| +.. rst-class:: classref-method + +:ref:`XRPositionalTracker` **get_tracker** **(** :ref:`StringName` tracker_name **)** |const| Returns the positional tracker with the given ``tracker_name``. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_get_trackers: -- :ref:`Dictionary` **get_trackers** **(** :ref:`int` tracker_types **)** +.. rst-class:: classref-method + +:ref:`Dictionary` **get_trackers** **(** :ref:`int` tracker_types **)** Returns a dictionary of trackers for ``tracker_types``. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_remove_interface: -- void **remove_interface** **(** :ref:`XRInterface` interface **)** +.. rst-class:: classref-method + +void **remove_interface** **(** :ref:`XRInterface` interface **)** Removes this ``interface``. +.. rst-class:: classref-item-separator + ---- .. _class_XRServer_method_remove_tracker: -- void **remove_tracker** **(** :ref:`XRPositionalTracker` tracker **)** +.. rst-class:: classref-method + +void **remove_tracker** **(** :ref:`XRPositionalTracker` tracker **)** Removes this positional ``tracker``. diff --git a/classes/class_zippacker.rst b/classes/class_zippacker.rst index af8c9067f..314fdbac8 100644 --- a/classes/class_zippacker.rst +++ b/classes/class_zippacker.rst @@ -14,6 +14,8 @@ ZIPPacker Allows the creation of zip files. +.. rst-class:: classref-introduction-group + Description ----------- @@ -33,84 +35,133 @@ This class implements a writer that allows storing the multiple blobs in a zip a writer.close() return OK +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ZIPPacker_ZipAppend: -.. _class_ZIPPacker_constant_APPEND_CREATE: - -.. _class_ZIPPacker_constant_APPEND_CREATEAFTER: - -.. _class_ZIPPacker_constant_APPEND_ADDINZIP: +.. rst-class:: classref-enumeration enum **ZipAppend**: -- **APPEND_CREATE** = **0** +.. _class_ZIPPacker_constant_APPEND_CREATE: -- **APPEND_CREATEAFTER** = **1** +.. rst-class:: classref-enumeration-constant -- **APPEND_ADDINZIP** = **2** +:ref:`ZipAppend` **APPEND_CREATE** = ``0`` + + + +.. _class_ZIPPacker_constant_APPEND_CREATEAFTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ZipAppend` **APPEND_CREATEAFTER** = ``1`` + + + +.. _class_ZIPPacker_constant_APPEND_ADDINZIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`ZipAppend` **APPEND_ADDINZIP** = ``2`` + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ZIPPacker_method_close: -- :ref:`Error` **close** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **close** **(** **)** Closes the underlying resources used by this instance. +.. rst-class:: classref-item-separator + ---- .. _class_ZIPPacker_method_close_file: -- :ref:`Error` **close_file** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **close_file** **(** **)** Stops writing to a file within the archive. It will fail if there is no open file. +.. rst-class:: classref-item-separator + ---- .. _class_ZIPPacker_method_open: -- :ref:`Error` **open** **(** :ref:`String` path, :ref:`ZipAppend` append=0 **)** +.. rst-class:: classref-method + +:ref:`Error` **open** **(** :ref:`String` path, :ref:`ZipAppend` append=0 **)** Opens a zip file for writing at the given path using the specified write mode. This must be called before everything else. +.. rst-class:: classref-item-separator + ---- .. _class_ZIPPacker_method_start_file: -- :ref:`Error` **start_file** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **start_file** **(** :ref:`String` path **)** Starts writing to a file within the archive. Only one file can be written at the same time. Must be called after :ref:`open`. +.. rst-class:: classref-item-separator + ---- .. _class_ZIPPacker_method_write_file: -- :ref:`Error` **write_file** **(** :ref:`PackedByteArray` data **)** +.. rst-class:: classref-method + +:ref:`Error` **write_file** **(** :ref:`PackedByteArray` data **)** Write the given ``data`` to the file. diff --git a/classes/class_zipreader.rst b/classes/class_zipreader.rst index f479f801a..044410207 100644 --- a/classes/class_zipreader.rst +++ b/classes/class_zipreader.rst @@ -14,6 +14,8 @@ ZIPReader Allows reading the content of a zip file. +.. rst-class:: classref-introduction-group + Description ----------- @@ -24,57 +26,82 @@ This class implements a reader that can extract the content of individual files func read_zip_file(): var reader := ZIPReader.new() var err := reader.open("user://archive.zip") - if err == OK: + if err != OK: return PackedByteArray() var res := reader.read_file("hello.txt") reader.close() return res +.. rst-class:: classref-reftable-group + Methods ------- -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ -| :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 **)** | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +.. 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 **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ZIPReader_method_close: -- :ref:`Error` **close** **(** **)** +.. rst-class:: classref-method + +:ref:`Error` **close** **(** **)** Closes the underlying resources used by this instance. +.. rst-class:: classref-item-separator + ---- .. _class_ZIPReader_method_get_files: -- :ref:`PackedStringArray` **get_files** **(** **)** +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_files** **(** **)** Returns the list of names of all files in the loaded archive. Must be called after :ref:`open`. +.. rst-class:: classref-item-separator + ---- .. _class_ZIPReader_method_open: -- :ref:`Error` **open** **(** :ref:`String` path **)** +.. rst-class:: classref-method + +:ref:`Error` **open** **(** :ref:`String` path **)** Opens the zip archive at the given ``path`` and reads its file index. +.. rst-class:: classref-item-separator + ---- .. _class_ZIPReader_method_read_file: -- :ref:`PackedByteArray` **read_file** **(** :ref:`String` path, :ref:`bool` case_sensitive=true **)** +.. rst-class:: classref-method + +:ref:`PackedByteArray` **read_file** **(** :ref:`String` path, :ref:`bool` case_sensitive=true **)** Loads the whole content of a file in the loaded zip archive into memory and returns it. diff --git a/classes/index.rst b/classes/index.rst index 0e27db070..e51ec5a47 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -755,6 +755,7 @@ Other objects class_navigationserver3d class_node class_node3dgizmo + class_offlinemultiplayerpeer class_oggpacketsequenceplayback class_openxrinterface class_os